Home▸Physics & Mechanics▸Atmospheric Optics (2D)

Atmospheric Optics (2D)

A 2D atmospheric-optics lab: real Rayleigh scattering (intensity proportional to 1/wavelength^4) driving live sky and sunset colour as the sun sets, plus a genuine 22 degree and 46 degree ice-crystal halo computed from hexagonal-prism minimum deviation and ice's real refractive-index dispersion.

Physics & Mechanics2DModerate60 FPS📱 Mobile-adapted💨 Air & Wind⇄ 3D version
2d-atmosphere ↗ Open standalone

This 2D companion to the 3D Atmospheric Optics simulator isolates the two phenomena that belong to the atmosphere itself rather than to raindrops: Rayleigh scattering, which paints the sky blue and sunsets red through a real 1/λ⁴ scattering law and Beer-Lambert extinction along an increasing air-mass path, and the 22°/46° ice-crystal halo, produced by minimum-deviation refraction through hexagonal ice prisms using ice's real refractive index. Drag the sun toward the horizon to watch the physics play out live, or switch scenes to see why halos ring the sun at an exact angle instead of spreading like a rainbow.

⚙ Under the hood

A 2D atmospheric-optics lab: real Rayleigh scattering (intensity proportional to 1/wavelength^4) driving live sky and sunset colour as the sun sets, plus a genuine 22 degree and 46 degree ice-crystal halo computed from hexagonal-prism minimum deviation and ice's real refractive-index dispersion.

rayleigh scatteringatmospheric opticssky colorice halorefraction2d

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

What did you find?

Add reproduction steps (optional)