Each year there are several challenges for generative arts in the month January called “Genuary” ( https://genuary.art/prompts ). The #genuary the next prompt is called 800x80, referring to the dimensions of the final result.
We create some points inside a rectangle and use Lloyd’s algorithm to make a more smooth distribution:
In[]:=
SeedRandom[1234];n=100;δ=20;rect=Region[Rectangle[{0,0}+δ,{800,80}-δ]];pts=RandomPoint[rect,n];pts=ResourceFunction["LloydAlgorithm"][pts,{{0,800},{0,80}},20];ϕ=RandomReal[{0,2Pi},n];VoronoiMesh[pts,{{0,800},{0,80}},Axes->True]
Out[]=
Now make a function that rotates these point in circles, and show them:
In[]:=
ClearAll[MakeScene]MakeScene[r_,t_]:=Module[{p,vm,g},p=pts+Transpose[r{Sin[2Pit+ϕ],Cos[2Pit+ϕ]}];vm=VoronoiMesh[p,{{0,800},{0,80}}];g=Graphics[{EdgeForm[{GrayLevel[0.8],AbsoluteThickness[6]}],FaceForm[],MeshPrimitives[vm,2]},BackgroundRGBColor[0.,0.21,0.46],ImageSize{2400,240},PlotRangePadding0,PlotRange{{0,800},{0,80}}];ImageResize[Rasterize[g,"Image",RasterSize{2400,240}],Scaled[1/3]]]imgs=Table[MakeScene[9,t],{t,Most@Subdivide[50]}];
Export the gif:
In[]:=
SetDirectory[NotebookDirectory[]];Export["2022_11.gif",imgs,"DisplayDurations"->1/30]
Out[]=
2022_11.gif