


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Peroformance Improvements brute force: intersect all the edges with each scanline
current scanline
e
e 4
e e1 (^) e
Data Structures
EF (^) DE CD FA AB BC
Edge structure: ymax, xmin, dx/dy, next AB: 3, 6, −2, BC
Algorithm
Construct the Edge Table (ET) y = smallest y in the ET Active Edge Table (AET) = NULL for y = ymin to ymax Merge−sort ET[y] into AET by x value Fill between pairs of x in AET for each edge in AET if edge.ymax = y remove edge from AET else edge.x = edge.x + dx/dy Sort AET by x value (as needed) end scan_fill