03_GeometricTransformation(ch5)

03_GeometricTransformation(ch5) - Geometric Transformations...

Info icon This preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Geometric Transformations Chapter 5
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Introduction n We deal a lots with objects defined in 2-D and 3-D worlds in computer graphics n All objects have shape, position and orientation Þ geometric description n Geometric transformation n Operations that are applied to geometric description of an object to change its position, orientation, or size n Two types of geometric operations n Vertex operations - Operate on individual vertexes n Primitive operations - Operate on all the vertexes of a primitive
Image of page 2
2D Translation n Translation (Fig.s 5-1, 5-2) Only linear 2D transformations can be represented with a 2x2 matrix v Not linear transformation ú û ù ê ë é = y x P ú û ù ê ë é ¢ ¢ = ¢ y x P ) , ( y x y x t t T t t T = ú û ù ê ë é = T P P + = ¢ x t x x + = ¢ y t y y + = ¢
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
n Rotation n Even though sin( q ) and cos( q ) are nonlinear functions of q , n x’ is a linear combination of x and y n y’ is a linear combination of x and y 2D Rotation P R P × = ¢ ) ( q ú û ù ê ë é - = q q q q cos sin sin cos ) ( R q q sin cos y x x - = ¢ q q cos sin y x y + = ¢ q (x, y) (x’, y’)
Image of page 4
2D Scaling n Scaling a coordinate means multiplying each of its components by a scalar ´ 2 X ´ 2, Y ´ 0.5
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2D Scaling n Scaling y x s y y s x x × = × = ' ' ú û ù ê ë é ú û ù ê ë é = ú û ù ê ë é y x s s y x y x 0 0 ' ' scaling matrix S P S P × = ¢
Image of page 6
Homogeneous Coordinates n Expand to 3 by 3 matrices n All transformation equations can be expressed as matrix multiplication n To do so, add a 3rd coordinate to every 2D point n Cartesian coordinate homogeneous coordinate n homogeneous parameter, h n non-zero value n convenient choice of h= 1 , ) , ( y x ) , , ( h y x h h , h x x h = h y y h = ) 1 , , ( y x
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
n (x, y, 0) represents a point at infinity n (0, 0, 0) is not allowed Homogeneous Coordinates
Image of page 8
Homogeneous Coordinates § Convenient coordinate system to represent many useful transformations n Possible to represent scaling, rotation, and translation in a matrix form n Any sequence of translation, rotation, and scale operations can be collapsed into a single homogeneous matrix.
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2D Transformation Matrices ú ú ú û ù ê ê ê ë é × ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é ¢ ¢ 1 1 0 0 1 0 0 1 1 y x t t y x y x P t t T P y x × = ¢ ) , ( ú ú ú û ù ê ê ê ë é × ú ú ú û ù ê ê ê ë é - = ú ú ú û ù ê ê ê ë é ¢ ¢ 1 1 0 0 0 cos sin 0 sin cos 1 y x y x q q q q P R P × = ¢ ) ( q ú ú ú û ù ê ê ê ë é × ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é ¢ ¢ 1 1 0 0 0 0 0 0 1 y x s s y x y x P s s S P y x × = ¢ ) , (
Image of page 10
Inverse Transformations ú ú ú û ù ê ê ê ë é - - = - 1 0 0 1 0 0 1 1 y x t t T t R R = ú ú ú û ù ê ê ê ë é - = - 1 0 0 0 cos sin 0 sin cos 1 q q q q ú ú ú ú ú ú û ù ê ê ê ê ê ê ë é = - 1 0 0 0 1 0 0 0 1 1 y x s s S
Image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2D Composite Transformations ú ú ú û ù ê ê ê ë é + + = ú ú ú û ù ê ê ê ë é × ú ú ú û ù ê ê ê ë é 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 2 1 2 1 1 1 2 2 y y x x y x y x t t t t t t t t { } { } P t t T t t T P t t T t t T P y x y x y x y x × × = × × = ¢ ) , ( ) , ( ) , ( ) , ( 1 1 2 2 1 1 2 2 n Composite 2D translations ) , ( ) , ( ) , ( 2 1 2 1 1 1 2 2 y y x x y x y x t t t t T t t T t t
Image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern