Homogeneous transformation matrix (5)

Kinematics & Universal Numerics
July 22, 2019

The axis-angle representation.

In this blog we will introduce the second parametrization of a 3D rotation matrix. The idea is that any 3D rotation can be obtained by rotating the original coordinate system with respect to some axis by some angle ΞΈ.

We should first note that this is still a parametrization of three degrees of freedom: an angle ΞΈ has one degree of freedom; an axis is equivalent to a normal vector 𝐝, which can be parametrized by two angles (Ο•,ψ):

𝐝=[dxdydz]=[sϕ⁒cψsϕ⁒sψcΟ•]. (1)

Such a parametrization is not unique when dz=1 and Ο•=0, or dz=-1 and Ο•=Ο€. Then sΟ•=dx=dy=0, so ΞΈ is arbitrary. Otherwise, if |dz|<1, then we have

{Ο•=atan2⁒(1-dz2,dz)∈(0,Ο€)ψ=atan2⁒(dy,dx)∈(-Ο€,Ο€]. (2)

Imagine we can do some rotation 𝐒 such that the z-axis aligns with the vector 𝐝. Then we rotate around the new z-axis by angle ΞΈ. Lastly we revert the first rotation by performing the inverse rotation of 𝐒, which is the rotation 𝐒T. We shall prove the correctness of this approach, but for now let’s write the overall rotation as

𝐑=𝐒⋅Rotz⁒(ΞΈ)⋅𝐒T. (3)

To transform from the original coordinate system to the destination coordinate system, we read (3) from left to right as follows.

  1. Step 1.

    From the original coordinate system, perform some rotation 𝐒 such that 𝐝 is the z-axis.

  2. Step 2.

    Rotate about the new z-axis by angle ΞΈβ€”this rotation is Rotz⁒(ΞΈ).

  3. Step 3.

    Perform the rotation 𝐒T, the inverse of the rotation in Step 1.

Since 𝐒 is the first rotation making the z-axis in Step 2 align with 𝐝, the last column 𝐒 is exactly 𝐝. That is,

π’πž1,3=𝐝 whereβ€ƒπž1,3=[001]. (4)

Recall that a rotation matrix has 3 degrees of freedom, while a unit vector has 2. We can still have one more parameter to extend from 𝐝 to 𝐒. In fact, without introducing an extra parameter, we already have enough ingredients to construct such a rotation matrix for (4). Using Ο•,ψ in (1), we have

𝐒0=[sψcϕ⁒cψsϕ⁒cψ-cψcϕ⁒sψsϕ⁒sψ-sΟ•cΟ•]. (5)

Note again that when cΟ•=Β±1, parameter ψ can take any value.

Let the extra parameter be Ξ³. Then all rotation matrices that satisfy (4) can be written in the following form:

𝐒:=𝐒0β‹…Rotz⁒(Ξ³)=[sψcϕ⁒cψsϕ⁒cψ-cψcϕ⁒sψsϕ⁒sψ-sΟ•cΟ•]⁒[cΞ³-sΞ³sΞ³cΞ³1]. (6)

Then we can see that parameter Ξ³ simply does not matter in 𝐑, for

𝐑 =𝐒⋅Rotz⁒(ΞΈ)⋅𝐒T
=𝐒0β‹…Rotz⁒(ΞΈ)⋅𝐒0T. (7)

In the future derivations, we will simply use 𝐒0 from (5).

We will show in the next blog that the rotation in (7) indeed rotates every vector in the original coordinate system by the angle θ with respect to the direction 𝐝.