




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to geometrical transformations in computer graphics, including translations, rotations, scaling, and reflections. The document also covers the importance of these transformations in graphics, the basics of matrices, and the representation of 2D and 3D transformations using homogeneous coordinates.
Typology: Exams
1 / 28
This page cannot be seen from the preview
Don't miss anything!





















Institute of Technology Computer Science and IT
(^) changing something to something else via rules (^) transformation maps points to other points and/or vectors to other vectors (x, y, z) -> (x’, y’, z’)
(^) moving objects on screen / in space (^) specifying the camera’s view of a 3D scene (^) mapping from model space to world space General Transformation 2
t x & t y
Changing the size of an object scale multiplies each coordinate of each point by a scale factor scale factor can be different for each coordinate (e.g. for x & y coordinates)
uniform scaling , whereas S x = S y
Scaling 7
To scale a point P by scale factors S x and S y we apply the scaling matrix S: Contd… 8 y x S S S 0 0 y x y x y x p p S S p p 0 0 x x x p S p y y y p S p
Basic transformations can be expressed in the general matrix form: P’ = M1. P + M With coordinate positions P and P' represented as column vectors. Matrix M is a 2 by 2 array containing multiplicative factors, and M2 is a two-element column matrix containing translational terms. For translation M1 is the identity matrix. For rotation or scaling: M2 contains the translational terms associated with the pivot point or scaling fixed point. To produce a sequence of transformations with these equations, such as scaling followed by rotation then translation, we must calculate the transformed coordinate’s one step at a time. First, coordinate positions are scaled, then these scaled coordinates are rotated, and finally the rotated coordinates are translated. A more efficient approach would be to combine the transformations so that the final coordinate positions are obtained directly from the initial coordinates, thereby eliminating the calculation of intermediate coordinate values. To be able to do this, we need to reformulate the above equation. To eliminate the matrix addition associated with the translation terms in M2. Matrix Representation and Homogeneous Coordinates 10
We can combine the multiplicative and translational terms for two- dimensional geometric transformations in to a single matrix representation by expanding the 2 by 2 matrix representations to 3 by 3 matrices. This allows us to express all transformation equations as matrix multiplications , providing that we also expand the matrix representations for coordinate positions. To express any two-dimensional transformation as a matrix multiplication, we need three variable coordinates. So we represent each Cartesian coordinate position (x, y) with the homogeneous coordinate triple (x, y, h), where y = x = Thus a general homogeneous coordinate representation can also be written as (h.x, h .y, h). For two-dimensional geometric transformations, we can choose the homogeneous parameter h to be any nonzero value. A convenient choice is simply to set h = 1. Each two-dimensional position is represented with homogeneous coordinates (x, y, 1). Now we will see the basic transformation using 3 X 3 matrixes. Cont., 11
Contd… 13 0 0 1 sin cos 0 cos sin 0 R 0 0 1 1 sin cos 0 cos sin 0 1 y x y x p p p p P R P Abbrevatio n p p p x x y ' ( ). cos sin cos sin y y x p p p
2D scaling with homogenous coordinate
14 0 0 1 0 0 0 0 y x S S S 0 0 1 1 0 0 0 0 1 y x y x y x p p S S p p x x x p ^ S p y y y p S p Abbrevation P ' S ( Sx , Sy ). P
Perform rotation about pivot point (2,2) translating by (-2,-2) to origin, rotating about the origin and then translating by (2,2) back to the pivot point Therefore, using homogenous coordinates we can compose all 3 matrices into one composite transformation, C : C = T 2
1 P’ = T 2
1
Contd… 16
17 6/17/21 (^) Computer Graphics Addisu M. AMU – CSIT
19
20