Main Content

inOutStatus

(非推奨) 2 次元制約付き Delaunay 三角形分割における三角形のステータス

inOutStatus(DelaunayTri) は推奨されません。代わりに isInterior(delaunayTriangulation) を使用してください。

DelaunayTri は推奨されません。代わりに delaunayTriangulation を使用してください。

説明

IN = inOutStatus(DT) は幾何学的領域の 2 次元制約付き Delaunay 三角形分割において三角形の内/外の状態を返します。三角形分割内の i 番目の三角形は、IN(i) = 1 の場合は領域内部として、そうでない場合は三角形の外側として分類されます。

メモ

inOutStatus は、2 次元制約付き Delaunay 三角形分割に対してのみ有効です。これは、課せられたエッジの制約が閉じた幾何学的領域を囲むことを表します。

すべて折りたたむ

正方形の穴をもつ正方形からなる幾何学的な領域を作成します。

outerprofile = [-5 -5; -3 -5; -1 -5; 1 -5; 3 -5; ...
 5 -5; 5 -3; 5 -1; 5 1; 5 3;...
 5 5; 3 5; 1 5; -1 5; -3 5; ...
 -5 5; -5 3; -5 1; -5 -1; -5 -3; ];
innerprofile = outerprofile.*0.5;
profile = [outerprofile; innerprofile];
outercons = [(1:19)' (2:20)'; 20 1;];
innercons = [(21:39)' (22:40)'; 40 21];
edgeconstraints = [outercons; innercons];

領域の制約付き Delaunay 三角形分割を作成します。

dt = DelaunayTri(profile,edgeconstraints);

2 つのプロットを作成します。一方では領域に対する内側と外側の三角形を表示し、もう一方では inOutStatus を使用して内側の三角形のみをプロットします。

subplot(1,2,1)
triplot(dt)
hold on
plot(dt.X(outercons',1),dt.X(outercons',2),...
     '-r','LineWidth',2) 
plot(dt.X(innercons',1),dt.X(innercons',2),...
     '-r','LineWidth',2)
axis equal
hold off
subplot(1,2,2)
inside = inOutStatus(dt);
triplot(dt(inside,:),dt.X(:,1),dt.X(:,2))
hold on
plot(dt.X(outercons',1),dt.X(outercons',2),...
     '-r','LineWidth',2)
plot(dt.X(innercons',1),dt.X(innercons',2),...
     '-r','LineWidth',2);
axis equal
hold off

Figure contains 2 axes objects. Axes object 1 contains 3 objects of type line. Axes object 2 contains 3 objects of type line.

入力引数

すべて折りたたむ

Delaunay 三角形分割の表現。DelaunayTri オブジェクトとして指定します。

ヒント

  • inOutStatus は、境界の制約が交差するかオーバーラップする場合に、不正確な結果または矛盾する結果を生成することがあります。この動作を回避するには、1 つ以上の閉じた境界を形成する、交差もオーバーラップもしない複数の制約を使用します。境界の制約が、交差もオーバーラップもせずに入れ子にされている場合、境界全体で内部と外部のステータスが交互に切り替わります。

バージョン履歴

R2009a で導入