Automation Engineer
Book A Free Call
// ORRERY + ECLIPSE LAB

The solar system, derived from a single force law — and the eclipses it casts.

Three instruments on one page. The first integrates the planets from Newtonian gravity alone, so the closed ellipses and Kepler’s third law are not drawn — they emerge. The second predicts real upcoming solar and lunar eclipses from precise theory, down to the arc-minute. The third shows why eclipses cluster into seasons at all. Every claim on this page is a number you can read.

bodies 9 integrator velocity‑Verlet ephemeris Meeus · Espenak‑verified
// LIVE · N-BODY
orrery.live // N-body integrator2026-01-01 00:00 UT
INTEGRATINGFULL SYSTEM · 31 AU

Nothing is scripted — each frame applies F = G·m₁m₂ / r² between all bodies, then one symplectic leapfrog step; the closed ellipses, the speeds, and Kepler’s law all emerge.

// from first principles

No orbits were drawn. We only coded the force.

The orrery above holds one rule in its loop: Newton’s law of universal gravitation. Between every pair of bodies the force is F = G·m₁m₂ / r², directed along the line that joins them. There is no table of orbits, no pre-baked ellipse — only mass, position, and that inverse-square attraction.

We seed the state vectors from the standard J2000 orbital elements (Standish’s reduction): each planet’s heliocentric position and velocity at the epoch, then a shift to the barycentre so total momentum is ~0 and the system doesn’t drift off-screen. From that single snapshot, the future is integrated, not looked up.

The integrator is symplectic — velocity-Verlet (leapfrog): a half-kick on the velocities, a full drift of the positions, then a second half-kick. Unlike a naive Euler step, a symplectic scheme conserves the system’s energy over long runs (watch the live drift in ppm badge stay tiny even at high speed), which is exactly why the ellipses stay closed instead of spiralling.

And then the payoff. Recover each planet’s orbit from its current state vector and compute T² / a³ — orbital period squared over semi-major axis cubed. For every planet it lands on ~1.000. That constant is Kepler’s third law, and we never wrote it down. It fell out of the force law alone. (Jupiter reads ~0.999 because it is massive enough that the real (M + m) term matters — physics, not integrator error.)

the loop, in three lines
F = G · m₁m₂ /
gravity between every pair
v ← v + ½ a·Δt   x ← x + v·Δt   v ← v + ½ a·Δt
one symplectic velocity-Verlet step
/ a³ → 1
Kepler III — emergent, never coded
// live proof

The orrery’s telemetry rail shows T²/a³ per planet as it runs. Mean across the eight: ~1.0000.

// COMPUTED · MEEUS EPHEMERIS
eclipse.predict // solar + lunar · Meeus ch.54 events · 20262038
show
from yearnext 12 yrs
|γ| < 0.9972 ⇒ central · this event γ =

select an eclipse

MOON : SUN SIZE RATIO
pick a row to see the geometry
UT date / time
type
gamma
u
magnitude
size ratio (moon:sun)
Moon Ø
Sun Ø
sub-solar point
ΔT (UT→TT)

Predicted, not simulated — both families from one Meeus engine: the Moon’s shadow on Earth at New Moon, Earth’s shadow on the Moon at Full — verified against the NASA eclipse canon.

// validated against the record

Prediction versus the published canon.

Six well-known solar eclipses, each computed in your browser from the Meeus lunation series, set beside the NASA / Espenak catalog. Greatest-eclipse time lands inside a minute; the geometry — gamma — inside about a thousandth.

Eclipse Engine UT NASA / Espenak Δt Engine γ NASA γ Δγ  
Total Great American 18:26:02 18:26:40 −38 s +0.436 +0.437 0.000
Total North America 18:17:41 18:18:29 −48 s +0.344 +0.343 +0.001
Total Spain & Iceland 17:46:08 17:47:06 −58 s +0.899 +0.898 +0.001
Total South America 19:22:42 19:23:08 −26 s −0.647 −0.647 0.000
Annular US ring of fire 17:59:52 18:00:41 −49 s +0.376 +0.375 +0.001
Annular upcoming annular 15:08:01 15:08:59 −58 s +0.391 +0.390 +0.001
  • Total
    Time UT
    18:26:02 NASA 18:26:40 −38 s
    Gamma
    +0.436 NASA +0.437 0.000
  • Total
    Time UT
    18:17:41 NASA 18:18:29 −48 s
    Gamma
    +0.344 NASA +0.343 +0.001
  • Total
    Time UT
    17:46:08 NASA 17:47:06 −58 s
    Gamma
    +0.899 NASA +0.898 +0.001
  • Total
    Time UT
    19:22:42 NASA 19:23:08 −26 s
    Gamma
    −0.647 NASA −0.647 0.000
  • Annular
    Time UT
    17:59:52 NASA 18:00:41 −49 s
    Gamma
    +0.376 NASA +0.375 +0.001
  • Annular
    Time UT
    15:08:01 NASA 15:08:59 −58 s
    Gamma
    +0.391 NASA +0.390 +0.001

computed live in your browser from the Meeus lunation series — the engine cells are not baked into the page. Reference instants and gamma are from the NASA / Espenak Five‑Millennium Catalog of Solar Eclipses. Solar eclipses only in this head‑to‑head (the lunar branch is verified the same way — dates to the day, umbral magnitude to ±0.005). Eclipse magnitude uses the catalog’s own umbral‑cone definition and so is shown for context in the predictor, never differenced here. Greatest‑eclipse time carries a consistent sub‑minute offset from the truncated time series — shown, not hidden.

// GEOMETRY · WHY ECLIPSES CLUSTER
node.seasons // Sun vs. lunar node · ecliptic frame— UT
ECLIPTIC PLANE · FROM NORTHdrag the timeline — the Sun meets a node twice a year

An eclipse needs a New or Full Moon at a node. The Sun crosses each node only twice a year, so eclipses bunch into two short seasons every ~173 days — scrub the timeline and watch the verdict flip.

// why eclipses happen

A new Moon, a node, and a question of distance.

A solar eclipse is the Moon’s shadow falling on Earth, so it can only happen at New Moon — when the Moon sits between us and the Sun. But the Moon’s orbit is tilted ~5° to the ecliptic, so most New Moons the shadow sails harmlessly above or below us. An eclipse needs that New Moon to land near one of the two nodes, where the lunar orbit crosses the ecliptic plane.

How close is close enough is captured by γ (gamma): the least distance of the shadow axis from Earth’s centre, measured in Earth radii. When |γ| < 0.9972 the axis actually strikes the globe and the eclipse is central (total, annular, or hybrid). Larger than that and only the penumbra grazes us — a partial.

Because the geometry repeats, eclipses arrive in a rhythm: eclipse seasons come roughly every ~173 days (~5.8 months), so each calendar year carries at least two and at most five solar eclipses. The predictor above walks new-moon index by index and keeps only the ones whose shadow reaches us. And the same alignment at Full Moon runs in reverse — the Moon crosses Earth’s shadow, a lunar eclipse — which is why solar and lunar eclipses arrive paired inside one season, about a fortnight apart.

Total or annular is then purely a question of distance. The Moon’s orbit is an ellipse: near perigee it looks slightly larger than the Sun and its disk covers it completely — total, the corona blazes out. Near apogee it looks slightly smaller, leaving a bright rim — annular, the “ring of fire.” That is the whole story in one number: the Moon-to-Sun apparent size ratio. Read it live in the disk view.

γ
Signed least distance of the shadow axis from Earth’s centre, in Earth radii. Sign marks north (+) or south (−) of centre.
u
The antumbral radius parameter (Meeus). Its sign separates a total cone from an annular one at greatest eclipse.
size ratio
Moon’s apparent diameter ÷ the Sun’s. > 1 ⇒ total; < 1 ⇒ annular ring. For a partial it is not a coverage.
umbral mag
Lunar eclipses: the fraction of the Moon’s diameter inside Earth’s umbra at greatest eclipse. ≥ 1 ⇒ total (the copper “blood moon”); ≤ 0 ⇒ penumbral only.
// two engines

The orrery is live N-body. The eclipse dates are Meeus — because the Moon demands arc-minute precision a browser N-body can’t hold over decades.

Orrery — live, integrated

Every frame is computed in your browser from F = G·m₁m₂ / r² plus one symplectic step. It is genuinely conservative physics, and that honesty is the point — you can watch the energy hold. What it is not built for is the Moon: tracking a body that needs arc-minute accuracy across decades would let tiny per-step errors accumulate into the wrong day.

Predictor — computed, exact

So eclipse dates use a different engine: the precise lunar and solar theory of Meeus (Astronomical Algorithms), the same series the professional canon is built on, verified here against the NASA/Espenak record. It is not simulated forward step by step — it evaluates the geometry directly, to the arc-minute, for any new or full moon you ask for.

Standish/JPL J2000 elements · Meeus, Astronomical Algorithms · solar + lunar verified vs the NASA/Espenak canon

Sumit Bansal — Automation Engineer