# Fractals/Iterations in the complex plane/MandelbrotSetExteriorComplex potential

Complex potential on the parameter plane
The green procedure is named after the British mathematician George Green
Complex potential is a complex number, so it has 2 parts:
* a real part = real potential = absolute value
* an imaginary part = external angle
One can take also its:
* curl
* divergence
So on one image one can use more than one variable to color image.
Implementations:
Names:

### Real potential = CPM/M

Names:
* eponimes:
** Douady-Hubbard Potential
** Hubbard-Douady potential
* electric:
** The electric potential
** the voltage
* Green function = G(c)
$G(c)=\lim _{n\to \infty }{\frac {1}{2^{n}}}ln|z_{n}|$
$V(c)\approx V_{n}(c)={\frac {log|z_{n}|}{2^{n}}}$
In Fractint :
One can use real potential to:
* smooth (continuous) coloring
* discrete coloring ( level sets of potential)
* 3D view
Code:
* c code from mandel by Wolf Jung
Here is Delphi function which gives level of potential :

### External angle and external ( parameter) ray

Example code ( Mathematica)

### conjugate ange

Conjugate angle
* angles of the wake
For the Mandelbrot set, considering strictly periodic rays with period >= 2, the other in the pair can be found in O(period^2) time using Henk Bruin and Dierk Schleicher's Symbolic Dynamics of Quadratic Polynomials : Algorithm 13.3:
Code:
* https://code.mathr.co.uk/mandelbrot-symbolics/blob/82378e281c6ef149c7280d2b10076fffd83e0a8c:/c/lib/m_q_unlinked.c
* https://code.mathr.co.uk/mandelbrot-symbolics/blob/82378e281c6ef149c7280d2b10076fffd83e0a8c:/c/lib/m_q_conjugate.c

#### Methods

First find angle of last iteration. It is easy to compute and shows some external rays as a borders of level sets.
** binary decomposition of LSM/M
** nth-decomposition : color of exterior is proportional to quadrant in which last iteration lands. ( see below )
** exterior grid coordinates: (arg(final z),log(|final z|)/log(escaperadius))
** stripe average coloring
Then one go further.
* automatically calculate external angles from nucleus and period by Claude Heiland-Allen
Methods:
* newton method
** Tomoki Kawahira paper
** Wolf Jung explanation
** speeding up external ray tracing by Mandelbrot set Newton basins - Claude Heiland-Allen
* lines perpendicular to equipotential lines
* field line calculations, images and videos by Michael T Everest
* field lines by Chris M. Thomasson
* using Runge-Kutta integration by
** images
** mandelbrot-phase-angle-gif-loop

#### Tests
##### The Wolf Jung test

The external parameter rays for angles (in turns)
* 321685687669320/2251799813685247 (period 51, lands on c1 = -0.088891642419446 +0.650955631292636i )
* 321685687669322/2251799813685247 ( period 51 lands on c2 = -0.090588078906990 +0.655983860334813i )
* 1/7 ( period 3, lands on c3 = -0.125000000000000 +0.649519052838329i )
Angles differ by about $10^{-15}$, but the landing points of the corresponding parameter rays are about 0.035 apart. It can be computed with Maxima CAS :
Informations from W Jung program :

##### The test by G. Pastor and Miguel Romera

The external parameter rays for angles (in turns)
* 6871947673/34359738367 ( period 35 )
* 9162596898/34359738367 ( period 35 )
the central babies Mandelbrot sets of the cauliflowers located at -0.153756141 + 1.030383223i
(not that 34359738367 = 2^35 - 1)

##### test by M. Romera,1 G. Pastor, A. B. Orue,1 A. Martin, M.-F. Danca,and F. Montoya

G Pastor gave an example of external rays for which the resolution of the IEEE 754 is not sufficient:
* $\theta _{267}^{-}=0.((001)^{88}010)_{2}={\frac {33877456965431938318210482471113262183356704085033125021829876006886584214655562}{237142198758023568227473377297792835283496928595231875152809132048206089502588927}}$
* $\theta _{267}^{+}=0.((001)^{87}010001)_{2}={\frac {33877456965431938318210482471113262183356704085033125021829876006886584214655569}{237142198758023568227473377297792835283496928595231875152809132048206089502588927}}$
* $\theta _{3}^{-}=0.(001)_{2}={\frac {1}{7}}=0.(142857)_{10}$ ( period 3, lands on root point of period 3 component c3 = -0.125000000000000 +0.649519052838329i )
* $\theta _{268}^{-}=0.((001)^{88}0001)_{2}={\frac {67754913930863876636420964942226524366713408170066250043659752013773168429311121}{474284397516047136454946754595585670566993857190463750305618264096412179005177855}}$
* $\theta _{268}^{+}=0.((001)^{88}0010)_{2}={\frac {67754913930863876636420964942226524366713408170066250043659752013773168429311122}{474284397516047136454946754595585670566993857190463750305618264096412179005177855}}$
One can analyze these angles using program by Claude Heiland-Allen :
Landing points of above rays are roots with angled internal addresses ( description by Claude Heiland-Allen) :
* the upper one will be 1 -> 1/3 -> 3 -> 1/(period/3) -> period because it's the nearest bulb to the lower root cusp of 1/3 bulb and child bulbs of 1/3 bulb have periods 3 * denominator(internal angle) ie, 1 -> 1/3 -> 3 -> 1/89 -> 267
* the lower one will be 1 -> floor(period/3)/period -> period because it's the nearest bulb below the 1/3 cusp ie, 1 -> 89/268 -> 268
* the middle ray .(001) lands at the root of 1 -> 1/3 -> 3, from the cusp on the lower side (which is on the right in a standard unrotated view)

# References

* ↑ The Mandelbrot Function by John J. G. Savard
* ↑ Reference wolfram: MandelbrotSetBoettcher
* ↑ Douady Hubbard Potential by Linas Vepstas
* ↑ i quilezles : distance fractals
* ↑ lecture10 by Professor Douglas C. Ravenel
* ↑ Distance estimation method for drawing Mandelbrot and Julia sets Dr. Lindsay Robert Wilson
* ↑ Smooth colouring is the key to the Mandelbrot set by Tony Finch
* ↑ fractalforums.org : mandelbrot-external-angles
* ↑ calculate external angles from nucleus and period by Claude Heiland-Allen
* ↑ An algorithm to draw external rays of the Mandelbrot set by Tomoki Kawahira
* ↑ Wolf Jung explanation
* ↑ Claude Heiland-Allenmandelbrot_set_newton_basins by
* ↑ A Method to Solve the Limitations in Drawing External Rays of the Mandelbrot Set M. Romera,1 G. Pastor, A. B. Orue,1 A. Martin, M.-F. Danca,and F. Montoya
* ↑ Fractal forum : Plotting field lines during iteration...
* ↑ fractalforums : smooth-external-angle-of-mandelbrot-set
* ↑ Wolf Jung's test for precision of drawing parameter rays
* ↑ A Method to Solve the Limitations in Drawing External Rays of the Mandelbrot Set M. Romera,1 G. Pastor, A. B. Orue,1 A. Martin, M.-F. Danca,and F. Montoya