Skip to main content
added 797 characters in body
Source Link

Here is a slightly different way of going about it:

BlockRandom[SeedRandom[42, Method -> "Rule30CA"]; (* for reproducibility *)
            pts = RandomReal[{-1, 1}, {50, 2}]];

With[{h = 1/5 (* offset *), n = 30 (* iterations *)}, 
     Graphics[{FaceForm[], EdgeForm[Black]EdgeForm[AbsoluteThickness[1/5]], 
               NestList[# /. Polygon[p_] :> 
                        Polygon[Transpose[Partition[p, 2, 1, 1], {1, 3, 2}].
                                {1 - h, h}] &, 
                        MeshPrimitives[VoronoiMesh[pts], 2], n]}]]

whirls all aroundwhirls all around


This version incorporates Rahul's suggestion to randomize the rotation directions:

With[{h = 1/5 (* offset *), n = 30 (* iterations *)},

     BlockRandom[SeedRandom[42, Method -> "Rule30CA"]; (* for reproducibility *)
  
                 pts = RandomReal[{-1, 1}, {50, 2}];

     Graphics[{FaceForm[], EdgeForm[AbsoluteThickness[1/5]], 
               NestList[# /. Polygon[p_] :> 
                        Polygon[Transpose[Partition[p, 2, 1, 1], {1, 3, 2}].
                                {1 - h, h}] &,
                        Map[RandomChoice[{Identity, Reverse}][#] &,
                            MeshPrimitives[VoronoiMesh[pts], 2], {2}], n]}]]]

spinning here or there

Here is a slightly different way of going about it:

BlockRandom[SeedRandom[42, Method -> "Rule30CA"]; (* for reproducibility *)
            pts = RandomReal[{-1, 1}, {50, 2}]];

With[{h = 1/5 (* offset *), n = 30 (* iterations *)}, 
     Graphics[{FaceForm[], EdgeForm[Black], 
               NestList[# /. Polygon[p_] :> 
                        Polygon[Transpose[Partition[p, 2, 1, 1], {1, 3, 2}].
                                {1 - h, h}] &, 
                        MeshPrimitives[VoronoiMesh[pts], 2], n]}]]

whirls all around

Here is a slightly different way of going about it:

BlockRandom[SeedRandom[42, Method -> "Rule30CA"]; (* for reproducibility *)
            pts = RandomReal[{-1, 1}, {50, 2}]];

With[{h = 1/5 (* offset *), n = 30 (* iterations *)}, 
     Graphics[{FaceForm[], EdgeForm[AbsoluteThickness[1/5]], 
               NestList[# /. Polygon[p_] :> 
                        Polygon[Transpose[Partition[p, 2, 1, 1], {1, 3, 2}].
                                {1 - h, h}] &, 
                        MeshPrimitives[VoronoiMesh[pts], 2], n]}]]

whirls all around


This version incorporates Rahul's suggestion to randomize the rotation directions:

With[{h = 1/5 (* offset *), n = 30 (* iterations *)},

     BlockRandom[SeedRandom[42, Method -> "Rule30CA"]; (* for reproducibility *)
  
                 pts = RandomReal[{-1, 1}, {50, 2}];

     Graphics[{FaceForm[], EdgeForm[AbsoluteThickness[1/5]], 
               NestList[# /. Polygon[p_] :> 
                        Polygon[Transpose[Partition[p, 2, 1, 1], {1, 3, 2}].
                                {1 - h, h}] &,
                        Map[RandomChoice[{Identity, Reverse}][#] &,
                            MeshPrimitives[VoronoiMesh[pts], 2], {2}], n]}]]]

spinning here or there

Source Link

Here is a slightly different way of going about it:

BlockRandom[SeedRandom[42, Method -> "Rule30CA"]; (* for reproducibility *)
            pts = RandomReal[{-1, 1}, {50, 2}]];

With[{h = 1/5 (* offset *), n = 30 (* iterations *)}, 
     Graphics[{FaceForm[], EdgeForm[Black], 
               NestList[# /. Polygon[p_] :> 
                        Polygon[Transpose[Partition[p, 2, 1, 1], {1, 3, 2}].
                                {1 - h, h}] &, 
                        MeshPrimitives[VoronoiMesh[pts], 2], n]}]]

whirls all around