Law of reflection (source code)

= Law of reflection

The incident ray, reflected ray and surface normal lie in one plane; incidence and reflection angles measured from the normal are equal. For a unit incident direction $\mathbf d$ and unit normal $\mathbf n$, reflection gives $\mathbf d-2(\mathbf d\cdot\mathbf n)\mathbf n$.