Set up an equation with position and time instead. You can also find the velocity from the objects change in. To find velocity take the derivative of your original position equation.
Then the entire code for each frame excluding the drawing logic and assuming one dimension just becomes.
How do I calculate escape velocity. To find velocity take the derivative of your original position equation. Definition Equation Problems. For example if an object is tossed into the air we might find the following data for the height in feet y of the object.