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 / Dispersive elements / Freeform glass

Freeform glass

Refracts light through an editable outline of straight edges and circular arcs, with a constant refractive index or wavelength-dependent catalogue glass.

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

Real glass optics are rarely limited to a lens's spherical curve or a prism's flat triangular faces — aspheric correctors, light pipes, freeform illumination optics, and hand-ground custom prisms all refract light through an arbitrary boundary shape. However exotic the outline, the physics at every point on the surface is the same vector Snell's law that governs a plain prism or lens face; only the local surface normal changes from point to point.

This is also literally how any CAD or ray-tracing renderer handles a smoothly curved optical surface in practice: an arbitrarily smooth boundary is approximated as a fine mesh of flat facets (or, for a closer fit, circular arcs), each refracting independently, with the approximation error shrinking as the facets get smaller. A coarse hand-built approximation and a smooth manufactured asphere differ only in how fine that mesh is.

n1sin⁡θ1=n2sin⁡θ2n_1 \sin\theta_1 = n_2 \sin\theta_2
Snell's law, applied independently at every straight or curved boundary segment — the only physics a freeform refracting surface needs.
n2(λ)=1+∑iBiλ2λ2−Cin^2(\lambda)=1+\sum_i\frac{B_i\lambda^2}{\lambda^2-C_i}
The optional catalogue glasses use the same Sellmeier curves as the thick spherical lens.

In OpticalSetup

The boundary is drawn as a chain of straight edges and true circular arcs — editable directly on the canvas by dragging anchor and curve-control points — and each segment becomes its own independent refracting surface, so a completely custom cross-section (a light pipe's tapered profile, a freeform prism, a corrective wedge) refracts and totally-internally-reflects exactly like the fixed-geometry Prism, just without being locked to a triangle. Choose a constant refractive index or a catalogue glass: fused silica, calcium fluoride (CaF₂) and the SCHOTT glasses N-BK7, N-FK51A, N-SK16, F2, N-SF5, N-SF10, N-SF11, N-SF14, N-SF57 and N-LASF9, or one of 74 more from the SCHOTT, OHARA, CDGM and HOYA catalogues. A broadband beam through a catalogue-glass boundary is sampled by wavelength and visibly disperses into a spectrum.

Simplified vs. reality

The catalogue options use published Sellmeier curves, so GDD follows the actual traced distance and is generally within a few percent where those curves are valid. Absorption bands, coatings and temperature are not modeled. With Surfaces set to Per-surface transmission, the default, each face applies a flat configured percentage and total internal reflection acts as an ideal mirror. Set to Bare glass (Fresnel), each face transmits s and p by the Fresnel equations at the angle the ray actually meets it, as a prism's faces do, and total internal reflection shifts the phase of s against p; the reflected part of the light is not traced. Circular-arc segments are true 2D arcs, but the whole element is still a 2D cross-section — it represents a freeform profile, not a true freeform 3D surface. Nested or overlapping glass bodies are not surface-merged.

Related components

Further reading