3D Rotation
3D Rotation in Computer Graphics:
In Computer graphics, 3D Rotation is a process of rotating an object with respect to an angle in a three dimensional plane.
Consider a point object O has to be rotated from one angle to another in a 3D plane.
Let-
- Initial coordinates of the object O = (Xold, Yold, Zold)
- Initial angle of the object O with respect to origin = Φ
- Rotation angle = θ
- New co-ordinates of the object O after rotation = (Xnew, Ynew, Znew)
In 3 dimensions, there are 3 possible types of rotation:
- X-axis Rotation
- Y-axis Rotation
- Z-axis Rotation
For X-Axis Rotation:
This rotation is achieved by using the following rotation equations-
- Xnew = Xold
- Ynew = Yold x cosθ – Zold x sinθ
- Znew = Yold x sinθ + Zold x cosθ
In Matrix form, the above rotation equations may be represented as,

For Y-Axis Rotation:
This rotation is achieved by using the following rotation equations-
- Xnew = Zold x sinθ + Xold x cosθ
- Ynew = Yold
- Znew = Yold x cosθ – Xold x sinθ
In Matrix form, the above rotation equations may be represented as-

For Z-Axis Rotation:
This rotation is achieved by using the following rotation equations-
- Xnew = Xold x cosθ – Yold x sinθ
- Ynew = Xold x sinθ + Yold x cosθ
- Znew = Zold
In Matrix form, the above rotation equations may be represented as-
