Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
156 views8 pages

2D Reflection in Computer Graphics

The document explains 2D reflection in computer graphics, detailing how reflection is a 180-degree rotation that creates a mirrored image of an object. It provides equations for reflecting points across the X-axis and Y-axis, along with examples of reflecting a triangle's coordinates. The new coordinates after reflection are calculated and presented for both axes.
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)
156 views8 pages

2D Reflection in Computer Graphics

The document explains 2D reflection in computer graphics, detailing how reflection is a 180-degree rotation that creates a mirrored image of an object. It provides equations for reflecting points across the X-axis and Y-axis, along with examples of reflecting a triangle's coordinates. The new coordinates after reflection are calculated and presented for both axes.
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/ 8

2D Reflection in Computer Graphics-

 Reflection is a kind of rotation where the angle of rotation is 180 degree.


 The reflected object is always formed on the other side of mirror.
 The size of reflected object is same as the size of original object.

Consider a point object O has to be reflected in a 2D plane.

Let-
 Initial coordinates of the object O = (Xold, Yold)
 New coordinates of the reflected object O after reflection = (X new, Ynew)

Reflection On X-Axis:

This reflection is achieved by using the following reflection equations-


 Xnew = Xold
 Ynew = -Yold

In Matrix form, the above reflection equations may be represented as-


For homogeneous coordinates, the above reflection matrix may be represented as a
3 x 3 matrix as-

Reflection On Y-Axis:

This reflection is achieved by using the following reflection equations-


 Xnew = -Xold
 Ynew = Yold

In Matrix form, the above reflection equations may be represented as-


For homogeneous coordinates, the above reflection matrix may be represented as a
3 x 3 matrix as-
PRACTICE PROBLEMS BASED ON 2D REFLECTION IN COMPUTER
GRAPHICS-

Problem-01:

Given a triangle with coordinate points A(3, 4), B(6, 4), C(5, 6). Apply the
reflection on the X axis and obtain the new coordinates of the object.

Solution-

Given-
 Old corner coordinates of the triangle = A (3, 4), B(6, 4), C(5, 6)
 Reflection has to be taken on the X axis

For Coordinates A(3, 4)

Let the new coordinates of corner A after reflection = (X new, Ynew).

Applying the reflection equations, we have-


 Xnew = Xold = 3
 Ynew = -Yold = -4

Thus, New coordinates of corner A after reflection = (3, -4).

For Coordinates B(6, 4)

Let the new coordinates of corner B after reflection = (X new, Ynew).


Applying the reflection equations, we have-
 Xnew = Xold = 6
 Ynew = -Yold = -4

Thus, New coordinates of corner B after reflection = (6, -4).

For Coordinates C(5, 6)

Let the new coordinates of corner C after reflection = (X new, Ynew).

Applying the reflection equations, we have-


 Xnew = Xold = 5
 Ynew = -Yold = -6

Thus, New coordinates of corner C after reflection = (5, -6).

Thus, New coordinates of the triangle after reflection = A (3, -4), B(6, -4), C(5, -6).
Problem-02:

Given a triangle with coordinate points A(3, 4), B(6, 4), C(5, 6). Apply the
reflection on the Y axis and obtain the new coordinates of the object.

Solution-

Given-
 Old corner coordinates of the triangle = A (3, 4), B(6, 4), C(5, 6)
 Reflection has to be taken on the Y axis

For Coordinates A(3, 4)

Let the new coordinates of corner A after reflection = (X new, Ynew).

Applying the reflection equations, we have-


 Xnew = -Xold = -3
 Ynew = Yold = 4

Thus, New coordinates of corner A after reflection = (-3, 4).

For Coordinates B(6, 4)

Let the new coordinates of corner B after reflection = (X new, Ynew).

Applying the reflection equations, we have-


 Xnew = -Xold = -6
 Ynew = Yold = 4

Thus, New coordinates of corner B after reflection = (-6, 4).

For Coordinates C(5, 6)

Let the new coordinates of corner C after reflection = (X new, Ynew).

Applying the reflection equations, we have-


 Xnew = -Xold = -5
 Ynew = Yold = 6

Thus, New coordinates of corner C after reflection = (-5, 6).

Thus, New coordinates of the triangle after reflection = A (-3, 4), B(-6, 4), C(-5, 6).

To gain better understanding about 2D Reflection in Computer Graphics,

You might also like