Computer Graphics β Reflection Transformation in 3D
Reflection in 3D space is quite similar to the reflection in 2D space, but a single difference is there in 3D, here we have to deal with three axes (x, y, z). Reflection is nothing but a mirror image of an object.
Three kinds of Reflections are possible in 3D space:
- Reflection along the X-Y plane.
- Reflection along Y-Z plane.
- Reflection along X-Z plane.
1. Reflection along the X-Y plane: This is shown in the following figure β
The Reflection transformation matrix is used to perform the reflection operation over the 3D image, which is as follows:
Consider, a point P[x, y, z] which is in 3D space is made to reflect along X-Y direction after reflection P[x, y, z] becomes P'[xβ ,yβ ,zβ].
2. Reflection along the Y-Z plane: This is shown in the following figure β
The reflection transformation matrix for y-z axes is as follows:
Consider, a point P[x, y, z] which is in 3D space is made to reflect along Y-Z direction, after reflection P[x, y, z] becomes P'[xβ ,yβ ,zβ].
3. Reflection along the X-Z plane: This is shown in the following figure β
The Reflection transformation matrix for z-x axes is as follows:
Consider, a point P[x, y, z] which is in 3D space is made to reflect along Z-X direction, after reflection P[x, y, z] becomes P'[xβ, yβ, zβ].
Consider a cube βOABCDEFGβ, which is given below, perform reflect transformation over it along X-Y plane.
The given cube is as follows:
So, Matrix representation condition of Reflection transformation along X-Y axis:
Point O[0 0 0] becomes Oβ after performing Reflection transformation:
Point A[0 4 0] becomes Aβ after performing Reflection transformation:
Point B[0 4 4] becomes Bβ after performing Reflection transformation:
Point C[-4 4 0] becomes Cβ after performing Reflection transformation:
Point D[4 4 4] becomes Dβ after performing Reflection transformation:
Point E[4 0 0] becomes Eβ after performing Reflection transformation:
Point F[0 0 4] becomes Fβ after performing Reflection transformation:
Point G[4 0 4] becomes Gβ after performing Reflection transformation:
After performing Reflection Transformation over the above figure (Fig.1) would look like: