0
votes

In my program, I want to implement the following features:

  1. Users draw a closed curve using mouse, and this curve is actually a set of point
  2. Given a closed curve drawn by users, this program would create equilateral triangles inside this curve to get a 2d mesh.

Just like this image, the first one is the closed curve drawn by user. Then I want to create equilateral triangles inside this curve(the second one), and move those points which are not in these created triangles's vertex to get a 2d mesh(the third one).

I've looked up CGAL which has a lot of mesh generation algorithm, but I can't find a way to do what I need. So does anyone know how I could achieve my goal.

1

1 Answers

0
votes

If your curve is closed then you can use the 2D meshing package. A simple example is here. Here is an example I generated using CGAL embedded into the Ipe software.

enter image description here