Skip to main content
added 408 characters in body
Source Link
M.R.
  • 31.6k
  • 8
  • 91
  • 286

Here's a quick take on it:

Clear[spiralize];
spiralize[p_, d_:10, r_:4, f_:0.8]8, s_:1, t_:0.005]:=Module[{m,rr=r},
    m = Mean @ p[[1]];
    Graphics[{EdgeForm[Thickness[Medium]]EdgeForm[Thickness[t]],FaceForm[White],
        NestList[GeometricTransformation[
            GeometricTransformation[#,
                RotationTransform[rr++RotationTransform[rr++s \[Degree],m]],
            ScalingTransform[{f,f},m]
        ]&, p, d]}
    ]
]

pts = RandomReal[{-1, 1}, {50, 2}];
polys = MeshPrimitives[VoronoiMesh[pts], 2];

Show[spiralize[#, 40, 5, 0.85] & /@ polys]

enter image description here

Play with the parameters:

pts = RandomReal[{-1, 1}, {10, 2}];
polys = MeshPrimitives[VoronoiMesh[pts], 2];
Manipulate[
 Show[spiralize[#, d, r, f, s, t] & /@ polys], {{d, 10}, 1, 20, 
  1}, {{r, 5}, 1, 20}, {{f, 0.85}, 0, 1}, {{s, 1}, 0.1, 
  3}, {{t, 0.001}, 0, 0.01}]

enter image description here

Here's a quick take on it:

spiralize[p_, d_:10, r_:4, f_:0.8]:=Module[{m,rr=r},
    m = Mean @ p[[1]];
    Graphics[{EdgeForm[Thickness[Medium]],FaceForm[White],
        NestList[GeometricTransformation[
            GeometricTransformation[#,
                RotationTransform[rr++ \[Degree],m]],
            ScalingTransform[{f,f},m]
        ]&, p, d]}
    ]
]

pts = RandomReal[{-1, 1}, {50, 2}];
polys = MeshPrimitives[VoronoiMesh[pts], 2];

Show[spiralize[#, 40, 5, 0.85] & /@ polys]

enter image description here

Here's a quick take on it:

Clear[spiralize];
spiralize[p_, d_:10, r_:4, f_:0.8, s_:1, t_:0.005]:=Module[{m,rr=r},
   m = Mean @ p[[1]];
   Graphics[{EdgeForm[Thickness[t]],FaceForm[White],
       NestList[GeometricTransformation[
         GeometricTransformation[#,
            RotationTransform[rr++s \[Degree],m]],
        ScalingTransform[{f,f},m]
    ]&, p, d]}
  ]
]

pts = RandomReal[{-1, 1}, {50, 2}];
polys = MeshPrimitives[VoronoiMesh[pts], 2];

Show[spiralize[#, 40, 5, 0.85] & /@ polys]

enter image description here

Play with the parameters:

pts = RandomReal[{-1, 1}, {10, 2}];
polys = MeshPrimitives[VoronoiMesh[pts], 2];
Manipulate[
 Show[spiralize[#, d, r, f, s, t] & /@ polys], {{d, 10}, 1, 20, 
  1}, {{r, 5}, 1, 20}, {{f, 0.85}, 0, 1}, {{s, 1}, 0.1, 
  3}, {{t, 0.001}, 0, 0.01}]

enter image description here

Source Link
M.R.
  • 31.6k
  • 8
  • 91
  • 286

Here's a quick take on it:

spiralize[p_, d_:10, r_:4, f_:0.8]:=Module[{m,rr=r},
    m = Mean @ p[[1]];
    Graphics[{EdgeForm[Thickness[Medium]],FaceForm[White],
        NestList[GeometricTransformation[
            GeometricTransformation[#,
                RotationTransform[rr++ \[Degree],m]],
            ScalingTransform[{f,f},m]
        ]&, p, d]}
    ]
]

pts = RandomReal[{-1, 1}, {50, 2}];
polys = MeshPrimitives[VoronoiMesh[pts], 2];

Show[spiralize[#, 40, 5, 0.85] & /@ polys]

enter image description here