Translation:-
It is the straight line movement of an object from one position to another is called Translation. Here the object is positioned from one coordinate location to another.
Translation of point:
To translate a point from coordinate position (x, y) to another (x1 y1), we add algebraically the translation distances Tx and Ty to original coordinate.
x1=x+Tx
y1=y+Ty
The translation pair (Tx,Ty) is called as shift vector.
Translation is a movement of objects without deformation. Every position or point is translated by the same amount. When the straight line is translated, then it will be drawn using endpoints.
For translating polygon, each vertex of the polygon is converted to a new position. Similarly, curved objects are translated. To change the position of the circle or ellipse its center coordinates are transformed, then the object is drawn using new coordinates.
Let P is a point with coordinates (x, y). It will be translated as (x1 y1).
Matrix for Translation:
Scaling :-
Suppose we want the point (x1 y1) to be scaled by a factor sx and by a factor sy along y direction.
Then the new coordinates become : x2 = x1 * sx and y2 = y1 * sy
scaling a point physically means shifting a point away. It does not magnify the point. But when a picture is scaled, each of the points are scaled differently and hence the dimensions of the picture changes.
Rotation:-
Suppose we want to rotate a point (x1 y1) clockwise through an angle θ about the origin of the coordinate system. Then mathematically we can show that
x2 = x1cosθ+ y1sinθ and
y2 = x1sinθ - y1cosθ
These equations become applicable only if the rotation is about the origin.
In the matrix for [x2 y2 1] = [x1 y1 1]
Reflection:-
Reflection is the mirror image of original object. In other words, we can say that it is a rotation operation with 180°. In reflection transformation, the size of the object does not change. The following figures show reflections with respect to X and Y axes, and about the origin respectively.
Shearing:-
A transformation that slants the shape of an object is called the shear transformation. There are two shear transformations X-Shear and Y-Shear. One shifts X coordinates values and other shifts Y coordinate values. However; in both the cases only one coordinate changes its coordinates and other preserves its values. Shearing is also termed as Skewing.
X-Shear
The X-Shear preserves the Y coordinate and changes are made to X coordinates, which causes the vertical lines to tilt right or left as shown in below figure.
The transformation matrix for X-Shear can be represented as −
X' = X + Sh x . Y
Y' = Y
Y-Shear
The Y-Shear preserves the X coordinates and changes the Y coordinates which causes the horizontal lines to transform into lines which slopes up or down as shown in the following figure.
The Y-Shear can be represented in matrix form as-
Y' = Y + Sh y . X
X' = X
|
Post a Comment