A polygon is a closed two-dimensional shape with straight or curved sides. It can be defined by an ordered sequence of vertices and edges connecting consecutive vertices. The scan line polygon fill algorithm uses an odd-even rule to determine if a point is inside or outside the polygon by counting edge crossings along a scan line from that point to infinity. Boundary fill and flood fill are two area filling algorithms that color the interior of a polygon or region by recursively filling neighboring pixels of the same color.