15-10-2010, 01:55 PM
[attachment=6157]
SUB CODE SUBJECT NAME NAME CONTINUE…,FILL ALGORITHMS
Name of Department
CHAROTAR INSTITUTE OF TECHNOLOGY, CHANGA
FILL ALGORITHMS
Given the edges defining a polygon, and a color for the polygon, we need to fill all the pixels inside the polygon.
Three different algorithms:
1. Scan-line fill
2. Boundary fill
3. Flood fill
Boundary Fill
Suppose that the edges of the polygon has already been colored.
Suppose that the interior of the polygon is to be colored a different color from the edge.
Suppose we start with a pixel inside the polygon, then we color that pixel and all surrounding pixels until we meet a pixel that is already colored.