I'm working on rendering the Mandelbrot set using K. I. Martin's method (http://www.superfractalthing.co.nf/sft_maths.pdf), and I am able to successfully use it to approximate the values of points in the set under iteration. However, now I have found myself faced with a small problem that I can't seem to get around.

Usually points not in the Mandelbrot set are colored based on the number of iterations it takes for them to escape, but since I only have access to the value of the points after a certain number of iterations and not the number of iterations it would have taken those points to escape, I have no way of creating the usual image of the Mandelbrot set.

I've tried using methods like taking one divided by the absolute value of the point (since larger points generally would have diverged faster), but methods like these leave me with pictures like this:

[1] https://i.stack.imgur.com/FuKmQ.png

So, my question is, how can you color a point in the Mandelbrot set knowing only the value of that point after a certain number of iterations and not the number of iterations it took to diverge?

  • $\begingroup$ Why can't you just add a variable to your code that keeps track of the number of iterations? $\endgroup$
    – Nick
    Mar 17, 2018 at 3:01
  • $\begingroup$ @Nick this method doesn't use iterations except to find the reference point. Sorry that I didn't mention this in my question $\endgroup$ Mar 17, 2018 at 3:17
  • $\begingroup$ What is wrong with the image you have, except for the bad colourmap? (Note to others: It's hidden in the source, someone please edit it into the question.) $\endgroup$
    – user856
    Mar 17, 2018 at 3:32
  • $\begingroup$ @Rahul nothing's wrong with it, I just wanted to be able to have the usual colormap, instead of this one which repeats forever and doesn't show julia sets or anything $\endgroup$ Mar 17, 2018 at 11:53
  • $\begingroup$ If you have (an approximation of) the absolute value of the $n$th iterate, it will increase smoothly away from the Mandelbrot set, so if you choose a smooth colourmap and an appropriate scaling you should be able to see the usual structure. What prevents you from using your preferred "usual colourmap" instead of the repeating colourmap in your current image? $\endgroup$
    – user856
    Mar 17, 2018 at 15:59

2 Answers 2


K.I. Martin's paper has 2 techniques. The first is perturbation, where iterations of a pixel can be performed in low precision relative to a high precision reference. The second is series approximation, which allows to initialize all the pixels to a neighbourhood of the high precision reference after skipping some iterations. You can combine both techniques.

Typically you would use series approximation to initialize your pixels, then iterate them with the perturbed iteration formula until they or the reference escapes, or you reach a maximum iteration limit (if the reference escapes early, you need to find a better one).

An issue not mentioned it the paper is the occurence of "glitches", where the dynamics of the pixel differ too much from the dynamics of the reference. These can be detected and corrected by using a more appropriate reference.

More information on this stuff can be found (historical archive) at http://www.fractalforums.com and (current research) https://fractalforums.org .


You need to modify your program to repeat the iterations after iterations. For example if you need 200 iterations and you only have access to 100 iterations, you save the values after the first 100 iterates and then iterate again to get to your 200 iterations.

  • $\begingroup$ I don't have access to any iterations at all; this method estimates the values of points for a certain number of iterations without iterating them. If there's no way to do it should I just abandon the method entirely and go back to the traditional method (not optimal because I'm trying to do deep zooms)? $\endgroup$ Mar 17, 2018 at 3:16
  • $\begingroup$ Yes, that is a good idea. The traditional method is probably slower but what else? $\endgroup$ Mar 17, 2018 at 3:21
  • $\begingroup$ well the reason I was doing it originally is because it can do basically infinitely deep zooms without needing arbitrary precision libraries, but I can probably get away with using a reference point iteratively and still have it working relatively fast. Thanks for your answer! $\endgroup$ Mar 17, 2018 at 3:24
  • $\begingroup$ Thanks for your attention and good luck with the Mandelbrot set. $\endgroup$ Mar 17, 2018 at 3:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .