The Physics
Every body exerts a gravitational pull on every other body simultaneously. Force is calculated using
F = Gm₁m₂ / r² — force grows with mass and drops with the square of distance.
The 3-Body Problem
For 3 or more bodies, there is no general mathematical solution — the motion is inherently chaotic and unpredictable over long timescales. This is one of physics' oldest unsolved problems.
The Figure-8
Discovered in 1993 by mathematician Chenciner, the Figure-8 is a rare, exact periodic solution where 3 equal-mass bodies chase each other in a figure-8 shape. Extraordinarily precise initial conditions are required — slight errors cause it to break apart.
Numerical Integration
The simulation uses a leapfrog-style Euler integrator with sub-stepping (4 steps per frame) for stability. A softening factor prevents infinite forces when bodies get too close.
Live Stats
KE½mv²
PE−Gm₁m₂/r
Total EKE + PE
🧮 Gravity Calculator →
🛰️ Orbital Speed →
📝 Gravity Article →