fern, an Octave code which computes and displays the Barnsley fractal fern.


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 an Octave version and a Python version.

Related Data and Programs:


caustic, an Octave code which generates an image of a caustic, by drawing n equally spaced points in a circle, and then connecting specific pairs of points using a spacing parameter m.

epicycloid, an Octave code which computes, plots and tabulates an epicycloid curve.

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

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

mandelbrot, an Octave 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