matlab实现网格数据的规则三角剖分

收录时间:2018-12-06
资源分类:Matlab 工具:MATLAB 7.4 (R2007a)

matlab实现网格数据的规则三角剖分

 

mesh2tri

Converts a regular mesh defined by X,Y and Z into a regular triangulation. The output is patch data (triangles) in the faces “F” and vertices “V” format. The quadrilateral mesh faces are converted to triangles by splitting the faces into triangles according to the setting tri_type:

tri_type ='f' -> forward slash division of quadrilateral

tri_type ='b' -> back slash division of quadrilateral

tri_type ='x' -> Cross division of quadrilateral

The output coordinates "V" are in the form of V=[X(:),Y(:),Z(:)];

For forward and back slash subdivision no extra coordinates are introduced and therefore the original meshgrid formatted coordinates can still be used for plotting, see examples below. For cross division extra points are created at the centre of each quadrilateral face using the mean of the input coordinates. The extra coordinates are the last prod(size(X)-1) points (e.g. V((numel(X)+1):end,:) ) and can therefore be replaced by interpolated coordinates if desired, see example.

文件下载列表
mesh2tri.zip (2.11KB)  
附件内容(只显示2中的1个)
mesh2tri.m  
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备14040384号