1 / 22

Graphics Programming: Transformations

Graphics Programming: Transformations. Transformation (Isometry). Translations Rotations Scaling Mirror. Transformations. One example of a transformation is the window to viewport transformation.

zia
Download Presentation

Graphics Programming: 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. Graphics Programming:Transformations

  2. Transformation (Isometry) • Translations • Rotations • Scaling • Mirror

  3. Transformations • One example of a transformation is the window to viewport transformation. • Here we have seen an image in the world window scaled and translated (moved) into a viewport window. • We can build on this transformation to allow us to move objects to more complex locations.

  4. Transformations • A Transformation consists of: • a Rotation • a Scaling and • a Translation • a Shearing • They occur in 2D and 3D

  5. Transformations • Transformations allow for: • scene composition

  6. Transformations • Transformations allow for: • easily create symmetrical objects

  7. Transformations • Transformations allow for: • viewing objects at different angles • computer animation where several objects need to move relative to one another

  8. Translation

  9. Scaling

  10. Rotation

  11. Reflection (flip)

  12. Combining Transforms

  13. Combining Transforms

  14. Combining Transforms

  15. Transforming Points • A transformation simply takes a point and maps it to another location.

  16. Transforming Points • In the 2D case this means…. • Q = M(P) • where M is some mapping matrix Q P

  17. Matrices : Addition

  18. Matrices : Multiplication 2x - y + 2z = 1 x + 2y - 4z = 3 3x - y + z = 0

  19. Matrices : Multiplication

  20. Matrices : Rotation

  21. Matrices :Identity Matrix 2 3 4 4 7 5 5 2 8 1 0 0 0 1 0 0 0 1 2 3 4 4 7 5 5 2 8 x =

  22. Further Reading See Rowe – Chapter 2 for a discussion on homogenous coordinates and further examples of matrix transformations. Also see discussions and technical articles on: www.gamedeveloper.com www.gamedev.net www.ddj.com Dr. Dobb’s Journal - been around since 1976

More Related