Dear Community Members,
I’ve been working recently on Delaunay triangulation implementation in cpp. While I’ve algorithm that works.. it’s terribly slow (100 objects are computed in about ~16 seconds).
Algorithm is basing on brute force approach. Given a finite set of points:
- I’m iterating through each points three times, checking, if I can
create a triangle from those points; - From those three points, I’m creating circle, that goes through those points;
- I’m iterating through whole set of points fourth time, checking if created circle, contains any point different from those three mentioned above.
- If no additional points are within circle, I assume that triangle created from those three points is valid.
Like I mentioned, algorithm is direct implementation of on Delaunay triangulation described here: https://en.wikipedia.org/wiki/Delaunay_triangulation. It’s working “flawlessly” but its slow.
Any ideas/suggestions about logic that could speed it up (if possible, without changing logic entirely)?