Lens
A lens is any number of refracting surfaces in real glass: a singlet, a cemented doublet or triplet, an asphere, a diffractive lens, a graded-index (GRIN) lens, a cylindrical lens or an axicon. Rays are traced through each surface exactly, and a beam takes the phase the real surfaces give it.
The model
Prescription
A lens of \(N\) surfaces has \(N - 1\) gaps (the centre thicknesses between surfaces) and \(N - 1\) materials, one for each gap. Each surface has:
- a radius \(R\) (blank for flat);
- a conic constant \(k\);
- aspheric coefficients \(A_j\) on \(y^4, y^6, \ldots\);
- odd coefficients;
- a coating.
Its sag is the general surface of Concepts:
\[\mathrm{sag}(y) = \frac{c\,y^2}{1 + \sqrt{1 - (1+k)\,c^2 y^2}} + a_2 y^2 + \sum_{j \ge 1} A_j\, y^{2j+2} + \sum_{j \ge 1} \alpha_j\, \vert y\vert ^{j}, \qquad c = 1/R.\]Signs follow the usual optical convention along the lens’s axis: \(R > 0\) has its centre of curvature downstream. A biconvex lens is \(R_1 > 0,\ R_2 < 0\). Light travelling along the lens’s angle meets surface 1 first.
The presets build on this:
- Asphere: a conic surface with \(k \ne 0\).
- Diffractive lens: a lens whose faces may carry a phase, \(\phi = c_1\rho^2 + c_2\rho^4 + \dots\) radians, in one order of diffraction: it adds \(m\lambda\phi/2\pi\) of path and bends rays by the phase’s slope, with a power \(-m\lambda c_1/\pi\) that grows with the wavelength. See Optics designer › Diffractive surfaces.
- Graded (GRIN) lens: a lens whose glass may grade from its axis, \(n(r) = n + g_2r^2 + g_4r^4 + g_6r^6\); rays in it curve, traced step by step. A GRIN rod lens, a quarter of its pitch long, focuses a collimated beam on its back face. See Optics designer › Graded glass.
- Axicon: a flat surface with a first odd term \(\alpha_1 = \tan\beta\), a cone of half-angle \(\beta\).
- Cylindrical lens: a lens with power in only one direction, either in the bench plane or out of it. Power out of the plane is flat to the rays, which stay in the plane, but rides along for the beam, the field and cavity matrices.
Refraction
At each surface rays refract by Snell’s law at the exact point and normal, with the index of the glass either side at the ray’s own wavelength (see Free-space optics):
\[n^2(\lambda) - 1 = \sum_{i=1}^{3} \frac{B_i\,\lambda^2}{\lambda^2 - C_i}.\]So chromatic aberration, spherical aberration and the rest come out of the trace rather than being added. Each surface reflects by its Fresnel coefficients or its coating, and the reflection becomes a branch of its own when weak reflections are followed. Light that reaches a surface beyond the critical angle is totally internally reflected.
The lens’s edges are faces too. A ray that leaves through its rim, outside the clear aperture, is stopped there.
Paraxial readouts
The panel gives the effective and back focal lengths at the wavelengths whose light reaches the lens (a lens nothing reaches says so, and gives them at the bench’s wavelengths), from a paraxial trace of a ray at unit height. At each surface,
\[n_2 u_2 = n_1 u_1 - (n_2 - n_1)\,c\,y, \qquad y \leftarrow y + t\,u_2,\]so that after the last surface
\[\mathrm{EFL} = -\frac{1}{u}, \qquad \mathrm{BFL} = -\frac{y}{u}.\]These are read-outs only. The trace itself is exact.
Beams and the field
A Gaussian beam goes through each surface by the ray-transfer matrix of its local curvature, in the plane and out of it. The diffracted field takes each surface as a phase screen: rays traced through it in three dimensions give the real surface’s phase, aberrations included (see Free-space optics: surfaces as phase screens).
Fresnel lenses
A curved surface can be a Fresnel face: give it Fresnel rings (mm), the pitch, and its curve is cut into rings that wide. Each ring keeps the slope of the whole surface where it is but is brought back to the surface’s vertex plane, with a sheer wall (a riser) between one ring and the next:
\[\mathrm{sag}_F(r) = \mathrm{sag}(r) - \mathrm{sag}(k\,p), \qquad k = \lfloor r / p \rfloor,\]the sawtooth of a moulded Fresnel lens. Since each ring bends light by its slope, as the solid surface does there, a Fresnel lens focuses as the lens it is cut from, but its glass need be no thicker than the tallest ring: a plano-convex N-BK7 lens of R 40 mm, 70 mm across, collimates a point lamp 87 mm away as well 3 mm thick with 4 mm rings as 8 mm thick solid. Light meeting a riser is lost to the beam, as it is scattered on a real one (a fraction of a percent here; more with fine rings or steep ones). Either surface or both can be Fresnel; a flat surface stays flat. The bench draws the rings, and the 3D view shows them.
Holes, stacked surfaces and mirror coatings
Each surface has a clear radius (how far out from the axis it reaches: the lens’s own radius unless set smaller) and a hole radius (inside it the surface is not there; set in the Optics designer, and shown on the bench panel when there is one, a hole being smaller than the surface’s clear radius), and its coating can be a mirror: ideal (everything back), or aluminium, silver or gold with the metal’s reflectance at each wavelength, the rest absorbed; a dielectric high reflector is a band coating of 99.9 %. Light meeting a mirror coating reflects wholly and stays in the glass it came from; a surface in a lens’s middle with a mirror coat is a secondary ground into it.
A surface given a thickness of 0 is stacked on the one before it: the two share a vertex and make one face, each applying between its hole and its clear radius, with a step where they meet. So a face can be a flat with a hole and a mirror-coated spot stacked in the hole, or a concave mirror coat with a hole and a plain flat stacked in the middle: a Mangin mirror is a lens whose back is mirror coated; a solid telescope is a block with the first face in front and the second behind, 40 mm of glass between. A flat ground into the middle of an ordinary lens is a flat surface stacked in a hole in its curved face. The Optics designer follows the light through such a lens surface by surface, and can stack a surface on any face. A bench saved before surfaces had holes and stacks (a face Mirrored whole, as a spot or as an annulus, or with a Centre shape) opens as the surfaces that stood for, stacked.
A Gaussian beam meeting such a face is split into its rings, one branch for each: the beam’s field cut to the ring (an opening outside, an obscuring disc inside) and the ring’s own surface met wherever the beam’s centre crosses the face, so the field goes through each ring as the light there does. In a solid telescope the spot on the front sends the middle of the beam back, the ring round it goes in, off the primary and the spot, and out through the window to its focus; the diffracted field in 2D and 3D shows each, and a ring with no surface (a hole) passes its share on unbent.
Where two stacked surfaces both reach a height, the one with the smaller clear radius is the surface there: the piece set into the other. So a mirror spot reaches its own rim whatever the hole in the face under it. Where both reach as far (a window with no clear radius of its own, in a primary mirror’s hole), the one with the narrower ring is: the window is a window only out to the hole. Where two stacked surfaces have the same clear radius and the same hole, they are layers: both are there, and light meets them one after the other in the order it comes to them, each with the glass you give between them on its two sides. So a coating can be its own layer over a face (a partly reflecting layer reflects its share; a bare face over a mirror coat reflects its Fresnel share of light coming from behind, and lets the rest through to the mirror), and a layer with the same glass on both sides changes nothing. Light reflected by a layer goes back through the layers it came through. The bench’s rays, the drawings, the diffracted field and the Optics designer all take a stacked surface this way.
Settings
| Field | Default | Meaning |
|---|---|---|
diameter | 25.4 | mm. |
surfaces | two flat surfaces | list of surfaces in the order the light meets them at angle 0, each {"R": mm or null for flat, "k": conic, "A": [aspheric a4, a6, …], "coat": coating ({"mode": "bare" | "ar" | "custom" | "band" | "stack" | "mirror"}; a mirror coating reflects all it can and passes nothing, "metal": "ideal" | "Al" | "Ag" | "Au" for its reflectance), "semi": optional clear radius, mm (the lens’s own unless given), "hole": optional, mm: a hole about the axis where there is no surface, so the light meets the next surface stacked on this one, or goes on, "fresnel": optional, mm: a Fresnel face, its curve cut into rings this wide, each keeping the face’s slope where it is but brought back to its vertex plane with a sheer riser between rings (light meeting a riser is lost, as on a real one), so the lens can be far thinner (a flat face stays flat)}. A gap of 0 stacks the next surface on this one at the same vertex: each then applies between its hole and its clear radius (a spot mirror in a hole, a flat ground into a face’s middle, a mirrored annulus round a clear centre). Standard sign convention: R > 0 has its centre of curvature on the far side (downstream). |
gaps | [3] | mm: centre thicknesses between successive surfaces (one fewer than surfaces); 0 stacks the next surface on this one (the two share a vertex, each applying between its hole and its clear radius). |
materials | [{"glass":"N-BK7"}] | one material per gap, e.g. {"glass": "N-BK7"}. |
cyl | none | optional: "plane" for a cylindrical lens with power in the bench plane, "out" for power out of it. |
design | none | optional: nm, the wavelength the lens was designed for (an imported lens file’s primary wavelength); for the reader only, it changes nothing in the trace. |
mount | none | optional, a made-to-order RF lens only: {"kind": "flange", "width": mm out from the rim, "thick": mm along the axis, "holes": bolt holes (0 to 12), "hole": their diameter, mm}, on the circle through the flange’s middle. Outside the lens: not traced. |
zoned | none | optional, a made-to-order RF lens of two faces only: {"ghz": its zone frequency} to have it cut in zones, whole layers a wave of path deep at that frequency taken out of its curved face where it is thick. The bench traces it as cut (a ray meeting a step’s wall is lost); the RF designer, its weight and its quote take it as cut too. |
make | none | optional: what the lens is made to, for its drawing and Make the part (each value optional; one not given follows the lens designer’s tolerance settings, else a commercial grade): {"qty": quantity ordered, "diaTol": mm, the diameter’s tolerance (+0/−diaTol), "ctTol": ± mm on each centre thickness, "cent": centring 4/, arcminutes, "faces": one per surface, each {"finish": "polished" | "ground", "form": fringes of power and "irr": fringes of irregularity at 632.8 nm (3/form(irr)), "sd": scratch-dig to MIL-PRF-13830B as "60-40", "chamfer": mm, the widest protective chamfer at 45°}}. |
asphere | none | true for an asphere: only an asphere’s surfaces take a conic ("k"), aspheric terms ("A") and freeform terms ("F": {"mn": c_mn} for c_mn x^m y^n added to the sag, x up out of the bench plane and y across it; m even; "20", "02", "21", "03", "40", "22", "04", "41", "23", "05", "60", "42", "24", "06"); a plain lens’s are spheres. |
diffractive | none | true for a diffractive lens: its surfaces may take phase terms ("ph": [c1, c2, c3, c4], radians, the phase c1 ρ² + c2 ρ⁴ + c3 ρ⁶ + c4 ρ⁸ with ρ the height on the face in mm), in the order of diffraction "diffOrder" (1 unless given); all the light is taken to go into that order. Its power there is -diffOrder λ c1 / π. |
diffOrder | none | optional: a diffractive lens’s order of diffraction, a whole number (1 unless given). |
graded | none | true for a graded-index lens (a GRIN rod lens): each of its glasses may grade from its axis, "grad": [g2, g4, g6] in its material, the index n(r) = n + g2 r² + g4 r⁴ + g6 r⁶ with r in mm (n the glass’s own); rays in it curve. A rod whose index falls as n0 (1 - A r²/2) has g2 = -n0 A / 2 and a pitch 2π/√A. |
From the tool's own tables, file format version 1: the names are those in a .jekray file.
Each surface in surfaces takes R (mm, or null for flat), k, A (a list of aspheric coefficients from \(y^4\)), odd, semi (its clear radius, mm; the lens’s own when left out), hole (its hole radius, mm; 0 for none) and coat ({"mode": "mirror", "metal": "Al"} for a mirror coat: ideal, Al, Ag or Au). A gap of 0 in gaps stacks the next surface on the one before. A material is a glass from the catalogue, such as {"glass": "N-BK7"}, a fixed index, {"glass": "custom", "n": 1.52}, or a table of \(n\) and \(k\) against wavelength.
Importing a catalogue lens
File › Import an element (.zmx)… reads the Zemax files Thorlabs, Edmund and other makers publish into a lens on the bench, with its surfaces and glasses: singlets, achromats and triplets, even aspheres with their conic and polynomial terms, cylindrical lenses (a toroidal surface with no curvature the other way), windows and beam splitter cubes. A .zar archive is read too: the .zmx inside it is taken, and the glass catalogue the archive carries supplies the dispersion of any glass the tool does not know. The file’s primary wavelength is kept as the lens’s design wavelength. Where the part number names a standard coating (Thorlabs’ -A, -B and -C AR bands), or the file names one (Edmund’s EO_VIS0, VIS-NIR, NIR I and II, SWIR, UV-AR and MgF₂ codes), the surfaces are given its band. A moulded asphere’s file often ends with the laser diode’s cover glass; that window is left out, and the note says so.
The glasses are the makers’ own: Schott, Ohara, Hoya, CDGM and Sumita catalogues, some 1,200 glasses by their catalogue formulas, plus the crystals and the optical plastics (PMMA, polycarbonate, Zeonex E48R, polystyrene) and Schott’s B 270, Borofloat and Zerodur. Names are read as the files spell them (N-BK7, NBK7, N-BK7_SCHOTT, H-K9L, S-LAH64, M-TAF1, K-VC89), and the moulded glasses of Thorlabs’ aspheres (D-ZK3M, D-ZLAF52LAM, H-LAK54M) carry their moulded index. Under Material, Search the glass catalogues… finds any of them by name.
When the import has to assume something (a coating from the part number, a fold it cannot follow, a glass it does not know), the part’s panel opens with a red note listing each assumption, and the part carries a ringed red ! on the bench. Dismiss clears the notes once you have checked them. A glass with no index stays flagged until you choose it under Material.
Exporting a lens
File › Export an element (.zmx) writes the lenses you have selected as a sequential .zmx prescription, which lens-design programs open. It needs a free account. It holds:
- every face’s radius, conic and aspheric terms (even or odd), its glass and its semi-diameter;
- the wavelengths of the bench’s sources, the first as the primary;
- an object at infinity, the stop on the first face, and the image at the paraxial back focus at the primary wavelength.
Several lenses and windows on one axis are written as one system, with the air between them. The faces are written in the order the light meets them, going away from a source on the axis; with no source there, the way most of the parts face. A lens turned round is written with its faces reversed. A single mirror can be exported too.
A catalogue glass is written by its catalogue name. Any other material, such as a fixed index, a measured table or an RF dielectric, is written as a model glass, by its index and Abbe number at the d line. A lens designer may want to replace those with the real glass.
Coatings, tilts and decentres are not written. Cylindrical lenses, lenses that are not on one axis, and other parts are refused, with the reason. An assembly that folds or has a part tilted or decentred is exported from its panel with coordinate breaks: see Optics designer.
The .zmx format is plain text. Reading or writing it needs no licence. Zemax and OpticStudio are trademarks of Ansys, Inc. JEKray is not affiliated with or endorsed by Ansys.
Assumptions
- Every surface is a figure of revolution about the lens’s axis, which lies in the bench plane: no decentred or tilted surfaces within one lens. Tilt or move the whole lens instead.
- A catalogue glass is described by its maker’s dispersion formula (Sellmeier, or Hoya’s and Sumita’s polynomial). A glass the tool does not know takes its formula from the catalogue in a .zar archive, or else the \(n_d\) and \(V_d\) the file gives for it. With none of those, it falls back to \(n = 1.5\), and the import report and the lens’s panel both say so: choose the glass, or its equivalent, under Material.
- Non-sequential files (prisms and some mirrors are published that way) are not read: they fold the light in ways a sequential prescription cannot hold. Build the prism from the prism part instead.
- No thermal effects, stress birefringence or surface errors.
Related
- Mirror, for reflecting surfaces.
- Free-space optics: coatings, for AR coatings and thin-film stacks on lens surfaces.