Light goes from a point in air to a point in glass. Of all the paths it could take, which does it follow — the straight line, or something else? And is the bend Snell's sine law, or one of its ancient rivals?
Units: sinθ₁/sinθ₂ = n₂/n₁ for air (n₁ = 1.000) → crown glass (n₂ = 1.500); Hecht, Optics 5e, Table 4.1
▶ Run this simulationRead how it works
Fermat → Snell: no-oracle → validated — the bent path, found by a stopwatch: with NOTHING coded but the travel time of broken paths (t = n·length, no sines, no derivative, no stationarity condition), racing candidate paths and reading the winner's geometry returns sinθ₁/sinθ₂ = 1.500272 ± 1.05e-4 vs air→crown-glass n₂/n₁ = 1.5 (rel 1.8e-4 under 0.1% chronometry noise; noiseless floor 6.7e-8); the law's FORM emerges free-fit (sinθ₁ = 1.50000001·sinθ₂ + 2.8e-8, power exponent 0.99999985); Hero's least-DISTANCE line is measured 3.65% slower and refused at z = 4.8e3; Ptolemy's constant angle ratio, calibrated on the lab's own small angles, misses the raced 41.52° by 34% (z = 2.0e3) at θ₁ = 83.8°; equal media un-bend the ray to 2.3e-7 — and the module's NaN slope readout (a 0/0 at normal incidence) is fixed to an LS fit through the origin, now displaying 0.667 = n₁/n₂
The generator computes ONE thing: the arrival time of a broken path A→(x,0)→B, t(x) = n₁·|A→(x,0)| + n₂·|(x,0)→B| at c = 1 — no sines, no angles, no derivative, no stationarity condition anywhere in the recovery path. The least-time crossing is located purely by comparing measured times: noiseless by golden-section on comparisons (float floor 6.7e-8, set by the flat minimum's √eps comparison limit); noisy by argmin over an 801-point grid of independently-jittered chronometer readings (0.1% Gaussian per candidate) refined by a windowed least-squares CUBIC vertex — cubic, not quadratic, because t(x) is skewed about its minimum and a quadratic vertex drags the crossing by ~1e-2 (the blackbody lesson, re-confirmed in the prototype: quadratic W=80 bias −9e-3, cubic +9e-5). The winner's sines are then MEASURED from its two segments as opposite/hypotenuse and their ratio scored against n₂/n₁, which lives ONLY in the reference. 8 seeds each draw their own geometry AND noise; 25 further geometries span sinθ₁ ∈ [0.037, 0.984] for the law-form fits and the small-angle Ptolemy calibration. 11 recovery gates + 8 honest-module gates (M1–M8, executed-source certificate) in scripts/snell-derisk.mjs (~0.2 s); tamper ⇒ exit 1. ?world=snell.
0.000105
0.00044
Snell's sine law n₁ sinθ₁ = n₂ sinθ₂ (Snellius 1621 / Descartes, La Dioptrique 1637) derived from Fermat's least-time principle (letter to Cureau de la Chambre, 1662) with light SLOWER in the dense medium. Non-circular: the generator contains only path lengths and per-medium speeds — the sine ratio is measured off the raced winner's geometry, never imposed; the stationarity condition d t/dx = 0 (whose algebra IS Snell) is never written, the minimum being located by raw time comparisons. Complements the emwave capstone (which recovers n = √ε_r and v = c/n from Maxwell field dynamics): here n enters as a timing input and the ANGLE law is what emerges; there the angles are assumed and the SPEED is what emerges.
The module (?world=snell, src/modules/RefractionModule.ts) is honest at its core: the on-screen race times ARE computed from path geometry and per-medium speeds (the same generator the oracle uses), the winner is found by a real golden-section over time comparisons, and the HUD's n₁sinθ₁ = n₂sinθ₂ = 0.9089 line is measured off the winning geometry, not fed from the law. One genuine display bug found and fixed this run: the bottom chart's 'measured slope' was the MEAN OF RATIOS s₂/s₁ over the 11-point sweep, and the sweep's sx = 7 source sits exactly above B, making that point 0/0 → the legend displayed 'measured slope NaN' in production. Fixed to the least-squares slope of sinθ₂ on sinθ₁ through the origin (4 lines; the degenerate (0,0) point now contributes nothing); preview-verified on-screen: 'measured slope 0.667' vs n₁/n₂ = 0.667, and the derisk's module-emulation gate reproduces the fixed procedure to rel 2.9e-8. Remaining disclosed systematics: the dashed 'theory' chart line and the 'n₂/n₁=1.500' HUD annotation are LAW-FED labels the measured values sit next to; the golden-section bracket [sx, x_B] is inverted for the sx = 9 sweep point (source right of B), which still converges and lands on the law but reports both sines negative — cosmetic, off-chart, ratio unaffected.
Rungs climbed: no-oracle → validated (prior run, notes below) → validated + honest module (2026-07-24: executed-source certificate M1–M8, 19/19 gates ~0.2 s first attempt, tamper both ways exit 1, live read-back green — see honest_module). Prior run: no-oracle → validated (+ module readout reconciled and un-NaN'd). 0 gate retries — the scratchpad prototype caught the estimator trap at design time: a windowed QUADRATIC vertex on the skewed t(x) biases the crossing by −1e-2 (argmin alone: sd 5.7e-2/race); the cubic absorbs the skew (noiseless vertex offset 6.7e-6 at W=80, noisy bias +9e-5 ≪ SE). Hand tamper (known 1.5 → 1.55) ⇒ 4 gates FAIL, exit 1, recovered value unchanged at 1.500272; restored by hand; in-script scoring self-test (gate J, known×1.02) green. Tolerances: main gate 8e-4 ≈ 4.4× observed error scale (grand rel 1.8e-4, SE 1.05e-4); float-floor gates 1e-6 ≈ 15× observed 6.7e-8; rival gates 15–200× below observed z. Runtime 0.2 s.
npm run derisk -- snell (scripts/snell-derisk.mjs)scripts/oracles/snell.reference.jsonW. Snellius (1621, unpublished); R. Descartes, La Dioptrique (1637); P. de Fermat, letter to Cureau de la Chambre (1 Jan 1662); E. Hecht, Optics, 5th ed., Pearson (2017), §4.4, Table 4.1. Rivals: Hero of Alexandria, Catoptrics (~60 AD), least distance; C. Ptolemy, Optics, Book V (~160 AD), the constant angle ratio.