1 / 23

Elementary 3D Transformations - a "Graphics Engine"

Elementary 3D Transformations - a "Graphics Engine". Transformation procedures Transformations of coordinate systems Translation Scaling Rotation. Coordinate systems. left handed right handed. Transformation procedures. A scene is made up of objects

monty
Download Presentation

Elementary 3D Transformations - a "Graphics Engine"

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. Elementary 3D Transformations - a "Graphics Engine" Transformation procedures Transformations of coordinate systems Translation Scaling Rotation

  2. Coordinate systems left handed right handed

  3. Transformation procedures • A scene is made up of objects • Objects can be made of separately defined parts • Each object / part defined by a list of points (vertices) • Any part of the object can be moved or distorted by applying a transformation to the list of points which define it

  4. Basic transformations • Translation (shift) • Scaling • Rotation

  5. Y D D C A C A B Z B X Translation x’ = x + Tx y’ = y + Ty z’ = z + Tz T = (Tx,Ty,Tz)

  6. D C A D B C A B Scalingabout the origin x’ = x * Sx y’ = y * Sy z’ = z * Sz S > 1 - enlarge 0 < S < 1 - reduce S < 0 - mirror Y Z X

  7. Scalingabout an arbitrary point Scaling about a fixed point ( xc, yc, zc ) x' = xc + ( x – xc ) * Sx y' = xc + ( y – yc ) * Sy z' = zc + ( z – zc ) * Sz Can also be achieved by a composite transformation.

  8. Rotation The direction of rotation in the left-handed system Positive angle of rotation when looking from a positive axis toward the origin a 90oclockwise rotation transforms one positive axis into the other.

  9. Y Clockwise X Positive angle of rotation for Z axis Looking from the positive end of Z axis towards the origin

  10. Rotation Axis of rotation is Direction of positive rotation is X from Y to Z Y from Z to X Z from X to Y

  11. C B D D A C A B Rotation about Z axis x' = x·cos  - y·sin  y' = x·sin  + y·cos  z' = z Y Z X

  12. D A B D C C A B Rotation about X axis • y' = y·cos  - z·sin  • z' = y·sin  + z·cos  • x' = x Y Z X

  13. D D A C B A B C Rotation about Y axis • z' = z·cos - x·sin • x' = z·sin + x·cos • y' = y Y Z X

  14. Matrix representationHomogeneous coordinates • common notation for ALL transformations • common computational mechanism for ALL transformations • simple mechanism for combining a number of transformations => computational efficiency

  15. Common matrix operation for all transformations??? • Translate (shift) point P • Scale point P • Rotate point P Point (vector) P = [ xp yp zp ] Matrix ???

  16. Homogeneous coordinates • Point P = (x, y, z ) represented by a vector P = • Transformations All represented by a 4 x 4 matrix T T =

  17. Point transformation in homogeneous coordinates • Implemented by matrix multiplication P’ = T · P

  18. Transformation matrices for elementary transformations • 4 x 4 matrix • Homogeneous coordinates • Translation, scaling, rotation and perspective projection, all defined through matrices

  19. Translation x’ = x + Tx y’ = y + Ty z’ = z + Tz T =

  20. Scaling x’ = x * Sx y’ = y * Sy z’ = z * Sz S =

  21. Rotation about Z axis x' = x·cos  - y·sin  y' = x·sin  + y·cos  z' = z Rz =

  22. Rotation about X axis y' = y·cos  - z·sin  z' = y·sin  + z·cos  x' = x Rx =

  23. Rotation about Y axis z' = z·cos - x·sin x' = z·sin + x·cos y' = y Ry =

More Related