Jump to content
  • Advertisement
Sign in to follow this  
EGDEric

Is my math right?

This topic is 654 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If I have an object that accelerates from 0 to X, I want to know what it's speed will be by the time it covers a certain amount of ground.

 

So:

function for time it takes to accelerate to a certain speed:

 t = s/a, where s = speed, a = acceleration.

function for speed / time: s = t

space needed to accelerate to a certain speed = 1/2 (s/a)2,

dist = s2/2a2

 

s2 = 2a2  * dist

s = sqrt(2*dist)*a

 

So, this way, I can get the speed from the distance travelled. Is this correct?

I'm having some problems, so I'm wondering if the math for this is incorrect, or if it's something else.

Share this post


Link to post
Share on other sites
Advertisement
X = 1/2 * a * t ^ 2
V = a * t -> t = V / a

// Looks like you dropped an 'a' here
X = 1/2 * a * (V / a) ^ 2 = 1/2 * V^2 / a
2 * a * X = V^2
And the result
V = sqrt(2 * a * X);
Edited by HappyCoder

Share this post


Link to post
Share on other sites

Thanks HappyCoder! That makes sense. I hadn't thought of getting the integral of the function for velocity, only the one for time.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!