270 likes | 433 Views
Prepared By Niddal abu swereh Mahmoud elqedra Supervised By Dr. Sana’a Wafa Al- Sayegh. Computer Graphics. University of Palestine. ITGD3107. ITGD3107 Computer Graphics. Chapter 11 Three-Dimensional Geometric and Modeling Transformations.
E N D
Prepared By Niddalabuswereh Mahmoudelqedra Supervised By Dr. Sana’a Wafa Al-Sayegh Computer Graphics University of Palestine ITGD3107
ITGD3107Computer Graphics Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Three-Dimensional Geometric and Modeling Transformations • Some Basics • 3D Translations. • 3D Scaling. • 3D Rotation. • 3D Reflections. • Transformations.
Some Basics • Basic geometric types. • Scalars s • Vectors v • Points p • Transformations • Types of transformation: • rotation, translation, scale,Reflections, shears. • Matrix representation • Order • P=T(P)
3DPoint • We will consider points as column vectors. Thus, a typical point with coordinates (x, y, z) is represented as:
P is translated to P' by T: 3D Translations. Called the translation matrix T =
3D Translations. • An object is translated in 3D dimensional by transforming each of the defining points of the objects.
P is scaled to P' by S: 3D Scaling Called the Scaling matrix S =
3D Scaling • Scaling with respect to the coordinate origin
3D Scaling • Scaling with respect to a selected fixed position (xf, yf, zf) • Translate the fixed point to origin • Scale the object relative to the coordinate origin • Translate the fixed point back to its original position
3D Reflections • About an axis:equivalent to 180˚rotation about that axis
3D Shearing • Modify object shapes • Useful for perspective projections: • E.g. draw a cube (3D) on a screen (2D) • Alter the values for xand y by an amount proportional to the distance from zref
Rotation Positive rotation angles produce counterclockwise rotations about a coordinate axis mshe1990@hotmail.com &&
Rotation mshe1990@hotmail.com &&
Coordinate-Axes Rotations mshe1990@hotmail.com &&
Coordinate-Axes Rotations mshe1990@hotmail.com &&
Coordinate-Axes Rotations mshe1990@hotmail.com &&
Coordinate-Axes Rotations mshe1990@hotmail.com &&
General Three-Dimensional Rotations • An object is to be rotated about an axis that is parallel to one of the coordinate axes • Translate the object so that the rotation axis coincides with the parallel coordinate axis • Perform the specified rotation about that axis • Translate the object so that the rotation axis is moved back to its original position mshe1990@hotmail.com &&
General Three-Dimensional Rotations • An object is to be rotated about an axis that is not parallel to one of the coordinate axes • Translate the object so that the rotation axis passes through the coordinate origin. • Rotate the object so that the axis of rotation coincide with one of the coordinate axes. • Perform the specified rotation about that coordinate axis. • Apply inverse rotations to bring the rotation axis back to its original orientation. • Apply the inverse Translation to bring the rotation axis back to its original position. mshe1990@hotmail.com &&
Quiz Draw any shape, then moving translation matrix. Good Luck