minkowskiSum

Compute the Minkowski sum of any two polygons or polyshapes, convex or concave.
100 download
Aggiornato 1 dic 2022

Visualizza la licenza

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

Cita come

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

Compatibilità della release di MATLAB
Creato con R2022b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0