3D Transformations: Design By: Prof. Deepti Palia (AP) Prof. Rajanpreet Kaur (AP) Chandigarh University-Gharuan
3D Transformations: Design By: Prof. Deepti Palia (AP) Prof. Rajanpreet Kaur (AP) Chandigarh University-Gharuan
Design By:
Prof. Deepti Palia(AP)
Prof. Rajanpreet Kaur(AP)
Chandigarh University-Gharuan
09-01-2019 1
3D Graphics
• 3D Transformations
• Generally, the extension from 2D to 3D is straightforward
• The Cartesian coordinates representation of point would be now (x, y,
z)
09-01-2019 2
Translation
The translation matrix in 3d has three translation factors( tx , ty , tz ). The
translation matrix is
1 0 0 tx
0 1 0
ty
T=
0 0 1 tz
0 0 0 1
09-01-2019 3
Rotation
• The 2D z-axis rotation equations are easily extended to 3D.
09-01-2019 4
Rotation
• The x-axis rotation equations are expressed as:
09-01-2019 5
Rotation
• The y-axis rotation matrix is expressed as
09-01-2019 6
Scaling
• The expressions for scaling relative to the origin are
09-01-2019 7
Scaling Matrix
• The Scaling Matrix can be written as
09-01-2019 8
09-01-2019 9
Reflection
• A 3D reflection can be performed relative to a selected reflection axis or
with respect to a selected reflection plane.
• Three types of 3D reflection:
I. Reflection w.r.t xy plane
II. Reflection w.r.t yz plane
III. Reflection w.r.t xz plane
09-01-2019 10
Reflection
• The expressions for scaling relative to the origin are
09-01-2019 11
Reflection w.r.t XY plane
• In xy plane, only the value of z will change to negative.
• The matrix representation for reflection of points relative to the xy plane is
09-01-2019 12
Reflection w.r.t YZ plane
• In yz plane, only the value of x will change to negative.
• The matrix representation for reflection of points relative to the yz plane is
09-01-2019 13
Reflection w.r.t XZ plane
• In xz plane, only the value of y will change to negative.
• The matrix representation for reflection of points relative to the xz plane is
09-01-2019 14
Reflection
• A 3D reflection can be performed relative to a selected reflection axis or
with respect to a selected reflection plane.
• Three types of 3D reflection:
I. Reflection w.r.t xy plane
II. Reflection w.r.t yz plane
III. Reflection w.r.t xz plane
09-01-2019 15
Shearing
• A transformation that slants the shape of an object is called as shearing.
• Shearing can be performed in three ways:
I. Along z-axis
II. Along y-axis
III. Along x-axis
09-01-2019 16
Shearing along z-axis
• X and Y Will remain same, only the value of Z will change.
• Shearing along y-axis can be expressed as:
09-01-2019 17
Shearing along x-axis
• Y and Z Will remain same, only the value of X will change.
• Shearing along x-axis can be expressed as:
09-01-2019 18
Shearing along z-axis
• X and Y Will remain same, only the value of Z will change.
• Shearing along z-axis can be expressed as:
09-01-2019 19
Frequently Asked Questions
How shearing along x-axis is different from shearing along y-axis. Give
some practical examples.
Name few 2D primitives figures you know.
Reflection can occur along axis as well as plane. Explain the difference
between these two cases.
What are the possible values of an object along xy and yz plane?
09-01-2019 20
Bibliography
09-01-2019 21