3D Rotation
The 3D rotation is different from 2D rotation. In 3D Rotation we also have to define the angle of Rotation with the axis of Rotation.
For Example- Let us assume,
The initial coordinates of an object = (x0, y0, z0)
The Initial angle from origin = β
The Rotation angle = θ
The new coordinates after Rotation = (x1, y1, z1)
In Three-dimensional plane we can define Rotation by following three ways-
- X-axis Rotation: We can rotate the object along x-axis. We can rotate an object by using following equation-
We can represent 3D rotation in the form of matrix-
- Y-axis Rotation: We can rotate the object along y-axis. We can rotate an object by using following equation-
We can represent 3D rotation in the form of matrix-
- Z-axis Rotation: We can rotate the object along z-axis. We can rotate an object by using following equation-
We can represent 3D rotation in the form of matrix-
Example: A Point has coordinates P (2, 3, 4) in x, y, z-direction. The Rotation angle is 90 degrees. Apply the rotation in x, y, z direction, and find out the new coordinates of the point?
Solution: The initial coordinates of point = P (x0, y0, z0) = (2, 3, 4)
Rotation angle (θ) = 90°
For x-axis-
Let the new coordinates = (x1, y1, z1) then,
x1= x0 = 2
y1= y0 x cosθ – z0 x sinθ = 3 x cos90°– 4 x sin90° = 3 x 0 – 4 x 1 = -4
z1= y0 x sinθ + z0 x cosθ = 3 x sin90°+ 4 x cos90° = 3 x 1 + 4 x 0 = 3
The new coordinates of point = (2, -4, 3)
For y-axis-
Let the new coordinates = (x1, y1, z1) then,
X1= z0 x sinθ + x0 x cosθ = 4 x sin90° + 2 x cos90° = 4 x 1 + 2 x 0 = 4
y1= y0 = 3
z1= y0 x cosθ – x0 x sinθ = 3 x cos90°– 2 x sin90° = 3 x 0 – 4 x 0 = 0
The new coordinates of point = (4, 3, 0)
For z-axis-
Let the new coordinates = (x1, y1, z1) then,
x1= x0 x cosθ – y0 x sinθ = 2 x cos90° – 3 x sin90° = 2 x 0 + 3 x 1 = 3
y1= x0 x sinθ + y0 x cosθ = 2 x sin90° + 3 x cos90° = 2 x 1 + 3 x 0 = 2
z1= z0 =4
The New Coordinates of points = (3, 2, 4)