0
$\begingroup$

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:

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.

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

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.