rm-hull / barnsley-fern.cljs
Last updated

The Barnsley Fern is a fractal named after the British mathematician Michael Barnsley who first described it in his book Fractals Everywhere. The fern is one of the basic examples of self-similar sets, i.e. it is a mathematically generated pattern that can be reproducible at any magnification or reduction. Like the Sierpinski triangle, the Barnsley fern shows how graphically beautiful structures can be built from repetitive uses of mathematical formulas with computers. The fern code developed by Barnsley is an example of an iterated function system (IFS) to create a fractal; this is translated into the below code using big-bang to compute successive values of (x,y) using a randomly chosen affine transform.

Fork me on GitHub!