Polygonal turning (or polygon turning) is a machining process which allows non-circular forms (polygons) to be machined without interrupting the rotation of the raw material.
Polygonally turned parts may have several points, teeth, or other forms at the ends or along their circumference. The technique requires synchronisation of the movement of the polygonal turning mill and the part being machined. Polygonal turning allows rapid production and clean machining of advanced geometries. The polygon turning unit has a multitude of inserts, and is synchronized so that when an insert cuts the turning bar stock, it cuts the bar at the same radial position each time the workpiece rotates. This enables geometries such as hexes, squares and flats to be machined at faster speeds than by milling.
Special cases
A convex polygon is trivial to triangulate in linear time, by adding diagonals from one vertex to all other vertices. The total number of ways to triangulate a convex n-gon by non-intersecting diagonals is the (n − 2)-th Catalan number, which equals {\displaystyle {\tfrac {n\cdot (n+1)\cdots (2n-4)}{(n-2)!}}} {\tfrac {n\cdot (n+1)\cdots (2n-4)}{(n-2)!}}, a solution found by Leonhard Euler.
A monotone polygon can be triangulated in linear time with either the algorithm of A. Fournier and D.Y. Montuno, or the algorithm of Godfried Toussaint.
Ear clipping method
A polygon ear
One way to triangulate a simple polygon is based on the two ears theorem, 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 (and with an extra property unimportant for triangulation). 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.
Using monotone polygons
Breaking a polygon into monotone polygons
For each point, check if the neighboring points are both on the same side of the 'sweep line', a horizontal or vertical line on which the point being iterated lies. If they are, check the next sweep line on the other side. Break the polygon on the line between the original point and one of the points on this one.
Note that if you are moving downwards, the points where both of the vertices are below the sweep line are 'split points'. They mark a split in the polygon. From there you have to consider both sides separately.
Using this algorithm to triangulate a simple polygon takes O(n log n) time.
Dual graph of a triangulation
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.
Computational complexity
For a long time, there was an open problem in computational geometry whether a simple polygon can be triangulated faster than O(n log n) time. 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.
Seidel's decomposition algorithm and Chazelle's triangulation method are discussed in detail in Li & Klette .
The time complexity of triangulation of an n-vertex polygon with holes has an Ω(n log n) lower bound.