0% found this document useful (0 votes)
343 views16 pages

Computer Graphics Transformations

Rajeev Kumar Jha presented on various raster transformation methods in computer graphics. The key transformations discussed included: 1. Translation - shifting an object from one location to another by a given distance. 2. Rotation - rotating an object around a point by a given angle. 3. Scaling - changing the size of an object by enlarging or shrinking it along the x and y axes. 4. Reflection - creating a mirror image of an object across an axis. 5. Shearing - slanting an object by changing the coordinates of points along an axis.

Uploaded by

Rajeev Jha
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)
343 views16 pages

Computer Graphics Transformations

Rajeev Kumar Jha presented on various raster transformation methods in computer graphics. The key transformations discussed included: 1. Translation - shifting an object from one location to another by a given distance. 2. Rotation - rotating an object around a point by a given angle. 3. Scaling - changing the size of an object by enlarging or shrinking it along the x and y axes. 4. Reflection - creating a mirror image of an object across an axis. 5. Shearing - slanting an object by changing the coordinates of points along an axis.

Uploaded by

Rajeev Jha
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/ 16

PRESENTATION

ON
RASTER METHODS OFBY
PRESENTED TRANSFORMATION
RAJEEV KUMAR JHA

SUBMITTED TO: DR. KULDEEP KASWAN


TRANSFORMATION

• What is Transformation?
• Transformation refers to the mathematical operations or rules that are applied
on a graphical image consisting of the number of lines, circles, and ellipses to
change its size, shape, or orientation. It can also reposition the image on the
screen.
• Transformations play a very crucial role in computer graphics.
TYPES OF TRANSFORMATION

• There are various types of transformations in computer graphics through which an


image can be processed, edited ad altered. Some basic and most commonly used
types of these transformations are:
1. Translation
2. Rotation
3. Scaling
4. Reflection
5. Shearing
TRANSLATION

• Translation refers to a technique in which a point is shift from one place to


another, whose distance is known.
• Consider a point A(x1, y1) be shifted to another point B (x2, y2). Now we only know
the shifting distance tx along x-axis and ty along y-axis.

• Now, the new coordinates (x2, y2) can be calculated as:

• x2 = x1 + tx

• y2 = y1 + ty
FOR EXAMPLE

• Suppose we want to shift a point with coordinates at A(30,100) and distance along x-axis is 10 units and 20
units along y-axis.
• Using translation:

• Here tx = 10 ;

• and ty = 20

• New coordinates A’ (x2, y2):

• x2 = 30 + 10 = 130

• y2 = 100 + 20 = 120

• The point will be shifted to A ’ (130, 120 ).


TRANSLATION OF AN OBJECT
ROTATION

• Rotation refers to mathematical operation in which the graphical object is rotated about an
angle (θ) to the axis.
• Rotation is of two types: anti-clockwise and clockwise rotation.

• Suppose we want to rotate a point with coordinates A (x 1, y1) clockwise through an angle θ
about the origin
• Then the new coordinates A’ (x2, y2):

• x2 = x1 cosθ + y1 sinθ

• y2 = x1 sinθ - y1 cosθ


In rotation, we rotate the object at particular angle θ thetatheta from its origin. From the following figure, we can see that
the point PX,YX,Y is located at angle φ from the horizontal X coordinate with distance r from the origin.
Let us suppose you want to rotate it at the angle θ. After rotating it to a new location, you will get a new point P’ X′,Y′X′,Y′.
CONTINUED….

Using standard trigonometric the original coordinate of point PX,YX,Y can be represented


as −
X=rcosϕ......(1)X=rcosϕ......(1)
Y=rsinϕ......(2)Y=rsinϕ......(2)
Representing the above equation in matrix form,
P’ = P . R
Where R is the rotation matrix
R=[cosθ −sinθ
sinθ cosθ]
The rotation angle can be positive and negative.
SCALING

• Scaling refers to a mathematical rule applied to change the size of the image.
• If the value of scaling factors is negative, the size is decreased and when the value is
positive, the size of the image is increased.
• Suppose the point with coordinates A (x1, y1) is to be scaled by a factor sx along the x-axis
and sy along the y-axis.

• Hence the new coordinates after scaling will be:

• x2 = x1 x sx

• y2 = y1 x sy
If we provide values less than 1 to the scaling factor s, then we can reduce the size of the object. if we
provide values greater than 1, then we can increase the size of the object.
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.
FIGURE.
SHEARING

• Shearing is a transformation in which the shape of the object is slanted about the axis.
• In y-shearing:
• The new-coordinates will be:
• x' = x

• y' = y + sy x

• In x-shearing:
• The new-coordinates will be:

• x' = x + sx y

• y' = y
X SHEAR

• 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.
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.

You might also like