Closed form of Quaternion for Double Reflection. A
recent paper by Wang, Jüttler, Zheng, and Liu (Computation of Rotation
Minimizing Frames,
ACM TOG 27, 18 pp, 2008)
points out that a double reflection about two vectors yields
an excellent numerical method for computing rotation minimizing
frames. This is of course just the Clifford Algebra form for a
particular rotation, as described in Chapter 31 of Visualizing
Quaternions. Inadvertantly omitted from Chapter 31 is the closed
form formula for the resulting quaternion, which can be used to
implement the method of Wang, et al. as follows:
The quaternion corresponding to the rotation resulting from
(Clifford Algebra-induced) reflections about the two
normalized vectors A and B is simply
q = ( A · B, A × B )
where clearly, since A and B are both unit-length
three-vectors, there is something wrong -- we have four free variables
instead of three. But it's fine because this is really a circle
bundle: there is a one-parameter rotation in the (A, B)
plane that, for any rotation, generates the same quaternion, and thus
the needed reduction to three free variables is achieved.