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.
Intuitively, a self-similar set is one that is composed of smaller copies of itself.
The Koch curve is composed of four subsets, each scaled by $1/3$.
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.
The Spierpinski triangle is composed of three subsets, each scaled by $1/2$.
A semi-realistic fern
A square is made of four pieces, each scaled by $1/2$
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.
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.
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}$$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}$$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.
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.
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.
$\displaystyle M = \begin{pmatrix}1&0\\0&-1\end{pmatrix}$ adds 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}$$$\displaystyle M = \begin{pmatrix}1/3&0\\0&2/3\end{pmatrix}$ scales by different amounts in different directions
$$\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}$$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}\]The effect of 1 application of Barnsley's IFS to an initial set, together with the attractor.
Images of self-similar sets are typically generated with an iterative procedure.
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.
The initial approximation has no bearing on the attractor, which is determined only by the IFS.
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]]
]