| OCR Text |
Show 46 The average intensity of all pieces visible in a square is needed to do area-sampling. Unfortunately, the pieces that logically belong to a square are not derived in immediate sequential order; that is, after one piece is found for a square, other areas of the screen may be worked on before finding another piece for that square. Some mechanism must be found for storing the piece intensities so that the average intensity can be found. The problem is simplified if we make use of the following observations. In the large majority of raster-element squares all visible pieces come from the same patch. In a smaller, but still significant, number of squares, the pieces come from two patches -- namely at silhouettes and patch boundaries. A very small number have three or more patches visible in a single square. The method to be presented will do area-sampling for the first two cases correctly but is not guarenteed to be correct if more than two patches are visible in a single square. The above implies that each piece must be identified with SOme patch. A patch code will be introduced for this purpose. The problem of identification is complicated by the fact that a patch may obscure itself; and in general it will, in regions near the silhouette. We can, however, differentiate between front and back-facing pieces by using an area-calculation method that gives negative or positive area depending on which way the piece faces. A bit can be set tor a piece which indicates its facing direction. The area-averaging algorithm requires that pieces be processed in z order. That requirement holds even within patches, ie., the four subpatches of a patch are sorted |