Abstract 1 Introduction 2 Algorithms 3 Results References

Incremental Algorithm and Local Search for Minimum Non-Obtuse Triangulations

Taehoon Ahn ORCID National Institute for Mathematical Sciences, Daejeon, South Korea Jaegun Lee ORCID Department of Computer Science and Engineering, Pohang University of Science and Technology, Pohang, Korea Byeonguk Kang ORCID Department of Computer Science and Engineering, Pohang University of Science and Technology, Pohang, Korea Hwi Kim ORCID Department of Computer Science and Engineering, Pohang University of Science and Technology, Pohang, Korea
Abstract

In this year’s CG challenge, the task was to compute a non-obtuse triangulation of given planar regions while minimizing the number of Steiner points. Our team (Gwamegi) used two approaches. The first approach incrementally adds Steiner points on the grid defined by the input points in the planar regions, while maintaining a Delaunay triangulation. The second approach is an iterated local search, which runs insertion and deletion steps alternatingly. In the insertion step, we add a new Steiner point inside a maximal convex subpolygon in the current triangulation. In the deletion step, we remove a number of Steiner points packed in a small region. We use both our approaches to obtain non-obtuse triangulations for all 150 instances. We use our second approach to reduce the number of Steiner points from the non-obtuse triangulations. We have successfully computed non-obtuse triangulations using a sufficiently small number of Steiner points for all instances.

Keywords and phrases:
Triangulation, Non-obtuse triangle, Steiner point, Incremental algorithm, Local search
Category:
CG Challenge
Copyright and License:
[Uncaptioned image] © Taehoon Ahn, Jaegun Lee, Byeonguk Kang, and Hwi Kim; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Computational geometry
Supplementary Material:
Software  (Source Code): https://github.com/slothetic/CG2025
  archived at Software Heritage Logo swh:1:dir:e8f3167e99fdf8a88291190ad292e15703bb3c03
Acknowledgements:
We would like to thank the challenge organizers and other competitors for their effort on the event. We would also like to thank Hee-Kap Ahn for providing the computational resources of the Algorithms laboratory of POSTECH.
Funding:
Taehoon Ahn was supported by the National Institute for Mathematical Sciences (NIMS) grant funded by the Korea government (MSIT) (No. NIMS-B25910000). Jaegun Lee, Byeonguk Kang, and Hwi Kim were supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. RS-2023-00219980).
Editors:
Oswin Aichholzer and Haitao Wang

1 Introduction

Triangulation is a well-studied topic in computational geometry. It is a subdivision of a planar geometric object into triangles. Such an object is a point set possibly with constraint edges [7, 13], a polygon [10, 11], or a planar straight-line graph (PSLG) [6]. In this year’s CG challenge, the task was to compute a non-obtuse triangulation of given PSLGs minimizing the number of Steiner points. This paper introduces the approaches of our team (Gwamegi) for the challenge. See also the survey [9] by the challenge organizers and another team’s approach [1].

Finding triangulations under various optimality criteria has been well studied, including max-min angle triangulations (called Delaunay triangulations) [4, 12], high aspect ratio triangulations [14], and min-sum side length triangulations (called minimum weight triangulations) [3, 5]. Among them, Delaunay triangulation is the most popular with its various application areas such as mesh generation and path planning [2, 15]. Note that any non-obtuse triangulation (every triangle is acute or right) is Delaunay.

The challenge problem can be formulated as follows.

Problem 1.

Given a problem instance I=(V,R,E), where V is a set of points in 2, R is a simple polygon to be triangulated whose vertex set is a subset of V, and E is the set of constraint edges each connecting two distinct points in V, find a minimum-sized set SR of Steiner points and a non-obtuse triangulation of R with vertex set VS and respecting E.

There were 150 instances, five types in total. Figure 1 illustrates the instance types.

Figure 1: Example instance per type. Blue segments form the boundary of R. Red segments are constraint edges E. Type (a) ortho, (b) simple-polygon, (c) point-set, (d) simple-polygon-exterior, and (e) simple-polygon-exterior-20.

2 Algorithms

We used two approaches to compute non-obtuse triangulations: (1) incremental algorithm on a grid and (2) iterated local search. For all instances of type ortho and some instances of type point-set and type simple-polygon, we used our first approach. For the other instances, we used our second approach. After computing non-obtuse triangulations for all instances, we again used our second approach to reduce the number of Steiner points for each of them.

Let DT(V,R,E) be a Delaunay triangulation of R with point set V, respecting E. If there is more than one such Delaunay triangulation, we let DT(V,R,E) to be one with the minimum number of obtuse triangles. In our approaches, we maintain DT(VS,R,E) while updating the set S of Steiner points. We say that S is a feasible solution of I=(V,R,E) if DT(VS,R,E) is a non-obtuse triangulation.

2.1 Incremental algorithm on a grid

We introduce our incremental algorithm. It was mostly used for instances of type ortho. For a type ortho instance I=(V,R,E), R is an orthogonal polygon (any edge is vertical or horizontal), V is the vertex set of R, and E=. Define x(p) and y(p) as the x- and y-coordinate of a point p2, respectively. Let X={x(p)pV} and Y={y(p)pV}, and let SG={pRx(p)X,y(p)Y} be the grid points of I. The set SGV is an obvious feasible solution of I. However, its size can be Ω(|V|2). In the following, we show how to find a moderately-sized feasible solution SSG.

Starting with S=, we compute DT(VS,R,E) in each step. If it is non-obtuse, S is a feasible solution, and we are done. Otherwise, we pick a random obtuse triangle in DT(VS,R,E). Let p be its obtuse vertex. The angle interval defined by p contains at least one of the four axis-aligned directions from p: +x, +y, x and y. Without loss of generality, assume that it contains the +y-direction as in Figure 2, and let r be the ray emanating from p and going towards the +y-direction. Let q be a point moving from p along r. During the movement of q, if y(q)=y(v) for a vertex v of the triangle containing q and qp, it stops, and we add q to S. It is easy to see that q always stops before moving out of R. We repeat the procedure until S becomes feasible.

Figure 2: Point q moves from p along r. It stops when y(q)=y(v) for a vertex v of the triangle containing q.

Table 1 shows that the above algorithm uses no more Steiner points than the size of V, for type ortho instances.

Table 1: |V| is the size of the instances. |S| is the average number of Steiner points added, when we executed the algorithm five times for each instance of type ortho.
|V| 10 20 40 60 80 100 150 250
|S| 3.0 9.3 23.6 38.4 45.4 74.6 125.2 184.9

We can apply the algorithm to some instances of type point-set and simple-polygon by invoking MakeNonObtuseBoundary procedure whenever we add a new Steiner point. MakeNonObtuseBoundary finds an obtuse triangle from DT(VS,R,E) having its hypotenuse on the boundary of R, and adds the projection from the opposite vertex onto the hypotenuse to S. It repeats until there is no such obtuse triangle. See Figure 3.

Figure 3: (a) Instance point-set_60_27bc003d of type point-set and (b) its feasible solution obtained by our incremental algorithm.

2.2 Iterated local search

We introduce our local search algorithm. Starting from S:=, the algorithm runs insertion steps and deletion steps alternatingly to update S.

Unlike the incremental algorithm in Section 2.1, our local search algorithm may place non-grid Steiner points in the insertion step. We first observe the following. Let I=(V,R,E) be an instance. Consider a feasible solution S of I. Fix a point sS, and let T(s) be the set of triangles in DT(VS,R,E) with s as a vertex. Since all triangles in T(s) are non-obtuse, their union is a convex polygon P. The interior of P does not contain any constraint edge if and only if s does not lie on any constraint edge. See Figure 4(a, b). If s lies on some eE, then Pe is an edge connecting two vertices of P, and P does not contain any other constraint edge. See Figure 4(c). Based on the observation, we consider the following.

Figure 4: Union P of T(s). Black points are the given points in V, and red points are the Steiner points. (a) s lies in the interior of P and s does not lie on any eE. (b) s lies on the boundary of P. (c) s lies on some eE.
Problem 2.

Given a convex polygon P, find a point sP such that spq is non-obtuse for any edge pq¯ of P. Additionally, if a diagonal e of P is given, s must lie on e.

Fix an edge pq¯ of P and consider the triangle spq for a point sP. We have spqπ/2 and sqpπ/2 if and only if s lies in the strip L perpendicular to pq¯, with each bounding line going through p and q, respectively. We have psqπ/2 if and only if s lies outside the disk D having pq¯ as its diameter. See Figure 5(a). Summing up, spq is non-obtuse if and only if s lies in (pq¯):=LD, and sP is a solution of Problem 2 if and only if it lies in the intersection of (pq¯)’s for every edge pq¯ of P. See Figure 5(b). A similar subprocedure was previously introduced by Erten and Üngör [8], and it was also used in the team Naughty NOTers’ approach [1], named as polygonCenter. If a diagonal e is given additionally as in the problem statement, we check if such intersection of (pq¯)’s intersects e. We solve its generalized version, Problem 3, defined as follows, because there may be no solution for Problem 2. Let VP be the set of vertices of P, and let EP{ePeE}.

Figure 5: (a) (pq¯)P. (b) The intersection of (pq¯)’s for every edge pq¯ of P.
Problem 3.

Given a convex polygon P and a set of constraint edges EP in P, find a point sP minimizing the number of obtuse triangles in DT(VP{s},P,EP).

To solve Problem 3, we need to define the following sets.

  • 𝒟: the set of circles, each having an edge of P as its diameter.

  • : the set of lines, each perpendicular to an edge of P and going through one of its endpoints.

  • 𝒞: the set of circumcircles of the triangles in DT(VP,P,EP).

Consider the arrangement 𝒜 of 𝒟𝒞EP in P. For each cell of 𝒜, the number of obtuse triangles is the same. Thus we aim to find a vertex v of 𝒜 minimizing the number of obtuse triangles in DT(VP{v},P,EP).

Since we are using exact arithmetic, it consumes too much time and space to exactly compute vertices of 𝒜. So instead, we approximate each point with another point at close range with simpler coordinates. For each vertex of 𝒜 that does not lie on any constraint edge, we approximate both its x- and y-coordinate using quantized values represented as iq for some integer i and a fixed parameter q. For each vertex of 𝒜 lying on a constraint edge, we approximate only one of its coordinates with the quantized values, to ensure that the approximated point also lies on the constraint edge. We start with q=1 and make it smaller whenever the algorithm gets stuck. From the approximated points, we choose one minimizing the number of obtuse triangles. If there are multiple such points, we choose a point at random. Let AddPoint(P) be the corresponding subprocedure.

In the insertion step, we first compute DT(VS,R,E). If it is non-obtuse, we are done. Otherwise, we pick an obtuse triangle t in DT(VS,R,E) at random. Then we compute a maximal convex polygon P which is the union of some triangles in DT(VS,R,E) containing t. This is done by maintaining a convex polygon P, starting from P=t and adding triangles incident to P until there is no triangle t such that Pt is convex. Finally, we add a point to S obtained from AddPoint(P). During each insertion step, we repeat the above several times.

In the deletion step, we randomly choose a Steiner point p, and remove every Steiner point (including p itself) within distance rd where r is a parameter that increases as time goes by, and d is the distance between p and its closest Steiner point.

Figure 6: (a) Given a Steiner point p, we remove every Steiner point whose distance from p is at most rd, for some parameter r and the distance d between p and its closest Steiner point q. (b) Applying a deletion step and an insertion step in order reduces the number of Steiner points by two.

We store the current solution as the best solution whenever the number of obtuse triangles decreases, or the number of Steiner points decreases while the number of obtuse triangles remains the same. In each iteration, we start from the best solution and apply the insertion and the deletion steps alternatingly. Figure 6(a) illustrates a deletion step, and Figure 6(b) illustrates a non-obtuse solution obtained by running an insertion step afterwards.

3 Results

We implemented our algorithms in Python 3. We used two servers: (i) 4.40GHz Intel Core i5 12400F CPU with 32GB RAM, and (ii) 4.70GHz AMD Ryzen 9 7900 CPU with 32GB RAM.

We now discuss the results. We have found non-obtuse triangulation for all 150 instances. We ranked first on 34 instances including 4 exclusive ones, see Figure 7. We ranked second in almost all the other instances, including 35 instances where we used only one more Steiner point than the best solution. As a result, we ranked second among 19 teams, and reached the top among the junior teams.

Figure 7: Our exclusive best solutions: (a) point-set_10_f999dc7f, (b) simple-polygon_80_7b8f6c4c, (c) simple-polygon-exterior_10_a5f0f2fc, and (d) simple-polygon-exterior_20_92dcd467.

We analyze our results by the types and the sizes of the instances. We achieved the highest average score for instances of ortho types. See Figure 8(a). We got higher scores for smaller instances than for the larger instances. See Figure 8(b).

Figure 8: Average score compared with Naughty NOTers [1] and with top four teams (Naughty NOTers, Gwamegi, KITriangle, and Obtuse Terminators). We write ORTHO for ortho type instances, PS for point-set type instances, SP for simple-polygon type instances, SPE for simple-polygon-exterior type instances, and SPE-20 for simple-polygon-exterior-20 type instances. (a) Average score per input type. (b) Average score per number of input points.

References

  • [1] M. Abrahamsen, F. Brunck, J. Conradi, B. Kolbe, and A. Nusser. Computing non-obtuse triangulations with few Steiner points. In 41st International Symposium on Computational Geometry (SoCG 2025), SoCG 2025, 2025. doi:10.4230/LIPIcs.SoCG.2025.79.
  • [2] S. J. Anderson, S. B. Karumanchi, and K. Iagnemma. Constraint-based planning and control for safe, semi-autonomous operation of vehicles. In IEEE Intelligent Vehicles Symposium, pages 383–388, 2012. doi:10.1109/IVS.2012.6232153.
  • [3] F. Aurenhammer and Y.-F. Xu. Optimal triangulations. In Encyclopedia of Optimization, Second Edition. Springer, 2009. doi:10.1007/978-0-387-74759-0_475.
  • [4] M. de Berg, O. Cheong, M. van Kreveld, and M. Overmars. Computational Geometry: Algorithms and Applications. Springer, 3rd edition, 2008. doi:10.1007/978-3-540-77974-2.
  • [5] M. Bern and D. Eppstein. Mesh generation and optimal triangulation. In Computing in Euclidean Geometry. Second Edition. World Scientific, 1995. doi:10.1142/9789812831699_0003.
  • [6] C. J. Bishop. Nonobtuse triangulations of PSLGs. Discrete & Computational Geometry, 56:43–92, 2016. doi:10.1007/s00454-016-9772-8.
  • [7] L. P. Chew. Constrained delaunay triangulations. Algorithmica, 4(1):97–108, 1989. doi:10.1007/BF01553881.
  • [8] Hale Erten and Alper Üngör. Triangulations with locally optimal steiner points. In Proceedings of the Fifth Eurographics Symposium on Geometry Processing, SGP 2007, pages 143–152. Eurographics Association, 2007. doi:10.2312/SGP/SGP07/143-152.
  • [9] S. P. Fekete, P. Keldenich, D. Krupke, and S. Schirra. Minimum non-obtuse triangulations: The CG:SHOP challenge 2025, 2025. doi:10.48550/arXiv.2504.04412.
  • [10] P. D. Gilbert. New results on planar triangulations. Coordinated Science Laboratory Report, 1979.
  • [11] G. T. Klincsek. Minimal triangulations of polygonal domains. In Annals of Discrete Mathematics, volume 9, pages 121–123. Elsevier, 1980. doi:10.1016/S0167-5060(08)70044-X.
  • [12] D. T. Lee and B. J. Schachter. Two algorithms for constructing a Delaunay triangulation. International Journal of Computer & Information Sciences, 9(3):219–242, 1980. doi:10.1007/BF00977785.
  • [13] W. Mulzer and G. Rote. Minimum-weight triangulation is NP-hard. Journal of the ACM, 55(2):1–29, 2008. doi:10.1145/1346330.1346336.
  • [14] M.-A. K. Posenau. Approaches to high aspect ratio triangulations. In Proceedings of the 5th Canadian Conference on Computational Geometry, CCCG 1993, pages 30–35, 1993.
  • [15] J. R. Shewchuk. Delaunay refinement algorithms for triangular mesh generation. Computational Geometry, 22(1):21–74, 2002. doi:10.1016/S0925-7721(01)00047-5.