Sign in to follow this  
UserX03

Distance traveled over time with a decreasing velocity

Recommended Posts

I think this is a calculus problem and my calculus is pretty rusty so I'll appreciate if someone can point out how to solve this. I want to calculate the distance traveled over a given amount of time given a velocity is that is decreasing over that time period. For example, say I have a 2D game with a moving platform. The platform is moving at a velocity of 100 units/second and when it hits a certain point, let's call it point A, the velocity is decreased linearly over 2 seconds until the platform is at a standstill and is now at point B. That is, when the platform reaches point A it is moving at 100 units/second, 1 second after hitting point A is moving at 50 units/second, 1.5 seconds after hitting point A is moving at 25 units/second, 2 seconds after hitting point A is moving at 0 units/second and is now at point B. How do I calculate the distance from point A to point B?

Share this post


Link to post
Share on other sites
With an initial velocity v and a constant acceleration a, distance traveled is equal to v * t + .5 * a * t * t.

Share this post


Link to post
Share on other sites
You can use distance = speed*time, or x = v*t, since the acceleration is linear.

Because the acceleration (well, deceleration) is linear (no way for you to know this necessarily if you're not into calculus), you can use average velocity.

So:

V@A = 100. V@B = 0. V_avg = 50. x = v*t = 50*2 = 100 units.

SiCrane's equation is more rigorous.

"a" (acceleration) = -100/2 (change of -100 units/second in 2 seconds) = -50.

So:
With V@A = 100, his equation becomes 100*2 + 0.5 * -50 * 2 * 2 = 200 + 0.5 * (-200) = 100 units.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this