Free software

About OpticalSetup

Copyright © 2026 Luca Genchi and contributors.

OpticalSetup is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

It is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

The numbers OpticalSetup reports come from models with stated limits; read each component's page in the wiki before relying on one.

If you use OpticalSetup in your research, teaching or publications, please cite the software:

Bertoncini, A., & Genchi, L. (2026). OpticalSetup - the optical workbench software [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23191537

Wiki / Annotations / Zoom

Zoom

Draws a region of the setup again, enlarged, elsewhere on the canvas, with an optional scale bar, so small features such as a displaced focus become visible.

Open in the canvas →

A live trace, not a picture of one — but this preview is not interactive. Open it in the canvas to move things, change parameters, and save or export your own version.

In the real world

Figures of optical setups often carry an enlarged inset of a small region: the focus of an objective inside a specimen, the overlap of two beams in a crystal, the walk of a scanned spot. The inset is joined to the region it enlarges by an outline and connector lines, and a scale bar tells the reader what the enlarged distances are.

In OpticalSetup

Place a zoom and drag its region onto the part of the setup to enlarge: the outline of the region is what you grab, so the components inside it stay selectable. The view shows that region at the chosen magnification and can be dragged anywhere on its own; dragging the region aims it while the view stays where it is, and nudging with the arrow keys moves both. The blue handles resize the region about its centre. The magnification is set by dragging a purple corner of the view, which grows or shrinks it while the opposite corner stays put, or with the purple knob. Choose a circle, an ellipse or a rectangle; the view has the same shape. A rectangle or an ellipse can be turned with the round handle to lie along a tilted beam: both shapes turn, the view stays where it is on the bench, and the enlarged bench keeps its orientation, so a tilted beam is still tilted in the view. The outlines of the region and of the view can be drawn dashed together, the connector lines on their own, and the connector lines can be turned off.

Shapes grow with the magnification, but lines keep their weight, so a traced ray stays a fine line and the view shows where rays really cross. Beam envelopes are areas and grow with everything else. Pulse packets pass through the view as they cross the region: a schematic packet keeps its size, as a mark does, while a physical packet's length, c times its duration, grows with the magnification. Text labels, arrows, probes and other zooms are not enlarged: they belong to the figure rather than to the bench, and a label placed after the zoom can be drawn on its view. The scale bar measures bench millimetres, the coordinates the tracer computes in; left at 0 its length is chosen automatically, and a length that would not fit is shortened, with the label naming the length drawn. The bar is horizontal, along the region's width, or vertical, along its height, with its label beside it reading upwards; on a turned rectangle or ellipse it follows the turned sides, and on a circle it stays level or plumb.

Traced rays meet at a geometric point, which no real beam reaches. With Diffraction-limited focus, on by default, every beam that focuses inside the region is drawn with the waist an ideal Gaussian beam would have in the same cone: its 1/e² radius w(z) = w₀·√(1 + (z/zR)²), with w₀ = λ/(π·NA) and Rayleigh range zR = π·w₀²/λ, and a note at the top of the view naming w₀ and zR, which has its own switch. The focus is found as a volume specimen finds it: the plane where the beam's sampling rays spread least, with the numerical aperture of its outermost rays and the light's centre wavelength. Far from the focus the envelope meets the rays' cone, so it joins the traced beam. A beam's waist is usually microns wide, so it shows at high magnification, or for a slow beam; the note names it whatever the magnification, when the view is large enough to hold it. Rays leaving an emitter and a virtual focus behind a diverging optic get none.

The example scans a galvo slowly in front of a lens. The zoom sits on the focal plane, where the focus walks sideways as the mirror turns, and the scale bar shows how far.

Simplified vs. reality

The view shows the traced geometry and nothing more. Rays are ideal lines: an ideal focus stays a point however far it is enlarged. The diffraction-limited focus is the ideal Gaussian (M² = 1) waist of the rays' cone in air, not a wave-optics calculation: aberrations, a medium's index, clipping by an aperture and a beam's real M² are not computed, the drawn bundle's outermost rays are taken as its 1/e² edge, and a broadband beam is taken at its centre wavelength. A component's drawing is enlarged as drawn, which for many parts is schematic rather than to scale. The view shows the bench's own pulse packets: where the time scale draws a train as steady light, so does the view, and a packet crosses a small region only briefly. The zoom is diagram-only and never absorbs or redirects rays.

Related components