# \[GIF\] Release (Flapping triangular grid)

**URL:** <https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938>\
**Category:** Staff Picks\
**Tags:** computational-arts, geometry, graphics-and-visualization, interface-construction, staff-pick\
**Created:** [July 22, 2016, 3:01am UTC](https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938 "2016-07-22T03:01:55Z")\
**Posts on this page:** 6\
**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:** [July 22, 2016, 3:01am UTC](https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938/1 "2016-07-22T03:01:55Z")

</div>

![trigrid26t.gif](https://global.discourse-cdn.com/wolfram/original/3X/4/e/4e20ac573036c49e545130ca251020dd52e6028f.gif)

**Release**

I liked how [_Inertia_](https://wolfram.discourse.group/t/8930/1) turned out, so I decided to make a triangular grid and see about deforming it in some interesting way. I didn’t want to do twisting again, but after an hour or so I realized I was essentially re-creating Dave Whyte’s [dot line wave](https://beesandbombs.tumblr.com/post/110813152664/dot-line-wave), so I decided to go in a different direction.

Sorry that the definition of `dots` is so gross…

```
DynamicModule[{cols, dots, xmax = 13, ymax = 13},
 cols = GrayLevel /@ {.95, .2};
 Manipulate[
  dots = Table[(1 - 
       1/2 Total[
         Flatten[Table[(-1)^((i + j + 8)/8) Haversine[
             t - Pi Norm[{x, y} - {i, j}]/15], {i, {-4, 4}}, {j, {-4, 4}}], 1]]) 
       {Sqrt[3] x + (-1)^y Sqrt[3]/4 - Sqrt[3]/4, 3 y/2},
    {x, -xmax, xmax}, {y, -ymax, ymax}];
  Graphics[{cols[[1]], Thickness[.003], CapForm["Round"], 
    Table[Line[dots[[i]]], {i, 1, Length[dots]}], 
    Table[Line[Transpose[dots][[i]]], {i, 1, Length[Transpose[dots]]}], 
    Table[Line[{dots[[i + 1, j + 1]], dots[[i, j]], 
       dots[[i + 1, j - 1]]}], {i, 1, Length[dots] - 1}, {j, 2, Length[Transpose[dots]], 2}]}, 
     ImageSize -> 540, PlotRange -> 35, Background -> cols[[-1]]],
  {t, 0., 2 Pi}]
 ]

```

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [July 22, 2016, 8:23am UTC](https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938/2 "2016-07-22T08:23:41Z")

</div>

> Sorry that the definition of dots is so gross…

Hahaha! You’re forgiven!

---

<div class="post-metadata">

**Author:** ![Vitaliyk](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/vitaliyk/32/45591_2.png) [@Vitaliyk](https://community.wolfram.com/u/Vitaliyk)\
**Post date:** [July 22, 2016, 8:49am UTC](https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938/3 "2016-07-22T08:49:07Z")

</div>

Beautiful and compact! I like that this is not an infinite field, flapping edges give it more dramatic appearance.

---

<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:** [July 22, 2016, 8:51am UTC](https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938/4 "2016-07-22T08:51:24Z")

</div>

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

- another post of yours has been selected for the [Staff Picks](http://community.wolfram.com/content?curTag=staff+picks) group, congratulations !

We are happy to see you at the top of the [“Featured Contributor” board](http://wolfr.am/featured). Thank you for your wonderful contributions, and please keep them coming!

---

<div class="post-metadata">

**Author:** ![pleasureoffiguring](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/pleasureoffiguring/32/18977_2.png) [@pleasureoffiguring](https://community.wolfram.com/u/pleasureoffiguring)\
**Post date:** [July 29, 2016, 5:22pm UTC](https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938/5 "2016-07-29T17:22:31Z")

</div>

Your beautiful animations have once more forced me to delurk. 🙂

Here’s my modest improvement:

```
DynamicModule[{xmax = 13, ymax = 13, cols = GrayLevel /@ {.95, .2}},
              Manipulate[Graphics[GraphicsComplex[
              Flatten[N[Table[(1 - Sum[(-1)^((i + j + 8)/8) Haversine[t - Pi Norm[{x, y} - {i, j}]/15],
                                       {i, {-4, 4}}, {j, {-4, 4}}]/2) {Sqrt[3](x + (-1)^y/4 - 1/4), 3 y/2},
                              {x, -xmax, xmax}, {y, -ymax, ymax}]], 1],
              {Directive[cols[[1]], AbsoluteThickness[0.1], CapForm["Round"]],
               {Line[#], Line[Transpose[#]]} &[Partition[Range[(2 xmax + 1) (2 ymax + 1)], 2 ymax + 1]],
               Line[Flatten[Table[{(2 ymax + 1) i + j + 1, (2 ymax + 1) (i - 1) + j, (2 ymax + 1)i + j - 1},
                                  {i, 2 xmax}, {j, 2, 2 ymax, 2}], 1]]}],
               ImageSize -> 540, PlotRange -> 35, Background -> cols[[-1]]], {t, 0, 2 Pi}]]

```

---

<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:** [July 29, 2016, 6:51pm UTC](https://community.wolfram.com/t/gif-release-flapping-triangular-grid/8938/6 "2016-07-29T18:51:35Z")

</div>

Hey, nice! And thanks for pointing me to the existence of `AbsoluteThickness`, which I wasn’t aware of.
