15816 transformations

Upload: tarunpreet-singh-batra

Post on 05-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 15816 Transformations

    1/21

    TRANSFORMATIONS

  • 8/2/2019 15816 Transformations

    2/21

    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.

  • 8/2/2019 15816 Transformations

    3/21

    TWO DIMENSIONAL TRANSFORMATIONS

  • 8/2/2019 15816 Transformations

    4/21

    Transformation of straight line

  • 8/2/2019 15816 Transformations

    5/21

  • 8/2/2019 15816 Transformations

    6/21

    ROTATION

  • 8/2/2019 15816 Transformations

    7/21

  • 8/2/2019 15816 Transformations

    8/21

  • 8/2/2019 15816 Transformations

    9/21

    Continued

  • 8/2/2019 15816 Transformations

    10/21

    SCALING

  • 8/2/2019 15816 Transformations

    11/21

    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.

  • 8/2/2019 15816 Transformations

    12/21

    THREE DIMENSIONAL SCALING

    The diagonal terms of the general 4x4 transformation produces local and

    overall scaling.

    Consider

    [X] [T] = [x y z 1]

    = [ax ey jz 1] = [x* y* z* 1]

    which shows the local scaling effect.

    1000

    000

    000

    000

    j

    e

    a

  • 8/2/2019 15816 Transformations

    13/21

  • 8/2/2019 15816 Transformations

    14/21

  • 8/2/2019 15816 Transformations

    15/21

    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 x-

    axis. 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] =

    1000

    0cossin0

    0sincos0

    0001

  • 8/2/2019 15816 Transformations

    16/21

    1000

    0cos0sin

    0010

    0sin0cos

    1000

    0100

    00cossin

    00sincos

  • 8/2/2019 15816 Transformations

    17/21

  • 8/2/2019 15816 Transformations

    18/21

    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

    [T] =

    1000

    0100

    0010

    0001

  • 8/2/2019 15816 Transformations

    19/21

    [X] =

    [X*]= [X] [T]

    =

    1211

    1212

    1202

    1201

    1111

    1112

    1102

    1101

    1211

    1212

    1202

    1201

    1111

    1112

    1102

    1101

    1000

    0100

    0010

    0001

  • 8/2/2019 15816 Transformations

    20/21

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

    [X*] =

    1211

    1212

    1202

    1201

    1111

    1112

    1102

    1101

  • 8/2/2019 15816 Transformations

    21/21

    THREE DIMENSIONAL TRANSLATION

    [T] =

    The translated homogeneous coordinates are obtained by writing

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

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

    1

    0100

    0010

    0001

    nml

    1

    0100

    0010

    0001

    nml