## Bifurcation Diagram

Generating the famous fractal, which can be used to model populations with various cycles, generate pseudo-random numbers and determine one of nature’s fundamental constants, the Feigenbaum constant $\delta$.
The fractal nature comes from iteratively applying a simple function, $f(x) = \lambda \cdot x \cdot (1-x)$ with $0 \leq \lambda \leq 4$, and looking at its poles.
The resulting image looks mundane at first, when looking at $0 \leq \lambda \leq 3$, though the last quarter section is where the interesting things are happening (hence the image below only shows the diagram for $2 \leq \lambda \leq 4$).
From $\lambda = 3$ on, the diagram bifurcates, always doubling its number of poles, until it enters the beautiful realm of chaos and fractals.

For more on bifurcation, fractals and $\delta$, I refer to this Wikipedia entry and WolframMathworld.

# Python 2.7.7 Code
# Jonathan Frech, 24th of March 2017

## Haferman Carpet

The Haferman Carpet is a fractal, which kind of looks like a woven carpet. To generate it, you start with a single black pixel and apply in each cycle a set of rules.
In each generation every pixel in the carpet will be replaced by nine pixels according to the rules. A black pixel is represented by a 0, a white one by a 1.

#### The rules

• $0 \rightarrow \left( \begin{array}{ccc}1&0&1\\0&1&0\\1&0&1\end{array} \right) \text{and } 1 \rightarrow \left( \begin{array}{ccc}0&0&0\\0&0&0\\0&0&0\end{array} \right)$

# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 26th of February, 2016