Message Boards Message Boards

GROUPS:

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

Posted 2 years ago
2439 Views
|
1 Reply
|
5 Total Likes
|

Parallelograms with vertices traversing four circles

Perpetual

Inspired by two pieces recently posted by Charlie Deck: [1], [2].

Here's the code:

DynamicModule[{cols, centers, n = 4, k = 3, points},
 cols = RGBColor /@ {"#E5F6C6", "#5D414D"};
 centers = ReIm[E^(I #)] & /@ Range[0, 2 π - 2 π/n, 2 π/n];
 Animate[
  points = 
   Reverse@Table[
     ReIm[1/2 E^(I (θ - (i + j/k) 2 π/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]], {θ, 0, 2 π/(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!

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