Sketch · 2026-07-17
N-body gravity, the figure-eight.
Three equal masses chasing each other around a single closed curve. It looks like it should not be possible, and for two hundred years no one thought it was. The Chenciner-Montgomery orbit sits inside a velocity-Verlet integrator here, so you can load it, watch it hold, then break it by adding a fourth body.
What the figure-eight is
For a long time, everyone had two families of periodic three-body orbits: circular ones with all masses on a common circle (Lagrange, 1772), and collinear ones on a rotating line (Euler, 1767). Christopher Moore found the figure-eight numerically in 1993 by minimising an action integral on a computer. Alain Chenciner and Richard Montgomery proved in 2000 that it exists as a genuine periodic solution of Newton's equations. Three equal masses, one closed curve, all three tracing it in turn.
Why velocity Verlet
A naive Euler step blows up the figure-eight in a fraction of a period. Velocity Verlet is a symplectic integrator: it does not conserve energy exactly, but the error stays bounded instead of drifting off to infinity. The energy drift readout is the ratio of current total energy to the initial value. On the figure-eight preset it should sit within a tenth of a percent for a long time. Add a fourth body and the whole system is chaotic, but the integrator still holds.
The softening constant
Point-mass gravity has a singularity: two bodies touching produce an infinite force and any explicit integrator explodes. A small constant added under the cube root, called Plummer softening, rounds the potential at short range. The figure-eight uses a very small value so the exact dynamics survive; the freeform presets use a larger one so close encounters slingshot instead of exploding.
Sources
- Chenciner, A., & Montgomery, R. (2000). A remarkable periodic solution of the three-body problem in the case of equal masses. Annals of Mathematics, 152(3), 881-901.
- Moore, C. (1993). Braids in classical dynamics. Physical Review Letters, 70(24), 3675-3679.
- Hairer, E., Lubich, C., & Wanner, G. (2003). Geometric numerical integration illustrated by the Störmer-Verlet method. Acta Numerica 12, 399-450. The reference for why symplectic integrators keep the energy well-behaved.