Subdivision Algorithm - Visible Surface Detection
1) Initialize the area to be the whole screen.
2) Create a PVPL regarding an area, sorted on zmin as the smallest z coordinate of the polygon inside the area. Place the polygons in their suitable categories. Eliminate polygons hidden through a surrounding polygon and eliminate disjoint polygons.
3) Do the visibility decision tests as:
i) If the list is blank, set all pixels to the background color.
ii) If there is particularly one polygon in the list and this is classified as intersecting as in category 2 or contained as in category 3, colour by scan-converter the polygon and color the keeping area to the background color.
iii) If there is particularly one polygon on the list and that is a surrounding one, color the region the color of the surrounding polygon.
iv) If the region is the pixel (x,y), and neither a, b, nor c applies, estimate the z coordinate z(x, y) at pixel (x, y) of all polygons upon the potentially visible polygons list. The pixel is after that set to the color of the polygon along with the smallest z coordinate.
4) If none of the exceeding cases has occurred, subdivide the screen region into fourths.
Go to step 2, for each region.