Silicon Logic
SL · 07 · Orbit
§ 07 · Sandbox · Celestial mechanics Filed 2026.05

One star, one arrow, and the laws fall out by hand.

Click anywhere near the star to nock a planet. Pull the cursor back like a bowstring and release — the planet flies off in the opposite direction with the speed you gave it. Aim short and it falls back as an ellipse; aim long and it slips the star's grip entirely. Three of Kepler's observations are waiting for you on the other side of a few good throws.

Frame   Inertial · star-fixed Bodies   0 GM   8.0×10⁵
Selected   e   a   T  
click  to place  ·  drag  to nock the bow  ·  release to launch
Gravity · GM
8.0e5
Time warp
1.00×
Trails
14
Show
Sandbox
Try this
Kepler III · T² vs a³slope √ = —
orbits recorded0

What you are looking at

§ 07 · Reading
I
An ellipse with the star at one focus. Every closed orbit is one. The other focus is empty — gravity has placed an invisible partner there.
II
A line from the star to the planet sweeps out equal areas in equal times. The orange and gold wedges have the same area though one was painted near aphelion and the other near perihelion.
III
Every full orbit drops a dot on the little plot. Period squared against semi-major axis cubed: a straight line through the origin, with slope 4π²/GM.
Throw fast enough and the planet escapes — a parabola at exactly escape velocity, a hyperbola past it. The orbit opens out and never closes; no period to record.

How the simulation behaves

§ 07 · Method

Newton's law gives every planet a pull of a = −GM r̂ / r² toward the star. The state (x, v) is integrated with a velocity Verlet (leapfrog) step — symplectic, so the energy doesn't slowly drift the way a naive Euler step would. After a few orbits you can see the difference: the path closes onto itself instead of spiraling.

Orbital elements are read off the state at every instant. Specific energy E = ½v² − GM/r sets the semi-major axis a = −GM/(2E); the Laplace–Runge–Lenz vector gives the eccentricity e and the direction to perihelion. For bound orbits we draw the ellipse and, on toggle, both foci — empty one and all.

Periods are measured, not assumed: each time a planet passes through perihelion (the radial velocity changing from negative to positive) we record one orbit (T, a). Those pairs feed the little plot on the right. Throw any number of planets at any radius and watch the data assemble itself into the cleanest line in physics.