🌊 2D Wave Interference
A real-time 2D top-down double-slit / multi-source wave interference simulation. Every pixel sums the actual wave equation from each coherent source, producing genuine constructive/destructive fringes plus a live intensity-vs-position plot matching the classic path-difference formula.
Real Superposition, Not a Texture Blend
Every pixel of the field is the literal sum of each source's wave equation: A = Σ cos(kr − ωt + φ)/√r, computed with the true Euclidean distance r from that pixel to each source — the same physics as a real ripple tank or coherent radiator array, evaluated with plain JavaScript math, no shortcuts.
Path Difference & Fringe Spacing
For two sources spacing d apart, bright fringes occur where the path difference r₂ − r₁ equals a whole number of wavelengths nλ, and dark fringes where it equals (n+½)λ. The classic small-angle result Δy ≈ λL/d (Young, 1801) predicts the spacing on a screen distance L away — the live readout computes it from your current sliders, and the intensity curve's peaks track it.
Phased Arrays
Setting the Phase step control applies a linear phase ramp across the sources (φᵢ = i·φ) instead of a single flat phase. With more than two sources this reproduces phased-array beam steering: the fringe pattern tilts and the main lobe points in a new direction, exactly as it does in radar and ultrasound arrays.
About 2D Wave Interference
This simulation renders a genuine top-down interference field for up to six coherent point sources. A plain 2D canvas evaluates, for every point in the field, the exact sum A = Σ cos(kr − ωt + φ)/√r using the real Euclidean distance from that point to each source — this is direct wave superposition, not a pre-baked texture or shader approximation. Bright crests and dark nodal fringes appear exactly where the individual contributions reinforce or cancel.
A vertical dashed "screen" line sits a controllable distance L from the sources. Along that line, the simulation computes the exact time-averaged intensity via a complex phasor sum and draws it as a live curve bulging out from the screen — the same quantity a real detector or photographic plate would record. Its peak spacing matches the classic path-difference prediction Δy ≈ λL/d, letting you verify the textbook formula against the actual computed field.
Frequently Asked Questions
What makes this "real" superposition rather than an approximation?
Every pixel's value is computed by summing each source's actual wave equation cos(kr − ωt + φ)/√r using the true distance r from that pixel to the source — the same calculation you would do by hand for two or more point emitters, just repeated across the whole field, not a lookup texture or a blurred blend of circles.
How is the intensity curve computed?
For each row along the screen line, the simulation sums the complex phasor (1/√r)·e^(i(φ−kr)) from every source, then plots the squared magnitude of that sum — the time-averaged intensity a stationary detector would measure, exactly as in the analytic derivation of double-slit intensity.
Does the fringe spacing match the textbook formula?
Yes. For two sources separated by d and a screen at distance L, the predicted spacing is Δy ≈ λL/d. The live readout computes this from your current sliders, and the intensity curve's peak-to-peak spacing tracks it closely whenever L is reasonably large compared to d.
What does the Phase step control do?
It applies a linear phase ramp across the sources: source i gets phase i·φ instead of a fixed offset. With two sources this reproduces the standard "out of phase" case. With three or more sources it reproduces phased-array beam steering, tilting the whole fringe pattern.
What is the difference between Amplitude and Intensity display mode?
Amplitude mode animates the signed instantaneous field with a diverging blue-to-red colour map, so you watch the wavefronts actually move. Intensity mode shows the static, time-averaged squared amplitude — the pattern a camera or screen would capture, with no flicker.
Why does the pattern change shape near the sources but look regular far away?
Close to the sources the simulation uses the exact (near-field) distance to each source, so the pattern curves and departs from the simple straight-fringe picture. Far from the sources the path differences approach the linear small-angle approximation, which is where the Δy ≈ λL/d formula becomes accurate — you can watch this transition by changing the Screen distance slider.
How does this relate to Young's double-slit experiment?
The default Double-slit preset reproduces Thomas Young's 1801 geometry: two coherent sources a fixed distance apart, observed on a screen. The intensity curve reproduces the same alternating bright-and-dark pattern Young used as the first strong evidence that light behaves as a wave.
Where is this kind of interference used in practice?
Beyond optics, the identical mathematics governs phased-array radar and radio antennas, ultrasound and sonar beamforming, acoustic loudspeaker arrays, and optical interferometers — anywhere multiple coherent emitters combine to shape a directional pattern.
A real-time 2D top-down double-slit / multi-source wave interference simulation. Every point in the field sums the actual wave equation from each coherent source using true distances, producing genuine constructive and destructive fringes, plus a live intensity-vs-position plot along the screen line that matches the classic path-difference formula.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install