Discover the beauty of Chaos

NextFractal is an application for creating amazing fractal images and other algorithmically generated images. Each image is generated processing a script and some user provided parameters, depending on the selected grammar. NextFractal is currently able to interpret two grammars:

  • M which is a domain specific language for creating Fractals such as Mandelbrot Set or Julia and Fatou Sets.
  • CFDG which is a context-free grammar for creating geometric shapes using an iterative process.

NextFractal provides tools for exploring Fractals, browsing images, and creating time-based and event-based animations. NextFractal exports images to PNG files and animations to AVI and Quicktime files.

NextFractal is free software, available for Mac, Windows and Linux. NextFractal requires Java SDK 8 or later and 2Gb of RAM. NextFractal has been tested on OS X, Windows 7 and Ubuntu.

Please note that NextFractal requires Java SDK and not Java JRE. The SDK contains the Java compiler which is required to compile the scripts into Java bytecode and optimise the rendering time.

Download the latest release of NextFractal from GitHub. No installation is required, just decompress the archive and run the application to start discovering the beauty of chaos, the Mandelbrot Set and similar Fractals, and to experiment with Algorithmic Art.

Get latest version for Mac, Windows, or Linux

NextFractal's user interface is very easy to use. There is only one main window which has two panels, on the left we have the rendering area, and on the right we have the editing area. Each one of those areas have a toolbar which contains the relevant tools. NextFractal accepts few keyboard commands when focus is on rendering area:

  • Keys 1, 2, 3, 4, 5 - Change zoom speed
  • Key T - Show or hide traps
  • Key O - Show or hide orbit
  • Key P - Show or hide preview

We have created a short video to show how to use NextFractal.

Fractals and Chaos

Deterministic Chaos pictured by Fractals is one of scientific subjects which has inspired the creativity of many people since the diffusion of personal computers capable of advanced computer graphics.

NextFractal provides tools for creating and exploring Fractals such as Mandelbrot, Julia and Fatou Sets. Fractals are generated from scripts interpreted by a real-time graphics engine. The scripts are written using a domain specific language called M language.

Using the M language we can define algorithms for computing orbits and colors. We can define multiple color palettes and multiple orbit traps. We can use expressions to activate rules and compute colors, and we can compose rules as layers with variable opacity.

NextFractals provides tools for creating event-based and time-based animations. We can record sequences of events and we can use time variable values in our scripts.

Context-free Art

ContextFree is a popular software for creating algorithmic art from CFDG scripts. CFDG is a language for describing an iterative process for drawing geometric shapes. NextFractal provides an implementation of a CFDG interpreter and rendering engine.

Please note that CFDG interpreter and rendering engine are still under active development and they might present bugs, or they might be incomplete, or they might not perform well for all scripts. The rendering engine doesn't support animations at the moment.

Using the CFDG language, we can define recursive rules for generating shapes. A shape might contain primitive shapes, or paths, or other shapes, with modification such as geometric transformations or color adjustments. We can use functions and random values to introduce variations in the process. We can use statements such as if and switch to control the process.

NextFractal is able to interpret CFDG scripts since version 2.0 and it supports the same grammar as ContextFree 3.0.10. You can find a comprehensive documentation of CFDG on


You don't need to learn M language or CFDG language to enjoy the examples provided with NextFractal. However we recommend to study those languages in order to create new images or modify the examples. Learning M or CFDG requires very basic undestanding of computer programming.

We have created a tutorial to help you learning the M language. The tutorial shows how to implement various techniques for generating orbits and computing colors.


A complete grammar specification of M language and CFDG language is available for reference. The specification defines all lexical tokens and syntactic rules for creating valid scripts.

We recommend to start from the tutorial and then read the specification. The specification is written using a BNF notation which represent a very formal definition of lexical rules.

Follow NextFractal on Facebook