Homogeneous transformation matrix (9)
A small result about the minimal rotation.
In a previous blog, we claim that, every 3D rotation matrix that has
in its last column is in the form of
What the rotation do is align the -axis with , so that we can perform a basic rotation around , that is the new -axis, by right- (post-) multiplying . At the end, we revert the aligning operation by right-multiplying .
Note that the angle between the original -axis and is , since
However, the rotation angle of is not exactly , since
so the rotation angle of is always not less than , given that is decreasing in . Here we recall that when we convert a rotation matrix into its axis-angle representation, the rotation angle is attained by
What we want to find out is the value of , such that the angle of the rotation parametrized by is exactly . That is
Rearranging terms yields
If , then and
Rotating any vector perpendicular to the -axis by angle can achieve this, so the simplest choice is , and
Otherwise, if , then and we can choose . Then
When the rotation axis is not trivially and hence and , the rotation axis of is
always a vector perpendicular to the -axis.