A partition of a polygon is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon. Functions are available for partitioning planar polygons into two types of subpolygons - -monotone polygons and convex polygons.
The function that produces a -monotone partitioning is based on the algorithm presented in [dBvKOS97] which requires log time and space for a polygon with vertices and guarantees nothing about the number of polygons produced with respect to the optimal number. Three functions are provided for producing convex partitions. Two of these functions produce approximately optimal partitions and one results in an optimal partition, where ``optimal'' is defined in terms of the number of partition polygons. The two functions that implement approximation algorithms are guaranteed to produce no more than four times the optimal number of convex pieces. The optimal partitioning function provides an implementation of Greene's dynamic programming algorithm [Gre83], which requires time and space to produce a convex partitioning. One of the approximation algorithms is also due to Greene [Gre83] and requires log time and space to produce a convex partitioning given a -monotone partitioning. The other approximation algorithm is a result of Hertel and Mehlhorn [HM83], which requires time and space to produce a convex partitioning from a triangulation of a polygon. Each of the partitioning functions uses a traits class to supply the primitive types and predicates used by the algorithms.
The assertion flags for this package use PARTITION in their names (e.g., CGAL_PARTITION_NO_POSTCONDITIONS). The precondition checks for the planar polygon partitioning functions are: counterclockwise ordering of the input vertices and simplicity of the polygon these vertices represent. The postcondition checks are: simplicity, counterclockwise orientation, and convexity (or -monotonicity) of the partition polygons and validity of the partition (i.e., the partition polygons are nonoverlapping and the union of these polygons is the same as the original polygon) .