Lecture 10 Geometric Transformations In 3D(Three- Dimensional) Computer Graphics Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
3D Geometrical Transformations 3D Coordinate Systems 3D point representation 3D Translation 3D Scaling 3D reflection 3D Shearing 3D Rotations about x, y and z axis
3D Coordinate Systems
3D point representation In 2D we represent a point P as P = [x, y] or x y And when it is converted into homogeneous coordinates, it is written as P = [x, y, h] or x y where h = 1 h A 3D point P is represented as P = [x, y, z] or x z
A 3D point P is represented in homogeneous coordinates by a 4-dimensional vector: P = [x, y, z, h] or P = x y where h=1 z h P = x y 1
3D Rotations In 2D, rotation matrix is given as x’ = x cosθ -sinθ y’ y sinθ cosθ In homogeneous system, x’ = x cosθ -sinθ 0 y’ y sinθ cosθ 0 1 1 0 0 1
In 3D, rotation matrix is given as x’ = x cosθ -sinθ 0 0 y’ y sinθ cosθ 0 0 z’ z 0 0 1 0 1 1 0 0 0 1
3D Rotation about z-axis The equations for 3D rotation about z-axis is given as x’ = x cosθ – y sinθ y’ = x sinθ + y cosθ z’ = z
3D Rotation about x-axis The equations for 3D rotations about x-axis and y-axis can be obtained by replacements that is, x y z x That is, equations for 3D rotation about x-axis are: y’ = y cosθ – z sinθ z’ = y sinθ + z cosθ x’ = x
3D Rotation about y-axis Equations for 3D rotation about y-axis are: z’ = z cosθ – x sinθ x’ = z sinθ + x cosθ y’ = y