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

Posted 2 years ago
2763 Views
|
1 Reply
|
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
1 Reply
Sort By:
Posted 2 years ago - Congratulations! This post is now Staff Pick! Thank you for your wonderful contributions. Please, keep them coming! Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments