How to do this with Delaunay Triangulation?

I have X_0, Y_0 coordinates as column vectors and they can be plotted like in the following figure:
I am trying to create a Delaunay Triangulation with
DT = delaunayTriangulation(X_0,Y_0);
figure(1)
triplot(DT,'.-',"LineWidth",2,"MarkerSize",20);
and the result is the following:
As you can see there are many unnecessary lines and triangles in the circled area. What can I do to not have triangles in that area?

1 comentario

John D'Errico
John D'Errico el 26 de Feb. de 2021
What can you do? Don't use a delaunay triangulation. A delaunaytriangulation will result in a triangulation of the convex hull of the data. Those extra edges you see are a consequence of that.
You might try using a polyshape to describe the boundary of the region, as a non-convex polygon. Now use the triangulation method to form a triangulation of the domain.
Or, you might decide to form a constrained triangulation, where you force delaunayTriangulation to use specific edges. The result will still be convex. But now you can go in and delete the triangles with long edges.

Iniciar sesión para comentar.

Respuestas (2)

Bjorn Gustavsson
Bjorn Gustavsson el 26 de Feb. de 2021

0 votos

You'll have to go through DT.ConnectivityList and remove the triangles you don't like. The function returns a convex set of triangles so the triangulation you got is what's to be expected. You might also automate this by checking the side-lengths of the triangles and discard those that have to long sides, if that's what you prefer.
HTH
YISONG PENG
YISONG PENG el 18 de Jul. de 2021

0 votos

You can try alphaShape
https://www.mathworks.com/help/matlab/ref/alphashape.html

Categorías

Preguntada:

el 26 de Feb. de 2021

Respondida:

el 18 de Jul. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by