From: Damian Sheehy on
"Chris Middleton" wrote

> My collegues and I have developed software within Matlab which uses the
> (soon to be obsolete) function delaunay to create meshes.

This statement is incorrect, the DELAUNAY function is not scheduled to be removed from a future release. Perhaps you are referring to the TSEARCH and DSEARCH functions.

The TSEARCH and DSEARCH functions are designed to perform a search on Delaunay triangulations that are created in MATLAB via the DELAUNAY function. The triangulation must be a convex Delaunay triangulation which has no internal holes. The TSEARCH and DSEARCH functions do not test these preconditions as it is expensive to do so. Moreover, the functions may fail if these if these conditions are not met. To safeguard against inappropriate use, the new DelaunayTri/pointLocation and nearestNeighbor functions design out this vulnerability. The functions can only be applied to a triangulation created using DelaunayTri.

You can faithfully recreate your 2D triangulation using DelaunayTri by constraining the edges of the triangulation. You can then perform a pointLocation search on this constrained Delaunay triangulation.

For more information why the TSEARCH and DSEARCH functions require a valid Delaunay triangulation, refer to the following paper (see figure 5).

"Walking in a Triangulation", Devillers, Pion, Teillaud. Internat. J. Found. Comput. Sci., 13:181–199, 2002.


Damian Sheehy
MathWorks