The Warnock Area Subdivision Algorithm
for Hidden Surface Removal
Kenny Hoff
02/28/96

based partially on Cornel Pokorny's
Computer Graphics : An Object-Oriented Approach to the Art and Science


The Warnock area-subdivision algorithm solves the hidden-surface removal problem for polygonal faces by recursively subdividing a rectangular area of the screen until the depth comparisons within these rectangular regions allow for trivial depth comparisons that determine if the entire rectangle can be drawn with the frontmost polygon or if the entire rectangle can be filled with the background color. This method works at image precision (since it effectivly subdivides the screen or viewport to the pixel level if necessary) to simultaneously clip to the viewport, remove hidden surfaces, scan-convert the polygons, and even clear the framebuffer; however, the depth comparisons with the rectangular regions occur at object precision because the edges of the polygons are compared with the edges of the regions. Nevertheless, this routine does require "projected" polygons so, the world and viewing transformations and the perspective projection must already be applies to the scene (with pseudo-depth values maintained). In addition, Warnock's algorithm does no redundant drawing of pixels; illumination calculations need only be performed on the frontmost pixels since this routine recursively subdivides, to the pixel level if necessary, to ensure that only the "frontmost" polygon "pieces" are drawn. However, Warnock's algorithm still seems to be slower than the other forms of hidden-surface removal because of the many redundant rectangular region overlap and intersection calculations; we will reduce this redundancy later. The algorithm proceeds as follows:

Given a set of convex polygons, start with the entire viewport (the screen or framebuffer in most cases) as the initial rectangle (this hidden-surface removal algorithm is generalized to handle protrusion and cyclic overlap of polygons).

For the current rectangular region do the following: