Home▸Physics & Mechanics▸Lunar Halo Simulator (2D)

Lunar Halo Simulator (2D)

Canvas2D lunar-halo lab: moon altitude, moonlight and cirrus ice-crystal density drive a physically computed 22° (and optional faint 46°) halo radius, derived live from real hexagonal-ice refraction geometry rather than a fixed decal.

Physics & Mechanics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-lunar-halo-simulator ↗ Open standalone

This 2D companion swaps the 3D scene's free-orbit camera for a flat canvas sky so the optics read directly: a moon disc sits at an altitude you control, cirrus ice crystals drift past it, and the ring around it is drawn at a radius computed live from the minimum-deviation refraction angle through a hexagonal ice prism (22° for the common ring, 46° for the rarer outer one), so nudging crystal alignment visibly shifts the ring's own geometry rather than just its glow.

⚙ Under the hood

Canvas2D lunar-halo lab: halo radius is computed each frame from D = 2·asin(n·sin(A/2)) − A for a hexagonal ice prism, with n and crystal density set by the sliders.

Lunar HaloAtmospheric RefractionIce CrystalsOptics

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)