Two-Dimensional Barrier and Slits
This is the two-dimensional counterpart of the square-barrier app. A Gaussian packet travels to the right and meets a rectangular wall of height V_0. The difference is that the wall can have slits cut into it.
Close every slit and the wall runs the full height of the box. That case really is the one-dimensional problem with a spectator axis: nothing depends on y, so every row evolves independently and reproduces the 1D result. Open one slit and the packet spreads into the geometric shadow. Open two and the openings become coherent sources whose overlap builds a fringe pattern.
The screen control inverts solid and open, so the slits become free-standing blocks.
Units are \hbar = m = 1, so E = k_0^2/2 for a packet with central wavenumber k_0.
These demonstrations were built with generative AI.
- Time
- 0.0
- Before the wall
- 0.000
- Past the wall
- 0.000
- Absorbed at edges
- 0.000
Reading the picture
The square panel is the plane. Brightness is |\psi(x,y)|^2, on a compressed scale so the faint diffracted light is visible next to the bright incoming packet. The pale block is the closed part of the wall; the gaps in it are the slits. The dashed line to its right is the screen.
The curve in the narrow panel is the intensity accumulated on that screen, \int |\psi(x_{\text{screen}}, y)|^2\, dt. It builds up as the run proceeds, which is what a detector sitting there would record. With two slits open it develops the familiar fringes; with one it becomes a single broad maximum with weak side lobes.
The phase and amplitude view colours each point by the phase of \psi with brightness still given by |\psi|. Wavefronts become visible, and so does the reason the fringes are where they are: the two slits emit in phase, and the bright fringes sit where the path difference is a whole number of wavelengths.
What the numbers mean
Before the wall and past the wall are the probability on each side. They do not add to one, because the packet is absorbed as it reaches the edge of the box — that is what absorbed at edges counts. Without that absorption the grid would wrap around and the packet would interfere with its own image, which would look like physics but would not be.
Method
Split-step Fourier again, now on a 256 \times 256 grid over a 140 \times 140 box with \Delta t = 0.02: half a step of the potential phase, a full kinetic step in Fourier space, another half step of the potential. The absorbing margin is a smooth \sin^2 ramp over the outer 12% of each axis.
Two transforms of 65536 points per step is real work for a browser, so the number of steps per frame backs off automatically if the frame rate drops.