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 →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:
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.
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.