Start here
This is a laser beam drawn along an optical bench. It is narrowest at its waist ,
spreads out from there, and a lens catches it and squeezes it to a new waist.
Drag the lens along the bench and watch the new waist move and change size. Drag
the yellow ring down to make the input beam narrower (it then spreads faster), or sideways to
move its waist. Click a lens to change its focal length in the panel on the right.
Look for the dashed lines one Rayleigh range either side of each waist, where the
beam is 1.4 times wider: a narrow waist has a short one. The Cavity tab puts the beam
between two mirrors; the Modes tab shows the shapes a beam can have.
1. A beam spreads from its waist, and a lens refocuses it
The picture the page opens with. A red helium–neon laser beam ($\lambda=633$ nm) has its
waist $w_0=200$ µm at $z=0$. Drag the lens and watch the new waist move and change size;
drag the yellow ring down to make the input waist smaller, and the beam spreads faster.
Look for the dashed lines one Rayleigh range away, at $z=\pm z_R=\pm199$ mm, where the beam
is $\sqrt2$ times wider, and the dotted cone it spreads into far away, at the angle
$\theta=\lambda/\pi w_0=1.0$ mrad. At $z=400$ mm the lens of $f=200$ mm catches it, 450 µm
wide and still spreading, and makes a new waist of 142 µm at $z=701$ mm, with $z_R'=100$ mm:
a waist about $1/\sqrt2$ as wide has about half the Rayleigh range, as $z_R\propto w_0^2$.
Ray optics would image the input waist, $2f$ before the lens, $2f$ after it and the same
size; why the beam's waist comes out at 301 mm and 0.71 times as wide is experiment 6.
2. The beam alone: its width and its curved wavefronts
The same beam without the lens, with its wavefronts drawn: arcs of radius $R(z)$, as
measured on the $z$ axis. Type $w_0=100$ µm in the panel. The Rayleigh range falls four
times, to 49.6 mm, and $\theta$ doubles, to 2.01 mrad: a narrower beam spreads faster,
$\theta=\lambda/\pi w_0$, just as light through a narrower slit diffracts more.
Look at the wavefronts: flat at the waist, most curved at $z=\pm z_R$, where $R=2z_R=397$
mm, and flatter again far away, where $R\approx z$: a spherical wave coming from the waist.
Then press Crests to see the wave itself: its crests have the wavefronts'
shape.
3. Focusing: a wider beam makes a smaller spot
A beam 1 mm in radius, nearly parallel ($z_R=5$ m), meets a lens of $f=100$ mm. It focuses
to a waist of 20.1 µm, $f$ beyond the lens, as the estimate for a parallel beam of radius $w$
says:
$$w_0'\approx\frac{\lambda f}{\pi w}.$$
The light there is 2500 times as intense as in the beam before the lens (the picture
overexposes it: lower the brightness, under More , to see its shape). Type
$w_0=2000$ µm: the spot halves, to 10.1 µm. A wider beam converges at a steeper angle, and
the angle sets the spot, $w_0'\theta'=\lambda/\pi$. The focus is short, too: its length
$2z_R'=4.0$ mm is the depth of focus . (Spots near a micrometre need more than
paraxial optics: $\theta$ is no longer small.)
4. The Gouy phase: through a focus the crests run ahead
Zoomed in on a focus ($\pm4z_R$), showing the crests. The white ticks along the edges are
the crests of a plane wave of the same (drawn) wavelength, in step with the beam's crests at
the left edge. Follow the crests along the axis: through the focus they pull ahead of the
ticks, and by the right edge they are 0.42 of a wavelength ahead. From far before a focus
to far after it the beam gains half a wavelength, a phase of $\pi$: the Gouy phase ,
the extra phase a beam picks up through a focus compared with a plane wave,
$$\psi(z)=\arctan\frac{z}{z_R},$$
drawn in the strip under the bench (on the axis the field is $e^{i(kz-\psi)}$). It changes
fastest at the waist, $d\psi/dz=2/kw^2$: squeezing light into a width $w$ costs it some of
its wavenumber along the axis, so near a focus the crests travel faster than $c$. (In
Phase the colour is the phase compared with a plane wave: on the axis it turns from
red to cyan through the focus.)
5. A telescope makes the beam wider, and it spreads less
Two lenses $f_1+f_2$ apart, here 50 and 200 mm (a Keplerian telescope): the beam comes out
parallel and $f_2/f_1=4$ times wider, 2 mm, and spreading 4 times less (101 µrad instead of
403: see the table). A wider beam stays narrow for longer, which is why a beam is expanded
before it is sent far. The Gouy strip climbs by $\pi$ through the focus between the
lenses. Now make a Galilean telescope: click lens 1, make it diverging ($-50$ mm), and put
lens 2 at $z=200$ mm, $f_2-|f_1|$ behind it. The same magnification, no focus inside, and
no $\pi$.
6. Where a lens puts the waist: the Gaussian lens law
A waist of 100 µm ($z_R=49.6$ mm) sits $s=100$ mm before a lens of $f=50$ mm. Ray optics,
$1/s+1/s'=1/f$, would image it 100 mm after the lens, the same size. The beam's new waist
is only 75.2 mm after the lens, and 71.0 µm wide. The plot in the panel shows where the
lens puts the waist ($s'$) against where it was ($s$), in units of $f$: rays dashed, the
beam solid, following Self's law
$$\frac{1}{s+z_R^2/(s-f)}+\frac{1}{s'}=\frac1f.$$
Drag the lens. Far from $s=f$ (compared with $z_R$) the two agree. Near $s=f$ the rays go
off to infinity, but the waist only reaches $s'=f+f^2/2z_R$, at $s=f+z_R$: you are close to
that point now. Make $w_0$ small (so $z_R\ll f$) and the two curves merge: a waist that
small acts like a point source.
7. A slab of glass moves the focus back
A beam focused by a lens of 150 mm passes through 40 mm of glass ($n=1.5$). Inside, the
crests are $n$ times closer together and the beam converges more slowly. The focus moves
back by $t(1-1/n)=13.3$ mm, to 162.3 mm (remove the slab: 149.0 mm). In the ABCD law glass
of thickness $t$ counts as a distance $t/n$ of air.
8. The stability diagram: which pairs of mirrors hold a beam
Two mirrors, $R_1=1$ m and $R_2=500$ mm, $L=250$ mm apart. Each is described by one
number, $g=1-L/R$ (its stability number ), here 0.75 and 0.5, and the cavity has a
Gaussian mode (and keeps rays near its axis) only if
$$0\le g_1g_2\le1,$$
the shaded region between the axes and the hyperbola $g_1g_2=1$. The mode's wavefronts fit
the mirrors exactly (the arcs in the picture), and its waist, 221 µm, is 62.5 mm from
mirror 1: nearer the flatter mirror. Drag the point: the mirrors change and the mode with
them; outside the shaded region there is none. Drag mirror 2 in the picture (or use the
$L$ slider): the point moves along the dashed line through $(1,1)$. Landmarks: two flat
mirrors (planar, $g=1$), $R=L$ (confocal), $R=L/2$ (concentric), and one flat with $R=L$
(hemispherical), all on the edge of stability.
9. The resonant frequencies, and why TEM₀₀ is not on the comb
Light resonates in a cavity when a round trip brings it back in step with itself. For a
plane wave between flat mirrors that means $2L=q\lambda$: a comb of frequencies $q\,c/2L$,
the grey lines, $c/2L=600$ MHz apart (the free spectral range ) for $L=250$ mm. A
Gaussian mode also gains its Gouy phase, $(N+1)\psi_1$ each way for a mode of order $N$ ($N=m+n$
for $\mathrm{HG}_{mn}$), so it resonates at
$$\nu=\frac{c}{2L}\left(q+(N+1)\frac{\psi_1}{\pi}\right),\qquad\cos\psi_1=\pm\sqrt{g_1g_2},$$
with the sign of $g_1$ and $g_2$. Here $R_1=R_2=1$ m, so $g=0.75$ and
$\psi_1=\arccos0.75=0.230\pi$: the fundamental mode, $\mathrm{TEM}_{00}$ (the plain Gaussian
beam, with no dark lines), sits 0.230 of the way from one grey line to the next, and each
higher order a further 0.230 (138 MHz), wrapping round into the next free spectral range.
The $N+1$ modes of order $N$ resonate together. The plot shows two free spectral ranges;
$q$ itself is huge, $q_0=789\,889$ at its left edge, for light at $c/\lambda=474$ THz.
Make both mirrors 500 mm: $\psi_1=\pi/3$, and every third order lands on the
$\mathrm{TEM}_{00}$ lines ($3\psi_1=\pi$). Drag the point towards the planar corner: the
orders crowd onto the comb, as the Gouy phase of a nearly flat cavity is small.
10. Rays stay in a stable cavity and leave an unstable one
Three rays bounce between mirrors of $R=400$ mm, 250 mm apart. They stay near the axis
for ever. The plot at the bottom right marks where each ray hits mirror 1, round trip after
round trip: the hits lie on an ellipse, and go round it by the round-trip Gouy phase
$2\psi_1=0.755\pi$ each time. Press Unstable ($R=100$ mm, $g=-1.5$): the rays walk
off within 2 round trips. Then try $R_1=R_2=500$ mm ($g_1g_2=1/4$, $2\psi_1=2\pi/3$): every
ray comes back to where it started after 3 round trips.
11. The confocal cavity and its degenerate modes
Here $R_1=R_2=L=250$ mm, so $g_1=g_2=0$ and $\psi_1=\pi/2$: every even order lands on the
lines of the lowest mode, and every odd order half way between. The spectrum repeats every
300 MHz, half the free spectral range $c/2L=600$ MHz, and any ray comes back after two round
trips. Make both mirrors 280 mm: the orders split apart. Then $R_1=260$ and $R_2=240$ mm:
unstable. The confocal cavity sits where the stable region pinches to a point, so it stays
stable only if both mirrors err the same way. (Changing one mirror alone keeps the other's
$g=0$, on the edge.)
12. A cavity unfolded: a row of lenses
Light bouncing between two mirrors of radius $R$ is light going through a row of lenses of
focal length $R/2$, one every $L$. Here $R=200$ mm, $L=150$ mm, and the beam sent in is
that cavity's own mode, $w_0=139.7$ µm: after every lens it comes back to the same waist,
the self-consistency that defines the mode. The Gouy strip climbs evenly, by
$\psi_1=\arccos(1-L/R)=0.42\pi$ per lens. Type $w_0=300$ µm: the beam no longer repeats, it
breathes, but stays bounded, because the cavity is stable. Drag one lens along the bench
and watch the disturbance travel on down the row.
13. Mode matching: steering a beam into a cavity
A cavity ($R_1=R_2=300$ mm, $L=200$ mm, also set in the Cavity view) is placed on the bench,
its mode dashed in yellow. Only the part of the beam shaped like that mode gets in: $\eta$ is
the fraction of the power coupled into it,
$$\eta=\frac{4\,\mathrm{Im}\,q_1\,\mathrm{Im}\,q_2}{|q_1-q_2^*|^2},$$
100% only when the beam's waist has the mode's size and position. Now $\eta$ is 69%. Move
the lens: with $f=200$ mm the best is 92% (near $z=362$ mm). Change $f$ too, and you can
reach 100% (near $f=254$ mm at $z=324$ mm). This is how a beam is coupled into a cavity
or an optical fibre. (The input mirror is taken to be thin, with no lens effect of its
own.)
14. Hermite–Gauss modes keep their shape, and run ahead faster
A Hermite–Gauss mode $\mathrm{HG}_{mn}$ is a beam with $m$ dark lines across the
$x$ axis and $n$ across the $y$ axis; here $\mathrm{HG}_{21}$. Every $\mathrm{HG}_{mn}$ keeps
its shape as it travels: the cross-section is drawn in a square that grows with $w(z)$, and
only the colours (the phase) change. Its Gouy phase is $(m+n+1)\psi$, here $4\arctan(z/z_R)$:
in the side view its crests pull ahead of the plane-wave ticks four times as much as the
fundamental's would (click $\mathrm{HG}_{00}$ to compare). This is why modes of different
order resonate at different frequencies in a cavity. In the frame that grows with $w(z)$,
the paraxial wave equation is the Schrödinger equation of a 2D harmonic oscillator, with
$\psi$ for $\omega t$: these modes are its eigenstates, and $(N+1)\psi$ is the phase
$E_Nt/\hbar$ of the level $E_N=(N+1)\hbar\omega$.
15. The Laguerre–Gauss donut and its vortex
A Laguerre–Gauss mode $\mathrm{LG}_{pl}$ is round, with $p$ dark rings and a phase
that winds $l$ times round the axis. $\mathrm{LG}_{01}$: a ring of light with a dark centre.
Its phase turns once round the axis ($l=1$), so all colours meet at the centre, where the
field must vanish: an optical vortex. Away from the waist the curved wavefront adds a
phase growing as $r^2$, and the colours wind into a spiral (press Travel ). Try
$l=3$. Such a beam carries an orbital angular momentum $l\hbar$ per photon. Then choose
$\mathrm{HG}_{10}+e^{i\varphi}\mathrm{HG}_{01}$ with $\varphi=\pi/2$: the same donut, made of
two modes with lobes (both of order 1, so they keep in step). With $\varphi=0$ it is
$\mathrm{HG}_{10}$ turned by 45°; in between, a ring of uneven brightness.
16. Check it by computing
The modes here come from formulas. To check one, Propagate by FFT takes the mode
at its waist on a 256 × 256 grid and sends it a distance $z$ numerically, with the angular
spectrum method of the Diffraction demo (each plane wave in the field advanced by its own
phase), using the exact $k_z=\sqrt{k^2-k_x^2-k_y^2}$ rather than the paraxial approximation,
with $w_0=20\lambda$. The computed beam is drawn instead of the formula. For
$\mathrm{HG}_{31}$ at $1.5z_R$ it differs from the formula by 0.1% of its peak, and its Gouy
phase comes out as $5\arctan1.5=1.564\pi$. Move $z$ or change the mode.
How it works
A laser beam is a wave that stays narrow: a Gaussian beam . Its radius $w(z)$, where
the intensity has fallen to $1/e^2$ (13.5%) of its value on the axis, is smallest at the
waist $w_0$, and $\sqrt2$ times that one Rayleigh range $z_R=\pi w_0^2/\lambda$
away. Far beyond, the beam spreads in a cone of half-angle $\theta=\lambda/\pi w_0$. With $z$
measured from the waist,
$$w(z)=w_0\sqrt{1+z^2/z_R^2},\qquad R(z)=z\left(1+z_R^2/z^2\right),$$
where $R$ is the radius of curvature of the wavefronts. All of this is held in one complex
number, the beam parameter $q=z+iz_R$, or
$$\frac1q=\frac1R-i\frac{\lambda}{\pi w^2}.$$
A lens, a mirror, a slab of glass or a stretch of empty space changes $q$ by the ABCD law
$q'=(Aq+B)/(Cq+D)$, with the elements $A,B,C,D$ of its ray-transfer matrix, the same as for
rays ($B=d$ for a distance $d$, $C=-1/f$ for a lens).
Three views: the Bench , a beam through lenses, mirrors and glass; the Cavity ,
two mirrors that trap light; and the Modes , the beams that keep their shape.
Everything is paraxial (small angles: $w_0\gg\lambda$), and lenses and mirrors are thin.
Using the bench. Drag a lens along the bench. Drag the yellow ring on the input
waist sideways to move the waist, or up and down to make it wider or narrower. Click a lens
to change its focal length in the panel; + Lens adds one in the middle of the view,
and ✕ takes one off. Drag the background to pan, scroll or pinch to zoom, and press
Show all to see everything again. Point at the beam to read $w$, $R$ and the Gouy
phase $\psi$ at that $z$; the table under the picture lists every waist. A mirror on the
bench is unfolded : the reflected beam is drawn carrying on to the right, as if the
mirror were a lens of focal length $R/2$.
How it is drawn. A beam a millimetre wide and a metre long would be a line, so the
picture is stretched sideways, by the factor in its corner: the bench is in mm, the width in
µm. The white lines are the edges $\pm w(z)$, the dashed ones mark $z_R$ either side of each
waist, and the dotted ones the cone $\pm\theta$. In Intensity the brightness grows
as $\sqrt I$, so that a focus doesn't hide the rest. In Crests the crests are drawn
$\lambda E^2$ apart for a stretch $E$, centimetres rather than 633 nm: a paraxial beam
stretched $E$ times sideways is a beam of wavelength $\lambda E^2$, with the same $z_R$, $R(z)$
and Gouy phase, so the crests drawn this way have their true shape.
The cavity. Between two mirrors $L$ apart, of radii $R_1$ and $R_2$, the mode is the
beam whose wavefronts fit both mirrors; it exists when $0\le g_1g_2\le1$ with $g=1-L/R$. The
stability diagram is the $(g_1,g_2)$ plane. The spectrum shows the frequencies the cavity
resonates at (experiment 9), and the bottom-right plot where three rays hit mirror 1,
position against angle, round trip after round trip: in a stable cavity each round trip is a
rotation by $2\psi_1$, so the hits stay on an ellipse.
New in 2026 for BrainFlux. Source:
github.com/gallicchio/brainflux , MIT licence.