Seed Fill Algorithms
Seed Fill Algorithms
Presentation by ….
Yagnik Parmar(299) &
Jayveer Parmar(314)
Polygon Filling Algorithms
For highlighting all the pixels inside the polygon, 2 approaches can be
used-
1. Scan Fill
1. A seed pixel on a span is popped from a stack containing the seed pixel.
2. The span containing the seed pixel is filled to the right and left of the seed pixel
along a scan line, until a boundary is found.
3. The algorithm remembers the extreme left and the extreme right pixels in the
span as XLef and XRight.
4. In the range of Xlef <= x <= Xright, the scan line immediately above and
immediately below the current scan line are examined to see if they completely
contain either boundary pixels or previously filled pixels. If these scan lines do not
contain either boundary or previously filled pixels, then in the range Xlef <= x <=
Xright the extreme right pixel in each span is marked as a seed pixel and pushed
onto the stack.
REFERENCES
Procedural elements for computer graphics by David F. Rogers