baryToCart
(非推奨) 点の座標を重心座標から直交座標に変換
baryToCart(TriRep)
は推奨されません。代わりに barycentricToCartesian(triangulation)
を使用してください。
TriRep
は推奨されません。代わりに triangulation
を使用してください。
説明
例
三角形分割の拡大および内心点のマッピング
点集合の Delaunay 三角形分割を作成し、内心点の位置を計算します。そして三角形分割を拡大し、変形した三角形分割上のマッピングした内心点の位置を計算します。
点集合の Delaunay 三角形分割を計算します。
x = [0 4 8 12 0 4 8 12]'; y = [0 0 0 0 8 8 8 8]'; dt = DelaunayTri(x,y)
dt = DelaunayTri with properties: X: [8x2 double] Triangulation: [6x3 double] Constraints: []
内心点の重心座標を計算します。
cc = incenters(dt); tri = dt(:,:);
元の三角形分割と基準点をプロットします。
subplot(1,2,1) triplot(dt) hold on plot(cc(:,1), cc(:,2), '*r') hold off axis equal
三角形分割を拡大し、baryToCart
を使用して、変形した三角形分割上のマッピングした内心点の位置を計算します。
b = cartToBary(dt,[1:length(tri)]',cc); y = [0 0 0 0 16 16 16 16]'; tr = TriRep(tri,x,y); xc = baryToCart(tr, [1:length(tri)]', b);
変形した三角形分割とマッピングした基準点の位置をプロットします。
subplot(1,2,2) triplot(tr) hold on plot(xc(:,1), xc(:,2), '*r') hold off axis equal
入力引数
TR
— 三角形分割の表現
TriRep
オブジェクトまたは DelaunayTri
オブジェクト
三角形分割の表現。TriRep
オブジェクトまたは DelaunayTri
オブジェクトとして指定します。
SI
— シンプレックス インデックス
列ベクトル
シンプレックス インデックス。列ベクトルとして指定します。SI
は、三角形分割の行列 TR.Triangulation
にインデックスするシンプレックス インデックスを含みます。
B
— 変換対象の重心座標
行列
変換対象の重心座標。行列として指定します。B
は、シンプレックス SI
に関連して変換する点の重心座標を表す行列です。B
は m
行 k
列のサイズです。ここで m
= length(SI)
(変換する点の数)、k
はシンプレックスごとの頂点の数です。
出力引数
XC
— 変換された点の直交座標
行列
変換された点の直交座標。行列として返されます。XC
は、m
行 n
列のサイズです。ここで、n
は三角形分割のある空間の次元です。すなわち、シンプレックス SI(j)
に対する点 B(j)
の直交座標は XC(j)
になります。
詳細
シンプレックス
シンプレックスは、三角形/四面体、またはより高い次元に相当するものです。
バージョン履歴
R2009a で導入
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)