0% found this document useful (0 votes)
14 views11 pages

TOPIC 5 2D GEOMETRIC TRANSFORMATIONS

Lesson 8 discusses 2D geometric transformations, which include translation, rotation, and scaling, also known as affine transformations. These transformations allow for the repositioning and resizing of 2D objects, and can be represented using matrix operations. Additionally, the lesson covers composite transformations, reflections, and shear transformations that further manipulate the shape and position of objects in a 2D space.

Uploaded by

Ann Wangari
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)
14 views11 pages

TOPIC 5 2D GEOMETRIC TRANSFORMATIONS

Lesson 8 discusses 2D geometric transformations, which include translation, rotation, and scaling, also known as affine transformations. These transformations allow for the repositioning and resizing of 2D objects, and can be represented using matrix operations. Additionally, the lesson covers composite transformations, reflections, and shear transformations that further manipulate the shape and position of objects in a 2D space.

Uploaded by

Ann Wangari
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
You are on page 1/ 11

Lesson 8

2D geometric transformation.
With the availability of procedures for displaying output primitives and
their attributes, it makes possible to display a variety of pictures and
graphs. At times there is a need to alter or manipulate the displays for
some applications. The changes effected by this manipulation can be
categorized as geometric transformation.
There are 3 basic geometric transformations that can be used to
reposition or resize 2D objects:
1. Translation
2. Rotation
3. Scaling.
2D geometric transformations are also known as affine transformations.
Because they transform parallel lines to parallel lines and finite points to
finite points. And thus can be expressed as a linear function of
coordinates x and y.
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
Example

where T is the translation factor.


The above points can be represented as below

White the Cartesian coordinate values of point P(x,y) can be represented


as

3X3 matrix translation can be found through the following


(x,y)(x,y,1)
Where , a 1 is introduced as one of the coordinates of point P. therefore
the matrix representation will look as follows

Scaling
A scaling transformation alters the size of an object. This operation can
be carried out for polygons by multiplying the values of point p(x, y) of
each vertex by scaling factor S. :
Example

The coordinate values can be produced, by multiplying the (x,y) values


by each scale factor sx and sy.

The equation above can be written in matrix form as thus

Scaling about a fixed point (xf,yf)


3X3 matrix representation
(x,y)(x,y,1)

Rotation
A two-dimensional rotation is applied to an object by repositioning it
along a circular path in the xy plane.
To generate a rotation, we specify a rotation angle THETA and the
position (x, y, l) of the rotation point (or pivot point) about which the
object is to be rotated.
Positive values for the rotation angle define counterclockwise rotations
about the pivot point, and negative values rotate objects in the clockwise
direction.
This transformation can also be described as a rotation about a rotation
axis that is perpendicular to the xy plane and passes through the pivot
point.
We first determine the transformation equations for rotation of a point
position P when the pivot point is at the coordinate origin.
The angular and coordinate relationships of the original and transformed
point positions are shown in Fig. 5-4.
r is the constant distance of the point from the origin, angle 4 is the
original angular position of the point from the horizontal, and t3 is the
rotation angle. Using standard trigonometric identities, we can express
the transformed coordinates in terms of angles PHI and THETA

We can therefore form coordinates in terms of Theta and Phi as

But the original coordinates of the point in polar coordinates are

Therefore using this coordinates in the above we will have


Rotation also can be done in theta about a pivot(rotation) point (xr,yr)

Where

3X3 matrix rotation

Example

Composite transformation
Composite transformations are formed as multiplications of any
combination of translation, rotation, and scaling matrices.
Combinations
- Translation and rotation can be combined for animation
applications,
- while rotation and scaling can be combined to scale
objects in any specified direction
-
Other transformations
- Reflections
- Shears.
Reflections
Reflections are transformations that rotate an object 180" about a
reflection axis. This produces a mirror image of the object with respect
to that axis. When the reflection axis is perpendicular to the xy plane, the
reflection is obtained as a rotation n the xy plane.
When the reflection axis is in the xy plane, the reflection is obtained as a
rotation in a plane that is perpendicular to the xy plane.
A reflection is a transformation that produces a mimr image of an obpct.
The mirror image for a two-dimensional reflection is generated relative
to an axis of reflection by rotating the object 180" about the reflection
axis. We can choose an axis of reflection in the xy plane or
perpendicular to the xy plane. When the reflection axis is a line in the xy
plane, the rotation path about this axis is in a plane perpendicular to the
xy plane. For reflection axes that are perpendicular to the xy plane, the
rotation path is in the xy plane. Following are examples of some
common reflections.
Reflection about the line y = 0, the x axis, is accomplished with the
transformation matrix
Reflection about x-axis

Reflection about y-axis


Other reflections
Y=X

Y=-X
Shear transformation
Shear transformations distort the shape of an object by shifting x or y
coordinate values by an amount to the coordinate distance from a shear
reference line.
A transformation that distorts the shape of an object such that the
transformed shape appears as if the object were composed of internal
layers that had been caused to slide over each other is called a shear.
Two common shearing transformations are those that shift coordinate x
values and those that shift y values.
An x-direction shear relative to the x axis is produced with the
transformation

An example of an object which has been transformed using shear


Matrix which transforms coordinate positions as

You might also like