1 / 33

CSCE441: Computer Graphics 3D Transformations

CSCE441: Computer Graphics 3D Transformations. Jinxiang Chai. 3D Transformation. A 3D point (x,y,z) – x,y, and z coordinates We will still use column vectors to represent points. Homogeneous coordinates of a 3D point (x,y,z,1) Transformation will be performed using 4x4 matrix.

Download Presentation

CSCE441: Computer Graphics 3D 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. CSCE441: Computer Graphics3D Transformations Jinxiang Chai

  2. 3D Transformation A 3D point (x,y,z) – x,y, and z coordinates We will still use column vectors to represent points. Homogeneous coordinates of a 3D point (x,y,z,1) Transformation will be performed using 4x4 matrix

  3. Right-handed Coordinate System Left hand coordinate system Not used in this class and Not in OpenGL

  4. 3D Transformation Homogenous coordinates Very similar to 2D transformation Translation transformation

  5. 3D Transformation Homogenous coordinates Very similar to 2D transformation Scaling transformation

  6. 3D Transformation y + x z 3D rotation is done around a rotation axis Fundamental rotations – rotate about x, y, or z axes Counter-clockwise rotation is referred to as positive rotation (when you look down negative axis)

  7. 3D Transformation Keep z constant! y + x z Rotation about z – similar to 2D rotation

  8. y x z 3D Transformation z y x Rotation about y: z -> y, y -> x, x->z

  9. 3D Transformation x z y y x z Rotation about x (z -> x, y -> z, x->y)

  10. Inverse of 3D Transformations Invert the transformation In general, X= AX’-->X’=A-1X T(-tx,-ty,-tz) T(tx,ty,tz)

  11. 3D Rotation about Arbitrary Axes Rotate p about the by the angle 10

  12. 3-D Rotation • General rotations in 3-D require rotating about an arbitrary axis of rotation • Deriving the rotation matrix for such a rotation directly is a good exercise in linear algebra • The general rotation matrix is a combination of coordinate-axis rotations and translations!

  13. 3D Rotation about Arbitrary Axes Rotate p about the by the angle

  14. 3-D Rotation • General rotations in 3-D require rotating about an arbitrary axis of rotation • Deriving the rotation matrix for such a rotation directly is a good exercise in linear algebra • Standard approach: express general rotation as composition of canonical rotations • Rotations about x, y, z

  15. Composing Canonical Rotations • Goal: rotate about arbitrary vector r by θ • Idea: we know how to rotate about x,y,z • Set up a transformation that superimposes rotation axis onto one coordinate axis • Rotate about the coordinate axis • Translate and rotate object back via inverse of the transformation matrix

  16. Composing Canonical Rotations Goal: rotate about arbitrary vector r by θ Idea: we know how to rotate about x,y,z So, rotate about z by - until r lies in the xz plane Then rotate about y by -βuntil r coincides with +z Then rotate about z by θ Then reverse the rotation about y(byβ ) Then reverse the rotation about z(by ) 15

  17. 3D Rotation about Arbitrary Axes Rotate p about the by the angle

  18. 3D Rotation about Arbitrary Axes Translate so that rotation axis passes through the origin

  19. 3D Rotation about Arbitrary Axes Rotation by about z-axis to place the rotation vector on xoz plane

  20. 3D Rotation about Arbitrary Axes Rotation by about y-axis to align the rotation vector with z axis

  21. 3D Rotation about Arbitrary Axes Rotation by about z-axis (rotation vector)

  22. 3D Rotation about Arbitrary Axes Rotation by about y-axis

  23. 3D Rotation about Arbitrary Axes Rotation by about z-axis

  24. 3D Rotation about Arbitrary Axes Translate the object back to original point

  25. 3D Rotation about Arbitrary Axes Final transformation matrix for rotating about an arbitrary axis

  26. 3D Rotation about Arbitrary Axes Final transformation matrix for rotating about an arbitrary axis 25

  27. 3D Rotation about Arbitrary Axes Final transformation matrix for rotating about an arbitrary axis

  28. 3D Rotation about Arbitrary Axes A 3 by 3 Rotation matrix—orthogonal matrix Final transformation matrix for rotating about an arbitrary axis

  29. Rotation Matrices • Orthonormal matrix: • orthogonal (columns/rows linearly independent) • normalized (columns/rows length of 1)

  30. Rotation Matrices • Orthonormal matrix: • orthogonal (columns/rows linearly independent) • normalized (columns/rows length of 1) • The inverse of an orthogonal matrix is just its transpose:

  31. Rotation Matrices • Orthonormal matrix: • orthogonal (columns/rows linearly independent) • normalized (columns/rows length of 1) • The inverse of an orthogonal matrix is just its transpose:

  32. Rotation Matrices • Orthonormal matrix: • orthogonal (columns/rows linearly independent) • normalized (columns/rows length of 1) • The inverse of an orthogonal matrix is just its transpose: e.g.,

  33. Next Lecture 2D coordinate transformations 3D coordinate transformations Lots of vector and matrix operations! 37

More Related