Skip to main content
add looping gif
Source Link
Adam
  • 4k
  • 7
  • 24

An animated version for fun

frames=Monitor[
  With[{rule={i_,p_}:>{3i,Join@@Outer[Plus,p,CirclePoints[Sqrt[2]i,4]~Join~{{0,0}},1]}},
  With[{frac=MapThread[Rectangle,{#2-1/2,#2+1/2}]&@@Nest[#/.rule&,{1,{{0,0}}},#]&},
    Table[
      Framed@Graphics[frac@Floor@i,PlotRange->(3^(i-1)/2{{-1,1},{-1,1}})]
    ,{i,1,5,.1}]
  ]],i];
ListAnimate@frames

in and out

And the forever version:, not perfect

looping

An animated version for fun

frames=Monitor[
  With[{rule={i_,p_}:>{3i,Join@@Outer[Plus,p,CirclePoints[Sqrt[2]i,4]~Join~{{0,0}},1]}},
  With[{frac=MapThread[Rectangle,{#2-1/2,#2+1/2}]&@@Nest[#/.rule&,{1,{{0,0}}},#]&},
    Table[
      Framed@Graphics[frac@Floor@i,PlotRange->(3^(i-1)/2{{-1,1},{-1,1}})]
    ,{i,1,5,.1}]
  ]],i];
ListAnimate@frames

in and out

And the forever version:

An animated version for fun

frames=Monitor[
  With[{rule={i_,p_}:>{3i,Join@@Outer[Plus,p,CirclePoints[Sqrt[2]i,4]~Join~{{0,0}},1]}},
  With[{frac=MapThread[Rectangle,{#2-1/2,#2+1/2}]&@@Nest[#/.rule&,{1,{{0,0}}},#]&},
    Table[
      Framed@Graphics[frac@Floor@i,PlotRange->(3^(i-1)/2{{-1,1},{-1,1}})]
    ,{i,1,5,.1}]
  ]],i];
ListAnimate@frames

in and out

And the forever version, not perfect

looping

Source Link
Adam
  • 4k
  • 7
  • 24

An animated version for fun

frames=Monitor[
  With[{rule={i_,p_}:>{3i,Join@@Outer[Plus,p,CirclePoints[Sqrt[2]i,4]~Join~{{0,0}},1]}},
  With[{frac=MapThread[Rectangle,{#2-1/2,#2+1/2}]&@@Nest[#/.rule&,{1,{{0,0}}},#]&},
    Table[
      Framed@Graphics[frac@Floor@i,PlotRange->(3^(i-1)/2{{-1,1},{-1,1}})]
    ,{i,1,5,.1}]
  ]],i];
ListAnimate@frames

in and out

And the forever version: