Main Content

triangulation

polyshape の三角形分割

説明

T = triangulation(polyin) は、polyshape オブジェクトの 2 次元 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 で導入