Notice

Notice Board

MECHANICAL ENGINEERING DEPARTMENT WISHES YOU ALL A VERY HAPPY INDEPENDENCE DAY

Thursday, March 17, 2016

CAD/CAM NOTES(3D TRANSFORMATION) by Asst. Prof. CP SAINI

TRANSLATION

In three-dimensional homogeneous coordinate representation, when a point P is translated to P' with coordinated (x,y,z) and(x',y',z') can be represented in matrix form as:

Where,


ROTATION


Unlike 2D, rotation in 3D is carried out around any line. The most simple rotations could be around coordinate axis. As in 2D positive rotations produce counter-clockwise rotations.
Rotation in term of general equation is expressed as
Where,
R = Rotation Matrix
Rotation matrix when an object is rotated about X axis can be expressed as:

Rotation matrix when an object is rotated about Y axis can be expressed as:
Rotation matrix when an object is rotated about Z axis can be expressed as:
SCALING

Scaling an object in three-dimensional is similar to scaling an object in two-dimensional. Similar to 2D scaling an object tends to change its size and repositions the object relative to the coordinate origin. If the transformation parameter are unequal it leads to deformation of the object by changing its dimensions. The perform uniform scaling the scaling factors should be kept equal
i.e.
Where,
NOTE: A special case of scaling can be represented as reflection.
if the value of SxSy or Sz be replaced by -1 it will return the reflection of the object against the standard plane whose normal would be either x axis, y axis or z axis respectively.
REFLECTION

In 3D-reflection the reflection takes place about a plane whereas 2D reflection it used take place about an axis. The matrix in case of pure reflections, along basic planes, viz. X-Y plane, Y-Z plane and Z-X plane are given below:

Transformation matrix for a reflection through X-Y plane is:

 
Transformation matrix for a reflection through Y-Z plane is:

Transformation matrix for a reflection through Z-X plane is:
GENERAL 3-D ROTATION

Rotation in three dimension is more complex than the rotation in two dimensions. Three dimensional rotations require the prescription of an angle of rotation and an axis of rotation. The canonical rotations are defined when one of the positive x,y,zcoordinate axis is chosen as the axis of rotation. then the construction of rotation transformation proceeds just like that of a rotation in two dimensions about the origin.

Steps to be performed
  1. Translate origin to A1
  2. Align vector with axis (say, z
    1. Rotate to bring vector in yz plane 
    2. Rotate to bring vector along z-axis 
  3. Rotate line P1Pabout z-axis which is already aligned with the Rotation axis.
  4. Reverse steps 2
  5. Reverse step 1

GENERAL 3-D REFLECTION

Some orientations of a three dimensional object cannot be obtained using pure rotations; they require reflections. In three dimensions, reflection occur through a plane. By analogy with the previous discussion of of two dimensional reflection three dimensional reflection through a plane is equivalent to rotation about an axis in three dimensional space out in to four dimensional space and back into three dimensional space. For pure reflection the determinant of the reflection matrix is identically -1
Steps to be performed
  1. Translate origin to A1
  2. Align vector with axis (say, z
    1. Rotate to bring vector in yz plane
    2. Rotate to bring vector along z-axis 
  3. Reflect the line P1P through the standard y-z plane.
  4. Reverse steps 2
  5. Reverse step 1

ORTHOGRAPHIC PROJECTION

The simplest of the Parallel projections is the orthographic projection, commonly used for engineering drawings. They accurately show the correct or true size and shape of single plane face of an object. orthographic projections are projections onto one of the coordinate planes x=0, y=0, z=0.The matrix for projection onto the z plane is
Notice that the third column (the z column) is all zeros. Consequently, the effect of the transformation is to set the zcoordinate of a position vector to zero.
Similarly, the matrices for projection on to x=0 and y=0 planes are
and