Algorithm for rendering non-filled Julia sets

complex-dynamicsfractals

I have a commercial application, FractalWorks, for Mac OS. It creates 2D and 3D images of Mandelbrot and Julia sets (using complex numbers and the formula Zₓ₊₁ = Zₓ² + C.) It includes support for Distance Estimates (DE) and fractional iteration values, and creates 3D height maps using DE data. (See this article for a writeup on the app: https://orbittrap.ca/?p=1294)

It renders filled Julia sets using either iteration counts or DE data. It does not, however, render just the boundaries of Julia sets.

I own copies of both "The Beauty of Fractals" and "The Science of Fractal Images", but struggle with the heavier mathematics in those texts. (I took AP calculus in high school almost 40 years ago, so my advanced math is pretty rusty. I use trig, algebra, some linear algebra and matrix math all the time as a developer.)

There is a chapter in "The Beauty of Fractals" titled "Juila Sets and Their Computergraphical Generation", but I find it hard to follow. It talks about using the inverse iteration method, and various other methods that divide the complex plane into a grid of rectangles and keeping track of how many times a rectangle is visited as you iterate the points in a plot in order to identify periodic points.

Are there sample implementations of rendering Julia set boundaries that I could study? (I'm fluent in C and several other C-family languages, and can usually figure out other languages well enough to read them, so the language isn't that important.)

EDIT:

The image from "The Beauty of Fractals" is a complex number Julia set from the equation Zₓ₊₁ = Zₓ² + C. The Julia seed point is .27334, .00742i.
The image from the book looks like this:

enter image description here

Note the complex, connected interior structure.

The JavaScript app recommended in the answer looks like this:

enter image description here

Note how the interior structure is faint and does not connect like the image from the book.

The best I can do with my app is to plot the Julia set using Distance Estimates and crank up the boundary I draw:

enter image description here

(My app does not yet support IIM or any other method for plotting Julia sets other than filled Julia sets.)

Best Answer

You wrote:

Are there sample implementations of rendering Julia set boundaries that I could study?

Sure! This little web app generates images of Julia sets for functions of the form $f_c(z) = z^2+c$ using the modified inverse iteration algorithm as described in "The Beauty of Fractals" and "The Science of Fractal Images". Viewing the page source, it's pretty easy to find this Javascript code for the program.

The basic ideas behind inverse iteration, it's modification appear, and implementation for Mathematica were described in this 1998 paper. That program has been been built into the Mathematica kernel since V10. One thing that's nice about that version is that (with all the algebraic machinery that Mathematica has to offer), it's not hard to write a program that works for higher order polynomials or rational functions.

Another technique to get the boundary is called "boundary scanning". This is particularly useful for certain hard to generate Julia sets, as described in this answer.

Here's a comparison of those two algorithms for $z^2 - 0.77967939051932 + 0.11124251677182495i$:

Inverse iteration

enter image description here

Boundary scanning

enter image description here

Related Question