I am trying to derive the bending force of a discrete curve, which requires the derivative of angles between two vectors represented tangent half angle. I follow this note for my derivation: https://www.cs.utexas.edu/users/evouga/uploads/4/5/6/8/45689883/turning.pdf (section 3), and I am stuck at simplifying the expression shown as the last step in the note. Basically it says:
$v_2 \times z - \frac{((v_1 \times v_2) \cdot z)(v_1 + v_2)}{1 + v_1 \cdot v_2} = v_1 \times z$
where $v_1$ and $v_2$ are arbitrary unit vectors, and $z$ is the unit vector perpendicular to the $v_1 v_2$ plane. I have no idea why it can be simplified to the expression on the RHS. Does anyone can help?
Sometimes it's best not to be so general. Changing coordinates (if you insist on thinking of it that way), take \begin{align*} v_1 &= \vec i \\ v_2 &= \cos\theta \vec i + \sin\theta\vec j \\ z &= \vec k. \end{align*} Now it's just simple algebra to check that (I've multiplied through by $-1$ to make it slightly simpler) $$\cos\theta\vec j - \sin\theta\vec i + \frac{\sin\theta\big((1+\cos\theta)\vec i + \sin\theta\vec j\big)}{1+\cos\theta} = \vec j.$$ Just multiply by $1+\cos\theta$ and simplify.