incenter
三角剖分元素的内心
说明
示例
计算二维德劳内三角剖分的内心
创建二维德劳内三角剖分。
x = [0 1 1 0 0.5]'; y = [0 0 1 1 0.5]'; TR = delaunayTriangulation(x,y);
计算三角形的内心。
C = incenter(TR);
绘制三角形和内心。
triplot(TR) axis equal axis([-0.2 1.2 -0.2 1.2]) hold on plot(C(:,1),C(:,2),'*r')
三维三角剖分
加载三维三角剖分。
load tetmesh
计算三角剖分中前五个四面体的内心坐标,以及其内切球的半径。
TR = triangulation(tet,X); [C,r] = incenter(TR,[1:5]')
C = 5×3
-6.1083 -31.0234 8.1439
-2.1439 -31.0283 5.8742
-1.9555 -31.9463 7.4112
-4.3019 -30.8460 10.5169
-3.1596 -29.3642 6.1851
r = 5×1
0.7528
0.9125
0.8430
0.6997
0.7558
输入参数
TR
— 三角剖分表示法
标量三角剖分对象
三角剖分表示法,指定为标量 triangulation
或 delaunayTriangulation
对象。
数据类型: triangulation
| delaunayTriangulation
ID
— 三角形或四面体 ID
标量 | 列向量
三角形或四面体 ID,指定为标量或列向量,其每个元素对应于三角剖分对象中的单个三角形或四面体。每个三角形或四面体的标识号是 ConnectivityList
属性的对应行号。
数据类型: double
输出参量
C
— 内心
矩阵
内心,以矩阵形式返回,其各行为内心的坐标。
数据类型: double
r
— 半径
向量
内切圆或内切球的半径,以向量形式返回。
数据类型: double
扩展功能
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
版本历史记录
在 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)