2D & 3D Transformation
2D Transformation: Transformation means changing some graphics into something else by applying
rules. We can have various types of transformations such as translation, scaling up or down, rotation,
shearing, etc. When a transformation takes place on a 2D plane, it is called 2D transformation.
There are two complementary points of view for describing object transformation.
1. Geometric Transformation: The object itself is transformed relative to the coordinate system or
background. The mathematical statement of this viewpoint is defined by geometric transformations
applied to each point of the object.
2. Coordinate Transformation: The object is held stationary while the coordinate system is transformed
relative to the object. This effect is attained through the application of coordinate transformations.
Homogeneous Coordinates: To shorten this process, we have to use a 3×3 transformation matrix
instead of a 2×2 transformation matrix. To convert a 2×2 matrix to 3×3 matrix, we have to add an extra
dummy coordinate W. In this way, we can represent the point by 3 numbers instead of 2 numbers, which is
called Homogeneous Coordinate system.
Types of Transformations:
1. Translation
2. Scaling
3. Rotating
4. Reflection
5. Shearing
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.
, 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.
x’=x + tx
y’=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.
,