凸多角形の外周を一定距離で囲む凸多角形
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MATLABに関する質問です。
任意の凸多角形の各辺から平行に一定距離wで囲む凸多角形の各頂点の座標を求めたいです。
元の任意の凸多角形の頂点の座標は既知です。
物理的な意味合いとしては、凸多角形の外周に一定距離の安全マージンを設けた少し大き目の凸多角形を作るということです。
できるだけ計算負荷の少ない求め方が希望です。
ご意見やアドバイスをお持ちでしたらよろしくお願いいたします。
0 Kommentare
Akzeptierte Antwort
Atsushi Ueno
am 19 Okt. 2022
polybuffer関数を使います。
% 元の任意の凸多角形の頂点の座標(既知)から polyshape オブジェクトを作成
polyin = polyshape([1 2 2 3 3 4 4],[1 3 4 4 2 2 1]);
% 凸多角形の外周を一定距離で囲む凸多角形の各頂点の座標を求める
polyout1 = polybuffer(polyin,0.5,'JointType','miter');
% 求めた凸多角形の各頂点の座標
polyout1.Vertices
plot(polyin);
hold on
plot(polyout1);
hold off
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!