A teaching page for one question: if a changing E makes B and a changing B
makes E, why aren't they 90° apart in a light wave? And why are they
perpendicular? No server, no network, no dependencies: open index.html.
Every section has two texts, switched at the top: Undergraduate (pictures
and a chain of reasoning) and Advanced (the same argument in equations).
The choice is remembered, and ?level=adv forces it.
| § | what you do | what it shows |
|---|---|---|
| 0 | read | the puzzle and the short answer |
| 1 | 3-D wave (drag to rotate), reflection Γ, forced B lag φ, probe | travelling ⇒ in phase and S ≥ 0; standing ⇒ 90°, ⟨S⟩ = 0; a forced 90° lag breaks Faraday/Ampère and carries no energy |
| 2 | polarisation, angle E→B, E and B along the travel | each knob breaks a named Maxwell law; residuals are computed numerically from the drawn field; the strip shows the charge it would need |
| 3 | drag a probe along a snapshot | slope of E = −rate of B at every point; for a sliding wave that forces zero crossings, then peaks, to line up |
| 4 | 1-D Yee FDTD: pluck E only, pulse, sine source, open or mirror end | an E-only bump splits into two halves each already carrying B = ±E; sine source reads 0° open and ±90° with a mirror |
| 5 | Hertzian dipole map, click to move the probe ring | near field 90° apart and E-heavy, far field in phase, crossover at kr = 1 (exactly 45°) |
| 6 | tabs: transmission line (matched/open/short/R/X load), sound in a pipe (absorber/closed/open, moving air dots), tides in a bay (open coast/closed bay/partial Γ) | the same push/flow pair (V–I, p–u, height–current): in phase when the wave travels, 90° in a standing wave; SWR, delivered power, tide current vs high water in hours |
| 7 | read | summary table: energy that travels is in phase, energy that is stored is 90° apart |
physics.js: all the arithmetic (plane waves, phasors, Poynting, a generic Maxwell residual checker, the FDTD line with a one-way TF/SF source and exact absorbing ends, dipole fields, and the generic push/flow pair with a load-impedance Γ for §6). No DOM.app.js: state, controls, canvases. One animation clock; sections draw only when on screen.index.html,style.css: text for both levels, light and dark themes.
Units: c = 1, λ = 1, T = 1, and B is always shown as cB. Phasors use x(t) = Re[X e^{−iωt}], so "B peaks after E by" = arg B − arg E.
node tests/test_physics.js # 96 checks against closed forms and limits
node tests/test_page.mjs # 109 checks in headless Chrome (SHOTS=dir keeps screenshots)
The physics tests check each claim the page makes independently: residuals equal the analytic 2√(1+Γ²)|sin(φ/2)|, ⟨S⟩ from phasors equals both the closed form and a brute-force time average, the FDTD pluck splits into exact half-height pulses with cB = ±E on the staggered grid, the mirror gives ±90° at five probe positions, and the dipole fields satisfy Faraday in spherical coordinates numerically. For §6: the pair solves its two equations for any Γ, delivered power is (1−|Γ|²)/2 at every z, V/Z₀I at the load reproduces R + jX, SWR equals |V|max/|V|min, and V and I are in phase at every voltage maximum.
Also in web_dashboard (group "learn") and the clickthrough backlog
(clean: 0 errors, 188 actions at 1280 and 400 px).