UNIT-03 2D DRAWING GEOMETRY


Introduction of Transformations

Computer Graphics provide the facility of viewing object from different angles. The architect can study building from different angles i.e.
  1. Front Evaluation
  2. Side elevation
  3. Top plan
A Cartographer can change the size of charts and topographical maps. So if graphics images are coded as numbers, the numbers can be stored in memory. These numbers are modified by mathematical operations called as Transformation.
The purpose of using computers for drawing is to provide facility to user to view the object from different angles, enlarging or reducing the scale or shape of object called as Transformation.

Two essential aspects of transformation are given below:
  1. Each transformation is a single entity. It can be denoted by a unique name or symbol.
  2. It is possible to combine two transformations, after connecting a single transformation is obtained, e.g., A is a transformation for translation. The B transformation performs scaling. The combination of two is C=AB. So C is obtained by concatenation property.
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.
An example that helps to distinguish these two viewpoints:
The movement of an automobile against a scenic background we can simulate this by
  • Moving the automobile while keeping the background fixed-(Geometric Transformation)
  • We can keep the car fixed while moving the background scenery- (Coordinate Transformation)

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.

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).
Translation
Translation

Matrix for Translation:

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
                Matrix 2
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]
              Matrix 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.
enter image description here
enter image description here

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.
enter image description here
The transformation matrix for X-Shear can be represented as −enter image description here
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.
enter image description here
The Y-Shear can be represented in matrix form as-enter image description here
Y' = Y + Sh y . X
X' = X






Post a Comment

Previous Post Next Post