CS 248 - Introduction to Computer Graphics
Autumn Quarter, 2005
Lecture notes for Thursday, November 10
In other words, we are maintaining a list of active polygon "spans" for the current scanline, sorted by Z. The work required to maintain this list consists of inserting spans into it in proper Z-sorted position. This occurs at edges #1, #2, and #3 above. At edge #4 above, when topmost polygon ABC stops, we remove its span from the list and revert to the color of the span which is then topmost on the list, DEF in this case. Since the order of spans cannot change except at these edges (including interpenetration edges, if any), there is never a need to resort the list.