Home Subscribe

2. 3D Rotations of a Rigid Body About XYZ-axes

3d-fixed-and-moving-axis-convention
Figure 1. 3D fixed (X,Y,Z) and moving (A,B,C) axis convention.

Referring to the original convention of Figure 1 assume that the length of the axis is equal to one unit, X (x,y,z) or Y (x,y,z) or Z (x,y,z) is fixed while A (a,b,c) or B (a,b,c) or C (a,b,c) is mobile. The counterclockwise rotation is taken to be positive.

2.1. Rotation about X-axis

rotation-matrix-about-x-axis
Figure 2. Rotation matrix about X-axis.

After rotating B,

\[\begin{aligned} \cos(\alpha) &= \frac{+y}{B}\\ y &= B \cos{\alpha} \\ b &= B \cos{\alpha} \\ \sin(\alpha) &= \frac{+z}{B} \\ z &= B \sin{\alpha} \\ c &= B \sin{\alpha} \end{aligned}\]

After rotating C,

\[\begin{aligned} \cos(\alpha) &= \frac{+z}{C}\\ z &= C \cos(\alpha) \\ c &= C \cos(\alpha) \\ \sin(\alpha) &= \frac{-y}{C} \\ y &= -C \sin(\alpha) \\ b &= -C \sin(\alpha) \end{aligned}\]
Before After

\(A(a,b,c) = (1,0,0)\)

\(A(a,b,c) = (1,0,0)\)

\(B(a,b,c) = (0,1,0)\)

\(B(a,b,c) = (0,B \cos(\alpha),B \sin(\alpha))\)

\(C(a,b,c) = (0,0,1)\)

\(C(a,b,c) = (0,-C \sin(\alpha), C \cos(\alpha))\)

A B C

\(+A\)

\(0\)

\(0\)

\(0\)

\(+B \cos(\alpha)\)

\(-C \sin(\alpha)\)

\(0\)

\(+B \sin(\alpha)\)

\(+C \cos(\alpha)\)

\((1,0,0)\)

\((0,B \cos(\alpha),B \sin(\alpha))\)

\((0,-C \sin(\alpha), C \cos(\alpha))\)

\[\begin{align*} \left[\begin{array}{c} X \\ Y \\ Z \end{array}\right] = \left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos(\alpha) & -\sin(\alpha) \\ 0 & \sin(\alpha) & \cos(\alpha) \end{array}\right] \left[\begin{array}{c} A \\ B \\ C \end{array}\right] \end{align*}\]

The rotation matrix for a rotation about the x-axis is given by:

\[\begin{align} R(x, \alpha) = \left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos(\alpha) & -\sin(\alpha) \\ 0 & \sin(\alpha) & \cos(\alpha) \end{array}\right] \end{align}\]

2.2. Rotation about Y-axis

rotation-matrix-about-y-axis
Figure 3. Rotation matrix about Y-axis.

After rotating A,

\[\begin{aligned} \cos(\beta) &= \frac{+x}{A}\\ x &= A \cos{\beta} \\ a &= A \cos{\beta} \\ \sin(\beta) &= \frac{-z}{A} \\ z &= -A \sin{\beta} \\ c &= -A \sin{\beta} \end{aligned}\]

After rotating C,

\[\begin{aligned} \cos(\beta) &= \frac{+z}{C}\\ z &= C \cos(\beta) \\ c &= C \cos(\beta) \\ \sin(\beta) &= \frac{+x}{C} \\ x &= C \sin(\beta) \\ a &= C \sin(\beta) \end{aligned}\]
Before After

\(A(a,b,c) = (1,0,0)\)

\(A(a,b,c) = (A \cos(\beta),0,-A sin(\beta))\)

\(B(a,b,c) = (0,1,0)\)

\(B(a,b,c) = (0,1,0)\)

\(C(a,b,c) = (0,0,1)\)

\(C(a,b,c) = (C \sin(\beta),0, C \cos(\beta))\)

A B C

\(+A \cos(\beta)\)

\(0\)

\(+C \sin(\beta)\)

\(0\)

\(+B\)

\(0\)

\(-A \sin(\beta)\)

\(0\)

\(+C \cos(\beta)\)

\((+A \cos(\beta),0,-A \sin(\beta))\)

\((0,+B,0)\)

\((+C \sin(\beta),0, +C \cos(\beta))\)

\[\begin{align*} \left[\begin{array}{c} X \\ Y \\ Z \end{array}\right] = \left[\begin{array}{ccc} \cos(\beta) & 0 & \sin(\beta) \\ 0 & 1 & 0 \\ -\sin(\beta) & 0 & \cos(\beta) \end{array}\right] \left[\begin{array}{c} A \\ B \\ C \end{array}\right] \end{align*}\]

The rotation matrix for a rotation about the y-axis is given by:

\[\begin{align} R(y, \beta) = \left[\begin{array}{ccc} \cos(\beta) & 0 & \sin(\beta) \\ 0 & 1 & 0 \\ -\sin(\beta) & 0 & \cos(\beta) \end{array}\right] \end{align}\]

2.3. Rotation about Z-axis

rotation-matrix-about-z-axis
Figure 4. Rotation matrix about Z-axis.

After rotating A,

\[\begin{aligned} \cos(\gamma) &= \frac{+x}{A}\\ x &= A \cos{\gamma} \\ a &= A \cos{\gamma} \\ \sin(\gamma) &= \frac{+y}{A} \\ y &= A \sin{\gamma} \\ b &= A \sin{\gamma} \end{aligned}\]

After rotating B,

\[\begin{aligned} \cos(\gamma) &= \frac{+y}{B}\\ y &= B \cos(\gamma) \\ b &= B \cos(\gamma) \\ \sin(\gamma) &= \frac{-x}{B} \\ x &= -B \sin(\gamma) \\ a &= -B \sin(\gamma) \end{aligned}\]
Before After

\(A(a,b,c) = (1,0,0)\)

\(A(a,b,c) = (A \cos(\gamma),A sin(\gamma),0)\)

\(B(a,b,c) = (0,1,0)\)

\(B(a,b,c) = (-B \sin(\gamma),B \cos(\gamma),0)\)

\(C(a,b,c) = (0,0,1)\)

\(C(a,b,c) = (0,0,1)\)

A B C

\(+A \cos(\gamma)\)

\(-B \sin(\gamma)\)

\(0\)

\(A \sin(\gamma)\)

\(+B \cos(\gamma)\)

\(0\)

\(0\)

\(0\)

\(1\)

\((+A \cos(\gamma),A \sin(\gamma),0)\)

\((-B \sin(\gamma),+B \cos(\gamma),0)\)

\((0,0, 1)\)

\[\begin{align*} \left[\begin{array}{c} X \\ Y \\ Z \end{array}\right] = \left[\begin{array}{ccc} \cos(\gamma) & -\sin(\gamma) & 0 \\ \sin(\gamma) & \cos(\gamma) & 0 \\ 0 & 0 & 1 \end{array}\right] \left[\begin{array}{c} A \\ B \\ C \end{array}\right] \end{align*}\]

The rotation matrix for a rotation about the z-axis is given by:

\[\begin{align} R(z, \gamma) = \left[\begin{array}{ccc} \cos(\gamma) & -\sin(\gamma) & 0 \\ \sin(\gamma) & \cos(\gamma) & 0 \\ 0 & 0 & 1 \end{array}\right] \end{align}\]

where \(\alpha, \beta, \gamma\) is any angle of rotation.

These formulas can be used to calculate the rotation matrix for any rotation about the x, y, or z-axis in 3D space. The angle of rotation is specified in radians.

2.4. Coordinates of a Point Rotated About an Axis

Idea

Example 1: Rotation about X-axis

The coordinates of a point \(q_{abc} = (3, 7, 5)^T\) and is rotated about the OX-axis of the reference frame OXYZ, by an angle of \(60^o\). Determine the coordinates of the point \(q_{xyz}\)

Solution:
\[q_{xyz} = R(x,60^o)q_{abc}\]

Idea

Example 2: Rotation about Y-axis

The coordinate of a point \(p_{abc}\) in the mobile frame OABC is given by \((4, 4, 2\sqrt{3})^T\). If the frame OABC is rotated by \(60^o\) with respect to OY of the OXYZ frame, find the coordinate of \(p_{xyz}\) with respect to the base frame.

Solution:
\[p_{xyz} = R(y,60^o)p_{abc}\]

Idea

Example 3: Rotation about Z-axis

The coordinate of a point \(p_{abc} = (7, 6, 5)^T\) in the body co-ordinate frame OABC is rotated \(30^o\) about OZ-axis. Determine the coordinates of the vector \(p_{xyz}\) with respect to the base reference coordinate frame.

Solution:
\[p_{xyz} = R(x,60^o)p_{abc}\]

2.4.1. Axis and Angle of Rotation

Idea

Example 4

For the following rotation matrix, determine the axis of rotation and the angle of the rotation about the same.

\[\begin{align*} R = \begin{bmatrix} \frac{\sqrt{3}}{2} & 0 & \frac{1}{2} \\ 0 & 1 & 0 \\ -\frac{1}{2} & 0 & \frac{\sqrt{3}}{2} \end{bmatrix} \end{align*}\]
Solution:

Please attempt.

2.5. Coordinates of a Point Relative to a Mobile Frame

Idea

Example 5

A mobile body reference frame OABC is rotated \(60^o\) about OY-axis of the fixed base reference frame OXYZ. If \(p_{xyz} = (2, 3, 6)^T\) and \(q_{xyz} = (4, 2, 5)^T\) are the coordinates with respect to OXYZ plane, what are the corresponding coordinates of \(p\) and \(q\) with respect to OABC frame?

Solution:
\[p_{abc} = R(y,60^o)^{-1}p_{xyz} = R(y,60^o)^{T}p_{xyz} \\ p_{abc} = R(y,60^o)^{-1}p_{xyz} = R(y,60^o)^{T}p_{xyz}\]

Idea

Example 6

The coordinates of point \(Q\) with respect to the base reference frame are given by \((4, 2\sqrt{3}, 5)^T\). Determine the coordinates of \(Q\) with respect to the mobile rotated frame of the robot if the angle of rotation with the OX is \(60^o\).

Solution:
\[Q_{abc} = R(x,60^o)^{-1}Q_{xyz} = R(x,60^o)^{T}Q_{xyz}\]

Idea

Example 7: A single-axis robot

Take a single-axis robot with a fixed base and a mobile link. Suppose the mobile frame has a point \(p_M\) given by \((2, 2, 8)^T\). Find the coordinates of the point \(p_F\) with respect to the base frame when \(\theta_1 = 180^o\) and \(\theta_2 = 0^o\)

Solution:
\[(p_{F})_{\theta = 180^o} = R(z,180^o)p_{M} \\ (p_{F})_{\theta = 0^o} = R(z,0^o)p_{M}\]


Add Comment

* Required information
1000
Drag & drop images (max 3)
Which is darker: black or white?

Comments (4)

Avatar
New
Dr. Sam

Using the knowledge of spatial mechanics and computer programming introduced in this course, you can go on to perform advanced kinematic analysis of 3D mechanisms.

These skills apply to robotics systems design, research, and development.

Avatar
New
Joe Disamalu

The notes are on point. I've gained alot of skill and visualization from the unit.

Avatar
New
Aggrey

Does it mean the inverse of a 3x3 matrix same as its transpose

Upload
Avatar
New
Dr. Sam

In spatial mechanics, the inverse and transpose of a 3x3 matrix are not the same, but they can be related in specific cases. The inverse (A⁻¹) is a matrix that, when multiplied by A, results in the identity matrix (A * A⁻¹ = I). The transpose (Aᵀ) is obtained by interchanging the rows and columns of A.

For 3x3 orthogonal matrices, often used to represent rotations, the transpose is equal to the inverse (A⁻¹ = Aᵀ) because they satisfy Aᵀ * A = I. This property is unique to orthogonal matrices, and for general 3x3 matrices, the inverse and transpose are not the same.