EXPERIMENT 002 · GRAVITY

Three bodies. No simple orbits.

Give Earth a second moon and watch their mutual gravity transform the entire system.

Three-body problem
RUNNING0.00 days
Motion of Earth and two moons
● Earth ● Moon ● Moon II+ center of mass
Earth–CM 5,373 kmEarth displacement 0 kmEnergy error 0.0e+0
Explore the orbitsenergy · orbit shape · distance⌄

Energy ε indicates whether a moon is bound to Earth: ε < 0 means bound, ε = 0 is the escape threshold, and ε > 0 means it can escape from an isolated pair.

Eccentricity e describes the calculated orbit’s shape: e = 0 is a circle, 0 < e < 1 is an ellipse, e = 1 is the escape threshold, and e > 1 is a hyperbola.

These are instantaneous estimates relative to the moving Earth. The third body’s gravity keeps changing them.

MoonEnergy: ε = -0.525 MJ/kgEccentricity: e = 0.0549Ellipse
Moon IIEnergy: ε = -0.404 MJ/kgEccentricity: e = 0.0000Ellipse

1 / 30,000 points · current sampling interval: 7,200.0 s.

Specific orbital energy

MJ/kg · zero is the escape threshold

Chart of the moons’ specific orbital energy

Eccentricity

Instantaneous orbit shape · one is the escape threshold

Chart of the moons’ orbital eccentricity

Distance from Earth’s center

thousand km

Chart of the moons’ distances from Earth
02 /

Why is the motion so hard to predict?

Each body attracts the other two, so their orbits keep changing. Choose a preset or set your own initial conditions and compare the results.

Numerical model
Mutual gravity · realistic scales
No Sun or tidal effects
Theory behind the experimentHow a second moon changes the whole system and why orbits stop being fixedPlain explanation, equations and how the model works

In plain words

We usually picture the Moon circling a motionless Earth. Even for two bodies that’s a simplification: both actually orbit their common centre of mass. In this experiment the Earth moves freely too, and a second satellite joins the familiar Moon.

Each of the three bodies pulls on the other two. The second moon nudges the first, the first tugs the second, and both rock the Earth. So you can’t draw two separate orbits and let the satellites follow them forever. Speeds and paths keep changing under their shared gravity.

This shows up most during close encounters. The satellites can trade energy: one moves to a more stretched orbit while the other drops closer to Earth or starts drifting away. You’ll see fairly calm motion, collisions and messy rearrangements. It all depends on the masses, positions and starting speeds.

The law of gravity itself is very simple. The hard part is getting the whole future motion out of three bodies pulling on each other. That’s why the orbits here aren’t drawn in advance but computed step by step.

Try it yourself

  1. Pick “A massive moon”. Watch not only the satellites but also how the Earth moves around the centre of mass (the pink cross).
  2. Compare a normal scenario with “A moon in a retrograde orbit”. See how the encounters and the distance charts change.
  3. Pick “Falling to Earth”. With no sideways speed the satellite can’t go around the Earth and falls onto it. The simulation stops when the surfaces touch.

Physics and equations

Each body’s acceleration is the sum of the pulls from the other two:

r¨i=G∑j≠imj rj−ri∣rj−ri∣3\ddot{\mathbf r}_i=G\sum_{j\ne i}m_j\,\frac{\mathbf r_j-\mathbf r_i}{|\mathbf r_j-\mathbf r_i|^3}

Here ri\mathbf r_i is a body’s position in metres, mjm_j the other body’s mass in kilograms, and GG the gravitational constant. The vector on top points toward the attracting body, and the cubed distance below gives the familiar 1/r21/r^2 fall-off.

The common centre of mass is

R=m1r1+m2r2+m3r3m1+m2+m3\mathbf R=\frac{m_1\mathbf r_1+m_2\mathbf r_2+m_3\mathbf r_3}{m_1+m_2+m_3}

It’s the average position of the bodies, each weighted by its mass. In an isolated system the centre of mass moves at constant velocity; here the starting speeds are chosen so it stays put. The “centre of mass” view only changes where you watch from, not the forces.

Until a collision, the total mechanical energy is conserved:

E=∑imi∣vi∣22−∑i<jG mimjrijE=\sum_i\frac{m_i|\mathbf v_i|^2}{2}-\sum_{i<j}\frac{G\,m_i m_j}{r_{ij}}
rij=∣rj−ri∣r_{ij}=|\mathbf r_j-\mathbf r_i|

The first sum is kinetic energy, the second is the potential energy of every pair, and vi\mathbf v_i is velocity. It’s the energy of the whole system that is conserved. A single satellite’s energy relative to Earth can change, because the third body takes or gives it.

Reading the eccentricity

For the Earth and one satellite you can take the current position and velocity and work out which ellipse or hyperbola the satellite would follow if the third body suddenly vanished. This is called the instantaneous, or osculating, orbit.

ε=v22−μr,μ=G (M⊕+m)\varepsilon=\frac{v^2}{2}-\frac{\mu}{r},\qquad \mu=G\,(M_\oplus+m)
e=1+2εh2μ2,h=∣r×v∣e=\sqrt{1+\frac{2\varepsilon h^2}{\mu^2}},\qquad h=|\mathbf r\times\mathbf v|

Here rr and vv are distance and speed relative to Earth, M⊕M_\oplus is the Earth’s mass, mm the satellite’s mass, and hh the specific angular momentum. For an isolated pair, e=0e=0 is a circle, 0<e<10<e<1 an ellipse, e=1e=1 a parabola and e>1e>1 a hyperbola. If the satellite moves straight along the radius the orbit is degenerate, and ee alone doesn’t describe it.

In the three-body problem these numbers keep changing. A moment with e>1e>1 or positive energy relative to Earth doesn’t mean the satellite will leave the system for good.

How the model works

The simulation is an isolated flat system: the Earth and two satellites with Newtonian gravity. Orbits aren’t drawn in advance; the mutual pull is recomputed at every step. The Sun, tides, rotation, deformation and relativity are left out.

Masses, radii and distances are in SI units and match the real Earth and Moon. The second moon’s radius grows as the cube root of its mass, so it has the same density as our Moon. When surfaces touch the simulation stops; breakup and debris aren’t modelled.

Integration uses velocity Verlet. The step is at most 120 seconds and shrinks automatically during close approaches. The energy error chart shows numerical accuracy, not a real loss of energy. The error is divided by the initial kinetic energy plus the magnitude of the initial potential energy.

Trails and charts keep up to 30,000 points. Points are recorded more often during close approaches, and long trails are simplified before drawing without touching the calculation.

The 60° scenario is just a starting layout for experimenting, not an exact Lagrange solution. Likewise, the above-escape-speed scenario only describes the starting speed for the Earth and the second moon. It doesn’t guarantee how the three-body motion ends.

Sources and further reading

The Feynman Lectures, Vol. I, ch. 7 ↗: the theory of gravitation and planetary motion.

The Feynman Lectures, Vol. I, ch. 13 ↗: work and potential energy.

Experiment video

Two moons

Watch the short video, then try changing the model’s parameters yourself.

Video in Russian

Watch on YouTube