4 ms·
A more direct derivation: if you normalize the quaternion product y * x, you get twice the rotation taking x to y. So you need the square root of that, which yo
by chombier 8y ago
A more direct derivation: if you normalize the quaternion product y * x, you get twice the rotation taking x to y. So you need the square root of that, which you can obtain by adding 1 to the real part, then normalize again.
This directly gives the final form of the article, up to a small optimization.
- jkabrg 8y agoThat's a nice way of looking at it. The trick of adding 1 to the real part doesn't work in the degenerate case where y=-x. In that case, as I said in my earlier comment, an alternative formula is PERP(y)(yx+|yx|). Both formulas need to be used in practice, depending on which one is closer to giving a degenerate answer.