The Barnsley Fractal Fern Using OpenGL

FERN_OPENGL is a C program which uses the Open GL graphics library to display the Barnsley fractal fern.


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


FERN is available in a C version and a C++ version and a MATLAB version.

Related Data and Programs:

FLOOD_OPENGL, a C program which allows a user to select a region and flood it with color, using OpenGL, by Art Wetzel.

LIFE_OPENGL, a C program which simulates a version of John Conway's "Game of Life", displaying the results using OpenGL.

LIGHTS_OUT_OPENGL, a C program which sets up a "Lights Out" game and allows the user to solve it, using the OpenGL graphics window.

OPENGL, C programs which illustrate the use of the OpenGL graphics library;

SCREENSHOT_OPENGL, a C program which shows how a program using the OpenGL graphics library can save a screenshot of the graphics being displayed.


  1. Edward Angel,
    Interactive Computer Graphics, a Top-Down Approach with OpenGL,
    Addison-Wesley, 2000,
    ISBN: 0-201-38597-X,
    LC: T385.A514.
  2. Michael Barnsley,
    Fractals Everywhere,
    Academic Press, 1988,
    ISBN: 0120790696,
    LC: QA614.86.B37.
  3. Cleve Moler,
    Experiments with MATLAB,
    ebook: http://www.mathworks.com/moler/exm/index.html

Source Code:

You can go up one level to the C source codes.

Last revised on 06 March 2017.