mirror of https://github.com/CGAL/cgal
105 lines
4.5 KiB
Plaintext
105 lines
4.5 KiB
Plaintext
/// \defgroup PkgPolygonPartitioning2 2D Polygon Partitioning Reference
|
|
/// \defgroup PkgPolygonPartitioning2Concepts Concepts
|
|
/// \ingroup PkgPolygonPartitioning2
|
|
/// \defgroup PkgPolygonPartitioning2FunctionObjectConcepts Function Object Concepts
|
|
/// \ingroup PkgPolygonPartitioning2
|
|
/// \defgroup PkgPolygonPartitioning2FunctionObjectClasses Function Object Classes
|
|
/// \ingroup PkgPolygonPartitioning2
|
|
/*!
|
|
\addtogroup PkgPolygonPartitioning2
|
|
\todo check generated documentation
|
|
\cgalPkgDescriptionBegin{2D Polygon Partitioning,PkgPolygonPartitioning2Summary}
|
|
\cgalPkgPicture{Partition_2/fig/Partition_2-teaser-small.png}
|
|
\cgalPkgSummaryBegin
|
|
\cgalPkgAuthor{Susan Hert}
|
|
\cgalPkgDesc{This package provides functions for partitioning polygons in monotone or convex polygons. The algorithms can produce results with the minimal number of polygons, as well as approximations which have no more than four times the optimal number of convex pieces but they differ in their runtime complexities.}
|
|
\cgalPkgManuals{Chapter_2D_Polygon_Partitioning,PkgPolygonPartitioning2}
|
|
\cgalPkgSummaryEnd
|
|
\cgalPkgShortInfoBegin
|
|
\cgalPkgSince{2.3}
|
|
\cgalPkgBib{cgal:h-pp2}
|
|
\cgalPkgLicense{\ref licensesGPL "GPL"}
|
|
\cgalPkgDemo{2D Polygon Partition,partition_2.zip,Operations on Polygons,polygon.zip}
|
|
\cgalPkgShortInfoEnd
|
|
\cgalPkgDescriptionEnd
|
|
|
|
## Definitions ##
|
|
|
|
A <i>partition</i> 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 (`y`-monotone polygons and convex polygons).
|
|
|
|
The function that produces a `y`-monotone partitioning is based on the
|
|
algorithm presented in \cgalCite{bkos-cgaa-97} which requires \f$ O(n \log n) \f$ time
|
|
and \f$ O(n) \f$ space for a polygon with \f$ n \f$ 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 <i>optimal</i> 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
|
|
\cgalCite{g-dpcp-83}, which requires \f$ O(n^4) \f$ time and \f$ O(n^3) \f$ space to produce a
|
|
convex partitioning. One of the approximation algorithms is also due to
|
|
Greene \cgalCite{g-dpcp-83} and requires \f$ O(n \log n) \f$ time and \f$ O(n) \f$ space
|
|
to produce a convex partitioning given a `y`-monotone partitioning. The
|
|
other approximation algorithm is a result of Hertel and
|
|
Mehlhorn \cgalCite{hm-ftsp-83}, which requires \f$ O(n) \f$ 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.
|
|
|
|
## Assertions ##
|
|
|
|
The assertion flags for this package use `PARTITION` in their names
|
|
(<I>e.g.</I>, `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 \f$ y\f$-monotonicity) of the partition polygons
|
|
and validity of the partition (<I>i.e.</I>, the partition polygons are
|
|
nonoverlapping and the union of these polygons is the same as the
|
|
original polygon).
|
|
|
|
\cgalClassifedRefPages
|
|
|
|
## Concepts ##
|
|
- `ConvexPartitionIsValidTraits_2`
|
|
- `IsYMonotoneTraits_2`
|
|
- `OptimalConvexPartitionTraits_2`
|
|
- `PartitionTraits_2`
|
|
- `PartitionIsValidTraits_2`
|
|
- `YMonotonePartitionIsValidTraits_2`
|
|
- `YMonotonePartitionTraits_2`
|
|
|
|
## Function Object Concepts ##
|
|
- `PolygonIsValid`
|
|
|
|
## Classes ##
|
|
- `CGAL::Partition_is_valid_traits_2<Traits, PolygonIsValid>`
|
|
- `CGAL::Partition_traits_2<R>`
|
|
|
|
|
|
## Function Object Classes ##
|
|
- `CGAL::Is_convex_2<Traits>`
|
|
- `CGAL::Is_vacuously_valid<Traits>`
|
|
- `CGAL::Is_y_monotone_2<Traits>`
|
|
|
|
## Functions ##
|
|
- `CGAL::approx_convex_partition_2()`
|
|
- `CGAL::convex_partition_is_valid_2()`
|
|
- `CGAL::greene_approx_convex_partition_2()`
|
|
- `CGAL::is_y_monotone_2()`
|
|
- `CGAL::optimal_convex_partition_2()`
|
|
- `CGAL::partition_is_valid_2()`
|
|
- `CGAL::y_monotone_partition_2()`
|
|
- `CGAL::y_monotone_partition_is_valid_2()`
|
|
|
|
*/
|
|
|