Minkowski Sum

Author

Eric W. Weisstein
August 15, 2024

This notebook downloaded from http://mathworld.wolfram.com/notebooks/ComputationalGeometry/MinkowskiSum.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/MinkowskiSum.html.

©2024 Wolfram Research, Inc. except for portions noted otherwise

Random

Options[RandomMinkowskiSum]={MeshCellStyle->{1->None},MeshRegion};

RandomMinkowskiSum[r1_?RegionQ,r2_?RegionQ,n_Integer,opts:OptionsPattern[]]:=MeshRegion[ConvexHullRegion[Flatten[Outer[Plus,RandomPoint[r1,n],RandomPoint[r2,n],1],1]],opts]

Laminae

One Disk

$Version

bug(451241): RegionDilation[Disk[], r] could give more useful Disk[{0, 0}, r + 1] instead of unevaluated with RegionDilation::reg

RegionDilation[Disk[],r]

Table[RegionDilation[Disk[],r]===Disk[{0,0},1+r],{r,0,1,1/4}]

RegionDilation[Disk[],-1]

Two Disks

https://math.stackexchange.com/questions/444845/minkowski-sum-of-two-disks

D({0,0}, 1) + D({0,0}, 1)

RegionDilation@@Table[Disk[],2]

RandomMinkowskiSum[Disk[c1,r1],Disk[c2,r2],10^3]]

With[{c1={0,0},r1=1,c2={0,0},r2=1},Graphics[{Point[pts=RandomMinkowskiSum[Disk[c1,r1],Disk[c2,r2],10^3]],Red,Circle[c1+c2,r1+r2]},Axes->True]]

With[{c1={0,0},r1=1,c2={0,0},r2=1},Show[RandomMinkowskiSum[Disk[c1,r1],Disk[c2,r2],10^3],Graphics[{Red,Circle[c1+c2,r1+r2]}],Axes->True]]

D({-1,0}, 1) + D({1,0}, 1)

Graphics[disks={Disk[{-1,0}],Disk[{1,0}]}]

RegionDilation@@disks

With[{c1={-1,0},r1=1,c2={1,0},r2=1},Show[RandomMinkowskiSum[Disk[c1,r1],Disk[c2,r2],10^3],Graphics[{Red,Circle[c1+c2,r1+r2]}],Axes->True]]

D({-1, 0}, 1/2) + D({2, 0}, 1)

Graphics[disks={Disk[{-1,0},1/2],Disk[{2,0}]}]

RegionDilation@@disks

With[{c1={-1,0},r1=1/2,c2={2,0},r2=1},Show[RandomMinkowskiSum[Disk[c1,r1],Disk[c2,r2],10^3],Graphics[{Red,Circle[c1+c2,r1+r2]}],Axes->True]]

Solids

Ball({0, 0, 0}, 1] + Ball({0, 0, 0}, 1]

RegionDilation[Ball[3],Ball[3]]//Head

RegionDilation[Ball[],Ball[{-1,0,0},1/2]]

RegionDilation[Ball[],Ball[3]]

Graphics3D[sum=RegionDilation[Ball[3],Ball[3]]]

Max[Norm/@PolyhedronCoordinates[sum]]

RandomMinkowskiSum[Ball[],Ball[],1000]

RegionDilation[Ball[{0,0,0},1],Ball[3]]//Head

Ball({-2, 0, 0}, 1] + Ball({0, 2, 3}, 1]

Graphics3D[sum=RegionDilation[Ball[{-2,0,0},1],Ball[{0,2,3},1/2]]]

sum

RandomMinkowskiSum[Ball[{-2,0,0},1],Ball[{0,2,3},1/2],1000]

Platonic solids

Tetrahedra in dual position

RegionDilation@@(PolyhedronData[{"Tetrahedron",#},"Polyhedron"]&/@{"C3","C3down"})//Graphics3D

{r1,r2}=Table[PolyhedronData[{"Tetrahedron",orientation},"Polyhedron"],{orientation,{"C3","C3down"}}]

RandomMinkowskiSum[r1,r2,3000]

Dual Platonic solid

GraphicsGrid[Map[Graphics3D[#,Boxed->False]&,
{p1=PolyhedronData[#,"Polyhedron"],p2=PolyhedronData[#,"Dual","Polyhedron"],RegionDilation[p1,p2]}&/@{"Tetrahedron","Cube","Dodecahedron"},
{2}]]

Unit Platonic solids in dual position

data={p1=PolyhedronData[#,"Polyhedron"],p2=PolyhedronData[#,"Dual","Polyhedron"]/.Polyhedron[v_,f_]:>Polyhedron[v/Abs@PolyhedronData[#,"DualScale"],f],RegionDilation[p1,p2]}&/@{"Tetrahedron","Cube","Dodecahedron"}

bounds=RegionBounds/@data[[All,-1]]

i=0;
Grid[{#,"+",#2,"==",#3}&@@@data/.p_Polyhedron:>Graphics3D[{Opacity[.8],p},Boxed->False,PlotRange->bounds[[Floor[(++i)/3]]]],BaseStyle->40,Spacings->0]

i=0;
Row[{#,"+",#2,"==",#3},BaseStyle->40]&@@@data/.p_Polyhedron:>Graphics3D[{Opacity[.8],p},Boxed->False,PlotRange->bounds[[Floor[(++i)/3]]]]//Column

Unit edge lengths not-necessarily in dual position (when relevant)

platonic=PolyhedronData["Platonic"]

Grid[{{##},Graphics3D@RegionDilation[PolyhedronData[#,"Polyhedron"],PolyhedronData[#2,"Polyhedron"]]}&@@@Subsets[platonic,{2}],Dividers->All]