Real solid-angle geometry, not a scripted animation. The Moon's position is built from its orbital angle θ (measured from the ascending node), the node line's longitude Ω, and the orbital inclination i:
px = r·cosθ
py = r·sinθ·cos(i)
pz = r·sinθ·sin(i)
X = px·cosΩ − py·sinΩ (ecliptic X, shadow axis)
Y = px·sinΩ + py·cosΩ
Z = pz (height above/below ecliptic)
Earth's umbra and penumbra are true cones, sized from the real radii of the Sun (696,000 km), Earth (6,371 km) and the Sun–Earth distance (1 AU) by similar triangles:
L_umbra = R_earth·D_sun /(R_sun − R_earth) ≈ 1.38M km
L_penumbra = R_earth·D_sun /(R_sun + R_earth) ≈ 1.36M km
r_umbra(d) = R_earth·(1 − d/L_umbra)
r_penumbra(d) = R_earth·(1 + d/L_penumbra)
An eclipse needs both conditions at once: the Moon near the far side of its orbit (Sun–Earth–Moon angle ≈ 180°, i.e. full moon) and near a node (Z ≈ 0) so the perpendicular offset ρ = √(Y²+Z²) fits inside the umbra or penumbra radius at that distance. Because the ~5.14° inclination usually keeps the full moon above or below the shadow, eclipses only happen when the node line itself points close to the Sun–Earth line — a window that recurs roughly twice a year ("eclipse seasons"), reproduced here by sweeping Ω.
- Top-down pane — the orbit from above the ecliptic, the shadow cone, and the node line.
- Shadow cross-section — a slice through the umbra/penumbra at the Moon's current distance; the dot is the Moon's true offset from the shadow axis.
- Eclipse magnitude vs θ — the eclipse magnitude across one full orbit at the current Ω, i, and distance, showing exactly where an eclipse window opens.