4f scan systems and pupil relays

Why a laser-scanning microscope needs two lenses between its scan mirror and objective.

To build these designs as you read, play this lesson in RayCrafter: Help ▸ Optics tutorials. All lessons

A laser-scanning microscope moves a focused spot over a specimen by tilting a laser beam with a scan mirror. The objective turns the beam's angle into a position: a tilted beam focuses to one side. But the beam must also still enter the objective, through the opening at its back, the back aperture. In this lesson you will:

The scan mirror stands at the source plane, where a beam 3 mm wide leaves it straight ahead (green), and tilted by 5° up (red) or down (blue). Every lens is ideal.

Step 1. Straight at the objective

2026-11-30T00:35:33.371756 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 50 100 150 200 250 300 350 z (mm) −30 −20 −10 0 10 20 30 y (mm) image

An objective of focal length 20 mm stands about 300 mm from the scanner, with its 13 mm back aperture one focal length in front of it.

The straight beam goes in. The tilted beams do not: over 300 mm, a tilt of 5° carries a beam 26.2 mm from the axis, far outside the opening. 0% of the red beam gets through.

2026-11-30T00:35:33.392930 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ −30 −20 −10 0 10 20 30 x (mm) −30 −20 −10 0 10 20 30 y (mm) Aperture Ø13 mm
The beams on the back aperture: only the straight one enters

Moving the scanner right up to the objective would help, but there is no room for it, and a second mirror, to scan in the other direction, could not be in the same place. We need to move an image of the scanner to the back aperture instead.

Step 2. The scan lens

2026-11-30T00:35:33.418206 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 40 60 80 100 120 140 z (mm) −30 −20 −10 0 10 20 30 y (mm) image

Take the objective away. A lens of 50 mm, the scan lens, stands one focal length behind the scanner, and the image plane one focal length behind the lens.

The three beams were turning about the scanner, the lens's front focal point. Behind the lens, their central rays therefore run parallel to the axis, and each beam comes to a focus. The tilted ones focus 4.37 mm from the axis: f × tan 5°. The angle of the mirror has become the position of a spot.

2026-11-30T00:35:33.437135 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ −4 −2 0 2 4 x (mm) −4 −2 0 2 4 y (mm) 0°: 0.00 mm 5°: 4.37 mm -5°: 4.37 mm
The image plane seen face-on: where each beam focuses

In RayCrafter

Step 3. The tube lens

2026-11-30T00:35:33.455757 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0 100 200 300 400 500 z (mm) −30 −20 −10 0 10 20 30 y (mm) image

A second lens, of 200 mm, the tube lens, stands one focal length behind those foci. Each spot becomes a parallel beam again.

The two lenses are spaced by f₁ + f₂, with the scanner at f₁ in front and the outgoing pupil at f₂ behind: four focal lengths in all, hence the name 4f. At that last plane:

This plane is an image of the scanner: the two are conjugate planes. The scanner's tilt happens there too, only smaller, and spread over a wider beam. Width times angle is the same before and after. You cannot have both a wide beam and a large angle.

In RayCrafter

Step 4. The objective at the pupil

2026-11-30T00:35:33.474367 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0 100 200 300 400 500 600 z (mm) −30 −20 −10 0 10 20 30 y (mm) image

The objective is back, with its back aperture at the image of the scanner.

Now 100% of the red beam gets in, at every angle: the beam turns about the middle of the opening and does not move across it. The tube lens made the beam 12 mm wide, so it nearly fills the 13 mm aperture, and the focus is as small as this objective can make it.

2026-11-30T00:35:33.492700 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ −6 −4 −2 0 2 4 6 x (mm) −6 −4 −2 0 2 4 6 y (mm) Aperture Ø13 mm
All three beams on the back aperture, on top of each other

The spot lands 0.437 mm from the axis: 20 mm × tan 1.25°. And because the back aperture is in the objective's back focal plane, the central ray of the beam leaves the objective parallel to the axis, at 0.0°. The system is telecentric at the specimen: if the specimen moves a little out of focus, the spot blurs but does not shift sideways, and every part of the field is lit the same way.

Step 5. The objective in the wrong place

2026-11-30T00:35:33.515240 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0 100 200 300 400 500 600 700 z (mm) −30 −20 −10 0 10 20 30 y (mm) image

Here the objective and its aperture are 100 mm too far from the tube lens.

The beam now walks across the back aperture as the mirror turns, by 2.19 mm at 5°. Only 84% of the red beam enters, so the picture would be darker towards its edges (vignetting), and the beam that does enter is no longer centred. The central ray also meets the specimen at 6.2° to the axis, so moving the focus shifts the picture sideways.

2026-11-30T00:35:33.537541 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ −7.5 −5.0 −2.5 0.0 2.5 5.0 7.5 x (mm) −7.5 −5.0 −2.5 0.0 2.5 5.0 7.5 y (mm) Aperture Ø13 mm
The beams on the back aperture, moved apart
4. The objective at the pupil 2026-11-30T00:35:33.563281 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ −4 −2 0 2 4 scan angle (deg) −2 −1 0 1 2 beam centre (mm) y x
5. The objective in the wrong place 2026-11-30T00:35:33.573232 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ −4 −2 0 2 4 scan angle (deg) −2 −1 0 1 2 beam centre (mm) y x
How far the beam moves as the mirror turns: in place, then out of place
4. The objective at the pupil 2026-11-30T00:35:33.598532 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0 100 200 300 400 500 600 700 z (mm) −30 −20 −10 0 10 20 30 y (mm) image
5. The objective in the wrong place 2026-11-30T00:35:33.610251 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 0 100 200 300 400 500 600 700 z (mm) −30 −20 −10 0 10 20 30 y (mm) image
In place, then out of place

So the rule of every scanning system: image the scanner onto the back aperture. With two scan mirrors, often a second relay images one onto the other.

In RayCrafter