| New Reply |
Gravity and Distance traveled |
Share Thread | Thread Tools |
| Aug7-12, 04:08 PM | #1 |
|
|
Gravity and Distance traveled
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. |
| Aug7-12, 05:02 PM | #2 |
|
|
Vf = Vi + G * t Xf = Xi + Vi * t + .5 * G * t2 distance = Xf - Xi = Vi * t + .5 * G * t2 Use the velocity when you paused as Vi and use 1 for t. |
| Aug7-12, 05:02 PM | #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] |
| Aug7-12, 05:13 PM | #4 |
|
Mentor
|
Gravity and Distance traveled
Welcome to PF!
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. |
| Aug7-12, 06:00 PM | #5 |
|
|
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:
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. |
| Aug7-12, 06:06 PM | #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.
|
| New Reply |
| Tags |
| free fall, gravity |
| Thread Tools | |
Similar Threads for: Gravity and Distance traveled
|
||||
| Thread | Forum | Replies | ||
| Deriving distance traveled | General Physics | 5 | ||
| Distance traveled! | Introductory Physics Homework | 11 | ||
| Distance Traveled | Introductory Physics Homework | 5 | ||
| Distance traveled, v->c | Advanced Physics Homework | 13 | ||
| distance traveled | Introductory Physics Homework | 1 | ||