0% found this document useful (0 votes)
12 views100 pages

Transformation Part 2

The document discusses various transformations in computer graphics, including basic transformations like translation, rotation, and scaling, as well as additional transformations such as reflection and shear. It explains how reflections create mirror images and how shearing distorts shapes by shifting coordinates. Additionally, it covers the transformation of object descriptions between different coordinate systems, including the conversion from non-Cartesian to Cartesian coordinates.

Uploaded by

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

Transformation Part 2

The document discusses various transformations in computer graphics, including basic transformations like translation, rotation, and scaling, as well as additional transformations such as reflection and shear. It explains how reflections create mirror images and how shearing distorts shapes by shifting coordinates. Additionally, it covers the transformation of object descriptions between different coordinate systems, including the conversion from non-Cartesian to Cartesian coordinates.

Uploaded by

reeknaskar33
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 100

COMPUTER GRAPHICS

SIDDHARTHA BANERJEE

RAMAKRISHNA MISSION RESIDENTIAL


COLLEGE (AUTONOMOUS), NARENDRAPUR
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS

Basic transformations such as translation, rotation, and


scaling are included in most graphics packages.

Some packages provide a few additional transformations that


are useful in certain applications.

Two such transformations are reflection and shear.


TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

A reflection is a transformation that produces a mirror


image of an object.

The mirror image for a two-dimensional reflection is


generated relative to an axis of reflection by rotating the
object 180o about the reflection axis.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

Reflection about the line y = 0, the


x axis, is accomplished with the
transformation matrix
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

A reflection about the y axis flips x


coordinates while keeping y
coordinates the same. The matrix for
this transformation is
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

We flip both the x and y


coordinates of a point by reflecting
relative to an axis that is
perpendicular to the xy plane and
that passes through the coordinate
origin.

This transformation, referred to as


a reflection relative to the coordinate
origin, has the matrix
representation:
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

If we chose the reflection axis as the


diagonal line y = x, we can derive this
matrix by concatenating a sequence of
rotation and coordinate- axis
reflection matrices.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

1. First perform a clockwise rotation through a 45O angle,


which rotates the line y= x onto the x axis.
2. Next, we perform a reflection with respect to the x axis.
3. The final step is to rotate the line y = x back to its original
position with a counter clockwise rotation through 45O.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

1. First perform a clockwise rotation through a 45O angle,


which rotates the line y= x onto the x axis.
2. Next, we perform a reflection with respect to the x axis.
3. The final step is to rotate the line y = x back to its original
position with a counter clockwise rotation through 45O.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

1. First perform a clockwise rotation through a 45O angle,


which rotates the line y= x onto the x axis.
2. Next, we perform a reflection with respect to the x axis.
3. The final step is to rotate the line y = x back to its original
position with a counter clockwise rotation through 45O.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

To obtain a transformation matrix for


reflection about the diagonal y = -x,
we could concatenate matrices for
the transformation sequence:

(1) clockwise rotation by 45o,


(2) reflection about the y axis, and
(3) counter-clockwise rotation by
45o.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

The resulting transformation matrix


is
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.1 Reflection

Reflections about any line y = mx +c in the xy plane can be


accomplished with a combination of translate-rotate-reflect
transformations.

1. In general, we first translate the Line so that it passes


through the origin.
2. Then we can rotate the line onto one of the coordinate
axes and reflect about that axis.
3. Finally, we restore the line to its original position with the
inverse rotation and translation transformations.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

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.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

An x-direction shear relative to the x axis is produced with

Any real number can be assigned to the shear parameter shx.


A coordinate position (x, y) is then shifted horizontally by an
amount proportional to its distance (y value) from the x axis
(y = 0).
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

Setting shx to 2, changes the square in Figure into a


parallelogram. Negative values for shx, shift coordinate
positions to the left.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

Setting shx to 2, changes the square in Figure into a


parallelogram. Negative values for shx, shift coordinate
positions to the left.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

Setting shx to 2, changes the square in Figure into a


parallelogram. Negative values for shx, shift coordinate
positions to the left.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

Setting shx to 2, changes the square in Figure into a


parallelogram. Negative values for shx, shift coordinate
positions to the left.
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

We can generate x-direction shears relative to other reference


lines with
TRANSFORMATIONS
3. OTHER TRANSFORMATIONS
3.2 SHEAR

Figure illustrates the conversion with shear parameter value of


1/2 relative to the line yref = -1.
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
4. EXAMPLES
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

Graphics applications often require the transformation of


object descriptions from one coordinate system to another.

Sometimes objects are described in non-Cartesian reference


frames like polar coordinates.

Coordinate descriptions in these systems must then be


converted to Cartesian device coordinates for display.

 In other cases, we need to transform between two


Cartesian systems.
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

For modeling and design applications, individual objects


may be defined in their own local Cartesian references, and
the local coordinates must then be transformed to position the
objects within the overall scene coordinate system.

A facility management program for office layouts, for


instance, has individual coordinate reference descriptions
for chairs and tables and other furniture that can be placed into
a floor plan, with multiple copies of the chairs and other items
in different positions.
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

In other applications, we may simply want to reorient the


coordinate reference for displaying a scene.

Here, we consider transformations between two Cartesian


frames of reference.
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

In other applications, we may simply want to reorient the


coordinate reference for displaying a scene.

Here, we consider transformations between two Cartesian


frames of reference.
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

Figure shows two Cartesian


systems, with the coordinate
origins at (0, 0) and (xo, yo) and
with an orientation angle Ɵ
between the x and x' axes.

To transform object descriptions


from xy coordinates to x'y'
coordinates, we need to set up a
transformation that superimposes
the x'y' axes onto the xy axes.
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

Figure shows two Cartesian


systems, with the coordinate
origins at (0, 0) and (xo, yo) and
with an orientation angle Ɵ
between the x and x' axes.

To transform object descriptions


from xy coordinates to x'y'
coordinates, we need to set up a
transformation that superimposes
the x'y' axes onto the xy axes.
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

This is done in two steps:

1. Translate so that the origin


(xo, yo) of the x'y' system is
moved to the origin of the xy
system.
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

This is done in two steps:

1. Translate so that the origin


(xo, yo) of the x'y' system is
moved to the origin of the xy
system.
Translation of the coordinate
origin is expressed with the
matrix operation
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

This is done in two steps:

2. Rotate the x' axis onto the x


axis.

To get the axes of the two systems


into coincidence, we then perform
the clockwise rotation
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

This is done in two steps:

2. Rotate the x' axis onto the x


axis.

To get the axes of the two systems


into coincidence, we then perform
the clockwise rotation
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

Concatenating these two


transformations matrices gives us
the complete composite matrix for
transforming object descriptions
from the xy system to the x'y'
system:
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS

Concatenating these two


transformations matrices gives us
the complete composite matrix for
transforming object descriptions
from the xy system to the x'y'
system:
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS
5.1 AN EXAMPLE
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS
5.1 AN EXAMPLE
TRANSFORMATIONS
5. TRANSFORMATIONS OF COORDINATE SYSTEMS
5.1 AN EXAMPLE
THANK YOU

You might also like