minkowskiSum
Versione 1.0.0 (2,1 KB) da
John D'Errico
Compute the Minkowski sum of any two polygons or polyshapes, convex or concave.
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 LinuxTag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0 |