Wiki / Mirrors / Mirror

Mirror

Reflects rays with configurable size and reflectivity.

Open in the canvas →

Click the mirror to see its live specs and try its parameters — this mini canvas can't be moved, deleted, or added to.

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 reflecting off a surface with unit normal 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=(n1n2n1+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.

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.

Related components

Further reading