Hi,
I have to make 2d triangles from a list of 2d points with a condition: length of any edge can't be longer than a predefined constant.
Something like this:
Do you know any algorithm that can do this? Or any advise?
Thanks!
Hi,
I have to make 2d triangles from a list of 2d points with a condition: length of any edge can't be longer than a predefined constant.
Something like this:
Do you know any algorithm that can do this? Or any advise?
Thanks!
First, generate all possible edges (i.e. connecting a pair of vertices that are closer than the constant). Then when two of them intersect, remove one of them. Repeat this step until there are no intersections.
This solution is quite primitive, it's probably possible to do it faster.
Try Delaunay triangulation, then remove any edges which are too long.
From the above article, you see a link to CGAL's 2D triangulation page.