The polygon scan conversion algorithm is used for drawing a filled-in (solid) polygon. The algorithm can be used for both, convex polygons, as well as concave polygons. The algorithm also handles self-intersecting polygons, as well polygons with holes in them.The algorithm works by scanning each row from left to right, and determining which points on the scan line lie within the polygon. This process is repeated for each line, and thus the whole polygon is scan converted.
The algorithm can be distinguished into three functional phases:
Although this algorithm is relatively simple to describe, its implementation is somewhat complicated. In particular, we want an efficient method for computing the edge intersections on each scan line. Also, certain vertices/edges need to be treated differently. All these details will be examined later in this document.
From Graphica -- see details 26.11.1996