Why does the rainbow sit at 42° from the antisolar point for every observer — and can that angle, the 51° secondary, the dark band between them, and the colour reversal all be read off nothing but traced direction vectors, with every closed-form expression of Descartes' theory banished from the recovery path?
Units: degrees from the antisolar point, primary bow at the module's green (550 nm, Cauchy n = 1.3346215)
▶ Run this simulationRead how it works
Descartes rainbow: validated → validated + honest-module — the screen now EARNS its 42°: the 90001-point scan of the ANALYTIC deviation formula and the closed-form i_min that fed the HUD, the colour fan and the secondary bow are DELETED — every headline number (φ = 41.842895640043764°, i_min = 59.32°, all 7 band caustics, spread Δ = 1.6021122°, secondary = 51.314875844035754°) is now raced in-module by golden-section on COMPARISONS of vector-traced exit angles (refract·reflect·refract, the same tracer that draws the rays on screen); the derisk EXECUTES 9 sha256-pinned slices of RainbowModule.ts with every raced value strict-===, asserts the recovery slices never call deviation()/iMin(), pins the tick schedule bit-exact and both HUD states + the chart SVG by sha, and decomposes the entire locator-vs-closed-form gap a-priori into the golden-section comparison basin: raced b* stalls at 68.4% of δb = sqrt(2·eps_eff·φ*/φ″) while the VALUE φ deviates only 8.5e-14° ≤ the second-order bound ½φ″δb² + 8ulp — first-order-noisy locator, second-order-clean answer, zero fitted parameters; screen vs known rel 1.4e-15, vs the oracle unit-circle extremum 1.4e-15
A pure vector ray tracer on a unit-circle drop: Snell refraction as the standard vector identity, mirror reflection, ray–circle intersection — the analytic deviation D_k(i) = kπ + 2i − 2(k+1)r and the stationary point cos²i = (n²−1)/(k²+2k) appear ONLY in score-only helpers. The caustic is recovered twice: (1) deterministically, as the golden-section extremum of the traced exit angle over impact parameter (the tracer treated as a black box); (2) statistically, from a Monte-Carlo sky of photons sampled uniformly over the projected disc, where the rim is the divergent edge of the scattering-angle distribution, located by a LINEAR order-statistics regression (for a fold caustic the j-th most extreme angle obeys φ_(j) = φc − (j/C)², so φc is the intercept of φ_(j) on j² — no exponent assumed; the rank–gap exponent is fitted separately, free, as an emergent universality check). Photon weights are per-class Fresnel s/p products (entry transmission × k internal reflections × exit transmission), used only for the intensity gates. Rival: the same tracer restricted to Aristotle's mirror theory (external surface reflection only). 17 gates (9 science + M1–M8 module certificate), ~5.5 s. HONEST MODULE: the module itself measures everything it displays by racing its own vector tracer — measure() runs golden-section extremum searches on traced exit angles per band (primary) and for the two-reflection secondary; the derisk executes the sha256-pinned module slices and strict-===-compares every raced value.
4.0000e-7
Descartes' 1637 minimum-deviation theory of the rainbow (Les Météores, Discourse VIII; Nussenzveig, Sci. Am. 1977; Adam, Phys. Rep. 356, 229 (2002)): primary bow at the stationary point of the one-internal-reflection deviation, 41.84° at n = 1.33462, secondary at 51.31°, Alexander's dark band between, dispersion widths ~1.6°/2.9°. Non-circular in the same sense as the young/malus/emwave oracles: the recovery path codes only the PRIMITIVE laws (vector Snell refraction — the snell world's law — plus mirror reflection and circle geometry), never the deviation function, never the minimum condition, never the ½ exponent; the caustic, the band, the reversal and the fold universality all emerge from tracing and counting. The fold exponent gate is a small catastrophe-theory bonus: the fitted rank–gap slope 2.0005 is the geometric-optics fold-caustic law I ∝ (φc−φ)^(−1/2) (the law Airy's 1838 wave theory softens), recovered from counts with the exponent left free. ESTIMATOR NOTE (the pleasant mirror of lessons #1–#5): a DIVERGENT edge is the easiest feature in the estimator zoo — where Malus's flat peak starved the locator of curvature, a fold caustic concentrates infinite density at the answer, and the linear φ_(j)-on-j² intercept nails the rim to 4e-7° from 250k photons with no nonlinear fit at all. Match the estimator to the local exponent: flat → windowed LSQ, skewed → cubic, concave tail → quadratic, divergent edge → order-statistics intercept.
CLOSED this run (validated → validated + honest-module). The module (?world=rainbow, src/modules/RainbowModule.ts) previously displayed a rainbow φ from a 90001-point scan of the ANALYTIC deviation D(i) = π + 2i − 4r, and fed the secondary bow, the colour spread and the per-colour Descartes fan from the closed-form i_min(n,k) = acos√((n²−1)/(k²+2k)) — Descartes answer solved directly. All of those paths are GONE: measure() races the module own vector tracer (the same refract·reflect·refract machinery that draws the fan) with golden-section on COMPARISONS of traced exit angles — 7 per-band primary caustics, the green minimum-deviation geometry i_min = asin(b*/R), the spread, and the k=2 secondary all come back raced; the chart D(i) curves are traced rays too (each sample a real path through the drop, no deviation formula). The closed forms survive ONLY as labelled (raced; closed …) theory cross-checks rendered beside the measurements. The derisk EXECUTES the module source (module_certificate, gates M1–M8): sha256 slice pins (M1), strict-=== executed pins for every raced value + a source-level assert that the vector/measure slices never call deviation()/iMin() (M2), the basin decomposition — raced b* within 68.4% of the a-priori comparison basin δb = sqrt(2·eps_eff·φ*/φ″) ≈ 4.6e-8, raced i_min within the propagated δi, and the on-screen φ excess 8.5e-14° bounded by the second-order ½φ″δb² + 8ulp = 1.1e-13°, zero fitted parameters (M3), bit-exact tick schedule with strict-=== probe-sweep pins (M4), sha-pinned HUD in both probe states with 2-dp display honesty raced === closed === known (M5), sha-pinned chart SVG (M6), reference integrity known_value === score_descartes(inputs) (M7), and protocol reconciliation module-race-on-radius-4 vs oracle-extremum-on-unit-circle Δrel 1.4e-15 with the MC sky grand 0.93·SE from the screen (M8).
npm run derisk -- rainbow (scripts/rainbow-derisk.mjs)scripts/oracles/rainbow.reference.jsonR. Descartes, Les Météores, Discourse VIII (1637). Aristotle, Meteorologica III (the mirror rival). C. B. Boyer, The Rainbow: From Myth to Mathematics (1959). H. M. Nussenzveig, 'The Theory of the Rainbow', Scientific American 236, 116 (1977). J. A. Adam, 'The mathematical physics of rainbows and glories', Physics Reports 356, 229 (2002). G. B. Airy, Trans. Camb. Phil. Soc. 6, 379 (1838) — the wave theory whose geometric-optics limit is the fold law recovered here.