Solution (source code)

= Solution

For an arclength-parametrized curve define the <Frenet frame> by $T=\alpha'$, $k=|\alpha''|>0$, $N=T'/k$ and $B=T\times N$. Differentiating the <unit> lengths gives diagonal frame-derivative coefficients zero. Also $T'=kN$ implies $N'\cdot T=-k$, while $B'\cdot T=-B\cdot T'=0$. Define the <torsion of a space curve> by $\tau=-B'\cdot N$. Orthogonality then gives
$$
\boxed{T'=kN,\qquad N'=-kT+\tau B,\qquad B'=-\tau N.}
$$
These are the Frenet formulae. Differentiating $B=T\times N$ also verifies the chosen torsion sign; equivalently $\tau=\det(\alpha',\alpha'',\alpha''')/|\alpha'\times\alpha''|^2$.