I assume that you first need a general triangulation, and then fix everything that is not Delaunay-legal?
A very bad triangulation algorithm (with an incorrect angle vector) looks something like this:
(i) Get the convex hull of the point cloud (ii) Connect the random point CH (itโs convenient to use the first) with all the other points of CH (except, of course, the next and previous, with which it already forms an edge).
(iiiA) For any other point on the plane, if the point lies in a triangle, draw three triangles from it, connecting the point with the three vertices of the triangle in which it lies. (iiiB) If it lies on an edge (a little unlikely for 100 points, I think you can skip it), connect it to the other two vertices of the four-way in which it lies.
I think you could start with this. The cloud will be fully triangulated, but perhaps more than half of the edges will be illegal. Then you can continue to correct (flip) the necessary edges.
If you find problems with its implementation, I can provide sample code to get you started. Now keep in mind that the return value of the algorithm would be convenient to be the set / vector of triangles; this way you can manipulate them and change your color individually.
trmag source share