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

Diffuser

Spreads incident light into an adjustable angular fan, a qualitative model for comparing illumination coverage and the light collected downstream.

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

An optical diffuser scatters a beam into a cone of directions by refracting light through a microscopically rough or engineered surface — ground or frosted glass, a holographic diffuser with an embossed random microstructure, or an engineered "top-hat" diffuser designed for a specific divergence angle and intensity profile. Each microscopic facet still obeys ordinary Snell's law; what differs from a diffuser to a plain glass window is only the local surface normal, which varies randomly (or by design) from point to point at a scale far smaller than the beam.

Diffusers homogenize illumination and convert a laser's narrow beam into broad, uniform lighting — and, critically for coherent sources, reduce speckle. A static diffuser illuminated by coherent laser light produces a grainy interference pattern (speckle) from the random path-length differences between scattered wavelets; spinning the diffuser fast enough that its pattern changes within a camera's or eye's integration time averages that speckle out into smooth illumination.

I(θ)∝exp⁡ ⁣(−θ22σ2),FWHM≈2.355 σI(\theta) \propto \exp\!\left(-\frac{\theta^{2}}{2\sigma^{2}}\right), \qquad \text{FWHM} \approx 2.355\,\sigma
A common engineering model for a ground-glass diffuser's angular scattering profile — its divergence is usually specified by this FWHM cone angle.

In OpticalSetup

Each incident ray is split into a small fan of rays (five, for a single traced ray), scattered within the configured divergence half-angle around the original direction. The scatter angle for each ray isn't randomized frame to frame — it's a deterministic pseudo-random offset computed from the surface's own ID, so the same diffuser always produces the exact same fan on every render, which is what keeps the speckled pattern stable and inspectable rather than flickering as you pan or re-render the sketch.

Simplified vs. reality

Divergence is set directly as a configured half-angle rather than derived from any surface-roughness or microstructure spec, and the scattered directions are a small fixed-count sample (five rays for a single incident ray) rather than a continuous or wavelength-dependent angular distribution — there's no Gaussian or top-hat irradiance profile actually computed, just a jittered fan. The speckled look is a fixed, deterministic pattern with no real interference behind it: unlike true laser speckle, it never changes with viewing angle, beam position, or a spinning diffuser, since no coherence or interference is modeled anywhere in the app.

Related components

Further reading