Two Dimensional Geometric Transformations.
changes in orientations, size, and shape
Basic geometric transformations are:
1. Translation,
We translate a 2D point by adding translation distances, tx and ty, to the original coordinate position (x,y): x' = x + tx, y' = y + ty
2. Rotation
Rotation About the Origin-
To rotate an object about the origin (0,0), we specify the rotation angle ‘x’
for positive, counter-clockwise rotation.
for negative, clockwise rotation.
General Pivot-Point Rotation
We first translate the object to the origin, then we apply the rotation about the origin and translate it back to its original position.
3. Scaling.
Scaling With Respect to the Origin-
We scale a 2D object with respect to the origin by setting the scaling factors sx and sy,
which are multiplied to the original vertex coordinate positions (x,y):
x' = x * sx, y' = y * sy.
General Fixed point Scaling / Composite Translation
Similar to General Pivot point rotation, but scaling is done. The object is enlarged.
Other transformations:
4. Reflection
It is a transformation that produces a mirror image of an object.
The mirror image can be either about the x-axis or the y-axis.
The object is rotated by180°.
5. Shear
It is a transformation that changes the shape of the object.
In X-direction, Horizontal shearing.
In -direction, Vertical Shearing.
---------------------------------------------------