Quickstart
The window
The top part is the side view: the optical axis seen from the side, with light travelling left to right, a brown dashed line for the source plane and a green dashed line for the image plane. The distances between things are written along the bottom. The glyph in the bottom-left corner shows that z runs to the right and y up; every length on the bench is in mm. Below the side view are three groups of plots, each with its own tabs.
The status bar along the bottom gives the image position, RMS spot size, focal length (EFL), back focal length, f-number and Airy radius, and any warnings. While the light leaves the last lens collimated, it describes that beam instead. The button at its right end gives the transmission and pulse dispersion of the lenses.

Two strips are always on the window:
- Tool palette: the narrow strip down the left, with the name of each tool under its icon. One tool is active at a time. See Tool palette.
- Context bar: the strip across the top. It shows the settings of the active tool, or of what you have selected. At its right end are the controls for named designs, the project’s name and the Lock focus button.
Menus
A new window starts with one lens, an ACT508-200-A achromat.
- File starts, opens and saves designs, imports and exports Zemax files and exports STEP files for CAD (see Files and reports). Open Recent lists the last five files, and New from Example starts from a ready-made design.
- Edit has Undo and Redo, with the shortcuts for them.
- View has the Web report, View bench, Image simulation, Show 3D View and Teaching overlays.
- Help opens these pages and the optics tutorials, and has the same examples as the File menu.
Example designs
Help → Examples (or File → New from Example) puts one of these on the bench, ready to change:
| Example | What it is |
|---|---|
| Galilean beam expander | A negative and a positive lens that widen a 2.5 mm HeNe beam 4 times |
| Galilean telescope | A 10× telescope with a negative eyepiece, looked through by a model eye |
| Keplerian telescope | The same objective and eye with a positive eyepiece, the eye at the exit pupil |
| 4f scan system | A scan mirror, a Plossl scan lens and a tube lens, with the scanned beams meeting at a back aperture |
| Basic microscope | An infinity-corrected microscope made of two paraxial lenses |
Tools
Tool palette
Each tool is chosen from the tool palette, and its settings appear in the context bar.
| Tool (key) | What it does |
|---|---|
| Move V | Drag, select and right-click things on the bench. The normal tool. |
| Add paraxial lens P | Place ideal thin lenses |
| Add catalogue lens L | Find and place a real lens |
| Add user part U | Place one of your saved parts |
| Add aperture A | Place a variable aperture (iris) |
| Add detector D | Put a detector on the image plane |
| Add field R | Add and edit the light entering the bench |
| Focus | Not a tool but a button: autofocus moves the image plane to best focus, once |
Esc goes back to Move.
Focus
Focus (autofocus), at the bottom of the tool palette, moves the image plane to the best focus of the selected field. The Lock focus button (the padlock at the right of the context bar) keeps it there as you change the design, as long as that focus is within the side view. You can also drag the green image line.
Light that leaves the lenses collimated has no focus, so the image plane goes somewhere else that means something:
- Beams at one angle (a beam expander, say): just behind the last element. If every beam is also collimated and along the axis, autofocus puts the source plane on the first lens too, unless its gap is locked.
- Beams at two or more angles, or object points: where the source plane is imaged, which is where the beams cross. In a 4f system with the source plane at a scan mirror, that is the back focal plane of the second lens.
Lock focus moves only the image plane. If there is nowhere for the image plane to go, for instance when the light diverges, it stays where it is.
Lenses
Add a catalogue lens
- Choose Add catalogue lens (L). The lens browser appears at the bottom right, and its filters in the context bar: positive and negative lenses, focal length, diameter and coating.
- Type part of a part number in the search box (for example
AC254), or open the groups, and select a lens. - Click on the axis to put the lens where you want it. Esc or right-click cancels.
By default only lenses whose coating suits the wavelengths of your fields are listed. If a lens you expect is missing, set the coating filter to All coatings.

Add an ideal (paraxial) lens
Choose Add paraxial lens (P), set the focal length and diameter in the context bar (the ± button makes a diverging lens), then click on the axis. The tool stays active, so you can place several; the other add tools go back to Move after one. With Move, click a paraxial lens to change its focal length or diameter.
Move, flip and delete
- Drag a lens along the axis; the plots follow. Drag it past the middle of its neighbour to swap their order.
- Right-click a lens to flip or delete it, or press F or Delete with the pointer over it.
Replace a lens
Right-click a lens to swap it for another without rebuilding the design, for example to turn a sketch made with paraxial lenses into real parts.
- Replace with same f… lists lenses of the same sign and within 10% of its focal length.
- Swap lens… lists every lens.
- Replace with paraxial puts an ideal lens of the same focal length in its place.
Choose in the lens browser and press Replace. The new lens goes where the old one’s rear principal plane was, so a collimated beam still comes to a focus in about the same place. A locked gap next to the lens keeps its length instead. A lens that would overlap a neighbour is refused. For one lens of a Plossl pair you are asked what to do about the pair.
Focal points and snapping
Point at a lens, or select it, to see its focal points F (in front) and F′ (behind), each with its distance from the glass. An assembly is treated as one optic, with one pair of focal points. They are calculated at the selected field’s wavelength.

- Snapping. While you drag or place something, the focal points of the other lenses and the places where the selected field comes to a focus are marked, and what you are moving snaps to them. An aperture snaps by itself; a lens also by its own F or F′, so you can put an objective’s focal plane on a tube lens’s. The source and image planes snap too. Hold Alt (Option on a Mac) to move freely.
- Move to. Right-click a lens or aperture and choose Move to to put it exactly on one of these planes. The move is refused if something is in the way.
Is a plane on a focal point?
Relays and infinity-corrected systems rely on a plane being on a focal point: the source or object plane on F of the first lens, the image plane on F′ of the last, an aperture on F or F′ of the lens beside it. The label of the gap between them says = F or = F′ when it is. When the output is collimated, and comes from beams at two or more angles or from object points, a label on an orange ground, such as 9.2 off F, warns of a plane that is close to a focal point but not on it.
If replacing or flipping a lens, or making a Plossl pair, takes a plane off a focal point it was on, a bar appears above the side view. Move back puts the plane on the new focal point.

Gaps and locks
A gap is the air distance along the axis, from the back of one lens or aperture to the front of the next, or from the last one to the image plane.
Type a gap
Click the gap’s label, enter the distance and press Return. Everything behind it, including the image plane, shifts together, so no other gap changes. A value that would make surfaces overlap, or put the image plane less than 1 mm behind the last element, is refused and the smallest allowed value is shown.
Lock a gap
Right-click the gap’s label and choose Lock gap, or Unlock gap to release it. A locked label has a box round it. Lenses joined by locked gaps move as one.

Let RayCrafter find a gap
Right-click an unlocked gap (not the one to the image plane) to have its length worked out:
- Collimate output… finds the length at which the rays leaving the last lens are parallel. Where there is a choice, Collimate after … measures the light leaving the lens or assembly behind the gap, and Collimate system output… the light leaving the last lens.
- Focus on image plane… finds the length that gives the smallest spot on the image plane, which stays where it is. It is greyed out while Lock focus is on.
Real rays of the selected field are used, and a length that clips rays is never chosen. A window shows the gap and the result before and after; press Apply to accept, with Lock the gap ticked if you want to keep it. If a lens next to the gap would do clearly better the other way round, the window says so and offers Flip and apply. If the best length is at the end of the allowed range, there may be no true solution.
The gap from the source plane can be optimised too, for example to collimate a point source.
Lock the gap to the image plane
The image plane then moves with the last lens. Autofocus and Lock focus are unavailable. Likewise, while Lock focus is on, that gap cannot be typed or locked.
Locked gaps when adding or deleting
- A new lens cannot go into a locked gap. While you place it, it jumps to the nearest space where it fits, and is drawn red if it fits nowhere. An aperture can go into a locked gap.
- While the gap to the image plane is locked, a new lens cannot go behind the last lens.
- Deleting a lens leaves the new, wider gap unlocked. The exception is the gap from the source plane: if it was locked, it stays locked at the same distance from whichever lens is now first.
Assemblies and user parts
An assembly is a group of neighbouring lenses (and apertures) that moves and flips as one. It is drawn in purple, and pointing at one of its lenses shows the assembly’s name.
Make an assembly
- Put the lenses where you want them relative to each other.
- Lock the gaps between them.
- Right-click one of the lenses and choose Make assembly.
Flip, split or delete
- F, or Flip assembly, turns the whole group round: the order is reversed and each lens is flipped.
- The gaps inside an assembly are fixed. Split assembly releases the lenses so you can change them.
- Deleting one of its lenses also dissolves it. The other gaps that were inside it stay locked.
User parts
- Right-click an assembly and choose Save as user part to store it under a name. RayCrafter asks before replacing a part of the same name.
- To use it, choose Add user part (U), pick the part in the context bar and click on the axis. A copy is placed in your design as an assembly. Parts are available in every design: see where they are kept.
Plossl pairs
Right-click a positive catalogue lens and choose Make Plossl. RayCrafter adds a second copy of it, turns the two to face each other 1 mm apart, centres the pair where the single lens was and makes it an assembly. The design is then refocused (unless the gap to the image plane is locked). Locked gaps keep their length, and a pair that would overlap anything is refused. The option is not available for a paraxial or negative lens, or one that is already in an assembly. Split assembly separates the two again.
Apertures and the detector
Add an aperture
Choose Add aperture (A) and click on the axis. A new aperture is open: it is drawn a little wider than the light and blocks nothing. Select it with Move and use the slider in the context bar to set its diameter, from 0 (closed) up. The right end of the slider opens it again.
A set aperture blocks the rays outside it. Because it takes up no space, it can be placed or dragged into a locked gap or an assembly, for example at a focus inside a relay, and moves past lenses without pushing them.
Choose the aperture stop
Right-click a lens or an aperture and tick Aperture stop. It is tagged stop in the side view. A design has one stop at most. A lens used as the stop limits the light at its front surface. An open aperture keeps its present size when it becomes the stop, and cannot be opened while it is the stop.
Make the fields fill the stop
Choosing a stop does not change the light. To do that, tick Fields fill the stop in the field panel. Every field’s rays are then aimed so that they just fill the stop, with the chief ray through its centre:
- a beam keeps its angle and vergence, and the stop sets its width and offset;
- an object point keeps its position, and the stop sets its direction and numerical aperture.
The sliders for the values set by the stop are greyed out and show the calculated values. Closing the stop then narrows the beams rather than blocking most of their rays.

The status bar warns you if a field cannot fill the stop (it is then traced as typed; this happens, for instance, if the stop is where a beam comes to a point), or if a lens or another aperture clips the light before the stop does. In a large design with the stop behind many lenses, redrawing is slower.
Mark a back aperture
To see the beams on one lens or aperture, such as the back of an objective, right-click it and tick Back aperture. It is tagged in the side view, and the Back aperture tab shows the light on it. The mark changes no optics.
The detector
A detector is the active area of a sensor on the image plane, such as a camera chip or a photomultiplier. A design can have one, round or rectangular, centred on the axis.
- Choose Add detector (D), set its shape and size in the context bar, and click: the image plane moves there, with the detector on it.
- Select it with Move to change its shape or size, or to Remove it. Delete with the pointer over it also removes it.
- The Detector tab shows where each field’s light meets the image plane, and what share lands on the detector.

The share is of the light that sets out, so light lost at lens rims or apertures counts as lost. It assumes the light is uniform across each beam and ignores losses in the glass; it is good to about half a percentage point. The detector blocks no rays.
Fields and the source plane
Fields (beams)
A field is light entering the bench. Choose Add field (R) to show the field panel at the bottom right.

- Values. Each beam has a width, angle, vergence, offset and wavelength. Use the sliders for common values; the boxes accept a wider range.
- The list. + adds a copy of the selected field and − removes those selected. The rays of the selected field are drawn thick.
- Colour by colours all fields by Wavelength (the default), Angle, Offset or My choice. The colour strip, or the colour wheel, gives the selected field a colour of your own. A colour does not change the wavelength.
- Rays per field sets how many rays are drawn for each field in the side view and report: an odd number from 3 to 31 (normally 5). It does not affect the analyses.
- Fields fill the stop: see above.
The spot diagram, side view and detector show every field. The through-focus, MTF, ray fan and field curvature plots, the f-number, Autofocus, gap optimisation and the marked foci use the selected field.
The source plane
A beam’s width, offset, angle and vergence are those it has at the source plane, which can stand for a light source or a scan mirror. By default it sits at the front of the first lens and moves with it.
Move the source plane
- To place it elsewhere, right-click the source label and unlock it. Then drag the dashed line, or click the gap in front of the first lens and type the distance.
- Dragging the line moves only the source plane. Typing the gap leaves the source plane where it is and moves the lenses and image plane.
- While unlocked, the source plane stays put when lenses move, and no lens can be moved in front of it.
Beam offset
Offset is the height of the beam’s centre at the source plane. With an offset of 0, beams at every angle pass through the axis there, as at a scan mirror.
A finite object
Fields are normally beams, from an object at infinity. To image an object at a finite distance, set Light in the field panel to Object points. Every field is then a point on the source plane, now labelled object, with a height (y and x) and a numerical aperture (NA) that sets the width of its cone of light. A design has either beams or object points, not both. If the source plane was on the first lens, switching moves it to the lens’s front focal plane.
With a finite object the status bar also shows the magnification (M) and where the selected point is imaged, and the Distortion plot is available. No f-number is shown.
Example: a basic microscope
Help → Examples → Basic microscope builds an infinity-corrected microscope from two paraxial lenses: an f = 10 mm objective and an f = 200 mm tube lens, with a point on the axis and one 0.5 mm off it. Try replacing the lenses with real ones.

Beginner tools
Two tools for learning the optics, built into RayCrafter.
Teaching overlays
View → Teaching overlays draws the ideas of first-order optics on the side view, for the selected field. Each of the four groups can be switched on by itself:
- Chief and marginal rays: the real rays through the centre and the edges of the aperture stop.
- Stop and pupils: the aperture stop and its images, the entrance and exit pupils.
- Focal points and principal planes: F and F′, the principal planes P and P′, and the nodal points N and N′.
- Focal lengths and distances: effective focal length, front and back focal distances and working distance.
Point at anything drawn for a one-line explanation. The field’s own rays are faded while an overlay is on. If no aperture stop is chosen, the front of the first lens stands in for it. The web report has the same overlays, behind its Tutorial switch.


Optics tutorials
Help → Optics tutorials opens guided lessons in your web browser. As you step through a lesson, RayCrafter puts each step’s design on the bench, with the plots and overlays it talks about, for you to change and explore. Switch to RayCrafter on the lesson page and Switch to lesson in the window take you from one to the other.
- Camera lenses and focal length
- Real lenses against paraxial lenses
- Telescopes and afocal systems
- 4f scan systems and pupil relays
- The infinity-corrected microscope
Your own design, named designs and undo history are set aside while a lesson runs, and come back when it ends. During a lesson the named designs are the lesson’s steps.
You can also read the lessons online, without RayCrafter.
Designs and views
Named designs
A project can keep several variants of a design, such as a relay with singlets and the same one with achromats, so that you can switch between them and compare them. Each named design is a whole copy of the bench: lenses, fields, image plane and the rest. The controls are at the right of the context bar.

- + Keep design (afterwards just +) keeps the bench under a name, with a note if you like.
- The drop-down puts another design on the bench. Alt (Option on a Mac) with the left or right arrow steps through them. A design shows (edited) once you change the bench, and before another is chosen RayCrafter asks whether to keep the changes.
- Update keeps the changes in the current design.
- ⋯ renames the current design, changes its note, or forgets it.
- Compare opens a page in your web browser with every design side by side: the first-order numbers and the main plots. Plots in a row share their scales. Click one to see it large, and use the arrow keys to step through the designs.

Named designs are saved in the project file.
3D view
View → Show 3D View opens a window showing the lenses and rays in three dimensions. Drag to turn it, or use the 3D, Side, Top and End buttons. It catches up once you stop changing the design.
The Bench list
View → View bench lists the lenses and apertures (with vendor, size and surface numbers), the fields and the image plane. Click a row to highlight that item in the side view. You can delete items and fields from here.

The numbers in this list are the ones scripts and AI agents use. They start at 0, and lenses and apertures are numbered together from left to right.
Shortcuts
| V | Move tool |
| P, L, U | Add a paraxial lens, catalogue lens or user part |
| A, D, R | Add an aperture, detector or field |
| F | Flip the lens, or assembly, under the pointer |
| Delete or Backspace | Delete what is under the pointer |
| Esc | Cancel placing, and go back to Move |
| Alt (Option) while dragging | Do not snap |
| Alt (Option) + ←, → | Previous, next named design |
| Ctrl/Cmd + Z | Undo |
| Ctrl/Cmd + Shift + Z | Redo (also Ctrl + Y on Windows) |
| Ctrl/Cmd + N, O, S | New, open, save |