Geometric Transformations PDF
Geometric Transformations PDF
Alternatives
Object transformation - Our focus area is object transformation…
Coordinate system transformation
Object transformation types
Euclidean transformation e.g. Translation, rotation, reflection
Affine transformation e.g. Scaling, shear
Projective transformation - Most general linear transformations that use homogenous coordinates
…Object transformations
Scaling
Changing the dimensions to alter the size of drawing
For example we have a triangle with vertices A=(4,0), B=(1,2) & C=(3,5). By using a scaling
factor of 2, the scaling matrix would be , , Sx being the scaling factor in X axis, Sy-in Y
axis
Point A would become [4 0] 2 0
0 2 = [8 0] = A1
0 2 = [2 4] = B1
Point C [3 5 ] 2 0
0 2 = [6 10] = C1
Translation
Moving a drawing or model across the screen is called translation.
Accomplished by adding a moving distance to the coordinates of each corner point
e.g. A rectangle being moved by adding 40 units to X coordinate and 30 units in Y
coordinate
To translate by (Tx, Ty), every points’ X & Y will be replaced as
X1 = X + Tx
Y1 = Y + Ty
X1 = 10+40=50 ; Y1=10+30=40
(1,1) (5,4)
Rotation
Rotation about a fixed pivot point
Lets consider a point P(40,20) is to be rotated about origin through an angle of 45o
The rotation matrix to be deployed is