Explain Warnock’s algorithm for hidden surface removal with an example
Warnock algorithm
1. Initialize the region.
2. Generate a list of polygons by sorting them with their z values.
3. Remove polygons that are outside the area.
4. Identify the relationship of each polygon.
5. Execute visibility decision analysis:
a) Fill area with background color if all polygons are disjoint,
b) Fill entire area with background color and fill part of polygon contained in an area with color of the polygon if there is only one contained polygon,
c) If there is a single surrounding polygon but not contained then fill an area with the color of the surrounding polygon.
d)Set pixel to the color of a polygon which is closer to view if a region of the pixel (x,y) and if neither of (a) to (d) applies to calculate z- coordinate at pixel (x,y) of polygons.
6. If none of the above is correct then subdivide the area and Go to Step 2.
Comments