# Fractals/Iterations in the complex plane/Mandelbrot set interior

This book shows how to code different algorithms for drawing parameter plane (Mandelbrot set) for complex quadratic polynomial.
One can find different types of points / sets on parameter plane.
This page is about interior points of the Mandelbrot set.

# Interior of Mandelbrot set - hyperbolic components
## The Lyapunov exponent

* whole set
* mini Mandelbrot set
* real quadratic map
Math equation :
$\lambda _{f}(z_{0})=\lim _{n\rightarrow \infty }{\frac {1}{n}}\sum _{i=0}^{n-1}\left(\ln \left|f'(z_{i})\right|\right)$
where:
$f'(x)={\frac {d}{dz}}f_{c}(z)=2z$
means first derivative of f with respect to z
See also:
* image and description by janthor
* image by Anders Sandberg
HLSL code by JPBotelho

## Interior distance estimation

DEM/M - description of the method

## absolute value of the orbit
### internal level sets

Color of point:
* is proportional to the value of z is at final iteration.
* shows internal level sets of periodic attractors.

### bof60

Image of bof60 in on page 60 in the book "the Beauty Of Fractals".Description of the method described on page 63 of bof. It is used only for interior points of the Mandelbrot set.
Color of point is proportional to:
* the smallest distance of its orbit from origin
* the smallest value z gets during iteration
* illuminating the closest approach the iterates of the origin (critical point) make to the origin inside the set
* "Each pixel of each particular video frame represents a particular complex number c = a + ib. For each sequential frame n, the magnitude of z(c,n) := z(c, n-1)^2 + c is displayed as a grayscale intensity value at each of these points c: larger magnitude points are whiter, smaller magnitudes are darker. As n rises from 1 to 256, points outside the Mandelbrot Set quickly saturate to pure white, while points within the Mandelbrot Set oscillate through the darker intensities." Brian Gawalt
Level sets of distance are sets of points with the same distance
* fragment of code : fractint.cfrm from Gnofract4d
See also
* Mandelbrot Trajectory Infima by jeremy-rifkin Jeremy Rifkin
* Displaying the Internal Structure of the Mandelbrot Set by Adam Cunningham

### bof61 or atom domains

Full description
* Bof61
* animation
* 2D
* 3D

## Period of hyperbolic components

Period of hyperbolic component of Mandelbrot set is a period of limit set of critical orbit.
Algorithms for computing period:
* direct period detection from iterations of critical point z = 0.0 on dynamical plane
* "quick and dirty" algorithm : check if $abs(z_{n})<eps$ then colour c-point with colour n. Here n is a period of attracting orbit and eps is a radius of circle around attracting point = precision of numerical computations
* "methods based on interval arithmetic when implemented properly are capable of finding all period-n cycles for considerable large n." (ZBIGNIEW GALIAS )
* Floyd's cycle-finding algorithm
* the spider algorithm
* atom domain, BOF61
* Period detection

### interior detection

Pixel is interior with high probability if all below is
* pixel is marked as interior ( black)
* all surrounding pixels are marked as interior ( black)
* all the black pixels have the same period

## internal coordinate and multiplier map

definition
* interior coordinate
The algorithm by Claude Heiland-Allen:
* check c
** When c is outside the Mandelbrot set
*** give up now
*** or use external coordinate
** when c is not outside (inside or on the boundary) : For each period p, starting from 1 and increasing:
*** Find periodic point z0 such that fp(z0,c)=z0 using Newton's method in one complex variable
*** Find b by evaluating first derivative with respect to z of fp at z0
*** If |b|≤1 then return b, otherwise continue with the next p

### computing

For periods:
* 1 to 3 explicit equations can be used
* >3 it must be find using numerical methods

#### period 1

Start with boundary equation:
and solve it for w
so

#### period 3

It can be solved using Maxima CAS:

#### numerical approximation

See also:
* Number Sequences in the Mandelbrot Set by the Mathemagicians' Guild

### Internal angle

Method by Renato Fonseca : "a point c in the set is given a hue equal to argument
$arg(z_{n_{max}})=arctan{\frac {Im(z_{n_{max}})}{Re(z_{n_{max}})}}$
(scaled appropriately so that we end up with a number in the range 0 - 255). The number z_nmax is the last one calculated in the z's sequence."
See also:
* [Extra Visual] Building a Mandelbrot Set Step-by-step by The Mathemagicians' Guild

#### Fractint

Fractint : Color Parameters : INSIDE=ATAN
colors by determining the angle in degrees the last iterated value has with respect to the real axis, and using the absolute value. This feature should be used with periodicity=0

### Internal rays

From Hyperbolic to Parabolic Parameters along Internal Rays
* Internal and external rays
* multiplier map and internal rays
* internal and external rays
When $radius\,$ varies and $angle\,$ is constant then $c\,$ goes along internal ray. It is used as a path inside Mandelbrot set.
Example: internal ray of angle = 1/6 of main cardioid.
Internal angle:
$angle=1/6\,$
radius of ray:
$0\leq radius\leq 1\,$
Point of internal radius of unit circle:
$w=radius*e^{i*angle}\,$
Map point $w$ to parameter plane:
$c={\frac {w}{2}}-{\frac {w^{2}}{4}}\,$
For $epsilon=0\,$ this is equation for main cardioid.

### Internal curve

When $radius\,$ is constant varies and $angle\,$ varies then $c\,$ goes along internal curve.

### Centers of components

* definition
* Methods of finding centers

# More tutorials and code

Tutorials
* in Basic see Mandelbrot Dazibao
* in Java see Evgeny Demidov
* in C see Linas Vepstas
* in C++ see Wolf Jung page,
* in Factor program by Slava Pestov
* in Gnuplot see Tutorial by T.Kawano
* in Lisp (Maxima) see:
** Dynamics by Jaime E. Villate
** Mu-Ency - The Encyclopedia of the Mandelbrot Set by Robert P. Munafo
** Frac by Yannick Gingras with beautiful
** Fractals in Lisp by Takaya Iwamoto
* in Octave see wikibooks or another verion by Christopher Wellons
* How to Plot the Mandelbrot Set By Hand
* comparison of various languages:
** Computer Language Benchmarks Game : Compare the performance of ≈30 programming languages using ≈12 flawed benchmarks for 4 different combinations of OS/machine.
** rosettacode
** Fractal Benchmark in Ruby, Io, PHP, Python, Lua, Java, Perl, Applescript, TCL, ELisp, Javascript, OCaml, Ghostscript, and C by Erik Wrenholt
** in PDL, IDL, MATLAB, Octave, C and FORTRAN77 by Xavier Calbet
* ASCI graphic :
** ASCII Graphics at Mu-Ency by Robert P. Munafo
** using scripting languages by Warp
** Fractal Benchmark by Theo Wollenleben
** using Lisp on Bill Clementson's blog
* 3D
** 3D images of Mandelbrot set
** 3d images by Jos Leys
* This is a 3D version of the image "Mandel zoom 03 seehorse.jpg" DEM
* Half 3D hypercomplex Mandelbrot Fractal. Rendered with Mandelbulber 0.80.

# References

* ↑ parameter plane in wikipedia
* ↑ Mandelbrot set in wikipedia
* ↑ complex quadratic polynomial in wikipedia
* ↑ reenigne blog : mandelbrot-set-taxonomy
* ↑ Displaying the Internal Structure of the Mandelbrot Set by A Cunningham ( with python 3 program and code)
* ↑ Displaying the Internal Structure of the Mandelbrot Set by Adam Cunningham
* ↑ The logistic equation by Didier Gonze October 4, 2013
* ↑ Ljapunov Exponent and mandelbrot set by janthor
* ↑ Image by Anders Sandberg
* ↑ github repo JPBotelho: Fractal-Megacollection ( HLSL shaders for Unity)
* ↑ Fractint : Misc. Options and algorithms
* ↑ Java™ Number Cruncher: The Java Programmer's Guide to Numerical Computing By Ronald Mak
* ↑ Firefly Application Help by Terry W. Gintz
* ↑ Mandelbrot Oscillations by Brian Gawalt
* ↑ Fractint doc by Noel Giffin
* ↑ gnofract4d
* ↑ Rigorous Investigations Of Periodic Orbits In An Electronic Circuit By Means Of Interval Methods by Zbigniew Galias
* ↑ Mandelbrot set drawing by Milan
* ↑ fractalforums.org : determining-optimal-iterations-to-skip-with-series-approximation
* ↑ interior_coordinates_in_the_mandelbrot_set by Claude Heiland-Allen
* ↑ practical interior_distance rendering by Claude Heiland-Allen
* ↑ math.stackexchange question: test-for-membership-in-mandelbrot-bulb-of-period-n/1151953#1151953
* ↑ Brown Method by Robert P. Munafo, 2003 Sep 22.
* ↑ Exact Coordinates by Robert P. Munafo, 2003 Sep 22.
* ↑ The Mandelbrot set by Renato Fonseca
* ↑ fractint color params
* ↑ From Hyperbolic to Parabolic Parameters along Internal Rays by Yi-Chiuan Chen and Tomoki Kawahira
* ↑ internal ray in wikipedia
* ↑ ASCII graphic