# Fractals/Iterations in the complex plane/q-iterations

Iteration in mathematics refer to the process of iterating a function i.e. applying a function repeatedly, using the output from one iteration as the input to the next. Iteration of apparently simple functions can produce complex behaviours and difficult problems.

# Applications

One can make inverse ( backward iteration) :
* of repeller for drawing Julia set ( IIM/J)
* of circle outside Jlia set (radius=ER) for drawing level curves of escape time ( which tend to Julia set)
* of circle inside Julia set (radius=AR) for drawing level curves of attract time ( which tend to Julia set)
* of critical orbit ( in Siegel disc case) for drawing Julia set ( probably only in case of Goldem Mean )
* for drawing external ray
Repellor for forward iteration is attractor for backward iteration

# Notes

* Iteration is always on the dynamic plane.
* There is no dynamic on the parameter plane.
* Mandelbrot set carries no dynamics. It is a set of parameter values.
* There are no orbits on parameter plane, one should not draw orbits on parameter plane.
* Orbit of critical point is on the dynamical plane

# Iteration theory

It is a section from Tetration forum by Andrew Robbins 2006-02-15 by Andrew Robbins
"Iteration is fundamental to dynamics, chaos, analysis, recursive functions, and number theory. In most cases the kind of iteration required in these subjects is integer iteration, i.e. where the iteration parameter is an integer. However, in the study of dynamical systems continuous iteration is paramount to the solution of some systems.
Different kinds of iteration can be classified as follows:
* Discrete Iteration
** Integer Iteration
** Fractional Iteration or Rational Iteration
*** Non-analytic Fractional Iteration
*** analytic Fractional Iteration
* Continuous Iteration

## Discrete iteration

Iterated function
* examples
* derivative

### Integer iteration

The usual definition of iteration, where the functional equation:
$f^{n}(x)=f(f^{n-1}(x))$
is used to generate the sequence:
$\{f(x),f^{2}(x),f^{3}(x),...\}$
known as the natural iterates of f(x), which forms a monoid under composition.
For invertible functions f(x), the inverses are also considered iterates, and form the sequence:
$\{...,f^{-2}(x),f^{-1}(x),x,f(x),f^{2}(x),...\}$
known as the integer iterates of f(x), which forms a group under composition.

### Fractional Iteration or Rational Iteration

Solving the functional equation: $f(x)=g^{n}(x)$. Once this functional equation is solved, then the rational iterates $f^{(m/n)}(x)$ are the integer iterates of $g(x)$.

#### Non-analytic Fractional Iteration

By choosing a non-analytic fractional iterate, there is no uniqueness of the solutions obtained. (Iga's method)

#### Analytic Fractional Iteration

By solving for an analytic fractional iterate, there is a unique solution obtained in this way. (Dahl's method)

## Continuous Iteration

A generalization of the usual notion of iteration, where the functional equation (FE): f n(x) = f(f n-1(x)) must be satisfied for all n in the domain (real or complex). If this is not the case, then to discuss these kinds of "iteration" (even though they are not technically "iteration" since they do not obey the FE of iteration), we will talk about them as though they were expressions for f n(x) where 0 ≤ Re(n) ≤ 1 and defined elsewhere by the FE of iteration. So even though a method is analytic, if it doesn't satisfy this fundamental FE, then by this re-definition, it is non-analytic.

### Non-analytic Continuous Iteration

By choosing a non-analytic continuous iterate, there is no uniqueness of the solutions obtained. (Galidakis' and Woon's methods)

### Analytic Continuous Iteration or just Analytic Iteration

By solving for an analytic continuous iterate, there is a unique solution obtained in this way.

#### Complex-analytic Iteration or Holomorphic Iteration
# Step

* Integer
* Fractional
* Continuous Iteration of Dynamical Maps. This continuous iteration can be discretized by the finite element method and then solved—in parallel—on a computer.

# visualisation

* folding
* complex geometric sequence by Loo Kang Lawrence WEE

# decomposition

Move during iteration in case of complex quadratic polynomial is complex. It consists of 2 moves :
* angular move = rotation ( see doubling map)
* radial move ( see external and internal rays, invariant curves )
** fallin into target set and attractor ( in hyperbolic and parabolic case )
* radial move
* Radius abs(z) = r < 1.0 after some iterations using f0(z) = z*z
* Distance between repetive iteration of point smaller then one
* angular move
* angle 1/7 after doubling map
* angle 1/15 after doubling map
* angle 11/36 after doubling map

## angular move (rotation)

Compute argument in turns of the complex number :

# direction
## backward

Backward iteration or inverse iteration
* Peitgen
* W Jung
* John Bonobo

### Mandel

Here is example of c code of inverse iteration using code from program Mandel by Wolf Jung

# Test

One can iterate ad infinitum. Test tells when one can stop
* bailout test for forward iteration

# Target set or trap

Target set is used in test. When zn is inside target set then one can stop the iterations.

# Planes
## Parameter plane

"Mandelbrot set carries no dynamics. It is a set of parameter values. There are no orbits on parameter plane, one should not draw orbits on parameter plane. Orbit of critical point is on the dynamical plane"

## Dynamic plane
### Dynamic plane f0 for c=0

Lets take c=0, then one can call dynamical plane $f_{0}$ plane.
Here dynamical plane can be divided into :
* Julia set = $\{z:|z|=1\}$
* Fatou set which consists of 2 subsets :
** interior of Julia set = basin of attraction of finite attractor = $\{z:|z|<1\}$
** exterior of Julia set = basin of attraction of infinity = $\{z:|z|>1\}$

#### Forward iteration

$z=re^{i\theta }\,$
where :
* r is the absolute value or modulus or magnitude of a complex number z = x + i
* $\theta$ is the argument of complex number z (in many applications referred to as the "phase") is the angle of the radius with the positive real axis. Usually principal value is used
    $r=|z|={\sqrt {x^{2}+y^{2}}}.\,$
    $\theta =\arg(z)=\operatorname {atan2} (y,x)={\begin{cases}\arctan({\frac {y}{x}})&{\mbox{if }}x>0\\\arctan({\frac {y}{x}})+\pi &{\mbox{if }}x<0{\mbox{ and }}y\geq 0\\\arctan({\frac {y}{x}})-\pi &{\mbox{if }}x<0{\mbox{ and }}y<0\\{\frac {\pi }{2}}&{\mbox{if }}x=0{\mbox{ and }}y>0\\-{\frac {\pi }{2}}&{\mbox{if }}x=0{\mbox{ and }}y<0\\{\mbox{indeterminate }}&{\mbox{if }}x=0{\mbox{ and }}y=0.\end{cases}}$
so
$f_{0}(z)=z^{2}=(re^{i\theta })^{2}=r^{2}e^{i2\theta }\,$
and forward iteration :
$f_{0}^{n}(z)=r^{2^{n}}e^{i2^{n}\theta }\,$
Forward iteration:
* squares radius and doubles angle ( phase, argument)
* gives forward orbit = list of points {z0, z1, z2, z3... , zn} which lays on exponential spirals.
One can check it interactively :
* Geogebra plet by Jorj Kowszun-Lecturer - try move along radial lines from the center to see changing behaviour
* Visualization of complex_square_iteration by M McClure
* program Mandel by W Jung
* squaring complex numbers by Jeffrey Ventrella
* MIT mathlets : complex-exponential

##### Chaos and the complex squaring map

The informal reason why the iteration is chaotic is that the angle doubles on every iteration and doubling grows very quickly as the angle becomes ever larger, but angles which differ by multiples of 2π radians are identical. Thus, when the angle exceeds 2π, it must wrap to the remainder on division by 2π. Therefore, the angle is transformed according to the dyadic transformation (also known as the 2x mod 1 map). As the initial value z$_0$ has been chosen so that its argument is not a rational multiple of π, the forward orbit of z$_n$ cannot repeat itself and become periodic.
More formally, the iteration can be written as:
    $\qquad z_{n+1}=z_{n}^{2}$
where $z_{n}$ is the resulting sequence of complex numbers obtained by iterating the steps above, and $z_{0}$ represents the initial starting number. We can solve this iteration exactly:
    $\qquad z_{n}=z_{0}^{2^{n}}$
Starting with angle θ, we can write the initial term as $z_{0}=\exp(i\theta )$ so that $z_{n}=\exp(i2^{n}\theta )$. This makes the successive doubling of the angle clear. (This is equivalent to the relation $z_{n}=\cos(2^{n}\theta )+i\sin(2^{n}\theta )$.)

##### Escape test

If distance between:
* point z of exterior of Julia set
* Julia set $J_{c}$
is :
then point z escapes (= it's magnitude is greate then escape radius = ER):
after :
* $n$ steps in non-parabolic case
* $2^{n}$ steps in parabolic case
See also:
* the precision needed for escape test
* bailout test
* escape time
* david bau : complex function viewer

#### Backward iteration

Every angle (real number) α ∈ R/Z measured in turns has :
* one image = 2α mod 1 under doubling map
* "two preimages under the doubling map: ${\frac {\alpha }{2}},{\frac {\alpha +1}{2}}$". Inverse of doubling map is multivalued function.
Note that difference between these 2 preimages
    ${\frac {\alpha }{2}}-{\frac {\alpha +1}{2}}={\frac {1}{2}}$
is half a turn = 180 degrees = Pi radians.
Images and preimages under doubling map d :
| $\alpha$ | $d^{1}(\alpha )$ | $d^{-1}(\alpha )$ |
| ${\frac {1}{2}}$ | ${\frac {1}{1}}$ | $\left\{{\frac {1}{4}},{\frac {3}{4}}\right\}$ |
| ${\frac {1}{3}}$ | ${\frac {2}{3}}$ | $\left\{{\frac {1}{6}},{\frac {4}{6}}\right\}$ |
| ${\frac {1}{4}}$ | ${\frac {1}{2}}$ | $\left\{{\frac {1}{8}},{\frac {5}{8}}\right\}$ |
| ${\frac {1}{5}}$ | ${\frac {2}{5}}$ | $\left\{{\frac {1}{10}},{\frac {6}{10}}\right\}$ |
| ${\frac {1}{6}}$ | ${\frac {1}{3}}$ | $\left\{{\frac {1}{12}},{\frac {7}{12}}\right\}$ |
| ${\frac {1}{7}}$ | ${\frac {2}{7}}$ | $\left\{{\frac {1}{14}},{\frac {4}{7}}\right\}$ |
On complex dynamical plane backward iteration using quadratic polynomial $f_{c}$
    $f_{c}(z)=z^{2}+c$
gives backward orbit = binary tree of preimages :
$z\,$
$-{\sqrt {z-c}},+{\sqrt {z-c}}\,$
$-{\sqrt {-{\sqrt {z-c}}-c}},+{\sqrt {-{\sqrt {z-c}}-c}},-{\sqrt {+{\sqrt {z-c}}-c}},+{\sqrt {+{\sqrt {z-c}}-c}}\,$
One can't choose good path in such tree without extra informations.
Not that preimages show rotational symmetry ( 180 degrees)
For other functions see Fractalforum
See also:
* Julia Set Grid by Steve Phelps. The mapping z=sqrt(z-c) on geogebra

### Dynamic plane for fc

One can check it with :
* M McClure : visualization : interactive_basins
* GeoGebra - Complex Iteration - The Mandelbrot Set by Mark Dabbs
* critical orbits by Jeremy Rifkin

#### Level curves of escape or attracting time

* Preimages of circle from the exterior gives level sets of the escaping time
* Preimages of circle from the interior gives level sets of the attracting time

#### Julia set by IIM/J

Theory
* the periodic points are dense in the Julia set
* Julia set is the closure of the set of repelling periodic points
So drawing repelling periodic point and it's orbit ( forward and backward= inverse) gives visually good aproximation of Julia set = set of points dense enough that nonuniform distribution of these points over Julia set is not important.
* Preimages of repelling fixed point tend to Julia set for C = i. Image and source code
* Julia set made with MIIM. Image and maxima source code
* Preimages of critical orbit tend to whole Julia set in Siegel disc case
* distribution of points in simple IIM/J
* c = -0.750357820200574 +0.047756163825227 i
* C = ( 0.4 0.3 )
In escape time one computes forward iteration of point z.
In IIM/J one computes:
* repelling fixed point of complex quadratic polynomial $Z_{0}=\beta _{c}\,$
* preimages of $Z_{0}\,$ by inverse iterations
$Z_{n-1}={\sqrt {Z_{n}-C}}$
Because square root is multivalued function then each $Z_{n}\,$ has two preimages $Z_{n-1}\,$. Thus inverse iteration creates binary tree of preimages.
* binary tree
* expanded growth of binary tree
Because of expanded growth of binary tree, the number of preimages grows exponentialy: the number of nodes $n$ in a full binary tree is
where
* $h$ is the height of the tree
If one wants to draw full binary tree then the methods of storing binary trees can waste a fair bit of memory, so alternative is
* threaded binary tree
* draw only some path from binary tree,
** random path : the longest path = path from root-to-leaf
See also :
* online tool : Wolfram Alpha

##### Root of tree

* repelling fixed point of complex quadratic polynomial $Z_{0}=\beta _{c}\,$
* - beta
* other repelling periodic points ( cut points of filled Julia set ). It will be important especially in case of the parabolic Julia set.
"... preimages of the repelling fixed point beta. These form a tree like
So every point is computed at last twice when you start the tree with beta. If you start with -beta, you will get the same points with half the number of computations.
Something similar applies to the preimages of the critical orbit. If z is in the critical orbit, one of its two preimages will be there as well, so you should draw -z and the tree of its preimages to avoid getting the same points twice." (Wolf Jung )

##### Variants of IIM

* random choose one of two roots IIM ( up to chosen level max). Random walk through the tree. Simplest to code and fast, but inefficient. Start from it.
** both roots with the same probability
** more often one then other root
* draw all roots ( up to chosen level max)
** using recurrence
** using stack ( faster ?)
* draw some rare paths in binary tree = MIIM. This is modification of drawing all roots. Stop using some rare paths.
** using hits table ( while hit(pixel(iX,iY)) < HitMax )
** using derivative ( while derivative(z) < DerivativeMax):
*** " speed up the calculation by pruning dense branches of the tree. One such method is to prune branches when the map becomes contractive (the cumulative derivative becomes large). " Paul Nylander
*** " We cut off the sub tree from a given if the derivative is greater than the limit. This eliminates dominant highly contractive regions of the inverse iteration, which have already been registered. We can calculate successive derivatives iteratively. Colour by the log of the absolute derivative"
Examples of code :
Compare it with:
* C code.
* Matlab code
See also
* color: parts of Julia set have different color
** virtual math museum: julia set
** fractalforums.org: Julia set

# See also

* Dynamical systems
** Fixed points
** Lyapunov number
* Functional equations
** Abel function
** Schroeder function
** Boettcher function
** Julia function
* Special matrices
** Carleman matrix
** Bell matrix
** Abel-Robbins matrix

# References

* ↑ wikipedia : Iteration
* ↑ From local to global theories of iteration by Vaclav Kucera
* ↑ Inverse Iteration Algorithms for Julia Sets by Mark McClure
* ↑ Complex iteration by Microcomputadoras
* ↑ On rational maps with two critical points by John Milnor, fig. 5
* ↑ Iterated Functions by Tom Davis
* ↑ The Existence and Uniqueness of the Taylor Series of Iterated Functions by Daniel Geisler
* ↑ Continuous Iteration of Dynamical Maps R. Aldrovandi, L. P. Freitas (Sao Paulo, IFT)
* ↑ Continuous_iteration_of_fractals by Gerard Westendorp
* ↑ how-to-fold-a-julia-fractal by Steven Wittens
* ↑ Folding a Circle into a Julia Set by Karl Sims
* ↑ Visual Explanation of the Complexity in Julia Sets by Okke Schrijvers, Jarke J. van Wijk ( see video in the supporting info)
* ↑ How to Build a Julia Set
* ↑ turn
* ↑ Understanding Julia and Mandelbrot Sets by Karl Sims
* ↑ Une méthode rapide pour tracer les ensembles de Julia : l'itération inverse by John Bonobo
* ↑ Trees of visible components in the Mandelbrot set by Virpi K a u k o , FUNDAMENTA MATHEMATICAE 164 (2000)
* ↑ Real and imaginary parts of polynomial iterates by Julia A. Barnes, Clinton P. Curry and Lisbeth E. Schaubroeck. New York J. Math. 16 (2010) 749–761.
* ↑ mandelbrot-hue by Richard A Thomson
* ↑ phase by Linas Vepstas
* ↑ Complex numbers by David E Joyce
* ↑ Powers of complex numbers from Suitcase of Dreams
* ↑ Parabolic Julia Sets are Polynomial Time Computable by Mark Braverman
* ↑ SYMBOLIC DYNAMICS AND SELF-SIMILAR GROUPS by VOLODYMYR NEKRASHEVYCH
* ↑ Query about general Julia set IFS for higher powers.
* ↑ wikipedia : repelling fixed point
* ↑ mathbbc/185430 mathoverflow question: clustering-of-periodic-points-for-a-polynomial-iteration-of-mathbbc
* ↑ Wolfram Alpha
* ↑ example
* ↑ wikipedia : repelling fixed point
* ↑ Fractint documentation - Inverse Julias
* ↑ Image and c source code : IIMM using hit limit
* ↑ Exploding the Dark Heart of Chaos by Chris King
* ↑ Drakopoulos V., Comparing rendering methods for Julia sets, Journal of WSCG 10 (2002), 155-161
* ↑ bugman123: Fractals
* ↑ dhushara : DarkHeart