Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester 2008-2009 ITGD3107 University of Palestine.

Similar presentations


Presentation on theme: "1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester 2008-2009 ITGD3107 University of Palestine."— Presentation transcript:

1 1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester 2008-2009 ITGD3107 University of Palestine

2 2 Chapter 5 Two Dimensional Geometric Transformations ITGD3107 Computer Graphics

3 3 Two Dimensional Geometric Transformations Some Basics 2D Translations. 2D Scaling from the origin. 2D Rotation about the origin. Transformations.

4 4 Some Basics Basic geometric types. –Scalars s –Vectors v –Points p Transformations –Types of transformation: rotation, translation, scale. –Matrix representation –Order P=T(P)

5 5 2D Translations. P P’

6 6 Component-wise addition of vectors v’ = v + t where and x’ = x + dx y’ = y + dy To move polygons: translate vertices (vectors) and redraw lines between them Preserves lengths (isometric) Preserves angles (conformal) dx = 2 dy = 3 Y X 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6 Example: 2D Translation (Note: Points are at object’s local coordinate system origin)

7 7 2D Scaling from the origin. P P’

8 8 Component-wise scalar multiplication of vectors v’ = Sv where and Y X 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6 Example: 2D Scaling

9 9 2D Rotation about the origin. y x r r P’(x’,y’) P(x,y) 

10 10 2D Rotation about the origin. y x r r P’(x’,y’) P(x,y)   y x

11 11 2D Rotation about the origin. y x r r P’(x’,y’) P(x,y)   y x

12 12 2D Rotation about the origin. Substituting for r : Gives us :

13 13 2D Rotation about the origin. Rewriting in matrix form gives us :

14 14 Transformations. Translation. –P=T + P Scale –P=S  P Rotation –P=R  P We would like all transformations to be multiplications

15 15 Translate [1,3] by [7,9] Scale [2,3] by 5 in the X direction and 10 in the Y direction Rotate [2,2] by 90 ° ( π /2) Examples


Download ppt "1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester 2008-2009 ITGD3107 University of Palestine."

Similar presentations


Ads by Google