Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics Programming Graphics Programming: Transformations.

Similar presentations


Presentation on theme: "Graphics Programming Graphics Programming: Transformations."— Presentation transcript:

1 Graphics Programming 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

14

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 P Q

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 100 0 10 0 01 234475528234475528 = 234475528234475528 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


Download ppt "Graphics Programming Graphics Programming: Transformations."

Similar presentations


Ads by Google