◂ SIMULATOOL
ORBIT LABN-BODY GRAVITY
2D · 3D
1 d/s

ORBIT LAB

Orbit Lab is a gravity sandbox that runs real Newtonian physics in your browser, in 2D or full 3D. Every body pulls on every other body (a direct-sum n-body simulation) using the actual gravitational constant and real masses, radii, distances and orbital tilts. Load the Solar System on any date between 1800 and 2050, replay Voyager 2’s Grand Tour, tear a moon apart at the Roche limit, or smash two galaxies together.

HOW TO USE IT

THE PHYSICS

Planets are advanced with a fourth-order symplectic integrator (Yoshida’s method), which keeps energy errors bounded instead of letting them pile up, so planets don’t slowly spiral away. The timestep shrinks automatically during close encounters. The ΔE and ΔL readouts show how far total energy and angular momentum have drifted, which is the honest measure of how much to trust what you see.

Probes are integrated separately with their own small timesteps against planet positions interpolated from the main simulation, so a probe in a 90-minute orbit doesn’t slow the whole Solar System down. Colliding bodies merge, conserving mass, momentum and volume.

SLINGSHOT MODE

Open FLIGHT to launch a probe into a parking orbit, pick a target and plan burns with maneuver nodes. Drag a node’s handles: green for prograde and retrograde, cyan for radial, violet for normal (plane changes). Each flyby gets a breakdown: hyperbolic excess speed in and out, closest altitude, turning angle, and the speed gained relative to the Sun, which is the gravity assist.

The auto-planner searches launch dates and flight times by solving Lambert’s problem, then corrects the burn in the full n-body model by aiming at a point on the target’s B-plane, the way mission navigators do. The porkchop plot shows the cost of every launch date and flight time between two planets at once; tap a cell to fly it.

MISSION REPLAYS

Voyager 2, Galileo and Cassini are rebuilt from their real launch and flyby dates: Lambert arcs between the encounters, flybys aimed to bend one arc into the next, a deep-space maneuver where a flyby alone can’t do it (Cassini needed one between its Venus passes), then every burn corrected in the n-body model. Because the planets come from approximate orbital elements, the replays need some small trajectory correction maneuvers that the real missions didn’t, but they hit every planet within a day or two of the real dates.

ROTATING FRAMES, ROCHE LIMITS AND GALAXIES

A rotating frame turns with two bodies, so the five Lagrange points stand still and asteroids around them trace tadpole and horseshoe loops. The shaded zero-velocity curves mark where the selected body can never go, according to its Jacobi constant.

Anything that strays inside its Roche limit is torn into rubble that shears into a ring. Large particle sets, like two colliding galaxies with live dark matter halos, use a Barnes-Hut octree that groups distant particles together, cutting the work from N² to about N log N.

Simplifications: rings stay eccentric because rubble doesn’t collide; stars use a tidal radius of 1× instead of the fluid Roche factor of 2.44; galaxy particles are softened over half a kiloparsec.