Message Boards Message Boards

[GIF] Shock (Spinning squares)

Spinning squares

Shock

Just a simple one this time, though I amused myself with the use of Norm[a, Infinity].

Here's the code:

With[{
  n = 5,
  cols = RGBColor /@ {"#48F3DB", "#51C4E9", "#4A3764", "#4A3764"}},
 Manipulate[
  Graphics[{EdgeForm[Directive[cols[[-2]], Thickness[.003]]],
    Table[
     {FaceForm[
       Blend[Reverse@cols[[;; 2]], Haversine[2 t - (ArcTan[p[[1]], p[[2]]] + ?)]]],
      Polygon[
       Sqrt[2] {p[[1]], p[[2]]} + # & /@ 
        CirclePoints[{1, ?/4 + ?/2 (Haversine[Mod[t - ArcTan[p[[1]], p[[2]]]/2, ?]] + Floor[(t - 1/2 ArcTan[p[[1]], p[[2]]])/?])}, 4]]},
     {p, DeleteCases[Tuples[Range[-n + 1, n - 1], 2], a_ /; Norm[a, Infinity] <= 1]}]},
   PlotRange -> n Sqrt[2] + 2, ImageSize -> 540, Background -> cols[[4]]],
  {t, 0, ?}]
 ]

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