🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Jay R. Hill Wed, 16 Feb 1994 20:37
The Mandelbrot Set Chaosometer
#399
Author: Jay R. Hill
Date: Wed, 16 Feb 1994 20:37
232 lines
13390 bytes
             The Mandelbrot Set Chaosometer

As a part of a lively discussion of the Mandelbrot Set area on Internet 
last March, David Doff suggested it would be "instructive to compute the 
length of the 1-D M-set."  He noted that "if you do it by pixel counting, 
the length converges to a value close to 1.70 as the value of imag(c) 
tends to zero."

"This makes sense", he added, "if you think of the left hand part of the 
real line as a Cantor-like set. This also indicates that the regions of 
Chaos occupy a total length of about 0.55 and only this amount of the 
real line is infinitely thin."

In August I decided to take a closer look at this question:

  What portion of the real line is periodic orbits vs. chaotic.

Since we know the Feigenbaum point, -1.40115518909205060052382678789..., 
is one end of an interval that is periodic ending at +1/4, then 
1.651155189092... is definitely periodic.  The rest is an upper bound 
(.598844810908) or 26.7% of (-2 to +1/4).  Over a weekend I set up a 
search on my 486/33 for larger periodic intervals, marked by cardioids 
next to a sequence of circular components.  I used a search step of 
0.000001 and found 883 cardioid roots.  The largest is, of course, one 
ending at 1/4 having started somewhere deep in the high period 
component nest at the Feigenbaum point.

The next largest is the period 3 group ending at -7/4 and beginning at 
-1.7798180758349913642620671... (its Feigenbaum point).  I was surprised 
to find rather large cardioid groups with high periods.  For example,  
the largest period 24 cardioid group is 0.0003507556 long.  My first 
results show the periodic length is at least 1.7116.

But the question remained.  What portion of the real line has periodic
orbits vs. chaotic?  Reducing the step size to 0.0000002 increases the 
periodic bound to at least 1.71197 as more cardioids are found.  

Kerry Mitchell wrote "It seems to me that most of the points on the 
spike are periodic, but the windows are very small and the periods are 
very high.  I say this based on a hunch from looking at the spike; 
we've all seen periodic windows but I don't know of any chaotic windows."

The trouble is the chaotic windows are dirty, with periodic specs in 
them.  As expected, we see them even when we magify by 10^70 using 
DEEPZOOM.  Which brings us to my Mandelbrot Set Chaosometer.

Those who followed my posts on the net about the area of the M-Set and 
related computations will have noticed the recurant theme: How to aviod 
long computations by early identification of classes of orbits for the 
z <- z^2 + c iteration.  These are the escapers, periodics, preperiodics, 
and chaotics.  In the file Ken Shirriff posts regularly on Internet 
(sci.fractals FAQ), he states the Lyapunov exponent can identify chaos.  
If the Lyapunov exponent, lambda, is positive, then the iteration is 
chaotic.  He defines the exponent as 

   lambda = limit as N->infinity of 1/N times sum from n=1 to N of 
       log2(abs(dx sub n+1 over dx sub n))

Now for the Mandelbrot Set, this is

lambda = lim (1/N) sum{ log2 | 2*z[n] | }                   (1)

since z[n+1] = z[n]*z[n] + c.  It is not clever to do lots of logs, so 
I have reworked the formula and use

  J = product{ 2*abs(z[n]) },   n=1,...,N                   (2)

Then lambda = (ln J)/(N*ln 2), but you need only compare J to 1.  If 
J>1 you have chaos.  If you are iterating c in the center of a component, 
J will be equal to or very close to zero.  Evaluating the logarithm to 
get lambda gets an error.  Using formula (2) saves evaluating the logs 
in formula (1) and gets the same results.  The factor of 2 in (2) tends 
to keep J of reasonable size during the iteration.  

Now, how well does equation (1) or (2) work as a detector of chaos in 
Mandelbrot calculations?  I have mixed results.  

Along the real line J remains 'undecided' until n is greater than some 
value, call it k.  In or near a periodic component, I find k is at least 
equal to the period.  For example, in the period 4096 component centered 
at -1.4011551704444 (in the Feigenbaum sequence, only .0000000186476 
away from the Feigenbaum point) J-1 remains positive most of the time, 
dropping briefly below zero at n=1024 and 2048.  Only after n>4096 does 
J become very small. But even then it jumps to above 1 a few more times, 
depending on how close c is to the component center.  I have traced the 
Feigenbaum component sequence to one with period 262144.  Now if I were 
to have used the Chaosometer to cut off computations for chaotic points 
too early, I'd have missed this small high period component!  

On the otherhand, chaotic points on the real line (for example, with 
lambda=0.25) drive J quickly to very large values (>1e200).  These can 
certainly be abandonded as chaotic saving us the trouble of following 
the iterations to some MAXITER since the iteration will not ever diverge 
(-2 > c > -1.401155189092...).  For these points a period will never be 
found and the test is useful.

The next example I tried is c = complex points on the boundary of the 
main cardioid.  Now, these are either periodic (where a bud touchs) or 
chaotic.  Last year I posted a list, Table I, of chaotic c, some of 
which I tested here.  The formula does not work as well as I would like, 
since 'limit N->inf' is computationally vague.  Let's start with a 
definitely periodic point: c=0.25+0.5i.  After more than a million 
iterations using 80 bit floating point arithmetic, lambda approaches 
zero but only mostly from the minus side, but not completely.  It 
occasionally jumps to positive for one or two iterations.  Consider a 
chaotic point near 0.25+0.5i, c=0.2850441472+0.4607492096i.  Again, 
lambda approached zero, but now mostly from positive side and even after 
more than a million iterations, it still drops to negative (hinting at 
periodic).

Now it can be shown that on the edge of the period 1 and 2 components 
the Chaosometer is exactly 1 (lambda = 0) in the limit of infinitely 
many iterations and infinite precision.  Orbits of points, c, on the 
cardioid edge converge to a=.5-sqrt(.25-c).  The magnitude of a is 
exactly 1/2 so by formula (1) J=1.  On the edge of the period 2 circle
the orbit converges to -.5+sqrt(-.75-c) and -.5-sqrt(-.75-c) whose 
product has a magnitude 1/4.  Here too by formula (1) J=1.  It would
appear J=1 will hold in the limit for the chaotic orbits also.

That is, even though the behavior of these points is very different, 
one chaotic and the other periodic, their Chaosometer reading is 
indistinguishable.  The test will work well for points on filements, 
points 'far' away from edges of components.  Points on the edge of a 
component will require a new test.  Note that periodic orbits converge
to some point(s), a, and so will diverge from any previous point in the 
orbit.  On the other hand, chaotic orbits file in points densely near
any previous point in the orbit.  This suggests a test for chaotic 
orbits.  Look for iterations approaching arbitrarily close to zero.

I recommend the Chaosometer in Mandelbrot calculations along with period
detection and other tests and devices.  Since the only filement we know
well is the real line, the test should at least be used when imag(c)=0.

As we have seen above, chaotic points, c, can be found on the exact 
edge of a bud or cardioid where no other bud is touching.  Here the 
orbit time is infinite. Its path is a (possibly multiple) fractal like 
pattern resembling the shore of Austrailia.  The path jumps from 
'island' to 'island' having gone through zero and the original chaotic
point.  The path is sort of self-similar at all scales, eventually
filling in one or more wiggly closed curves.  If c is on the Cardioid,
where the period is one, there is only one wiggly closed curve. When c 
is on the period 2 bud centered at -1, there are two similar wiggly 
closed curves. One containing zero and the other containing c.  The 
number of 'island' patterns equals the period of the bud containing c.  

You may wish to look at these orbits.  They are quite intertaining (see 
my sig).  To generate orbit paths I use 65000 to a million iterations.  
Look for MOE by Darcy Boese <s9329053@SANDCASTLE.COSC.BROCKU.CA> and 
also FRACTINT, two fine progras which plot these orbits.  Table I shows 
some c which are exactly denoteable in decimal.  The columns labeled 
Ur, Ui give a point c= Ur + i*Ui on the circular edge of the period 2 
bud.  The last two columns give you points c = Cr+i*Ci exactly on the 
edge of the period 1 cardioid.


                       Table I

       Ur        Ui            Cr               Ci

 -0.7507200  0.0189600  0.25143585280000  0.00010920960000
 -0.7553824  0.0515968  0.26053303816192  0.00222171693056
 -0.7600000  0.0700000  0.26920000000000  0.00560000000000
 -0.7660000  0.0880000  0.27995200000000  0.01126400000000
 -0.7892000  0.1344000  0.31610688000000  0.04214784000000
 -0.8000000  0.1500000  0.33000000000000  0.06000000000000
 -0.8119520  0.1647360  0.34319959756800  0.08164579737600
 -0.8352640  0.1880480  0.36236840243200  0.12826979737600
 -0.8500000  0.2000000  0.37000000000000  0.16000000000000
 -0.8656000  0.2108000  0.37429312000000  0.19494784000000
 -0.9120000  0.2340000  0.36404800000000  0.30326400000000
 -0.9300000  0.2400000  0.35080000000000  0.34560000000000
 -0.9484032  0.2446176  0.33189576183808  0.38826331693056
 -0.9810400  0.2492800  0.28504414720000  0.46074920960000
 -1.0189600  0.2492800  0.20920414720000  0.53637079040000
 -1.0515968  0.2446176  0.12550856183808  0.59020708306944
 -1.0700000  0.2400000  0.07080000000000  0.61440000000000
 -1.0880000  0.2340000  0.01204800000000  0.63273600000000
 -1.1344000  0.2108000 -0.16330688000000  0.64825216000000
 -1.1500000  0.2000000 -0.23000000000000  0.64000000000000
 -1.1647360  0.1880480 -0.29657559756800  0.62392220262400
 -1.1880480  0.1647360 -0.40899240243200  0.57729820262400
 -1.2000000  0.1500000 -0.47000000000000  0.54000000000000
 -1.2108000  0.1344000 -0.52709312000000  0.49545216000000
 -1.2340000  0.0880000 -0.65604800000000  0.34073600000000
 -1.2400000  0.0700000 -0.69080000000000  0.27440000000000
 -1.2446176  0.0515968 -0.71793736183808  0.20416548306944
 -1.2492800  0.0189600 -0.74568414720000  0.07573079040000

Here is how I coded the Chaosometer in my C++ DEEPZOOM program.  Note
mfloat is a 72 digit float from the fine 72 digit math package Mfloat
by Kaufmann Friedrich<fkauf@fstgds06.tu-graz.ac.at> & Mueller Walter.

mfloat ZERO=(mfloat)0.0;
mfloat ONE=(mfloat)1.0;
mfloat TWO=(mfloat)2.0;
mfloat QUARTER=(mfloat)0.25;
mfloat BigJ=(mfloat)1e38;

if( cI == (long double)0.0 ){ // imaginary part = 0, real line
    if(cR >= -TWO && cR <= QUARTER){
      J=ONE; period=0; next_compare = compare = 1;
      lastzR=ZERO; lastzI=ZERO; absz=ZERO;
      while( (i<max_iter) && (absz<FOUR) && (period==0)) {
        absz=zR*zR; zR = absz+cR; J *= 2*fabs(zR);
        if(J>BigJ) period=max_iter;
        next_compare--;
        if (!next_compare){
          // tight eps test: if (abs(z-lastz)<eps1) period=j;
          if (fabs(zR-lastzR) < eps1) { j=0;
            while((j<compare) && (absz<FOUR) && (period==0)){
              absz=zR*zR; zR = absz+cR; J *= 2*fabs(zR);
              if(J>BigJ) period=max_iter;
              j++;
              // bigger eps test: if (abs(z-lastz)<eps) period=j;
              if (fabs(zR-lastzR)<eps && fabs(zI-lastzI)<eps) period=j;
          } }
          compare++; next_compare = compare; lastzR=zR; lastzI=zI;
        } i++;
  } } }

Warmly,
Jay "Not tonight honey, I'm calibrating my Chaosometer" Hill

PS. To see chaotic orbit, compile and run this sig with MSDOS and Borland C.

#include <graphics.h> /* CHAODEMO by hilljr@jupiter.saic.com (Jay R Hill) */
long e=0;float g,s,f,r,i,w=3./640;int b,c,d=0,m,u,l;A(float x,float y){for(r=
i=0,e=0;e<9999;++e){g=r*r-i*i+x;i=2*r*i+y;r=g;m=(r+2)/w;l=(i+1.125)/w;putpixel
(m,l,15);}}main(){initgraph(&d,&b,"");for(;e<153600;){u=(256*(s=(r=w*(m=e%640
)-2)*r+(i=w*(l=e++/640)-1.125)*i)-96)*s+32*r<3?1:16+32*r+16*s<1?2:0;if(u==(s=
f=0))do{g=s*s-f*f+r;f=2*s*f+i;s=g;}while(++u<256&&g*s+f*f<4);putpixel(m,l,u%
16);putpixel(m,479-l,u%16);}A(-1.2,.15);A(-.47,.54);getch();closegraph();}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads