Message Boards Message Boards

[GIF] Hex (Rotating Hexagons)

GROUPS:

Rotating hexagons

Hex

A couple of years ago I set out to recreate Saskia Freeke's piece Geometric Animations / 150224. Once I had gotten a reasonable approximation, I quickly switched from hexagons to squares and played around with it for a bit, but eventually that notebook just kind of languished. A couple of weeks ago I opened it up again and played around some more; eventually Just Squares was the result.

When I posted it, Harold Hausman suggested a version with hexagons, which I thought was funny since it originally was hexagons. That gave me motivation to try again to make something with hexagons, and this is the result.

Here's the code:

smootheststep[t_] := -20 t^7 + 70 t^6 - 84 t^5 + 35 t^4;

DynamicModule[{colorArray, t, 
  cols = RGBColor /@ {"#f54123", "#0098d8", "#fbfbfb", "#46454b"}},
 colorArray = Table[RandomChoice[cols[[;; 2]]],
   {j, -1, 14, 1/2}, {i, -1, 13 - If[OddQ[2 j], 1/2, 0]}];
 Manipulate[
  t = smootheststep[s];
  Graphics[
   {Thickness[.005],
    Table[
     {Blend[{Lighter[colorArray[[2 j + 3, i + 2]], .2], cols[[-2]]}, 2 Abs[t - 1/2]],
      Line[
       Table[
        { Cos[θ + 2 π/6 t] + 2 i + If[OddQ[2 j], 1, 0], Sin[θ + 2 π/6 t] + 2/Sqrt[3] j},
        {θ, 0, 2 π, π/3}]]},
     {j, -1, 14, 1/2}, {i, -1, 13 - If[OddQ[2 j], 1/2, 0]}]},
   ImageSize -> 540, PlotRange -> {{0, 12}, {0, 12}}, Background -> Darker[cols[[-1]]]],
  {s, 0, 1}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
4 months ago

Group Abstract Group Abstract