2D Wave Diffraction: Slits and Obstacles
The scalar wave equation in two dimensions, solved by an explicit leapfrog scheme with rigid walls and an absorbing sponge. Presets give a free circular wavefront, single-slit diffraction, double-slit interference with an on-axis central maximum, and an obstacle that casts a shadow the wave bends into. The primary scene is the physical displacement field with a tanh-compressed water map so the faint transmitted pattern is visible; the side panel reads the screen intensity along a far column. The time step is held within the two-dimensional stability (CFL) bound for the chosen wave speed. The single-slit diffraction, the symmetric central double-slit maximum, hard-wall phase inversion, and circular-wavefront isotropy are the physical content.
WHAT TO TRY
- Pick a preset (free wavefront, single slit, double slit, a cavity): the explicit leapfrog scheme propagates the scalar wave through the geometry, reflecting off rigid walls and diffracting through openings.
- Watch the wave reach the dashed screen: the intensity profile |u|(y) builds up the diffraction pattern, bright where wavelets arrive in phase and dark where they cancel.
- Compare a single slit against a double slit: one gives a broad diffraction envelope, the other adds the fine interference fringes inside it, the two-slit pattern made from one wave equation.