Interference happens when wave amplitudes overlap. Add the wave contributions first, then compute intensity from the combined amplitude. Adding intensities too early destroys the phase information that creates bright and dark fringes.
For two equal-amplitude waves with phase difference Δφ, relative intensity follows
When the path difference is ΔL, a simple monochromatic phase model uses
Constructive interference occurs for path differences near integer multiples of wavelength; destructive interference occurs near half-integer multiples for equal coherent contributions. “Near” matters because real sources can have unequal amplitude, finite bandwidth, and changing phase.
const combined = addComplex(pathA, pathB);
const relativeIntensity = combined.real ** 2 + combined.imaginary ** 2;
Adjust amplitude and wavelength. The plotted line is a view of sampled displacement data; its speed is frequency divided by wave number.
Amplitude 1.0; wavelength 3.0 m; model speed 1.91 m/s.
The sampler above is a one-dimensional wave view. It helps establish amplitude and wavelength vocabulary; a full two-source pattern additionally needs geometric path lengths from both sources to each screen point.
Prediction: Two equal amplitudes with opposite phase cancel in this ideal model.
Represent one path as amplitude 1 and phase 0, then represent the other with phase π. Predict the combined amplitude before calculating it. Change the phase to zero and compare the intensity change.Interference is a data-ordering rule: preserve amplitude and phase, sum contributions, then calculate intensity. Test both perfect reinforcement and cancellation before trusting a rendered fringe pattern.
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
\[\text{observable output} = f(\text{inputs},\,\text{state})\]For Interference, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Geometric and Wave Optics, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Treat Interference as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Model interference by summing complex amplitudes before calculating intensity.