Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 / ST 1.0; site saber.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!decwrl!sun!saber!skinner
From: skinner@saber.UUCP (Robert Skinner)
Newsgroups: net.graphics,net.math
Subject: Exp. Math & Fractal Dragons (HELP!) (133 lines)
Message-ID: <1659@saber.UUCP>
Date: Thu, 27-Jun-85 13:19:10 EDT
Article-I.D.: saber.1659
Posted: Thu Jun 27 13:19:10 1985
Date-Received: Mon, 1-Jul-85 06:28:24 EDT
Distribution: net
Organization: Saber Technology, San Jose, CA
Lines: 138
Xref: watmath net.graphics:843 net.math:2114


 ** REPLACE THIS LINE WITH YOUR (REPLACE THIS LINE WITH YOUR (REPLACE 
 THIS LINE WITH YOUR (...))) ***

Someone on the net recently mentioned "experimental mathematics", without
much elaboration.  I want to elaborate here a little because (a): it is
of general interest, and (b):  it leads into the second subject, fractal
dragons.

(In the following discussion, I will represent subscripts with periods:
f-sub-2 ==> f.2,  and powers with carats:  f squared ==> f^2.  
Also, most of this involves complex numbers, so i=sqrt(-1).)

The basic technique of experimental mathematics is to a chose a function (f) and
an area of the complex plane (z) where you wish to plot successive iterations
of the function.  The function is iterated by repeatedly substituting the
result of the function back into itself:  f.2(z)=f(f(z)) and f.3(z)=f(f(f(z))),
etc.  The actual value plotted for each z in the complex plane is the number 
of iterations it takes for the result to approach "infinity".  When the 
number of iterations is assigned a color the output is amazing.

I have only experimented with a small number of functions, and most of
these produce self-similar patterns.  The best of the functions were 
(a): f(z)=c*sin(z), where c=(1.0,a*i) and a<1.0, the best range is .1-.8 
and (b): the (in)famous "dragon function", f(z)=c*z*(1-z), where c~=(1.64,.96i)

Warning:  the above information may be hazardous to your computer account, 
especially if you have to *pay* for it.  I wrote my routines in Fortran,
calculated 1024x1024 points, and ran them on a 11/780 *with* hardware
accellerator.  (Which I no longer have (free) access to, I'm sorry to say).
Most of the functions required 10-30 minutes of CPU time.  One version of
f(z)=c*sin(z) where c was almost (1.0,0i) never finished after 24 hrs. of 
real time.  Finished, meaning not all of the sample points had gone to 
infinity.  None of these times include color assignment or output 
formatting, those were all post-processing functions.



And now on to fractal dragons:  The function mentioned above did indeed generate
something very close to Mandelbrot's fractal dragon.  The difference was that
it was chipped away from the outside going in, and eventually every point went
to infinity.  But the process did produce the correct shape, so I was content
for awhile.

But alas, I am no longer content with that, so I have attempted to produce the
dragon Mandelbrot's (& V. Alan Norton's) way.  My problem is that either I am
missing something obvious, or the text is not clear.  Please, if anyone can
help me let me know.  I'm getting ahead of myself, so let me describe what
I've attempted so far.  First I'll quote page C4 of The Fractal Geometry of
Nature:

	As to the design that stands out from the black background, it is
	made of 25 kinds of "stones", each defined by

		{z: lim             f   (z)=z }
		       n->infinity   25n     g

	where the 25 complex numbers z.g are roots of the equation
	f.25(z)=z (where f(z)=c*z*(1-z), as above), and in addition 
	satisfy |(d/dz)f.25(z)|<1.  (derivative of the 25th iteration < 1 )


Failure Number 1.

The first phrase to stick in my thick skull was "roots of the equation f.25".
So, I proceeded to try and find all the roots to f.25.  Brute force 
(try lots of points & hope one works) failed miserably (as it should, I 
suppose), so I got more clever.  Noting that 0, and 1 are roots to f(z), 
I wrote the programs to find the roots to f(z)=c*z*(1-z)=1.  That gives 
the roots to f.2(z), so all I had to do was recursively find the roots to
trace back 25 iterations and I would find the magic "stones".  I quickly 
found out that not only does the number of roots grow exponentially, but the 
slopes ( which I also found by Brute Force: slope=((f(root+del)-f(root))/del))
were *huge* (Holy Floating Point Exception, Batman!).  

Here I was, stuck with 2^25 complex roots that didn't mean anything and not
much closer to a dragon.  I realized that the derivatives were going to be
"infinite", because f.25 is a 2^26 order polynomial.  My roots would go to
zero, and the iterated value of a point near the root will go to infinity.
In a moment of desperation, I plotted these points anyway and they all lie
on the border of the dragon.  The dragon is positioned in the same place
in the complex plane as I found with "experimental math" ( (-.11,-.58i) to
(1.11, +.58i) if you must know ), so I know I'm close.


Failure Number 2.

(Well, I haven't completed the program, so it hasn't failed yet.  But
here's why I don't think it will work:)  I realized that the book says
roots of f.25(z)=z.  Finding those roots will be considerably harder.  I
am in the process of writing a program to try Newton's approximation to get
*one* root, then check the slope.  I've also realized that if I express
the iterations as f(g(z)) I can calculate the exact derivative incrementally.
(I still think the slope will be huge.)

Here's my problem:  I'm assuming that once I find the magic 25 numbers, I will
need to continually iterate them within f(z) to obtain the correct dragon.  
The results will be the points I plot, or they go to infinity, whatever.  
*However*, I know that f.25(z)=z, so after 25 iterations, I'm back at z, 
where I started.  25 numbers, period.  Even if there are 25 distinct sets 
of these 25 number cycles, that only gives me 25*25=625 points max.  You 
can't plot the dragon with the required detail with only 625 points.


General question:
In chapter 19, Mandelbrot gives two equations for finding appropriate constants
c:  c=exp(2(pi)i*(m/n)) or c=2-exp(2(pi)i*(m/n)) where m/n is an irreducible
rational number < 1.  The constant Mandelbrot gives looks more like the
second equation, so c=(1.64,.96i)=2-(.36,-.96i).  *However*, the magnitude
of the second term is 1.05, instead of 1. as the exp should be.  Also, on page
192, Mandelbrot implies that the number n gives the dragon it's characteristic
number of arms.  Therefore n should equal 5, but if you calculate (m/n)
you get -.195, not a factor of 1/5.  So what's going on here, should c be what
Mandelbrot gives us, or should (m/n)=.2?  (Using (m/n)=.2 yields 
c=(1.691,-.951) and a mirror image dragon similar to the target dragon.)


Appeal for Help:
Has anyone out there recreated the dragon in question?  Are you willing
to give me hints, clues, direct answers, so I can satisfy my intellectual
longing and generate a pretty fractal at the same time?  What is the magic
constant, c, anyway?  If I can find the 25 magic numbers, what do I do with
them?

I will offer my dragon code to anyone who wants it in return, and eventually 
the "experimental mathematics" code, if I ever convert it from VMS.

Please respond by mail and I'll summarize on the net.
Thanks in advance.

------------------------------------------------------------------------------
				It's pretty, but is it Mathematics"

Name:	Robert Skinner
Mail:	Saber Technology, 2381 Bering Drive, San Jose, California 95131
AT&T:	(408) 945-0518, or 945-9600 (mesg. only)
UUCP:	...{decvax,ucbvax}!decwrl!saber!skinner
	...{amd,ihnp4,ittvax}!saber!skinner