Expand description
Vector arithmetic that no single domain owns.
An orthonormal basis about a direction is needed to sample a hemisphere, to orient a scatter lobe and to build a local frame for a contact normal. Reflection about a plane is a light ray off a mirror and a ball off a wall, in the same three lines. Neither belongs to optics, so neither lives there.
Refraction does belong to optics — Snell’s law is about refractive indices —
and is in dualis-optics accordingly.
Functions§
- basis_
for - Two unit vectors completing an orthonormal frame with
dir. - oriented_
against - Flip
nso it opposes the incident direction (d · n < 0). - reflect
- Mirror
dabout the plane with normaln. Both should be normalised.