0
1.1kviews
Three Dimensional Transformations
1 Answer
0
21views

The geometric transformations play a vital role in generating images of three Dimensional objects with the help of these transformations. The location of objects relative to others can be easily expressed. Sometimes viewpoint changes rapidly, or sometimes objects move in relation to each other. For this number of transformation can be carried out repeatedly.

Translation

It is the movement of an object from one position to another position. Translation is done using translation vectors. There are three vectors in 3D instead of two. These vectors are in x, y, and z directions. Translation in the x-direction is represented using $T_x$. The translation is y-direction is represented using $T_y$. The translation in the z direction is represented using $T_z$.

If $\mathrm{P}$ is a point having co-ordinates in three directions $(\mathrm{x}, \mathrm{y}, \mathrm{z})$ is translated, then after translation its coordinates will be $\left(\mathrm{x}^{1} \mathrm{y}^{1} \mathrm{z}^{1}\right)$ after translation. $\mathrm{T}_{\mathrm{x}} \mathrm{T}_{\mathrm{y}} \mathrm{T}_{\mathrm{z}}$ are translation vectors in $\mathrm{x}, \mathrm{y},$ and $\mathrm{z}$ directions respectively.

$x^{1}=x+T_{x}$

$y^{1}=y+T_{y}$

$z^{1}=z+T_{z}$

Three-dimensional transformations are performed by transforming each vertex of the object. If an object has five corners, then the translation will be accomplished by translating all five points to new locations. Figure shows the translation of the cube.

enter image description here

Matrix for translation

$\left\{\begin{array}{cccc}{1} & {0} & {0} & {0} \\ {0} & {1} & {0} & {0} \\ {0} & {0} & {1} & {0} \\ {\mathrm{T}_{\mathrm{x}}} & {\mathrm{T}_{\mathrm{y}}} & {\mathrm{T}_{\mathrm{z}}} & {1}\end{array}\right\}$

Scaling

Scaling is used to change the size of an object. The size can be increased or decreased. The scaling three factors are required $S_{x} S_{y}$ and $S_{z}$ .

$S_{x}=$ Scaling factor in x - direction

$S_{y}=$ Scaling factor in y -direction

$S_{z}=$ Scaling factor in z-direction

Matrix for Scaling

$\left\{\begin{array}{llll}{S_{x}} & {0} & {0} & {0} \\ {0} & {s_{y}} & {0} & {0} \\ {0} & {0} & {s_{z}} & {0} \\ {0} & {0} & {0} & {1}\end{array}\right\}$

3D rotation transformation

Rotation: It is an important geometric transformation. The final position and orientation of a geometric entity is decided by the angle of rotation ($\theta$) and the base point about which the rotation is to be done. Since we know that, during rotation about z-axis, the z-coordinate of object remains constant. Also during rotation about x-axis and y-axis of object, the x-coordinate and y-coordinate respectively remains constant as x,y,z are mutually perpendicular to each other.It is the property of vector. Hence for rotation about Z-axis, we can draw the following figure.

enter image description here

To develop the transformation matrix, consider Point P located in XY plane, being rotated in the counter clock wise direction to the new position P’ by an angle θ as shown in above figure.

The position P’ is given by,

$\mathbf{P}^{\prime}=\left[\mathbf{X}^{\prime}, \mathbf{Y}^{\prime}, \mathbf{Z}^{\prime}\right]$

From the figure,

$x=r \cos \dot{\alpha}, y=r \sin \dot{\alpha}, z=z$

The new Position $\mathrm{P'}$ is specified by

$\mathrm{x}^{\prime}=\mathrm{r} \cos (\dot{\alpha}+\theta)$

$\quad =\mathrm{r}[\cos \dot{\alpha} \cos \theta-\sin \dot{\alpha} \sin \theta]$

$\quad =(\mathrm{r} \cos \dot{\alpha}) \cos \theta-(\mathrm{r} \sin \dot{\alpha}) \sin \theta$

$\begin{aligned} y^{\prime} &=\mathrm{r} \sin (\dot{\alpha}+\theta) \\ &=\mathrm{r}[\sin \dot{\alpha} \cos \theta+\cos \dot{\alpha} \sin \theta] \\ &=(\mathrm{r} \sin \dot{\alpha}) \cos \theta+(\mathrm{r} \cos \dot{\alpha}) \sin \theta \end{aligned}$

$y^{\prime}=y \cos \theta+x \sin \theta$

and $z=z$ remains same.

This can be written in matrix form as:

$\left[\mathrm{P}^{\prime}\right]=\left[\mathrm{X}^{\prime}, \mathrm{Y}^{\prime}, \mathrm{Z}^{\prime}\right]=[\mathrm{X}, \mathrm{Y}, \mathrm{Z}]\left[\begin{array}{ccc}{\cos \theta} & {\sin \theta} & {0} \\ {-\sin \theta} & {\cos \theta} & {0} \\ {0} & {0} & {1}\end{array}\right]$

The above matrix can also be written in Homogeneous form as:

$\left[\mathrm{R}_{Z}\right]=\left[\begin{array}{cccc}{\cos \theta} & {\sin \cdot \theta} & {0} & {0} \\ {-\sin \cdot \theta} & {\cos \theta} & {0} & {0} \\ {0} & {0} & {1} & {0} \\ {0} & {0} & {0} & {1}\end{array}\right]$

Similarly we can find rotation matrix in 3D about y- axis as well as about x-axis.

The rotational matrix are as follows,

1. Rotation about x-axis

$[\mathrm{Rx}]=\left[\begin{array}{cccc}{1} & {0} & {0} & {0} \\ {0} & {\cos \theta} & {\sin \cdot \theta} & {0} \\ {0} & {-\sin \cdot \theta} & {\cos \theta} & {0} \\ {0} & {0} & {0} & {1}\end{array}\right]$

2. Rotation about y-axis

$[\mathrm{Ry}]=\left[\begin{array}{cccc}{cos \theta} & {0} & {-sin \theta} & {0} \\ {0} & {1} & {0} & {0} \\ {sin \theta} & {0} & {\cos \theta} & {0} \\ {0} & {0} & {0} & {1}\end{array}\right]$

Please log in to add an answer.