03/13/2003
15-462 Graphics I
13
Filling Convex Polygons
•
Find top and bottom vertices
•
List edges along left and right sides
•
For each scan line from top to bottom
–
Find left and right endpoints of span, xl and xr
–
Fill pixels between xl and xr
–
Can use Bresenham’s alg. to update xl and xr
xl
xr