Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics-1 Gentle Introduction to Computer Graphics (2) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia.

Similar presentations


Presentation on theme: "Graphics-1 Gentle Introduction to Computer Graphics (2) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia."— Presentation transcript:

1 Graphics-1 Gentle Introduction to Computer Graphics (2) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia –Jack van Wijk’s “Computer Graphics” Course Slides, University of Eindhoven.

2 Graphics-2 Outline Introduction to 2D Modeling Transformations Matrix Representations Linear Transformations

3 Graphics-3 Introduction to Modeling Transformations Specify transformations for objects –Allows definitions of objects in own coordinate systems –Allows use of object definition multiple times in a scene

4 Graphics-4 2D Modeling Transformations Scale Rotate Translate Scale Translate x y World Coordinates Modeling Coordinates

5 Graphics-5 Scaling Scaling a coordinate means multiplying each of its components by a scalar Uniform scaling means this scalar is the same for all components:  2 2

6 Graphics-6 Non-uniform scaling: different scalars per component: How can we represent this in matrix form? Scaling X  2, Y  0.5

7 Graphics-7 Scaling Scaling operation: Or, in matrix form: scaling matrix

8 Graphics-8 2-D Rotation  (x, y) (x’, y’) x’ = x cos(  ) - y sin(  ) y’ = x sin(  ) + y cos(  )

9 Graphics-9 2-D Rotation This is easy to capture in matrix form: Even though sin(  ) and cos(  ) are nonlinear functions of , –x’ is a linear combination of x and y –y’ is a linear combination of x and y

10 Graphics-10 2-D Translation (x, y) (x’, y’) x’ = x + tx y’ = y + ty tx ty


Download ppt "Graphics-1 Gentle Introduction to Computer Graphics (2) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia."

Similar presentations


Ads by Google