Moon Phases: Sun–Earth–Moon Orbit (2D)
Drag the orbit-angle slider or hit play to move the Moon around Earth, and watch the phase disc on the right show exactly what an observer on Earth would see — from New Moon to Full Moon and back.
This 2D companion mirrors the 3D Earth-Moon-Sun scene with a plain canvas built for reading the geometry directly: a top-down orbit view shows the Moon circling Earth under a fixed sunlight direction, while a second panel renders the phase disc exactly as it would appear from Earth, so the connection between orbital position and the shape we see in the sky is immediate rather than inferred from a 3D camera angle.
Illumination fraction is (1−cos θ)/2 for orbit angle θ; the phase disc is drawn as a lit half-circle combined with a scaled terminator ellipse, the standard technique for rendering lunar phases on a 2D canvas.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install