Rasterizing polygons

Polygon rasterization ("scan conversion") lies at the heart of many renderers. It is what "colors" a wireframe polygon.

Onscreen

Print

Scan converting a concave polygon:

Note that in bottommost scanline, 'b' is repeated twice. In the middle scanline, 'b' is repeated twice, while 'c' and 'd' are not ('b', 'c' and 'd' are polygon vertices that happen to lie right on the scanline, and the question is whether we count such vertex crossings as one or two intersections).

Once we have our list of scanline edge intersections (for each scanline), we fill pixels in between each pair:

Add'l lectures:

Trinity College (Dublin)

UC Davis

Scan converting a concave polygon - one way is to subdivide it into convex regions (eg. triangles) and scan convert each convex poly separately.