1

How can i triangulate between two closed wires in 2D/3D? For the start case how can i triangulate between two convex closed wires in 2D?

I have tried following:

If we have two convex closed wires in 2D we can for each convex curve find the diagonal that connects two most far vertices. Then we can split that curve in the lower and upper part. Now we can separate algorithm in two parts: upper and lower part.

Let's take the upper parts from the both curves. We can make projection on the x-axis like following:

first curve: {x_1, 0}, {x_2, 0}, ...., {x_n, 0}

second curve: {x_1', 2}, {x_2', 2}, ...., {x_m', 2}

Notice the fixed y-axis. We place fixed y-axis for both projection and we will return the regular y-coordinate after applying triangulation.

Now we can apply some triangulation algorithm let's say delaunay. After that as said above we can return the regular y-coordinate from map that we generate before projection.

The main flaw in this algorithm i think is the boundaries vertices. On the next picture can be seen the problem. We can see that the boundaries vertex have a lot of connection:

the link to the image 1

How can i solve this flaw and also is there the better way to triangulate between two curves for start case in the 2D convex closed curves?

The second thinking is to densify the numbers of points on both curves and to make the numbers same. Then to start from arbitary vertex from the first curve and connect to the closest vertex on the second curve (step 1.). Then to go vertex by vertex and make triangles like on the following image:

the link to the image 2

Is this okay way?

UPDATE: I managed to do following for the 2D curve

  1. First make the number of both curves same
  2. Then for every point from the one curves connect to the closest one on the second curve
  3. There can be polygons like this: the link to the image 3
  4. We can align them in the same line like on the picture and do the triangulation (delaunay). We can see that no points from the same line connects except the neighbour ones: the link to the image 4

First make the number of the both curves same.

Spektre
  • 49,595
  • 11
  • 110
  • 380
  • see very similar QA: [How can I connect two parallel 2d polygons to create a seamless 3d mesh?](https://stackoverflow.com/a/25076849/2521214) – Spektre Aug 07 '22 at 05:37

0 Answers0