Programmer’s Picnic — Eclipse Visualizer

Lunar + Solar • umbra/penumbra • types • simple geometry

Result:

Alignment + Shadows

Not to scale • interactive
Sun Earth Moon Umbra Penumbra
Help: how to use this
  • Pick Solar or Lunar on the top right.
  • Use Offset to move the Moon up/down from perfect alignment (the “eclipse line”).
  • Change Moon distance to see why some solar eclipses are total vs annular.
  • Use Space to play/pause, R to reset, / to step.

Controls

Try small offsets first
-160+160
NearFar
PauseFast
What this sim checks: it draws umbra/penumbra as cones from the “occluder” (Moon for solar, Earth for lunar), then tests whether the “target” (Earth for solar, Moon for lunar) intersects the umbra or penumbra near the target plane.

Eclipse classification

Shadow hit (target)

Notes