Double-Slit Interference Simulator

JJ Ben-Joseph headshot JJ Ben-Joseph

Young’s Experiment: From Slits to an Animated Fringe Pattern

This double-slit simulator connects Young’s interference geometry to a moving grayscale wave display. A coherent beam passing through two closely separated openings produces alternating bright and dark regions on a distant screen because the two optical paths usually differ. Where the waves arrive in step, their amplitudes reinforce; where a crest arrives with a trough, they cancel. Entering a wavelength, slit separation, and screen distance lets the calculator report the corresponding small-angle fringe spacing while the canvas draws two equal-amplitude circular waves. The animation is a visual model of superposition, not a time-resolved laboratory measurement: its phase progression is deliberately scaled so changes can be seen. Its geometry nevertheless preserves the wavelength, slit-spacing, and screen-distance relationship used for the reported fringe spacing.

Double-Slit Variables, Geometry, and Assumptions

For this Young’s double-slit calculation, d is the separation between slits, L is the distance from the slit plane to the screen, and λ is the wavelength; all three form fields use metres. The transverse screen coordinate is y. The fringe-spacing result uses the usual far-field, small-angle approximation, appropriate when the screen distance is large compared with the slit separation and the region being considered. Under that approximation, sinθtanθyL, and the path difference is Δ=dsinθ. Bright fringes satisfy Δ=mλ for integer order m, giving positions ym=mλLd. Thus adjacent orders are separated by Δy=λLd. The model assumes coherent sources of equal amplitude and does not apply a finite-slit diffraction envelope, polarization effects, or imperfect coherence.

Canvas Rendering of Two-Slit Wave Superposition

The double-slit canvas samples a rectangular field rather than tracing a physical optical bench at full scale. In the calculation coordinates, the two sources lie at (0,±d2), separated along the vertical direction. At each pixel, the script finds the distances r1 and r2 to those sources. In the sampled geometry these are r1=x2+(yd2)2 and r2=x2+(y+d2)2. It adds the two cosine amplitudes and squares that sum to obtain the displayed intensity, I=(cosφ1+cosφ2)2. Its phase is 2π(rλt), so the animation’s time variable advances phase on an arbitrary visual scale rather than serving as a measured time in seconds. White pixels represent high values of the squared amplitude and black pixels represent minima. The summary’s “energy error” is the grid-average intensity minus 2; it is a diagnostic of the sampled display, not a measurement of optical power conservation.

Double-Slit Fringe-Spacing Example

With the default values, red light of wavelength λ=632 nm passes through slits separated by d=0.5 mm and reaches a screen at L=1 m. The small-angle spacing is λLd=632×109×15×1041.26×103 m, or 1.26 mm. The central maximum is centered at y=0, with adjacent maxima one fringe spacing away in the approximation used here. Increasing the wavelength or screen distance spreads the bands farther apart; increasing slit separation brings them closer together. Press Play to advance the illustrative phase, Reset after changing values, or use CSV after the canvas has drawn to export the sampled right-edge coordinates and intensities.

Calculated Double-Slit Spacing Comparisons

This double-slit comparison keeps the screen one metre away and shows how wavelength and slit separation change Δy, calculated as λLd. The values are small-angle predictions rather than a correction for finite slit width.

λ (nm) d (mm) L (m) Δy (mm)
632 0.5 1.0 1.26
532 0.5 1.0 1.06
632 1.0 1.0 0.63

Reading the Double-Slit Animation and Summary

In this double-slit animation, two circular wave fields originate at vertically separated points on the left side of the calculation geometry and overlap toward the right. Bright grayscale zones mark constructive interference, while dark zones mark destructive interference. Although the visible wave phase changes as the animation runs, the fringe spacing in the summary is determined only by the current λ, d, and L inputs. The summary also shows the current visual phase value and the grid-average intensity difference used by the renderer. The canvas can receive keyboard focus, and Space toggles Play and Pause. The CSV control downloads the currently sampled right-edge data as columns named y and I, which can be graphed to inspect the simulated intensity variation. Grayscale encoding makes the maxima and minima distinguishable without depending on color.

Limits of This Young’s Double-Slit Model

This Young’s double-slit model is intentionally idealized. Real slits have width, so a single-slit diffraction envelope reduces or removes some interference maxima. A source with finite spectral width or fluctuating phase reduces contrast, and unequal illumination of the slits changes the depth of the minima. The canvas also uses two-dimensional circular source waves and an arbitrary phase-time scale for clarity. It does not model detector response, aperture thickness, reflections, or polarization. Consequently, use the numerical fringe spacing as the stated small-angle idealization and use the animation to understand phase addition, rather than as a calibrated prediction of every feature in an experimental image.

Double-Slit Interference in Optical and Quantum Contexts

Double-slit interference is useful because the separation of bright bands links a measurable distance to wavelength and geometry. Related interferometric methods support wavelength measurement and precision optical alignment. The same superposition mathematics appears in diffraction gratings, thin films, and many wave systems. Experiments with electrons, neutrons, and other quantum particles also produce interference patterns under appropriate conditions, illustrating that probability amplitudes can interfere even when detections occur individually. Exploring this calculator’s wavelength, slit separation, and screen-distance controls makes the inverse and direct proportionalities concrete: longer wavelengths and longer propagation distances enlarge the pattern, whereas a wider slit separation compresses it.

Related calculators: Thin-Film Interference Calculator, Diffraction Grating Calculator, Laser Diffraction Particle Size Calculator.

How to Use This Double-Slit Interference Calculator

  1. Enter the light wavelength λ in metres.
  2. Enter the slit separation d in metres.
  3. Enter the slit-to-screen distance L in metres.
  4. Set the visual animation step Δt, then use Play to watch the phase evolve or compare how a changed optical parameter alters the reported fringe spacing.

Formula: Double-Slit Fringe Spacing

For the far-field small-angle approximation used by this simulator, the reported spacing between adjacent bright fringes is Δy=λLd. Supply wavelength, slit separation, and screen distance in metres so the displayed spacing is also in metres.

Arcade Mini-Game: Double-Slit Interference Simulator Calibration Run

Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.

Results will appear here after calculation.

Enter values to simulate.