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

Examples / Fundamentals / Imaging with one lens

Imaging with one lens

An object 150 mm before a lens of 100 mm focal length: the rays from its tip meet again 300 mm behind the lens, in an image twice the size and upside down.

Open in the canvas →

A live trace of the setup above, shown as a picture. Open it in the canvas to take it apart, retune it, and save or export it as your own.

Background

A lens bends every ray from one point of an object so that they meet again at one point: the image of that point. For a thin lens, the distance s from the object to the lens and the distance s′ from the lens to the image obey 1/s + 1/s′ = 1/f, where f is the focal length, positive for a converging lens[1]. The image is m = −s′/s times the size of the object. A negative m means the image is upside down[1].

Three cases follow from that one equation. With the object further away than f, the rays converge behind the lens to a real image, which a screen or a sensor placed there shows[1]. With the object exactly at f, the rays leave parallel and the image is at infinity[1]. With the object closer than f, the rays still diverge after the lens, as if they came from a larger, upright image on the object's side: a virtual image, which cannot be caught on a screen, and the way a magnifying glass is used[1].

What this setup demonstrates

An Object 15 mm tall stands 150 mm before a thin lens of f = 100 mm. The Object is centred on the axis, so its tip is 7.5 mm above it. It sends five rays from its tip, spread over the central part of the lens. They cross again 300 mm behind the lens, 15 mm below the axis: twice as far from the axis as the tip, and on the other side. The Object draws the image it forms there, an arrow 30 mm tall that points down, and its inspector reads Image 300 mm after Lens · m = −2.00 · real, inverted, which is what the equation gives: 1/150 + 1/300 = 1/100 and −300/150 = −2. The rays end on a screen that stands 1.5 mm behind the image, so that its edge does not hide the drawn image. The two rulers mark s and s′.

Things to try, by dragging the Object along the axis (the screen stays where it is, so the rays no longer meet in front of it):

sThe Object's readout
300 mmImage 150 mm after Lens · m = −0.50 · real, inverted
200 mm (2f)Image 200 mm after Lens · m = −1.00 · real, inverted
125 mmImage 500 mm after Lens · m = −4.00 · real, inverted
100 mm (f)Image at infinity after Lens (collimated)
60 mmImage 150 mm before Lens · m = 2.50 · virtual, upright

Change the focal length instead and the same readout follows. The Imaging with lenses calculator plots the image distance and the magnification against the object distance, for this thin lens and for a real, thick one.

What you won't see

The lens is an ideal thin lens: it sends every ray from one point to exactly one point, whatever the ray's height on the lens or its colour. A real singlet does not: rays through its edge focus closer than rays near its centre, and blue focuses closer than red. The spherical aberration and axial colour examples show both with real glass.

The image the Object draws, and its readout, come from a paraxial construction through the lens, not from the drawn rays. With an ideal lens the two agree. Nothing is diffractive: the image has no resolution limit, and the screen records no brightness.

Related components

References

  1. Wikipedia — Lens (the thin-lens formula, magnification, real and virtual images)