mesh2tri

版本 1.2.0.0 (2.2 KB) 作者: Kevin Moerman
Creates regular triangulation of meshgrid data
2.3K 次下载
更新时间 2011/4/5

查看许可证

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.

引用格式

Kevin Moerman (2024). mesh2tri (https://www.mathworks.com/matlabcentral/fileexchange/28327-mesh2tri), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.2.0.0

Fix of face order

1.1.0.0

Updated the vertex order for the triangles so that they are compatible with functions such as PDEGRAD

1.0.0.0