As in two dimensional viewing the projection operations can take place be fore

# As in two dimensional viewing the projection

This preview shows page 467 - 469 out of 662 pages.

As in two-dimensional viewing, the projection operations can take place be fore the view-volume clipping or after clipping. All obpcts within the view vol- ume map to the interior of the specified projection window. The last step is to transform the window contents to a two-dimensional viewport, which specifies the location of the display on the output device. Clipping in two dimensions is generally performed against an upright rec- tangle; that is, the dip window is aligned with the x and y axes. This greatly sirn- plifies the clipping calculations, because .each window boundary is defined by one coordinate value. For example, the intersections of all lines crossing the left boundary of the window have an x coordinate equal to the left boundary. View-volume clipping boundaries are planes whose orientations depend on the type of projection, the propchon window, and the position of the projection reference point. Since the front and back clipping planes are parallel to the view plane, each has a constant z-coordinate value. The z coordinate of the inters- tions of lines with these planes is simply the z coordinate of the corresponding plane. But the other four sides of the view volume can have arbitrary spatial ori- entations. To find the intersection of a line with one of the view volume bound- aries means that we must obtain the equation for the plane containing that boundary polygon. This process is simplified if we convert the view volume be fore clipping to a rectangular parallelepiped. In other words, we first perform the projection transformation, which converts coordinate values in the view volume to orthographic parallel coordinates, then we carry out the clipping calculations. Clipping against a regular parallelepiped is much simpler because each sur- face is now perpendicular to one of the coordinate axes. As seen in Fig. 12111, the top and bottom of the view volume are now planes of constant y, the sides are planes of constant x, and the front and back are planes of constant z. A line cut- ting through the top plane of the parallelepiped, for example, has an intersection point whose y-coordinate value is that of the top plane. In the case of an orthographic parallel projection, the view volume is al- ready a rectangular parallelepiped. As we have seen in Section 12-3, obliquepro- jechon view volumes are converted to a rectangular parallelepiped by the shear- ing operation, and perspective view volumes are converted, in general, with a combination shear-scale transformation. v Figure 12-41 An obpct intersecting a rectangular parallelepiped view volume.
Chapter 1 2 Normalized View Volumes Three-Dimensional Mewing Figure 12-42 shows the expanded PHIGS transformation pipeline. At the first step, a scene is constructed by transforming obpct descriptions from modeling coordinates to world coordinates. Next, a view mapping convert: the world de- scriptions to viewing coordinates. At the projection stage, the viewing coordj- nates are transformed to projection coordinates, which effectively converts the view volume into a rectangular parallelepiped. Then, the parallelepiped is

#### You've reached the end of your free preview.

Want to read all 662 pages?

• Fall '16