Computer Graphics - Reflection Transformation in 3D
Last Updated :
22 Jun, 2022
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 -
Reflection along x-y plane
The Reflection transformation matrix is used to perform the reflection operation over the 3D image, which is as follows:
\hspace{4.5cm} \Large R_{xy} =\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]
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'].
\hspace{4.5cm} \Large P'[x\,\,y\,\,z\,\,1]=P[x\,\,y\,\,z\,\,1].R_{xy}
2. Reflection along the Y-Z plane: This is shown in the following figure -
Reflection along the Y-Z plane
The reflection transformation matrix for y-z axes is as follows:
\hspace{4.5cm} \Large R_{yz} =\left[\begin{matrix}-1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\0&0&0&1\end{matrix}\right]
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'].
\hspace{4.5cm} \Large P'[x\,\,y\,\,z\,\,1]=P[x\,\,y\,\,z\,\,1].R_{yz}
3. Reflection along the X-Z plane: This is shown in the following figure -
Reflection along the X-Z plane:
The Reflection transformation matrix for z-x axes is as follows:
\hspace{4.5cm} \Large R_{zx} =\left[\begin{matrix}1&0&0&0\\ 0&-1&0&0\\ 0&0&1&0\\0&0&0&1\end{matrix}\right]
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'].
\hspace{4.5cm} \Large P'[x\,\,y\,\,z\,\,1]=P[x\,\,y\,\,z\,\,1].R_{zx}
Consider a cube 'OABCDEFG', which is given below, perform reflect transformation over it along X-Y plane.
The given cube is as follows:
Fig.1
So, Matrix representation condition of Reflection transformation along X-Y axis:
\hspace{4.5cm} \Large R_{xy} =\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]
Point O[0 0 0] becomes O' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large O'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[0\hspace{0.2cm}0\hspace{0.2cm}0\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]} \\ \hspace{6.68cm}\Large \mathbf{=[0\hspace{0.2cm}0\hspace{0.2cm}0\hspace{0.2cm}1]}\\ \hspace{4.37cm}\mathbf{O'[x ,y ,z]=[0 ,0 ,0]}
Point A[0 4 0] becomes A' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large A'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[0\hspace{0.2cm}4\hspace{0.2cm}0\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]}\\ \hspace{6.68cm}\Large\mathbf{=[0\hspace{0.2cm}4\hspace{0.2cm}0\hspace{0.2cm}1]}\\ \hspace{4.37cm}\Large\mathbf{A'[x ,y ,z]=[0 ,4 ,0]}
Point B[0 4 4] becomes B' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large B'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[0\hspace{0.2cm}4\hspace{0.2cm}4\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]}\\ \hspace{6.68cm}\Large\mathbf{=[0\hspace{0.2cm}4\hspace{0.2cm}4\hspace{0.2cm}1]} \newline \hspace{4.37cm}\Large\mathbf{B'[x ,y ,z]=[0 ,4 ,4]}
Point C[-4 4 0] becomes C' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large C'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[4\hspace{0.2cm}4\hspace{0.2cm}0\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]}\\ \hspace{6.68cm} \Large \mathbf{=[-4\hspace{0.2cm}4\hspace{0.2cm}0\hspace{0.2cm}1]}\\ \newline \hspace{4.37cm}\Large\mathbf{C'[x ,y ,z]=[-4 ,4 ,0]}
Point D[4 4 4] becomes D' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large D'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[4\hspace{0.2cm}4\hspace{0.2cm}4\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]}\\ \hspace{6.68cm}\Large \mathbf{=[-4\hspace{0.2cm}4\hspace{0.2cm}4\hspace{0.2cm}1]}\\ \hspace{4.37cm}\Large\mathbf{D'[x ,y ,z]=[-4 ,4 ,4]}
Point E[4 0 0] becomes E' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large E'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[4\hspace{0.2cm}0\hspace{0.2cm}0\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]}\\ \hspace{6.68cm} \Large\mathbf{=[-4\hspace{0.2cm}0\hspace{0.2cm}0\hspace{0.2cm}1]}\\ \hspace{4.37cm}\mathbf{E'[x ,y ,z]=[-4 ,0 ,0]}
Point F[0 0 4] becomes F' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large F'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[0\hspace{0.2cm}0\hspace{0.2cm}4\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]}\\ \hspace{6.68cm}\Large \mathbf{=[0\hspace{0.2cm}0\hspace{0.2cm}4\hspace{0.2cm}1]}\\ \hspace{4.37cm}\mathbf{F'[x ,y ,z]=[0 ,0 ,4]}
Point G[4 0 4] becomes G' after performing Reflection transformation:
\hspace{4cm} \mathbf{\Large G'[x\hspace{0.2cm}y\hspace{0.2cm}z\hspace{0.2cm}1]=[4\hspace{0.2cm}0\hspace{0.2cm}4\hspace{0.2cm}\hspace{0.2cm}1]\left[\begin{matrix}1&0&0&0\\ 0&1&0&0\\ 0&0&-1&0\\0&0&0&1\end{matrix}\right]}\\ \hspace{6.68cm}\Large \mathbf{=[-4\hspace{0.2cm}0\hspace{0.2cm}4\hspace{0.2cm}1]}\\ \newline \hspace{4.37cm}\mathbf{G'[x ,y ,z]=[-4 ,0 ,4]}
After performing Reflection Transformation over the above figure (Fig.1) would look like:
Reflected 3D image
Similar Reads
Computer Graphics - 3D Rotation Transformations
Rotation in 3D is more nuanced as compared to the rotation transformation in 2D, as in 3D rotation we have to deal with 3-axes (x, y, z). Rotation about an arbitrary axis There are three kinds of arbitrary rotation, here we can rotate an object just parallel(or along) a specific axis so that the coo
4 min read
Computer Graphics - 3D Scaling Transformation
Prerequisite: Computer Graphics â 3D Translation Transformation Scaling Transformation : It is performed to resize the 3D-object that is the dimension of the object can be scaled(alter) in any of the x, y, z direction through Sx, Sy, Sz scaling factors. Matrix representation of Scaling transformatio
3 min read
Computer Graphics - 3D Shearing Transformation
Shearing transformation is the same as we see in 2D space, but here we have to deal with the x, y, and z axes whereas in 2D we deal with the only x and y axes. Shearing is the process of slanting an object in 3D space either in x, y, or in the z-direction. Shearing changes(or deformed) the shape of
4 min read
Computer Graphics - 3D Translation Transformation
3-D Transformation: In very general terms a 3D model is a mathematical representation of a physical entity that occupies space. In more practical terms, a 3D model is made of a description of its shape and a description of its color appearance.3-D Transformation is the process of manipulating the vi
3 min read
Translation of objects in computer graphics
In computer graphics, we have seen how to draw some basic figures like line and circles. In this post we will discuss on basics of an important operation in computer graphics as well as 2-D geometry, which is transformation. In computer graphics, transformation of the coordinates consists of three m
7 min read
2D Transformation in Computer Graphics | Set 1 (Scaling of Objects)
We can use a 2 Ã 2 matrix to change or transform, a 2D vector. This kind of operation, which takes in a 2-vector and produces another 2-vector by a simple matrix multiplication, is a linear transformation. By this simple formula, we can achieve a variety of useful transformations, depending on what
5 min read
Composite Transformation in 2-D graphics
Prerequisite - Basic types of 2-D Transformation :Â Â TranslationScalingRotationReflectionShearing of a 2-D objectComposite Transformation :Â As the name suggests itself Composition, here we combine two or more transformations into one single transformation that is equivalent to the transformations th
3 min read
Computer Graphics - 3D Composite Transformation
3-D Transformation is the process of manipulating the view of a three-D object with respect to its original position by modifying its physical attributes through various methods of transformation like Translation, Scaling, Rotation, Shear, etc. Types of Transformation: Translation TransformationScal
6 min read
Projections in Computer Graphics
Representing an n-dimensional object into an n-1 dimension is known as projection. It is process of converting a 3D object into 2D object, we represent a 3D object on a 2D plane {(x,y,z)->(x,y)}. It is also defined as mapping or transforming of the object in projection plane or view plane. When g
5 min read
Diffuse Reflection in Computer Graphics
Pre-requisites: Basic Illumination Models Diffuse reflection is a fundamental concept in computer graphics that has a wide range of applications. In this blog post, we will explore the basics of diffuse reflection and its implications for computer graphics. We will also provide some practical exampl
5 min read