| OCR Text |
Show 32 A) can be used for ordering. Since a patch is constrained to lie within the convex hull of its defining points, the defining points can be used to sort the patches. If the order between two patches can not be determined then the patches can be subdivided until the correct sort can be done. With the fast subdivision of bicubic patches one can keep subdividing the patches until the z order is resolved and then render the curved pieces as shown earlier. The relationship between Bezier control points and the correction factors is shown in Appendix B. THE Z-BUFFER The z-buffer is an extension of the frame-buffer idea in that the z value from the image-space of the visible object is stored at every raster-element as well as the intensity. The z value of any new point to be written into the buffer is compared with the z value of the point already there. If the new point is behind, it is discarded. If it is in front it replaces the old value. There are several advantages to using the z-buffer. Hidden surface problems and intersection of arbitrary surfaces are handled trivially. Pictures can be of any complexity. Except as noted below, surfaces may be written into the buffer in any order, thus saving the time-consuming sorting of highly complex surfaces. There are of course some disadvantages to the z-buffer. A 512 by 512 buffer with 8 bits of intensity and 20 bits of z uses a quarter of a million 28 bit words. At the current cost of memory this means an expensive implementation. A more serious problem is that of "anti-aliasing," or getting rid of the "staircase effect" (see Chapter |