← thecodex.expert
Simulations Hub Double-Slit Experiment (Concept)
Overview Simulation The Physics Sources
Simulation · Quantum Mechanics

Double-Slit Simulation

Reading time: 6 minConfidence: HighLast verified: July 2026

This simulation computes and renders the interference pattern produced by light passing through two narrow slits, letting you adjust slit separation, slit width, wavelength, and screen distance and see the resulting fringe pattern in real time.

Interactive simulation

Fringe spacing: — mm
Intensity at cursor: move mouse over pattern

The physics behind this simulation

The intensity pattern on the screen combines two effects: interference between the two slits (producing the fine fringes) and diffraction from each slit's finite width (producing an overall envelope that fades toward the edges). The combined intensity as a function of position y on the screen is:

I(y) = I₀ · [cos²(πdy/λL)] · [sinc²(πay/λL)]

The first bracket is the double-slit interference term (fine fringes, spacing set by slit separation d); the second bracket is the single-slit diffraction envelope (broader intensity falloff, set by slit width a). Move your cursor over the pattern above to read off the relative intensity at that point.

Common mistakeSlit separation d and slit width a control different things and are easy to confuse. Separation d sets how closely spaced the bright fringes are — larger d means finer, more closely packed fringes. Width a sets how quickly the overall brightness envelope fades toward the edges — larger a means a narrower envelope, concentrating more fringes near the centre.

Sources

  • Hecht, E. (2016). Optics, 5th ed. Pearson, Ch. 10.
  • Young, T. (1804). Philosophical Transactions of the Royal Society of London, 94, 1–16.
Last verified: July 2026 · Source: Hecht (2016) · Confidence: high