fern, a MATLAB code which uses MATLAB graphics to compute and display the Barnsley fractal fern.


fern ( point_num )


The computer code and data files described and made available on this web page are distributed under the MIT license


fern is available in a MATLAB version and a Python version.

Related Data and Programs:


fibonacci_spiral, a MATLAB code which displays points on a Fibonacci spiral, suggesting the arrangement of seeds in a sunflower, for instance.

hilbert_curve, a MATLAB code which computes the sequence of discrete Hilbert curves whose limit is a space-filling curve.

mandelbrot, a MATLAB code which generates an ASCII PPM image of the Mandelbrot fractal set;


  1. Michael Barnsley,
    Fractals Everywhere,
    Academic Press, 1988,
    ISBN: 0120790696,
    LC: QA614.86.B37.
  2. Cleve Moler,
    Experiments with MATLAB,
    ebook: https://www.mathworks.com/moler/exm/index.html

Source Code:

Last revised on 18 January 2019