03_GeometricTransformation(ch5)

# 03_GeometricTransformation(ch5) - Geometric Transformations...

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

Geometric Transformations Chapter 5

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

View Full Document
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
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 + = ¢

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

View Full Document
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’)
2D Scaling n Scaling a coordinate means multiplying each of its components by a scalar ´ 2 X ´ 2, Y ´ 0.5

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

View Full Document
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 × = ¢
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

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

View Full Document
n (x, y, 0) represents a point at infinity n (0, 0, 0) is not allowed Homogeneous Coordinates
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.

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

View Full Document
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 × = ¢ ) , (
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

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern