Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Gravity and Distance traveled

  1. Aug 7, 2012 #1
    I'm tyring to code an engine that simply adds gravity to the world.
    I know that gravity is a constant value added to the velocity of an object on each second, like this:

    Velocity = Vi * t + 0.5 * G * T2

    What i'm tyring to figure out, is the distance traveled of an object falling from any point in time, without having the values of the initial time or initial velocity...

    Let's say i drop a coin from some distance to the floor. Now let's say i stop the time at some X seconds. I want to know how much the coin will move in the Y axis only knowing the velocity of the coin at that particular time and nothing else.

    I dont want to know the total distance since i dropped the coin. I want to know the distance that the coin will travel starting from the moment i paused the fall to 1 second forward in time.
     
  2. jcsd
  3. Aug 7, 2012 #2

    jbriggs444

    User Avatar
    Science Advisor

    That equation is incorrect

    Vf = Vi + G * t
    Xf = Xi + Vi * t + .5 * G * t2

    Rewrite the second equation above.

    distance = Xf - Xi = Vi * t + .5 * G * t2

    Use the velocity when you paused as Vi and use 1 for t.
     
  4. Aug 7, 2012 #3
    It should be:
    Distance = Vi * t + 0.5 * G * T2
    so use this formula with [itex]v_i=v(X)[/itex] and [itex]T=1[/itex]
     
  5. Aug 7, 2012 #4

    cepheid

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Welcome to PF!

    Just a complaint about terminology: I would not say that gravity IS a constant value added to the velocity of an object each second. Gravity is a force. It is true that the force of gravity ADDS a constant value to the (vertical) velocity of a falling object each second. In other words, the force of gravity causes a constant acceleration. That is its effect. The change in velocity in one second due to this acceleration is what you described above. You might think I'm being pedantic, but it is important to distinguish between different types of quantities in physics. Gravity is a force, and a force is not the same thing as a velocity or an acceleration. A force causes an acceleration, which implies a change in velocity.

    You can still use the same equation and just take NOW to be the initial time, and "one second from now" to be the final time. So, in this situation, vi is the velocity now which we are taking to be the initial velocity. The important thing to remember is that the equation is actually:

    d = vi Δt + (1/2)a(Δt)2

    where Δt is the difference between the final time (after the distance has been travelled) and the initial time. Normally, we take the initial time to be t = 0, and the final time, t is the amount of elapsed time "up to now", so that Δt = t - 0 = t, and it's just fine to replace Δt with t. But if you're not starting at t = 0, then that's not the case.

    Example:

    You're watching a recorded video of me dropping a coin. Suppose, at t = 0, I dropped the coin (i.e. I released it from rest) from a height of 1 metre. Suppose that you come into the room 3 seconds after the video had already started. So you don't know what the initial height was. All you know is that right now at this instant (at t = 3 s) it is falling at a speed of 29.43 m/s. (Somehow you were able to determine this -- who cares how). Now, you want to determine how far it will have fallen (below its current height) one second from now, at t = 4 s. All you have to do is take the initial time ti to be 3 s , and the final time, tf to be 4 s. Then Δt = tf - ti = 1 s. In this time interval, the object will fall a distance:

    d = vi Δt + (1/2)a(Δt)2

    = (-29.43 m/s)*(1 s) + (1/2)(-9.81 m/s2)*(1 s)2

    = -29.43 m - (4.905 m/s2)*(1 s2)

    = -34.335 m

    Notice that the ONLY numbers I used in the calculation above were: 1. the time interval I was interested in (1 s), 2. the velocity at the beginning of that time interval, and 3. the acceleration due to gravity.

    A slight flaw with my example is that an object dropped from a height of 1 m would hit the floor long before t = 3 s, but who cares? It's irrelevant to the example. This is the distance that a freely falling object with that initial downward speed will fall in 1 second regardless of where or how fast it started.
     
  6. Aug 7, 2012 #5
    Yes i know, i was in a rush, and i do agree that terminology IS important.

    Thanks!!!!!! Finally i can sleep!! Having no background in physics, this simple problem was killing my poor brain, lol. At one time i was using that same formula, and i was getting wrong results, but after i saw this posts i noticed my error: i was taking the initial distance rater than speed in the first component of the equation, so that was destroying my rational brain haha.

    Ok, problem solved!


    As a side note, i ended up solving this problem on a diferent manner a few moments before reading this post. I formulated this:

    *** Warning: this formula was made up without physics knowledge ***

    Code (Text):

    Let V = Velocity of the object at a given time.
    Let Y = Vertical position of the object at a given time.

    StepY = V * (V/g)  * 0.5  - Y; //this is how much the object will move in the next second.
     
     
  7. Aug 7, 2012 #6
    PS: i will use the d = vi Δt + (1/2)a(Δt)2 formula, my "made up formula" is way to ugly, and it was a desperated attempt to solve my problem. Doing Vi + 0.5 * a is way cleaner, because i will always evaluate 1 second ahead of time.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Gravity and Distance traveled
Loading...