Wave Propagation
A real-time 2D acoustic wave simulator. Drop sources, paint walls, and watch diffraction, reflection, interference, and standing waves form on the canvas. Solver: scalar wave equation on a staggered grid using leapfrog finite differences (FDTD), with sponge-layer absorbing boundaries.
Controls
λ ≈ 12.5 cells
Simulation
− pressure 0 + pressure
Drag the source to move
320 × 180
0
1
0.500
FDTD · 2D scalar wave
Tools: Drag moves existing sources. Source drops a continuous sinusoidal source where you click. Pulse fires a one-shot Gaussian pulse — best for seeing wavefronts and diffraction. Wall paints rigid walls (sound bounces off). Erase removes sources or walls under the cursor.
The grid is in arbitrary units; one cell ≈ a millimeter or two of air at the typical wavelengths used here.