Click here to load reader

3D transformation and viewing

  • Upload
    denver

  • View
    45

  • Download
    2

Embed Size (px)

DESCRIPTION

3D transformation and viewing. UNIT - 5. 3D Point. We will consider points as column vectors . Thus, a typical point with coordinates (x, y, z) is represented as:. (into screen). Representation of 3D Transformations. Z axis represents depth Right Handed System - PowerPoint PPT Presentation

Citation preview

3D transformation and viewing

UNIT - 53D transformation and viewing 3D PointWe will consider points as column vectors. Thus, a typical point with coordinates (x, y, z) is represented as:

23Representation of 3D TransformationsZ axis represents depthRight Handed SystemWhen looking down at the origin, positive rotation is CCW

Left Handed SystemWhen looking down, positive rotation is in CWMore natural interpretation for displays, big z means far

(into screen)3Translation Objects are usually defined relative to their own coordinate system. We can translate points in space to new positions by adding offsets to their coordinates, as shown in the following vector equation. P = T . P

x = x + tx y = y + ty z = z + tz

Translating a point with translation with vector T = (tx,ty,tz).

63D Translations. An object is translated in 3D dimensional by transforming each of the defining points of the objects.

Rotation Rotations in three-dimensions are considerably more complicated than two-dimensional rotations. In general, rotations are specified by a rotation axis and an angle. In two-dimensions there is only one choice of a rotation axis that leaves points in the plane.Rotation about x axis

Rotation about z axis

Rotation is in the following form :

123D Transformations: RotationOne rotation for each world coordinate axis

123D Scaling P is scaled to P' by S:

Called theScaling matrixS =

143D Scaling Scaling with respect to the coordinate origin

3D ScalingScaling with respect to a selected fixed position (xf, yf, zf)

Translate the fixed point to originScale the object relative to the coordinate originTranslate the fixed point back to its original position

3D Scaling

3D ReflectionsAbout an axis: equivalent to 180rotation about that axis17183D Reflections

193D ShearingModify object shapesUseful for perspective projections: E.g. draw a cube (3D) on a screen (2D)Alter the values for x and y by an amount proportional to the distance from zref

1920Shears