Orbit Sandbox illustration

Orbit Sandbox

This is a gravity sandbox: bodies attract each other by Newton’s inverse-square law and you set the initial conditions. Drag from a body to launch it with a velocity shown as an arrow, and the simulator integrates the motion with a symplectic step that conserves energy well enough to keep orbits stable for a long time. A heavy central star anchors the scene by default, but you can add more masses to build binary stars, moons and full many-body systems. Each body leaves a fading trail so ellipses, hyperbolic flybys and slow precession are easy to see, and the total energy and momentum read out live.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Gravity here follows F = G m₁ m₂ / r², the same law that governs real planets; a single small body around a heavy star traces the ellipse Kepler described, sweeping equal areas in equal times.
  • With three or more comparable masses the motion is generally chaotic: tiny changes to a launch send the system onto a completely different path, which is why the three-body problem has no closed-form solution.
  • A light body swinging close behind a moving planet steals a little of its momentum and speeds up — the gravitational slingshot real spacecraft use to reach the outer planets.
  • Runs 100% in your browser — simulations are computed locally on your device.