Convex Polygon Triangulation Based on Symmetry

: A polygon with n nodes can be divided into two subpolygons by an internal diagonal through node n . Splitting the polygon along diagonal δ i , n and diagonal δ n − i , n , i ∈ { 2, . . . , (cid:98) n /2 (cid:99)} results in mirror images. Obviously, there are (cid:98) n /2 (cid:99) − 1 pairs of these reﬂectively symmetrical images. The inﬂuence of the observed symmetry on polygon triangulation is studied. The central result of this research is the construction of an efﬁcient algorithm used for generating convex polygon triangulations in minimal time and without generating repeat triangulations. The proposed algorithm uses the diagonal values of the Catalan triangle to avoid duplicate triangulations with negligible computational costs and provides signiﬁcant speedups compared to known methods.


Introduction and Preliminaries
Polygon triangulation is an important problem in computer graphics, measuring, military, metrology, astrometry, and other areas.A triangulation of a convex polygon can be described by non-intersecting internal polygon diagonals.Let P n denote a polygon with n vertices {1, 2, . . ., n}.The number of triangulations of P n is denoted by T n .As it is known, all P n triangulations are counted by the Catalan number C n−2 .Readers can find excellent monographs, like in references [1] or [2], regarding Catalan numbers and their role in solving various combinatorial problems.For more details about the Catalan triangle, see [3,4].
According to the standard notation, a diagonal that connects vertices i and j is denoted by δ i,j .The set of all triangulations of P n defined by internal diagonals δ i,j is denoted by T n .Clearly, T 3 = {{}}.Also, the cardinality of the set T n is denoted by T n .
Different types of symmetries are known to appear in the form of convex polygons.A zonogon is a centrally-symmetric convex polygon; its sides are grouped into parallel pairs of equal lengths and opposite orientations [5].The four-sided and six-sided zonogons are able to cover the plane by translating themselves.In addition, a regular polygon P k possesses exactly k lines of symmetry.
The following comment describes one type of symmetry that is important in generating triangulations.
Remark 1.For a given equilateral convex polygon P n , the diagonal δ i,n splits the polygon P n into two polygons.Obviously, splitting made by diagonals δ i,n and δ n−i,n produces mirror images, or reflexive symmetry, where the line of symmetry is placed between these two objects, as in Figure 1.In this paper the TBS (triangulation based on symmetry) method for convex polygon triangulation is suggested, considering symmetry, as described in Remark 1.The goal of the current research is to examine how the symmetry splitting of a polygon affects the triangulation generation.An efficient algorithm for convex polygon triangulation was constructed as a result of this investigation.The performance of the TBS method is compared to the performance of the Block method described in [6].In addition, in [6], the performance of the Block method is compared to the performance of the Hurtado-Noy method introduced in [7].
This manuscript is organized as follows.Several convex polygon triangulation methods are briefly described in Section 2. A brief survey of polygon triangulation papers concerning symmetry is presented in Section 3. The underlying theoretical results and the algorithm for the TBS method are presented in Section 4. Illustrative examples are presented in Section 5. A comparison between the TBS method and the Block method [6] is presented in Section 6.Our concluding remarks and some perspectives for further research are presented in Section 7.

Polygon Triangulation Literature Review
Several papers deal with the triangulation problem and suggest different solutions.A few of these papers are referred to below (thus, we are able to compare what is presented in these papers to the method that we are about to present).Some of the proposed methods use previously generated triangulations of polygon P b , where b is an integer in the range 2 < b < n, and incorporate them into T n , using memoization.Such an algorithm was presented in [8].
In the Block method [6], it has been observed that each element in T n−1 presents a start of exactly two elements in T n .Hence, 2T n−1 triangulations of P n can be derived recursively with minimal computational costs, while a more complicated process for generating the rest of the T n − 2T n−1 triangulations is required.The main flaw of this process involves the elimination of duplicate triangulations.Memoization and recursion are used to eliminate duplicates in conjunction with a suitable series of relatively complicated calculations.Yet, a certain speedup is achieved compared to the method described in [7].
A novel method for generating triangulations of a convex polygon, which was developed based on planted trivalent binary trees and ballot notations, was presented in [9].

Fundamental Concepts of Symmetry in Convex Polygon Triangulation
A geometrical presentation of polygon triangulations has led to the conclusion that different types of symmetry can be found in them.The number of papers that considered various symmetry properties in (convex) polygon triangulation is presented.
In [7], Hurtado and Noy constructed the graph of triangulations G T (n), establishing the triangulation hierarchy.For that purpose, the authors used a process of splitting the polygon diagonal and introduced a relation of adjacency between triangulations.The adjacent triangles in a triangulation form a quadrilateral, where the common edge of the two triangles is a diagonal of the quadrilateral.So, given the current triangulation, another one can be created by flipping this diagonal, i.e., removing it from the quadrilateral and placing it to connect two different quadrilateral nodes (see Figure 2).Such a diagonal flipping is obviously based on a symmetry property.In [10], the authors considered the set T n of all triangulations of a convex n-gon.Further, they studied some geometric features of a triangulation τ ∈ T n and the degree d i of a vertex v i , i = 0, . . ., n − 1, i.e., the number of diagonals incident to v i .
In [11] a k-dissection of an n-gon was defined as a partition of the n-gon into the k + 1 polygon by k non-crossing diagonals.So, the triangulation of n-gon is its (n − 3)-dissection.Further, the authors dealt with various classes of symmetry dissections and provided enumerating formulas for them.
In [12], the authors noticed and exploited symmetry in the proof of lemma 4.2.Some symmetry properties were observed in [13], where the orbiting triangle method was described.The triangle that contained an ear in the n-gon was orbiting the (n − 1)-gon.
In [14], the authors noted the existence of isomorphic triangulations obtained by reflection and/or rotation and introduced the geometric classification of the convex polygon triangulations.Further, the authors defined and studied the reflectional symmetry of triangulations and, using such research, counted non-isomorphic triangulations of different classes.
The authors of [15] considered symmetry classes of triangulations derived by rotation and reflection (Figure 3).The authors noted that rotations and reflections preserved the number of fans in a triangulation and counted symmetry classes of two-eared triangulations.In [16], the authors counted the number of dissections of an n-gon, when a dissection obtained by rotation, reflection, or both, was considered to be the same as the original one.
In [17], the author enumerated the triangulations of a regular convex polygon according to the number of diagonals parallel to a fixed polygon edge.There f xy (n, k) denoted a number of triangulations of a regular n-gon, which included exactly k diagonals parallel to the edge xy.Noting the symmetry, the author suggests that f xy (n, k) depended only on the value (y − x) mod n and not on the choice of x and y.
In [18], the author investigated small polygons or polygons with a unit diameter, and found the axes of symmetry in the polygons.Centrally symmetric triangulations of convex polygons were used in [19].The authors of [20] also studied the symmetry between triangulations and took it into consideration for counting purposes.In [21], the author observed the symmetry of triangulations by studying the acute polygon triangulations.

The Algorithm
Before exposing core theoretical observations, let us propose some notations.

Definition 1.
Let A = {A 1 , . . ., A m } and B = {B 1 , . . ., B n } be two sets of triangulations.The operation A ⊗ B is defined as Definition 2. Let the notations {v 1 → u 1 , . . ., v m → u m } refer to a substitution mapping of each vertex v j to the corresponding vertex u j , for j = 1, . . ., m, and every other vertex to itself.
The TBS method, which is about to be presented, similar to the Block method [6], uses triangulations of every P b , 2 < b < n, to generate triangulations T n of P n .Obviously, a polygon P n can arise from a polygon P n−1 by adding the vertex n.In the triangulations of P n , the newly added vertex n can be an ear or the endpoint of an internal diagonal.Let T E n denote the set of triangulations of P n that does not have a diagonal through the vertex n (or in which n is an ear).On the other hand, if a triangulation of P n has a diagonal through the vertex n, denoted by δ i,n , we observe two subpolygons P n L,i (resp.
According to this observation, two cases are distinguished.
• Case 1, n is an ear.When vertex n is an ear (cf.[14]), corresponding P n triangulations are generated as T E n := T n−1 ⊗ {{δ 1,n−1 }}, which means appending the diagonal δ 1,n−1 to every triangulation from the set of triangulations T n−1 .
• Case 2, n is an endpoint of an internal diagonal.
The given polygon P n is split in all possible ways through vertex n (using diagonals δ 2,n , . . ., δ n−2,n ).Splitting the polygon P n by means of an arbitrary internal diagonal δ i,n , i ∈ {2, . . ., n − 2} generates the left subpolygon P n L,i and the right subpolygon P n R,i .As noted in Remark 1, there is symmetry in the polygons split by diagonal δ i,n and those split by diagonal δ n−i,n , because they represent the mirror images.Later, the possible differences in such cases will be checked.Such partitions (P n L,i , P n R,i ) are defined as So, consider all partitions (P n L,i , P n R,i ) of P n where P n L,i and P n R,i are defined as in (1).Moreover, in certain cases, a suitable mapping of vertex indices of P b , b < n is needed.Namely, vertex indices appear as the endpoints of internal diagonals, which describe a polygon triangulation.When the vertex n is added, some of the diagonals describing the triangulations of P b can change the index of one or both of its endpoints.
In Case 1, such a mapping is not necessary.But, in Case 2, such a mapping is required.It is necessary to take into account that previously generated triangulations of P i+1 contain the indices from the set {1, . . ., i, i + 1} as the endpoints of their own internal diagonals.Taking into account P n L,i := {1, . . ., i, n}, it can be concluded that the index i + 1 has to be transformed into n whenever it appears.Using the notation introduced by Definition 2, such a transformation can be described as P n L,i := P i+1 {i + 1 → n}.The polygon P n R,i is defined by the indices {i, . . ., n − 1, n}, while previously generated triangulations of P n−i+1 are described by the set of indices {1, . . ., n − i, n − i + 1}. Hence, The triangulation numbers for P n L,i and P n R,i are determined by the corresponding values of the Catalan triangle (6).
Lemma 1. Partition (1) satisfies the following properties: Proof.According to the Catalan number formula and the Catalan triangle construction Formula ( 6), it follows that Finally, the identities complete the proof.
All the elements of T n L,i are necessary for generating T n .However, the repeated triangulations in generating T n R,i must be avoided.Hence, regardless of the mirror symmetry of T n L,i and T n R,i , from one side, and T n L,n−i and T n R,n−i , from the other side, there is a nonsymmetrical behavior between the left and right subpolygons.
Theorem 1.Only P n R,i triangulations that contain the diagonal δ i,n can generate duplicate triangulations in T n .
Proof.The diagonal δ i,n appears as internal diagonal, making a triangulation for P L,i+1 , because we accept all triangulations of P n L,i+1 .Hence, if all triangulations of P n R,i := {i, . . . ,n − 1, n} are accepted, a duplicate triangulation containing the triangle (i, i + 1, n) would appear.To avoid this, consider only triangulations of P n R,i in which the vertex n appears as an ear.These are the triangulations of P n−1 R,i completed by δ i,n−1 .In other words, consider only the first C(n − i − 1, n − i − 1) triangulations of P n R,i .
Theorem 2. The TBS method generates the correct number (C n−2 ) of different P n triangulations.
Proof.By virtue of Case 1, a contribution to the total number of P n triangulations is In Case 2, when P n is split by δ 2,n , P n L,2 := {1, 2, n} is a triangle with a unique trivial triangulation ( (making all triangulations of P n−1 R,2 ).The splitting of P n by arbitrary δ i,n , i > 2 gives P n L,i with T i+1 = C i−1 accepted triangulations of T (P L,i ) combined with because no triangulation in (T n L,i 1 ⊗ {{δ i+1,n }} ⊗ T n R,i 1 ) contains the diagonal δ i 2 ,n .As T 2 = 1, and keeping in mind that we accept T i+1 triangulations from P n L,i and T n−i triangulations from P n R,i , it is possible to obtain Segner's formula: By using collision avoidance, all triangulations are different and their numbers are expected T n = C n−2 , verifying the correctness of our method.
The TBS method is formally described in Algorithm 1.

Algorithm 1 TBS method algorithm
Input: A positive integer n and sets T b , b < n (described by the sets of corresponding internal diagonals δ i,j ).
To estimate the algorithm complexity, let us consider Equations ( 2)-( 5), which contain information about comprised operations ⊗ and →.A set of C n−3 operations ⊗ is used to generate T E n according to (3).Furthermore, one → operation is required for generating T n L,i according to (4).Then, n − i operations → and one ⊗ operation are required to generate T n R,i in (5).In addition, two more ⊗ operations are needed according to (2).Altogether, the number of needed operations is The rapid increase in the required number of operations with smaller values of n is presented in Figure 4.

Illustration of the Method
Example 1 illustrates the operation ⊗ between two sets of internal diagonals, while Example 2 is a stepwise illustration of Algorithm 1.
Example 2. Let us illustrate Algorithm 1 on the hexagon example (P 6 ).Two important cases can be observed.
Case 1: n is an ear.The situation in which n is an ear is illustrated in Figure 5.When the vertex n = 6 is an ear, Step 1 of Algorithm 1 is performed; hence, the whole set T 5 is entirely accepted, appending the diagonal δ 1,5 to each element.In this way, five triangulations of P 6 are derived, as follows: This step is summarized in Table 1.
Table 1.Case 1: n is an ear.
Case 2: n is the endpoint of an internal diagonal.
The polygon P 6 R,3 is a quadrilateral, and by collision avoidance, only the first C(1, 1) = 1 triangulation from T 4 is taken into account; after the vertex index mappings, T 6 R,3 is obtained (Table 4).The following section compares the execution times between the Block method and TBS method.

Numerical Results
The efficiency of polygon triangulation algorithms is reflected in the way they treat the appearance of duplicate triangulations that exponentially increase with the polygon size.The proposed TBS method provides an intuitive and efficient approach for eliminating duplicates by using values from the Catalan triangle.This achievement provides a significant speedup compared to the performance of the original Block method, as shown in Table 6.
Note that the original Block method achieves a certain speedup compared to the Hurtado-Noy method from [7].A detailed numerical comparison of the original Block method and the Hurtado-Noy method is presented in [6].

Conclusions
There is a large group of relatively simple algorithms for generating triangulations of a convex polygon P n .This class of algorithms is based on the main idea that previously generated triangulations for polygon P b , 2 < b < n can be used to generate new ones.However, their main drawback is the generation of duplicate triangulations.The way they avoid or remove duplicates significantly influences their performances.
On the other hand, the TBS method proposed in this paper identifies the situations that lead to duplicate generation and uses the values of the Catalan triangle to determine how many triangulations of polygon P b , 2 < b < n should be accepted.In that way, by negligible computational costs, the generation of any duplicate triangulation is prevented.A natural consequence is a significant speedup compared to the Block method.While facing the issue of duplicate triangulations, we learned how the geometrical symmetry between subpolygons affects triangulation generation and the avoidance of duplicates.
Further research can focus on the polygon splitting of more than two subpolygons and the construction of a more efficient algorithm.
Moreover, knowing that there is a limited number of symmetry classes of polygon triangulations, future research could observe the rotation and reflection operations for producing unique triangulations that are not repeated.The avoidance of duplicates would still be an important issue.The use of Catalan triangle values might be helpful.Finally, an acceptable computational cost of the avoidance of duplicates should at least be as small as in the TBS method.

Figure 1 .
Figure 1.Splitting made by diagonals δ i,n and δ n−i,n produces mirror images.

Figure 3 .
Figure 3. Three symmetry classes of a hexagon.

1 : 4 :
Case 1: n is an ear Read T n−1 triangulations from the input.2: T E n := T n−1 ⊗ {{δ 1,n−1 }}.3: T n := T E n .Case 2: n is a vertex of an internal diagonal 5: for i = 2 to n − 2 do 6: Split polygon P n by δ i,n into two subpolygons P n L,i and P n R,i .7: (a) T n L,i = T (P n L

Figure 4 .
Figure 4. Number of needed operations for a smaller n.

Figure 5 .
Figure 5.The case where n is an ear.

Figure 6 .
Figure 6.The case when n is the vertex of an internal diagonal.

Table 2 .
Vertex index mappings for the polygon P 6 R,2 .

Table 3 .
Vertex index mappings for the polygon P n L,3 .

Table 6 .
The execution times: The Block method vs. TBS method.