1 / 35

3-D Geometric Transformations

3-D Geometric Transformations. Some of the material in these slides may have been adapted from the lecture notes of Graphics Lab @ Korea University. Contents. Translation Scaling Rotation Other Transformations Coordinate Transformations. Transformation in 3D. Transformation Matrix.

kateb
Download Presentation

3-D Geometric 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. 3-D GeometricTransformations Some of the material in these slides may have been adapted from the lecture notes of Graphics Lab @ Korea University

  2. Contents • Translation • Scaling • Rotation • Other Transformations • Coordinate Transformations

  3. Transformation in 3D • Transformation Matrix 33 : Scaling, Reflection, Shearing, Rotation 31 : Translation 11 : Uniform global Scaling 13 : Homogeneous representation

  4. 3D Translation • Translation of a Point y x z

  5. 3D Scaling • Uniform Scaling y x z

  6. Relative Scaling • Scaling with a Selected Fixed Position y y y y x x x x z z z z Original position Translate Scaling Inverse Translate

  7. 3D Rotation • Coordinate-Axes Rotations • X-axis rotation • Y-axis rotation • Z-axis rotation • General 3D Rotations • Rotation about an axis that is parallel to one of the coordinate axes • Rotation about an arbitrary axis

  8. Rotation is counterclockwise

  9. Coordinate-Axes Rotations • Z-Axis Rotation • X-Axis Rotation • Y-Axis Rotation y y y x x x z z z

  10. 3D line equation • Given A (x0, y0, z0) and B (x1, y1, z1) forming a line. • The equation of this line can be formulated as follows:

  11. Order of Rotations • Order of Rotation Affects Final Position • X-axis  Z-axis • Z-axis  X-axis

  12. General 3D Rotations • Rotation about an Axis that is Parallel to One of the Coordinate Axes • Translatethe 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

  13. Rotation about an arbitrary axis

  14. General 3D Rotations • Rotation about an Arbitrary Axis • Basic Idea • Translate (x1, y1, z1) to the origin • Rotate (x’2, y’2, z’2) on to the z axis • Rotate the object around the z-axis • Rotate the axis to the original orientation • Translate the rotation axis to the original position y T (x2,y2,z2) R (x1,y1,z1) R-1 x z T-1

  15. y (x2,y2,z2) (x1,y1,z1) x z General 3D Rotations • Step 1. Translation

  16. General 3D Rotations • Step 2. Establish [ TR ]xx axis y (0,b,c) (a,b,c) Projected Point   x z Rotated Point

  17. General 3D Rotations • Step 2. Establish [ TR ]xx axis y (0,b,c) (a,b,c) Projected Point   x a (0,b,c) (0,b,c) (a,b,c) z Rotated Point b  (0,0,c) (0,0,0) c (0,0,0)

  18. Arbitrary Axis Rotation • Step 3. Rotate about y axis by  y (a,b,c) l Projected Point d x  (a,0,d) Rotated Point (0,0,0) z  l d (a,0,d) a (0,0,d)

  19. Arbitrary Axis Rotation • Step 4. Rotate about z axis by the desired angle  y l x  z

  20. Arbitrary Axis Rotation • Step 5. Apply the reverse transformation to place the axis back in its initial position y l l x z

  21. Example Find the new coordinates of a unit cube 90º-rotated about an axis defined by its endpoints A(2,1,0) and B(3,3,1). A Unit Cube

  22. y B’(1,2,1) x z Example • Step1. Translate point A to the origin A’(0,0,0)

  23. Example • Step 2. Rotate axis A’B’ about the x axis by an angle , until it lies on the xz plane. y Projected point (0,2,1) B’(1,2,1) l  x z B”(1,0,5)

  24. Example • Step 3. Rotate axis A’B’’ about the y axis by and angle , until it coincides with the z axis. y l x  (0,0,6) B”(1,0,  5) z

  25. Example • Step 4. Rotate the cube 90° about the z axis • Finally, the concatenated rotation matrix about the arbitrary axis AB becomes,

  26. Example

  27. Example • Multiplying R(θ) by the point matrix of the original cube

  28. Other Transformations • Reflection Relative to the xy Plane • Z-axis Shear y y z x z x

  29. Coordinate Transformations • Multiple Coordinate System • Local (modeling) coordinate system • World coordinate scene Local Coordinate System

  30. Coordinate Transformations • Multiple Coordinate System • Local (modeling) coordinate system • World coordinate scene Word Coordinate System

  31. Coordinate Transformations • Example – Simulation of Tractor movement • As tractor moves, tractor coordinate system and front-wheel coordinate systemmove in world coordinate system • Front wheelsrotate in wheel coordinate system

  32. y’ y y x’ u'y u'x (x0,y0,z0) x x (0,0,0) (0,0,0) z z u'z z’ Coordinate Transformations • Transformation of an Object Description from One Coordinate System to Another • Transformation Matrix • Bring the two coordinates systems into alignment 1. Translation u'y u'x u'z

  33. y y y x x x (0,0,0) (0,0,0) (0,0,0) z z z Coordinate Transformations 2. Rotation & Scaling y’ x’ u'y u'y u'y u'x u'x u'x u'z u'z u'z z’

More Related