Particles are emitted one at a time toward a barrier pierced by two narrow slits a distance d apart. Each particle behaves as a probability wave that passes through both slits at once, and the two resulting wavelets interfere before landing on the screen — so even single particles, fired one by one, slowly paint a striped interference pattern.
The bright-fringe spacing on a screen a distance L from the barrier follows Δy = λL/d: a longer wavelength or a smaller slit separation spreads the fringes further apart, while a larger separation packs them tighter together. This simulation fixes L = 1.2 m and computes Δy live from your λ and d sliders.
Switching on path observation forces each particle to reveal which slit it went through. That measurement destroys the superposition — the wave function collapses to a single path, the interference term vanishes, and the particles pile up into two simple bands directly behind the slits instead of a fringe pattern.