# Decreased velocity away from gravity

Say I have a particle ($$G$$), which has the mass of the earth (hypothetically), and I have a second particle ($$P$$) moving away from $$G$$, in a line that is not parallel to the earth. Would this line change direction, or would the line just get shorter, and then how would I work out the new angle or line length?

Example:

Distance between $$P$$ and $$G$$: $$5$$m

Also: This question is for a physics engine which uses vectors, so reference to velocities as vectors is helpful, but not a necessity.

• Are you assuming that the Earth-size mass has a fixed position? – Brionius Mar 10 '15 at 21:17
• @Brionius Yes, in the example G doesn't move – bboy3577 Mar 10 '15 at 21:25

## 1 Answer

You need Newton's law of universal gravitation and Newton's 2nd law: $$\vec{F_g} = G \frac{M m}{r^2} \hat{r}$$ $$\vec{F_{net}} = m \frac{d\vec{v}}{dt}$$

Here, $M$ is the mass of particle G, $m$ is the mass of particle P, $r$ is the distance between P and G, and $\vec{r}$ is the unit vector pointing from G to P.

If the only force on this particle is the force of gravity, then $\vec{F_{net}} = \vec{F_g}$:

$$G \frac{M m}{r^2} \hat{r} = m \frac{d\vec{v}}{dt}$$

We can break this into polar components, and make it into a discrete-time equation for simulation purposes:

$$\Delta v_r = G \frac{M}{r^2} \Delta t$$ $$\Delta v_{\phi} = 0$$

This will give you the change in the particle's velocity at each time interval.

Here $\Delta t$ is a short time interval, and $\Delta v_r$ is the change in the radial component of the velocity of P during that interval. Similarly, $\Delta v_{\phi}$ is the change in the azimuthal component of the velocity vector during that time.

Note that you will probably have to do some work transforming these coordinates into your simulation's coordinate system. Also, this analysis assumes that particle G is stationary.

• Do I assume all the symbols ($\Delta$, $M$ etc.) use the standard mathematical/scientific meanings? – bboy3577 Mar 10 '15 at 21:31
• Yes - edited to clarify the symbol meanings. – Brionius Mar 10 '15 at 21:45