Search code examples
algorithmmatlabgeometrycomputational-geometrydelaunay

Efficient methods of modifying a Delaunay triangulation


MATLAB states on their website:

It is more efficient to edit a delaunayTriangulation to make minor modifications as opposed to recreating a new delaunayTriangulation from scratch

Are there any algorithms for this?

If I have 1000 points and move 3 of them to new locations, would the best method be to remove them and reinsert them, or is there a better way?


Solution

  • There's a whole family of algorithms for constructing a Delaunay triangulation by inserting points one at a time. And there's a pretty good algorithm for removing points described by Devillers, O. (2002). "On deletion in Delaunay triangulations", International Journal of Computational Geometry * Applications 12.3. You should be able to find a couple of different versions of Devillers' article on the web.

    Since you're working in MATLAB, this won't help you much but I have implemented Devillers' algorithm in Java and it works quite well. If you have an API that supports modifying an existing triangulation, then removing 3 points and then inserting them someplace else in the mesh should happen so fast that it would be hard to measure the time required for the operation. Of course, 1000 vertices is a pretty small triangulation, and the time required to simply rebuild the mesh should also be quite small. So unless you are doing that many, many times, it should be reasonable to simply rebuild the mesh each time you need to change its content.

    If you would like to see a Java-based implementation of an incremental Delaunay triangle implementation, you can find one at https://github.com/gwlucastrig/Tinfour. I've written up some notes on the implementation details and posted them at http://gwlucastrig.github.io/Tinfour/doc/TinfourAlgorithmsAndDataElements.pdf