In the fascinating and beautiful world of fractals the Barnsley Fern stands out as an early discovered fractal that generates an image of nature. It does this with the simplest of equations and just a few lines of code. When randomly generating green dots recursively with certain probabilities on a black background this fern appears. The fern to the left consists of 500.000 randomly placed green dots.
The coordinates for each green dot are generated based on the coordinates of the previous dot using the following probabilities:
1%:
xn + 1 = 0
yn + 1 = 0.16 yn
85%:
xn + 1 = 0.85 xn + 0.04 yn
yn + 1 = −0.04 xn + 0.85 yn + 1.6
7%:
xn + 1 = 0.2 xn − 0.26 yn
yn + 1 = 0.23 xn + 0.22 yn + 1.6
7%:
xn + 1 = −0.15 xn + 0.28 yn
yn + 1 = 0.26 xn + 0.24 yn + 0.44
The Barnsley Fern can be installed as an Android app from Google Play Store.
See the Privacy Policy here: The Barnsley Fern App Privacy Policy