home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 559b.lha / Ly_Gen / ly-gen.doc < prev    next >
Text File  |  1991-09-28  |  4KB  |  191 lines

  1.                   Ly-Gen.doc
  2.  
  3.  
  4.  
  5.     As you may have heard or saw, Scientific American Sept. 1991
  6.  
  7. had a particularly interesting article on the Lyapunov log
  8.  
  9. fractal and the computer graphics it produces. Being a computer
  10.  
  11. graphics buff, an Amiga owner and a fledgling C-language programer
  12.  
  13. I seized upon this opportunity to see what kind of Lyapunov
  14.  
  15. Graphics the Amiga could produce.
  16.  
  17.    Many thanks to Jamie Mueller for the algorithm he posted to Genie, file
  18.  
  19. number 12088.
  20.  
  21.  
  22.                 The Colors
  23.  
  24.  
  25.  
  26.     The pictures in the article seemed to be done in about 100
  27.  
  28. shades of yellow to black. Since the Amiga can only do 16 shades
  29.  
  30. of a color I tried 16 shades of yellow but not with great
  31.  
  32. results. I then tried 32 colors with yellow to violet and violet
  33.  
  34. to blue. Better, but still not great eye candy. I next tried 30
  35.  
  36. colors and left colors 0 and 1 black and white for the D-Paint
  37.  
  38. tool bar. I then put one of my pictures into D-Paint II and
  39.  
  40. adjusted the palette to a wide range of bright colors. If you
  41.  
  42. don't like the colors Ly-Gen produces put the picture into
  43.  
  44. D-Paint and change the colors more to your liking.
  45.  
  46.  
  47.  
  48.                  The Pattern
  49.  
  50.  
  51.  
  52.     Ly-Gen produces a fractal based on two attractors (a,b) and
  53.  
  54. alternates between them based on the pattern provided by the
  55.  
  56. user.  ie. aabba or baaabaabb or whatever up to 16 characters.
  57.  
  58.  
  59.  
  60.                   Iterations
  61.  
  62.  
  63.  
  64.     The number of iterations is the number of times the log is
  65.  
  66. computed per pixel. The people at Scientific American use 4000
  67.  
  68. but they clearly have a much faster processor than a 68000. To do
  69.  
  70. 4000 iterations on an Amiga would take about 18 days. But this is
  71.  
  72. hardly necessary as I have gotten interesting images in as few as
  73.  
  74. 10 iterations and very interesting pictures at 200 iterations in
  75.  
  76. about 21 hours.
  77.  
  78.  
  79.  
  80.                   Why Screenx?
  81.  
  82.  
  83.  
  84.     Screenx has always been a handy P.D. program for saving
  85.  
  86. screens and it saved me the trauma of trying to write a good IFF
  87.  
  88. picture saver for my program.
  89.  
  90.     To use screenx (doc file included) to save a lyapunov picture
  91.  
  92. after it's finished or while it's generating for that matter; Put
  93.  
  94. the screen in the background with left-amiga-n or pull down the
  95.  
  96. screen with the pointer. Click on the icon for Screenx. After it
  97.  
  98. starts click left button in Screenx window then click right
  99.  
  100. button. The Screenx screen will appear. Change the filename
  101.  
  102. string to something like DF1:Ly-Pic, Click on Lyapunov's Screen
  103.  
  104. name and click Save IFF. Click the right button
  105.  
  106. to exit Screenx. Restore the picture with left-amiga-m or pull up
  107.  
  108. the picture. Click upper left corner to end the program and free
  109.  
  110. up memory.
  111.  
  112.  
  113.  
  114.        The Frame number and the Grid.
  115.  
  116.  
  117.  
  118.     After generating a few Lyapunov pictures I felt that certain
  119.  
  120. sections could use further study in the tradition of Mandelbrot,
  121.  
  122. I wanted to blow up part of the set. To do this I divided the set
  123.  
  124. into 25 sections or a 5 X 5 Grid. To generate a blow up of one of
  125.  
  126. these sections of one of your Lyapunov pictures compare your
  127.  
  128. picture to the grid to find an interesting sector or better yet:
  129.  
  130. Load the grid into D-Paint, switch to spare screen, load Lyapunov
  131.  
  132. picture, select menu spare screen merge to front. Now you have a
  133.  
  134. clear view of how the set is divided and can easily pick a frame
  135.  
  136. of interest.
  137.  
  138.     To generate one frame of a Lyapunov:
  139.  
  140. Enter Ly-Gen Pattern #iterations Frame#
  141.  
  142. ie. Ly-Gen aaabbb 200 11
  143.  
  144.     The Pattern and number of iterations must match the full set
  145.  
  146. Pattern and iterations to get a true zoom in on the frame of
  147.  
  148. interest.
  149.  
  150. Ly-Gen abbaaaabbaabbaab 200 11 will generate frame 11 of the example
  151.  
  152. picture included.
  153.  
  154.  
  155.                      Multitasking
  156.  
  157.  
  158.  
  159.     Through no effort on my part and thanks to my Lattice 5.02
  160.  
  161. compiler Ly-Gen multitasks quite well so you can do other things
  162.  
  163. while it's running. I have a friend who found he can even play
  164.  
  165. some P.D. Games  (the best kind) while Ly-Gen is running in the
  166.  
  167. background.
  168.  
  169.  
  170.  
  171.                     Aborting Ly-Gen
  172.  
  173.  
  174.  
  175.     To abort Ly-Gen Click upper left corner and Ly-Gen will shut
  176.  
  177. down at end of current line.
  178.  
  179.  
  180.  
  181.     Enjoy!
  182.  
  183.  
  184.  
  185.     Roy Emmons
  186.  
  187.     701 A st. #5
  188.  
  189.     Lincoln, NE 68502
  190.  
  191.