Reflection in Computer Graphics
A reflection is a transformation that produces a mirror image of an object. In 2D reflection, we consider any line in a 2D plane as the mirror, the original object and the reflected object are both in the same plane of the mirror line.
Basic Principle of Reflection:
Reflection about X-Axis:
The transformation matrix for reflection about X axis or y=0 axis is :
Reflection about Y-Axis:
A reflection about Y-axis flips x coordinates while y coordinates remain the same. For the reflection of P(x,y) to P'(x’,y’)
This transformation is identified by the reflection
Reflection about the straight Line y=x
To find the relation between a point’s coordinates (x,y) and those of its image (x’,y’) reflected through y=x straight line.
Reflection about the straight Line y=-x
This time, we can’t simply state x’=y and y’=x because that is only the equations of magnitude.