Rotation about z, x and y-Axis:
Z-axis rotation is alike to the 2-D case:
In this, coordinates against z-axis are kept constant.
x′ = x * cos φ - y * sin φ
y′ = x * sin φ + y * cos φ
z′ = z
![1998_Rotation about z-axis.png](https://www.expertsmind.com/CMSImages/1998_Rotation%20about%20z-axis.png)
Rotation around x-axis is same as rotation around z-axis.
![1255_Rotation about z-axis1.png](https://www.expertsmind.com/CMSImages/1255_Rotation%20about%20z-axis1.png)
Figure: Rotation about z-axis
If x-axis, y-axis & z-axis are replaced through y, z and x-axes respectively
![2098_Rotation about z-axis2.png](https://www.expertsmind.com/CMSImages/2098_Rotation%20about%20z-axis2.png)
So we do the similar replacement in the equations:
y′ = y* cos q - z * sin q
z′ = y* sin q + z* cos q
x′ = x
Likewise, rotation about y-axis is same as rotation around z-axis if x, y and z-axes are replaced by z, x and y-axes respectively.
![764_Rotation about z-axis3.png](https://www.expertsmind.com/CMSImages/764_Rotation%20about%20z-axis3.png)
Figure: Rotation about y-axis
So we do the same replacement in equations :
z′ = z* cos q - x* sin q
x′ = z* sin q + x* cos q
y′ = y
![168_Rotation about z-axis4.png](https://www.expertsmind.com/CMSImages/168_Rotation%20about%20z-axis4.png)