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

Glass rod

Refracts light through a glass rod with adjustable dimensions and material, including total internal reflection and pulse dispersion along the traced path.

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

The geometry OpticalSetup draws for a glass rod is a plane-parallel slab: two flat, parallel long faces and two flat ends — the classic "glass block" of an introductory optics course. At normal incidence, light passes straight through with no net angular deviation but a real velocity change: phase velocity inside the medium drops to c/n, so light takes longer to cross the same physical distance than it would in vacuum or air — the basis of every optical delay produced by inserting glass into a beam path, from picosecond fiber-stretcher spools to the fraction-of-a-picosecond thickness of a camera sensor's cover glass.

At any nonzero angle of incidence, Snell's law bends the ray at entry and bends it back by the same amount at exit — the two parallel faces cancel the angular deviation exactly — but the beam still emerges shifted sideways from where it would have gone straight through, a lateral displacement that grows with thickness, incidence angle, and index. It's the same "apparent depth" effect that makes a straw look bent in a glass of water, just viewed from the side instead of from above.

Δt=nLc−Lc=(n−1)Lc\Delta t = \frac{nL}{c} - \frac{L}{c} = \frac{(n-1)L}{c}
Extra transit time a slab of thickness L and refractive index n adds compared to the same distance in vacuum — equivalently, an extra optical path length of (n − 1)L.
d=t sec⁡r sin⁡(i−r)d = t\,\sec r\,\sin(i-r)
Lateral displacement of a beam through a plane-parallel slab of thickness t, for incidence angle i and refraction angle r (related by Snell's law) — zero at normal incidence, growing with angle, thickness, and index.

In OpticalSetup

The rod is four independent flat refracting boundaries — two long faces and two ends — each obeying the exact vector form of Snell's law and total internal reflection used by every dielectric surface in the app, so tilting the rod at an angle reproduces the real lateral-displacement geometry above, not an idealized straight pass-through. Inside the medium, the tracer accumulates optical path length as geometric distance × refractive index; on the shared pulse-timing overlay this means a packet visibly slows down while crossing the rod, lagging a same-time packet on a vacuum path by exactly the extra delay the formula above predicts for the configured index. The rod's fill is deliberately translucent so that lag is something you can actually watch happen, rather than a number hidden behind an opaque block. Choose the legacy constant index or one of the four catalogue Sellmeier glasses. A catalogue material also accumulates GDD from the actual distance each ray travels inside the rod.

Simplified vs. reality

The default remains a single constant index so every existing saved rod keeps its authored behavior; that mode has no material GDD. Selecting a catalogue glass enables Sellmeier refraction and path-length GDD, generally within a few percent where the curve is valid, but still omits absorption, temperature, coatings, and higher-order pulse effects. Its faces transmit a fixed 96 % each by default, and total internal reflection at the side walls acts as an ideal mirror; set Surfaces to Bare glass (Fresnel) and each face transmits s and p by the Fresnel equations at its real angle, while total internal reflection shifts the phase of s against p. There's no cylindrical or lensing geometry either: despite the name, this is a rectangular slab cross-section with flat ends, not a focusing rod lens.

Related components

Further reading