Message Boards Message Boards

GROUPS:

[GIF] Epicenter (Spinning hexagons)

Posted 3 years ago
2605 Views
|
1 Reply
|
2 Total Likes
|

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 π}]
 ]

Very interesting I have a similar problem I wan't the code for this imageenter image description here

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