Message Boards Message Boards

[GIF] Perpetual (Parallelograms with vertices traversing four circles)

Parallelograms with vertices traversing four circles

Perpetual

Inspired by two pieces recently posted by Charlie Deck: 1 and 2 .

Here's the code:

DynamicModule[{cols, centers, n = 4, k = 3, points},
 cols = RGBColor /@ {"#E5F6C6", "#5D414D"};
 centers = ReIm[E^(I #)] & /@ Range[0, 2 Pi - 2 Pi/n, 2 Pi/n];
 Animate[
  points = 
   Reverse@Table[
     ReIm[1/2 E^(I (t - (i + j/k) 2 Pi/n))] + 
      centers[[i]], {j, 0, k*n - 1}, {i, 1, n}]; 
  Graphics[{FaceForm[Opacity[.2]], EdgeForm[Thickness[.002]], 
    Table[{cols[[1]], EdgeForm[cols[[1]]], Polygon[points[[j]]], 
      Point /@ points[[j]]}, {j, 1, Length[points]}]}, 
   PlotRange -> 2.2, ImageSize -> 540, 
   Background -> Last[cols]], {t, 0, 2 Pi/(k*n)}]
 ]

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract