home *** CD-ROM | disk | FTP | other *** search
/ Big Blue Disk 24 / bbd24.zip / MAND.TXT < prev    next >
Text File  |  1988-07-21  |  7KB  |  111 lines

  1. |A╔═══════════╗══════════════════════════════════════════════════════╔═══════════╗
  2. |A║ ^0Brainware |A║════════════════ ^1Mandelbrot Microscope |A═══════════════║ ^0Brainware |A║
  3. |A╚═══════════╝══════════════════════════════════════════════════════╚═══════════╝
  4. ^Cby
  5. ^CGary Ellexson
  6.  
  7.    In his August 1985 Scientic American computer recreations column, A. K.
  8. Dewdney introduced the 'Mandelbrot set' to the general public.  The boundary of
  9. this set of points is an example of a 'fractal' -- that is, an object of
  10. fractional dimension.  The set is named for Benoit B. Mandelbrot, who has
  11. developed the field of fractal geometry.  The boundary turns out not to be a
  12. one-dimensional curve on the complex plane, but not a two-dimensional area
  13. either.  Its dimension is somewhere between one and two -- fractional.
  14.  
  15.    The following description gets a bit technical, so non-mathematicians may
  16. want to skip it and just view the pretty pictures this program generates.  If
  17. you care to try and understand this description, note that it deals with complex
  18. numbers; these are numbers consisting of a "real" part (that's a normal positive
  19. or negative number, like -32 or 3.141592654) and an "imaginary" part (a multiple
  20. of i, the square root of -1).  Think of the number line you were taught in
  21. elementary school, stretching from left to right, and imagine a second line
  22. intersecting the first at right angles denoting the imaginary numbers; if you
  23. take one real and one imaginary number, they provide x and y coordinates of a
  24. point on the plane which represents a complex number.  You can use the Advanced
  25. Algebra Toolbox program on this issue to see how complex numbers can be
  26. manipulated by algebraic operations.
  27.  
  28.    To define the Mandelbrot set, suppose C is a complex number and Z starts as
  29. complex zero.  Begin a process that puts Z equal to Z * Z + C.  Continue to
  30. substitute each new Z into the formula to get a progression of Z's.  The
  31. Mandelbrot set is the set of points C such that the magnitude of Z stays finite
  32. even after an infinite number of iterations of the process of squaring and
  33. adding shown above.  It turns out that if the size of Z is 2 or greater, then Z
  34. will go to infinity.  This makes it possible to plot an approximation of the
  35. Mandelbrot set without having to execute an infinite number of iterations of
  36. the process.  The interesting part is not plotting the set itself, but rather
  37. attempting to plot its fractal boundary.  Some points near the boundary flee to
  38. infinity much quicker than other points.  If points are colored differently
  39. depending on the speed that they go to infinity, intricate patterns result.
  40.  
  41.    The program uses a 200 by 200 pixel area of the color graphic screen to
  42. display points near the boundary of the Mandelbrot set in different colors
  43. depending on their 'escape velocity'.  The program does at most 128 iterations
  44. of the process for each pixel.  If the result exceeds 2 at some point before the
  45. maximum number of iterations, the number of iterations determines the color of
  46. the point.  If the result of the process is less than 2 after 128 iterations of
  47. the process, then the point is considered to be a Mandelbrot point and is
  48. colored black.
  49.  
  50.    When you run the program you will see the entire Mandelbrot set in black
  51. surrounded by a colored halo.  There is a menu that allows you to show
  52. previously stored displays, to magnify a part of the current display making a
  53. new display, to store the current display as a disk file, to change the color
  54. contours, or to leave the program.  If you choose to make a new display, you will
  55. see a black square appear in the upper left corner of the display window.  You
  56. can use the cursor keys to move the square within the display. The '+' and '-'
  57. keys will make the square larger or smaller.  To make a new image, move the
  58. square to a place in the display that you would like to magnify.  You should
  59. adjust the boundaries of the square so that only a small part of the Mandelbrot
  60. set is included, since more Mandelbrot points make it take longer to generate
  61. the image.  When you hit the 'Enter' key the program will begin to make a new
  62. display.  If you enter the magnification step by accident or do not want to wait
  63. until an entire image is generated, then you can cancel out of the process by
  64. striking the escape key.  This will return you to the main screen and its
  65. options with the last complete image displayed.
  66.  
  67.    Plotting can take up to three hours, depending on how close the area is to
  68. the Mandelbrot set.  Most cases won't be nearly so bad; however, you should
  69. consider getting a snack or something, or leaving the program running all night
  70. unattended.  286 and 386 machines will get much better speed, of course.  Turbo
  71. speed should be used if it is available.  The program does use an application
  72. specific plotting routine that is faster than Pascal's plot procedure, but to do
  73. a screen requires several million basic arithmetic operations.  This makes the
  74. program intrinsically slow.
  75.  
  76.    After the new display is completed, you are returned to the main screen and
  77. its options of saving the new display, loading a display, changing the contour
  78. or leaving the program.  If you choose to save the image as a file, you should
  79. enter the file name and optionally, the path of the new file at the prompt. The
  80. file will require 40018 bytes so make sure you have room on the destination
  81. disk.  (There isn't any room on BIG BLUE DISK to save image files; use your own
  82. disk.)  The program will warn you if there is insufficient room to store the
  83. image.  It will without warning write over any file named the same as the file
  84. you entered.  The file contains a list of the number of iterations required for
  85. each of the 40,000 pixels.  These numbers are stored as bytes representing
  86. pixels in rows of 200 starting at the top.  The file also contains the real
  87. numbers representing the complex coordinates of the upper left corner of the
  88. display and the length of the side of the square covered by the display.
  89.  
  90.    The option to change the contour of the image allows you to view the image
  91. with contour lines at greater or lesser intervals.  In this option you are
  92. presented with a choice of five display looks.  Choose the display look by
  93. typing the number to its left.  The image will change when you hit the key. You
  94. return to the main menu from this option by means of the escape key.
  95.  
  96.    After execution of any other option, you are automatically returned to the
  97. main display and its menu.  In the loading and saving options hitting the enter
  98. key at the prompt will return you to the main menu if you decide not to load or
  99. save a file.
  100.  
  101.    If you find the subject of fractals interesting, or just like interesting
  102. graphic images of this sort, you might wish to check out the 3D Fractal
  103. Landscapes program on issue #13 of BIG BLUE DISK.  That issue is available from
  104. us for $9.95.
  105.  
  106.    To run this program outside the BIG BLUE DISK menu, type ^1MAND^0.
  107.  
  108. DISK FILES THIS PROGRAM USES:
  109. ^FMAND.COM
  110. ^FPICTURE0.DOT
  111.