← All simulations
Astronomy / CELESTIAL MECHANICS

Orbital Resonance: A Three-Body Gravity Lab

Tune the gravitational dance of three massive bodies and watch orbital trajectories evolve.

INTERACTIVE · CANVAS · REAL MATH
Simulation viewport2D / REAL-TIME
DRAG SLIDERS TO EXPERIMENT

How this simulation works

Each body accelerates under the Newtonian attraction of the other two. A softened inverse-square force keeps close encounters numerically stable; velocity-Verlet integration conserves energy better than basic Euler stepping.

aᵢ = G Σⱼ mⱼ(rⱼ − rᵢ) / (|rⱼ − rᵢ|² + ε²)³ᐟ²
✦ TRY THIS EXPERIMENTRaise the third mass until a formerly regular orbit becomes chaotic.
Made with 🤖 ChatGPT