minkowskiSum

バージョン 1.0.0 (2.1 KB) 作成者: John D'Errico
Compute the Minkowski sum of any two polygons or polyshapes, convex or concave.
ダウンロード: 112
更新 2022/12/1

ライセンスの表示

The Minkowski sum of two polygons
is simply computed for two convex polygons, but if they may be more general with concavities, the sum is slightly more complex. minkowskiSum will work for any pair of polygons (even self-intersecting polygons), returning a polyshape as a result.
Pa = polyshape([-1 2;0 2;-0.75 2.25;-1 3]);
Pb = polyshape([1 0;2 0;3 1;4 3;2 .3]);
plot(Pa)
hold on
plot(Pb)
MSumShape = minkowskiSum(Pa,Pb)
MSumShape =
polyshape with properties:
Vertices: [8×2 double]
NumRegions: 1
NumHoles: 0

引用

John D'Errico (2024). minkowskiSum (https://www.mathworks.com/matlabcentral/fileexchange/121478-minkowskisum), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2022b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0