0% found this document useful (0 votes)
312 views61 pages

Geometric Transformations Overview

This is notes which be used as refracted gulf I am not able to understand and test is to compare the performance of an adhesive in a joint and to determine the tensile strength

Uploaded by

Josiah Gonsalves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
312 views61 pages

Geometric Transformations Overview

This is notes which be used as refracted gulf I am not able to understand and test is to compare the performance of an adhesive in a joint and to determine the tensile strength

Uploaded by

Josiah Gonsalves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

GEOMETRIC TRANSFORMATION

5th Mech C
Geometric Transformation
Geometric transformations
Geometric transformations
are required for
•Refers to the editing provide a means by which
construction and viewing of
features of the object using an image can be enlarged in
model. Also, required for
the software. size, or reduced, rotated, or
animation, kinematic
moved.
simulations, etc

These changes are brought Include Matrix algebra.


about by changing the co- • In CAD system, both 2D and 3D
ordinates of the object to a transformations are possible.
new set of values • 2D Geometric transformations are
easier compared to 3D geometric
depending upon the transformations.
requirements.
Geometric Transformation

Transformation Principles :

• Denotation.

• Concatenation.

Denotation :

• Applies only one Transformation operation (mathematical operations) on an


object at a time
Geometric Transformation

Concatenation:

• Two or more transformations can be applied on an object at a time.

• The end result is the same as that of sequential application of individual


transformations

Eg:

• The transformation operation A having the effect of translation can be


combined with the transformation operation B having the effect of scaling.

• The concatenated operation is given by C=A x B , which will have the


combined effect of Translation and Scaling in a single operation.
Geometric Transformation
• The main types of transformations with which we are likely to come
across are
• Translation
• Scaling
• Reflection or mirror
• Rotation
• Shearing
Representation of point

• A point in space can be represented by its


coordinates (x, y, z)
from the datum.
• The same can also be represented by a
vector starting from the origin of the
coordinate system as
• Position vectors
Translation

Size and orientation remain unchanged

This is normally the operation used in the CAD


systems as the MOVE command.
Geometric Transformation
Translation of a X2’,y2’
Y
Line

X1’,y1’
Translation distance = ty

X2,y2

X1,y1

Translation distance = tx X
Translation
Scaling

Primary diagonal
The transformed figure has actually moved
away as if a translation has taken place. This
apparent translation is because the scaling is
with respect to the origin of the coordinate
system. If the centroid of the plane figure
coincides with the base of the scaling factor
then there will be no apparent translation
Rotation Matrix

•Counter Clockwise
direction (CCW)
rotation.
•For clockwise
direction rotation,
ϴ = -ve.
Object displaced and rotated wrt origin
Reflection

• Reflection of object about x axis or y=0 line.

1 0
[𝑇] =
0 −1
• Reflection of object about Y axis or x=0 line.
−1 0
[𝑇] =
0 1
• Reflection of object about line y=x.

0 1
[𝑇] =
1 0
Reflection

• Reflection of object about line y=-x.

0 −1
[𝑇] =
−1 0
Matrix multiplication

How to do matrix multiplication in calculator?


Numerical 1

A line is defined by endpoints (0,0) and


(2,3). Perform the following transformation
operations on the line wrt origin.
1. Scale the line by 2 units along x direction
and 2 units along y direction.
2. Translate the line by 2 units along x
direction and 2 units along y direction
3. Rotate the line by 45 degrees in CCW
direction
Numerical 2

A line is defined by endpoints (0,0) and


(2,3). Perform the following transformation
operations on the line wrt origin
sequentially.
1. Scale the line by 2 units along x direction
and 2 units along y direction.
2. Translate the line by 2 units along x
direction and 2 units along y direction
3. Rotate the line by 45 degrees in CCW
direction
Numerical 3

• A triangle is defined by vertices (0,2), (0,3) and


(1,2). Perform the following operations in sequence
wrt origin.
• Scale the triangle by a factor of 1.5 along x direction
and 2.5 along y direction.
• Translate the triangle by 2 units in X direction and -3
units in Y direction
Numerical 3

• A triangle is defined by vertices (8,1), (7,3) and


(6,2). Obtain the reflection of the triangle:
• (a) About the x-axis
• (b) About the y-axis
• (c) About the line y=x
• (d)About the line y = -x
NUMERICAL 4

•A line is defined by coordinates (2,2) & (6,4).


Rotate the line about the endpoint (2,2) by
90⁰ in the CCW direction. Find out the new
location of the line. Plot the same.
SOLUTION

Add translation Multiply rotation Add back(inverse)


matrix to endpoints matrix to endpoints translation matrix to
of line of translated line endpoints of line
Numerical 5

• A triangle is defined by vertices a (2,1), b (5,1) and c


(3.5,3). The triangle is scaled about the mid point of
the base ‘ab’ by a scale factor of 2 along X and Y
directions. Find the coordinates of the triangle after
the transformation.
Reflection of an object about an
arbitrary line
Translate the line and the object so that the line passes through the
origin.

Rotate the line and the object about the origin until the line coincides
with one of the coordinate axis.

Perform the reflection of the object (about the


coordinate axis.)
Apply inverse rotation(back rotation) about the origin for the line as
well as reflected object.

Translate back the line and the object to the original location
Equation of a line
Reflection of an object about an arbitrary line
NUMERICAL 6

•A line is defined by the equation


y=1/2(x+4). The position vectors (2,4),
(4,6) & (3,6) represent a triangle. Obtain
the coordinates of the triangle when it is
reflected about the line.
NUMERICAL 6

•A line is defined by the equation


y=-1/2(x+4). The position vectors (2,4),
(4,6) & (3,6) represent a triangle. Obtain
the coordinates of the triangle when it is
reflected about the line.
NUMERICAL 7

•A square is defined by position vectors (7,3),


(10,3),(10,6) and (7,6). Get the reflection of
square about the line 2.1x=3y-6. Scale the
reflected square about the centroid by scale
factor of 0.5.
• A square is defined by position vectors (7,3), (10,3),(10,6)
and (7,6). Get the reflection of square about the line
2.1x=3y-6. Scale the reflected square by scale factor of 0.5.
Shearing- Geometric Transformation
Shearing or Twist- Geometric Transformation

• It is transformation which changes the shape of object or


tilts it by displacing points along one or more axes. (deforms)
• The shear can be in one direction or in two directions.
• This differs from rotation as it preserves parallelism but alters angles.
Shearing in the X-direction:
• In this horizontal shearing, sliding of layers occur in x direction. Only x
coordinates changes without changing the y values which causes vertical
lines to tilt right or left.
• If a point P(x,y) is sheared horizontally by a factor Shx, then the position
of P’(x’,y’) with respect to origin is:
• x’ = x+ Shx * y and y’=y
• Representing the above equations in matrix form, the matrix for
shearing in the x-direction is :
Shearing or Twist- Geometric Transformation
• Shearing in the Y-direction: Here shearing is done by sliding along
vertical or y-axis.
• Only y coordinates changes without changing the x values which causes
horizontal lines to tilt up or down.
• If a point P(x,y) is sheared vertically by a factor Shy, then the position of
P’(x’,y’) with respect to origin is:
• x’ = x and y’= Shy * x + y
• Representing the above equations in matrix form, the matrix for
shearing in the y-direction is :
Shearing in the X & Y-directions

• Shearing in the X & Y-direction: Here shearing is done by sliding


along horizontal or x axis as well as vertical or y-axis.
• Both x & y coordinates change which causes vertical lines to
tilt right or left & horizontal lines to tilt up or down.
• If a point P(x,y) is sheared horizontally by a factor of Shx &
vertically by a factor Shy, then the position of P’(x’,y’) with
respect to origin is:
• x’ = x+ Shx * y and
• y’= Shy *x + y
• Representing the above equations in matrix form, the matrix
for shearing in the x and y-directions is :
Numerical

• Apply shearing transformation to a rectangle ABCD with vertices


A(0,0), B(0,6),C (4,6) and D(4,0) as given below :
• Shear factor 0.5 in x-direction
• Shear factor 0.5 in y-direction
• Shear factor 0.5 in x and y directions
Concatenation

•Most geometric transformation require more


than one basic transformation to achieve the
desired result.
•In such cases, the combined transformation
matrix is obtained by multiplying the
respective transformation matrices.
•This process is called composite
transformation or concatenation.
Homogeneous Coordinates

• The rotation of a point, straight line or an entire image on the screen, about a
point other than origin, is achieved by first moving the image until the point of
rotation occupies the origin, then performing rotation, then finally moving the
image to its original position.
• The moving of an image from one place to another in a straight line is called a
translation. A translation may be done by adding or subtracting to each point,
the amount, by which picture is required to be shifted.
• Translation of point by the change of coordinate cannot be combined with other
transformation by using simple matrix application. Such a combination is
essential if we wish to rotate an image about a point other than origin by
translation, rotation again translation.
• To combine these three transformations into a single transformation,
homogeneous coordinates are used. In homogeneous coordinate system, two-
dimensional coordinate positions (x, y) are represented by triple-coordinates.
• For two-dimensional geometric transformation, we can choose homogeneous
parameter h to any non-zero value. For our convenience take it as one. Each two-
dimensional position is then represented with homogeneous coordinates (x, y,
1).
Homogeneous Representation

• In order to concatenate the transformations, all the


transformation matrices should be of multiplicative
type. However, the translation matrix is vector
additive while all others are matrix multiplications.
• In homogeneous representation, an n-dimensional
space is mapped into an (n + 1) dimensional space.
Thus, a two-dimensional point [x y] is represented
by three dimensions as [x y 1]. This greatly
facilitates computer graphics operations where the
concatenation of multiple transformations can be
easily carried out.
• If you move the projector closer to the screen, the whole 2D image
becomes smaller. If you move the projector away from the screen,
the 2D image becomes larger. As you can see, the value of W affects
the size of the image.
(15,21)
Translation matrix

• In homogeneous coordinate system,

1 0 0
T = 0 1 0
Tx Ty 1
ROTATION matrix

• In homogeneous coordinate system,

cos ϴ sin ϴ 0
R = −sin ϴ cos ϴ 0
0 0 1

CCW (COUNTER CLOCKWISE OR ANTI CLOCKWISE ) ROTATION


SCALING matrix

• In homogeneous coordinate system,

Sx 0 0
S = 0 Sy 0
0 0 1
• Sequences of transformations can be combined into
a single transformation using the concatenation
process.
• For example, consider the rotation of a line about
an arbitrary point A.
Since matrix operations are not commutative, care must be taken
to preserve the order in which they are performed while
combining the matrices
Numerical 9

• A triangle ABC, with vertices (30,20), (90,20) and


(30,80) respectively is to be rotated in anticlockwise
direction by 30◦. Write the 3x3 homogeneous
matrix and find the new position of the triangle
after rotation.
Numerical 10

•The corners of a polygon are defined by


position vectors (2,-3), (5,-1), (6,3) and (3,-5).
Reflect the polygon about the line 2y+6 =
(tan 35°)2x using concatenation method.
(composite transformation)
End of Chapter 2

You might also like