Jump to content

Warnock algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rlanman (talk | contribs) at 03:23, 22 September 2009 (Added layperson's explanation and referenced Daintith's Oxford Dictionary of Computing.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Warnock algorithm is a hidden surface algorithm invented by John Warnock that is typically used in the field of computer graphics. It works by recursive subdivision of a scene until areas are obtained that are trivial to compute. It solves the problem of rendering a complicated image by avoiding the problem. If the scene is simple enough to compute then it is rendered; otherwise it is divided into smaller parts and the process is repeated.ref>Daintith, John (2009). Oxford Dictionary of Computing. Oxford University Press. {{cite book}}: Unknown parameter |coauthors= ignored (|author= suggested) (help); Unknown parameter |isbn-10= ignored (help); Unknown parameter |isbn-13= ignored (help), 608 pages </ref>

This is a divide and conquer algorithm with run-time of , where n is the number of polygons and p is the number of pixels in the viewport.

The inputs are a list of polygons and a viewport. The base case is that if the list of polygons is simple then draw the polygons in the viewport. Simple is defined as one polygon or a viewport that is one pixel in size. The continuous step is to split the viewport into 4 equally sized quadrants and to recursively call the algorithm for each quadrant with a polygon list modified such that it only contains polygons that are visible in that quadrant.

References