This simulation needs WebAssembly, and it could not start in this browser.
The image is a frame from a real run. Check that JavaScript is on, or try another browser.
In 1909 Geoffrey Ingram Taylor photographed the diffraction pattern of a needle in light so faint that rarely more than one photon was in the apparatus at a time, and the fringes appeared anyway. Claus Jönsson sent electrons through a double slit in 1961, and in 1974 Pier Giorgio Merli, Gian Franco Missiroli and Giulio Pozzi recorded the pattern building up from single electrons; Akira Tonomura’s group repeated it in 1989 with electrons arriving one at a time. Each electron arrives as one localised flash at a random place, yet thousands of them together trace the interference fringes of a wave that passed through both slits. This simulation reproduces that build-up: every particle lands at a position drawn at random from the quantum mechanical probability distribution.
What you see
The source sits at the top, followed by the barrier, with slit widths and separation drawn to scale. Below it the histogram grows from the hits on the detector screen, one bar per pixel column, and the yellow line is the distribution the particles are drawn from, both scaled to their highest value. The count in the corner is the number of particles so far. At the default 10 particles per frame the first few hundred hits look like noise, after 1800 particles (3 seconds) the histogram already correlates with the curve at 0.94, and after 6000 particles (10 seconds) at 0.98.
Governing equation
For slits of width and centre-to-centre separation , lit by particles of de Broglie wavelength , the Fraunhofer intensity in the direction is
The first factor is the diffraction envelope of one slit, with zeros at ; the second is the interference of the two slits, with dark fringes at . Bright orders exist only for , since . The screen is flat and at distance , so a pixel at height sees and covers the angle . The probability to land in a pixel is therefore
and each landing position is drawn from by inverse-transform sampling over the 800 pixels of the screen. With which-way detection the particle passes one slit or the other, and becomes the average of the two single-slit patterns, each measured from its own slit. All lengths are in screen pixels.
Presets
Double slit: wavelength 10, slit width 20 and separation 80 pixels, screen 400 pixels away. Seven bright fringes, about 50 pixels apart near the centre and spreading outward, fill the central envelope, which ends at , 231 pixels from the centre. The fourth order would sit exactly there and is missing because . Faint side lobes at 325 pixels reach 2 percent of the central peak.
Single slit: one slit 30 pixels wide. The central maximum spans the 282 pixels between the first dark points at , and the side maxima 214 pixels from the centre reach 3.7 percent of the central peak.
Which-way detection: the double slit with the path of every particle known. The interference minima vanish and the pattern becomes one broad central hump with faint side lobes near the edges, the sum of two single-slit envelopes.
Many fringes: wavelength 5, slit width 10 and separation 160 pixels, so is four times smaller than in the double-slit preset. The fringes are 12.5 pixels apart near the centre, and 31 of them fit in the central envelope, which still ends at 231 pixels because is unchanged.
Parameters
All controls take effect on Reset, which also clears the screen. The slit drawing follows the sliders at once.
Double slit switches between two slits and one.
Which-way detection replaces the coherent pattern by the incoherent sum of the two single-slit patterns.
Wavelength (px) sets ; all angles scale with it.
Slit width (px) sets and with it the width of the envelope.
Slit separation (px) sets and with it the fringe spacing.
Screen distance (px) sets . A farther screen spreads the same angles over more pixels, so fewer fringes fit on it.
Particles per frame sets how many particles arrive per frame, 60 frames per second at normal speed.