edgeAttachments
指定エッジに接続している三角形または四面体
説明
例
2 次元 Delaunay 三角形分割
Delaunay 三角形分割を作成してプロットします。
x = [0 1 1 0 0.5]'; y = [0 0 1 1 0.5]'; TR = delaunayTriangulation(x,y); triplot(TR)
始点 (0,0) と終点 (0.5,0.5) により定義されるエッジに接する三角形の ID を計算します。これらの点の頂点 ID はそれぞれ 1 と 5 です。
ID = edgeAttachments(TR,1,5); ID{:}
ans = 1×2
4 1
ConnectivityList
プロパティは、各三角形に属する頂点を示します。4 番目の三角形は頂点 (0.5,0.5)、(0,0)、(1,0) により定義され、1 番目の三角形は頂点 (0,1)、(0,0)、(0.5,0.5) により定義されます。
TR.ConnectivityList
ans = 4×3
4 1 5
4 5 3
5 2 3
5 1 2
TR.Points
ans = 5×2
0 0
1.0000 0
1.0000 1.0000
0 1.0000
0.5000 0.5000
3 次元三角形分割
2 次元三角形分割データを読み込んで、三角形分割表現を作成します。
load tetmesh
TR = triangulation(tet,X);
始点と終点の頂点 ID を指定して、2 本のエッジを選択します。
startID = [15; 21]; endID = [936; 716];
エッジの接続を検出し、各エッジに接している三角形の ID を調べます。
ID = edgeAttachments(TR,startID,endID); ID{1}
ans = 1×6
927 2060 3438 3423 2583 4690
ID{2}
ans = 1×5
2652 3946 3953 4665 4218
入力引数
TR
— 三角形分割の表現
スカラー三角形分割オブジェクト
三角形分割の表現。スカラー triangulation
オブジェクトまたは delaunayTriangulation
オブジェクトとして指定します。
データ型: triangulation
| delaunayTriangulation
startID
— 開始頂点 ID
列ベクトル
各エッジの開始頂点 ID。列ベクトルとして指定します。頂点 ID 番号は、その頂点に対応する Points
プロパティの行番号です。
データ型: double
endID
— 終了頂点 ID
列ベクトル
各エッジの終了頂点 ID。列ベクトルとして指定します。頂点 ID 番号は、その頂点に対応する Points
プロパティの行番号です。
データ型: double
E
— エッジ行列
2 列の行列
エッジ行列。2 列の行列として指定します。各行には、エッジの開始頂点 ID と終了頂点 ID が含まれます。頂点 ID 番号は、その頂点に対応する Points
プロパティの行番号です。
データ型: double
バージョン履歴
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)