# Three Dimensional Transformations

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 P is a point having co-ordinates in three directions (x, y, z) is translated, then after translation its coordinates will be (x^{1} y^{1} z^{1}) after translation. T_{x} T_{y} T_{z} are translation vectors in x, y, and 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. Following figure 1 shows the translation of point figure 2 shows the translation of the cube.

## Matrix for translation

## Matrix representation of point translation

Point shown in fig is (x, y, z). It become (x^{1},y^{1},z^{1}) after translation. T_{x} T_{y} T_{z} are translation vector.

**Example:** A point has coordinates in the x, y, z direction i.e., (5, 6, 7). The translation is done in the x-direction by 3 coordinate and y direction. Three coordinates and in the z- direction by two coordinates. Shift the object. Find coordinates of the new position.

**Solution:** Co-ordinate of the point are (5, 6, 7)

Â Â Â Â Â Â Â Â Â Translation vector in x direction = 3

Â Â Â Â Â Â Â Â Â Translation vector in y direction = 3

Â Â Â Â Â Â Â Â Â Translation vector in z direction = 2

Â Â Â Â Â Â Â Â Â Translation matrix is

Â Â Â Â Â Â Â Â Â

Multiply co-ordinates of point with translation matrix

Â Â Â Â Â Â Â Â Â = [5+0+0+30+6+0+30+0+7+20+0+0+1] = [8991]

x becomes x^{1}=8

y becomes y^{1}=9

z becomes z^{1}=9