Scanline Polygon Fill
Solid filling of convex and concave polygon boundaries using edge tables and parity checks.
Edge Tables (ET & AET)
The Edge Table (ET) lists all polygon edges sorted by their minimum Y coordinate. The Active Edge Table (AET) contains only the edges intersecting the current scanline row, sorted by their active X coordinates.
Parity Rule
For each scanline row:
- Find all intersection points with edges in the AET.
- Sort intersections in increasing X order.
- Fill pixels between odd and even index intersection pairs (e.g. between 1st & 2nd, 3rd & 4th points).
Ready to Visualize Polygon Filling?
Launch our interactive visualizer to step through calculations in real-time.
Launch Polygon Fill Visualizer →