Minkowski sum of two sets

7 Ansichten (letzte 30 Tage)
Ashish
Ashish am 10 Dez. 2022
Kommentiert: Ashish am 11 Dez. 2022
Is there a function to calculate minkowski sum of two sets? basically an optimal way to calculate combinations of all possible vertices from the two sets.
Thanks to John D'Errico, I have a way to calculate the Minkowski Sum of polygons. I have attached a link below for reference.
Could someone help with implementing the same for two sets of points.
  2 Kommentare
Jan
Jan am 10 Dez. 2022
What do you call "a set of points"? Which type and size of variable is it?
Ashish
Ashish am 11 Dez. 2022
My apologies for the lack of clarity, a set of points would be a set of n-dimensonal points of floating type

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jan
Jan am 10 Dez. 2022
Bearbeitet: Jan am 10 Dez. 2022
Guessing the type of the input:
A = rand(5, 2); % "Points" as x and y coordinates
B = rand(6, 2);
sA = size(A);
sB = size(B);
AB = reshape(A, [1, sA]) + reshape(B, [sB(1), 1, sB(2)]);
AB = reshape(AB, [], 2);
  1 Kommentar
Ashish
Ashish am 11 Dez. 2022
Thank you so much!
I will write back incase of any further queries

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by