Wolfram Research

Function Repository Resource:

MinkowskiSausageCurve

Source Notebook

Generate the Minkowski sausage curve

Contributed by: Sander Huisman

ResourceFunction["MinkowskiSausageCurve"][n]

generates the line segments of the Minkowski sausage curve with n iterations.

ResourceFunction["MinkowskiSausageCurve"][{p1,p2},n]

uses the line connecting the points p1 and p2 as the initial line.

ResourceFunction["MinkowskiSausageCurve"][{p1,p2,,pn},n]

uses the lines joining the points pi.

Details

The following transformation is done with each line segment:
The first 4 iterations:
ResourceFunction["MinkowskiSausageCurve"][n] is equivalent to ResourceFunction["MinkowskiSausageCurve"][{{-1,0},{1,0}},n]
The syntax ResourceFunction["MinkowskiSausageCurve"][Line[{p1,p2,,pn}],n] is also supported.

Examples

Basic Examples (2) 

Generate the Minkowski sausage curve for 2 iterations:

In[1]:=
ResourceFunction["MinkowskiSausageCurve"][4]
Out[1]=

Generate the curve for 4 iterations and visualize the result:

In[2]:=
Graphics[ResourceFunction["MinkowskiSausageCurve"][4]]
Out[2]=

Scope (1) 

Start from a square:

In[3]:=
Graphics[ResourceFunction["MinkowskiSausageCurve"][
  Line[{{0, 0}, {1, 1}, {2, 0}, {1, -1}, {0, 0}}], 3]]
Out[3]=

Properties and Relations (2) 

MinkowskiSausageCurve and KochCurve have identical first iterates:

In[4]:=
{Graphics[ResourceFunction["MinkowskiSausageCurve"][1]], Graphics[KochCurve[
    1, {{1, 0}, {1, 90 \[Degree]}, {1, -90 \[Degree]}, {2, -90 \[Degree]}, {1, 90 \[Degree]}, {1, 90 \[Degree]}, {1, -90 \[Degree]}}]]} // GraphicsRow
Out[4]=

Succeeding iterates have different behavior:

In[5]:=
{Graphics[ResourceFunction["MinkowskiSausageCurve"][2]], Graphics[KochCurve[
    2, {{1, 0}, {1, 90 \[Degree]}, {1, -90 \[Degree]}, {2, -90 \[Degree]}, {1, 90 \[Degree]}, {1, 90 \[Degree]}, {1, -90 \[Degree]}}]]} // GraphicsRow
Out[5]=

The number of elements grows exponentially:

In[6]:=
ListLogPlot[
 ResourceFunction["MinkowskiSausageCurve"] /* First /* Length /@ Range[7], Joined -> True]
Out[6]=

Resource History

Related Resources

License Information