HomeArticlesAtmospheric Optics

Rainbows and Halos: The Minimum-Deviation Geometry Behind Both

Why a spherical droplet makes a 42° rainbow and a hexagonal ice crystal makes a 22° halo — the same ray-tracing idea, two different shapes.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Two shapes, one trick: minimum deviation

A rainbow and a halo are both ray-tracing problems solved by nature. Sunlight enters a transparent shape — a spherical raindrop or a hexagonal ice crystal — refracts, sometimes reflects once internally, and refracts again on the way out. Trace thousands of parallel rays hitting the shape at every possible offset and something surprising happens: the exit angles are not spread evenly. They pile up near one particular angle, called the angle of minimum deviation, because the deviation curve has a shallow turning point there. That pile-up of light is what you see as a bright arc.

live demo · rays bending through droplets and ice crystals● LIVE

The rainbow: 42° from the antisolar point

For a spherical water droplet, Descartes and Newton worked out the geometry: a ray refracts entering the sphere, reflects once off the back interior surface, and refracts again leaving. Summing the angles as a function of impact parameter gives a minimum total deviation of about 138°, which is the same as saying the light returns at about 42° from the point directly opposite the sun. Since refractive index depends weakly on wavelength (normal dispersion), red light (n ≈ 1.331) bends less than violet (n ≈ 1.343), splitting the single bright band into the familiar spectrum, red on the outside.

primary bow   1 internal reflection   ≈ 42° radius, red outside
secondary bow 2 internal reflections   ≈ 51° radius, colours reversed, dimmer
              (each extra bounce loses ~4% of the light to Fresnel transmission)

Halos: flat faces instead of a sphere

Ice crystals in cirrus clouds are hexagonal prisms, not spheres, so the relevant geometry is a ray crossing two flat faces at a fixed angle to each other rather than a curved surface. A ray entering one prism face and leaving through a face 60° away produces the 22° halo — a ring at minimum deviation around the sun, tinted faintly red on the inside because, again, red bends least. Light entering and leaving through faces 90° apart (through the hexagon's short axis) gives the much rarer, larger 46° halo. Crystal orientation matters enormously: randomly tumbling crystals make a full ring, while crystals that fall with their flat hexagonal faces horizontal (aerodynamically stable, like falling leaves) concentrate light sideways into sun dogs — bright spots 22° to either side of the sun at the same height.

Why the sky between the bows is dark, and the halo's colour is faint

Between the primary and secondary rainbow (Alexander's dark band) no ray geometry produces a return at all — every angle in that gap corresponds to no minimum-deviation ray, so noticeably less light reaches your eye than on either side. Halos, by contrast, rarely show more than a faint red inner edge before dissolving to white, because a hexagonal prism's dispersion is spread over a wider angular range than a droplet's, and the crystal sizes and orientations in a real cloud vary enough to blur the spectrum together.

Rendering it with ray tracing

The simulation on this page fires a dense fan of parallel rays at a droplet or crystal cross-section, applies Snell's law n₁sinθ₁ = n₂sinθ₂ at each interface plus the Fresnel reflectance to split intensity between the reflected and transmitted ray, and bins the exit angles into a histogram. The bright bands you see are exactly the peaks of that histogram — no artistic shading is needed, the geometry alone produces the rainbow and the halo.

Frequently asked questions

Why is the rainbow always a 42° circle around the antisolar point, no matter where you stand?

Because 42° is a property of water's refractive index and simple geometric optics, not of your location. Every raindrop at that exact angular distance from the point opposite the sun reflects light towards your eye, so the rainbow moves with you — you can never walk up to its base.

What is the difference between a 22° halo and a rainbow?

A rainbow forms in spherical raindrops with one internal reflection; a halo forms in flat-faced hexagonal ice crystals with no internal reflection, just refraction through two faces. Different geometry, different radius (22° vs 42°), and halos surround the sun itself rather than sitting opposite it.

Why is the secondary rainbow dimmer and colour-reversed?

It comes from rays that reflect twice inside the droplet instead of once. The second reflection loses additional light to transmission, dimming the bow, and it also flips the order in which colours exit, so red appears on the inside instead of the outside.

Try it live

Everything above runs in your browser — open Atmospheric Optics and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Atmospheric Optics simulation

What did you find?

Add reproduction steps (optional)