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 / Ruler

Ruler

Measures a distance on the bench and labels it, with Markdown and LaTeX in the label.

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 state the distances that matter: a lens placed one focal length from a pinhole, the separation of a 4f relay, the length of a delay arm. A dimension line with its value says it on the figure itself.

In OpticalSetup

Select the ruler and drag one of the round handles at its ends: that end moves and the other stays where it is. Dragging the line or the label moves the whole ruler, and the inspector sets the length by number. Shift keeps the line to 45° steps.

With auto clamp, on by default, a handle clicks into place near what a measurement usually starts from: a component's centre or its optically active point (a laser's aperture, an objective's tip), another ruler's or goniometer's handle, a bend in a beam such as its fold at a mirror, or a beam's axis; away from these it falls back to the grid when Snap is on. The beam axis is the central ray of each traced beam, a ray drawn on its own (a laser drawn as a line, each ray of an object's fan), or an arrow drawn as a beam; a point source has no single axis, so only its centre is a target. Hold Alt to place freely.

The label is Markdown, as in a text label, with LaTeX formulas between dollar signs, and {value} in it is replaced by the measurement with the chosen number of decimal places. Inside a formula the unit is set upright, and a label without {value} shows no number at all.

The distance is in bench millimetres, the coordinates the tracer computes in. $f = {value}$ reads f = 100.0 mm. The label runs along the line, above or below it, and turns so it never reads upside down. The line can carry arrowheads and graduation ticks at a 1-2-5 step. For an angle, use the goniometer.

The example reads a lens's focal length off the bench, from the lens to where the beam crosses.

Simplified vs. reality

The ruler measures the drawing: the straight distance between its two handles, not an optical path length, which would also depend on the indices of the media between them. It does not attach to a component or follow a beam: a handle clamped to a part stays where it was put when the part moves. The ruler is diagram-only and never absorbs or redirects rays.

Related components