Fractals/book

Book here means :
 * unnamed ( old) c program by Claude Heiland-Allen
 * one gui program
 * set of the console programs
 * https://gitlab.com/adammajewski/mandelbrot-book_book/
 * book in pdf format about : " 	how to write a book about the Mandelbrot set ".
 * official version
 * Here is unofficial version of pdf file ( 68.3 MB )

= versions=
 * book console program using stream
 * book GUI program is mostly abandoned now.
 * It is forked to m-perturbator in the mandelbrot-perturbator repository
 * see also libraries:
 * mandebrot-numerics
 * mandebrot-graphics

cli

 * sh file ( main program
 * c file in bin directory
 * c and h files in lib directory

=Features=
 * zoom with automatic dynamic precision
 * free c source code
 * uses Newton method to compute :
 * center ( nucleus)

Plane description
Radius is defined as "the difference in imaginary coordinate between the center and the top of the axis-aligned view rectangle". Radius has no initial value.

Algorithms
Images with full src code :


 * exterior :
 * Smooth colouring with continuous escape time
 * grid based on integer escape time and binary decomposition
 * Atom domains
 * external rays : the Newton Method
 * boundary : distance estimation ( DEM/M)
 * interior :
 * Interior coordinates
 * Atom domains

All algorithms are described in the book : "How To Write A Book About The Mandelbrot Set" by Claude Heiland-Allen

nucleus or center
See function mandelbrot_nucleus function from book/code/gui/main.c. It uses Newton method.

Compare with the muatom function in mightymandel/src/atom.c

Parameter external ray in
Code for computing external ray inwards using Newton method, mpfr and gmp library, based on the code from the library External angle is read from the string ( binary fraction)

=instal=

dependencies

 * OpenGl
 * GL/glew.h ( libglew-dev )
 * Gtk ( GUI

sudo apt install mesa-utils sudo apt install libglew-dev sudo apt install freeglut3-dev sudo apt-get install libgtk-3-dev

clone
First clone the official git repository :

git clone https://code.mathr.co.uk/mandelbrot-book

or the old one ( deprecated):

git clone http://code.mathr.co.uk/book.git

or you can use unofficial repository :

git clone https://gitlab.com/adammajewski/my-book

make
go to the program directory and install :

cd book # or my_book cd code make -C lib make -C bin make cd gui make cd ..

recompile
First:

make clean

then make again

pdf
First

sudo apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra sudo apt-get install texlive-science

then to make book in pdf format :
 * go to book/book directory
 * build

cd book make

or use unofficial version with full c code

images
https://code.mathr.co.uk/mandelbrot-book-images/

git
From console opened in the mandelbrot-numerics directory :

git pull

If you made some local changes you can undu them :

git checkout -f

then

git pull

Now install again

=run=

There are 2 types of the last versions of book program:
 * console
 * gui

To run gui program:

./mandelbrot_gui
 * 1) cd gui

To run console program use bash scripts, see examples :

./examples/standardview.sh

Examples

 * for the console programs are bash sh files and use pipeline ( stream)
 * for gui version program ( /gui/mandelbrot_gui, see Makefile) reads parameters from the text files

for console program
./mandelbrot_render float_type cre cim plane_radius escape_radius "string_file_name" image_width image_heght maximum_iterations interior ./mandelbrot_render 3 -5.7941214880704257e-02 8.1326829943642642e-01 8.1000000737099996e-09 10000 "g" 8000 8000

Extended use :

period
usage :

./mandelbrot_box_period cx cy radius maxperiod

example :

./mandelbrot_box_period 3.06095924635699068e-01 2.37427672737983361e-02 2.0000000000000001e-10 1000

next example :

./mandelbrot_box_period -0.220857943592514 -0.650752006989254 0.0000020 2000 596

If nucleus in not inside rectangle defined by above parameters then returns 0

Compute nucleus
usage:

./mandelbrot_nucleu bits cx cy period maxiters

example :

./mandelbrot_nucleus 100 3.06095924635699068e-01 2.37427672737983361e-02 68 1000

mandelbrot_external_angles
Compute angles of rays landing on the root point, usage: ./mandelbrot_external_angles bits cx cy period

example :

./mandelbrot_external_angles 100 3.06095924635699068e-01 2.37427672737983361e-02 68

New :

./mandelbrot_external_angles 53 -3.9089629378291085e-01 5.8676031775674931e-01 89

result :

.(01001010010010100101001001010010010100101001001010010100100101001001010010100100101001001) .(01001010010010100101001001010010010100101001001010010100100101001001010010100100101001010)

Another :

./mandelbrot_external_angles 100 -1.115234269232491 0.252761823831669 24 .(010110010110010110011001) .(010110010110011001010110)

mandelbrot_describe_external_angle
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)

for gui program
size 2000 2000 view 53 3.0609592463186358e-01 2.3742767274521188e-02 7.6870929325598169e-11 text 57 3.060959246472445584e-01 2.374276727158354376e-02 272 text 56 3.06095924633099439e-01 2.3742767284688944e-02 204 text 56 3.06095924629285095e-01 2.37427672645622342e-02 204 text 54 3.06095924643046857e-01 2.374276727237906e-02 136 text 54 3.06095924629536442e-01 2.37427672749394494e-02 68 ray_in 2200 .(00000000000100000000000000110000000000000000000000000100000000000001) ray_in 2200 .(00000000000100000000000000101111111111111100000000000010000000000010)

To understand loading parameter files see deserialize function :

ray-out
Input format should be of the form:

.pre(period)

eg:

.010(110)

Gallery
commons category: Fractals created with mandelbrot-book program

=use=

In the gui program box means that user have to mark rectangle ( like nucleus) not to click ( like bond) =Dictionary=

bulb

 * component
 * Mu-Atom

Bond

 * touching point
 * cur point
 * root

"Bond is a " point where two mu-atoms meet. The parent "binds to" the child through the bond, and the two are said to be adjacent. This use of the word 'bond' was introduced by Benoit Mandelbrot in his description of the Mandelbrot set in The Fractal Geometry of Nature." From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2015.

In the book program result of computing bond is the internal angle ( = combinatorial rotation number ) of the parent components

dwell
"Dwell is a colloquial name for the Representation Function called Escape-Iterations." From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2015.

"The dwell bands are the regions of solid color that appear in a standard view of the Mandelbrot Set; they are also called level sets. All points in a dwell band have the same dwell. They are separated from one another by the "contour lines" or lemniscates."

hub

 * branch type Misiurewicz point

nucleus
Nucleus of a Mu-Atom = center of hyperbolic component of Mandelbrot set

"The unique point within any mu-atom which has the property of belonging to its own limit cycle. This point is called the superstable point. This use of the word 'nucleus' was introduced by Benoit Mandelbrot in his description of the Mandelbrot set in The Fractal Geometry of Nature. If you set the polynomial formula for a lemniscate ZN equal to zero and solve for C (to get the roots of the polynomial), the roots are the nuclei of the mu-atoms of period N, plus any mu-atoms of periods that divide evenly into N. This procedure has been used numerically by Jay Hill to find all mu-atoms for periods up to about 16." From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2015.

Finding nucleus

A nucleus n of period p is a point of parameter plane

$$ c = n $$

which satisfies :

$$f^p_n(0) = 0$$

where :

$$ z = 0 $$

Claude is using Newton's method in one variable to compute c=n

Partials

 * good guesses for the period of hyperbolic component (enclosed by atom domain) of c are the partials, namely the values of p for which |fpc(0)| reach a new minimum.
 * the partials, namely the values of p for which |fpc(0)| reach a new minimum. It is related with the interior distance
 * "partials" are the iterations p where |z_p| is smaller than all previous |z_n|. They are good candidates for possible periods.
 * "Partials" is my term for the set of n with 0 < n such that |z_n| < |z_m| for all 0 < m < n, where z_{n+1} = z_n^2 + c, z_0 = 0. This is related to "atom period domain" colouring: http://mrob.com/pub/muency/atomdomain.html
 * A different way is to check that z_p is near zero, rather than z_{p+1} is near c. They have the same effect in the end, but it's a little easier to calculate.

A few examples:

-9.82053364278e-2 + 0.87751161636 i is the center of a bulb with period 30 and approximate size 8.7e-4 its partials are 1 3 6 12 30

-1.40107054826248 + 1.68078322683058e-2 i is the center of a cardioid with period 25 and approximate size 2.9e-7 its partials are 1 2 4 8 25

-6.30751837180080329933379814864882594423413629277790243935409e-02 + 9.97813152226579778761450011018468925066022924931316287706002e-01 i is the center of a cardioid with period 660 and approximate size 1e-51 its partials are 1 3 4 5 12 34 133 660

-1.949583466095265215576424927006606703613013182307914337344552997126238598475224082315026579e+00 + -7.76868505224924928703440073040924718407938044210292978384443422263629366944037056031909997e-06 i is the center of a cardioid with period 1820 and approximate size 3.5e-83 its partials are 1 2 3 4 9 25 83 359 1820

Example output :

final ...

 * final_n = last iteration = n when z escapes
 * final_z = last z
 * final angle = angle of last z

spoke
spoke = branch of the tree, arm of dendritic structure

wucleus
Periodic point z = wucleus

A wucleus w of a point c within a hyperbolic component of period p satisfies :

$$ F^p (w, c) = w$$

where

$$ F^p (z, c) = z^2 + c$$

so w is a point from dynamic plane ( z-plane)

=How to contribute ?=

git add book.pdf book.tex code/*.c git commit -m "description" git format-patch origin/master

and send patch to Claude by e-mail.

gcc render.c -E -o 26render.c remove some code manually add include

=References=