1 / 22

3 D Transformations

3 D Transformations. Dr. Aree Ali Mohammed Assistant Professor 2014-2015 3 rd Stage aree.ali@univsul.edu.iq. y. x. z (out of page)‏. Introduction. Use homogeneous coordinates, just as in 2D case. Transformations are now 4x4 matrices.

elwyn
Download Presentation

3 D Transformations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3D Transformations Dr. Aree Ali Mohammed Assistant Professor 2014-2015 3rd Stage aree.ali@univsul.edu.iq University of Sulaimani - School of Science - Computer Dept.

  2. y x z (out of page)‏ Introduction • Use homogeneous coordinates, just as in 2D case. • Transformations are now 4x4 matrices. • We will use a right-handed (world) coordinate system - ( z out of page ).

  3. 3D Coordinate Systems • Left Hand coordinate system: • Right Handcoordinate system:

  4. Translation in 3D Simple extension to the 2D case: Lecture 4

  5. Original scale Y axis scale all axes Scale in 3D

  6. Rotation in 3D • Need to specify which axis the rotation is about. • z-axis rotation is the same as the 2D case.

  7. Rotating About the x-axis Rx()‏

  8. Rotating About the y-axisRy()‏

  9. Rotation about Arbitrary Axis In special case where an object is to be rotated about an axis that is parallel to one of the coordinate axes we can obtain the resultant coordinates with the following transformation sequence. 1. Translate the object so that the rotation axis coincides with the parallel coordinate axis. 2. Perform the specified rotation about that axis. 3. Translate the object so that the rotation axis is moved back to its original position. University of Sulaimani - School of Science - Computer Dept.

  10. Rotation about Arbitrary Axis Axis not parallel University of Sulaimani - School of Science - Computer Dept.

  11. Rotate(k, θ)‏ Rotation about an arbitrary axis y θ u • About (ux, uy, uz), a unit vector on an arbitrary axis x z uxux(1-c)+c uyux(1-c)+uzs uzux(1-c)-uys 0 uzux(1-c)-uzs uzux(1-c)+c uyuz(1-c)+uxs 0 uxuz(1-c)+uys uyuz(1-c)-uxs uzuz(1-c)+c 0 0 0 0 1 x y z 1 x' y' z' 1 = where c = cos θ & s = sin θ

  12. Rotation axisparallel with coordinate axis (Examplex axis):

  13. An arbitrary axis(with the rotation axis projected onto theZaxis):

  14. Shearing

  15. Reflection with Respect to Given Plane • Respect to xy plane Consider point P(x,y,z). The reflection of this point with respect to xy plane is given by point P’(x,y,-z). 0 0 0 1 0 0 0 -1 M= University of Sulaimani - School of Science - Computer Dept.

  16. Reflection with Respect to any Plane • Respect to any plane x=0  (yz plane) y=0  (xz plane) z=0  (xy plane) 1. Translate a known point P˳, that lies in the reflection plane to the origin of the co-ordinate system. 2. Rotate the normal vector of the reflection plane at the origin until it is coincident with +ve z axis, this makes the reflection plane z=0 co-ordinate plane i.e. xy plane. 3. Reflect the object through z=0 (xy plane) co-ordinate plane. 4. Perform the inverse transformation to those given above to achieve the result. University of Sulaimani - School of Science - Computer Dept.

  17. Reflection any Plane University of Sulaimani - School of Science - Computer Dept.

  18. Reflection - Example Find the matrix for mirror reflection with respect to the plane passing through the origin and having a normal vector whose direction is Sol: Translation matrix is not necessary  University of Sulaimani - School of Science - Computer Dept.

  19. y x z Shear along Z-axis University of Sulaimani - School of Science - Computer Dept.

  20. Example • Transform the given position vector [ 3 2 1 1] • by the following sequence of operations • (i) Translate by –1, -1, -1 in x, y, and z respectively • (ii) Rotate by +30°about x-axis and +45°about y axis

  21. Review Questions • Give a 3x3 homogeneous coordinate transformation matrix for each of the following translations. • Shift the image to the right 3-units. • Shift the image up 2-units. • Move the image down ½ unit and left 4-units. 2. Prove that the transformation matrix for the reflection about the line Y=X is: University of Sulaimani - School of Science - Computer Dept.

  22. Group Discussion

More Related