Scan-Line Polygon Fill Algorithm

The Scan-Line Polygon Fill Algorithm is a widely used technique to fill the interior of a polygon by processing one horizontal scan line at a time.

1. Introduction

Polygon filling is required to display solid objects. The scan-line algorithm fills polygons efficiently by intersecting them with horizontal scan lines.

2. Basic Idea

Each horizontal scan line intersects polygon edges at certain points. Pixels between pairs of intersection points are filled.

3. Scan Lines

Scan lines are horizontal lines that move from the bottom of the polygon to the top.

4. Edge Table (ET)

The Edge Table stores information about polygon edges sorted by their minimum y-coordinate.

5. Active Edge Table (AET)

The Active Edge Table contains edges that intersect the current scan line.

6. Filling Rule

Intersection points are paired from left to right, and pixels between each pair are filled.

7. Steps of Scan-Line Algorithm

8. Advantages

9. Disadvantages

10. Applications

Practice Questions

  1. What is scan-line polygon fill?
  2. What is an edge table?
  3. Explain active edge table.
  4. Describe scan-line filling steps.
  5. List advantages of scan-line algorithm.

Practice Task

Explain with diagram: ✔ Scan line intersection ✔ Edge table and AET ✔ Polygon filling process