Barnsley's Fern
Michael Barnsley discovered the Barnsley fern at the Georgia Institute of Technology and it was made to look like the Black Spleenwort leaf. Barnsley’s fern uses the iterated functions system to generate itself. It is like the Sierpinski Gasket, but four linear maps are used instead of one and randomness is used to select the points.
How is it created?
To generate Barnsley's Fern, randomness is used to tell for what percent of the time to do certain equations.
First, choose a point in a plane randomly
Then, if x is the x coordinate of the point and y is the y coordinate of the point:
For 1% of the time, have the point run through the equations
New x = 0
New y = 0.16 y
For 85% of the time, have the point run through the equations
New x = 0.85 x + 0.04 y
New y = -0.04 x + 0.85 y + 1.6
For 7% of the time, have the point run through the equations,
New x = 0.2 x - 0.26 y
New y = 0.23 x + 0.22 y + 1.6
For 7% of the time, have the coordinates run through the equations,
New x = -0.15 x + 0.28 y
New y = 0.26 x + 0.24 y + 0.44
For all of the equations, the new x and new y are the coordinates of the point that is then colored.
The pattern is repeated starting with a completely random point again. Once the equations are run through many times, a fern will appear!
First, choose a point in a plane randomly
Then, if x is the x coordinate of the point and y is the y coordinate of the point:
For 1% of the time, have the point run through the equations
New x = 0
New y = 0.16 y
For 85% of the time, have the point run through the equations
New x = 0.85 x + 0.04 y
New y = -0.04 x + 0.85 y + 1.6
For 7% of the time, have the point run through the equations,
New x = 0.2 x - 0.26 y
New y = 0.23 x + 0.22 y + 1.6
For 7% of the time, have the coordinates run through the equations,
New x = -0.15 x + 0.28 y
New y = 0.26 x + 0.24 y + 0.44
For all of the equations, the new x and new y are the coordinates of the point that is then colored.
The pattern is repeated starting with a completely random point again. Once the equations are run through many times, a fern will appear!
These three ferns were generated using a computer!
Ways to generate the fern in different shapes!
By changing some of the constants (the 1.6 or 0.44 at the end of the equations with no x or y multiplied by it), you can change the parameters of the fern to change its shape. Be careful when changing the parameters because it might not look like a fern if you don't have the right ratio.