# File:Centers 9 new.png

Centers of 488 hyperbolic components of Mandelbrot set with respect to complex quadratic polynomial for period 1-9

## Long description

### Program input

No input is needed

### Program output

• png file : centers_9_new.png
• txt files with numerical values of centers in big float Maxima format ( one file for each period)

### Parts of the program

• definition of functions and constants
• for periods 1-period_Max
• computation of irreducible polynomials for each period
• computation of centers for each period : centers[period]
• saving centers to text files : centers_bf_p.txt
• computes number of centers for each period ( l[period]) and for all periods 1-period_Max ( N_of_centers)
• drawing to centers_9_new.png file

### Software needed

• Maxima CAS
• gnuplot for drawing ( creates png file )

Tested on versions :

• wxMaxima 0.7.6
• Maxima 5.16.3
• Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
• Gnuplot Version 4.2 patchlevel 3

### Algorithm

See | Wikibooks for detailes

## Questions

• Can it be done for higher periods ? ( for me (GCL) it fails for period 10 and fpprec:150 or 256)
• How to save it as svg file ?

## Maxima source code

```/*
Maxima batch script
notation and idea is based on paper :
V Dolotin , A Morozow :
On the shapes of elementary domains or why Mandelbrot set is made from almost ideal circles ?
*/
period_Max:9;
/* basic funtion  = monic and centered complex quadratic polynomial
*/
f(z,c):=z*z+c \$
/* iterated function */
fn(n, z, c) :=
if n=1
then f(z,c)
else f(fn(n-1, z, c),c) \$
/* roots of Fn are periodic point of  fn function */
Fn(n,z,c):=fn(n, z, c)-z \$
/* gives irreducible divisors of polynomial Fn[p,z=0,c] */
GiveG[p]:=
block(
[f:divisors(p),t:1],
g,
f:delete(p,f),
if p=1
then return(Fn(p,0,c)),
for i in f do t:t*GiveG[i],
g: Fn(p,0,c)/t,
return(ratsimp(g))
)\$
/*          */
GiveRoots_bf(g):=
block(
[cc:bfallroots(expand(%i*g)=0)],
cc:map(rhs,cc),/* remove string "c=" */
return(cc)
)\$
GiveCenters_bf(p):=
block(
[g,
cc:[]],
if p<7 then fpprec:16
elseif p=7 then fpprec:32
elseif p=8 then fpprec:64
elseif p=9 then fpprec:128,
g:GiveG[p],
cc:GiveRoots_bf(g),
return(cc)
);
N_of_centers:0;
for period:1 thru period_Max step 1 do
(
centers[period]:GiveCenters_bf(period), /* compute centers */
/* save output to file as Maxima expressions */
stringout(concat("centers_bf_",string(period),".txt"),centers[period]),
l[period]: length(centers[period]),
N_of_centers:N_of_centers+l[period]
);
draw2d(
file_name = "centers_9_new",
pic_width=1000,
pic_height= 1000,
yrange = [-1.5,1.5],
xrange = [-2.5,0.5],
title= concat("centers of",string(N_of_centers)," hyperbolic components of Mandelbrot set for periods 1-",string(period_Max)),
user_preamble="set size square;set key out;set key top left",
terminal  = 'png,
pic_width  = 1000,
pic_height = 1000,
xlabel     = "re ",
ylabel     = "im",
point_type    = filled_circle,
points_joined = false,
key = concat(string(l[1])," period 1 component "),
color		  =red,
point_size    = 0.5,
points(map(realpart, centers[1]),map(imagpart, centers[1])),
key = concat(string(l[2])," period 2 components"),
color		  =green,
points(map(realpart, centers[2]),map(imagpart, centers[2])),
key = concat(string(l[3])," period 3 components"),
color		  =blue,
points(map(realpart, centers[3]),map(imagpart, centers[3])),
key = concat(string(l[4])," period 4 components"),
color		  =magenta,
points(map(realpart, centers[4]),map(imagpart, centers[4])),
key = concat(string(l[5])," period 5 components"),
color		  =brown,
points(map(realpart, centers[5]),map(imagpart, centers[5])),
key = concat(string(l[6])," period 6 components"),
color		  =yellow,
points(map(realpart, centers[6]),map(imagpart, centers[6])),
key = concat(string(l[7])," period 7 components"),
color		  =navy,
points(map(realpart, centers[7]),map(imagpart, centers[7])),
key = concat(string(l[8])," period 8 components"),
color		  =black,
points(map(realpart, centers[8]),map(imagpart, centers[8])),
key = concat(string(l[9])," period 9 components"),
color		  =gray,
points(map(realpart, centers[9]),map(imagpart, centers[9]))
)\$
```

## File history

Click on a date/time to view the file as it appeared at that time.

(Latest | Earliest) View (newer 50) (older 50) (20 | 50 | 100 | 250 | 500)
Date/Time Thumbnail Dimensions User Comment current 19:30, 24 March 2009 1,000×1,000 (13 KB) Adam majewski (Talk | contribs) (for periods 1-10) 17:21, 19 March 2009 1,000×1,000 (11 KB) Adam majewski (Talk | contribs) (Centers of 488 hyperbolic components of Mandelbrot set with respect to complex quadratic polynomial for period 1-9)
(Latest | Earliest) View (newer 50) (older 50) (20 | 50 | 100 | 250 | 500)

The following page links to this file: