How to do this with Delaunay Triangulation?

8 次查看(过去 30 天)
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 个评论
John D'Errico
John D'Errico 2021-2-26
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.

请先登录,再进行评论。

回答(2 个)

Bjorn Gustavsson
Bjorn Gustavsson 2021-2-26
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 2021-7-18
You can try alphaShape
https://www.mathworks.com/help/matlab/ref/alphashape.html

类别

Help CenterFile Exchange 中查找有关 Delaunay Triangulation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by