4f Fourier-Transform Optical System

Laser, beam expander, object, lens, Fourier-plane filter, lens, camera · Abbe–Porter spatial filtering with real Thorlabs parts

In short: A lens can sort light by how finely detailed a picture is. In this classic "4f" setup a laser shines through a picture, the first lens spreads its fine and coarse details into separate bright spots, a mask in that spot pattern removes the details you don't want, and a second lens puts the picture back together without them. You can erase a wire mesh from a letter, keep only edges, or make invisible glass patterns appear.

© 2026 Fabian Magaña-Sandoval, PhD. All rights reserved.
fabianoptics@gmail.com
Beam profiler at the camera

Try (Abbe–Porter experiments)

Object plane (input)

What the laser illuminates: transmittance × Gaussian beam.

Fourier plane (back focal plane of L1)

5
×2

Each bright spot is one spatial frequency of the object, at u = λ f₁ ν from the centre. Cyan: the filter.

Image plane (camera)

Inverted image, magnification −f₂/f₁. Dashed box: the camera sensor. Auto exposure.

Source, lenses, camera

Alignment

Object

built-in portrait card

Fourier-plane filter

Why a lens does a Fourier transform

Every pattern is a sum of gratings. Any transparency can be written as a sum of sinusoidal gratings of different spacings and directions (its spatial frequencies). A grating with ν lines per mm sends light off at an angle θ ≈ λν.

A lens turns angles into positions. All light leaving at angle θ is focused to one point a distance f₁θ = λ f₁ ν from the axis in the back focal plane. So the back focal plane of lens 1 holds the object's spectrum: coarse detail near the centre, fine detail far out, and the straight-through light (the average, "zero order") in the middle.

The second lens transforms back. Lens 2 adds all the frequencies back together and forms the image. Anything you block in the Fourier plane is missing from the image: that is spatial filtering (Abbe 1873, Porter 1906), the basis of phase contrast, Schlieren imaging and optical image processing.

Detailed abstract

Purpose

The textbook 4f Fourier-optics system (Goodman ch. 5 and 8), built from real catalogue parts: - a laser and a Galilean beam expander; - an object in the front focal plane of lens 1; - a spatial filter in the shared focal plane (the Fourier plane); - lens 2 one focal length beyond the filter; - a camera in its back focal plane.

It teaches what a spatial frequency is, why a lens performs a Fourier transform, and how spatial filtering works. It covers the Abbe–Porter experiments, dark field, Schlieren and Zernike phase contrast.

What it can do

Each filter can be resized, rotated and offset to mimic misalignment. - Defocus: move the object or the camera off its focal plane. - Beam profiler overlaid on the 3D view (bottom right, linked by a leader line to the camera, or to the profiler head when you move it). Slide it anywhere along the beam (slider, snap buttons, or drag the blue head in 3D): before the object, between the object and L1, converging to the Fourier plane, after the filter, or at the camera. Click a map to probe any point (value of |E|, phase and irradiance there) and to move the scan lines. It shows the camera-plane amplitude and phase maps and an x or y scan of power, amplitude and phase. It reports the power on the camera (mW, from the laser power), D4σ diameters, centroid and peak irradiance, like a scanning-slit or camera beam profiler. - Three live panels: object plane, Fourier plane (log scale, adjustable range and zoom, with the filter outline and order labels), and camera image. - Readouts: magnification, Fourier-plane scale, zero-order spot size, first-order position, lens-aperture and filter cut-off frequencies, transmitted power, equivalent defocus. - Twelve presets (Abbe–Porter and phase-imaging classics). - 3D bench with real hardware: posts, post holders, bases and clamping forks, LMR1/M lens mounts, an RSP1/M for the filter mask, an iris. It includes the f–f–f–f dimension marks and a generated parts table.

Limitations

How realistic is it?

The modeling: core physics and how it is handled

Core physics and how it is handled

1. Object field. U₀(x, y) = t(x, y) · exp(−(x² + y²)/w²), where t is the complex transmittance (amplitude and phase) and w = w₀ × expander magnification. - For laser modes, U₀ is the mode itself: HG_mn = H_m(√2x/w)H_n(√2y/w)e^(−r²/w²), and LG_pℓ = (√2r/w)^ℓ L_p^ℓ(2r²/w²) e^(−r²/w²) e^(iℓφ). - For pictures, t is the square root of the image brightness (a film transparency).

Handled: sampled on an N × N grid (N = 512, 25 µm spacing).

2. Lens 1 as a Fourier transformer. With the object in the front focal plane, the field in the back focal plane is

U_F(u, v) ∝ ∬ U₀(x, y) exp[−i 2π (x u + y v)/(λ f₁)] dx dy,

so a spatial frequency ν (lines/mm) lands at u = λ f₁ ν. There is no extra quadratic phase, because the object is exactly one focal length before the lens.

Handled: 2D FFT. The Fourier-plane sample spacing is λ f₁/W.

3. Spatial filter and pupil. U_F is multiplied by the filter's complex transmission: - iris, dot, slit and knife: 0 or 1; - Zernike dot: exp(iπ/2).

Lens 2's clear aperture (Ø22.9 mm) acts as the system pupil.

Handled: point-by-point multiplication in the Fourier plane.

4. Lens 2. A second Fourier transform gives the image U_i(x′, y′) = U_filtered(−x′/M, −y′/M)/M, with M = f₂/f₁: inverted and scaled.

Handled: inverse FFT, then the axes are flipped and rescaled. The camera records |U_i|² with auto exposure.

5. Beam profiler. From the complex camera field U_i: amplitude |U_i|, phase arg U_i, and power |U_i|². - D4σ diameter = 4 × the RMS width (second moment) of |U_i|² about its centroid (ISO 11146). - Power on the camera = laser power × ∑|U_i|² / ∑|illumination|².

Handled: direct sums over the image grid.

6. The beam anywhere along the bench. Free space is angular-spectrum propagation (paraxial transfer function exp(−iπλz(f_x² + f_y²))). Behind a lens, the Fresnel scaling theorem gives U_d(x) = U_Δ(x/M)/M · exp(iπx²/(λ(d − f))), with M = (f − d)/f and Δ = df/(f − d). Near the Fourier plane the field is propagated directly from the Fourier-plane field on its finer grid, and between lens 2 and the camera it is propagated back from the image. Check: a 1 mm Gaussian gives D4σ = 80.6 µm at the Fourier plane (2λf/πw).

7. Defocus. Moving the object by δ_o or the camera by δ_c adds the quadratic phase exp[iπλ δ (f_x² + f_y²)] in the Fourier plane, with δ = δ_o − (f₁/f₂)² δ_c (both displacements positive downstream, toward the camera: moving the object toward L1 pushes the image downstream by (f₂/f₁)² δ_o, so moving the camera downstream by the same amount refocuses).

Handled: exact within the paraxial (Fresnel) approximation.

How the simulation is built

How to recreate it

  1. Build U₀ on a grid, FFT it, and label the samples with u = λ f₁ k/W.
  2. Multiply by the filter mask. Inverse FFT. Flip x and y, scale by f₂/f₁, and take |U|².
  3. Checks: - a 5 lines/mm Ronchi ruling with f₁ = 200 mm at 632.8 nm gives orders at ±0.633 mm; - passing only the ±1 orders doubles the line frequency; - an iris that blocks the mesh orders but passes the letter's low frequencies erases the mesh; - a phase-only object is invisible without a filter and appears with a Zernike dot or a knife edge.

Key parameters

Parameter Value Source
Laser HeNe 632.8 nm, w₀ ≈ 0.4 mm (1/e² radius) catalogue (verify model)
Expander GBE10-A, 10× (beam radius ≈ 4 mm at the object) Thorlabs
Lenses LA1708-A, f = 200 mm (both, default) Thorlabs
Lens clear aperture Ø22.9 mm (SM1RR in LMR1/M) ASSUMED from drawings
Grid 512 × 512, window 12.8 mm (25 µm) design choice
Fourier-plane scale 127 µm per line/mm (HeNe, f₁ = 200 mm) computed
Zero-order spot ≈ 10 µm radius computed (λ f/πw)
Camera Kiralux CS505MU, 8.45 × 7.07 mm sensor, 3.45 µm pixels catalogue (verify)
The shared 3D bench kit (how the table, mounts, beams and parts list are drawn)

What the shared bench engine is

Every interactive page loads three shared files. engine.js is the optics math, kit.js is the three.js scene, stand-in hardware, beam drawing and parts table, and clamps.js places the posts and forks. Units are mm in a table frame (x, y, z up). Each experiment's physics lives in its own model file. The engine only does the optics that a model explicitly asks for.

How beams are traced

  • Chief ray: exact 3D tracing at infinite planes, spheres and cylinders. Refraction uses vector Snell's law and fails on total internal reflection. Mirrors use d' = d − 2(d·N)N. A 'stop' surface only intersects. Air is n = 1.000278 and N-BK7 comes from its Sellmeier formula. Each wavelength gets its own instance via make(λ).
  • Gaussian beam: a general astigmatic beam in Arnaud form. Complex 2 × 2 matrices X and Θ give W = Θ·X⁻¹ = n·Q⁻¹. Free space is X += (L/n)·Θ, the matrix form of the q-parameter (ABCD) law. At a surface, X' = A·X and Θ' = C·X + D·Θ. A and D come from projecting the beam basis onto the surface tangents, and C = −Δ·P₂⁻ᵀ·K·P₁⁻¹ with Δ = n₂(d₂·N) − n₁(d₁·N) and K the curvature tensor. Tilted and cylindrical surfaces therefore produce correct astigmatism. Gouy phase is accumulated per axis.
  • Sampling: samples are taken about every 6 mm and refined wherever the radius changes by more than 12 % between samples. The 1/e² ellipse at each sample comes from Im(W).
  • Splits: there is no automatic splitting. A model clones the beam (cloneB) at a beamsplitter and traces each branch with its own surface list. Surfaces have no apertures, so the model must handle clipping.
  • Extras: Hermite and Laguerre polynomials, and an FFT angular-spectrum propagator for mode-shape pages.

Where readings come from

The kit's photodiode and camera objects are bodies on posts and compute nothing. Photodiode voltages, quadrant read-outs, spectra and noise are all computed in each model file. These calculations are often analytic and use no engine at all, as in the Faraday, EOM and direction-finder pages. Labels are CSS2D text set by the app.

Parts table

Each stand-in part and post stack registers a row: reference, category, part number, description. A stack registers a TR post, a PH40 or PH50 holder (chosen for the beam height), a BE1/M base, and a CF125C/M fork unless the post sits directly on a hole. partsTable() groups and counts identical rows, sorts them by category, and writes the HTML table and the CSV.

Clamps and obstacles

Each fork's M6 screw must land on a 25 mm-grid hole 26.4–49.6 mm from the post. Forks perpendicular to the beam are preferred. A sliding part keeps its hole while that hole still fits, then re-clamps. Forks may not overlap other forks, pedestals or registered footprints ("obstacles"). Conflicts turn red, and a guard stops posts from colliding. All of this is mechanical layout only; it has no optical effect.

Purely visual

  • Beam tubes draw the ellipse samples, optionally magnified, with opacity on a log scale of power.
  • Some pages draw hand-made tube samples instead of traced ones.
  • Meshes are parametric stand-ins, not CAD.

Bench parts (generated from the 3D layout)

Everything drawn in the 3D view. Thorlabs metric part numbers; objects and filter masks are transparencies or custom chrome-on-glass parts (or Edmund Optics Ronchi rulings and test targets).

CSV (select and copy)

References and related literature

  1. J. W. Goodman, Introduction to Fourier Optics, 4th ed. (W. H. Freeman, 2017), ch. 5 (Fourier-transforming properties of lenses) and ch. 8 (spatial filtering, Abbe–Porter, Zernike phase contrast).
  2. E. Hecht, Optics, 5th ed. (Pearson, 2017), ch. 11 (Fourier optics) and §13 (spatial filtering).
  3. A. B. Porter, "On the diffraction theory of microscopic vision," Phil. Mag. 11, 154 (1906).
  4. F. Zernike, "Phase contrast, a new method for the microscopic observation of transparent objects," Physica 9, 686 (1942).
  5. B. E. A. Saleh, M. C. Teich, Fundamentals of Photonics, 3rd ed. (Wiley, 2019), ch. 4 (Fourier optics).
  6. Thorlabs catalogue: HNL050LB HeNe, CPS series modules, GBE Galilean beam expanders, Ø1" N-BK7 plano-convex lenses (LA1608, LA1509, LA1433, LA1708, LA1461, LA1484), LMR1/M, RSP1/M, SM1D12D iris, Kiralux / Zelux cameras.