Dynamic simple polygonal triangulation

As in the title of the question, how to triangulate a simple polygon that grows dynamically, say, whenever a new vertex is added dynamically by a user or computer, the polygon must again receive triangulation. Therefore, instead of starting some triangulation algorithm after adding each new vertex, is there any smart / efficient (possibly simple to implement) method for each new input that must take time <= O (n) to triangulate the polygon. The added vertex will be adjacent to the first and last vertices of the current polygon.

+4
source share
2 answers

When you insert a new vertex and replace the edge with two, the resulting triangle can overlap several triangulation triangles. The superimposed triangles form a subpolygon. Draw the outline of this polygon and insert a new vertex. Then edit the updated subpolygon.

enter image description here

I assume that overlapping triangles can be effectively found by examining neighboring starting triangles, recursively and checking them for overlapping. The contour of the subpolygon is formed by edges not separated by two triangles.

+2
source

I assume that the polygon is supplemented at each step by adding a vertex C, deleting the segment AB and adding segments AC and CB. I also do not accept any degeneration.

ABC ( "" ), ABC .

ABD . C , ABD BDC DAC. , AD BD. ABD , C () BD. BDC DAC, .

, , (). .

+1

Source: https://habr.com/ru/post/1621944/


All Articles