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
Leave a comment