Self-similarity

Barnsley's fern

Today, we're jumping into our last unit of the semester - self-similarity and it's generalizations. This is a fundamental part of fractal geometry and, as we'll see, linear algebra is a crucial component.

Intuition

Intuitively, a self-similar set is one that is composed of smaller copies of itself.

Koch curve

The Koch Curve and it's decomposition

The Koch curve is composed of four subsets, each scaled by $1/3$.

Koch zoom

Zooming into the Koch curve

As we zoom into the Koch curve, we see details at all levels - an observed property of natural objects that fractals are meant to capture.

Sierpinski triangle

The colored Sierpinski triangle

The Spierpinski triangle is composed of three subsets, each scaled by $1/2$.

Barnsley's fern

A fern

A semi-realistic fern

Square?

A square?

A square is made of four pieces, each scaled by $1/2$

Iterated function systems

Self-similar sets are described mathematically by iterated function systems - which are simply lists of functions that specify how the whole maps onto the parts.

Defintions

  • A function \(f:\mathbb{R}^n\to \mathbb{R}^n\) will be called a contraction if there is a real number \(r\) such that \(0<r<1\) and \(|f(x)-f(y)| \leq r|x-y|\) for all \(x,y\) in \(\mathbb{R}^n.\)
    • If \(|f(x)-f(y)| = r|x-y|\) for all \(x,y\) in \(\mathbb{R}^n,\) then \(f\) is called a similarity and the number \(r\) is called its contraction ratio.
  • An iterated function system (or IFS) on \(\mathbb{R}^n\) is simply a non-empty, finite collection of contractions of \(\mathbb{R}^n.\) We will usually express an IFS in the form \(\left\{f_i\right\}_{i=1}^m\) where \(m\) is the number of functions in the IFS.
  • If \(\left\{f_i\right\}_{i=1}^m\) is an IFS of similarities, the list \(\left\{r_i\right\}_{i=1}^m\) of corresponding contraction ratios is called the contraction ratio list of the IFS.

Main Theorem

Let \(\left\{f_i\right\}_{i=1}^m\)be an IFS of contractions defined on \(\mathbb{R}^n.\) Then there is a unique non-empty, closed, bounded set \(E\) in \(\mathbb{R}^n\) such that \[E= \underset{i=1}{\overset{m}{\bigcup }}f_i(E).\]

That set is called the attractor or invariant set of the IFS.

Square

The solid unit square is the invariant set of

$$\begin{align} f_1(\vec{x}) &= \vec{x}/2 \\ f_2(\vec{x}) &= \vec{x}/2 + \langle 1/2,0 \rangle \\ f_3(\vec{x}) &= \vec{x}/2 + \langle 1/2, 1/2 \rangle \\ f_4(\vec{x}) &= \vec{x}/2 + \langle 0, 1/2 \rangle. \end{align}$$

Sierpinski triangle

The Sierpinski triangle is the invariant set of

$$\begin{align} f_1(\vec{x}) &= \vec{x}/2 \\ f_2(\vec{x}) &= \vec{x}/2 + \langle 1/2,0 \rangle \\ f_3(\vec{x}) &= \vec{x}/2 + \langle 1/4, \sqrt{3}/4 \rangle. \end{align}$$

Koch curve

The Koch curve is the invariant set of

$$\begin{align} f_1(\vec{x}) &= \vec{x}/3 \\ f_2(\vec{x}) &= R_{\pi/3}\,\vec{x}/3 + \langle 1/3,0 \rangle \\ f_3(\vec{x}) &= R_{-\pi/3}\,\vec{x}/3 + \langle 1/2, \sqrt{3}/6 \rangle \\ f_4(\vec{x}) &= \vec{x}/3 + \langle 2/3, 0 \rangle, \end{align}$$

where $R_{\theta}$ is the rotation matrix we studied when discussing complex eigenvalues.

More complicated examples

Most often, iterated function systems on $\mathbb R^n$ are defined using affine functions - i.e., functions of the form $$f(\vec{x}) = A\,\vec{x}+\vec{b},$$ where $A\in\mathbb R^{n\times n}$. Thus, we need an understanding of the geometric action of matrices to understand these things.

Spiral

This interactive spiral consists of 2 pieces - a larger black one scaled down a tiny bit and rotated together with a smaller blue one scaled down by $1/10$ and shifted to the right.

Koch with reflection

$\displaystyle M = \begin{pmatrix}1&0\\0&-1\end{pmatrix}$ adds reflection:

A Koch-type curve with reflection $$\begin{align} f_1(\vec{x}) &= \vec{x}/3 \\ f_2(\vec{x}) &= R_{\pi/3}\,M\,\vec{x}/3 + \langle 1/3,0 \rangle \\ f_3(\vec{x}) &= R_{-\pi/3}\,M\,\vec{x}/3 + \langle 1/2, \sqrt{3}/6 \rangle \\ f_4(\vec{x}) &= \vec{x}/3 + \langle 2/3, 0 \rangle, \end{align}$$

Different compression ratios

$\displaystyle M = \begin{pmatrix}1/3&0\\0&2/3\end{pmatrix}$ scales by different amounts in different directions

A self-similar set with different compression ratios $$\begin{align} f_1(\vec{x}) &= M\vec{x} \\ f_2(\vec{x}) &= M\,\vec{x} + \langle 1/3,1/3 \rangle \\ f_3(\vec{x}) &= M\,\vec{x} + \langle 2/3, 0 \rangle, \end{align}$$

Barnsley's IFS

The IFS for Barnsley's fern:

\[\begin{array}{ccc} f_1(x) & = & \left(\! \begin{array}{cc} .85 & .04 \\ -.04 & .85 \\ \end{array} \! \right) x + \left(\! \begin{array}{c} 0 \\ 1.6 \\ \end{array} \! \right) \\ f_2(x) & = & \left(\! \begin{array}{cc} -.15 & .28 \\ .26 & .24 \\ \end{array} \! \right) x + \left(\! \begin{array}{c} 0 \\ .44 \\ \end{array} \! \right) \\ f_3(x) & = & \left(\! \begin{array}{cc} .2 & -.26 \\ .23 & .22 \\ \end{array} \! \right) x + \left(\! \begin{array}{c} 0 \\ 1.6 \\ \end{array} \! \right) \\ f_4(x) & = & \left(\! \begin{array}{cc} 0 & 0 \\ 0 & .16 \\ \end{array} \! \right) x \\ \end{array}\]

Barnsley's approximation

Approximating Barnsley's ferns

The effect of 1 application of Barnsley's IFS to an initial set, together with the attractor.

Iteration

Iterative approximation of the Sierpinski triangle

Images of self-similar sets are typically generated with an iterative procedure.

Iteration of an IFS

Given an iterated function system \(\left\{f_i\right\}_{i=1}^m,\) we define a function \(T\) that maps the collection of closed, bounded subsets of \(\mathbb{R}^n\) to itself by \[T(K) = \underset{i=1}{\overset{m}{\bigcup }}f_i(K).\] It turns out that if we start with an arbitrary non-empty, closed, bounded subset of \(\mathbb{R}^n\) and iterate \(T,\) then the generated sequence of sets converges in a natural sense to the invariant set of the IFS.

An odd initial set

Iterative approximation of the Sierpinski triangle with a different starting set

The initial approximation has no bearing on the attractor, which is determined only by the IFS.

An IFS app

I've got a little web application where you can explore iterated function systems on your own. You can define an IFS in the input box in the upper left and hit the generate button to see the resulting fractal.

IFS app (cont)

You specify an affine function using input like [M,v], where M is a 2 by 2 array representing a matrix and v is a an array of length 2 representing a vector. An IFS is then an array of affine functions. Here, for example, is a representation of the Sierpinski triangle:


							M = [[1/2,0],[0,1/2]];
							[
							  [M,[0,0]],
							  [M,[1/2,0]],
							  [M,[1/4,sqrt(3)/4]]
							]