3 D Transformation

download 3 D Transformation

of 53

Transcript of 3 D Transformation

  • 8/13/2019 3 D Transformation

    1/53

    3-D Transformation

    Shubhangi Shinde

  • 8/13/2019 3 D Transformation

    2/53

    Projections

    Display device (a screen) is 2D How do we map 3D objects to 2D space?

    2D to 2D is straight forward 2D window to world.. and a viewport on the 2D surface.

    Clip what won't be shown in the 2D window, and map theremainder to the viewport.

    3D to 2D is more complicated Solution : Transform 3D objects on to a 2D plane usingprojections

  • 8/13/2019 3 D Transformation

    3/53

  • 8/13/2019 3 D Transformation

    4/53

  • 8/13/2019 3 D Transformation

    5/53

    Projections

    Projections: key terms

    Projectionfrom 3D to 2D is defined by straightprojection rays

    (projectors) emanating from the 'center of projection', passing

    through each point of the object, and intersecting the

    'projectionplane' to form a projection.

  • 8/13/2019 3 D Transformation

    6/53

    Types of projections

    2 types of projections

    perspectiveandparallel.

    Key factor is the center of projection.

    if distance to center of projection is finite : perspective

    if infinite : parallel

  • 8/13/2019 3 D Transformation

    7/53

  • 8/13/2019 3 D Transformation

    8/53

    Perspective v Parallel Perspective:

    visual effect is similar to human visual system...

    has 'perspective foreshortening'

    size of object varies inversely with distance from the center ofprojection.

    angles only remain intact for faces parallel to projection plane. Lines of projecton are not parallel. Instead, they all converge at

    a single point called the center of projection or projectionreference point.

    Parallel:

    less realistic view because of no foreshortening

    however, parallel lines remain parallel.

    angles only remain intact for faces parallel to projection plane.

    Z coordinate is discarded and parallel lines from each vertex on

    the object are extended until they intersect the view plane. The point of intersection is the projection of the vertex.

  • 8/13/2019 3 D Transformation

    9/53

  • 8/13/2019 3 D Transformation

    10/53

  • 8/13/2019 3 D Transformation

    11/53

    Perspective Projections

    Any parallel lines notparallel to the projection plane,

    converge at a vanishing point.

    There are an infinite number of these, 1 for each of the

    infinite amount of directions line can be oriented.

    If a set of lines are parallel to one of the three

    principle axes, the vanishing point is called an axis

    vanishing point.

    There are at most 3 such points, corresponding to the

    number of axes cut by the projection plane.

  • 8/13/2019 3 D Transformation

    12/53

    Perspective Projections

    Example:

    if z projection plane cuts the z axis: normal to it, so only zhas a principle vanishing point, as x and y are parallel andhave none.

    Can categorise perspective projections by thenumber of principle vanishing points, and thenumber of axes the projection plane cuts.

  • 8/13/2019 3 D Transformation

    13/53

    Perspective Projections

    2 different examples of a one-point perspective

    projection of a cube.

    (note: x and y parallel lines do not converge)

  • 8/13/2019 3 D Transformation

    14/53

    Perspective Projections

    Two-point perspective projection:

    This is often used in architectural, engineering and

    industrial design drawings.

    Three-point is used less frequently as it adds little

    extra realism to that offered by two-point

    perspective projection.

  • 8/13/2019 3 D Transformation

    15/53

    Perspective Projections

    Two-point perspective projection:

  • 8/13/2019 3 D Transformation

    16/53

    Orthographic Projection

    Orthographic projection shows complex objects by

    doing a 2D drawing of each side to show the main

    features.

    Orthographic drawings usually consist of a front view,a side view and a top view, but more views may be

    shown for complex objects with lots of detail.

    Projection plane is perpendicular to the principle

    axis.

    These projections are used in engineerring drawing

    to depict machine parts,assemblies building and so

    on.

  • 8/13/2019 3 D Transformation

    17/53

    Orthographic Projection

  • 8/13/2019 3 D Transformation

    18/53

    Orthographic Projection

  • 8/13/2019 3 D Transformation

    19/53

    Here are three orthographic views of an object.

  • 8/13/2019 3 D Transformation

    20/53

    Orthographic Projection

  • 8/13/2019 3 D Transformation

    21/53

    Axonometric Projection

    Orthographic projection can display more then oneface of an object called axmonometric projection

    Projection planes are not normal to a principle axis.

    the ability to show the inclined position of an object

    with respect to the plane of projection.

    Parallelism of lines are preserved but angles are not.

    Kinds: IsometricIso (one or equal) and Metrus (measures);

    equal measures.

    Dimetrican axonometric drawing into two angle.

    Trimetricutilizes three different angles.

  • 8/13/2019 3 D Transformation

    22/53

    Isometric Projection

    Align view plane so that it intersects each coordinateaxis in which the object is defined at the same distance

    from the origin.

    Obtained by aligning the projection vector with the

    cube diagnol.In isometric projection the angles between the

    projection of the axes are equal i.e. 120.

    It is important to appreciate that it is the angles

    between the projection of the axes that are being

    discussed and not the true angles between the axes

    themselves which is always 90.

  • 8/13/2019 3 D Transformation

    23/53

    Isometric Projection

  • 8/13/2019 3 D Transformation

    24/53

    Isometric Projection

  • 8/13/2019 3 D Transformation

    25/53

    Isometric Projection

  • 8/13/2019 3 D Transformation

    26/53

    Isometric Projection

  • 8/13/2019 3 D Transformation

    27/53

    Dimetric Projection

    The angles between the projection of the axes in

    dimetric projection renders two of the three to be

    equal.

    To draw the outline of an object in dimetricprojection, two scales are required.

    The scales are generated the same as for isometric.

    http://www.ul.ie/~rynnet/keanea/isometri.htmhttp://www.ul.ie/~rynnet/keanea/isometri.htm
  • 8/13/2019 3 D Transformation

    28/53

    Dimetric Projection

  • 8/13/2019 3 D Transformation

    29/53

    Dimetric Projection

  • 8/13/2019 3 D Transformation

    30/53

    Trimetric Projection

    In trimetric projection the projection of the three

    angles between the axes are unequal.

    Thus, three separate scales are needed to generate atrimetric projection of an object.

    The scales are constructed using the same method

    described in isometric and dimetric projection.

  • 8/13/2019 3 D Transformation

    31/53

    Trimetric Projection

  • 8/13/2019 3 D Transformation

    32/53

    Trimetric Projection

  • 8/13/2019 3 D Transformation

    33/53

    Parallel Projections

    2 principle types:

    orthographicand oblique.

    Orthographic : direction of projection = normal to the projection plane.

    Oblique :

    direction of projection != normal to the projection plane.

  • 8/13/2019 3 D Transformation

    34/53

    Parallel Projection

    Angel Figure 5.4

    Center of projection is at infinity

    Direction of projection (DOP) same for all points

    DOP

    View

    Plane

  • 8/13/2019 3 D Transformation

    35/53

    Parallel Projections

    Orthographic (or orthogonal) projections:

    front elevation, top-elevation and side-elevation.

    all have projection plane perpendicular to a principle axes.

    Useful because angle and distance measurements can bemade...

    However, As only one face of an object is shown, it can be

    hard to create a mental image of the object, even whenseveral view are available.

  • 8/13/2019 3 D Transformation

    36/53

    Parallel Projections

    Orthogonal projections:

  • 8/13/2019 3 D Transformation

    37/53

    Parallel Projections

    Oblique parallel projections

    Obtained by projecting points along parallel linesthat are not perpendicular to the projection plane.

    View plane and direction of projection are not same. Objects can be visualised better then with orthographic

    projections

    Can measure distances, but not angles*

    * Can only measure angles for faces of objects parallel to the plane

    2 common oblique parallel projections:

    Cavalierand Cabinet

  • 8/13/2019 3 D Transformation

    38/53

    Parallel Projections

    Cavalier: The direction of the projection makes a 45 degree angle with the

    projection plane.

    The projection of a line perpendicular to the view plane has thesame length as the line itself.

    Because there is no foreshortening, this causes an exaggeration ofthe z axes.

  • 8/13/2019 3 D Transformation

    39/53

    Parallel Projections

    Cabinet: The direction of the projection makes a 63.4 degree angle with the

    projection plane.

    Lined perpendicular to the viewing surface, are projected at one halftheir actual length.

    This results in foreshortening of the z axis, and provides a more

    realistic view.

  • 8/13/2019 3 D Transformation

    40/53

    Oblique Parallel Projections

    b= 45 Cavalier projection

    b= 63.4 Cabinet projection

    b= 90 Orthogonal projection

  • 8/13/2019 3 D Transformation

    41/53

    Oblique Parallel Projections

    x

    y

    la

    (xs,ys)(0,0,1)

    P

    Consider the point P:

    P can be represented in 3D

    space - (0,0,1)

    P can be represented in 2D

    (screen coords) - (xs,ys)

  • 8/13/2019 3 D Transformation

    42/53

    Oblique Parallel Projections

    At (0,0,1)

    xs= lcos a

    ys= lsin a Generally

    multiply by z and allow for (non-zero) x and y

    xs= x + z.l.cos ays= y + z.l.sin a

  • 8/13/2019 3 D Transformation

    43/53

    Oblique Parallel Projections

    1

    .

    1000

    0000

    0sin100cos01

    1

    0 z

    y

    x

    y

    x

    s

    s

    alal

  • 8/13/2019 3 D Transformation

    44/53

  • 8/13/2019 3 D Transformation

    45/53

  • 8/13/2019 3 D Transformation

    46/53

  • 8/13/2019 3 D Transformation

    47/53

  • 8/13/2019 3 D Transformation

    48/53

  • 8/13/2019 3 D Transformation

    49/53

  • 8/13/2019 3 D Transformation

    50/53

  • 8/13/2019 3 D Transformation

    51/53

  • 8/13/2019 3 D Transformation

    52/53

  • 8/13/2019 3 D Transformation

    53/53