HomeOptics & LightIce Halos & Sun Dogs

🌈 Ice Halos & Sun Dogs

Monte-Carlo ray simulation of sunlight through hexagonal ice crystals: watch the 22° halo, sun dogs and circumzenithal arc emerge from honest Snell's-law refraction.

Optics & Light3DAdvanced60 FPS💨 Air & Wind❄️ Ice & Cold
ice-halo ↗ Open standalone

About this simulation

This is a Monte-Carlo ray-tracer, not a canned image: thousands of light rays are launched at random incidence angles into a hexagonal ice-crystal prism every frame, refracted twice by Snell's law, and accumulated onto the sky wherever they land. The 22° halo, sun dogs and circumzenithal arc all emerge from that single physical model — nothing is drawn directly, only wherever enough refracted rays pile up.

🔬 What it shows

Sunlight refracting through the 60° or 90° faces of a hexagonal ice-crystal prism, with red bending least and violet most (dispersion) to give the halo's coloured inner edge. Randomly tumbling column crystals spread rays into a full 22° ring, while horizontally floating plate crystals concentrate them into sun dogs either side of the sun.

🎮 How to use

Pick a Feature to isolate the 22° halo, sun dogs, the fainter 46° halo, or the circumzenithal arc (visible only below 32° sun altitude), or leave All features on. Drag Sun altitude (0-70°) to watch the CZA appear and sun dogs shift, raise Rays per frame for a cleaner image, and untick Dispersion to see the halo turn white.

💡 Did you know?

The 22° radius is not arbitrary — it is the minimum deviation angle for a 60° ice prism at ice's refractive index of about 1.31. Because rays deviated by less than 22° are turned back by total internal reflection rather than exiting the crystal, the sky genuinely stays darker inside the halo than outside it.

Frequently asked questions

Why does the halo appear as a ring rather than a solid disc?

Randomly oriented column crystals refract light at every azimuth around the sun, but the deviation angle for a given ray has a hard minimum near 21.8°. Rays cluster at that minimum-deviation edge, so brightness peaks in a ring at 22° and drops sharply just inside it, while fading gradually further out.

Why do sun dogs appear only left and right of the sun?

Sun dogs form from plate-shaped crystals that fall with their broad hexagonal face nearly horizontal, like leaves settling in still air. That preferred orientation restricts the refracted light to a narrow horizontal band at the sun's altitude, concentrating it into two bright patches rather than spreading it into a full ring.

Why does the circumzenithal arc only appear at low sun altitude?

The CZA forms when light enters a plate crystal's horizontal top face and exits a vertical side face at close to 90° geometry, and this ray path becomes geometrically impossible once the sun climbs above about 32°. The simulation enforces that same altitude cut-off, so raising Sun altitude past that point makes the arc vanish.

Why does the ring show colour on its inner edge but not the outer one?

Ice's refractive index depends slightly on wavelength, so violet light bends more than red (dispersion). At the halo's sharp inner edge this produces a visible reddish fringe, while the outer edge fades so gradually that rays of every colour overlap and wash the colour out to white.

How does Rays per frame affect the result?

Each traced ray is a genuine Monte-Carlo sample of a random incidence angle, deposited onto the sky image and accumulated over time. More rays per frame converge on the true halo brightness pattern faster and with less speckle noise, at the cost of more computation each animation frame.

Frequently Asked Questions

Why is the 22° halo at exactly 22 degrees?

The 22° radius is set by the minimum deviation angle for a ray passing through the 60° prism formed by two prism faces of a hexagonal ice crystal. For water ice with refractive index ~1.31 at visible wavelengths, minimum deviation occurs at ~21.84°, creating the sharp inner edge of the halo at that radius.

Why is it dark inside the 22° halo?

Rays entering the prism at angles that would produce deflection less than 22° undergo total internal reflection and do not exit — they cannot reach the observer from inside the minimum deviation angle. So no light reaches the observer from directions within 22° of the sun via this particular ray path.

What are sun dogs (parhelia)?

Sun dogs are bright spots appearing 22° to the left and right of the sun, often with a reddish inner edge. They form when hexagonal plate crystals drift with their flat faces nearly horizontal, refracting light preferentially into a horizontal band at 22° from the sun.

Why do halos sometimes show colours?

Ice has a wavelength-dependent refractive index (dispersion), so red light is refracted less than blue. At the inner edge of the 22° halo, red appears first and blue appears just outside it, producing the characteristic reddish inner boundary. Stronger dispersion in pyramidal crystals creates more colourful halo arcs.

Can halos occur around the moon?

Yes. Lunar halos form by exactly the same mechanism as solar halos but appear around the moon. Because moonlight is much dimmer, lunar halos are less vivid and rarely show colour, but their geometry (22°, circumzenithal arc, etc.) is identical to solar halos.

⚙ Under the hood

Monte-Carlo atmospheric optics: refract sunlight through hexagonal ice crystals and watch the 22° halo, sun dogs, the 46° halo and the circumzenithal arc emerge from real Snell's-law physics.

Canvas 2DOpticsAtmospheric OpticsIce HaloMonte Carlo

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)