Talk:Plotting algorithms for the Mandelbrot set

Article needs "see also", "further reading" and "external links" sections
This article needs the above sections, but I'm not sure where to begin. Any help would be appreciated. Jdbtwo (talk) 18:00, 12 February 2020 (UTC)

Feedback from New Page Review process
I left the following feedback for the creator/future reviewers while reviewing this article: Most of the text is from the set]. In edit summary, I would add the attribution per policy..

 scope_creep Talk  10:47, 3 June 2020 (UTC)

Missing section: e^(-|z|)-smoothing
I stumbled upon the following Mandelbrot animation:

https://rtricks.blogspot.com/2007/04/mandelbrot-set-with-r-animation.html

By chance I found out that there is a name for this coloring. The addition of the individual images is called e^(-|z|)-smoothing.

You can find the description here (https://eudml.org/doc/257038):

http://www.mi.sanu.ac.rs/vismath/javier/b3.htm (year: 1999)

http://math.unipa.it/~grim/Jbarrallo.PDF (year: 2002)

If you know the Julia programming language, you can try this out right away:

https://www.rosettacode.org/wiki/Mandelbrot_set#Mandelbrot_Set_with_Julia_Animation

https://www.rosettacode.org/wiki/Mandelbrot_set#Normalized_Iteration_Count.2C_Distance_Estimation_and_Mercator_Maps

Since I am not a native speaker, I cannot create this section myself.

Greetings --Majow (talk) 10:42, 7 July 2021 (UTC)

Primary Source for Mariani/Silver
I have written the following article: https://ricomariani.medium.com/the-mariani-silver-algorithm-for-drawing-the-mandelbrot-set-a71e31bc20b6

You may or may not want to use some of that information as a primary source in any future edits. It helps to support [13] if nothing else.

Mariani-Silver isn't really characterized very well in the main text. All versions of it used recursion to look for bigger regions and then divide as necessary even the very first one I wrote.

50.35.68.222 (talk) 05:37, 29 August 2021 (UTC)


 * Thank you for pointing this out. A Java-based implementation of the Mariani-Silver algorithm (Divide and Conquer) can be found here: https://en.wikibooks.org/wiki/Fractals/fractalzoomer#Greedy_Drawing_Algorithms and https://github.com/hrkalona/Fractal-Zoomer/tree/master/src/fractalzoomer/core/drawing_algorithms Majow (talk) 09:25, 25 September 2022 (UTC)

complex numbers
Hi. Pseudocode/code can use complex mumbers, not 2 double numbers. This makes code easier to read. --Adam majewski (talk) 08:47, 24 December 2021 (UTC)

Derivative Bailout or "derbail"
I'm not a specialist, but doesn't the derbail code always return 1024? And I also think the while loop never starts because: magn(x,y) > 4 is not true. — Preceding unsigned comment added by Philipsjps (talk • contribs) 16:23, 19 May 2022 (UTC)

A useful special case of the distance estimation formula
To understand the distance estimation formula more easily, one can consider the Julia set with $$f(z) = z ^ 2 + 0$$ as a special case: This set is simply the unit circle around the origin (cf. Julia set: Examples). Considering the associated sequence at the point $$z = c$$, the first polynomials are $$z_0 = c$$, $$z_1 = z_0 ^ 2 + 0 = c ^ 2$$, $$z_2 = z_1 ^ 2 + 0 = c ^ 4$$ and $$z_3 = z_2 ^ 2 + 0 = c ^ 8$$. The first derivatives are $$dz_0 = 1$$, $$dz_1 = 2 z_0 dz_0 + 0 = 2 c$$, $$dz_2 = 2 z_1 dz_1 + 0 = 4 c ^ 3$$ and $$dz_3 = 2 z_2 dz_2 + 0 = 8 c ^ 7$$. In general, the polynomial $$z_n$$ is obtained from the iteration rule $$z_{k+1} = z_k ^ 2 + 0$$ and the result is $$z_n = c ^ {2^n}$$. The derivation $$dz_n$$ is obtained from the derivation rule $$dz_{k+1} = 2 z_k dz_k + 0$$ and the result is $$dz_n = 2 ^ n c ^ {2 ^ n - 1}$$.

If you now apply the distance estimation formula (without the factor 2), you get $$d = \ln(|z_n|) \cdot |z_n| / |dz_n| = 2 ^ n \ln(|c|) \cdot |c| ^ {2 ^ n} / (2 ^ n |c| ^ {2 ^ n - 1})$$, and thus $$d = \ln(|c|) \cdot |c|$$. This formula is a good approximation of the distance to the unit circle near the boundary: $$\ln(1.1) \cdot 1.1 = 0.105 \approx 0.1$$, $$\ln(1.01) \cdot 1.01 = 0.01005 \approx 0.01$$ and $$\ln(1.001) \cdot 1.001 = 0.0010005 \approx 0.001$$. The error only becomes large at greater distances from the boundary, e.g. $$\ln(1+4) \cdot (1+4) = 8.05 \approx 2 \cdot 4$$, so here the real distance 4 is overestimated by a factor of 2.

In terms of the Mandelbrot set, this means that if the actual distance from point $$c$$ to the Mandelbrot set is $$\delta$$, the distance estimation formula (without the factor of 2) returns the value $$d = \ln(|z_n|) \cdot |z_n| / |dz_n| \approx \ln(1+\delta) \cdot (1 + \delta)$$. Of course, this formula only applies to points outside the Mandelbrot set.

The point $$c = 100$$ can be used as a test case: its real distance from the Mandelbrot set is between 99 and 100 and can be assumed to be $$\delta \approx 99.5$$. Then, using the distance estimation formula, the value should be $$d \approx \ln(1+99.5) \cdot (1+99.5) = 463.32$$. If you now compare the reference value from Wolfram: Properties & Relations, the result is almost exactly twice the value, since the upper bound $$b = 2 \cdot d = 2 \cdot \ln(|z_n|) \cdot |z_n| / |dz_n|$$ is used for this reference calculation: $$b = MandelbrotSetDistance[100] = 926.616$$, so $$d = 926.616 / 2 = 463.308$$.

In fact, the real distance $$\delta$$ can now be determined from the distance estimate $$d \approx \ln(1+\delta) \cdot (1 + \delta)$$ with the help of the Lambert W function: $$\delta \approx d / W(d) - 1$$. For example, the distance estimate of point $$c = 100$$ gives $$d = 463.308$$ and so $$\delta \approx 463.308 / W(463.308) - 1 = 99.4977$$ (cf. SymPy Gamma).

Therefore the factor 2 should not be used for the distance estimation formula, and for small distances $$\delta$$ we simply get $$d = \ln(|z_n|) \cdot |z_n| / |dz_n| \approx \ln(1+\delta) \cdot (1 + \delta) \approx \delta$$. Majow (talk) 10:58, 5 January 2023 (UTC)

3rd pass useless
In the 3rd pass of the histogram coloring method, wouldn't total be width × height? We only need 3 passes. -sqrt(e^i pi): beep boop 13:00, 25 October 2023 (UTC)


 * Also, the second pass can be merged with the first one. -sqrt(e^i pi): beep boop 13:02, 25 October 2023 (UTC)