Logo
Search
Search
View menu

Polygon Filling

Presentations | English

Polygon is an ordered list of vertices as shown in the following figure. For filling polygons with particular colors, you need to determine the pixels falling on the border of the polygon and those which fall inside the polygon. There are diffrent algorithms for the same. They are as follows: Scan Line Algorithm, This algorithm works by intersecting scanline with polygon edges and fills the polygon between pairs of intersections. Flood Fill Algorithm, Sometimes we come across an object where we want to fill the area and its boundary with different colors. We can paint such objects with a specified interior color instead of searching for particular boundary color as in boundary filling algorithm.Instead of relying on the boundary of the object, it relies on the fill color. In other words, it replaces the interior color of the object with the fill color. When no more pixels of the original interior color exist, the algorithm is completed. Boundary Fill Algorithm, The boundary fill algorithm works as its name. This algorithm picks a point inside an object and starts to fill until it hits the boundary of the object. The color of the boundary and the color that we fill should be different for this algorithm to work.In this algorithm, we assume that color of the boundary is same for the entire object. The boundary fill algorithm can be implemented by 4-connected pixels or 8-connected pixels.

Picture of the product
Lumens

15.50

Lumens

PPTX (62 Slides)

Polygon Filling

Presentations | English