Near the lunar poles the Moon's tiny ~1.5° axial tilt keeps the Sun perpetually near the horizon — it never rises high, and it circles the sky once per lunar day (≈29.5 Earth days) instead of rising and setting like on Earth. Whether a point is lit therefore depends almost entirely on local topography, not time of day:
horizon(θ) = max angle to the terrain skyline
looking toward azimuth θ from this point
lit(θ) ⇔ sun_elevation > horizon(θ)
This engine ray-marches the same crater-rim heightfield used by the 3D version, but casts every ray flat in the ground plane and draws the result two ways: a top-down grid coloured by that horizon test, and a live geometric cross-section — the actual terrain profile the selected site looks toward, unrolled along the current sun bearing — with the sun's ray drawn against it at its true grazing angle.
A site's year-round illumination sweeps all 360° of azimuth at the worst-case elevation (base − seasonal wobble, the sun's lowest yearly excursion) and reports the fraction of directions still unblocked. Rim points that stay above the candidate threshold through that whole worst-case sweep are the real-world "peaks of eternal light" — the sites NASA and ESA have studied for continuous solar power at a permanent lunar outpost, avoiding the two-week battery-draining lunar night that grounds a base sited on the floor.
- Base sun elevation — the Sun's mean height above the local horizon at this latitude.
- Seasonal wobble — how far axial tilt swings that elevation down at the worst point in the Moon's orbit; a wider wobble shrinks the eternal-light set.
- View toggle — instant shadow map (current moment) vs. year-round candidate heatmap (worst-case sweep).
- Cross-section strip — the real terrain profile from the selected site outward along the current sun bearing; the dotted line marks the horizon angle the sun must clear.