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

**URL:** <https://community.wolfram.com/t/gif-up-and-down-broken-triangular-grid/9752>\
**Category:** Staff Picks\
**Tags:** computational-arts, geometry, graphics-and-visualization, interface-construction, staff-pick\
**Created:** [December 13, 2016, 4:27am UTC](https://community.wolfram.com/t/gif-up-and-down-broken-triangular-grid/9752 "2016-12-13T04:27:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![claytonshonkwiler](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/claytonshonkwiler/32/24940_2.png) [@claytonshonkwiler](https://community.wolfram.com/u/claytonshonkwiler)\
**Post date:** [December 13, 2016, 4:27am UTC](https://community.wolfram.com/t/gif-up-and-down-broken-triangular-grid/9752/1 "2016-12-13T04:27:22Z")

</div>

![tri9.gif](https://global.discourse-cdn.com/wolfram/original/3X/8/8/886b9462fcb418a97351ccfeee08b4a4e95b4fd2.gif)

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

```

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [December 16, 2016, 2:56pm UTC](https://community.wolfram.com/t/gif-up-and-down-broken-triangular-grid/9752/2 "2016-12-16T14:56:53Z")

</div>

![2015-11-02_10-07-11.png](https://global.discourse-cdn.com/wolfram/original/3X/5/0/50e59c9ead62f729e7130d3ea1482555a75602b6.png)

- Congratulations! This post is now [Staff Pick](http://community.wolfram.com/content?curTag=staff+picks)! Thank you for your wonderful contributions. Please, keep them coming!
