home *** CD-ROM | disk | FTP | other *** search
/ Graphics 16,000 / graphics-16000.iso / msdos / fractal / iterat31 / function.txt < prev    next >
Text File  |  1993-11-17  |  50KB  |  967 lines

  1. A few comments about the functions in Iterate!
  2. ══════════════════════════════════════════════════════════════════════════════
  3.  
  4. Function A. x=c*x+a*cos(y)             y=d*y+b*sin(x+a*cos(y))
  5. ──────────────────────────────────────────────────────────────────────────────
  6. This was a mistake.  I was trying to make Function B.  (If you study the two,
  7. you'll see what happened.)  It turned out to be a rather fortunate mistake,
  8. though, as this function is more interesting than Function B.  I used this
  9. function in my composition "Chaotic Suite for Computer and Synthesizer".
  10.  
  11. Parameters
  12. ──────────
  13. On this function, I usually set a=b and c=d=1.  You can try a=b=1, then
  14. gradually increase this value to a=b=2, a=b=2.5 and so on.  You will see the
  15. function gradually break up and become more chaotic.
  16.  
  17. You can also experiment with setting 'a' and 'b' to different values.  This
  18. gives an interesting effect.  
  19.  
  20. If you change 'c' and 'd', you will probably want to keep them close to 1,
  21. i.e., c=.99, d=1.
  22.  
  23.  
  24.  
  25. Function B. x=c*x+a*cos(y)             y=d*y+b*sin(x)
  26. ──────────────────────────────────────────────────────────────────────────────
  27. Close to Function A.  In both Functions A and B you'll notice that the entire
  28. plane is tiled over with repetitive figures.  This is of course because of the
  29. periodic nature of the trig functions.
  30.  
  31. Parameters
  32. ──────────
  33. Try the same sorts of parameters as Function A.
  34.  
  35.  
  36. Function C. x=cos(mu)*x-sin(mu)*(y-x²)  y=sin(mu)*x+cos(mu)*(y-x²)
  37. ──────────────────────────────────────────────────────────────────────────────
  38. This function is due to Henon (one of the first mathematicians to put much
  39. study into the area we now call chaos theory).  I found it in a fascinating 
  40. book by Ekeland.  Unfortunately, I had to give the book back to the library, 
  41. and now I live 1000 miles away from the library, and I can't for the life of
  42. me remember the title.  
  43.  
  44. It is quite an interesting little book, though, if you can find it anywhere.  
  45. Ekeland discussed this function and had a graph of it.  I tried to duplicate
  46. the graph on my computer, and so Iterate! was born.
  47.  
  48. This function is area preserving, which simply means that if you take any 
  49. region and put it through the function, the resulting region has the same area 
  50. as the one you started with. Symbolically, you would say the for a region R 
  51. and a function F, the area of R = the area of F(R).
  52.  
  53. The fact that a function is area preserving has certain ramifications for the 
  54. physical interpretation of the function.  For instance, imagine a planet 
  55. revolving around the sun. Imagine a plane which cuts through the planet's 
  56. orbit at right angles to the orbit.  Imagine that each time the planet comes 
  57. around the sun, you mark the spot where its center of gravity passes through 
  58. the plane.  
  59.  
  60. (If this explanation was too complicated for you, just think of making a dot
  61. on the spot where the earth is at 12 midnight on December 31st.  Make a new dot
  62. every year on December 31st.)  
  63.  
  64. What have we got?  An iterated function, of course.  You can think 
  65. of the planet as being the "function", and each orbit of the planet is one 
  66. iteration of the function, which produces one dot on the plane.
  67.  
  68. Now if the planet is the only planet in the whole universe, and if it happens 
  69. to be orbiting the sun in a perfectly circular orbit, we're going to have a
  70. pretty darn boring graph.  Each time the planet comes around, it's just going 
  71. to hit the very same spot again.  So it is like a fixed point.  It doesn't go 
  72. anywhere and it's not very exciting.
  73.  
  74. But let's suppose instead that there are a few other planets in our solar 
  75. system, and maybe our planet has a moon or two orbiting it.  Now all of a 
  76. sudden our perfectly circular orbit isn't quite so circular any more.  In 
  77. fact, our orbit is going to have quite a few interesting little perturbations 
  78. to it, and it definitely isn't going to hit the same spot on our plane each
  79. time around.  It is going to make a fascinating pattern of dots on the plane--
  80. something, as a matter of fact, like what you'll see if you run Function C.
  81. Because that's how Function C was made--imagining this kind of orbit, and how
  82. it would hit the plane, and then just figuring out the equations for the dots,
  83. so you don't have to think about all that gosh darned orbiting every time.  In
  84. fact, the parameter mu in this function is some kind of orbital incidence
  85. parameter or something.  Find Ekeland, ask him, and then we'll both know.
  86.  
  87. At any rate, back to area preserving.  It turns out that any function that is
  88. derived this way--by thinking about orbits hitting a plane and so on--has this
  89. area preserving property.  And (as I recall) the opposite is true, too--if you
  90. have an area preserving function, then you can find an orbit that fits it
  91. perfectly.
  92.  
  93.                                . . .
  94.  
  95.  
  96. Here's another interesting point about this function.  Try this function with
  97. mu=77 degrees, and you will notice that it makes a fractal pattern (see
  98. Iterate!.txt for more details).  What happens is that there is a large central
  99. circle with 5 smaller circles surrounding it.  Each of the smaller circles
  100. is surrounded by 5 even smaller circles.  These even smaller circles are
  101. surrounded by yet smaller circles, and so on ad infinitum.
  102.  
  103. (Actually, if you try this out, you will find that it is not always 5 circles
  104. surrounding, but maybe 3,4,5,6, or whatever.  But for the sake of simplicity,
  105. let's just say it's 5 each time.)
  106.  
  107. Here's a little schematic of sort of what this looks like (this time with
  108. 4 "circles" surrounding each larger "circle"--but that's the limitations
  109. of ASCII):
  110.  
  111.  
  112.                                                  
  113.                               O   O      O   O           
  114.                                                  
  115.                                ┌─┐        ┌─┐
  116.                                │ │        │ │
  117.                                └─┘        └─┘            
  118.                                                  
  119.                               O   O      O   O           
  120.                                                  
  121.                                    ┌────┐                
  122.                                    │    │
  123.                                    │    │    
  124.                                    │    │       
  125.                                    └────┘               
  126.                                                  
  127.                               O   O      O   O           
  128.                                                  
  129.                                ┌─┐        ┌─┐
  130.                                │ │        │ │
  131.                                └─┘        └─┘            
  132.                                                  
  133.                               O   O      O   O           
  134.                                                  
  135.  
  136.  
  137.  
  138. Now here's the point:  Let's suppose it takes 100 iterations to draw the
  139. middle (largest) circle satisfactorily.  Then it takes 5 times as many
  140. iterations to draw the five surrounding circles to the same degree of
  141. detail (if you try this function, you'll soon see why--it's because one
  142. point draws the entire middle circle, and another point draws all five
  143. surrounding circles, so it's spread 5 times as thin and requires 5 times
  144. the iterations to look as good).
  145.  
  146. If we go down another level to the next smaller circles, you will again have
  147. to 5 times the iterations to get the same degree of detail.  So now we're to
  148. 5 x 5 x 100 iterations = 2500 iterations.  Going down another level
  149. multiplies by 5 again, and we have 12,500 iterations.  Going to a fifth
  150. level requires 5 x 12,500 = 62,500 iterations.  For the sixth level,
  151. 5 x 62,500 = 312,500 iterations.  For the seventh level,
  152. 5 x 312,500 = 1,562,500.  Skipping a few levels (I assume you can
  153. multiply by 5 on your own), we find the the 20th level requires about
  154. 2,000,000,000,000,000 iterations.  (That's two quadrillion, just in case
  155. your wondering.  We know that this is a very, very, VERY large number,
  156. because--at this writing--it is actually larger than the amount of the
  157. national debt.  Now that's amazing.)
  158.  
  159. On my computer--a 386-40--it takes 7.24 seconds to do 20,000 iterations of
  160. this function.  So how long would it take to to 2,000,000,000,000,000
  161. iterations?  Approximately 23,000 years.
  162.  
  163. But let's forget about my clunky old computer.  Let's imagine that we don't
  164. want to wait 23,000 years, and so we enlist the services of the world's
  165. fastest supercomputer.  Fantasizing a bit (as computer nerds are wont to do),
  166. let's imagine that the world's fastest supercomputer is a trillion times
  167. faster than my 386. So how long is it going to take the world's fastest
  168. supercomputer to do these 2 quadrillion iterations?  A bit of calculation
  169. reveals--a mere .724 seconds.
  170.  
  171. So there we are.  With the world's largest supercomputer, we've conquered
  172. iteration.  We can look all the way down to the 20th level of our function
  173. in a flash.  And surely there's no need to look on past the 20th level . . .
  174.  
  175. But let's suppose we DO want to look lower than the 20th level.  After all,
  176. there are hundreds--thousands--millions--of levels.  This fractal pattern of 
  177. circles surrounding ever smaller circles goes on forever. The 20th level barely
  178. scratches the surface.  Let's suppose we want to go just a bit deeper, down
  179. to the 40th level.  We set our spiffy supercomputer to calculating, step out
  180. for a little snack while it does its stuff, step back in the room and
  181. discover that . . . there are a mere 2,000,000 YEARS left before the
  182. calculation is complete.
  183.  
  184. And that's just for one point.  We'll need a good 30 or 40 points to make
  185. a decent looking picture.  Might as well settle down for the long haul . . .
  186.  
  187.  
  188. On the other hand, it's fascinating to think that, by understanding the
  189. fractal structure of the graph, in a few moments the human mind can
  190. grasp the essential idea of the function down to the 20th, the 40th, or even
  191. the 4,000,000th level.
  192.  
  193.  
  194.  
  195.                 HUMANS                    SUPERCOMPUTERS
  196.                 ──────                    ──────────────
  197.                   1                              0
  198.  
  199.  
  200. (Cannon blast; Marching band blares the HUMANS' School Song, stage right;
  201. SUPERCOMPUTERS, stage left, overheard muttering "$385f:a348 af 3e 42 2d")
  202.  
  203. This isn't an isolated phenomenon, by the way.  You'll notice it all the time
  204. when you work with Iterate!.  The further you zoom in on a graph, the more
  205. iterations it takes to make it look good.  The more iterations you do, the
  206. longer it takes.  No matter how fast your computer is, you soon find yourself
  207. with graphs that would take an hour, a day, or even longer to complete.
  208.  
  209. Parameters
  210. ──────────
  211. The only parameter for this function is 'mu', which is an angle and is
  212. measured in degrees.  If you set mu=77 you will see the five circles described
  213. above.
  214.  
  215. It is fascinating to explore this function as 'mu' changes from 10 degrees
  216. (where the function makes sort of an egg shape) all the way through 360
  217. degrees and back to 10 degrees.
  218.  
  219.  
  220. Function D. x=a-b*y-x²                 y=x                     (the Henon Map)
  221. ──────────────────────────────────────────────────────────────────────────────
  222. This is the famous Henon Map.  It has been studied intensely by chaotic
  223. mathematicians (and I'm not kidding).  This simple map displays an astounding
  224. variety of behaviors--most of the behaviors, in fact, that have been
  225. discovered in the study of chaos theory.
  226.  
  227. One interesting fact about the Henon Map is that in a certain region, with
  228. certain parameters, the Henon map contains a duplicate of the Horseshoe Map
  229. (Function L).  (A topological duplicate, that is--meaning that the two share
  230. all essential qualities, although things may be deformed so that superficially
  231. they don't look all that similar.)
  232.  
  233. Many books on chaos theory spend a good deal of time exploring this function
  234. (so if you want to find out more about it, just look one of them up).
  235.  
  236. Parameters
  237. ──────────
  238. This function is a good one to use the <M> command, rather than just <Space>.
  239. A lot of graphs that don't look to interesting when you use <Space> suddenly
  240. become quite interesting when you trace the orbits with <M>.
  241.  
  242. One interesting thing to do with this function is to leave one parameter
  243. constant while you gradually change the other.  For instance, leave a=1 as you
  244. gradually change 'b' from 1 to -1.  You will find many bifurcation
  245. points--attracting fixed points will split into a period three attracting
  246. point, and so on.
  247.  
  248. Here are some interesting spots:
  249.     
  250.     Parameters  What you'll see
  251.     ──────────  ────────────────────────────────────────────────────────────
  252.     a=1 b=.9    An attracting fixed point surrounded by a period three
  253.                 attracting point.  In between the fixed point and the period 
  254.                 three point is a period three repelling point.
  255.                 
  256.                 Use the <M> command to find an attracting point.  Then as
  257.                 you're holding <M>, try moving the mouse to "perturb" the
  258.                 point.  When you do this, does the cursor stay near your
  259.                 original attracting point, or does it move towards the other
  260.                 one?  You will find that one of the attracting points here is
  261.                 much more stable than the other.
  262.                 
  263.     a=1 b=-0.45 Somewhere in this area is where you'll see the duplicate of the
  264.     a=1 b=-0.55 horseshoe map.  It is fascinating to try out small changes
  265.                 near these parameters (b=-0.46, b=-0.44 etc.) to see how this 
  266.                 changes the graph.  At certain parameters, there will no longer be
  267.                 be any periodic attracting points, but there will instead be a 
  268.                 "Strange Attractor" (an entire fractal-shaped area that 
  269.                 attracts all nearby points).
  270.                 
  271.  
  272. Function E. z=z²+c, c=a+b*i                             (on the complex plane)
  273. ──────────────────────────────────────────────────────────────────────────────
  274. This is the function that generates the Mandelbrot Set and also the classic
  275. Julia Sets.
  276.  
  277. This function is a function on the complex plane.  'Z' is a complex variable
  278. (representing a point on the plane), as is 'c'.  That is to say, 'c' is not
  279. our usual parameter 'c' for which you can enter a value on the parameter
  280. screen.  Actually, c=a+bi, where i=sqrt(-1), and 'a' and 'b' are our usual
  281. parameters.
  282.  
  283. Iterate! is a powerful tool for exploring the behavior of Julia Sets and the
  284. relationship between the Mandelbrot Set and Julia Sets.  If you have only seen
  285. static pictures of Julia Sets before, you will be amazed at the dynamics that
  286. underlie the graphs (as though the static pictures weren't amazing enough
  287. already!).
  288.  
  289. One of the most fascinating things you can do with Function E is to draw the
  290. Julia Set for the function, and then explore the different areas of the Julia
  291. Set using the <M> and <Space> commands.  Here is how to do this:
  292.  
  293.     1.  Choose Function E using the <F> command.  Enter the parameters you
  294.         want as 'a' and 'b'.  
  295.     2.  Draw the Julia Set using the <J> command.  (The <J> command uses
  296.         Function F to draw the Julia Set; see the notes below to see how
  297.         it does it.)
  298.     3.  Use the <H> command to hide the graphics help line (this makes the
  299.         <M> command work much better).
  300.     4.  Move the cursor to various places in the Julia Set and use the <M>
  301.         command to trace the iterates.
  302.             
  303. You can also use <Space> to iterate in the usual way, but the <M> command
  304. usually gives you a better idea of what's going on.  One good technique is to
  305. first use <Space> to get a quick preview, and then (without moving the cursor)
  306. repeatedly press <M> to get a detailed look at what happened.
  307.  
  308. If you explore the Julia Set in this way, you will soon discover that the
  309. large and small pools of the Julia Set correspond to certain behaviors in
  310. Iterate!.  Here is a schematic of a possible Julia Set:
  311.  
  312.  
  313.         ┌──┬────┬──────────┬───────────────────────┐
  314.         │G │    │          │                       │
  315.         └──┤ E  │          │                       │
  316.            └────┤          │                       │
  317.                 │    C     │                       │
  318.                 │          │                       │
  319.                 │          │                       │
  320.                 └──────────┤           A           ├─────────┐
  321.                            │                       │         │
  322.                            │                       │         │
  323.                            │                       │         │
  324.                            │                       │   B     ├────┐
  325.                            │                       │         │    ├──┐
  326.                            │                       │         │ D  │F │
  327.                            └───────────────────────┴─────────┴────┴──┘
  328.                            
  329.                         
  330. In this Julia Set, any point in Pool F immediately jumps to Pool E. A point
  331. in Pool E jumps to Pool B. A point in Pool B jumps to Pool A. In the middle of
  332. Pool A is an attracting fixed point.  All the points in Pool A spiral inwards
  333. to this attracting fixed point.  
  334.  
  335. A point starting in Pool G has this sequence of Pools:
  336.  
  337.                             G  D  C  A
  338.                             
  339. Once the point lands in Pool A, it of course spirals inward to the attracting
  340. fixed point.
  341.  
  342. So every point in the Julia Set ends up in Pool A, spiralling towards the
  343. attracting fixed point.  However, before the point gets to Pool A, it may
  344. travel a rather tortuous and circituous route.  In a real Julia Set, it will
  345. be even more tortuous and circituous than what I've described here, because a
  346. real Julia Set has many more (many more, that is if you consider infinity to
  347. be many more than seven) pools than our schematic.  Each of of our pools above
  348. would be surrounded in fractal fashion by pools upon pools upon pools.  Each
  349. of these pools, no matter how small, will send its points to a certain larger
  350. pool, and this larger pool will in turn send it to a larger pool, until
  351. finally it arrives in Pool A. It is possible to find points that hit a
  352. hundred, a thousand, or a million smaller pools before finally landing in Pool
  353. A.
  354.  
  355. This, by the way, is only the least complicated type of organization you will
  356. find in Julia Sets.  Most Julia Sets have pools with attracting or repelling
  357. periodic points of order two or higher, as well as other complicated dynamics.
  358.  
  359. Parameters
  360. ──────────
  361.  
  362. Here are a few parameters you can try.
  363.  
  364.  
  365.     Function    Parameters  What you'll see
  366.     ────────    ──────────  ───────────────
  367.        E        a=-0.1      Attracting fixed point
  368.                 b= 0
  369.                 
  370.        E        a=-0.982    Two repelling fixed points
  371.                 b= 0.2838
  372.                 
  373.        E        a=-.7627837 Three spirals
  374.                 b= .1498945                
  375.                 
  376.        E        a=-.487182  An attracting point of period 5,
  377.                 b= .532951  surrounding a repelling fixed point
  378.                  
  379.        E        a=-1.1369   An attracting point of period 6
  380.                 b= 0.23925
  381.                 
  382.        E        a=-0.712515 An attracting point of period 13
  383.                 b= 0.237683
  384.                 
  385.        E        a=-.996592  Attracting point of order 16
  386.                 b= .284015
  387.  
  388.        E        a=-.9964357 Attracting point of order 32 surrounding repelling
  389.                 b=.28822655 points of period 16, 4, 2, and 1
  390.                 
  391.        E        a=-1.170081 A period 105 (?) point, surrounding repelling 
  392.                 b= .2441261 points of various periods               
  393.                 
  394.        E        a= 0.60478  An attracting point of period 125, surrounding
  395.                 b= 0.60189  a repelling point of period 25, surrounding 
  396.                             another repelling point of period 5, surrounding
  397.                             a repelling fixed point
  398.                             
  399.        E        a=-.6033155 A totally disconnected Julia Set--that is, no
  400.                 b=-.8685983 point of the set is touching another point of the
  401.                             set
  402.                             
  403.        E        a= .5       Ditto
  404.                 b= .2
  405.  
  406.  
  407. Another fun thing to do if you have the Mandelbrot-Julia Generator is to draw
  408. a Julia Set there, then run Iterate! and import the Julia Set using the <R>
  409. command.  Then investigate the behavior of the various parts of the Julia Set
  410. using <M> and <Space>.  This is similar to what I described above with the <J>
  411. command.  The difference is that the Mandelbrot-Julia Generator will usually
  412. draw a much more detailed Julia Set than the <J> command.
  413.  
  414.  
  415.                                *     *     *
  416.  
  417.                 
  418. It is rather frustrating to try and find good parameters for Function E by
  419. entering them by hand. Luckily, there is an easier way.
  420.  
  421. The basis of this method is the fact that there is a correlation between
  422. points on the Mandelbrot Set and the parameters of a Julia Set.  This is one
  423. of the facts that Benoit Mandelbrot discovered about the Mandelbrot Set (which
  424. is of course named after him), and it has been rather thoroughly investigated
  425. by later mathematicians.  Check some of the references in "Iterate!.txt" if
  426. you want to know more.  --On second thought, strike that.  Using Iterate!,
  427. you can easily re-discover what these mathematicians discovered, and it might
  428. be more fun that way.  Here's how you do it:
  429.  
  430.     1. Use the <F> command to choose Function E.
  431.     2. Use the <R> command to load "Mandelbr.gph".
  432.     3. Move the cursor to any spot in or near the Mandelbrot Set.
  433.     4. Press <Z> to load these coordinates as the parameters.
  434.     5. Press <J> to draw the Julia Set associated with these parameters.
  435.     6. Use <Space> and <M> to investigate the properties of Function E with
  436.        these parameters.
  437.        
  438. (Note that you won't be able to load "Mandelbr.gph" unless you have an EGA or
  439. VGA adaptor and are running in EGA mode or VGA1 mode.  If you don't have EGA
  440. or VGA, or if you would like to run in a different video mode, you should
  441. consider registering so that you will have my Mandelbrot-Julia generator that
  442. will draw the Mandelbrot Set--or any part of it--in any graphics mode.)
  443.  
  444. The <Z> command is at the heart of this technic.  What is does is load the
  445. (x,y) coordinates of the point in the Mandelbrot Set into parameters 'a' and
  446. 'b' of the function.  (It also gives you a chance to change the other
  447. parameters, and resets the window to a good value for viewing an entire Julia
  448. Set).  
  449.  
  450.  
  451. Here's a rough schematic of the Mandelbrot Set:
  452.  
  453.                                       D           
  454.                                       ┌┐          
  455.                                      ┌┴┴┐         
  456.                                      │  │         
  457.                                      │B │         
  458.                                  ┌───┴  ┴───┐     
  459.                                  │          └┐    
  460.                                  │           └┐   
  461.                                  │            │   
  462.                      H      ┌────┤            │   
  463.                      ┌┐  ┌──┤    │           ┌┘   
  464.                    ──┤├──┤G   F        A    ─┤    
  465.                      └┘  └──┤    │           └┐   
  466.                             └────┤            │   
  467.                                  │           ┌┘   
  468.                                  │          ┌┘    
  469.                                  └───┬  ┬───┘     
  470.                                      │C │         
  471.                                      │  │         
  472.                                      └┬┬┘         
  473.                                       └┘                    
  474.                                       E           
  475.  
  476.  
  477. The first thing you will notice is that points inside the Mandelbrot Set
  478. correspond to Julia Sets with an inside--that is the Julia Sets are "fat";
  479. they have thickness.  Points outside the Mandelbrot Set correspond to Julia
  480. Sets that have no insides--they're just a bunch of isolated dots.
  481.  
  482. (This in fact is how Benoit defined the Mandelbrot Set--if the corresponding
  483. Julia Set has an interior, then the point is in the Mandelbrot Set.  If you
  484. corresponding Julia Set is just a bunch of disconnected points, then the point
  485. isn't in the Mandelbrot Set.  Once Mandelbrot had defined his set, he was
  486. anxious to draw it.  This would have been impossible, except for one fact
  487. about Julia Sets: If the point (0,0) goes to infinity under iteration, the
  488. Julia Set has no interior.  If (0,0) doesn't go to infinity, the point has
  489. an interior.  This fact provides an easy, though time consuming, way to draw
  490. the Mandelbrot Set, and is the basis of all Mandelbrot drawing programs today.)
  491.                                                   
  492. Another thing you might observe is that the Julia Set resembles the area of
  493. the Mandelbrot Set that its parameters came from.  For instance, if you pick a
  494. point in the middle of Pool A--a large, open pool--the corresponding Julia Set
  495. will be a large, open pool.  If you pick the point from a smaller pool, the
  496. Julia Set will consist of smaller pools.  If you pick the point from an area
  497. of the Mandelbrot Set that has seven-armed spirals, then your Julia Set will
  498. have seven-armed spirals.
  499.  
  500. It goes much deeper than this, though.  Each of the pools--whether large or
  501. small--corresponds to definite dynamics in the Julia Set.  For instance, Julia
  502. Sets selected from Pool A all have attracting fixed points.  Julia Sets from
  503. Pool B have an attracting point of period 3 surrounding a repelling fixed
  504. point.  Julia Sets from Pool F have an attracting point of period 2
  505. surrounding a repelling fixed point.  The dynamics of Pool C are just like
  506. those of Pool B, except that the Julia Sets are mirrors images of each other
  507. (the same is true of all pairs of points symmetrical about the x axis).
  508.  
  509. The dynamics resulting from the different pools can be rather neatly
  510. catalogued (I again invite you to consult the literature on this point).  If
  511. you explore the different pools and their associated Julia Sets, you will soon
  512. see why.  Here is just a little hint of the sort of thing you can look for: 
  513.  
  514. Observe what happens when you move from one pool to its largest attached pool.
  515. For instance, points from Pool A have an attracting fixed point.  Points from
  516. Pool F (the largest pool attached to Pool A) have a period 2 attracting point.
  517.  
  518. In Pool B, we have a period 3 attracting point.  When we move to Pool D (the
  519. largest pool attached to Pool B), we have period 6 point.
  520.  
  521. This same rule holds true for all pools in the Mandelbrot Set: Whenever you
  522. move from a pool to its largest attached pool, you double the period of the
  523. attracting point.  For instance:
  524.  
  525.                 Moving From  To  Changes  To
  526.                 ───────────  ──  ──────── ────────
  527.                      A       F   Period 1 Period 2
  528.                      F       G   Period 2 Period 4
  529.                      C       E   Period 3 Period 6
  530.                      B       D   Period 3 Period 6
  531.                           
  532.  
  533.  
  534. You will discover that this sort of relationship holds true for all the pools
  535. on the Mandelbrot Set.  For instance, going to the third large pool on the
  536. right will always do a certain thing--multiply the period of the attracting
  537. point by 3, or 7 or 92 or something like that.
  538.  
  539. This gives an way to find attracting points of various periods.  For instance,
  540. going to the large Pool on the right (i.e., moving from A to B) multiplies the
  541. attracting point by three.  So if we go from A to B, and then go to the large
  542. pool on the right of B (not shown on the schematic), and then go to the large
  543. pool on the right of this pool, guess what kind of an attracting point we
  544. find?  An attracting point of period 1x3x3x3=27.  Going again to the large
  545. pool on the right gives us an attracting point of period 1x3x3x3x3=81.
  546.  
  547. And so on.
  548.  
  549. (Time for another advertisement: This is a good reason to REGISTER your copy
  550. of Iterate!, because you will then receive a copy of the Mandelbrot-Julia
  551. generator, which will allow you to zoom in on these small areas of the
  552. Mandelbrot Set and read the parameters right off them.  These highly magnified
  553. areas often give Julia Sets that are much more interesting than the ones you
  554. can get off the large graph of the Mandelbrot Set.)
  555.  
  556.                                *     *     *
  557.  
  558. An interesting area of the Mandelbrot Set to investigate is the area between
  559. the pools--the "channels" between the different "bays", so to speak.  Let's
  560. think of the channel between Pool A and Pool F.  
  561.  
  562. What happens here?  This is where our attracting fixed point changes to an
  563. attracting point of period 2. So the area around this change (the "channel")
  564. is bound to be interesting--sort of like the area around a nuclear explosion,
  565. where one element changes into another.
  566.  
  567. This point of change from fixed point to period 2 point is called a
  568. "bifurcation point".  And what happens at this bifurcation point is actually a
  569. little more complicated than what I just said.  What really happens is that at
  570. the bifurcation point, the fixed point changes from being attracting to
  571. repelling.  At the same time, a period 2 attracting point appears.  Initially,
  572. the period 2 point is right on top of the fixed point, but as we slowly move
  573. into Pool F, the period 2 point slowly moves away from the fixed point.
  574.  
  575. If you try drawing Julia Sets made from points on either side of the Channel
  576. between Pools A and F, you'll soon see what I mean.  
  577.  
  578. If we were to draw a schematic of this, it might look like:
  579.  
  580.  
  581.                                     ┌────────attracting period 2 point
  582.                                    ┌┘
  583.                attracting         ┌┘
  584.                fixed point       ┌┘
  585.                 ─────────────────*───────────repelling fixed point
  586.                                  └┐
  587.                                   └┐
  588.                                    └┐
  589.                                     └────────attracting period 2 point
  590.                                     
  591.                                     
  592.                              * represents the bifurcation point
  593.  
  594. (This represents the graph we would draw if we plotted the coordinates of the
  595. fixed point, then changed the parameters a little, plotted the fixed point
  596. again, changed the parameters again, plotted the fixed point again, and so on.
  597. It is called--amazingly enough--a bifurcation diagram.)
  598.  
  599. You'll notice that there is some symmetry here--some "conservation laws", so
  600. to speak.  For instance, there is balance between attracting and repelling.
  601. The fixed point must become repelling, so that the period 2 points can be
  602. attracting.  There is symmetry in the fact that the period 2 points appear
  603. balanced on opposite sides of the fixed point.
  604.  
  605. There is in fact a strong correlation here between this "conservation" and the
  606. conservation laws that hold in the physics of subatomic particles.  For
  607. instance, when an electron decays into a photon and some other particles
  608. (sorry about being so vague, but I haven't really been keeping up with my
  609. subatomic physics lately), there are certain properties that must be
  610. conserved: charge, momentum, mass-energy, and so on.  These conservation laws
  611. actually determine the types of subatomic reactions that can occur--and the
  612. same type of thing holds true for our bifurcation point in the Mandelbrot Set.
  613.  
  614. In fact, if you look at diagrams of particle reactions, or traces of subatomic
  615. particles in a cloud chamber or bubble chamber, you will see something that
  616. looks strikingly similar to our bifurcation diagram.
  617.  
  618. (BTW, there is also a fascinating correlation between the Rubik's Cube and the
  619. actions of subatomic particles.  50¢ to the first person who can find a
  620. correlation between the Rubik's Cube and the Mandelbrot Set.  P.S. "They're
  621. both good for wasting a lot of time" is not an acceptable answer.)
  622.  
  623.                                *     *     *
  624.  
  625. The reason all this works the way it does has to do with what Julia Sets are
  626. and how the Mandelbrot Set is defined.  Unfortunately, getting into that can
  627. of worms is beyond the scope of this little help file.  I invite you to peruse
  628. some of the literature if you're curious.
  629.  
  630.  
  631.  
  632. Function F. z=±sqrt(z-c)  c=a+b*i                     (inverse of Function E)
  633. ──────────────────────────────────────────────────────────────────────────────
  634. This function is the inverse of function E. This again is a fascinating
  635. function because of it's relationship to Julia Sets and the Mandelbrot set.
  636.  
  637. It turns out that the border of Julia Sets (generated by Function E) is
  638. repelling under iteration.  That is, points fly away from it, either towards
  639. some attracting point inside the Julia Set, or towards infinity if the point
  640. is outside the set.  (This fact forms the basis of computer graphs of the
  641. Julia Set, by the way.)
  642.  
  643. (In most computer drawings of Julia Sets, the inside of the Julia Set is shown
  644. as black, and the outside is colored.  So the border of the Julia Set is the
  645. border between the black and the color in the computer graph.)
  646.  
  647. So, if you take the inverse of this function, what happens?  The border, which
  648. was repelling, suddenly becomes attracting.  All points on the plane are
  649. attracted to the border, and once they're on the border, they stay there.
  650. This gives us a handy way to draw the border of the Julia Set: Just iterate a
  651. point under this inverse function.  The point will bounce back and forth along
  652. the border and draw it very nicely.
  653.  
  654. This is what you will see when you run Function F.
  655.  
  656. Unfortunately, in real life this method of drawing Julia Sets doesn't work 
  657. quite as well as we would like it to, because the point is more likely to hit 
  658. some parts of the border than others.  Thus some parts of the border are very 
  659. dark, while others are faint.  
  660.  
  661. Actually, the point will hit everywhere on the border of the Julia Set (or at 
  662. least very close to everywhere) sooner or later (in math lingo you would say, 
  663. "The orbit of the point is everywhere dense on the border of the Julia Set").
  664. The trouble is, for some Julia Sets, the point hits certain areas of the border
  665. very soon, and other areas much, much later.
  666.  
  667. You see, we're back to the 23,000 year problem again.  If you had the world's
  668. fastest supercomputer and 23,000 years to wait around, this method would work 
  669. great with any Julia Set.  Well, most Julia Sets, anyway.  A few of them would
  670. take 23,000,000 years, a few 23,000,000,000 years, and a very few even longer.
  671.  
  672. Whether it takes 23 seconds or 23,000,000,000 years to draw the Julia Set 
  673. depends on the parameters you choose.  For some parameters, the technique 
  674. works very nicely.  For some parameters, in fact, this technique works better 
  675. than the usual technique for drawing Julia Sets.
  676.  
  677. (The usual technique is the technique that makes the colored pictures of Julia
  678. Sets that you have likely seen if you even know what I'm talking about when I
  679. say "Julia Sets".)
  680.  
  681. So to get much of a picture with this function, you need to pick the right
  682. parameters.  Generally speaking, 'a' and 'b' should be small in absolute
  683. value.  Say -2 < a < 1 and -1 < b < 1. To be more precise, c(=a+bi) should be
  684. in the Mandelbrot Set.  (See Function E above for how to load parameters
  685. directly from the Mandelbrot Set.) Even within this range, however, certain
  686. parameters will work better.  If you're not in this range, though, you haven't
  687. got a prayer (of getting a picture of a nice Julia Set, that is.  Who knows
  688. but what you might discover something else interesting?)
  689.  
  690. You will want to use the <I> command to set a high number of iterations when
  691. you use Function F. 10000 iterations is a good place to start; you will need
  692. more if your Julia Set is more complicated or if you're zooming in on a small
  693. area.
  694.  
  695. The Julia Sets that you draw with Function F are fractals.
  696.  
  697.                                *     *     *
  698.  
  699. By the way, you might be wondering why there is the '±' in this function
  700. (z=±sqrt(z-c)).  It is because we are taking the inverse of z²+c (see
  701. Function E).  The inverse of this includes a sqrt function (set z'=z²+c and
  702. solve for z; you'll soon see why).  But actually there are TWO square roots
  703. for each number--a fact which is all too easy to forget.  For instance, 10 is
  704. the square root of 100, but so is -10!
  705.  
  706. So if you start with a number and take its inverse under Function E, you
  707. actually come up with TWO inverses (a positive and negative square root).  If
  708. you iterate this inverse function (which is what we're interested in doing),
  709. that means that you take the inverse again.  So we take the inverse of both of
  710. the two inverses.  Each inverse again has two inverses, so now we have a total
  711. of four points.  Doing it again, we find that each of our four points has two
  712. inverses, so now we have eight points.  Doing it a fourth time, we end up with
  713. 16 points.  A fifth time, and we have 32 points, and so on.
  714.  
  715. As you can see, the number of points grows exponentially!  If we were to try
  716. to keep track of all of these inverse points, our computer's memory would soon
  717. be full.  After only 20 iterations, we would have 1,048,576 points--many more
  718. than a PC's memory will hold.  After 30 iterations, we have 1,073,741,824
  719. points--enough to fill a 3,000 megabyte hard drive.
  720.  
  721. So it's simply impossible to keep track of all these inverses.  What we do
  722. instead is much simpler.  We just more or less randomly* pick one of the two
  723. inverses each time.  That way, after 30 iterations, we only have one point to
  724. keep track of instead of 1 billion.  And believe it or not, the result looks
  725. pretty much the same.
  726.  
  727. So that is why there's a '±' in this function--because at each step, we're
  728. picking the positive or the negative square root.
  729.  
  730.                               *     *     *
  731.                               
  732. *Actually instead of just randomly picking an inverse, I have come up with
  733. some tricky algorithms that greatly help out in drawing a Julia Set.  These
  734. algorithms are controlled by parameters 'c' and 'd'. 
  735.  
  736. 1.  Closest Point Algorithm.  This algorithm chooses the square root that is
  737. closest to the point.  This is good for drawing spirals around repelling and
  738. attracting periodic points--a common feature in Julia Sets.
  739.  
  740. The parameter 'c' determines how often this alogorithm will be used.
  741. Parameter 'c' ranges from 0 (never use the algorithm) to 1 (always use the
  742. algorithm).
  743.  
  744. Parameter 'c' usually should not be set to 1, because this algorithm has a
  745. tendency to get stuck on an attracting point if it is used alone.  Typical
  746. good values for 'c' are 0.7-0.9.
  747.  
  748. 2.  Point Not Plotted Algorithm.  This algorithm checks both inverses to see
  749. if they've been plotted on the graphics screen.  If one of the points hasn't
  750. been plotted, the algorithm is more likely to pick that point.  (How much more
  751. likely is determined by parameter 'd'.) If both points have been plotted, or
  752. neither has been plotted, the algorithm picks randomly between the two.
  753.  
  754. Parameter 'c' also determines how often this algorithm will be used.  Whenever
  755. Alogorithm 1 isn't used, this one is used.  So 
  756.  
  757.  
  758.            c=      means
  759.         ───────    ──────────────────────────────────────────────────────
  760.           0        Algorithm 1 never used; Algorithm 2 always used.
  761.           1        Algorithm 1 always used; Algorithm 2 never used.
  762.           0.5      Each algorithm used 50% of the time
  763.           0.75     Algorithm 1 used 75% of the time, Algorithm 2 used 25%
  764.  
  765. Parameter 'd' determines how likely Algorithm 2 is to choose the point that
  766. hasn't been plotted.  Parameter d=1 means always choose the point that hasn't
  767. been plotted; parameter d=0 means always choose randomly.
  768.  
  769. Setting parameters 'c' and 'd' when using Function E also has this same
  770. effect, if you use the <J> command to draw a Julia Set.
  771.  
  772.  
  773. Function G. x=y               y=a*y*(1-b*x-(1-b)*y) (logistic delay equation)
  774. ──────────────────────────────────────────────────────────────────────────────
  775. I found this on page 71 of a book by Lauwerier.  Again, I've lost the book and
  776. the title.  Oh, well.
  777.  
  778. This function is closely related to the (one-dimensional) function f(x)=1-ax².
  779. This function was a seminal function in the discovery of chaos theory.  For 
  780. certain values of 'a', the function is totally chaotic.  Mathematicians were 
  781. astounded that such unpredictable results could come from such a simple 
  782. function (the function is in fact an overly simplistic model for population 
  783. growth).  
  784.  
  785. Believe it or not, today the dynamics of f(x)=1-ax² have been completely 
  786. categorized.  That is to say, mathematicians thoroughly understand this 
  787. chaotic function and all of its complicated dynamics.  
  788.  
  789. This function (f(x)=1-ax²) is rather thoroughly covered in most books on chaos 
  790. theory (just in case you're wanting to know more).
  791.  
  792. Incidentally, our Function E (z=z²+c) is nothing but f(x)=1-ax² translated to
  793. complex numbers.  (Although an exact translation would be z=1-cz², it turns out
  794. that z=z²+c and z=1-cz² both have the exact same dynamics if you make certain
  795. adjustments in the value of 'c'.)
  796.  
  797. Function G is closely related to this function (f(x)=1-ax²), as you can see if 
  798. you examine them both closely.  In fact, you could sort of think of Function G 
  799. as a two-dimensional analog of f(x)=1-ax².
  800.                               
  801. The fact that it's a "logistic" equation means that it is in some way supposed 
  802. to model population growth.
  803.  
  804.  
  805. Function H. x=y                        y=a*x+b*y+c*x²+d*x*y+mu*y²
  806. ──────────────────────────────────────────────────────────────────────────────
  807. Function H again comes from Lauwerier, this time page 72. This is another
  808. variation on the logistic theme, closely related to Function G and
  809. f(x)=1-ax².
  810.  
  811.  
  812. Function I. x=a*x(1-x-y)               y=b*x*y          (predator-prey model)
  813. ──────────────────────────────────────────────────────────────────────────────
  814. This comes from Lauwerier page 74.  This is a very simple predator-prey model.
  815. Think of the x axis representing the population of rabbits, and the y axis the
  816. population of coyotes, and you'll have the basic idea.
  817.  
  818. Function I displays chaotic motion for many parameters, which raises the
  819. question of whether chaotic motion can actually be observed in natural
  820. relationships of this sort.
  821.  
  822. Usually in population models like this one, 1 represents the maximum
  823. population and 0 the minimum.  You can think of it ranging from 100% down to
  824. 0% or something like that.
  825.  
  826. You can see a close relationship between this map and our logistic maps
  827. (Functions G and H) as well as with the Henon Map (all are in fact population
  828. models).
  829.  
  830.  
  831. Function J. x=a*x*exp((1-sqrt(1+y))/b)   y=a*x-a*x*exp((1-sqrt(1+y))/b)   
  832. ──────────────────────────────────────────────────────────────────────────────
  833. Function J is a model of parasitoid-host interaction.  Think of the x axis as
  834. representing the population of the parasite, and the y axis the population of
  835. the host (or perhaps it's the other way around--I'll let you figure that one
  836. out).
  837.  
  838. As you can see, the behavior of this function is strikingly different than
  839. that of Function I.  This leads you to wonder how a species' relationship with
  840. its environment might affect its long term population growth (is it for
  841. instance chaotic, leading eventually to extinction, or chaotic, but within a
  842. closely prescribed area, or stable--perhaps heading towards an attracting
  843. fixed point, as this function seems to do).
  844.  
  845. This model comes from Lauwerier, pages 75-76.
  846.  
  847.  
  848. Function K. x=y             y=-x+2*a*y+4*(1-a)*y²/(1+y²)  (area preserving)
  849. ──────────────────────────────────────────────────────────────────────────────
  850. This function also is area preserving.  I'm not quite sure where I lifted this
  851. one from.
  852.  
  853.  
  854. Function L. x=a*x*(1-2*y)+y      y=b*y*(1-y)   (horseshoe map; try a=1/3, b=4)
  855. ──────────────────────────────────────────────────────────────────────────────
  856. This is the famous horseshoe map.  As soon as you run it with the recommended
  857. parameters, you'll know how it got its name.
  858.  
  859. This could also be called the "Taffy Pulling Map" for reasons that I'll let
  860. you figure out.
  861.  
  862. You'll want to try a high number of iterations with this one--maybe 30,000
  863. iterations or more.
  864.  
  865. An interesting thing to do with this map is to zoom in on one side of the
  866. horseshoe.  You'll see that as you get closer, the sides resolve into ever
  867. more delicate filaments.  In fact, each filament appears to be razor thin--
  868. the sides only get their thickness from the bundles of filaments that make
  869. them up.  But as you zoom in on a filament, you discover that it isn't razor
  870. thin after all--it is made up of even thinner filaments, which are themselves
  871. made up of thinner filaments, and so on.
  872.  
  873. There is a certain pattern to the filaments, which reminds one of the spectral
  874. lines in which are observed in spectroscopy.  As you look at them closer and
  875. closer, they delicately divide and divide again, and it seems that there's no
  876. end to this dividing (in this particular case, there isn't).
  877.  
  878. This pattern of infinitely dividing filaments is also reminiscent of the
  879. divisions in a Cantor Set*, as well as the bifurcation diagram for the
  880. logistic equation f(x)=1-ax².  (See the literature for more info on
  881. bifurcation diagrams.)
  882.  
  883. This pattern of ever-dividing filaments turns out to be a fractal.
  884.  
  885.  
  886.                               *   *   *
  887.  
  888.  
  889. *The Cantor Set is made by starting with a line segment (say the segment
  890. between 0 and 1).  You remove the middle third of the segment (the part from
  891. 1/3 to 2/3).  You then have two line segments.  Remove the middle thirds of
  892. each of these (I won't try to get into the fractions that this entails, but
  893. you can if you want to).  Now you have four line segments.  Remove the middle
  894. thirds of these line segments.  Now continue this pattern an infinite number
  895. of times and what you have left is the Cantor Set.
  896.  
  897. Here is a representation of the first five steps:
  898.  
  899.  0                        1/3                  2/3                         1
  900. 1 ---------------------------------------------------------------------------
  901. 2 ---------------------------                    ----------------------------
  902. 3 ---------         ---------                    ---------          ---------
  903. 4 ---   ---         ---   ---                    ---   ---          ---   ---
  904. 5 - -   - -         - -   - -                    - -   - -          - -   - -
  905.         
  906. The Cantor Set has this amusing property: It has an infinite number of points 
  907. (in fact, an uncountably infinite number of points) within a finite length, 
  908. yet at the same time the set itself has NO LENGTH.
  909.  
  910. You can see in the definition of the Cantor Set the same idea of iteration
  911. that is the basis of Iterate!.
  912.  
  913. The Cantor Set is also a fractal.  You will see some relationship between
  914. it and the earlier fractal I attempted to draw, of a circle surrounded by
  915. four circles, each surrounded by four circles, etc.
  916.  
  917. By the way, the one dimensional logistic map f(x)=1-ax² has a strong
  918. relationship with the Cantor Set.  For certain values of 'a', the set of all
  919. points that don't go to infinity when iterated under f(x) form a Cantor Set.
  920. You can think of it this way: The points that go to infinity form the "holes"
  921. in the Cantor Set.  The points that are left don't go to infinity, and they
  922. form a Cantor Set.  You can find out more about this in the literature.
  923.  
  924. While we're on the subject of wierd relationships, the Horseshoe Map has a
  925. strong relationship with the one-dimensional logistic map f(x)=1-ax² (the same
  926. map we've just been mentioning in regard to the Cantor Set).  If you take a
  927. certain cross-section of the Horseshoe Map it is the same as the logistic map
  928. (both functions with the right parameters, of course, and "the same" 
  929. meaning topologically the same).  We could say the Horseshoe Map "contains"
  930. the logistic map, since a small part of the Horseshoe Map (a cross-section)
  931. mimics the logistic equation.
  932.  
  933. We've already mentioned that the Henon Map "contains" the Horseshoe Map in the
  934. same sort of way.  So we have the logistic map contained in the Horseshoe Map
  935. and the Horseshoe Map contained in the Henon Map . . . interesting.
  936.  
  937. And let us not forget that the logistic map contains a Cantor Set--so the
  938. Horseshoe Map and the Henon Map will produce Cantor Sets as well.  Perhaps
  939. it's no accident that I saw Cantor Sets in those filaments . . .
  940.  
  941. But don't take my word for it.  Try it yourself.
  942.  
  943.  
  944. Function M. x=1-y+abs(x)                  y=x
  945. ──────────────────────────────────────────────────────────────────────────────
  946. This map I stole from FractInt (I just read the FractInt documentation, and
  947. they admitted to lifting it from "The Science of Fractal Images" page 149, so
  948. now I feel better).  They call it the Gingerbread Man.  You will again notice
  949. the amazingly complex graphs coming from a very simple formula.
  950.  
  951. Abs(x), by the way, means the absolute value of x.
  952.  
  953.  
  954. Function U. User Function
  955. ──────────────────────────────────────────────────────────────────────────────
  956. The U in this function stands for "you".  (Is this from the Mousketeers or
  957. something?  Oh, well.)  The most best thing about Iterate! isn't finding out
  958. about the functions that somebody else has discovered, but trying to invent
  959. some interesting functions yourself.
  960.  
  961. Good luck.
  962.  
  963. (Remember to send your interesting functions in.  I will distribute the most
  964. interesting ones with Iterate! in the future.)
  965.  
  966. (ver 3.11, 9/93)
  967.