Polygon? What is that?

A polygon can be generally thought of as a shape. That shape is formed by line segments that are placed end to end, creating a continuous closed path. Polygons can be divided into three basic types: convex, concave, and complex.

Convex polygons are the simplest type of polygon to fill. To determine whether or not a polygon is convex, ask the following question:

  • Does a straight line connecting ANY two points that are inside the polygon intersect any edges of the polygon?

If the answer is no, the polygon is convex. This means that for any scan-line, the scan-line will cross at most two polygon edges (not counting any horizontal edges). Convex polygon edges also do not intersect each other.

Concave polygons are a superset of convex polygons, having fewer restrictions than convex polygons. The line connecting any two points that lie inside the polygon may intersect more than two edges of the polygon. Thus, more than two edges may intersect any scanline that passes through the polygon. The polygon edges may also touch each other, but they may not cross one another.
Complex polygons are just what their name suggests: complex. Complex polygons are basically concave polygons that may have self-intersecting edges. The complexity arises from distinguishing which side is inside the polygon when filling it.

Next Page | Previous Page | Main Page