Message Boards Message Boards

[GIF] Up and Down (Broken triangular grid)

GROUPS:

Broken triangular grid

Up and Down

No fancy math this time, just the tiling of the plane by equilateral triangles, with the up-pointing and down-pointing triangles rotating on separate schedules.

Here's the code:

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

With[{n = 3,  cols = RGBColor /@ {"#FF5964", "#6BF178", "#FFFFFF", "#0a6713"}},
 Manipulate[
  Graphics[
   {EdgeForm[Directive[cols[[3]], Thickness[.005]]],
    Table[
     {FaceForm[cols[[1]]], 
      Polygon[CirclePoints[{Sqrt[3] x + (-1)^y Sqrt[3]/4, 3/2 y}, 
         {1, π/2 + 2 π/3 smootheststep[Clip[t - 3 + (y + n)/(2 n), {0, 1}]]}, 3]],
      FaceForm[cols[[2]]], 
      Polygon[CirclePoints[{Sqrt[3] x - (-1)^y Sqrt[3]/4, 3/2 y + 1/2}, 
         {1, π/6 + 2 π/3 smootheststep[Clip[t - (y + n)/(2 n), {0, 1}]]}, 3]]},
     {x, -n, n}, {y, -n, n}]}, 
   PlotRange -> {{-Sqrt[3] n + Sqrt[3]/4, Sqrt[3] n + Sqrt[3]/4}, 
      {-Sqrt[3] n + 1/4 - .09, Sqrt[3] n + 1/4 + .07}},
   ImageSize -> 540, Background -> cols[[-1]]],
  {t, 0, 4}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
7 months ago

enter image description here - Congratulations! This post is now Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

POSTED BY: Moderation Team
Answer
7 months ago

Group Abstract Group Abstract