Interactive Diffraction and Interference Simulator
Explore how light forms diffraction and interference patterns. Adjust Wavelength, Slit Width, and Slit Separation to compare single slit, double slit, and diffraction grating behavior in real time.
Explore light through slits
Choose an experiment and move a slider to see how the pattern changes.
Experiment settings
Try increasing slit spacing. The bright fringes move closer together.
Simulated projection screen
Solid line: total intensity · Dashed line: single slit envelope
- Central envelope width
- —
- First order position (±)
- —
What changes the pattern?
Single slit diffraction spreads more when the slit is narrower. In the double slit experiment, a larger centre to centre spacing brings neighbouring fringes closer. With a diffraction grating, adding more slits makes the principal peaks narrower.
Equations and model limits
The simulator uses Fraunhofer diffraction for coherent, monochromatic light incident normally on identical rectangular slits. The plot is a horizontal slice, normalized to the central intensity, I(0). It models relative intensity and treats the screen colours as approximate.
For screen position x and distance L, sin θ = x / √(L² + x²). With wavelength λ, slit width a, spacing d, and slit count N, let α = πa sin θ / λ and β = πd sin θ / λ. The single slit envelope is (sin α / α)². For multiple slits, multiply it by [sin(Nβ) / (N sin β)]², using the continuous limits at zero denominators.
The central envelope width is the distance between the first envelope minima. The first order readout gives the position from d sin θ = λ. The envelope can shift the nearby intensity peak or suppress an order. The screen distance maps angle to position. For near field or Talbot effects, use a Fresnel model. A rough far field check uses the aperture half width b and compares b²/(λL) with 1.
Reference: OpenStax University Physics, Double Slit Diffraction
What the diffraction pattern tells you
Look at the double slit pattern above. The bright fringes repeat at nearly regular intervals near the centre, but they fade as you move outward. The spacing comes from interference between the two slits. The gradual falloff comes from diffraction at each slit. The dashed curve shows this wider shape, called the diffraction envelope.
Three experiments to try
- Single slit diffraction. Set the slit width to 100 µm, then reduce it to 50 µm. Keep the wavelength and screen distance fixed. The central bright band roughly doubles in width. If the first dark minima move out of view, select ±30 mm under Screen view.
- Double slit interference. Reset the experiment. Increase slit spacing from 240 to 480 µm. The fringes move closer together while the dashed envelope stays in place. Now change slit width instead and watch the envelope change.
- Diffraction grating. Keep the spacing fixed and increase the number of slits. The principal peaks become narrower, while their order positions stay fixed. The simulator normalizes each pattern to its own central intensity, so compare the widths of the peaks on the plot.
Worked example: estimate fringe spacing
In the default double slit experiment, the wavelength is 532 nm, the slit spacing is 240 µm, and the screen is 1.50 m away. Near the centre, the approximate distance between neighbouring bright fringes is wavelength times screen distance divided by slit spacing.
Fringe spacing ≈ (532 nm × 1.50 m) / 240 µm ≈ 3.33 mm
At the same settings, the simulator gives a central envelope width of about 26.60 mm, measured from the first envelope minimum on one side to the first on the other. For a classroom or lab comparison, export the intensity CSV and plot it alongside your measurements after centring and normalizing the measured trace.
The model assumes coherent light at one wavelength and uses the far field approximation. The Fresnel number shown in the simulator helps you judge when a wider aperture or shorter screen distance makes that approximation less reliable.
For the underlying physics, see OpenStax on double slit diffraction and diffraction gratings. To explore how wavelength relates to frequency and photon energy, try the electromagnetic spectrum simulator.