# \[GIF\] Stripes (Hyperbolic geodesics)

**URL:** <https://community.wolfram.com/t/gif-stripes-hyperbolic-geodesics/9697>\
**Category:** Staff Picks\
**Tags:** computational-arts, geometry, graphics-and-visualization, interface-construction, staff-pick\
**Created:** [November 30, 2016, 9:01pm UTC](https://community.wolfram.com/t/gif-stripes-hyperbolic-geodesics/9697 "2016-11-30T21:01:20Z")\
**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:** [November 30, 2016, 9:01pm UTC](https://community.wolfram.com/t/gif-stripes-hyperbolic-geodesics/9697/1 "2016-11-30T21:01:20Z")

</div>

![patterns8s.gif](https://global.discourse-cdn.com/wolfram/original/2X/2/20796fefe31c62bad97ccf7f519997478524a518.gif)

**Stripes**

Another animation using the hyperbolic geodesic code explained in more detail [here](https://wolfram.discourse.group/t/9565/1) , inspired by [this GIF on Tumblr](http://szimmetria-airtemmizs.tumblr.com/post/153700846918/shifting-planet).

In this case, I have two non-antipodal points on the unit circle and pairs of points traveling the two (unequal) arcs between them in the same amount of time, connected by hyperbolic geodesics in the Poincaré disk model (which are just circle arcs perpendicular to the unit circle).

Here’s the code:

```
Stereo[{x_, y_, z_}] := {x/(1 + z), y/(1 + z)};
InverseStereo[{x_, y_}] := 1/(1 + x^2 + y^2) {2 x, 2 y, 1 - x^2 - y^2};
hypgeo[p1_, p2_, t_] := 
  Stereo[Append[#, 
      Sqrt[1 - Norm[#]^2]]] &[(1 - t) InverseStereo[p1][[;; 2]] + 
    t InverseStereo[p2][[;; 2]]];

DynamicModule[{cols = 
   RGBColor /@ {"#EDF2F6", "#FF5656", "#6A7EFC", "#494953"},
  n = 3,
  m = 72,
  pts,
  t
  },
 Manipulate[
    t = Mod[s, n/m];
    pts = 
     Table[{{Cos[2 ?/n (t + a) + ?/6], 
        Sin[2 ?/n (t + a) + ?/6]},
       {Cos[-2 (n - 1) ?/n (t + a) + ?/6], 
        Sin[-2 (n - 1) ?/n (t + a) + ?/6]}},
      {a, 0, 1 - n/m, n/m}];
    Show[
     ParametricPlot[
      Evaluate[hypgeo[#[[1]], #[[2]], r] & /@ pts], {r, 0, 1},
      PlotStyle -> (If[EvenQ[Floor[s/(n/m)]], #, 
           Reverse[#]] &[{Directive[cols[[3]], Thickness[.00275]], 
          Directive[cols[[2]], Thickness[.00275]]}]), Axes -> False],
     Graphics[{Thickness[.004], cols[[1]], Circle[], cols[[2]]}],
     Background -> cols[[-1]], PlotRange -> 1.2, ImageSize -> 540
     ],
    {s, 0., 2 n/m - #, #}] &[n/(24 m)]
 ]

```

---

<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 1, 2016, 8:36pm UTC](https://community.wolfram.com/t/gif-stripes-hyperbolic-geodesics/9697/2 "2016-12-01T20:36:29Z")

</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!
