In computational geometry, polygon triangulation is the decomposition of a polygonal area (simple polygon) P into a set of triangles, i.e., finding a set of triangles with pairwise non-intersecting interiors whose union is P.
Polygon triangulation without extra verticesEdit
Over time a number of algorithms have been proposed to triangulate a polygon.
Ear clipping methodEdit
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. 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) 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.
Monotone Polygon TriangulationEdit
A polygonal chain C is called monotone with respect to a straight line L, if every line orthogonal to L intersects C at most once. We call these chains monotone chains. A polygon P is monotone with respect to a line L if its boundary can be split into two chains, each being monotone with respect to L. We call these polygons monotone polygons. We say that a polygon P is horizontally monotone (or x-monotone) if P is monotone w.r.t. x-axis.
We can triangulate a monotone polygon in time, where is the number of vertices of the monotone polygon. The algorithm is described in section 3.3 of the book Computational Geometry: Algorithms and Applications (3rd edition), by Berg et al.
Decomposition of a Simple Polygon into Monotone PiecesEdit
If a simple polygon is not monotone, it can be made monotone, in time, using a sweep-line approach. To see it, read section 3.2 of the book Computational Geometry: Algorithms and Applications (3rd edition) by Berg et al.
Dual graph of a triangulationEdit
A useful graph that is often associated with a triangulation of a polygon P is the dual graph. Given a triangulation TP of P, one defines the graph G(TP) as the graph whose vertex set are the triangles of TP, two vertices (triangles) being adjacent if and only if they share a diagonal. It is easy to observe that G(TP) is a tree with maximum degree 3.
Until 1988, whether a simple polygon can be triangulated faster than O(n log n) time was an open problem in computational geometry. Then, Tarjan & Van Wyk (1988) discovered an O(n log log n)-time algorithm for triangulation, later simplified by Kirkpatrick, Klawe & Tarjan (1992). Several improved methods with complexity O(n log* n) (in practice, indistinguishable from linear time) followed.
Bernard Chazelle showed in 1991 that any simple polygon can be triangulated in linear time, though the proposed algorithm is very complex. A simpler randomized algorithm with linear expected time is also known.
- Both triangulation problems are a special case of triangulation (geometry) and a special case of polygon partition.
- Minimum-weight triangulation is a triangulation in which the goal is to minimize the total edge length.
- A point set triangulation is a polygon triangulation of the convex hull of a set of points. A Delaunay triangulation is another way to create a triangulation based on a set of points.
- Polygon triangle covering, in which the triangles may overlap.
- tiling by polygons, where the goal is to cover the entire plane with polygons of pre-specified shapes.
- Mark de Berg, Marc van Kreveld, Mark Overmars, and Otfried Schwarzkopf (2000), Computational Geometry (2nd revised ed.), Springer-Verlag, ISBN 3-540-65620-0CS1 maint: Multiple names: authors list (link) Chapter 3: Polygon Triangulation: pp.45–61.
- Pickover, Clifford A., The Math Book, Sterling, 2009: p. 184.
- Fournier, A.; Montuno, D. Y. (1984), "Triangulating simple polygons and equivalent problems", ACM Transactions on Graphics, 3 (2): 153–174, doi:10.1145/357337.357341, ISSN 0730-0301
- Toussaint, Godfried T. (1984), "A new linear algorithm for triangulating monotone polygons," Pattern Recognition Letters, 2 (March):155–158.
- Meisters, G. H., "Polygons have ears." American Mathematical Monthly 82 (1975). 648–651
- ElGindy, H.; Everett, H.; Toussaint, G. T. (1993). "Slicing an ear using prune-and-search". Pattern Recognition Letters. 14 (9): 719–722. doi:10.1016/0167-8655(93)90141-y.
- Tarjan, Robert E.; Van Wyk, Christopher J. (1988), "An O(n log log n)-time algorithm for triangulating a simple polygon", SIAM Journal on Computing, 17 (1): 143–178, CiteSeerX 10.1.1.186.5949, doi:10.1137/0217010, MR 0925194.
- Kirkpatrick, David G.; Klawe, Maria M.; Tarjan, Robert E. (1992), "Polygon triangulation in O(n log log n) time with simple data structures", Discrete and Computational Geometry, 7 (4): 329–346, doi:10.1007/BF02187846, MR 1148949.
- Clarkson, Kenneth L.; Tarjan, Robert; van Wyk, Christopher J. (1989), "A fast Las Vegas algorithm for triangulating a simple polygon", Discrete and Computational Geometry, 4: 423–432, doi:10.1007/BF02187741.
- Seidel, Raimund (1991), "A Simple and Fast Incremental Randomized Algorithm for Computing Trapezoidal Decompositions and for Triangulating Polygons", Computational Geometry: Theory and Applications, 1: 51–64, doi:10.1016/0925-7721(91)90012-4
- Clarkson, Kenneth L.; Cole, Richard; Tarjan, Robert E. (1992), "Randomized parallel algorithms for trapezoidal diagrams", International Journal of Computational Geometry & Applications, 2 (2): 117–133, doi:10.1142/S0218195992000081, MR 1168952.
- Chazelle, Bernard (1991), "Triangulating a Simple Polygon in Linear Time", Discrete & Computational Geometry, 6: 485–524, doi:10.1007/BF02574703, ISSN 0179-5376
- Amato, Nancy M.; Goodrich, Michael T.; Ramos, Edgar A. (2001), "A Randomized Algorithm for Triangulating a Simple Polygon in Linear Time", Discrete & Computational Geometry, 26 (2): 245–265, doi:10.1007/s00454-001-0027-x, ISSN 0179-5376
- Li, Fajie; Klette, Reinhard (2011), Euclidean Shortest Paths, Springer, doi:10.1007/978-1-4471-2256-2, ISBN 978-1-4471-2255-5.
- Demo as Flash swf, A Sweep Line algorithm.
- Song Ho's explanation of the OpenGL GLU tesselator