Main Content

triangulation

三角剖分 polyshape

说明

示例

T = triangulation(polyin) 返回 polyshape 对象的二维 triangulation 对象。T 的属性描述构成 polyin 的三角形的顶点和连接情况。有关详细信息,请参阅 triangulation

示例

全部折叠

创建一个多边形并进行三角剖分。

t = 0.05:0.5:2*pi;
x1 = cos(t);
y1 = sin(t);
x2 = 0.5*cos(t);
y2 = 0.5*sin(t);
polyin = polyshape({x1,x2},{y1,y2})
polyin = 
  polyshape with properties:

      Vertices: [27x2 double]
    NumRegions: 1
      NumHoles: 1

plot(polyin)

Figure contains an axes object. The axes object contains an object of type polygon.

T = triangulation(polyin)
T = 
  triangulation with properties:

              Points: [26x2 double]
    ConnectivityList: [26x3 double]

triplot(T)

Figure contains an axes object. The axes object contains an object of type line.

输入参数

全部折叠

输入 polyshape,指定为标量。

数据类型: polyshape

版本历史记录

在 R2017b 中推出

另请参阅

|