Page 89 - DCAP504_Computer Graphics
P. 89
Computer Graphics
inverse scaling matrix S individually, the homogeneous coordinates of the
original object (object before scaling) is obtained. The coordinates are [0 0 2], [2 0
1], [2 2 1], and [0 2 1].
Therefore, with the help of inverting transformation the original 2-D object can be obtained from the
transformed 2-D object.
The inverse of a 3X3 matrix is calculated as shown.
Let A be a 3X3 matrix,
a b c
A= d e f
g h i
e f c b b c
h i i h e f
1 f d a c c a
A =
-1
A i g g i f d
d e b a a b
g h h g d e
Here,
A = { a[e.i-h.f]-b[d.i-g.f]+c[d.h-e.g]}
e f
h i =[e.i-f.h]
Therefore,
.e i − h h . c − i f . b − e
f
c
.
.
.
b
1
A = g.f − i i . a − g d . c − f . a
d
.
.
c
-1
a[e.i - h.f] - b[d.i - g.f] + c[d.h - e.g]
e
.
.
b
h . d − g g . b − ah e . a − d
6.4 Affine Transformation
Transformations such as translation, scaling, rotation, and shearing are all affine transformations. When
2-D objects are transformed they may acquire different shapes. Affine transformation helps to overcome
such problems. Affine transformations transform lines into lines, rectangle into rectangle, triangle into
triangle, and so on.
An affine transformation can be defined as a transformation that fixes some points of the object and
transforms other points of the object. This transformation preserves proportions on lines, however after
transformation the angles or lengths of the object can vary.
82 LOVELY PROFESSIONAL UNIVERSITY