How accurate is this simulation?
The pattern is computed from the standard Fraunhofer double-slit intensity with the single-slit envelope, evaluated at the true angle — not a small-angle approximation and not a drawn curve. The apparatus around it is schematic, and at one corner of the slider range the far-field model stops applying. Both are set out below.
Checked against the simulation's source on 2026-09-11. Found something wrong? That is the most useful message you can send us.
The model
Computed exactlyI(θ) ∝ cos²(π d sin θ / λ) · sinc²(π a sin θ / λ)
- d
- centre-to-centre slit separation
- a
- width of each slit
- D
- slit-to-screen distance
- λ
- wavelength in the medium (air)
- y
- displacement on the screen from the central maximum
The first factor is two-source interference; the second is the diffraction envelope of one slit of finite width. Both are always applied. A double-slit diagram drawn without its envelope is the commonest way this figure is wrong — it predicts fringes of equal brightness out to the edge of the screen, and it cannot explain a missing order.
The angle is taken as θ = arctan(y/D) and the sine of it is used directly, so no small-angle substitution is made anywhere in the calculation. At the widest angle the stage can show (y = 20 mm at D = 0.5 m, θ = 2.29°) the difference between sin θ and tan θ is 0.08 % — small, but it is not assumed away.
One function evaluates that expression, and everything quantitative on the stage is drawn from it: the bright bands painted on the screen, the intensity profile to the right of the screen, the dashed envelope behind that profile, and the fan of bright directions when it is shown. They cannot disagree with each other, because there is nothing for them to disagree with.
The quantities it reports
Computed exactlyThe fringe spacing is computed as β = λD/d and marked on the screen with a bracket spanning one fringe, so the number and the picture are the same measurement. At the default settings (d = 0.25 mm, D = 1.50 m, λ = 520 nm) that is 3.12 mm.
The count of bright fringes inside the central envelope comes from the orders that fall inside the envelope's first zero: maxima at d sin θ = mλ, first zero at a sin θ = λ, so the surviving orders are the integers with |m| < d/a. That is 2⌊d/a⌋ + 1 of them, or 2(d/a) − 1 when d/a is a whole number, because then m = ±d/a land exactly on the zero and are the missing orders. At the defaults d/a = 3.125, giving seven.
The envelope's first zero is placed with arcsin(λ/a) rather than λ/a, for the same reason the intensity uses the true angle.
Where the far-field model is valid
Limit of validityF = d² ⁄ (λD) — Fraunhofer requires F ≪ 1
The expression above is the Fraunhofer (far-field) form. It is derived by treating the two paths to a point on the screen as parallel, which is sound when the Fresnel number F is small. The sliders can be set outside that regime, and when they are, the simulation still draws the far-field pattern — a real bench would show Fresnel structure it does not model.
| Setting | d | λ | D | F | Verdict |
|---|---|---|---|---|---|
| Defaults | 0.25 mm | 520 nm | 1.50 m | 0.080 | Comfortably far-field |
| Widest fringes | 0.10 mm | 700 nm | 3.00 m | 0.005 | Far-field |
| Large d, long bench | 1.00 mm | 380 nm | 3.00 m | 0.88 | Marginal |
| Large d, short bench | 1.00 mm | 380 nm | 0.50 m | 5.3 | Not far-field — the drawn pattern is wrong |
The last row is the corner of the slider range where this simulation should not be trusted quantitatively. It is reachable, and it is not flagged on the stage; treat d ≳ 0.5 mm with D ≲ 1 m as illustrative only.
What the model assumes
ApproximationPerfect coherence. The source is taken as a monochromatic plane wave, perfectly coherent across both slits and normally incident. Every minimum therefore falls to exactly zero and the fringe visibility is 1 at every order. On a real bench a finite source width reduces spatial coherence and a finite bandwidth reduces temporal coherence, so contrast falls away from the centre and the minima never reach zero. This is the single largest difference between this picture and a photograph of the real experiment.
Infinitely long slits. The calculation is one-dimensional: the pattern varies across the fringes and is uniform along them. Real slits are finite in length, so real fringes are finite bars with their own ends.
Scalar diffraction, no obliquity factor. Polarisation is ignored and the Huygens–Fresnel obliquity factor (1 + cos θ)/2 is omitted. At the largest angle the stage can show it would change the intensity by 0.04 %.
Identical slits. Both slits have the same width a and the same transmission. A real pair differs slightly, which is another reason real minima do not reach zero.
No screen response. Intensity is displayed linearly and clipped at the top of the range, so the brightest part of the central maximum saturates. Neither photographic nor visual response is modelled.
What is to scale, and what is not
Schematic — not measuredThe pattern is to scale. The screen shows a fixed ±20 mm, so changing D genuinely rescales the fringes against a constant ruler, and the β bracket is that same ruler.
The apparatus is not, and the stage says so. At the default settings, drawn to the pattern's own scale, the slit separation would be about 1.5 pixels and each slit about half a pixel. The barrier is drawn at a separation that can be seen and a width that can be seen; do not measure it.
The screen's position along the bench is schematic. It travels between 0.56 and 0.76 of the stage width as D goes from 0.5 m to 3 m, so it moves in the right direction but not in proportion. The dimension line reports the true D.
The wavefront arcs are schematic. In the Wavefronts view the arcs are drawn at a fixed pixel spacing, not at the true wavelength relative to the slit separation — at the defaults a true drawing would need about 480 arcs between the two slits. The arcs show that each slit re-radiates and that two wave systems overlap; the positions where the drawn arcs cross are not the computed maxima. The fringes and the profile are the quantitative part of this figure.
The vertical axis is stretched enormously against the horizontal. The whole pattern spans about three-quarters of a degree — the fringe spacing is λ/d = 0.119° and the central envelope is ±λ/a = ±0.372° — which is roughly 2 cm across after 1.5 m of bench. Drawn true, the light would be a pencil too thin to see.
The fan of bright directions
Computed exactlyr₂ − r₁ = mλ
A point is bright where the two paths to it differ by a whole number of wavelengths. A constant difference of distances to two fixed points is the definition of a hyperbola with those points as foci, so the bright loci are a nested family of hyperbolas opening away from the barrier, and the familiar straight rays of sin θ = mλ/d are their asymptotes.
The fan is computed as the hyperbolas, not as the asymptotes. In practice the difference is invisible: the curvature lives within b = d/2 of the slits — a tenth of a millimetre on a 1.5 m bench — so on every setting these sliders allow, the exact curve and its asymptote differ by a fraction of a pixel. It is computed exactly anyway.
Each wedge starts where the two beams meet. Light from one slit spreads at λ/a, so until it has spread far enough to reach the other slit's line of travel there is nothing to interfere with — two separate beams, no fringes. For order m that is x ≥ (d/2)/(tan θ + λ/a): about 1.9 cm of a 1.5 m bench at the defaults, but 29 cm at d = 1.00 mm with a = 0.30 mm, which on a 0.5 m bench is more than half the way to the screen.
The wedges are bands, not profiles. Each is filled uniformly across one fringe width β and shaded by the envelope's value at that angle. The true transverse variation is the cos² of the model, with genuine dark directions at d sin θ = (m + ½)λ between the bright ones. The wedge says where the bright light goes, not how it is distributed inside.
One more honesty: in clean air you would see none of this. You only see light that reaches your eye, so a real bench shows nothing at all between the barrier and the screen. Fill the path with smoke or chalk dust and the fan appears — which is exactly how interference is photographed, and what a ripple tank shows directly because there the medium is the thing you are watching.
Check it against the textbook
Every number below can be read off the simulation and checked by hand. If any of them disagrees, the simulation is wrong and we would like to know.
| Set | Formula | Expected | Where to read it |
|---|---|---|---|
| d = 0.25 mm, D = 1.50 m, λ = 520 nm | β = λD/d | 3.12 mm | β readout and the bracket on the screen |
| Double d to 0.50 mm | β ∝ 1/d | 1.56 mm — fringes halve | β readout |
| Double D to 3.00 m | β ∝ D | 6.24 mm — pattern doubles | β readout, and the ±20 mm screen |
| λ = 700 nm (red) | β ∝ λ | 4.20 mm | β readout |
| d = 0.25 mm, a = 0.08 mm | 2⌊d/a⌋ + 1 | 7 fringes in the envelope | Fringe count on the stage |
| a = 0.05 mm with d = 0.25 mm | d/a = 5 exactly | 9 fringes — orders ±5 are missing | The 5th order vanishes under the envelope zero |
| a = 0.08 mm, D = 1.50 m, λ = 520 nm | y₁ = D·tan(arcsin(λ/a)) | Envelope first zero at 9.75 mm | Where the dashed envelope meets the axis |
Known limitations we have not fixed
Limit of validityThe sliders permit a > d. Slit width goes to 0.30 mm and separation down to 0.10 mm, so it is possible to ask for two slits wider than the gap between their centres — an arrangement that cannot be built, since the slits would overlap into one. The formula still returns a number. Keep a < d for anything you intend to trust.
The far-field corner is not flagged. As the table above says, large d on a short bench leaves the Fraunhofer regime, and nothing on the stage tells you so.
Fringe visibility is always 1. There is no source-size or bandwidth control, so the simulation cannot show coherence being lost — which is the thing a real double-slit demonstration spends most of its effort protecting.