Thread: physics
View Single Post
Old 10-16-2003, 06:41 PM   #1 (permalink)
saline
I am red.
 
saline's Avatar
 
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
saline is on a distinguished road
physics

Ok, so here's the deal. I'm just messing around with pyGame, which is a collection of methods and things to use for writing games.

I'm just getting into it so I just wanted to make something that draws a ball and then makes it fall with "real physics action"(TM).

So, I got it to draw the ball and looked up the formula

d = 1/2(a t*t)

in english: distance equals one half of the quantity accelleration multiplied by time squared.

That crazy gallileo...

anyway, the thing I realized after much confusion was that my numbers weren't floats, so they were rounding, no good.

Then I realized further that this equation produces results in meters per second. I was displaying it however in pixels per second.

You will likely see the problem with this. The ball starts out travelling just a little too slow and then it goes way too fast. A little too fast is justifiable because I make no account for air resistance but it's way too fast.

So the question is, how many pixels are in a meter? And further, is this actually going to fix my problem do you think?

Thanks in advance.
__________________
http://home.cwru.edu/~cak19

It's my homepage with odd little bits of javascript.
saline is offline   Reply With Quote