Polygon triangulation

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Template:Broader

File:Триангуляция.svg
Polygon triangulation

In computational geometry, polygon triangulation is the partition of a polygonal area (simple polygon) Template:Mvar into a set of triangles,[1] i.e., finding a set of triangles with pairwise non-intersecting interiors whose union is Template:Mvar.

Triangulations may be viewed as special cases of planar straight-line graphs. When there are no holes or added points, triangulations form maximal outerplanar graphs.

Polygon triangulation without extra vertices

Over time, a number of algorithms have been proposed to triangulate a polygon.

Convex polygon triangulation

File:Polygon Triangulations (heptagon).svg
The 42 possible triangulations for a convex heptagon (7-sided convex polygon). This number is given by the 5th Catalan number.

It is trivial to triangulate any convex polygon in linear time into a fan triangulation, by adding diagonals from one vertex to all other non-nearest neighbor vertices.

The total number of ways to triangulate a convex n-gon by non-intersecting diagonals is the (n−2)nd Catalan number, which equals

n(n+1)...(2n4)(n2)!,

a formula found by Leonhard Euler.[2]

Ear clipping method

File:Polygon-ear.png
A triangulated polygon, with one ear shaded

One way to triangulate a simple polygon is based on the two ears theorem, as the fact that any simple polygon with at least 4 vertices without holes has at least two "ears", which are triangles with two sides being the edges of the polygon and the third one completely inside it.[3] The algorithm then consists of finding such an ear, removing it from the polygon (which results in a new polygon that still meets the conditions) and repeating until there is only one triangle left.

This algorithm is easy to implement, but slower than some other algorithms, and it only works on polygons without holes. An implementation that keeps separate lists of convex and concave vertices will run in O(n2)Script error: No such module "Check for unknown parameters". time. This method is known as ear clipping and sometimes ear trimming. An efficient algorithm for cutting off ears was discovered by Hossam ElGindy, Hazel Everett, and Godfried Toussaint.[4]

Monotone polygon triangulation

A simple polygon is monotone with respect to a line LScript error: No such module "Check for unknown parameters"., if any line orthogonal to LScript error: No such module "Check for unknown parameters". intersects the polygon at most twice. A monotone polygon can be split into two monotone chains. A polygon that is monotone with respect to the y-axis is called y-monotone. A monotone polygon with nScript error: No such module "Check for unknown parameters". vertices can be triangulated in O(n)Script error: No such module "Check for unknown parameters". time. Assuming a given polygon is y-monotone, the greedy algorithm begins by walking on one chain of the polygon from top to bottom while adding diagonals whenever it is possible.[1] It is easy to see that the algorithm can be applied to any monotone polygon.

A monotone polygon can be triangulated in linear time with either the algorithm of A. Fournier and D.Y. Montuno,[5] or the algorithm of Godfried Toussaint.[6]

Triangulating a non-monotone polygon

File:Polygon-to-monotone.png
Breaking a polygon into monotone polygons

If a polygon is not monotone, it can be partitioned into monotone subpolygons in O(n log n)Script error: No such module "Check for unknown parameters". time using a sweep-line approach. The algorithm does not require the polygon to be simple, thus it can be applied to polygons with holes. Generally, this algorithm can triangulate a planar subdivision with nScript error: No such module "Check for unknown parameters". vertices in O(n log n)Script error: No such module "Check for unknown parameters". time using O(n)Script error: No such module "Check for unknown parameters". space.[1]

Dual graph of a triangulation

A useful graph that is often associated with a triangulation of a polygon PScript error: No such module "Check for unknown parameters". is the dual graph. Given a triangulation TPScript error: No such module "Check for unknown parameters". of PScript error: No such module "Check for unknown parameters"., one defines the graph G(TP)Script error: No such module "Check for unknown parameters". as the graph whose vertex set are the triangles of TPScript error: No such module "Check for unknown parameters"., two vertices (triangles) being adjacent if and only if they share a diagonal. It is easy to observe that G(TP)Script error: No such module "Check for unknown parameters". is a tree with maximum degree 3.

Computational complexity

Until 1988, whether a simple polygon can be triangulated faster than O(n log n)Script error: No such module "Check for unknown parameters". time was an open problem in computational geometry.[1] Then, Script error: No such module "Footnotes". discovered an O(n log log n)Script error: No such module "Check for unknown parameters".-time algorithm for triangulation,[7] later simplified by Script error: No such module "Footnotes"..[8] Several improved methods with complexity O(n log* n)Script error: No such module "Check for unknown parameters". (in practice, indistinguishable from linear time) followed.[9][10][11]

Bernard Chazelle showed in 1991 that any simple polygon can be triangulated in linear time, though the proposed algorithm is very complex.[12] A simpler randomized algorithm with linear expected time is also known.[13]

Seidel's decomposition algorithm[10] and Chazelle's triangulation method are discussed in detail in Script error: No such module "Footnotes"..[14]

The time complexity of triangulation of an nScript error: No such module "Check for unknown parameters".-vertex polygon with holes has an Ω(n log n)Script error: No such module "Check for unknown parameters". lower bound, in algebraic computation tree models of computation.[1] It is possible to compute the number of distinct triangulations of a simple polygon in polynomial time using dynamic programming, and (based on this counting algorithm) to generate uniformly random triangulations in polynomial time.[15] However, counting the triangulations of a polygon with holes is #P-complete, making it unlikely that it can be done in polynomial time.[16]

Related objects and problems

See also

References

<templatestyles src="Reflist/styles.css" />

  1. a b c d e Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Script error: No such module "citation/CS1".
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. a b Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".
  13. Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1".
  15. Script error: No such module "citation/CS1".
  16. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

External links