circumcenter
三角形或四面体的外心
说明
示例
计算二维三角剖分的外心
加载二维三角剖分数据并创建三角剖分表示。
load trimesh2d
TR = triangulation(tri,x,y);
计算 TR
中每个三角形的外心。
C = circumcenter(TR);
以红色绘制三角剖分和外心。外心的 坐标包含在 C
的第一列中,对应的 坐标包含在第二列中。
triplot(TR) axis([-100 400 -50 350]) hold on plot(C(:,1),C(:,2),'r.') hold off
外接球的半径
为一组点创建德劳内三角剖分。
rng default;
P = rand(10,3);
TR = delaunayTriangulation(P);
计算 TR
中前五个四面体的外心及其外接球的半径。
[C,r] = circumcenter(TR,[1:5]')
C = 5×3
0.5265 0.0860 1.1919
0.1626 0.3794 2.3048
0.3089 0.1067 -0.3349
0.5708 0.4461 0.3751
0.2805 0.7532 0.5855
r = 5×1
0.6129
1.5666
1.1135
0.4706
0.3670
输入参数
TR
— 三角剖分表示法
标量三角剖分对象
三角剖分表示法,指定为标量 triangulation
或 delaunayTriangulation
对象。
数据类型: triangulation
| delaunayTriangulation
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)