Palette
Beam path
Detector
Constructive
Destructive
R Rotate selected
Del/Backspace Remove
Explain simply
Waves add like ripples on water. When peaks meet peaks, they make a bigger peak (bright). When peaks meet troughs, they cancel (dark). Mirrors flip the wave, splitters make two paths, phase shifters slide the ripple forward or back to line things up.
Advanced
We treat the steady-state complex amplitude A at the detector as a sum of paths: A = Σ a_k e^{iφ_k}. Intensity I = |A|^2. A mirror adds π phase (−1). A 50/50 splitter divides amplitude by √2 and adds a relative phase (we use transmitted 0°, reflected +90°). Phase shifter multiplies by e^{iθ}.
Inspector
No selection
Tap a placed component to edit or rotate.
README
How to run: open this file in a browser. No install needed.
Learning goals: adjust path phases to make light bright or dark. Components: Source (emits wave), Beam Splitter (makes two paths, adds relative phase), Mirror (reflects, flips phase), Phase Shifter (adds chosen phase), Absorber (blocks), Detector (measures intensity).
Amplitude and phase: each path contributes a complex number. They add. Brightness is the squared magnitude.
Files: Single-page app. Level data is at the top of the script for easy editing.