Sie sind auf Seite 1von 18

2-DIMENSION

GEOMETRIC
TRANSFORMATI
ON
By – Brajkishore Prajapati
IT – 6th sem
AGENDA
 Basic Geometric Transformation
 Why Geometric Transformation?

 Translation

 Rotation

 Scaling

 Matrix Coordinates and homogenous


coordinates.
BASIC GEOMETRIC
TRANSFORMATION
 Any changes in orientation, shape and size
are accomplished with geometric
transformation that changes the coordinates
description of objects.
 The three basic geometric transformation are
translation, rotation and scaling.
 Other transformation that are often applied
to objects are reflection and shear.
WHY GEOMETRIC
TRANSFORMATION?
 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
TRANSLATION
•A translation is
applied to an object
by repositioning it
along a straight-line
path from one
coordinate location to
another.
 We translate a two-dimensional point by adding
translation distances, tx and ty to the original
coordinate position (x, y) to move the point to a
new position (x', y')

x' = x + tx, y' = y + ty,

 The translation distance pair (tx ty,) is called a


translation vector or shift vector.
REPRESENTATION IN MATRIX FORM.
 Let initial vector be P, shifted vector be T’
and the final vector be P’.

 2- Dimensional translation equation in the


matrix form is:
P’ = P + T.
 Translation is a rigid body transformation that
moves without deformation
ROTATION
•A two-dimensional
rotation is applied to an
object by repositioning
it along a circular path
in the x-y plane.
•To generate a rotation,
we specify a rotation
angle theta 0 and the
position (xr yr) of the
rotation point (or pivot
point) about which the
object is to be rotated
 The angular and coordinate relationships of the
original and transformed point positions are
shown in figure.

 Here r is the constant distance from the origin


 Fi is the original angular position and theta is
rotation angle.
 The original coordinates of the point in polar
coordinates are

 Using standard trigonometric


identities, we can express the
transformed coordinates in
terms of theta and fi.
 Substituting the value of x and y, we get the
transformed equations for rotating a point at
position (x,y) through the angle

 We can write the equation in matrix form.


P’ = R.P
 When coordinate positions are represented as row
vectors instead of column vectors, the matrix
product in rotation above equation is transposed
so that the transformed row coordinate vector Ix'
y'l is calculated as

 where PT = [x y], and the transpose RT of matrix


R is obtained by interchanging rows and columns.
 Instead of origin the arbitrary pivot point is (xr,yr)
then new transformed position is

 Note - As with translations, rotations are rigid-body transformations


that move objects without deformation. Every point on an object is
rotated through the same angle.
SCALING
 A scaling transformation alters the size of an
object. This operation can be carried out for
polygons by multiplying the coordinate
values (x, y) of each vertex by scaling factors
sx and sy to produce the transformed
coordinates (x', y'):
 Scaling factor sx scales objects in the x direction,
while sy scales in the direction.
 The transformation equations can also be written
in the matrix form:

P’ = S.P
Case 1 Sx>1 and Sy>1 increase the size of the
object.
Case 2 Sx<1 and Sy<1 reduces the size of the
object the size of the object. Else remains same.
 When sx and sy are assigned the same value, a
uniform scaling is produced that maintains
relative object proportions. Unequal values for sx
and sy result in a differential scaling that is often
used in design applications.

 Turning a square (a) into a rectangle (b) with scaling factors


sx = 2 and sy= 1
 Hope you have enjoyed a video!

h a n k
T
yo u !

Das könnte Ihnen auch gefallen