One equation, read at two values of N
The Cavern's double slit and the Hall's
diffraction grating look like different physics —
two slits versus a thousand, a quantum particle versus a beam of light. They are the
same function: the dimensionless array factor
F(N,φ) = [sin(Nφ)/(N·sinφ)]², read at N = 2 and at N ≫ 2.
Below, one page state {N, d, L, λ}. The morph panel grows N and watches the
two-slit cos² sharpen — without ever growing taller. The coupler panel sends an electron
and a photon through the same apparatus and proves their fringes byte-identical, joined by
the one SI-exact bridge λ = h/p.
The morph — N = 2 is cos², and growing N only narrows it
Peaks pin at height 1 for every N (the array factor is normalized to peak 1). Drag N from 2 to 32: the principal maxima never move and never rise — they only sharpen, by exactly 1/N. At N = 2 the curve is literally cos²; the white ghost shows it.
The coupler — one electron, one photon, the same apparatus
Both strips are drawn by the identical arrayFactor(N,d,λ,sinθ) call.
d, L and N are shared apparatus; only λ differs per wing — and it doesn't, really: the electron's
momentum and the photon's wavelength are two views of one λ, joined by λ = h/p.
Move either handle and watch the seesaw.
↔ the handles move in opposite directions — p ∝ 1/λ — but they set one and the same wavelength.
Self-test — the inlined byte-twin core, proven live
What "one equation" actually means
The shared object is the dimensionless array factor
F = [sin(Nφ)/(N·sinφ)]², φ = π·d·sinθ/λ, normalized to peak 1. It depends
on only two things: the ratio d/λ and the integer N. That is the whole core.
"One equation" means one function, read at two values of N — not a lucky meeting of two
formulas. arrayFactor(2,·) is cos²φ to machine ε (the self-test asserts it
===), and raising N sharpens those same peaks by 1/N without moving or raising them.
Young's double slit and the grating are the same curve at N = 2 and N ≫ 2.
The slit-width envelope (sinc²) is each wing's own business and is deliberately NOT
in the core — the morph runs with the envelope off (a bare comb) so the identity is clean. The
de Broglie bridge is the SI-exact Planck constant h carried as one literal both
wings read; an electron of momentum p and a photon of λ = h/p produce byte-identical fringes
because they hand the same λ to the same function. Shared conventions throughout:
far-field Fraunhofer; sinθ the dimensionless observable; d and λ in the same length unit.
The teeth are wired live: perturb d on one wing by a part in a thousand and the overlay splits; swap the coherent factor for the incoherent ("which-path") sum and the fringes vanish. Either makes the pill go red — the identity is falsifiable, not vacuous.