Manual

How to use AperiOptic's design tool: the surface table, sources, detectors and analysis, the optimizer, .zmx import, design files and the sample systems.

1. Getting started

The design page has four areas: the top bar (trace, settings, save, load, samples, this manual), the 3D view of the system and its rays, the panel on the right (Sources, Detectors, Optimizer, Sweep) and the surface table underneath, one row per surface.

The design page with the Cooke triplet sample loaded and traced.
The design page with the Cooke triplet sample loaded and traced.

The quickest start is a sample: SAMPLES ▾ → pick a system → ▶ (Trace). Every change you make afterwards is live: trace again to see it.

2. On a phone

On a phone the design page has the same design and the same results, laid out for a small screen. Five tabs share the bottom of the screen (a rail on the left when the phone is held sideways):

  • View: the 3D view. One finger turns it, two pan and zoom; SIDE, TOP and FIT set the camera.
  • System: the surface table, one element per screen (a source, a lens, a solid, a surface, a detector). Swipe sideways for the next one, or tap its name in the row along the top. ≡ lists the whole prescription (GROUP… groups surfaces), + adds a surface, a lens, a solid, a source or a detector, and ⋯ moves, copies, swaps (Swap…: for a stock lens, a parametric optic, what you copied, or a file) or deletes the element. An element opens with its drop-downs shut, so all its sections are in sight: tap the one you want. Holding a finger on an object in the View tab opens its page here. V beside a value makes it an optimizer variable, as in the table.
  • Analysis: Spot, PSF, MTF, OPD, Zernike, Focus (the z-stack) and Fringes (interference), one per screen; swipe sideways between them. The chips at the top pick the field and the analysis, and the numbers under them are each field's RMS spot radius, the rays that landed, and the wavefront's RMS and Strehl once it has run. Every plot fits the screen, held upright or sideways.
  • Optimize: the optimizer's settings, and a slider for each variable. Dragging a slider retraces as it moves; one drag is one step of Undo. The screen stays on while a run lasts.
  • Sweep: the Sweep panel, the same as the desktop's: a value over a range, compensating at each point, the table, the plot and the pictures. The screen stays on while a sweep runs.

The top bar is the site's, as on every page: the logo (home) and ☰ (the site's pages). Under it (held sideways, down the right edge) are the design's buttons: ⋯, the Design menu (Clear, Save, Share a link, Export…, Settings, this manual, the validation report); the folder, to open a sample or a file (the design's name is its tooltip); ↶ ↷ (Undo, Redo); and ▶ (Trace). Back closes an open sheet first, then returns to View, then leaves the page; with unsaved changes it asks before leaving. Held sideways on a wide phone, ▯▯ shows the view beside the tab.

3. Sample systems

Classic systems, each checked against its textbook behaviour before it ships (a closed form or an independent calculation). Pick one from SAMPLES ▾, press ▶, then open the detector's tabs.

The SAMPLES menu (top right of the design page).
The SAMPLES menu (top right of the design page).

Opening a sample replaces the current design; if it has unsaved changes you are asked to save first. Each write-up below says what the system shows, what to try, and what it was checked against.

Plano-convex singlet

The simplest focusing lens: N-BK7, f = 100 mm, working at f/5 with its curved side toward the light (the better way round). A spherical surface bends the edge of the beam more strongly than the centre, so the rim focuses short of the paraxial focus: spherical aberration. The detector sits at best focus, between the two foci, where the spot is smallest.

Try: the Z-STACK tab shows the blur through focus. Turn the lens round (flat face first, curved face second) and the best-focus spot grows about four times (RMS radius 74 µm against 18.5 µm).

Checked: paraxial focus 121.362 mm against the closed form 121.363 mm; the marginal rays (h = 10 mm) focus at 120.262 mm, 1.10 mm short of it.

Read more: Spherical aberration, Plano-convex lens

Achromatic doublet

Glass bends blue light more than red, so a single lens focuses each colour at a different distance (chromatic aberration). A positive crown lens (N-BK7) is cemented to a negative flint (F2), whose dispersion is higher, and the pair brings two wavelengths to one focus. This one is f = 100 mm and traces three wavelengths (F, d, C).

Try: in the Sources panel set SPECTRUM to Single λ and WAVE to 486.1, then to 656.3, and run Z-STACK each time. The best focus moves by only about 0.06 mm. Do the same on the singlet and it moves about 1.5 mm.

Checked: the C (656 nm) and F (486 nm) foci lie 0.063 mm apart, against 1.56 mm for an N-BK7 singlet of the same focal length (more than 10× worse).

Read more: Achromatic lens, Chromatic aberration

Cooke triplet

H. Dennis Taylor's 1893 design: two positive lenses around a negative one. It is the simplest lens with enough free parameters to correct all the primary aberrations. This is Zemax's "Cooke 40 degree field" at f/5, with three fields and three wavelengths.

Try: pick one field at a time in the detector's FIELD list: the off-axis spots grow and change shape.

Checked: the prescription is Zemax's own sample, imported through the same code as IMPORT .ZMX SYSTEM; all 2853 rays reach the image (no vignetting).

Read more: Cooke triplet

Double Gauss

Two meniscus groups either side of the stop, nearly symmetric: the layout behind most standard camera lenses for a century. The symmetry cancels coma, distortion and lateral colour. This is Zemax's "Double Gauss 28 degree field".

Try: compare its MTF with the Cooke triplet's.

Checked: Zemax's own prescription; the image plane is at best focus, with an on-axis RMS spot radius of 7.53 µm and no focus left to find.

Read more: Double-Gauss lens

Petzval lens

Joseph Petzval's 1840 portrait lens: two achromats with a wide air gap, fast (f/4) and sharp on axis. Off axis, the sharpest image lies on a curved surface rather than the flat detector. That is field curvature, set by the Petzval sum. The sample has fields at 0°, 3° and 5°.

Try: pick each field in FIELD and run Z-STACK: the best focus moves toward the lens as the field angle grows, by 0.15 mm at 3° and 0.40 mm at 5°.

Checked: the traced focal length, 65.012 mm, agrees with an independent paraxial calculation (65.015 mm) to 4 × 10⁻⁵.

Read more: Petzval lens, Petzval field curvature

Newtonian telescope

Isaac Newton's reflector: a 200 mm f/5 paraboloidal mirror, and a flat diagonal that folds the focus out of the tube. A paraboloid brings an on-axis beam to a perfect point. Off axis it suffers coma, a comet-shaped flare that grows in proportion to the field angle.

Try: the OPD tab shows the diagonal's shadow, off-centre because the diagonal sits at 45°. The spot of the second field shows coma's comet shape.

Checked: on-axis Strehl ratio 1.0000 and a zero-size spot; at 0.2° off axis, a 6.9 µm comatic spot; no ray goes back out through the launch plane.

Read more: Newtonian telescope, Coma

Ritchey–Chrétien telescope

A Cassegrain telescope whose two mirrors are both hyperboloids, shaped to cancel spherical aberration and coma together (an aplanat). It is the design of the Hubble Space Telescope and of most large research telescopes. This one is 200 mm at f/12.

Try: compare the spot sizes of the three fields. The OPD tab shows the central hole cast by the secondary mirror.

Checked: mirror conics K₁ = −1.10101 and K₂ = −5.0909 from the closed-form design equations; the off-axis blur grows as θ^2.06 (no coma), against θ^1.13 for a classical Cassegrain of the same layout (coma).

Read more: Ritchey–Chrétien telescope, Cassegrain reflector

Galilean beam expander

A negative lens (f = −50 mm) followed by a positive one (f = +100 mm), their spacing the sum of the two focal lengths. A collimated laser beam (632.8 nm) leaves twice as wide and still collimated: an afocal system. Unlike the Keplerian form, with two positive lenses, it never focuses the beam inside, which matters with high-power lasers.

Try: change the gap between the lenses and the output beam converges or diverges.

Checked: magnification 2.000000 (f₂ / |f₁|); the beam stays collimated, its width changing by less than 10⁻⁶ over 450 mm.

Read more: Beam expander, Galilean telescope, Afocal system

Michelson interferometer

A 50:50 beamsplitter sends the light down two arms (100 and 103 mm) to two flat mirrors and recombines the returns on the detector. Mirror_1 is tilted α = 0.05° about Y, so the returning waves cross at 2α. In the detector's INTERFERENCE tab they form straight fringes λ / sin 2α apart, about 28 across the 10 mm beam.

Try: move Mirror_2 by a fraction of a wavelength (its ΔX, say 0.0001 mm) and the fringes slide by 2Δ / λ of a period. Set Mirror_1's tilt to 0 and the map becomes one uniform tone, ½ + ½ cos(4πΔL / λ), set by the arm difference ΔL.

Checked: each arm delivers ¼ of the input to the detector; the fringe period on the INTERFERENCE map is 362.57 µm, equal to λ / sin 2α.

Read more: Michelson interferometer, Interference

Mach–Zehnder interferometer

Two beamsplitters and two fold mirrors: the light splits, travels two separate 200 mm arms, and recombines. Each arm is crossed once, unlike the Michelson's, which makes it the usual way to test a sample placed in one arm. Here the sample is a weak lens (f = 2 m). Its curved wavefront against the flat reference gives circular fringes, about 7 rings within 4 mm of the centre.

Try: change the lens's radii: a stronger lens packs the rings closer together.

Checked: the output wavefront radius fitted on the INTERFERENCE map, 1741.1 mm, agrees with the paraxial value of 1741.0 mm to 5 × 10⁻⁵.

Read more: Mach–Zehnder interferometer

Right-angle prism

A solid N-BK7 prism (see Solids). Inside, the beam meets the hypotenuse at 45°, past the critical angle of 41.3°, so it reflects totally, with no mirror coating, and leaves through the other leg. A solid is traced non-sequentially; in sequential mode (TRACE setting) a totally reflected ray is dropped, as in Zemax.

Try: tilt the beam by 6° (tilt Y = 6 on the Source row). Inside the glass the light now meets the hypotenuse below the critical angle, and it passes straight through instead of turning.

Checked: every ray is turned 90° (direction to 4 × 10⁻¹⁶) with no loss; forced to Sequential, no ray gets past the hypotenuse.

Read more: Total internal reflection, Prism (optics)

4. The surface table

Each row is one surface, in the order light meets them. Its Type sets what it does:

  • Source — launches rays; its beam is set up in the Sources panel (Sources). Its position and tilt in the table place the beam.
  • Refr — a refracting surface. N (or a Glass) is the medium after the surface, so two Refr rows make a lens: the first takes the glass, the second N = 1 (air). + Real Lens in the Type list inserts such a pair as a group.
  • Mirr — a mirror: radius, conic, and a central Hole Ø that lets light through (a Cassegrain primary).
  • Paraxial — an ideal thin lens of focal length f (the R / f column), free of aberrations: parallel rays meet at one point of its focal plane. A negative f makes a diverging lens. It stays free of aberrations at any object distance, so a system built only of Paraxial lenses (a relay, a beam expander) shows no wavefront error with the detector at its image; a beam expander's output is collimated, so there it shows none wherever the detector sits.
  • Stop — an aperture: rays outside it are always stopped, whatever the Hard vignette setting; its Hole Ø is a central obscuration.
  • BS — a beamsplitter: each ray splits into a transmitted ray carrying the fraction T of its power and a reflected one carrying R (Conic / T and Glass / R columns). Both arms are traced.
  • Filter — a flat spectral filter (see Filter below).
  • Dummy — a reference plane that does nothing to the light; useful as an origin to build other surfaces from.
  • Detector — records the rays that land on it (Detectors and analysis). Any row can be turned into one.
The surface table: type, origin, offsets, shape, radii, thickness, apertures, conic, glass, index and tilts.
The surface table: type, origin, offsets, shape, radii, thickness, apertures, conic, glass, index and tilts.

Columns.

  • ID — the surface's name (other rows refer to it as an origin), with its colour swatch.
  • Origin, ΔX ΔY ΔZ, ΔTilt X / Y / Z — where the surface sits: offsets and rotations (about x, then y, then z) from the origin surface, or from the global axes for Glbl. The origin's Thick is added along its axis, so a chain of surfaces each placed from the previous one, with thicknesses, reads like a lens prescription. Abs Z shows the resulting position along z. The detector's origin follows the last optic: when an optic is added before it, a detector placed from a source or from the optic that was last is placed from the new one, without moving (one the new optic would land past keeps its distance, now from that optic), and bounds set on its offsets move with them. A detector you placed from the design's origin (Glbl, as in the samples), from an earlier optic, or with independent axes is left as you set it, and so is one being optimized when the new optic turns its axes.
  • Shape — Circ or Rect aperture. Apert X / W, Apert Y / H — its full diameter (or width and height). Rays that miss it pass by, unless Hard vignette is on or the surface is a stop.
  • R / f X, R / f Y — the radius of curvature (0 = flat; a focal length on a Paraxial surface). A different Y radius makes a toric surface.
  • Hole Ø — mirrors and stops: a central hole's diameter (0 = none).
  • Conic / T — the conic constant K (0 sphere, −1 paraboloid, < −1 hyperboloid, between −1 and 0 a prolate ellipsoid), or a beamsplitter's T.
  • Glass / R — the glass (see Glass below), or a beamsplitter's R. N — a fixed index; with a glass set it shows the glass's nd in blue, for reference.
  • Filter — None, or a spectral filter on that surface: LP long-pass, transmittance T = 1 / (1 + e−k(λ − λ₀)); SP short-pass, T = 1 / (1 + ek(λ − λ₁)); BP band-pass, their product (passes λ₀ … λ₁); Notch, one minus the band-pass; each with edge wavelengths λ₀ / λ₁ in nm and an edge steepness k in nm⁻¹ (higher = sharper). OD — a neutral density, T = 10−OD at every wavelength. A ray's power is multiplied by T at its own wavelength.

Signs. A radius is positive when its centre of curvature lies downstream (+z); a concave mirror facing the light has R < 0. Apertures are full widths: Apert X is the diameter of a Circ aperture, or the width of a Rect one.

Controls in the table. Several controls appear only where they apply to the surface's type or origin:

  • Tick box (first column) — selects the row; GRP in the header puts the ticked rows in one group (a lens or an assembly). A source cannot be grouped.
  • Colour swatch beside the ID — the colour the surface is drawn in; for a source, the colour of its rays.
  • Type → + Real Lens — replaces the row with a two-surface lens group.
  • + ADD SOLID (below the table) — inserts a glass body before the detector: a window, a right-angle prism, a wedge or a Dove prism. See Solids.
  • 🔗 / ⎼ inside ΔX, ΔY, ΔZ and the tilts (only when Origin is another surface) — 🔗 coupled: the value is measured in the origin surface's frame, so the surface follows the origin when it moves or tilts. ⎼ independent: that coordinate is absolute. Switching converts the number so the surface stays where it is.
  • V (right end of ΔX/ΔY/ΔZ, R / f and aperture fields; not on the first row) — makes the value an optimizer variable: the field turns plum and the variable appears in the Optimizer panel, where you give it bounds. Click V again to release it.
  • 🔗 / ⎼ after R / f X and Apert X — 🔗 keeps Y equal to X (a rotationally symmetric surface; the Y field is greyed out); ⎼ sets Y separately (a toric surface, or a rectangular aperture). On a BS, the 🔗 after R keeps T + R = 1.
  • Shape — Circ or Rect aperture.
  • Filter — None, LP (long-pass), SP (short-pass), BP (band-pass) or Notch, each with its edge wavelengths λ₀ / λ₁ and an edge steepness; or OD, an optical density (transmittance 10−OD).
  • SHOW STOP (below the table; hidden by default) — puts a STOP tag after each surface's ID. The filled one is the aperture stop the exit-pupil report uses: IMPORT .ZMX SYSTEM sets it from the file. Click a tag to name that surface the stop (one at a time), click the filled one to clear it; with none named, the report takes the most limiting aperture. Nothing traced changes. HIDE STOP hides the tags again; the stop itself stays.
  • Group row (the shaded row above a group) — ▼ / ▶ folds the group; the name is editable; its ΔX/ΔY/ΔZ and tilts move the whole group, and its ↑ ↓ ⧉ × act on the whole group.
  • Row buttons — ↑ ↓ move the row; ⊙ (mirrors only) auto-aligns the mirror: it sets the tilt that sends the beam from the previous optic to the next surface that is not a detector; ⧉ copies (then ⧉ PASTE appears under the table); ⇄ swaps the optic (its whole group or lens) for a stock lens from a catalog, a parametric optic at its diameter (a real or paraxial lens, a mirror, a beamsplitter, a filter, a stop, a surface, or one of the solids), what you copied, or a file (.zmx, .json): it takes the old one's place, what followed keeps its distance after it, and its mount moves over to it; × deletes. The last tick box switches the surface off: the row is shaded and the trace skips it.
  • ℹ️ on a column heading, and most fields — hover for a definition and the units.

Glass. The glass sets the index after the surface, at each ray's own wavelength. Three ways to give one:

  • Type a name — suggestions appear as you type (2,738 glasses: the makers’ catalogs — SCHOTT, OHARA, HOYA, HIKARI, CDGM, SUMITA, … — plus fused silica, CaF₂, sapphire, MgF₂, calcite, PMMA, polycarbonate, polystyrene and water from their published dispersion data), each with its maker, nd and Vd. Spaces, dashes and case do not matter: bk7 finds N-BK7. ↑ ↓ and Enter pick one, or click it. The same field is at the top of the ▾ menu beside the glass.
  • ▾ → CATALOG — browse the whole catalog by maker: pick a maker on the left, filter by name, click a column heading to sort by name, nd or Vd, and click a glass to use it.
  • ▾ → MODEL or TABLE — a glass that is not in the catalog. MODEL takes nd, the index at the helium d-line (587.6 nm), and Vd, the Abbe number (nd − 1)/(nF − nC) — the lower Vd, the more the index changes with wavelength. It is fitted as n(λ) = A + B/λ², through nd at 587.6 nm and with nF − nC (486.1 and 656.3 nm) matching Vd. TABLE takes measured (λ in nm, n) pairs, interpolated linearly between them and held at the end values outside them.

With a glass set, the N column shows its nd in blue, for reference; the trace uses the glass. Without one, N is a fixed index for every wavelength. Clear glass in the ▾ menu removes it.

Undo, Redo, Clear

UNDO and REDO (top left of the 3D view; Ctrl+Z, and Ctrl+Shift+Z or Ctrl+Y; ⌘ on a Mac) step back and forward through your changes to the design: every edit in the table and the panels, adding, deleting, moving or pasting rows, an optimizer run, opening a sample or a file, and a .zmx import. Typing a value in a field is one step, however many keys it took. In a text field the keys undo your typing in that field, as usual. The last 100 steps are kept. The camera, the selected tabs and the analysis results are not part of the design: after an undo, the rays are traced again and the wavefront tabs need a fresh run.

CLEAR starts again from the design a new page opens with (one source and a detector), in your current units; the settings (units, trace mode, …) stay. If the design has unsaved changes it asks whether to save first. A Clear can be undone.

5. Solids: prisms, windows and wedges

A solid is a block of glass bounded by flat faces: a prism, a window, a wedge. + ADD SOLID (below the surface table) inserts one before the detector, in N-BK7:

  • Window — a 25.4 × 25.4 × 5 mm plane-parallel plate. Tilted, it shifts a beam sideways without turning it (optical window).
  • Right-angle prism — 20 mm legs. It folds a beam 90° by total internal reflection at the hypotenuse. Entered through the hypotenuse instead, it sends the beam back the way it came (Porro prism).
  • Wedge prism — 5°, 25.4 mm square. It deviates a beam by asin(n sin 5°) − 5°, about 2.6°, toward its thick side (wedge prism).
  • Dove prism — 10 mm aperture, 45° ends, its length matched to the glass. The beam leaves on the same axis, flipped across the prism; turning the prism about the axis turns the image twice as fast (Dove prism).
The right-angle prism sample: one solid N-BK7 body folding the beam by total internal reflection.
The right-angle prism sample: one solid N-BK7 body folding the beam by total internal reflection.

How a solid traces. Its faces form one group, drawn as one body. Every face has the glass on one side and air on the other, so light can enter through any face, the ends and edges included. A ray inside refracts out, or reflects totally past the critical angle (Snell’s law). A face counts only where it bounds the body, so an end cap listed as a rectangle acts as the prism's triangle. A design containing a solid is always traced non-sequentially.

Editing. A solid is one row of the surface table. Set its size there: W, H and T for a window or a wedge (T at the wedge's centre), Leg and Depth for the right-angle prism, Apert and Depth for the Dove, whose length follows from the aperture and the glass and is shown as L. Its glass, position (ΔX, ΔY, ΔZ) and tilt are on the same row, and the whole body moves and tilts about its entry face. Only the size changes: the angles that make each shape what it is (the wedge's 5°, the prism's 45°, the Dove's 45° ends) are fixed, so the body always stays closed. The faces are generated from the size; ▶ shows them, read-only. Copy, move or delete the solid from its row.

The right-angle prism as one row of the surface table: Leg and Depth, glass, position and tilt; its faces folded away behind ▶.
The right-angle prism as one row of the surface table: Leg and Depth, glass, position and tilt; its faces folded away behind ▶.

Light at the edges. The edges and ends are polished glass. Tilt a window steeply, or make it thick for its width, and light that enters near an edge reflects off it (total internal reflection) and leaves sideways. That is what the glass does, not an error. Keep the beam inside the clear aperture, or make the solid larger, if you want only the straight-through light.

A design file saved before solids had sizes still opens and traces as it is. Its solid is a custom solid: its faces are edited one by one, as before.

6. Sources

Each source has a tab in the Sources panel; + ADD makes a new one. Every field angle of a lens is its own source: add one per field and tilt it in the table (ΔTilt X or Y). The swatch beside the name sets the colour its rays and its spot are drawn in; X deletes the source and ON / OFF leaves it out of the trace without deleting it.

The Sources panel for one field of the Cooke triplet (three wavelengths).
The Sources panel for one field of the Cooke triplet (three wavelengths).
  • WAIST X / Y — the beam's full width where it leaves the source: its diameter (Circ) or width and height (Shape Rect, in the table). Rays start across this area. 0 makes a point source: every ray starts at one point and fans out over the divergence cone. 🔗 keeps Y equal to X.
  • RINGS — how many rays. The source's aperture is sampled on a square grid of (2·RINGS + 1) × (2·RINGS + 1) points, keeping those inside it (about π·RINGS² rays for a round beam); a point source launches RINGS rings of 6, 12, 18 … rays plus the centre. More rays give smoother spot statistics and slower traces. The wavefront tabs sample the pupil on their own even grid, at least 10 rings fine.
  • WAVE (nm) — the wavelength. Glasses take their index at each ray's own wavelength.
  • PROFILE — how power is spread across the beam. Uniform: every ray carries the same power. Gaussian: a ray at fraction ρ of the beam radius carries exp(−α·ρ²).
  • APOD (α) — the Gaussian's steepness (Gaussian profile only). The beam's edge carries e−α of the centre's power; the 1/e² radius (where power falls to 13.5 %) is √(2/α) of the beam radius. α = 2 puts the 1/e² point at the edge of WAIST; the default 8 puts it at half the radius, so the edge carries 0.03 %. The PSF, MTF and Strehl ratio use the same weighting across the pupil.
  • DIV. — the divergence half-angle, in the angle unit. The centre ray leaves parallel to the source's axis and a ray at fraction ρ of the radius leaves tilted outward by ρ·DIV, so the beam's edge spreads at DIV. For a point source it is the half-angle of the cone. 0 = collimated.
  • SPECTRUM — Single λ traces WAVE alone. Gaussian and Top-hat spread SAMPLES wavelengths around WAVE: a Gaussian of full width at half maximum BW, sampled evenly over ±2.5 σ (σ = BW / 2.355) and weighted by the Gaussian; or a flat band WAVE ± BW/2, sampled evenly with equal weights. Each wavelength launches its own set of rays carrying its weight. A List (from a .zmx import) traces the file's wavelengths with their weights. With more than one wavelength the wavefront tabs report a polychromatic result.

Rays are drawn brighter where they carry more power; the beam brightness curve in the settings menu (⚙, Tracing and the 3D view) sets how dim rays fade.

7. Tracing and the 3D view

Names: type a new one in the row's or group's name field. A name already in use, a blank one and "global" are marked and not taken; left there, the old name comes back.

Color and opacity: the swatch beside an object's name in the table (on a phone, on its page) opens its color and an opacity slider, from clear to opaque; DEFAULT puts the opacity back. A lens's back face sets the lens it closes. They are saved with the design, show in pictures and drawings, and change nothing traced.

Click an object in the view to highlight it and its row in the table (a lens's faces together; an optic and its mount together, whichever was clicked. A click on a mount opens nothing: its details are in the table's Mount column, or in BENCH above the view for a mount on no optic); click blank space to let it go. Turning, panning and zooming neither highlight nor let go. On a phone, tap to highlight, and hold to open the object's values (a mount opens at its optic's Mount section).

▶ traces every active source through the system (in your browser — nothing is sent anywhere). Opening a sample or a file frames the whole system. Drag to orbit, right-drag to pan, scroll to zoom; the view cube (bottom right) snaps to standard views.

Export (the arrow between Load and Share; on a phone, ⋯ → Export…), named after the design:

  • Image: PNG or JPG, the view as on screen with its labels (not the view cube, nor what is highlighted), at the DPI you set (300 to start with): the view prints at its size on screen (96 pixels to the inch), so 300 DPI is about three times its pixels, and the file says its DPI, for the program that prints or places it. The menu shows the size in pixels; past what the screen's graphics can draw, the DPI is held there, and says so; PDF, the view as a page in vectors, which prints sharp at any size (its labels set in Helvetica).
  • Drawing: SVG, the view in vectors for a paper or a slide: the rays in their colours, the optics and mounts as filled shapes (a translucent body as its near and far sides, not every layer the screen blends), and the labels as text, all where they are on screen.
  • CAD: STEP, the design for CAD and rendering programs, where it can be given materials, textures and light. Every body the view draws is a named part in its color and opacity, in millimeters, in place: a lens is solid glass between its two faces, exact (spheres, planes, cylinders; an asphere turned from its profile, within 1 nm), with the view's flat flange where a face is smaller than the lens; a solid is its convex body; a mirror with a thickness is its substrate; a stop is its plate, and flat surfaces (detectors, sources, paraxial lenses) are sheets. A shape with no exact form here (a toric face, an elliptical curved one) is the view's own triangles. A mount from a STEP file goes in as that file, exact; from an STL or IGES, as the triangles drawn. With RAYS ticked, the rays traced are lines in their source's color. Nothing is uploaded: the file is made in your browser.
The 3D view: the three fields of the Cooke triplet focusing on the image plane.
The 3D view: the three fields of the Cooke triplet focusing on the image plane.

A ray that leaves the system (it meets nothing more, or passes every detector) is drawn 500 mm on from its last point (in any length unit), along its direction, whichever way it goes: a point source shows a sphere of rays of equal length. The tail is drawing only; where the ray really goes is not cut short.

The settings menu (⚙ in the top bar):

  • UNITS — mm, cm, m or inches for lengths. Switching converts the design, so the system itself does not change.
  • TRACE — Auto traces a purely refractive system in prescription order (sequential, as Zemax does) and anything with mirrors, beamsplitters, solids or out-of-order surfaces non-sequentially: each ray meets whichever surface it reaches next. Non-sequential forces the latter, which a prism or light pipe needs: past the critical angle a ray reflects inside the glass (total internal reflection), and a ray can cross a surface from either side. In Sequential, a totally reflected ray is dropped.
  • ANGLES — degrees or radians for tilts and divergence.
  • AUTO WFE — run the wavefront analysis after every trace, so the PSF / OPD / MTF / Zernike tabs stay current.
  • HARD VIGNETTE — off, a ray that misses a lens or mirror's aperture passes by it unchanged. On, a ray that misses an aperture but lands within twice its size is stopped there, as by a lens mount; rays farther out (say the other arm of a beamsplitter) still pass. Stops clip either way.
  • SHOW SURFACE IDs — label the surfaces in the 3D view.
  • BEAM SCALING (γ) — how a ray's power maps to its brightness: lower values keep weak rays visible (a Gaussian beam's edge), 1 is proportional.
The settings menu.
The settings menu.

8. Detectors and analysis

Each detector has a tab in the Detectors panel (+ ADD adds one). Its header has the colour swatch, the name, X (delete) and ON / OFF, plus:

  • PASS-THROUGH — record the rays and let them continue (an intermediate image, a monitor plane). Off, the detector stops what lands on it.
  • SKIP — leave the detector out of the trace entirely, as if it were not there.

Under the header, the units list sets the units this detector's results are shown in (nm, µm, mm, cm, in), and with several fields the FIELD list picks the one every tab shows: spot, wavefront and Z-stack. A wavefront belongs to one field, so with All fields the wavefront tabs show the first. A tab marked ⚠ holds results from before the system last changed; RERUN brings them up to date.

Spot

Where the rays land. The statistics are per field, each about that field's own centroid and weighted by ray power: RMS (x, y) — the standard deviation of the positions along x and y; 2σ geom. (x, y) — twice the RMS: the 1/e² radius if the spot is Gaussian-shaped, from the rays alone (no diffraction, so a perfect lens gives 0; the diffraction size is PSF 1/e² Ø in the wavefront analysis, below); GEO (r) — the farthest ray from the centroid. Sub-tabs:

  • DIAGRAM — the spot diagram, each dot a ray, its opacity the ray's power. With several fields, each gets its own box, centred on its own centroid (the crosshair) and all at the same scale, so you can compare their shapes.
  • EE — encircled energy: the fraction of the power within a radius, against the radius normalised to GEO; guides mark 50 % and 86.5 % (1/e²).
  • RADIAL, X, Y — the power profile across the radius, or along x or y.

⚙ opens the chart settings: axis limits (blank = automatic); for the diagram, COLOR (Source = each field's colour, or Hot / Plasma / Rainbow / Gray by ray power), DOT BLUR (soften the dots into a density image) and, with several fields, FIELDS (Separate, one box each, or Together, all in one box, centred on their pooled centroid, to show where each field lands); for the profiles, SMOOTH (None, Box or Gaussian, over FACTOR bins) and LOG scale. SVG, PNG and CSV export the chart or its data.

Spot diagram of the Cooke triplet's three fields.
Spot diagram of the Cooke triplet's three fields.

Wavefront tabs: PSF, OPD, MTF, Zernike

These run the wavefront analysis: rays from the field are traced to the detector, their optical path is compared with a reference sphere centred on the image point (through the exit pupil), and the difference is the wavefront error. A beam that leaves the system collimated to within diffraction (its own focus adds less than λ/4 of defocus, Rayleigh’s quarter-wave criterion) forms no image at any finite distance: image space is afocal, and the reference is a plane through the exit pupil instead, so a beam expander’s numbers show its aberrations alone, wherever the detector sits. RUN WFE runs it (or turn on Auto WFE in the settings to run it after every trace); RERUN repeats it. The strip above every one of them:

  • RMS — the RMS wavefront error over the pupil, in waves (λ). With several wavelengths, POLY RMS is the polychromatic RMS as OpticStudio defines it (every wavelength against one reference sphere, weighted by the spectrum) and RMS is the primary wavelength's own.
  • P-V — peak-to-valley wavefront error.
  • FIT RES — the part of the wavefront the 36 Zernike terms do not capture; large values mean finer structure than Z36, or too few rays.
  • TILT — the tip / tilt taken out of the numbers. −TILT (the default) removes it, since it only moves the image; +TILT keeps it in.
  • STREHL — peak PSF intensity over the diffraction-limited peak (1 = perfect; above 0.8 is usually called diffraction-limited). With a Gaussian beam profile it is against the same weighted pupil (apod.); with several wavelengths it is the spectrum-weighted average of each wavelength's Strehl.
  • PSF 1/e² Ø — the diameter of the diffraction spot, where the PSF's intensity, averaged in rings around its centre (the centroid of its light), falls to 1/e² = 13.5 % of its brightest ring. It includes diffraction and the aberrations, unlike the Spot tab's 2σ geom., which counts rays only: near the diffraction limit the two differ most. A perfect lens with a uniformly filled aperture gives 1.645 λ·N (N = 1/(2 NA), the working f-number); a Gaussian beam focused well inside the aperture gives the waist diameter 2λf/(πw). The scale is one Airy radius, 1.22 λ/(2 NA), with NA from the rim rays' angle in image space; when the image is collimated (a beam expander) there is no focus and it is given in Airy radii. With several wavelengths it is the primary wavelength's (labelled @λ). Read it with the Strehl ratio: with strong aberration it describes only the central core, which can even be narrower than a perfect lens's (the plano-convex singlet sample: 3.9 µm against 4.8 µm diffraction-limited, at Strehl 0.12) while most of the light lies in the rings around it; for a PSF with no single core it describes only the brightest lobe. Use the spot size or encircled energy there.
  • Z4 (focus) — the defocus coefficient: how far the detector is from best focus, in waves.
  • COND — the condition number of the Zernike fit: about 1–2 on a clear round pupil, rising with obscured or odd-shaped pupils; above 1000 the split between defocus and astigmatism is unreliable and a warning says so.
  • λ — the analysis wavelength, or how many wavelengths.

When most of the error is plain defocus, the panel says so and gives the error left once focus is corrected — the Z-stack finds that focus. Each tab:

  • PSF — the point-spread function, the image of a point. ⚙ sets its extent in Airy radii (on the next run) and the Scale: Log shows the faint rings but exaggerates them (the first ring, 1.75 % of the peak, shows at about a fifth of the colour scale), Linear shows true relative intensity. Circles mark the Airy radius.
  • OPD — the wavefront error map across the pupil, in waves (CSV exports it). The colour scale spans at least λ/100, so a near-perfect wavefront shows faintly rather than at full contrast; the colour bar gives the span. Below λ/1000 P-V the map is drawn flat.
  • MTF — the modulation transfer function, sagittal and tangential, against spatial frequency normalised to the diffraction cutoff (1.0); ⚙ sets the axis limits.
  • ZERNIKE — the coefficients of the 36 Noll Zernike terms, in waves; ⚙ sets the Y scale and how many of the largest to show.
The PSF tab: wavefront error, Strehl ratio and the point-spread function.
The PSF tab: wavefront error, Strehl ratio and the point-spread function.
The MTF tab.
The MTF tab.

Z-stack

The beam's width through focus: RUN moves the detector from −Range to +Range along its own axis, in Steps planes, and plots each field's beam waist (twice its RMS spot radius) at every plane, with its best focus. Each plane shows exactly what this detector, at its real size, would record if it were moved there, so at 0 it matches the Spot tab. Offsets are along the detector's own z axis (global +z for an untilted detector), whichever way the light travels. The chart's axis limits and PNG / CSV export are under the plot.

A through-focus z-stack (the singlet sample's caustic).
A through-focus z-stack (the singlet sample's caustic).

Interference

The detector's irradiance with the light's phase: every distinct path that reaches the detector (an interferometer arm, each round trip in a cavity) is a beam, and RUN adds the beams' fields, each with its optical path as phase, then squares. The Michelson sample opens with Mirror_1 tilted α = 0.05° about Y, which gives straight fringes with period λ / sin 2α (0.36 mm at 632.8 nm); moving a mirror by Δ slides them by 2Δ/λ of a period. Zero the tilt and the aligned arms give one uniform tone, set by the arm difference ΔL as ½ + ½ cos(4πΔL/λ). The map is in units of the source's launch irradiance; Visibility is (max − min) / (max + min). A source with several wavelengths adds each wavelength's pattern by its weight. Phase is optical path only: no phase change on reflection is modelled, so equal paths add in phase.

9. Optimizer

The optimizer adjusts the values you mark until the target is as small as it can make it.

  • Variables — click V beside a value in the table (ΔX / ΔY / ΔZ, R / f, apertures, a group's offsets, or a solid's size) to vary it; click again to fix it. Each variable appears in the panel with a min and max. A variable with neither is flagged ! UNBOUNDED. A solid's size (W, H, T, Leg, Depth, Apert) needs both: it starts with the smallest size its shape allows as its min (0.1 mm; for a wedge's T, enough to keep its thin edge), and the run does not start until it has a max. The whole solid follows the size during the run, and the result is written back as the size.
  • Target — Min RMS Spot Size: the power-weighted RMS spot radius on the detector, each field about its own centroid. Collimate Beam: the RMS spread of the ray directions leaving it, each field about its own mean direction (a collimated beam has none; fields may leave at different angles). Image Telecentricity: the chief rays' angle to the detector's axis.
  • DETECTOR — where the target is measured; Auto uses the last active detector. The other detectors keep their size during the run, so one in the beam still blocks the light it catches. If no light reaches this detector at the start, the run says so and changes nothing.
  • FIELD — tick the fields (sources) the target is computed on; all ticked pools every field. Unticked sources are left out of the run, not changed, and at least one field stays ticked. With a single source the list is greyed out: add a second source to choose. With several fields ticked, each field is measured about its own centre and the fields count by their weight, the number beside each ticked field (default 1), whatever their ray count or power, so the run finds the best compromise across them (as OpticStudio's default merit does). A field's share of the target is its weight over the sum of the weights: raise a field's weight to favour it, and 0 leaves it out, the same as unticking it. Equal weights of any size are the same as all 1. The distance between the field images is not part of the target. The fields and their weights are saved with the design.
  • Method — DLS: damped least squares (trust-region reflective, the method of SciPy's least_squares) followed by Powell's method, fast near a good design. POWELL: Powell's method alone, which needs no derivatives and copes better with rough merit landscapes.
  • MAX TIME — a time limit; the run never stops before its first pass.
  • CONVERGENCE — after at least four passes, the run stops when a pass improves the target by less than this fraction of where it started: Coarse 10⁻³, Normal 10⁻⁴, Fine 10⁻⁵, Ultra 10⁻⁶.
  • ACCEPTABLE ERROR — stop as soon as the design is this good (spot radius in µm; divergence or chief-ray angle in mrad). Blank: run until no further progress.

RUN OPTIMIZATION shows each pass and the merit as it goes; STOP ends the run and keeps the best design found so far, including one found partway through a pass; REVERT TO PRE-OPTIMIZATION DESIGN puts back the design from before the run. Afterwards the panel shows the final MERIT, the TIME taken, the merit evaluations (EVALS) and passes (ITERS).

A variable the target does not depend on (a window's thickness in a collimated beam, say) keeps its value: the run puts it back where it started and marks it UNCHANGED.

A variable keeps its frame. The optimizer varies the value the table shows, in the same terms: a ΔZ is measured from the surface's origin (along that origin's own axis, if it is tilted), and its min and max are too. The surface keeps its origin through the run and afterwards, and moves with it if the origin is a variable as well. Its children in its own group move with it (a lens's back surface follows its front). A surface parented to it from outside its group stays where it is during the run, and afterwards keeps its origin, its offsets rewritten so that it is still where the run held it.

The Optimizer panel.
The Optimizer panel.
Give positions bounds. In systems with mirrors or cavities, an unbounded position variable can find an unphysical minimum (a focus inside the cavity, a ghost image): the optimizer minimises the spot globally. Set a min and max on every position variable.

10. Sweep

The SWEEP tab steps one or two numbers of the design through a range of values and records how the system performs at each: the focus against wavelength, the spot against a lens spacing, the image against a tilt. Each point is worked out on a copy of the design; the table does not change until you load a point into it. On a phone it is the Sweep tab.

Each point takes three steps. The swept values are applied, exactly as typing them into the table would. Then, optionally, some other values are re-optimized: a refocus, or any optimization. Last, the results you chose are recorded.

The SWEEP tab set up on the plano-convex singlet: the lens's ΔZ from 19 to 21 mm, refocused at each point, with the RMS spot and all four pictures recorded.
The SWEEP tab set up on the plano-convex singlet: the lens's ΔZ from 19 to 21 mm, refocused at each point, with the RMS spot and all four pictures recorded.

What is swept

  • + VALUE TO SWEEP — pick a surface or a source, then one of its numbers: a position or tilt, a radius, the conic, a thickness, an index, an aperture, a beamsplitter's T or R, a filter edge; for a source, its wavelength, divergence, bandwidth or rings. Any number you can type in the table or the Sources panel can be swept, with two exceptions: a solid's generated faces (its position and tilt can be), and N on a row that has a glass.
  • FROM, TO, STEPS — evenly spaced values, both ends included. LIST lets you type the values instead, separated by commas or spaces. Up to 201 values. The line underneath counts them and shows the design's current value.
  • + SECOND VALUE (GRID) — a second swept value. Every combination of the two is run, up to 2000 points, and the plot draws one line per value of the second.

A swept value moves what typing it would: a 🔗 linked partner follows (R / f Y with R / f X, say), and surfaces placed from a moved surface move with it. A source with a List spectrum (from a .zmx import, or the doublet sample) traces the list's wavelengths, so sweeping its wavelength moves no ray; the panel warns. Set its SPECTRUM to Single λ first.

Compensating at each point

Most changes also move the focus, so without refocusing, a sweep mostly measures defocus. COMPENSATE AT EACH POINT re-optimizes some values, the compensators, at every point before recording, as you would correct the real system after the change:

  • NONE — record each point as the change leaves it.
  • REFOCUS — re-optimizes the detector's ΔZ for the smallest RMS spot, within ± 5 times the z-stack range (Detectors tab) of where it is now, for up to 15 s a point.
  • COPY FROM OPTIMIZER — copies the Optimizer tab's variables (V) with their bounds, its target, detector, fields and settings as they are now; changes made there later do not carry over. A solid's size cannot be a compensator: it is left out, and the panel names it.
  • + COMPENSATOR — adds a compensator by hand. Each compensator needs a min and a max, and shows ! BOUNDS until it has both. Without bounds, a position can wander to an unphysical minimum at some point, and nothing would show it.
  • TARGET, ON DETECTOR, METHOD, TIME / POINT, CONVERGENCE — as in the Optimizer.
  • EACH POINT STARTS FROM — THE DESIGN: every point is optimized from the design as it is, so the order does not matter. THE PREVIOUS POINT: each point starts from the last one's result, which is faster and follows one solution, but can stay in that solution's minimum. On a grid it runs each row back and forth, so every point starts from a neighbour.

A swept value cannot also be a compensator: the optimizer would undo the sweep. A compensator that ends at one of its bounds is shown in red in the results table and named in the point's status, because there the bound, not the optics, set the result.

What is recorded

Results are read on one DETECTOR. With several sources, each field ticked under FIELDS gets its own columns:

  • RMS spot — about the field's own centroid, as the optimizer measures it. Centroid — x and y. Rays — how many landed; vignetting shows as a drop.
  • WFE + Strehl — the RMS and P-V wavefront error and the Strehl ratio, as the wavefront tabs give them (tilt removed). MTF — sagittal and tangential, at MTF AT, a fraction of the diffraction cutoff.
  • Best focus — the z-stack's best focus, as a Δz from the detector, using the Detectors tab's z-stack range and steps and refined between its planes. It shows red when it falls at the end of the range, where the true best focus may lie beyond; widen the range.
  • ▸ ADVANCED — three more groups:
    • Spot: RMS x / y (the two drift apart for an astigmatic spot); the GEO radius, the farthest ray from the centroid; and the spot at best focus.
    • Wavefront at its best focus: the focus shift that minimizes the RMS wavefront error, beside the z-stack's spot-based one (the two differ when there is spherical aberration); and the WFE, Strehl ratio and MTF at that focus.
    • Zernike at the detector: any Noll terms, listed in NOLL (by default 4, defocus, and 11, spherical).

The compensators' final values and the optimizer's error are always recorded, and are often the answer you want: the refocus against wavelength is the chromatic focal shift. Also before compensating (on by default) records the results before compensating as well, so each point shows what the change costs and what compensating wins back.

Pictures at each point

Tick Spot diagram, PSF, OPD map or Zernike bars to keep that picture of every point, for each field. They are kept after compensating and, with Also before compensating ticked, before it too. They are drawn as the detector's tabs draw them, from the same results as the numbers: the spot diagram from the trace behind the RMS spot, the others from the wavefront analysis behind WFE + Strehl. If no ticked number needs that analysis, it runs for the pictures alone.

Running and results

RUN SWEEP runs the points in order, and the button counts them (and the optimizer's passes). The line above it gives the number of points and, with compensation, the longest the run can take: the time limit at every point. STOP ends the run and keeps the points already finished. A point that fails says why in its status, and the run goes on. The sweep works on a copy of the design taken when you press RUN, so you can keep editing the table meanwhile. Its setup lasts until the page is closed; it is not saved with the design.

The results: the detector's refocused ΔZ against the lens's, the spot diagram at every point before refocusing, and the table.
The results: the detector's refocused ΔZ against the lens's, the spot diagram at every point before refocusing, and the table.
  • The plot — the list above it picks the column: a compensator, the optimizer's error or a recorded result, plotted against the first swept value. A grid draws one line per value of the second. With Also before compensating, the value before is drawn dashed beside the value after.
  • The table — a row per point. Click a row to pick that point: the plot circles it and the pictures show it. CSV saves the table.
  • LOAD POINT … INTO THE DESIGN — puts the picked point's design into the table: its swept values, and the compensators where they ended. UNDO brings the previous design back.

The pictures show one picture at a time: SPOT, PSF, OPD or ZERNIKE, and, when the pictures were kept before compensating, BEFORE or AFTER.

  • STEP — one point at a time: the slider, ◀ ▶, or PLAY to cycle through them. It follows the row picked in the table; while the sweep runs, it shows the newest point.
  • ALL POINTS — every point side by side, small, each with its swept value and one number under it: the RMS spot, the Strehl ratio or the RMS wavefront error. With two swept values they form a grid, the first across and the second down. Click a picture to pick its point.
  • SAME SCALE (on by default) — one scale for every point, so a spot that grows looks bigger. That means one spot box (the sweep's largest GEO radius), one OPD colour range, and one Zernike axis with the same bars (the 12 terms that are largest anywhere in the sweep). Before and after compensating each get their own scale, because a defocused spot can be a thousand times the refocused one. Turned off, each picture gets its own scale, as on the detector's tabs. The PSF is always drawn against its own peak; its Strehl ratio says how high that peak is.
  • PSF LOG / PSF LINEAR — the PSF's colour scale, as in the PSF tab. EXPAND shows the pictures larger, over the page (Esc closes them).

The pictures are kept at reduced size so that a long sweep fits in memory: maps at most 128 pixels across (64 beyond 120 points × fields), and at most 4000 rays drawn per spot diagram (2000), while the spot's numbers still use every ray. Pictures can be kept for at most 500 points × fields, and pictures before and after compensating count twice.

Try: on the plano-convex singlet, sweep PCX_1's ΔZ from 19 to 21 mm in 5 steps with REFOCUS, and tick Spot diagram. The Detector ΔZ column follows the lens millimetre for millimetre. Before refocusing, the RMS spot grows from 18.5 µm to 74 µm a millimetre either side; after, it is 18.5 µm at every point: step through with BEFORE, then AFTER. Then sweep the Source's wavelength over 486.1, 587.6 and 656.3 nm with REFOCUS: the detector moves 1.53 mm from F to C, the singlet's chromatic focal shift. On the achromatic doublet (with its SPECTRUM set to Single λ first), it moves 0.06 mm.

11. Optical mounts and measuring

The table's Mount column puts the makers' own optical mounts (lens mounts, kinematic mirror mounts, lens tubes, cage plates) on the optics of your design, from their CAD files, and MEASURE above the view gives the distance between any two features: a mount's face, bore or edge, an optic's vertex or rim plane, or the gap between two mounts' bodies. Mounts are drawn and measured; the ray trace ignores them: a mount never stops a ray.

Mounting an optic

The Mount column, after Filter, has a cell for each optic (on a lens's group row): + MOUNT, or its mount's name (⚠ when it needs attention). In a group of several optics, the others have theirs on their own rows. Clicking it opens the optic's mount panel beside the table. With no mount yet, it lists the mount files already in this browser and OPEN A MOUNT FILE…: a mount's STEP (.step, .stp), IGES (.iges, .igs) or STL file, downloaded from the maker's product page. The mount is put on the optic in one step: where it holds an optic is found from its own faces (below), so it sits on the optic's axis, its seat on the optic's front rim. The panel then shows the mount's card (its settings, below). An optic has one mount: SWAP MOUNT… puts another in its place, on the same face. The panel stays open while you turn the view or pick in it, and closes with ×, Esc, or a click elsewhere. Clicking a mount in the view opens its panel too. A mount moves with its optic, whether its seat was found or not: with none found, it is centred on the optic until you pick the seat. On a phone, a mount is added from the optic's page (System, then the optic: Mount).

The file is read in your browser and never uploaded, and kept in this browser so that a design using it opens without asking for it again (MOUNT FILES IN THIS BROWSER, at the foot of the panel, lists them, with FORGET). An STL carries no unit, so you are asked for one. A large assembly can take a few seconds to read; a file too large for the device's memory says so.

Its parts: keep, simplify or leave out

A maker's file is usually an assembly: the body, adjuster screws, springs, balls, a retaining ring. When it has more than one part, its parts list opens, each part (repeats grouped, ×2) with its share of the mount's triangles:

  • KEEP — as modelled.
  • SIMPLIFY — its outer shape, filled in (its convex hull): a threaded screw becomes a plain cylinder, a spring a solid one. It still counts when the gap between mounts is measured, with far fewer triangles. The outer shape contains the part, so a gap measured to it is never larger than the real gap: the measurement marks it ≥.
  • LEAVE OUT — not drawn and not measured, as if it weren't on the bench.

Makers often give every body of a file the file's own part number, so parts are told apart by their shape: identical bodies are one row (×2, ×4), called Part 1, Part 2… by size, with their dimensions. Click a row, or a part in the view, to see which it is. Small parts whose outer shape is much lighter (knobs, adjuster screws, bushings, set screws), or whose names say they are screws, springs or washers, are marked suggested: simplify; USE THESE applies the suggestions. Adjuster screws often stick out of the back of a mount further than anything else and set how close the next mount can go: simplify them rather than leave them out. The view shows the choices as you make them; click a part's name to see it in blue. DONE keeps them (one undo step) and remembers them for the next time you add that file. A simplified part that fills an opening on the beam axis (a retaining ring would become a disc over the lens) is flagged on the mount's card.

Where the optic sits: the seat

A mount holds an optic in a bore (the hole it sits in), against a seat (the lip, shoulder or retaining ring it rests on). Both are found from the mount's faces: the optic's axis is the axis of the mount's largest hole, and its seat a face square to that axis that an optic's edge can rest on, with a bore starting there on the optic's side. On a mount's card, CHANGE SEAT… lists the seats found (usually one or two), the first marked suggested; Pick the bore and the seat by hand… lets you pick them in the 3D view (the face under the pointer lights up; click it), or choose from short lists (one bore per hole axis, and only the faces centred on it).

Does it fit? Seating finds the bore that holds the optic's edge: the smallest hole on the axis, starting at the seat, on the optic's side (a thread counts at the diameter it is modelled at). An optic wider than that bore is flagged won't fit; one under 80% of it, much smaller than the bore (the wrong mount, or one that needs an adapter). The warning shows on the mount's card, and the optic's Mount cell shows ⚠. The optic's diameter is its widest face in the table (a rectangular one's diagonal).

The rim plane is where the face's edge is: its sag at its clear aperture (a flat face's vertex plane). It follows the lens: change a radius, or let the optimizer move the lens, and the mount moves with it. SEAT ON puts the seat on the face's vertex instead. FLIP turns the mount around on its lens: the lens then rests on the seat with its other face (for a lens that sits against a lip behind it). On a mirror, FLIP turns the seat around. X, Y and Z offsets, TILT X and Y, and ROLL (about the axis) adjust it from there, in the face's frame: a retaining ring 2 mm deeper is a Z of 2. HOLDS moves the mount to another optic that has none. Deleting an optic deletes its mount with it (Undo brings both back). Swapping it (⇄) hands its mount to the optic that takes its place, on the same face; check the fit warning if the new one's diameter differs.

Measuring

Nothing is measured until you ask. MEASURE, above the view (on a phone, the design bar's Measure), opens the measurements without starting anything, so you can read them or switch their dimensions; + NEW MEASUREMENT starts one, two features at a time:

  • A mount's face: point at it in the view and it lights up; click it, and it turns blue while the panel says what it measures from: the flat face, or one of its circular edges (its centre), or a bore's or cylinder's axis. Choose, then CONFIRM. Nothing is taken until you confirm, so a wrong face costs only another click.
  • An optic's feature: its rim plane, vertex plane, vertex or axis, from the list, with USE.
  • A whole mount (from the list): measured to another whole mount, it gives the closest approach between their bodies, or COLLIDE when they overlap. Each body is its file's mesh, within a known distance of the true surface (its tessellation's deflection, 0.02 mm), so the true gap is within the printed ± of the value; a gap under it reads "touching". A gap to a simplified part reads ≥ (the true gap is at least that), and an overlap involving one "may collide". An STL's accuracy is unknown.

mm m in ft + in, at the top of the measurements, sets the unit every measured length is shown in, in the box, in the view and in COPY CSV, whatever the design's unit. It starts in mm and is remembered in this browser.

The distance comes with its components along and across the axis of the first feature's element, and is drawn in the view as a dimension, as on a drawing: extension lines from the two points out past everything it spans, a dimension line with arrowheads, and its value in a break in the line. It turns to face you as the view turns, keeps its size as you zoom, and overlapping dimensions stack outward, the shortest nearest; a short one has its arrows outside, pointing in. In the measurements box (on a phone, the Measure sheet), the Dimensions in the view switch shows or hides them all, and the eye on a measurement shows or hides its own (saved with the design). The SVG drawing has them too. From one optic's rim plane to the next is the seat-to-seat distance between their mounts, exact. Two planes count as parallel within 0.01°; beyond that you get their angle, never a made-up distance. Skew axes give their common perpendicular. Measurements are saved with the design; × deletes one, COPY CSV copies them. A maker's file is the nominal geometry: a real bench adds assembly tolerances.

Seeing inside

MOUNTS, above the view: X-RAY (translucent, the default: lenses and rays stay visible inside the mounts), SOLID, SECTION (cut by a plane through the centre of the view, facing you; it turns with the view; cuts are not capped, so walls show hollow; pointing and clicking reach the faces you see, past the half cut away) and HIDDEN. HIDE on a card hides one mount.

Saving, links and missing files

A saved design names each mount's file, by its name and a fingerprint of its contents (SHA-256), and keeps where it is seated. It holds no geometry, so it stays small. Opening a design (a file, a link, a sample, a restored draft) whose mount files aren't in this browser asks for them: OPEN FILES… (several at once). The right file is recognised by its contents, so a renamed copy is found. A file with the right name but different contents (the maker updated the model, say) is never used silently: USE IT ANYWAY takes it, and its mounts must be seated again. CANCEL opens the design as saved: missing mounts show as dashed outline boxes with their file names, measurements between optics stay exact, and one between mounts' bodies says which file it needs. The optic's Mount cell shows ⚠, and the mount's card has OPEN FILES… to ask again. Someone you share a link with is asked for the same files, which they download from the maker. Copying and pasting rows doesn't carry their mounts.

On a phone

A mount is added from its optic's page (Mount), and that section then shows everything about it: its seat, FLIP, PARTS…, SWAP MOUNT…, its offsets and tilts. The design bar (along the top; the right edge when the phone is held sideways) has Mounts (a ring in a square: the mounts, each with its own page, and how they are drawn) and Measure (a ruler: it starts a measurement, and lists those made). PICK ON A MOUNT IN THE VIEW closes the sheet and a banner says what to tap: a tapped face lights up and the banner says what it measures from, with CONFIRM, LIST… (an optic's feature or a whole mount instead) and CANCEL. The parts list opens over the view.

12. Importing .zmx files

Two buttons under the table read OpticStudio .zmx files (export a .zar archive's lens file first):

The import buttons under the surface table.
The import buttons under the surface table.
  • IMPORT .ZMX SYSTEM replaces the design with the file's whole system: its surfaces, the entrance pupil and fields (one source per field), the wavelengths, and the image surface as the detector. The file's stop places the entrance pupil but is not added as an element. Some unusual or very large .ZMX files don't import correctly yet; we're working on it.
  • IMPORT .ZMX ELEMENT inserts only the surfaces — a vendor lens, a mirror or fold — into your design, before the detector; your sources and detectors stay.

Anything the file holds that AperiOptic does not model (multi-configurations, vignetting factors, unsupported surface types…) is listed in a short note after the import; tick Don't show import notes again to stop them. An unknown glass stops the import and names the glass.

The import note: a summary, and what could not be carried over.
The import note: a summary, and what could not be carried over.

Stock lenses from the makers' catalogs

STOCK LENS (on a phone: + → Stock lens) opens the lens makers' own Zemax lens catalogs (.zmf files): Thorlabs publishes its catalog as a free download, and Edmund Optics' comes with OpticStudio. Open one or more, then search by part number or words of the description, and narrow by focal length, optic size (Ø: a drop-down of the typical sizes, or Other… for a range of your own), clear aperture (CA), positive or negative, the number of elements, and spherical or aspheric. Each lens is listed with its focal length, Ø (its mechanical diameter, from the catalog record; the clear aperture where the record has none), CT (its thickness along the axis, first face to last: a doublet's whole) and CA; Ø and CT fill in a second or two after a catalog opens. A lens shows its prescription; INSERT BEFORE THE DETECTOR adds it as IMPORT .ZMX ELEMENT would, named by its part number. The catalog is read in your browser and nothing is uploaded; it stays open until the page is reloaded.

Only a lens AperiOptic models exactly can be inserted. One with cylindrical (toroidal) or GRIN surfaces, a surface type AperiOptic would approximate, or a glass it does not have says why instead. Coatings are not modelled. The catalog's own focal lengths were checked: every lens of the Thorlabs and Edmund catalogs designed at the d-line in makers' glasses (7,432 lenses), read and inserted this way, has the focal length its catalog states, to the four figures the catalog gives.

13. Saving and loading

The save button writes the design (surfaces and settings) as a .json file — you choose its name and folder (Chrome and Edge open the system Save dialog; other browsers ask for a name). The folder button loads a saved design. Leaving the page with unsaved changes asks whether to save first.

Until you save, AperiOptic also keeps a draft: a copy of your unsaved design in this browser, on this device, never uploaded. If the browser closes the page (a phone switching apps can do that without warning) the design is put back when you return; opening the design page later offers RESTORE or DISCARD. Only the latest draft is kept; CLEAR and DISCARD delete it. Turn it off under ⚙ (Keep a draft); turning it off deletes the draft.

The share button (beside the folder; on a phone ⋯ → Share a link) makes a link that opens this design: the surfaces, the settings and the optimizer's variables. The whole design is inside the link (the part after #, which a browser never sends to a server), so nothing is uploaded and the link keeps working as long as the site does. Opening it loads the design as opening a file would; a link cut short when it was copied says so instead of opening part of a design.

14. Writing your own design file

A design file is plain JSON, so you can write one in any text editor and open it with the folder button. List the surfaces in the order light meets them, as in the table. Anything you leave out takes the value a new surface would have. This f/5 singlet is a complete file:

{
  "version": 1,
  "settings": { "unit": "mm" },
  "surfaces": [
    { "id": "Source", "type": "source", "z_offset": 0,
      "aperture_x": 20, "rings": 14, "wavelength": 587.6 },
    { "id": "Lens_F", "type": "refract", "z_offset": 20,
      "radius_x": 51.68, "glass": "N-BK7", "aperture_x": 25.4 },
    { "id": "Lens_B", "type": "refract", "z_offset": 24,
      "radius_x": 0, "n": 1.0, "aperture_x": 25.4 },
    { "id": "Detector", "type": "detector", "z_offset": 121.36,
      "aperture_x": 10 }
  ]
}

Units. Lengths are in the file's unit ("mm", "cm", "m" or "in"; mm if omitted), angles in its angleUnit ("deg" or "rad"; degrees if omitted), wavelengths always in nm.

Every surface

  • id — a unique name. type — "source", "refract", "reflect" (a mirror), "paraxial", "stop", "beamsplitter", "filter", "dummy" or "detector".
  • origin — "global" (the default) or another surface's id; x_offset, y_offset, z_offset and tilt_x, tilt_y, tilt_z are measured from it, as ΔX … in the table.
  • radius_x — the radius of curvature (positive when the centre is downstream; 0 is flat), or the focal length of a "paraxial" surface. radius_y defaults to the same value; give a different one for a toric surface. conic, and asph_coeffs, the even aspheric terms [A4, A6, …] on r⁴, r⁶, ….
  • glass — a catalog name such as "N-BK7" (the index follows each ray's wavelength), "MODEL:1.5168:64.2" (nd, Vd) or "TABLE:486.1:1.5224,587.6:1.5168" (λ:n pairs). Or n, a fixed index. Either one is the medium after the surface, so the back face of a lens in air has "n": 1.0.
  • aperture_x — the full diameter (or width, with "aperture_shape": "rectangular"); aperture_y defaults to the same. aperture_inner — a central hole's diameter.
  • is_active — false leaves the surface out of the trace.

Sources also take rings (ray density), wavelength, beam_profile ("uniform" or "gaussian"), divergence and, for a broadband source, spectrum_mode with bandwidth_nm. Each field angle is its own source: tilt it with tilt_x or tilt_y. Detectors take is_pass_through: true lets rays continue past.

The quickest way to see every field is to save a design from the app and open the file: it lists them all, and anything you can set in the table has a field there.

15. Calculators and news

Calculators holds over a hundred optics formulas (first-order optics, Gaussian beams, diffraction, fibres, lasers, detectors, unit conversions), each with copy-as-code in Python, MATLAB and JavaScript. Every card is checked against an independent reference. A card opened (click it; on a phone, every card) suggests three calculators to go to next, below Learn more: the next step of the same calculation, the quantity on its other side, or the one that checks it.

The Calculators page.
The Calculators page.

News gathers new research, industry news and community discussion from across optics and photonics, refreshed daily.

16. Use with AI agents

An AI assistant (Claude, ChatGPT, Cursor and others) can use AperiOptic too: open and write designs, trace and analyse them, optimize and sweep them, look at the results, and run the calculators. There are three ways, from the most capable to the simplest.

The AperiOptic MCP server

An assistant that speaks the Model Context Protocol can run AperiOptic's tools on your computer. The server is this site's own engine and code, packaged: its numbers are the ones the design page shows, and nothing is sent anywhere. It is free to use (aperio-mcp on npm). The npx commands below need Node.js 20 or later; Claude Desktop's download needs nothing else.

  • Claude Code: run claude mcp add aperioptic -- npx -y aperio-mcp
  • Claude Desktop: download aperio-mcp.mcpb and open it, or add the entry below to claude_desktop_config.json.
  • Cursor and other MCP clients: add the same entry to their MCP settings.
{ "mcpServers": { "aperioptic": { "command": "npx", "args": ["-y", "aperio-mcp"] } } }

Then ask in plain words, for example: "Open the Cooke triplet sample, refocus it for the smallest spot, and show me the spot diagram." The tools:

  • search_calculators, run_calculator: the calculators.
  • list_samples, get_sample, import_zmx, describe_design: open a sample, a .zmx file or a design file, and list its surfaces and values.
  • analyze: RMS spot, centroid, wavefront error, Strehl ratio, MTF, best focus and Zernike terms, per field.
  • optimize: the optimizer, on variables with bounds. sweep: one value (or two) over a range, as a table.
  • picture: the design as an image the assistant can see: the layout with its rays, spot diagrams, PSF, OPD, MTF, Zernike terms, or through focus.
  • glass_index: a catalog glass's index at a wavelength.
What the picture tool returns: the Cooke triplet sample's layout, traced.
What the picture tool returns: the Cooke triplet sample's layout, traced.

Every design the assistant makes comes with a link that opens it here, so you can look at it yourself.

In the browser: WebMCP

In a browser that supports WebMCP, every page of this site offers an assistant working in the tab the tools search_calculators, run_calculator, open_page, list_samples, open_sample and open_design. They run in the page; nothing is uploaded.

Without tools: links

Any assistant that can write a link can show you a result. A calculator's page takes its inputs in the address (/calculators/thin-lens-equation?f=100&do=400), and a whole design travels in a link (see Saving and loading). How to write both is in the site's agent skills and llms.txt.

17. Conventions and limits

  • Lengths are in the unit chosen in settings (millimetres by default); wavelengths in nanometres.
  • The tracer is geometric and non-sequential: rays meet surfaces in whatever order the geometry gives. Rays carry no phase between surfaces beyond their optical path, and there is no diffraction between surfaces: the Interference tab sums the beams at the detector only.
  • Detectors are flat; a system with a curved image surface (a Schmidt camera, say) is sharpest at each field's own best focus.
  • Everything runs in your browser. Designs stay on your computer unless you save them somewhere.