3 ms·
Until you need to differentiate a quaternion ... Also, you don't pay the sin/cos costs when converting to a rotation matrix. For angle axis R = I + (sin x)
by 0xfaded 9y ago
Until you need to differentiate a quaternion ...
Also, you don't pay the sin/cos costs when converting to a rotation matrix. For angle axis
R = I + (sin x) * S + (1 - cos(x)) * S^2
Where S is the 3x3 skew symmetric matrix.
A unit quaternion representing a 3D rotation is sort of like angle axis
q = cos(x/2), sin(x/2) <axis>
But
sin(x) = 2*cos(x/2)*sin(x/2)
(1-cos(x) = 2*sin(x/2)*sin(x/2)
Where you pay the cost is in the construction of the quaternion.
- blt 9y agoWhat is the problem with differentiating a quaternion? E.g. the time derivative of the quaternion w.r.t. a fixed angular velocity is given here: https://fgiesen.wordpress.com/2012/08/24/quaternion-differentiation/ https://fgiesen.wordpress.com/2012/08/24/quaternion-differen... . I've more often encountered the need to integrate a quaternion, e.g. from inertial measurements or a rigid body physics model, but this is also a textbook lookup away.