2D Wave Equation
A vibrating membrane — like a drum head — governed by the two-dimensional wave equation. Click anywhere to create disturbances. Watch waves propagate outward in concentric circles, reflect off boundaries, and interfere with each other.
What’s happening
The two-dimensional wave equation describes how a disturbance propagates across a flat surface:
∂²u/∂t² = c²(∂²u/∂x² + ∂²u/∂y²) − γ · ∂u/∂t
Here u(x,y,t) is the height of the membrane at position (x,y) and time t,
c is the wave speed, and γ is the damping coefficient.
- Fixed boundaries: Edges are pinned at zero. Waves reflect and invert (a crest reflects as a trough). This is how a drum head works.
- Free boundaries: Edges are unconstrained. Waves reflect without inverting — a crest comes back as a crest.
- Absorbing boundaries: Edges absorb incoming waves with minimal reflection, simulating an infinite membrane.
The simulation uses a finite difference scheme on a grid. Each cell’s next value
is computed from its current value, previous value, and the average of its four neighbors —
the discrete Laplacian. The time step is chosen to satisfy the CFL stability condition:
c · dt/dx ≤ 1/√2.
When two waves overlap, their heights simply add (superposition). Constructive interference doubles amplitude; destructive interference cancels. This is the same physics behind sound, light, water waves, and quantum mechanics.