Enter values to simulate.
Simulation summary:
The wave nature of light burst into public consciousness in the early nineteenth century when Thomas Young sent a coherent beam through two closely spaced slits and observed a series of alternating bright and dark bands on a distant screen. This striking interference pattern revealed that light exhibits superposition like ripples on a pond, settling a centuries‑long debate over whether illumination consisted of particles or waves. Modern textbooks summarize the phenomenon with a few equations, yet the dynamic interplay of wavefronts can be elusive when frozen on the page. This simulator combines the standard double‑slit calculator with an animated HTML5 canvas. Two in‑phase point sources radiate circular waves; as they overlap, regions of constructive and destructive interference emerge, creating a shifting intensity map reminiscent of a laboratory observation. Adjusting wavelength, slit separation, or screen distance alters the spacing of fringes in real time, while the numeric outputs mirror the theoretical predictions. The canvas depiction, energy-normalized and color‑blind friendly, transforms a static equation into a visceral visualization.
The classic double‑slit setup consists of two narrow slits separated by a distance , a screen located a distance away, and a coherent monochromatic source of wavelength . We assume the slits are much narrower than and that is large compared with both and the transverse coordinate on the screen, so the small‑angle approximation applies. The path difference between light from the two slits at a point a distance from the central axis is then . Constructive interference occurs when for integer , yielding bright fringes at positions . Destructive interference arises halfway between maxima. The intensity at arbitrary follows , where is the maximum central intensity. The simulator assumes coherent sources with equal amplitude and neglects single‑slit diffraction effects, mirror reflections, and polarization. Because we simulate in two dimensions, the waves expand cylindrically rather than spherically; however, the resulting fringe spacing is unchanged.
To animate the interference, we discretize the canvas into pixels and update a phase field each frame. Two wave sources centered at emit sinusoidal disturbances with angular frequency times the speed of light, but for visualization we scale to an arbitrary speed so the waves visibly propagate. At every time step , the phase at each pixel is incremented by , and the contributions from both slits are summed. We compute intensity as the square of the resultant amplitude. The rendering uses a grayscale palette, with high intensity plotted as white and minima as black, ensuring that viewers with color vision deficiencies perceive the pattern. To guard against numerical instability, the time step is clamped between 0.001 and 0.05 seconds. Because the waves are sinusoidal and the update simply adds a phase increment, the algorithm is unconditionally stable, but a large causes the animation to strobe. The simulator also tallies the integrated intensity across the screen each frame, reporting the deviation from twice the single‑slit intensity—an analog to an energy‑drift metric. This value should remain near zero, indicating that the numerical discretization preserves overall power.
Suppose red laser light with nm illuminates two slits spaced mm apart, and the screen sits m away. Entering these parameters and pressing Play produces a ripple animation from the two slits. The central bright fringe emerges at the midpoint, while side fringes appear every m. The numeric summary reports this spacing and the first few maxima positions. Pausing the animation freezes the intensity map, and downloading the CSV yields a two‑column file of screen coordinate and normalized intensity. Plotting the data recreates the familiar pattern. Changing the slit separation to mm halves the fringe spacing, while doubling the wavelength doubles it, consistent with theory.
The table compares the baseline example with two parameter modifications. The predicted fringe spacing is calculated from .
λ (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 |
In the canvas, the two slits appear as bright points on the left. Concentric waves radiate outward, and where they intersect the screen on the right, alternating bright and dark bands form. Bright zones correspond to constructive interference, where crests from both slits coincide. Dark bands indicate destructive interference, where a crest from one slit meets a trough from the other. The animation conveys that these patterns shift in time even though the average intensity remains steady. The numeric summary under the canvas states the current simulated time and the computed fringe spacing. The hidden text summary mirrors these values for screen readers. The canvas accepts keyboard focus; pressing the space bar toggles play and pause. Hovering over input labels reveals tooltips that remind you of SI units. Because the grayscale pattern conveys intensity without relying on hue, viewers who cannot distinguish colors still perceive fringe structure. The energy error reported in the summary flags whether the finite grid is conserving the integrated intensity, providing feedback on the discretization quality.
This model assumes perfect coherence and neglects the finite width of each slit. In a real experiment, single‑slit diffraction envelopes modulate the fringe contrast. The simulation is two‑dimensional; in three dimensions, the pattern would be cylindrical. We also scale the wave propagation speed for visualization, so the time axis does not correspond to real physical time. Diffraction by apertures other than slits, polarization effects, and non‑monochromatic sources are ignored. Future extensions could incorporate slit width, random phase noise to model partial coherence, or even three‑slit and diffraction‑grating scenarios. Another enhancement would plot a real‑time line graph of intensity versus screen position alongside the 2‑D map. Despite simplifications, the simulator conveys core concepts and can serve as a springboard to more elaborate computational wave optics.
Interference underlies technologies ranging from spectroscopy to holography. Measuring the spacing of the fringes allows experimenters to determine wavelengths with remarkable precision, a technique that traces back to Michelson’s interferometer. The coherent control of light is the foundation of optical coherence tomography used in medical imaging and of precision metrology in gravitational‑wave detectors. Electron and neutron double‑slit experiments, which follow mathematics nearly identical to the optical case, highlight the quantum mechanical principle that particles possess wavefunctions capable of self‑interference. By experimenting with the parameters in this simulator, students can explore how changing the wavelength or geometry mimics material science experiments where nanoscale structures create color through interference, as in butterfly wings or anti‑reflective coatings. Understanding these connections emphasizes that the seemingly esoteric pattern on the canvas governs practical instruments and natural phenomena alike.
Related calculators: Thin-Film Interference Calculator, Diffraction Grating Calculator, Laser Diffraction Particle Size Calculator.