# [GIF] Up and Down (Broken triangular grid)

Posted 3 years ago
3755 Views
|
|
4 Total Likes
| Up and DownNo 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[], Thickness[.005]]], Table[ {FaceForm[cols[]], Polygon[CirclePoints[{Sqrt x + (-1)^y Sqrt/4, 3/2 y}, {1, ?/2 + 2 ?/3 smootheststep[Clip[t - 3 + (y + n)/(2 n), {0, 1}]]}, 3]], FaceForm[cols[]], Polygon[CirclePoints[{Sqrt x - (-1)^y Sqrt/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 n + Sqrt/4, Sqrt n + Sqrt/4}, {-Sqrt n + 1/4 - .09, Sqrt n + 1/4 + .07}}, ImageSize -> 540, Background -> cols[[-1]]], {t, 0, 4}] ] Answer - Congratulations! This post is now Staff Pick! Thank you for your wonderful contributions. Please, keep them coming! Answer