vertexNormal
三角剖分顶点法向
说明
示例
立方体的面
计算并绘制三角剖分的顶点的单位法向量。
创建一个三维三角剖分以表示立方体的体积。
[X,Y,Z] = meshgrid(1:4); x = X(:); y = Y(:); z = Z(:); DT = delaunayTriangulation(x,y,z);
对立方体的边界进行三角剖分。
[Tfb,Xfb] = freeBoundary(DT); TR = triangulation(Tfb,Xfb);
查找三角形顶点的单位法向量。
V = vertexNormal(TR);
绘制三角剖分曲面和单位法向量。
trisurf(TR,'FaceColor',[0.8 0.8 1.0]); axis equal hold on quiver3(Xfb(:,1),Xfb(:,2),Xfb(:,3), ... V(:,1),V(:,2),V(:,3),0.5,'Color','b');
输入参数
TR
— 三角剖分表示法
标量三角剖分对象
仅用于二维曲面三角剖分的三角剖分表示,指定为标量 triangulation
或 delaunayTriangulation
对象。
数据类型: triangulation
| delaunayTriangulation
ID
— 顶点 ID
标量 | 列向量
顶点 ID,指定为标量或列向量,其元素对应于三角剖分对象中的单个顶点。每个顶点的 ID 是 Points
属性中顶点的对应行号。
数据类型: double
扩展功能
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
版本历史记录
在 R2013a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)