Multi-wave superposition is the natural extension of two-wave interference. Instead of adding only two sinusoidal waves, we add many coherent contributions, each with its own amplitude and phase. This is exactly the situation that appears in diffraction gratings, phased arrays, and other systems where many coherent sources contribute to a single resultant field.
The most compact way to describe this is with complex phasors. A single wave can be written as a vector in the complex plane:
\[
A_k e^{i\theta_k},
\]
where \(A_k\) is the amplitude and \(\theta_k\) is the phase. For \(N\) coherent waves, the total complex amplitude is
\[
S = \sum_{k=0}^{N-1} A_k e^{i\theta_k}.
\]
In this simulator, the phase of each wave is written as a base phase plus a progressive scan term:
\[
\theta_k = \phi_k + k\psi,
\]
so the full sum becomes
\[
S(\psi)=\sum_{k=0}^{N-1} A_k e^{\,i(\phi_k+k\psi)}.
\]
The parameter \(\psi\) is useful because it lets the calculator sweep through phase increments in a way that resembles a grating or phased-array pattern. When the phasors line up, the resultant vector becomes large; when they wrap around the complex plane and cancel, the resultant becomes small.
The measurable intensity is proportional to the squared magnitude of the resultant field:
\[
I(\psi)=|S(\psi)|^2.
\]
To evaluate the sum numerically, each phasor is split into Cartesian components:
\[
A_k e^{i\theta_k}=A_k(\cos\theta_k+i\sin\theta_k).
\]
Therefore
\[
\Re(S)=\sum_{k=0}^{N-1} A_k\cos\theta_k,
\qquad
\Im(S)=\sum_{k=0}^{N-1} A_k\sin\theta_k.
\]
Then the magnitude is
\[
|S|=\sqrt{(\Re S)^2+(\Im S)^2},
\]
and the intensity is simply
\[
I=|S|^2.
\]
If all amplitudes are positive and all phases line up perfectly, the maximum possible resultant amplitude is the sum of all amplitudes:
\[
|S|_{\max}=\sum_{k=0}^{N-1} A_k.
\]
So the maximum possible intensity is
\[
I_{\max}=\left(\sum_{k=0}^{N-1} A_k\right)^2.
\]
This gives a useful way to normalize the simulator output.
For the sample idea of 5 coherent waves with progressive phase, you might choose
\(A_k=1\) for all waves and phases
\(0^\circ,45^\circ,90^\circ,135^\circ,180^\circ\).
The phasor diagram then shows how the vectors add head-to-tail. If they spread around the circle, the resultant vector becomes short. If they bunch together, the resultant grows.
This is the same mathematics behind an \(N\)-slit grating. In an ideal grating, the amplitudes are often equal and the phase difference between neighboring slits depends on observation angle. Then the intensity pattern comes from exactly the same complex sum. The simulator therefore gives a general phasor interpretation of why gratings have strong peaks at some angles and deep minima at others.
The animation in this calculator displays a phasor wheel on the left and an intensity-vs-phase scan on the right. The phasor wheel is especially useful because it makes the superposition process visual: every wave contributes a vector, and the final intensity depends only on the length of the total resultant vector.
At a more advanced university level, one can extend this to partial coherence, random phase fluctuations, continuous source distributions, and Fourier-transform descriptions of diffraction and interference. But the central coherent idea remains simple:
\[
\text{add the complex amplitudes first, then square the magnitude.}
\]
So the key formulas to remember are
\[
S(\psi)=\sum_{k=0}^{N-1} A_k e^{\,i(\phi_k+k\psi)},
\qquad
I(\psi)=|S(\psi)|^2,
\]
which together describe the full coherent superposition of many waves.