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 / Mirrors / Mirror

Mirror

Reflects light from a flat surface with adjustable size and reflectivity, for folding beam paths and controlling the power sent onward.

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

Reflection at a smooth interface follows the law of reflection: the angle of incidence equals the angle of reflection, both measured from the surface normal, with the incident and reflected rays in the same plane. In vector form, an incident direction d̂ reflecting off a surface with unit normal n̂ becomes:

d^′=d^−2(d^⋅n^) n^\hat{d}' = \hat{d} - 2(\hat{d}\cdot\hat{n})\,\hat{n}
Vector form of the law of reflection.
R=(n1−n2n1+n2)2R = \left(\frac{n_1 - n_2}{n_1 + n_2}\right)^{2}
Fresnel reflectance at normal incidence for an uncoated dielectric interface — real mirrors instead use a metal or multilayer dielectric coating engineered for R close to 1 (or a deliberately partial value for an output coupler).

In OpticalSetup

OpticalSetup implements the exact vector law of reflection shown above — the mirror surface's normal is computed from its two drawn endpoints, so rotating or resizing a mirror changes the reflected direction correctly at any angle. Reflectivity is a single configurable percentage: at 100% every ray reflects; below that, each incident ray splits into a reflected branch carrying fraction R of the intensity and a transmitted branch carrying 1 − R, which is how a partially-reflective cavity mirror or output coupler is modeled.

The reflection also changes the polarization the way an ideal mirror does. The s direction points out of the screen and stays put, while the p direction, in the drawing plane and perpendicular to the ray, turns over with the ray. In Stokes terms s₁ is kept and s₂ and s₃ change sign: p and s light come back as they went in, one diagonal becomes the other, and right circular light becomes left circular. Every specular reflection in the app does this, from dichroics and beamsplitters to gratings and the two faces of a retroreflector, so two mirrors give the state back and one does not.

Mmirror=diag⁡(1,  1,  −1,  −1)M_{\text{mirror}} = \operatorname{diag}(1,\;1,\;-1,\;-1)
The Mueller matrix of an ideal mirror, acting on (S₀, S₁, S₂, S₃) in the basis of the ray: p in the drawing plane, s out of it.
Simplified vs. reality

Reflectivity is a single flat number: real coatings vary with angle of incidence and polarization (s- vs p-plane), and a metal mirror's reflectance varies with wavelength. None of that is modeled — R is constant regardless of incidence angle, polarization, or color. The polarization change is that of an ideal mirror: the small phase difference a real metal or dielectric coating adds between s and p, which turns linear light slightly elliptical, is not modeled.

Related components

Further reading