Larry Riddle, Agnes Scott College

## Flowsnake

#### Description

Start with a pattern of seven regular hexagons. Eight vertices are connected as shown above to create the basic red motif. The red line segments are oriented by the arrows. Now replace each red line segment by a copy of the motif scaled by r = $$1/ \sqrt 7$$ such that the copy lies to the left of the oriented edge it is replacing. Notice that this will place the copy of the motif inside the hexagon containing that edge. This recursive procedure is continued and in the limit will produce the image called William Gosper's flowsnake.

Iteration

Click the iterations to the left for an illustration of how each iteration of the flowsnake is formed from the previous iteration.

#### IteratedFunctionSystem

Animation

With the hexagons and motif located as shown above, we get the following IFS where $$A = \arcsin \left( {\frac{{\sqrt 3 }}{{2\sqrt 7 }}} \right) \approx {19.1066^ \circ }$$ [Details].

 $${f_1}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { -1/ \sqrt 14} & {3\sqrt 3 /14 } \\ {-3\sqrt 3 /14} & { -1/ \sqrt 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {1/14 } \\ {3\sqrt 3 /14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A-120° $${f_2}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/14} & {- \sqrt 3 / 14} \\ { \sqrt 3 / 14} & { 5/14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {1/14 } \\ {3\sqrt 3 /14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_3}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/14} & {- \sqrt 3 / 14} \\ { \sqrt 3 / 14} & { 5/14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {3/7} \\ {2 \sqrt 3 / 7} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_4}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { -1/ \sqrt 14} & {3\sqrt 3 /14 } \\ {-3\sqrt 3 /14} & { -1/ \sqrt 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {11/14} \\ {5 \sqrt 3 / 14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A-120° $${f_5}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/14} & {- \sqrt 3 / 14} \\ { \sqrt 3 / 14} & { 5/14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {5/14} \\ {\sqrt 3 /14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_6}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { -2/7} & {- \sqrt 3 /7} \\ { \sqrt 3 /7} & { -2/7} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {9/14} \\ {- \sqrt 3 / 14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A+120° $${f_7}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/14} & {- \sqrt 3 / 14} \\ { \sqrt 3 / 14} & { 5/14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {9/14} \\ {- \sqrt 3 / 14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A

4th Iteration

There is an another way to get the flowsnake by working with hexagons directly instead of line segments. In this case start with a hexagon as shown in the figure to the right, make 7 copies scaled by r = $$1 / \sqrt 7$$, rotate them by $$A = \arcsin \left( {\frac{{\sqrt 3 }}{{2\sqrt 7 }}} \right) \approx {19.1066^ \circ }$$, then translate so that six of them exactly surround the seventh. This yields the following IFS [Details].

Animation

 $${f_1}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {\sqrt 3 /14 } \\ {9 /14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_2}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {5 \sqrt 3 /14} \\ {3 /14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_3}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {2 \sqrt 3 /7} \\ {-3/ 7} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_4}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {- \sqrt 3/14} \\ {-9/ 14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_5}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {-5 \sqrt 3 /14} \\ {-3 /14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_6}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {-2 \sqrt 3/7} \\ {3/7} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_7}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}}$$ scale by $$1/ \sqrt{7}$$, rotate by A

Boundary
Animation
(one edge)

The boundary of the flowsnake can be obtained through an iterative construction that replaces the line segments forming the boundary of the hexagon used in the IFS above with the following zigzag motif, where each of the three smaller segments have been scaled by $$1 / \sqrt 7$$.

The following iterated function system would give the top right edge of the boundary. The matrix would be repeated for the other five edges with changes to the translation vectors [Details].

 $${f_1}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {\sqrt 3 /14} \\ {9 /14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A $${f_2}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 2/ 7} & {\sqrt 3 /7 } \\ {-\sqrt 3 /7} & { 2/ 7} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {\sqrt 3 /14} \\ {9/14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A-60 $${f_3}({\bf{x}}) = \left[ {\begin{array}{*{20}{c}} { 5/ 14} & {-\sqrt 3 /14 } \\ {\sqrt 3 /14} & { 5/ 14} \\ \end{array}} \right]{\bf{x}} + \left[ {\begin{array}{*{20}{c}} {5\sqrt 3 /14} \\ {3/14} \\ \end{array}} \right]$$ scale by $$1/ \sqrt{7}$$, rotate by A

#### L-System

L-System
Animation

The following L-system generates the Peano-Gosper curve, a space-filling curve whose limit set is the flowsnake.

Angle 60
Axiom F
F—>F−G−−G+F++FF+G−
G—>+F−GG−−G−F++F+G

4 iterations (initial direction 90°)

Boundary
L-System
Animation
This boundary can by obtained with the following L-system:

Angle 60
Axiom F+F+F+F+F+F+
F —> F−F+F

The initial direction for the L-system for the boundary of iteration $$n$$ can be taken to be $$90^\circ+n\cdot A$$ where $$A = \arcsin \left( {\frac{{\sqrt 3 }}{{2\sqrt 7 }}} \right) \approx {19.1066^ \circ }$$.

Iteration

Click the buttons to the left to step through the first four iterations of the L-system for the flowsnake boundary.

#### SimilarityDimension

The flowsnake is self-similar with 7 non-overlapping copies of itself, each scaled by the factor r < 1. Therefore the similarity dimension, d, of the attractor of the IFS is the solution to

$\sum\limits_{k = 1}^7 {{r^d}} = 1 \quad \Rightarrow \quad d =\frac{{\log (1/7)}}{{\log (r)}} = \frac{{\log (1/7)}}{{\log (1/ \sqrt 7)}} = 2$

The boundary of the flowsnake is formed from six pieces, each of which is self-similar with 3 non-overlapping copies of itself, each scaled by the factor $$1/\sqrt{7}$$. Therefore the boundary has a fractal dimension of $\frac{{\log (1/3)}}{{\log (1/\sqrt 7)}} = \frac {\log(3)}{\log( \sqrt 7)} = 1.12915$

#### SpecialProperties

The flowsnake is also known as the Gosper Island, a name first used by Mandelbrot. The space-filling curve that fills the flowsnake is known as the Peano-Gosper curve. What we describe here is a mirror image of Martin Gardner's description in his Scientific American article.

The area of the flowsnake is the same as the area of the initial hexagon. As illustrated in the figure to the right, at the first stage of the construction of the boundary, the new zigzag line segments along each edge of the initial hexagon have as much area added outside the hexagon as area is removed from inside the hexagon. Thus this first iteration has the same area as the hexagon. At each step of the iterative construction, the number of edges will continue to increase, but the same balance of adding and subtracting areas will occur, hence the total area will never change. At the limit the area enclosed by the boundary will be exactly the same as the area of the initial hexagon.

Copies of the flowsnake will tile the plane [Example]. Click for details.

#### References

1. Barcellos, Anthony. "The Fractal Geometry of Mandelbrot," The College Mathematics Journal, Vol. 15, No. 2, (1984), 98-114.
2. Gardner, Martin. "Mathematical Games," Scientific American, December 1976, 124-129. [Reprinted in Penrose Tiles to Trapdoor Ciphers, Freeman (1977)
3. Mandelbrot, Benoit. Fractals: Form, Chance, and Dimension, W. H. Freeman and Co., 1977.
4. Mandelbrot, Benoit. The Fractal Geometry of Nature, W.H. Freeman and Co. 1983. [Preview available at Google Books]