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.
What the laser illuminates: transmittance × Gaussian beam.
Each bright spot is one spatial frequency of the object, at u = λ f₁ ν from the centre. Cyan: the filter.
Inverted image, magnification −f₂/f₁. Dashed box: the camera sensor. Auto exposure.
Alignment
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.
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.
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.
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.
src/ff_model.js: catalogue; radix-2 FFT; object and filter functions; the 4f run (object → FFT → filter, pupil, defocus → inverse FFT → inverted image); order positions. Pure functions; runs in Node.src/ff_app.js: 3D bench through the shared real-hardware kit; the three image panels (log Fourier plane with filter outline); controls, presets and readouts.src/ff_shell.html + src/build.py: page; python build.py inlines the kit, model and app into fourier_4f.html.| 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) |
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.
make(λ).cloneB) at a beamsplitter and traces each branch with its own surface list. Surfaces have no apertures, so the model must handle clipping.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.
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.
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.
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).