Once you have your Edge Table (ET) for the polygon, youre ready
to step through
y coordinates and render scan lines:
1. Set y to the first non-empty bucket in the ET. This is bucket 1 in the
example.
2. Initialize the Active Edge Table (AET) to be empty. The AET keeps
track of which
edges cross the current y scan line.
3. Repeat the following until the AET
and ET are empty:
3.1
Add to the AET the ET entries for the current y. (edges AB, BC in example)
3.2 Remove from the AET entries where y = ymax. (none at first in example)
Then sort the AET on x. (order: {AB, BC})
3.3 Fill in pixel values on the y scan line using the x coordinates from the AET. Be wary of parity use the even/odd test to determine
whether to fill (see next slide).
3.4 Increment y by 1 (to the next scan line).
3.5 For every non-vertical edge in the AET update x for the new y
(calculate the next intersection of the edge with the scan line).
Note: the algorithm in the book
(presented here and in course lecture notes) attempts to fix the problems that occur when polygons share an
edge, by not rasterizing the top-most row of pixels along an edge.