Table of Contents

3D Point Rotation Calculator

\( \)\( \)\( \)\( \)\( \)

The transformation of point P(x,y,z) rotated around one of the axes may be expressed using matrices. The rotation transformations are very important in computer graphics.

Rotation Around the x-axis

The coordinates \( (x,y,z) \) of point P rotated by an angle \( \theta_x \) around the x-axis, in counterclockwise direction, are transformed to the coordinates \( (x',y',z') \) given by: \[ \begin{bmatrix} x'\\ y'\\ z'\\ \end{bmatrix} = R_x(\theta_x) \begin{bmatrix} x\\ y\\ z\\ \end{bmatrix} \] where \( R_x(\theta_x) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\theta_x & -\sin\theta_x \\ 0 & \sin\theta_x & \cos\theta_x \end{bmatrix} \)

Rotation Around the y-axis

The coordinates \( (x,y,z) \) of point P rotated by an angle \( \theta_y \) around the y-axis, in counterclockwise direction, are transformed to the coordinates \( (x',y',z') \) given by: \[ \begin{bmatrix} x'\\ y'\\ z'\\ \end{bmatrix} = R_y(\theta_y) \begin{bmatrix} x\\ y\\ z\\ \end{bmatrix} \] where \( R_y(\theta_y) = \begin{bmatrix} \cos\theta_y & 0 & \sin\theta_y \\ 0 & 1 & 0 \\ -\sin\theta_y & 0 & \cos\theta_y & \\ \end{bmatrix} \)

Rotation Around the z-axis

The coordinates \( (x,y,z) \) of point P rotated by an angle \( \theta_z \) around the y-axis, in counterclockwise direction, are transformed to the coordinates \( (x',y',z') \) given by: \[ \begin{bmatrix} x'\\ y'\\ z'\\ \end{bmatrix} = R_z(\theta_z) \begin{bmatrix} x\\ y\\ z\\ \end{bmatrix} \] where \( R_z(\theta_z) = \begin{bmatrix} \cos\theta_z & -\sin\theta_z & 0 \\ \sin\theta_z & \cos\theta_z & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \)



Selection of the Order of Rotations

Let point P(x,y,z) be rotated by an angle \( \theta_z \) around the z-axis, then by an angle \( \theta_x \) around the x-axis and then by an angle \( \theta_y \) around the y-axis. The coordinates of the point after all three rotations is given by \[ \begin{bmatrix} x'\\ y'\\ z'\\ \end{bmatrix} = R_y \left( R_x \left(R_z \begin{bmatrix} x\\ y\\ z\\ \end{bmatrix} \right) \right) \]
NOTE the order in which the rotations are carried out is important. In the above example, first z rotation, then x rotation, and then y rotation, and therefore when we Select Order of rotation: "Z, X, Y".



Use of the Calculator

Enter the coordinates of the point to be transformed (separated with commas) then use radio buttons to select the order in which the rotations will be carried out and finally enter the angles (in degrees) of rotations around each axis.

Enter Coordinates of Point:

Select Order of rotation: X, Y, Z      X, Z, Y      Y, X, Z      Y, Z, X      Z, X, Y      Z, Y, X

Enter the Angles of Rotation in Degrees

x-axis rotation:   \( \theta_x \) = (Degrees)
y-axis rotation:   \( \theta_y \)= (Degrees)
z-axis rotation:   \( \theta_z \) = (Degrees)

Number of Decimals:

Click