Message Boards Message Boards

[GIF] Epicenter (Spinning hexagons)

Spinning hexagons

Epicenter

Same basic idea as the last one, though now with hexagons spinning rather than line segments (and without the visual illusion of a plain weave).

Code:

DynamicModule[{f, ψ, cols},
 cols = RGBColor /@ {"#7696DB", "#FF8A98", "#562D7D"};
 f = 2 π/6 Piecewise[{{0, # < 0}, {1/2 - 1/2 Cos[#], 0 <= # < π}, {1, # >= π}}] &;
 Manipulate[
  Graphics[{Thickness[.005], CapForm["Round"], 
    Table[{ψ[t_] := f[t - π/(3 Sqrt[7]) Norm[{Sqrt[3] (i + (-1)^j/4), 3/2 j} - {Sqrt[3]/4, 0}] ];
      Blend[{cols[[1]], cols[[2]]}, 6/π ψ'[t]],
      Line[{Sqrt[3] (i + (-1)^j/4), 3/2 j} + # & /@ (Sqrt[3]/2 {{Cos[θ + (-1)^i ψ[t]], Sin[θ + (-1)^i ψ[t]]}, 
            {Cos[θ + (-1)^i ψ[t] + 2 π/6], Sin[θ + (-1)^i ψ[t] + 2 π/6]}})]}, 
            {i, -4, 4}, {j, -4, 4}, {θ, (-1)^j π/6, 2 π - (-1)^j π/6, 2 π/6}]}, 
   PlotRange -> {{-6 + Sqrt[3]/4, 6 + Sqrt[3]/4}, {-6, 6}}, 
   Background -> cols[[3]], ImageSize -> 540], {t, 0, 2 π}]
 ]

enter image description here -- you have earned Featured Contributor Badge enter image description here

Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
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