Skip to main content
Tweeted twitter.com/StackMma/status/900971621283880964
edited tags
Link
Source Link
senseiwa
  • 515
  • 2
  • 8

Minkowski sum with 2D and 3D geometries

I have searched for this but the only questions I've found are this, and a more closely related one.

How can I compute and plot the Minkowski sum of geometric entities in both 2D and 3D?

There are some demonstrations like this one, and this other one, but they are not generic.

I'd like to do something like this with any geometry (or at least be a little generic...):

c = Circle[{0, 0}, 1];
l = Line[{{0, 0}, {3, 5}}];
a = MagicMinkowskiSum[{c, l}];
Show[{Graphics[c], Graphics[l], Graphics[a]}]

s = Sphere[{0, 0, 0}, 1];
r = Line[{{0, 0, 0}, {3, 5, 4}}];
b = MagicMinkowskiSum[{s, r}]; (* or MagicMinkowskiSum3D[...] *)
Show[{Graphics3D[s], Graphics3D[r], Graphics3D[b]}]

Thanks!