How to triangulate between two closed curves?
Posted: Sat Aug 06, 2022 11:57 am
Maybe this is an off topic for this thread.
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][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][2]
Is this okay way?
[1]: https://i.stack.imgur.com/MKe3u.png
[2]: https://i.stack.imgur.com/pEB1B.png
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][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][2]
Is this okay way?
[1]: https://i.stack.imgur.com/MKe3u.png
[2]: https://i.stack.imgur.com/pEB1B.png