IOne drop, one ray
A raindrop is, to a good approximation, a tiny sphere of water. Sunlight that strikes it bends going in (refraction), can bounce off the far inside wall (reflection), and bends again coming out. The total turn the ray makes is its deflection. Steer the ray up and down the drop and watch the deflection change — it is not the same for every ray, and that is the whole story.
Slide slowly from the top of the drop (b → 1, grazing the edge) down toward the centre (b → 0). The deflection swings — but it does not swing freely. It runs down to a lowest value and then turns back up. There is a minimum deflection, and the rays that happen to hit near that special height all leave at nearly the same angle. Uniformly spaced going in, they come out bunched. Bunched rays mean concentrated light. The rainbow is that bunch.
The bow is not painted on the sky at 42°. It is the one angle the drop cannot avoid sending light to.
IIThe curve that makes a rainbow
Plot the viewing angle from the antisolar point against where the ray hit, and the rainbow draws itself. The primary curve has a flat peak; the secondary has a flat trough. Near either turning point, a range of incoming rays maps onto almost the same outgoing angle. That flatness is the pile-up, made visible.
There is a clean closed form for where the deflection reaches its minimum. For a ray that bounces k times inside, the minimum is at the incidence angle where
cos²i = (n² − 1) / k(k+2)
With n the refractive index of water, about 1.333. The verifier compares this closed-form extremum with numerical minimization of the deflection formula, and separately checks that formula against a vector ray-tracer. They agree to four decimals. For one bounce, the minimum occurs at an incidence of 59.4° and a deflection of 137.9°. A deflection of 137.9° means the light comes back 180° − 137.9° = 42.1° from the point directly opposite the sun. That is the radius of the bow.
Descartes counted this by hand · 1637
In Les Météores, René Descartes did exactly what the Rain of rays button does, only with arithmetic, no calculus and no computer. He traced rays through a glass sphere of water at many heights, tabulated where each emerged, and saw them concentrate near 41–42° for the primary and near 51° for the secondary. He had found the caustic by census. In the offline verifier's histogram, 400,000 rays are binned by viewing angle: the fullest 0.1° sliver near 42° holds about fourteen times the mean count per occupied bin. Descartes got the geometric crowding right, but his physical theory of colour was wrong: he blamed a spin imparted to light particles. Newton supplied the account in terms of different refrangibilities.
IIIColour, the second bow, and the dark between
Water bends violet light a hair more than red. So there is no single rainbow angle — there is one per colour, and the bow is the thin fan between them. Newton's insight, made literal.
Run the minimum-deflection formula for each colour's own refractive index and the bow spreads into a band:
| colour | n (water) | primary radius | secondary radius |
|---|
The primary bow runs from violet at its inner edge to red on the outside, a fan only about 1.7° wide. The secondary, with its second bounce, reverses the order: red turns inside, violet out. And between the two bows lies a strip of sky that no single- or double-bounced ray can reach at all. In this model, single-reflection light reaches at most the red primary edge, about 42.4°; double-reflection light starts at the red secondary edge, about 50.4°. The gap between (roughly 42° to 50°) receives neither. It is measurably darker than the sky on either side, and it was described long before this geometry: Alexander of Aphrodisias wrote it down around 200 AD, and Alexander's dark band now carries his name.
IVThe edge of the edge — where ray optics ends
Everything above treated light as rays. Rays alone get the 42°, the second bow, the dark band, the colours — a remarkable amount. But they also predict an impossibility, and they cannot explain the faint pink-and-green fringes that sometimes ripple just inside the primary. This is the honest seam.
Ray optics says the brightness at the caustic is infinite: a perfectly sharp line of light. Real bows have a sharp-ish but finite edge, and just inside the strongest ones, in rain, mist or spray, you can see supernumerary arcs: a few extra pale bands, too closely spaced and too pastel to be a second spectrum. Pure rays have no way to make them.
The mechanism is the one fact the ray picture hands you for free and then can't use. Just inside the primary edge, each direction is fed by two rays, one from each side of the minimum deflection (the instrument in §II shows two crossings for horizontal lines just below the primary peak). At the rainbow angle the two merge; just outside, there are none. Those two rays travel different distances through the drop, so they arrive out of step. Waves that arrive out of step interfere, reinforcing at some angles and cancelling at others. Thomas Young published this explanation in 1804; the verifier confirms it, computing the two rays' optical-path difference straight from the traced polylines and watching it grow from zero at the rainbow angle.
One thing falls straight out of that picture and is worth keeping because it is visible: the fringe spacing scales as (λ⁄a)2/3, wider for smaller drops. Shrink the drop eightfold and the verifier finds the first fringe move out about fourfold (82/3 = 4, confirmed to 3.98). Smaller drops spread the fringes wider. Visible supernumeraries favour small, similarly sized drops, whether in rain, mist or spray.
What this page does not compute — named, not hidden
The two-ray model gives the mechanism and the scaling, but not the exact place of each fringe or the true shape of the edge. The Airy wave approximation goes further: George Biddell Airy's 1838 "rainbow integral" models a finite bow and its supernumerary maxima, though it does not give exact fringe positions. That integral is cited here, not run. The honest claim of this layer is the part it checks end to end: the angles, the caustic, the colour order, the dark band, and the existence-and-scaling of the interference. Where the model stops, the page says so.
A rainbow is a place, not a thing. It is the set of directions in which a sky full of drops happens to crowd its light — and it moves with you because the geometry is anchored to your own eye.
A wink, kept honest: the primary radius rounds to the integer 42, the same 42 that is the Answer to Everything in Douglas Adams's 1979 novel. It is a coincidence of our base-ten, 360°-to-a-circle convention and means nothing about the sky; but the verifier checks it rounds to 42 anyway, because it would be a shame not to.
✓Show the check
The three-colour rainbow angles are recomputed by one offline verifier: numerical minimization of the deflection formula is compared with its closed-form extremum, and the formula is separately cross-checked against a vector ray-tracer.
The verifier builds a vector ray-tracer (refract → reflect → refract), checks sampled exit directions against the closed-form deflection with a maximum error of about 0.00000121° (tolerance 0.00001°), then compares numerical minimization of that formula with its closed-form extremum, reproduces Descartes' ray-census pile-up, places the red, yellow and violet edges of both bows, checks that no ray with one or two internal reflections enters Alexander's dark band, shows the higher-order bows sit around the sun (why the 3rd and 4th are nearly unseeable; first convincingly photographed only in 2011), and confirms the two-ray interference and its (λ⁄a)2/3 scaling. The numbers it writes to artifact.json are the numbers printed above.
Inputs that are measured, not derived: the refractive index of water at three wavelengths (red 1.331, yellow 1.333, violet 1.343), rounded to three decimals from Tilton and Taylor, Table 5, p. 446, at 20 °C. There is no single n; it depends on wavelength, which is the whole reason a rainbow has colour, and drifts slightly with temperature and purity. The three-colour table uses those inputs. The sky also uses approximate indices 1.342, 1.339, 1.336, 1.334 and 1.332 for its intermediate bands at 440, 490, 540, 580 and 610 nm; its supernumerary overlay is illustrative.