# The Barnsley Fern Michael Barnsley is an English mathematician born in 1946.

The code developed by Barnsley is an example of an iterated function system.  The code is composed of four affine transformations.  $$85 \%$$ of the code is the affine transformation

$$f_1 (x,y) = \begin{bmatrix} 0.85 & 0.04\\ -0.04 & 0.85 \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} + \begin{bmatrix} 0\\1.6 \end{bmatrix}$$

The original grey rectangle from image $$2$$ has been shrunk slightly, rotated clockwise slightly and translated upwards by $$1.6$$. This produces all the small fronds of the fern.

$$7 \%$$ of the code is the affine transformation

$$f_2 (x,y) = \begin{bmatrix} 0.20 & -.0.26\\ 0.23 & 0.22 \end{bmatrix} \begin{bmatrix}x \\ y \end{bmatrix} + \begin{bmatrix}0 \\ 1.6 \end{bmatrix}$$

It shrinks the grey rectangle, rotates it counter-clockwise and translates it upwards by $$1.6$$. This produces the lower, lefthand frond.

$$7 \%$$  of the code is the affine transformation

$$f_3 (x,y) = \begin{bmatrix} -0.15 & 0.28 \\ 0.26 & 0.24 \end{bmatrix} \begin{bmatrix}x \\ y \end {bmatrix} + \begin{bmatrix} 0 \\ 0.44 \end{bmatrix}$$

Here it shrinks the rectangle, rotates it clockwise and reflects it.  Then it is translated upwards by $$0.44$$.  This produces the lower, righthand frond.

The smiley face can help you see the affine transform.

Finally, $$1 \%$$ of the code is the affine transformation

$$f_4 (x, y) = \begin{bmatrix} 0 & 0\\ 0 & 0.16 \end{bmatrix} \begin{bmatrix} x \\y \end{bmatrix} + \begin{bmatrix} 0 \\0 \end{bmatrix}$$

This is the stem of the fern consisting of a vertical line.  © OldTrout $$2018$$