# Algorithm for rendering non-filled Julia sets?

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: Note the complex, connected interior structure.

The JavaScript app recommended in the answer looks like this: 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: (My app does not yet support IIM or any other method for plotting Julia sets other than filled Julia sets.)

• The specific example you refer has a parabolic orbit. The Julia set can be generated using the techniques described in this answer. It’s quite a bit of work, though. As far as I know, there’s no software that automatically detects that type of orbit and draws the Julia set accordingly. – Mark McClure Dec 23 '19 at 21:29

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 ### Boundary scanning • Thanks for the reply and links! – Duncan C Dec 22 '19 at 20:23
• That JavaScript web app does a little better than my app at finding the fine structure of Julia set boundaries, but not nearly as good as the images in The Beauty of Fractals. The point 12 from preface page XII has the coordinates 0.27334,0.00742i. In B of F, the image shows the interior "tendrils" of the Julia set really clearly. The IIM image from the web app does't capture nearly as much detail. – Duncan C Dec 22 '19 at 20:31
• @DuncanC I don't have the text handy but high resolution images in those texts are generally generated with boundary scanning. I've attached a couple of images to illustrate. – Mark McClure Dec 23 '19 at 16:03
• See the edit to my question. I included the coordinates of the image I'm using as a test case, along with a photo taken from the book, the image generated by the JavaScript app, and the best my app is able to do using Distance Estimate (DE) data. – Duncan C Dec 23 '19 at 21:18
• The boundary scanning method does seem like the way to go for images with parabolic orbits. The math behind that is a bit beyond me. My app already does boundary following for speeding up rendering of connected groups of pixels with the same iteration counts. If I could understand how to identify the different segments of a filled Julia set to color them using different colors I could likely adapt my code to do boundary following. – Duncan C Dec 23 '19 at 21:38

To render Julia set or boundaries of filled-in Julia sets ( the image you show is filled not non filled) one can use:

example: BTW, image from the book is a parabolic Julia set, example images and code you can find here

HTH