Two-Dimensional Transformations in Computer Graphics – Explained with Examples
Transformation:
Fundamental to all computer graphics system is the ability
to simulate the manipulation of objects in space. this simulated spatial
manipulation is referred to as transformation
Geometric transformations:
Geometric transformations in computer graphics are
mathematical operations used to manipulate the position, size, orientation, and
shape of objects within a 2D or 3D space.
Coordinate fixed,
object move
Coordinate transformation:
Coordinate transformation is used to move objects from one
coordinate system to another. This is done by transforming the coordinates of
the object from one system to another, allowing the object to be moved,
rotated, and scaled in a virtual environment.
Coordinate change,
object fixed
Translation:
Moves an object from one location to another without
changing its shape or size.
P’ = Tv(p)
P = , P’ =
, Tv =
=
=
x’ = x + tx, y’ = y + ty
Rotation:
Turns an object around a fixed point at a certain angle.
P’ = RꝊ(p)
P = , P’ =
, RꝊ =
=
=
x’ = x cos(Ꝋ) – y sin(Ꝋ), y’ = x sin(Ꝋ)
+ y cos(Ꝋ)
Scaling:
Enlarges or reduces the size of an object proportionally.
P’ = (SxSy) p
P = , P’ =
, SxSy
=
=
=
x’ = xsx, y’ = ysy
Mirroring (Reflection):
Flips an object over a line to produce a mirror image.
mx =
the mirror reflection transformation mx,
about the x axis is given by
P’ = mxp
where x’ = x and y’ = -y
similarly, the mirror reflection about the y axis is
p’ = my(p)
where x’ = -x and y’ = y
Math:
v Transform
the triangle with vertices A(0,0), B(1,1) and C (5,2) with V = 5I + 2J respect
to origin
We know,
P’ = Tv(p)
P’ =
, Tv =
P=
P’ =
=
No comments