In geometry, two edges of a polygon may cross or even overlap in general. A simple polygon is a polygon which does not intersect itself anywhere. These are also called Jordan polygons, because the Jordan curve theorem can be used to prove that such a polygon divides the plane into two regions, the region inside it and the region outside it.
In computational geometry, there are several important problems where the given input is a simple polygon, each depending critically on its well-defined interior:
Determining if a point falls inside a simple polygon; see Point in polygon
Finding the area contained by a simple polygon; see Polygon area
Polygon triangulation: dividing a simple polygon into triangles. Although convex polygons are easy to triangulate, triangulating a general simple polygon is more difficult because we have to avoid adding edges that cross outside the polygon. Nevertheless, Bernard Chazelle showed in 1991 that any simple polygon with n vertices can be triangulated in Θ(n) time, which is optimal.
Polygon union: finding the simple polygon or polygons containing the area inside either of two simple polygons
Polygon intersection: finding the simple polygon or polygons containing the area inside both of two simple polygons
A polygon is called simple if all nodes of the graph induced by its segments have degree two and it is called weakly simple, if its segments are disjoint except for common endpoints and if the chain does not cross itself.
When a weakly simplepolygon P is traversed either the bounded region is consistently to the left of P or the unbounded region is consistently to the left of P.
P is initialized to the polygon with vertex sequence pl.