Specular reflection (source code)

= Specular reflection
{title2=$\mathbf r=\mathbf i-2(\mathbf i\cdot\mathbf n)\mathbf n$}
{wiki}

At a smooth mirror with unit <normal vector> $n$, an incoming unit direction $i$ has outgoing direction $i-2(i\cdot n)n$. Thus the incident and reflected rays make equal angles with the normal.

More precisely, <specular reflection> redirects each incident <light ray> into the direction prescribed by the <law of reflection>, rather than spreading it over many outgoing directions. The incident <light ray>, reflected <light ray>, and local <normal vector> lie in one plane. The surface must be sufficiently smooth on the scale of the <wavelength> for this model to describe its reflected beam; a visibly flat surface can still scatter <light> if its microscopic roughness is appreciable. https://openstax.org/books/university-physics-volume-3/pages/1-2-the-law-of-reflection[OpenStax: The law of reflection]{ref}.

The displayed formula uses <unit vectors> $\mathbf i,\mathbf n,\mathbf r$ and the <dot product>. It preserves the component parallel to the mirror and reverses the <normal component>. For a mirror along $y=0$, take $\mathbf n=(0,1)$ and $\mathbf i=(3/5,-4/5)$. Then $\mathbf i\cdot\mathbf n=-4/5$ and $\mathbf r=(3/5,4/5)$: both directions have <vector norm> one, and both make an <angle> $\arccos(4/5)\approx36.87^\circ$ with the relevant normal direction. Replacing $\mathbf n$ by $-\mathbf n$ leaves the result unchanged.

This same local rule explains a flat mirror's <virtual image>. For a source at $(0,a)$ above $y=0$, backward extensions of reflected <light rays> intersect at $(0,-a)$. The <light> remains above the mirror; its apparent origin lies below it. A curved mirror changes its <normal vector> from point to point and can instead make reflected <light rays> converge. The geometry of image formation therefore starts with one simple direction rule. https://openstax.org/books/university-physics-volume-3/pages/2-1-images-formed-by-plane-mirrors[OpenStax: Images formed by plane mirrors]{ref}.

// Target: optics.bigb