When does a fractal tree stay bounded, and when does it explode off to infinity? In the last post we looked at a few fractal trees and set up an interactive demo so we could get some intuition on what fractal trees and how their parameters influence how they look. Now let’s dive into some of the math behind them.

If you play around with the demo you’ll see that as you increase the scale parameters the tree quickly expands to fill the entire screen (though the demo automatically rescales things to counteract that somewhat). The demo only goes out to 100 layers from the root which is usually enough to be visually indistinguishable from an arbitrary number of iterations. However, in certain cases it may seem like the tree stops growing when really it has reached the limits of the demo. So the question is: when does the tree grow endlessly and when does it stay bounded? In order to answer this we’ll need to set up some formal definitions so that we have a firm base to build from.

A tree is a structure on the complex plane defined by four parameters: two rotation angles ${\theta }_{1},{\theta }_{2}\in \left[-\pi ,\pi \right]$ and two scaling factors ${s}_{1},{s}_{2}\in {\mathbb{R}}^{+}$. You could alternatively use two arbitrary complex numbers, but keeping the rotation and scale separate is useful later. A tree is composed of branches, a branch is a line segment on the complex plane and will be written as $\left(x,y\right)$. The branches that make up a given tree are defined as follows:

1. $\left(0,i\right)$ is a branch in the tree
2. If $\left(x,y\right)$ is a branch in the tree, then $\left(y,y+{s}_{1}{e}^{i{\theta }_{1}}\left(y-x\right)\right)$ and $\left(y,y+{s}_{2}{e}^{i{\theta }_{2}}\left(y-x\right)\right)$ are also branches in the tree

In other words, at the end of each branch we can add two more branches by rotating and scaling the previous branch according to the tree’s parameters. We could instead choose $\left(0,1\right)$ as the initial branch which might feel a bit more natural, but I like $\left(0,i\right)$ because it rotates the tree upright on a standard plot of the complex plane. This definition works well to showcase the recursive structure baked into these trees and is nicely compact and concise. However, it can be a bit difficult to work with when we want to start proving things. To that end, we’ll also set up an alternative definition based on infinite series which will let us take advantage of a lot of powerful pre-existing math.

A path is a sequence $\left({d}_{k}{\right)}_{k=1}^{\mathrm{\infty }}$ over the set $\left\{1,2\right\}$. It indicates a sequence of turns taken starting at the root of a tree, moving higher in the tree with each step.

Given a path $\left({d}_{k}{\right)}_{k=1}^{\mathrm{\infty }}$, let

${b}_{k}=\left\{\begin{array}{ll}i,& k=0\\ i\prod _{j=1}^{k}{s}_{{d}_{j}}{e}^{i{\theta }_{{d}_{j}}},& k\ge 1\end{array}$ ${p}_{k}=\sum _{j=0}^{k}{b}_{j}$

For any path and its corresponding sequence $\left({p}_{k}{\right)}_{k=0}^{\mathrm{\infty }}$, $\left({p}_{k},{p}_{k+1}\right)$ is a branch in the tree for all $k\in {\mathbb{Z}}_{\ge 0}$

Show proof

Proceed by induction.

We have that ${p}_{0}=i$ and ${p}_{1}=i+i{s}_{{d}_{1}}{e}^{i{\theta }_{{d}_{1}}}$. Since $\left(0,i\right)$ is a branch in the tree, then $\left({p}_{0},{p}_{1}\right)=\left(i,i+{s}_{{d}_{1}}{e}^{i{\theta }_{{d}_{1}}}\left(i-0\right)\right)$ is also a branch in the tree by the second rule in the definition of a tree.

Now, assume that $\left({p}_{k-1},{p}_{k}\right)$ is a branch in the tree. We have that

$\begin{array}{rl}& {p}_{k+1}-{p}_{k}\\ =& {b}_{k+1}\\ =& {s}_{{d}_{k+1}}{e}^{i{\theta }_{{d}_{k+1}}}{b}_{k}\\ =& {s}_{{d}_{k+1}}{e}^{i{\theta }_{{d}_{k+1}}}\left({p}_{k}-{p}_{k-1}\right)\end{array}$

Therefore

$\begin{array}{rl}& \left({p}_{k},{p}_{k+1}\right)\\ =& \left({p}_{k},{p}_{k}+{p}_{k+1}-{p}_{k}\right)\\ =& \left({p}_{k},{p}_{k}+{s}_{{d}_{k+1}}{e}^{i{\theta }_{{d}_{k+1}}}\left({p}_{k}-{p}_{k-1}\right)\right)\end{array}$

And $\left({p}_{k},{p}_{k+1}\right)$ is a branch in the tree.

Therefore, by induction $\left({p}_{k},{p}_{k+1}\right)$ is a branch in the tree for all $k\ge 0$. $◼$

For every branch $\left(x,y\right)$ in the tree except $\left(0,i\right)$, there is at least one path and corresponding sequence $\left({p}_{k}{\right)}_{k=0}^{\mathrm{\infty }}$ such that $x={p}_{k}$ and $y={p}_{k+1}$ for some $k\in {\mathbb{Z}}_{\ge 0}$.

Show proof

This is a fairly simple induction proof, but relies on structural induction rather than regular induction.

For the base case, we start with the children of the root: $\left(i,i+i{s}_{1}{e}^{i{\theta }_{1}}\right)$ and $\left(i,i+i{s}_{2}{e}^{i{\theta }_{2}}\right)$. Each of these can be reached with any path that starts with ${d}_{1}=1$ or ${d}_{1}=2$ respectively. In that case you have for $k=0$, ${p}_{k}=i$ and ${p}_{k+1}=i+i{s}_{{d}_{1}}{e}^{i{\theta }_{{d}_{1}}}$.

Now we assume that $\left(x,y\right)$ is a branch in the tree which can be reached by the path $\left({d}_{j}{\right)}_{j=1}^{\mathrm{\infty }}$ such that $x={p}_{k}$ and $y={p}_{k+1}$ for some $k$. Another branch can be constructed using the rule involving ${s}_{1}$ and ${\theta }_{1}$ (the proof is identical for ${s}_{2}$ and ${\theta }_{2}$). This new branch is then:

$\begin{array}{rl}& \left({p}_{k+1},{p}_{k+1}+{s}_{1}{e}^{i{\theta }_{1}}\left({p}_{k+1}-{p}_{k}\right)\right)\\ =& \left({p}_{k+1},{p}_{k+1}+{s}_{1}{e}^{i{\theta }_{1}}\left({b}_{k+1}\right)\right)\end{array}$

If we take any path $\left({f}_{j}{\right)}_{j=1}^{\mathrm{\infty }}$ such that ${f}_{j}={d}_{j}$ for $j\le k+1$ and ${f}_{k+2}=1$. Then we have:

$\begin{array}{rl}& \left({p}_{k+1},{p}_{k+1}+{s}_{1}{e}^{i{\theta }_{1}}\left({b}_{k+1}\right)\right)\\ =& \left({p}_{k+1},{p}_{k+1}+{b}_{k+2}\right)\\ =& \left({p}_{k+1},{p}_{k+2}\right)\end{array}$

Therefore if a branch can be reached with a path then both of its children can also be reached by a path.

And so by structural induction, we have that all branches in the tree can be reached by at least one path. $◼$

A branch can be reached by a path as defined above if and only if it is part of the tree.

Previous two lemmas

So what does all this mean? Essentially, we pick some path up the tree and specify it by the series of left and right turns you make each time a branch splits into two more branches. $\left({b}_{k}{\right)}_{k=0}^{\mathrm{\infty }}$ is then the branch you visit at each step in the path with one end translated down to the origin, and $\left({p}_{k}{\right)}_{k=0}^{\mathrm{\infty }}$ is the sequence of junction points you reach as you follow the path. Finally, you can reconstruct the path by connecting consecutive elements of the $\left({p}_{k}{\right)}_{k=0}^{\mathrm{\infty }}$ sequence. Most importantly, this view of picking a path up the tree is equivalent to the recursive definition.

Now that we have this all set up, we can put some bounds on our trees.

A tree is bounded if all branches $\left(x,y\right)$ in the tree are within some radius $R$ of the origin. That is, $|x|,|y|\le R$ for all branches in the tree for some $R\in {\mathbb{R}}^{+}$

A tree with ${s}_{1}>1$ or ${s}_{2}>1$ is unbounded.

Show proof

We can prove this by contradiction. Suppose without loss of generality that ${s}_{1}>1$ and that the tree is bounded with radius $R$. Take the path ${d}_{k}=1$ for all $k$, and corresponding sequence $\left({p}_{k}{\right)}_{k=0}^{\mathrm{\infty }}$. Let $k>{\mathrm{log}}_{{s}_{1}}2R$ then

$\begin{array}{rl}{b}_{k}& =i\prod _{j=1}^{k}{s}_{1}{e}^{i{\theta }_{1}}=i{s}_{1}^{k}{e}^{ik{\theta }_{1}}\\ |{b}_{k}|& ={s}_{1}^{k}>2R\end{array}$

That is, we can find a individual branch in the tree whose length is greater than $2R$. Now, since we assumed the tree is bounded and $\left({p}_{k-1},{p}_{k}\right)$ is a branch in the tree, $|{p}_{k-1}|,|{p}_{k}|\le R$

$\begin{array}{rl}{p}_{k}& ={b}_{k}+{p}_{k-1}\\ |{p}_{k}|& =|{b}_{k}+{p}_{k-1}|\\ & \ge |{b}_{k}|-|{p}_{k-1}|\\ & >2R-R\\ & =R\\ {p}_{k}& >R\end{array}$

Which is a contradiction. Therefore, the tree cannot be bounded with ${s}_{1}>1$ or ${s}_{2}>1$. $◼$

A tree with ${s}_{1}<1$ and ${s}_{2}<1$ is bounded

Show proof

Let $\stackrel{^}{s}=max\left({s}_{1},{s}_{2}\right)$. Note $|{b}_{0}|=|i|=1$, and for $k\ge 1$

Therefore $|{b}_{k}|\le {\stackrel{^}{s}}^{k}$.

$\begin{array}{rl}|{p}_{k}|& =|\sum _{j=0}^{k}{b}_{j}|\\ & \le \sum _{j=0}^{k}|{b}_{j}|\\ & \le \sum _{j=0}^{k}{\stackrel{^}{s}}^{j}\\ & \le \frac{1}{1-\stackrel{^}{s}}\end{array}$

Therefore, for any branch $\left(x,y\right)$ we have

$x,y\le \frac{1}{1-\stackrel{^}{s}}$

And the tree is bounded. $◼$

The remaining case is when either scale factor is exactly one. Within that case are a few interesting subcases. For one, if we have ${s}_{1}=1$ and ${\theta }_{1}=0$ we get a tree with straight vertical line and the tree is unbounded. With ${s}_{1}=1$, ${\theta }_{1}\ne 0$, and ${s}_{2}<1$, the branches that don’t shrink stay contained in circular loops and so you end up with lots of loops branching off of each other but the tree stays bounded. If ${s}_{1},{s}_{2}=1$ and ${\theta }_{1}\ne {\theta }_{2}$, then the tree is again unbounded. If ${s}_{1},{s}_{2}=1$ and ${\theta }_{1}={\theta }_{2}$ we end up with a single circular loop which is bounded.

A tree with a scale factor $s=1$ and rotation angle $\theta \ne 0$ forms loops of radius $\frac{1}{2}\mathrm{sec}\left(\frac{\pi -\theta }{2}\right)$

Show proof

This can be shown geometrically.

You can also play with this interactive version on GeoGebra.

Here we have two adjacent branches with the second scaled by 1 and rotated by $\theta$. The dashed circle indicates that the two branches have equal length. We can draw the solid circle with the three endpoints of the two segments on the border because any three points describe a circle.

In order to derive the formula we need to first show that the two angles labeled $\varphi$ are in fact equal. That can be done by connecting all three endpoints of the segments to the center of the solid circle and showing that the two triangles formed are congruent isosceles triangles which implies that the two angles are in fact equal.

Second, we use the fact that the perpendicular bisector of a chord passes through the center of the circle to draw the right triangle shown in the diagram which connects the shared endpoint of the two segments, the center of the solid circle, and the midpoint of the second segment.

We can then use some basic trigonometry to derive the relationship:

$\frac{0.5}{r}=\mathrm{cos}\left(\varphi \right)$

We can then use $2\varphi +\theta =\pi ⇒\varphi =\frac{\pi -\theta }{2}$ and rearrange the equation to get:

$r=|\frac{1}{2}\mathrm{sec}\left(\frac{\pi -\theta }{2}\right)|$

You can show that all the branches that come from these parameters lie on the same circle by rotating the entire diagram by $\theta$ and repeating the same argument. $◼$

Note that as $\theta$ approaches zero the formula gives us a radius that approaches infinity. A circle with a radius of infinity can be thought of as equivalent to a straight line which is what we get with $\theta =0$.

A tree with ${s}_{1}=1,{s}_{2}<1$ and ${\theta }_{1}\ne 0$ is bounded.

Show proof

Take any branch $\left(x,y\right)$ and its corresponding path $\left({d}_{k}{\right)}_{k=1}^{n}$.

The path can be broken into a stretches of ones and twos. That is, a pattern like $1,...,2,...,1,...,2,...$ potentially with zero ones in the first stretch.

Every stretch of repeated ones is bounded since all such branches lie on a circle of radius $r=|\frac{1}{2}\mathrm{sec}\left(\frac{\pi -{\theta }_{1}}{2}\right)|$. Therefore, any sum

$|\sum _{k=1}^{m}{s}_{1}^{k}{e}^{ik{\theta }_{1}}|\le 2r=|\mathrm{sec}\left(\frac{\pi -{\theta }_{1}}{2}\right)|$

Similarly, every stretch of repeated twos is bounded due to the lemma above showing trees with scale factor < 1 are bounded.

$|\sum _{k=1}^{m}{s}_{2}^{k}{e}^{ik{\theta }_{2}}|\le \frac{1}{1-{s}_{2}}$

Let ${x}_{k}$ be sequence of run lengths for each stretch of ones and ${y}_{k}$ be the sequence of run lengths for each stretch of twos. Then we can break apart the repeated pattern of a stretch of ones followed by a stretch of twos to put a bound on the whole series. Note that each subsequent sequence of twos adds some number of ${s}_{2}$ factors, but we can put an upper bound on this by reducing to just one ${s}_{2}$ per sequence of twos since ${s}_{2}<1$. That lets us bound the sequence as follows:

$\begin{array}{rl}|{p}_{k}|& =|i\sum _{j=0}^{k}{b}_{j}|=|\sum _{j=0}^{k}{b}_{j}|\\ & \le |\sum _{j=0}^{k}{s}_{2}^{j}\left(\sum _{l=1}^{{x}_{j}}{e}^{il{\theta }_{1}}+{e}^{i{x}_{j}{\theta }_{1}}\sum _{l=1}^{{y}_{j}}{s}_{2}^{l}{e}^{il{\theta }_{2}}\right)|\\ & \le \sum _{j=0}^{k}{s}_{2}^{j}\left(|\sum _{l=1}^{{x}_{j}}{e}^{il{\theta }_{1}}|+|\sum _{l=1}^{{y}_{j}}{s}_{2}^{l}{e}^{il{\theta }_{2}}|\right)\\ & \le \sum _{j=0}^{k}{s}_{2}^{j}\left(|\mathrm{sec}\left(\frac{\pi -{\theta }_{1}}{2}\right)|+\frac{1}{1-{s}_{2}}\right)\\ & =\left(\sum _{j=0}^{k}{s}_{2}^{j}\right)\left(|\mathrm{sec}\left(\frac{\pi -{\theta }_{1}}{2}\right)|+\frac{1}{1-{s}_{2}}\right)\\ & \le \frac{1}{1-{s}_{2}}\left(|\mathrm{sec}\left(\frac{\pi -{\theta }_{1}}{2}\right)|+\frac{1}{1-{s}_{2}}\right)\end{array}$

Which is constant with respect to $k$, therefore every branch in this tree is bounded. $◼$

A tree ${s}_{1},{s}_{2}=1$ and ${\theta }_{1}\ne {\theta }_{2}$ is unbounded.

Show proof

The goal here is to construct a finite-length pattern which ends with a branch facing straight up (i.e. with an angle of 0) which doesn’t double back to the root of the tree. Repeating such a pattern of branches leads to a path which continues out in a way that avoids falling into a closed circle. To do this we’ll use a pattern from group theory called the commutator, i.e. $ab{a}^{-1}{b}^{-1}$.

In particular we’re going to make use of the fact that the total rotation over a sequence of branches is independent of their order (i.e. commutative), while the final position is not. We’ll show that we can construct $-\theta$ (or an approximation) as an integer multiple of $\theta$ which will be the inverse in this case. Then we’ll show that the commutator pattern is a way to sequence these turns which satisfies the conditions above.

First, let’s investigate which angles we can construct with a given branching angle. Let $\theta$ be a branching angle, it’s obvious that one application of this angle from the root gives us a rotation of $\theta$. A second application gives us an angle of $2\theta$. Note that this isn’t the angle from the origin to the end of the branch, it’s the orientation of the branch itself. So obviously we can construct the angle $k\theta$ for any $k$, but eventually that wraps around past $2\pi$ so what unique angles does that actually give us? Well, we’ve constructed the Circle Group so we can take some results from there. At this point there is a divide between angles which are a rational multiple of $2\pi$ and angles which are an irrational multiple of $2\pi$. We’ll call an angle which is a rational multiple of $2\pi$ a “rational angle” and an angle which is an irrational multiple of $2\pi$ an “irrational angle.”

Multiples of rational angles will go to finitely many unique angles. In fact, if the angle is $\frac{p}{q}2\pi$ with $\frac{p}{q}$ in reduced form, there will be $q$ unique angles at $\frac{k}{q}2\pi$ for $0\le k. Notably, this set of unique angles is a subgroup of the circle group which means that for every angle that you can construct, you can also construct its negation (this is part of the definition of a group).

Multiples of irrational angles will go to infinitely many unique angles, and in fact any angle can be approximated arbitrarily well by an integer multiple of an irrational angle.

So, for a rational angle we can take $\theta$ as $x$ and $-\theta$ as ${x}^{-1}$. We know that $-\theta$ can be constructed by repeated rotations by $\theta$ by the argument above. For an irrational angle, we can take $\theta$ and an arbitrarily close approximation of $-\theta$ which we can also construct by repeated applications of $\theta$.

We then can take the sequence:

${e}^{i{\theta }_{1}}+{e}^{i{\theta }_{1}}{e}^{i{\theta }_{2}}+{e}^{i{\theta }_{1}}{e}^{i{\theta }_{2}}\sum _{j=1}^{k}{e}^{ij{\theta }_{1}}+{e}^{i{\theta }_{1}}{e}^{i{\theta }_{2}}{e}^{ik{\theta }_{1}}\sum _{j=1}^{l}{e}^{ij{\theta }_{2}}$

Where $k,l$ are selected so that ${e}^{ik{\theta }_{1}}={e}^{-i{\theta }_{1}}$ and ${e}^{il{\theta }_{2}}={e}^{-i{\theta }_{2}}$ or at least approximately equal in the case of irrational angles. We can then reduce $\sum _{j=1}^{k}{e}^{ij{\theta }_{1}}$ to $-1$ as follows:

$\begin{array}{rl}& \sum _{j=1}^{k}{e}^{ij{\theta }_{1}}\\ =& \frac{{e}^{i{\theta }_{1}}\left(1-{e}^{ik{\theta }_{1}}\right)}{1-{e}^{i{\theta }_{1}}}\\ =& \frac{{e}^{i{\theta }_{1}}\left(1-{e}^{-i{\theta }_{1}}\right)}{1-{e}^{i{\theta }_{1}}}\frac{1-{e}^{-i{\theta }_{1}}}{1-{e}^{-i{\theta }_{1}}}\\ =& \frac{-\left(2-{e}^{i{\theta }_{1}}-{e}^{-i{\theta }_{1}}\right)}{2-{e}^{i{\theta }_{1}}-{e}^{-i{\theta }_{1}}}=-1\end{array}$

Which is undefined when ${e}^{i{\theta }_{1}}=1⇒{\theta }_{1}=0$, but in that case the tree is unbounded anyway because we have a straight vertical line. Similar holds for ${\theta }_{2}$. Now the sequence above becomes:

$\begin{array}{rl}& {e}^{i{\theta }_{1}}+{e}^{i{\theta }_{1}}{e}^{i{\theta }_{2}}-{e}^{i{\theta }_{1}}{e}^{i{\theta }_{2}}-{e}^{i{\theta }_{1}}{e}^{i{\theta }_{2}}{e}^{-i{\theta }_{1}}\\ =& {e}^{i{\theta }_{1}}-{e}^{i{\theta }_{2}}\end{array}$

This is non-zero whenever ${\theta }_{1}\ne {\theta }_{2}$. Note that the last term in this series, before all the simplification, is ${e}^{i{\theta }_{1}}{e}^{i{\theta }_{2}}{e}^{-i{\theta }_{1}}{e}^{-i{\theta }_{2}}=1$. Therefore, by repeating this sequence of branches we can travel arbitrarily far from the origin and the tree is unbounded. $◼$

This proof does gloss over the irrational angle case somewhat. To be more thorough you would need to show that a close approximation of ${e}^{-i\theta }$ leads to a close approximation of the final term. However, the core argument doesn’t change so this case is mostly omitted for the sake of brevity in an already long proof.

A tree is bounded if and only if one of the following is true (for some ordering of ):

1. ${s}_{1},{s}_{2}<1$

Previous lemmas