Chapter 4
Two-Dimensional Transformations
Dr. S.M. Mohidul Islam
Associate Professor
CSE Discipline, KU
Chapter 4 Contents
Introduction
4.1 Geometric Transformations
4.2 Coordinate Transformations
4.3 Composite Transformations
Solved & Supplementary Problems
Introduction
The simulated spatial manipulation of objects in 2D/3D space is referred
to as transformation.
Two types: Geometric and Coordinate transformations.
Geometric transformations: The object itself is transformed relative to a
stationary coordinate system or background.
Coordinate transformations: The object is held stationary while the
coordinate system is transformed relative to the object.
Example: The movement of an automobile against a scenic background.
We can simulate this by moving the automobile while keeping the backdrop fixed (a
geometric transformation).
Or we can keep the car fixed while moving the backdrop scenery (a coordinate
transformation).
Four Transformations: translation, rotation, scaling, and Mirror
reflection.
4.1 Geometric Transformations
Translation
In translation, an object is displaced a given distance and direction
from its original position.
If the displacement is given by the vector v = txI + tyJ, the new
object point P'(x', y') can be found by applying the transformation Tv
to P(x, y) .
P' = Tv(P)
where x' = x + tx and y' = y + ty
Inverse Geometric Transformation
P' = T-v(P)
where x' = x - tx and y' = y - ty
Rotation about the Origin
In rotation, the object is rotated 𝜃° about the origin.
The convention is that the direction of rotation is counterclockwise
if 𝜃 is a positive angle and clockwise if 𝜃 is a negative angle.
The transformation of rotation R𝜃 is P' = R𝜃 (P)
where x' = x cos(𝜃) – y sin(𝜃) and y' = x sin(𝜃) + y cos(𝜃).
Inverse Geometric Transformation
P' = R-𝜃 (P)
where x' = x cos(𝜃) + y sin(𝜃) and y' = - x sin(𝜃) + y cos(𝜃).
Scaling with Respect to the Origin
The process of expanding or compressing the dimensions of an object.
The scaling transformation Ssxsy is given by P' = Ssx,sy(P) where x' = sxx and
y' = syy.
If both scaling constants have the same value s, the scaling transformation
is said to be homogeneous or uniform.
if s > 1, it is a magnification/expansion of length Scaling transformation with
if s < 1, it is a reduction/compression of length. scaling factors sx = 2 and sy
= 1/2
Inverse Geometric Transformation
P' = S1/sx,1/sy (P)
where x' = (1/sx)x and y' = (1/sy)y
Mirror Reflection about an Axis
If either the x or y axis is treated as a mirror, the object has a mirror
image or reflection.
Since the reflection P' of an object point P is located the same
distance from the mirror as P,
mirror reflection transformation Mx about the x axis is
P' = Mx(P) where x' = x and y' = -y.
Similarly, the mirror reflection about the y axis is
P' = My(P) where x' = -x and y' = y.
Inverse Geometric Transformation
M x1 M x and M y1 M y
Mx = S1,-1 and My = S-1,1. So, the two reflection transformations are simply
special cases of scaling.
4.2 Coordinate Transformations
Translation
In translation, the xy coordinate is displaced a given distance and direction from
its original position.
If the displacement is given by the vector v = txI + tyJ, the new object point
P'(x', y') can be found by applying the transformation Tv to P(x, y) .
P' = Tv(P)
where x' = x - tx and y' = y - ty
Inverse Coordinate Transformation
P' = T-v(P)
where x' = x + tx and y' = y+ty
Rotation about the Origin
In rotation, the xy system is rotated 𝜃° about the origin.
The transformation of rotation R𝜃 is P' = R𝜃 (P)
where x' = x cos(𝜃) + y sin(𝜃) and y' = -x sin(𝜃) + y cos(𝜃).
Inverse Coordinate Transformation
P' = R-𝜃 (P)
where x' = x cos(𝜃) - y sin(𝜃) and y' = x sin(𝜃) + y cos(𝜃).
Scaling with Respect to the Origin
The process of expanding or compressing the dimensions of an object.
The scaling transformation Ssxsy is given by P' =Ssx,sy (P) where x' = (1/sx)x
and y' = 1(/sy)y.
Scaling
transformation with
scaling factors sx = 2
and sy = 1/2
Inverse Coordinate Transformation
P' = S1/sx, 1/sy(P)
where x' = sxx and y' = syy
Mirror Reflection about an Axis
If the new coordinate system is obtained by reflecting the old system
about either x or y axis, the relationship between coordinates is
given by the coordinate transformations Mx and My.
mirror reflection transformation Mx about the x axis is
P' = Mx(P) where x' = x and y' = -y.
Similarly, the mirror reflection about the y axis is
P' = My(P) where x' = -x and y' = y.
Inverse Geometric Transformation
M x1 M x and M y1 M y
Mx = S1,-1 and My = S-1,1. So, the two reflection transformations are simply
special cases of scaling.
4.3 Composite Transformations
More complex geometric and coordinate transformations can be built by multiplying
the basic matrix transformations. This process is sometimes called concatenation
of matrices and the resulting matrix is often referred to as the composite
transformation matrix (CTM).
For example
Ssx,sy,p. —scaling with respect to a fixed-point P other than the origin (TVSsx,SyT-V)
R𝜃 𝑃—rotation about a point P other than the origin (TVR𝜃 T-V)
,
ML—reflection about a line L other than the axes (R𝜃 TVMxR-𝜃 T-V)
Matrix Description of the Basic Transformations
Example 1: Magnification of an object while keeping its center fixed.
Let the geometric center of the object be located at C(h, k) [Fig. 4-10(a)].
Choosing a magnification factor s > 1, we construct the transformation…
(1) translate the object so that its center coincides with the origin [Fig. 4-10(b)] (T-v),
(2) scale the object with respect to the origin [Fig. 4-10(c)] (Ss,s),and
(3) translate the scaled object back to the original position [Fig. 4-lO(d)] (Tv).
The required transformation Ss,C can be formed by compositions Ss,C = [Link],s.T-v
where v = hI + kJ.
Example 2: Express as a matrix (i.e., CTM) the transformation
which magnifies an object about its center C(h, k).
From Example 1, the required transformation Ss,c can be written
as
Problems
Solved Problems: 4.1-4.16
Supplementary Problems: 4.19-4.28
Chapter 4 End