Reflection curve on a surface (source code)

= Reflection curve on a surface

For a <parametric surface> $P(u,v)$, source <parametric curve> $Q(t)$ and eye $E$, put $a=(Q-P)/\lVert Q-P\rVert$ and $b=(E-P)/\lVert E-P\rVert$. The visible reflection locus satisfies $(a+b)\cdot P_u=(a+b)\cdot P_v=0$, with the source and eye on the reflecting side. Rank two of the resulting <Jacobian matrix> gives a locally one-dimensional locus in $(u,v,t)$ by the <implicit function theorem>.

// Target: analysis.bigb