Presentation is loading. Please wait.

Presentation is loading. Please wait.

Perspective View Volume View Volume Far Near Window Far Near Window Center of Projection Center of Projection (a) Original Orientation (b) After Transformation.

Similar presentations


Presentation on theme: "Perspective View Volume View Volume Far Near Window Far Near Window Center of Projection Center of Projection (a) Original Orientation (b) After Transformation."— Presentation transcript:

1 Perspective View Volume View Volume Far Near Window Far Near Window Center of Projection Center of Projection (a) Original Orientation (b) After Transformation Shearing Regularization of Clipping (View) Volume (Cont’) General perspective projection transformation

2 Perspectiv e Steps 1.Shear the view volume so that the centerline of the frustum is perpendicular to the view plane 2.Scale the view volume with a scaling factor that depends on 1/z. A shear operation is to align a general perspective view volume with the projection window. The transformation involves a combination of z-axis shear and a translation. M perspective =M scale.M shear

3 Clipping View volume clipping boundaries are planes whose orientations depend on the type of projection, the projection window and the position of the projection reference point The process of finding the intersection of a line with one of the view volume boundaries is simplified if we convert the view volume before clipping to a rectangular parallelepiped. i.e we first perform the projection transformation which converts coordinate values in the view volume to orthographic parallel coordinates. Oblique projection view volumes are converted to a rectangular parallelepiped by the shearing operation and perspective view volumes are converted with a combination of shear and scale transformations.

4 Clipping-normalized view volumes The normalized view volume is a region defined by the planes X=0, x=1, y=0, y=1, z=0, z=1

5 Clipping-normalized view volumes There are several advantages to clipping against the unit cube 1.The normalized view volume provides a standard shape for representing any sized view volume. 2.Clipping procedures are simplified and standardized with unit clipping planes or the viewport planes. 3.Depth cueing and visible-surface determination are simplified, since Z-axis always points towards the viewer. Unit cube 3D viewport Mapping positions within a rectangular view volume to a three-dimensional rectangular viewport is accomplished with a combination of scaling and translation.

6 Clipping-normalized view volumes Unit cube 3D viewport Mapping positions within a rectangular view volume to a three-dimensional rectangular viewport is accomplished with a combination of scaling and translation. Dx00Kx 0Dy0Ky 00DzKz 0001 Where D x =(xv max -xv min )/(xw max -xw min ) and K x = xv min - xw min D x D y = (yv max -yv min )/(yw max -yw min ) and K y = yv min - yw min D y D z = (zv max -zv min )/(zw max -zw min ) and K z = zv min - zw min D z

7 Viewport clipping For a line endpoint at position (x,y,z) we assign the bit positions in the region code from right to left as Bit 1 = 1 if x< xv min (left) Bit 1 = 1 if x< xv max (right) Bit 1 = 1 if y< yv min (below) Bit 1 = 1 if y< yv max (above) Bit 1 = 1 if z< zv min (front) Bit 1 = 1 if z< zv max (back)

8 Viewport clipping For a line segment with endpoints P1(x1,y1,z1) and P2(x2,y2,z2) the parametric equations can be X=x1+(x2-x1)u Y=y1+(y2-y1)u Z=z1+(z2-z1)u

9 Hardware implementations WORLD-COORDINATE Object descriptions Transformation Operations Clipping Operations Conversion to Device Coordinates


Download ppt "Perspective View Volume View Volume Far Near Window Far Near Window Center of Projection Center of Projection (a) Original Orientation (b) After Transformation."

Similar presentations


Ads by Google