home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 376.lha / HPFrac_v1.0 / HPFrac.DOC < prev    next >
Text File  |  1990-04-01  |  9KB  |  176 lines

  1.                              Documentation for
  2.                                HPFrac  v 1.0
  3.                                      by
  4.                                Alex Takessian
  5.  
  6.  
  7.    Yet another fractal program!  Yes, but this time it plots the 
  8. Mandelbrot set at up to 300 dpi on a LaserJet or DeskJet printer.  Thats 
  9. 3000 x 2400 dots!  It can also do it at 75, 100, and 150 dpi.
  10.  
  11.  
  12.     This program is freely distributable as long as you don't make ANY cash 
  13. profit from it (you can trade it though.)
  14.  
  15.                 Send any constructive comments by EMAIL to:
  16.                  Alex Takessian     Compuserve [75655,223]
  17.  
  18.  
  19.      I tired of printing the typical 640 x 400 plots on my Deskjet.  I 
  20. wanted full resolution plots so I wrote this program.  I hope you find it 
  21. fun too.  It easily produces publication-quality Mandelbrot images 
  22. especially if the distance-estimation plotting method is used.
  23.  
  24.      The program works only from the CLI because I wanted to write portable 
  25. code that could be compiled and run on other computer types.  I easily 
  26. ported it to PC-DOS and compiled it with Microsoft C v 5.0.  Interestingly, 
  27. the DOS version running on a COMPAQ 386 Deskpro (16MHz 80386, 80287) runs 
  28. about 7 times slower than the AMIGA version running on an A2000/A2630.  
  29.  
  30.      Note that HPFrac only works with a LaserJet or DeskJet -- no other 
  31. printers are supported.  Sorry.  The program will either generate a file 
  32. which can be copied to the PAR: device or it can directly write to the PAR: 
  33. device.  If you generate to a file, be aware that your file device (RAM, 
  34. FLOPPY, HARD, etc.) must be capable of storing about 10 * dpi * dpi bytes.  
  35. That is over 900K for a 300 dpi plot.  To write directly to the PAR: device 
  36. you just specify PAR: when the program asks for a filename.  When you write 
  37. directly to the PAR: device, the storage requirements are very low, but it 
  38. ties up your printer for a long time.  I prefer to write to a file because 
  39. the file can be archived and saved for re-printing at a later time.  
  40. Anything less than a 300 dpi plot can easily be written to a floppy file.  
  41. So, if you've got enough RAM, then its best to generate to a RAM file.  
  42. Otherwise, generate to a HARD disk file or Floppy file or directly to the 
  43. PAR: device (in that order.)
  44.  
  45.      This program (actually HPFrac_6888x) is really meant for the power 
  46. users because it eats up CPU cycles like crazy.  If you've got an 
  47. accelerator board (Imtronics, Hurricane, GVP, CSA, A2620, A2630, etc.) this 
  48. program is for you.  It'll really give your accelerator something to sink 
  49. its teeth into.  It's written in optimized Lattice C V5.04.  It could be 
  50. made faster through assembly programming and fixed-point math, but I felt 
  51. that would limit its scope and portability too much.  Since the math is 
  52. carried out in floating-point, any portion of the Mandelbrot set can be 
  53. plotted without the quantization errors common in the fixed-point programs.  
  54. The quantization problem would be extremely severe in the distance-
  55. estimation mode where the dynamic range of the numbers is very large.
  56.  
  57.      The 6888x and the IEEE versions use double-precision math while the 
  58. FFP version uses single-precision math.  The IEEE and FFP versions were 
  59. included because I didn't want to leave anyone out.  So even if you don't 
  60. have any kind of accelerator, you can still produce exceptional fractal 
  61. plots -- you just have to wait longer.  Waiting is not too bad if you run 
  62. HPFrac as a background task with a priority of -1 and just leave your 
  63. machine on all the time.  You should use the version which is fastest on 
  64. your hardware configuration.  The IEEE version is great for those of you 
  65. who have a 68881/2 installed as a peripheral processor (such as in the 
  66. Processor Accelerator board.)  The 6888x version only works if you have a 
  67. 68010, 68020, or 68030 processor with a 68881/2 as a coprocessor.  The FFP 
  68. version is good if you have no accelerator or if your do have one but it 
  69. doesn't have math coprocessor or peripheral math processor installed yet.
  70.  
  71.      In addition to the standard worn-out iteration limit and iteration 
  72. modulus plotting, this program offers magnitude modulus, binary phase, 
  73. quaternary phase, phase modulus, and distance estimation.  Orbit cycle 
  74. detection is used throughout to speed-up the calculations when inside the 
  75. Mandelbrot set.
  76.  
  77.      The program is accompanied by a file called HPFrac.DAT.  This .DAT 
  78. file contains several interesting locations of the Mandelbrot set and is 
  79. the main input to the program.  When you run HPFrac, you are asked which of 
  80. the locations in the .DAT file you want to plot.  The locations have names.  
  81. To see them, just TYPE the file out (ie TYPE HPFrac.DAT.)  The .DAT file is 
  82. easily edited with the ED editor, so you can add your own favorite 
  83. locations or modify the current ones.  Actually, I first find an 
  84. interesting place with one of the many excellent graphical Mandelbrot 
  85. graphers (I prefer MandFXP by CygnusSoft), then I enter those coordinates 
  86. into the HPFrac.DAT file and run HPFrac to generate the plot.  The format 
  87. of the .DAT file is:
  88.  
  89. Imaginary range, Real range, Iteration limit, NAME
  90.  
  91. The Imaginary range is the narrow width of the plot on the paper.  This 
  92. corresponds to the vertical direction on the screen for the graphical 
  93. Mandelbrot programs.  The Real range is the long direction of the paper 
  94. plot and corresponds to the horizontal direction on the screen.  The 
  95. iteration limit is the same as on the graphical programs.  It specifies the 
  96. maximum number of iterations spent on each point to determine if it lies in 
  97. the Mandelbrot set.  The name is there as a descriptive label.  You can 
  98. make up your own names.  Descriptions of the various plotting modes follow.
  99.  
  100. Iteration Limit
  101. This mode plots a dot only when the iteration limit limit is reached for 
  102. that value of C represented by the dot.
  103.  
  104. Iteration Modulus
  105. This plots a point if (iterations / divisor) mod 2 is equal to 1.  Where 
  106. iterations is the number of times the Mandelbrot equation can be iterated 
  107. before the iteration limit is reached or before the iteration becomes 
  108. unstable.  This creates a contour map of iteration values.  The divisor 
  109. determines the width of each contour band.  This is the mode most graphical 
  110. Mandelbrot programs work in.  They plot the contour bands in different 
  111. colors and the colors repeat over and over.
  112.  
  113. Magnitude Modulus
  114. The Mandelbrot set is those points in C which satisfy Z(n+1) = Z(n)^2 + C 
  115. for the number of iterations specified by the iteration limit.  This 
  116. selection plots a point if (100 * |Z| / divisor) mod 2 is equal to 1.  The 
  117. symbol, |Z| is the complex magnitude of Z at the maximum number of stable 
  118. iterations.  This looks best for macro features of the set such as in the 
  119. "WholeSet" selection in HPFrac.DAT.  It makes a contour plot of the 
  120. magnitude of Z with the contour band width given by the divisor.
  121.  
  122. Binary Phase
  123. This plots a point if phase(Z) at the maximum number of stable iterations 
  124. is either in quadrants I & II or in quadrants II & III.  The choice is made 
  125. at the beginning of the program.  This makes interesting plots of the 
  126. phase.
  127.  
  128. Quaternary Phase
  129. This plots a point if phase(Z) at the maximum number of stable iterations 
  130. is either in quadrants I & III or in quadrants II & IV.  The choice is made 
  131. at the start of the program.  This is typically called the Binary Phase 
  132. Decomposition of the Mandelbrot set and makes very interesting plots.
  133.  
  134. Phase Modulus
  135. This plots a point if (100 * phase(z) / divisor) mod 2 is equal to 1.  This 
  136. gives a plot of the phase just like the Magnitude Modulus give the plot of 
  137. the magnitude at the maximum number of stable iterations.  This is good for 
  138. macro features.
  139.  
  140. Distance Estimation
  141. This is similar to the Iteration Limit mode except that a threshold value 
  142. is specified which allows the plot to reveal much more intricate detail.  
  143. This method generates the best plots I've ever seen.  This method is also 
  144. the slowest because it does a lot more calculation to determine if a given 
  145. point is close enough to the Mandelbrot set to be considered a part of it.  
  146. A small threshold will find fewer points.  A threshold of zero is exactly 
  147. like the Iteration Limit mode.  A large threshold finds more points.  I 
  148. find a value of 0.000001 works well most of the time for plots with 
  149. iteration limits > 500.  For Iteration Limits < 500, the suggested 0.00001 
  150. works well.  Also, for this mode, increasing the iteration limit improves 
  151. the resolution of the plot.  This is unlike the plain Iteration Limit mode 
  152. where increasing the limit will eliminate peripheral Mandelbrot points.  It 
  153. is those peripheral points which reveal the infinite beauty of this set.
  154.  
  155.      The program will also ask if you want aspect restoration.  It is a 
  156. good idea to answer yes unless you want distorted aspect for a special 
  157. effect.  Aspect restoration guarantees that there will be no aspect 
  158. distortion in the generated plot even if the ranges specified in HPFrac.DAT 
  159. have distorted aspect.  Note that the ranges I've specified in HPFrac.DAT 
  160. do have some distortion in them.
  161.  
  162.      To get acquainted with the program, run it on "WholeSet."  This will 
  163. plot the entire Mandelbrot set.  Try the different plotting modes at 75 dpi 
  164. to get a rough idea of what they do.  You should get plots rather quickly 
  165. at 75 dpi.
  166.  
  167.  
  168. Enjoy!
  169. Alex Takessian
  170. CIS [75655,223]
  171.  
  172.  
  173.  
  174.  
  175.  
  176.