开发者

matlab: triangulate point set

开发者 https://www.devze.com 2023-03-14 10:30 出处:网络
Given a point set (i.e a 3XN array of vertices), how can I triangulate it using matlab? Assuming the point set does represent some surface of an object, and does n开发者_如何学编程ot contain any noise

Given a point set (i.e a 3XN array of vertices), how can I triangulate it using matlab? Assuming the point set does represent some surface of an object, and does n开发者_如何学编程ot contain any noise.


EDIT: The chosen answer gives a way to create the tetrahedrons of a mesh. I was looking for triangulation; for my specific case of a convex shape, the convex hull (using convhulln as suggested in the answer's comments) was enough.


To create a Delaunay triangulation, you can use the class DELAUNAYTRI:

You create a triangulation object by calling

DT = DelaunayTri(coordinates);

where coordinates is a N-by-3 (or 2) array of vertex coordinates.

To access the triangulation, call

tri = DT.triangulation;

To plot, call e.g.

patch('Vertices',DT.X,'Faces',DT.triangulation) 


use delaunay3 and convert the tetrahedral mesh into a triangular one

http://www.mathworks.com/matlabcentral/fileexchange/5355-toolbox-graph/content/toolbox_graph/tet2tri.m

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号