Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

TRANSFORMATIONS

INTRODUCTION
Geometric transformations play a central role in geometric modeling and viewing. They are used in modeling to express the locations of entities relative to others and to move them around in the modeling space. They are used in viewing to generate different views of a model for visualizations and drafting purposes. Typical CAD operations to translate, rotate, zoom and mirror entities are all based on Geometric transformations.

TWO DIMENSIONAL TRANSFORMATIONS

Transformation of straight line

ROTATION

Continued

SCALING

THREE DIMENSIONAL TRANSFORMATIONS


A point in three dimensional space [x y z] is represented by a four dimensional position vector [x y z h] = [x y z 1] [T] The transformation from homogeneous coordinates to ordinary coordinates is given by [x* y* z* 1] = [x/h y/h z/h 1] The homogeneous transformation matrix (4x4) is the combination of 3x3 sub matrix in the form of rotation, scaling, shearing and reflection. The 1x3 lower left submatrix produces translation, and 3x1 submatrix produces a perspective transformation. The final lower right hand 1x1 submatrix produces overall scaling.

THREE DIMENSIONAL SCALING


The diagonal terms of the general 4x4 transformation produces local and overall scaling. a 0 0 0 Consider [X] [T] = [x y z 1] 0 e 0 0 0 0 j 0 0 0 0 1 = [ax ey jz 1] = [x* y* z* 1] which shows the local scaling effect.

THREE DIMENSIONAL ROTATION


For rotation about the x-axis, the x coordinates of the position vector do not change. In effect, the rotation occurs in plane perpendicular to the xaxis. Similarly, rotation about the y-axis and z- axis occurs in plane perpendicular to the y and z axis, respectively. For rotation about the x-axis, the x coordinates of the transformed position vector does not change.

[T] =

1 0 0 0

0 cos sin 0

0 sin cos 0

0 0 0 1

cos sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

cos 0 sin 0

0 0 sin 1 0 0 0 0 cos 0 0 1

THREE DIMENSIONAL REFLECTION


Some orientations of a three dimensional object cannot be obtained using pure rotation, they require reflection. In three dimension, reflection occur through plane. For a pure reflection, the determinant of the reflection matrix is identically -1. Transformation matrix for a reflection through the xy plane is
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

[T] =

[X] =

1 2 2 1 1 2 2 1

0 0 1 1 0 0 1 1

1 1 1 1 2 2 2 2

1 1 1 1 1 1 1 1

[X*]= [X] [T]


1 2 2 1 1 2 2 1

0 0 1 1 0 0 1 1

1 1 1 1 2 2 2 2

1 1 1 1 1 1 1 1

1 0 0 0

0 1 0 0

0 0 1 0

0 1

0 0

The block A*B*C*B*E*F*G*H* shows new transformed position vectors

[X*] =

1 2 2 1 1 2 2 1

0 0 1 1 0 0 1 1

1 1 1 1 2 2 2 2

1 1 1 1 1 1 1 1

THREE DIMENSIONAL TRANSLATION


1 0 0 0 0 1 0 0 0 0 1 0 l m n 1 The translated homogeneous coordinates are obtained by writing

[T] =

1 [x y z h] = [x y z 1]

0 0 l

0 1 0 m

0 0 1 n

0 0 0 1
1]

[x y z h] = [(x+l) (y+m) (z+n)

You might also like