home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff303.lzh / CPM / CPM.Docs < prev    next >
Text File  |  1990-01-08  |  6KB  |  127 lines

  1.                 CPM
  2.                 
  3.               Continous Potential Method
  4.               
  5.              made 1989 by Lars R. Clausen
  6.     
  7.     
  8.   About CPM:
  9.   
  10.   
  11.   CPM is  short  for  Continous  Potential  Method,  an  algorithm  for  the
  12. MandelBrot  set,  which  I  have  found  in the book 'The Science of Fractal
  13. Images", by H.O.Pietgen and D. Saupe. The theory of it will be shown  below.
  14. It  is used here to make 3-dimensional pictures of the MandelBrot set, of as
  15. much beauty as the resolution and the CPU time used will allow.   As  rather
  16. much  time  will  be  used  for  the  drawing,  I have implemented it with a
  17. DataFile, so that several  pictures  can  be  generated  one  after  another
  18. without human interference.
  19.  
  20.  
  21.   Using CPM:
  22.   
  23.   
  24.   CPM  can  only  be started from the CLI, and can take its data from either
  25. the command line arguments, or a file, which is by default  CPMDataFile.  In
  26. either case will the data used be these:
  27.  
  28.   XMin XMax YMin YMax MaxIt Angle Scale Lift Size SaveFileName
  29.   
  30.   Workbench  icons  have  been  supplied for both versions, using IconX. It
  31. doesn't do any copying or checking, it just executes it.
  32.  
  33.   If  these  are  to  be  used  in  the  datafile, each must be seperated by
  34. semicolons ';', all data for one picture must be on the same  line,  and  no
  35. space may be placed around the Size parameter or around the SaveFileName.
  36.  
  37.   The meaning of the arguments are as follows:
  38.   
  39.   XMin XMax YMin YMax: These are the coordinates of the picture, as they may
  40. be  found  in MandelVroom or a similar program. To ensure that no distortion
  41. is done, YMax will be adjusted so that the aspect ratio of  the  picture  is
  42. 1:1. Therefore, is does not help help anything to change the YMax parameter,
  43. it is only there for completeness.
  44.  
  45.   MaxIt is the maximal number of iterations that will be done before a point
  46. is  said  to  belong  to  the MandelBrot set. The higher this number is, the
  47. longer the picture  will  take  to  generate,  but  the  top  will  be  most
  48. beautiful, if a rather high MaxIt is used.
  49.  
  50.   Angle  denotes  how  much the picture will be tipped. Normally, this is 2,
  51. which means that for every 2 lines of the picture one line is drawn  on  the
  52. screen.  This  is  an  integer,  and  should not be lower than 2, but higher
  53. Angles will give a more flat view of the area, thus allowing more to be seen
  54. vertically. A special option is made here to beautify the  picture:  if  the
  55. angle  is  set  to a negative value, the numerical value will be used as the
  56. angle, but every line in the picture will be drawn on the screen. This takes
  57. a great deal more times, but steep descents will be more beautiful for it.
  58.  
  59.   Scale and Lift are two floats, used to make the sides of the set look more
  60. interesting than they actually  are.  Their  mathematics  will  be  detailed
  61. below,   but  picture-wise  Scale will give the steepness of the side, while
  62. Lift will lift up the whole area. These are not precise descriptions, but to
  63. see the effect, try them out on a simple picture in LoRes.
  64.  
  65.   Size may be either L or H, meaning LoRes-NonInterLace or  HiRes-InterLace.
  66. In both cases 16 colors will be used.
  67.  
  68.   The SaveFileName is the name the finished picture shall be saved as.
  69.   
  70.   As you will see, there are two versions of DEM:  DEMTurbo  and  DEMNormal.
  71. DEMNormal uses the MathIEEEDoubTrans.library. DEMTurbo are for  those  users
  72. that  are  lucky  enough  to  have an A2620 or stuff like that.  It uses the
  73. 68881 instead, and trying to use this on a normal Amiga will  cause  a  GURU
  74. 0000000B (line 1111 emulator).
  75.  
  76.   When  running,  you  may  close  the  program  down  by  clicking  on  the
  77. closegadget.   Pressing  any key causes the current picture to be abandoned,
  78. and not saved, and then goes on to make the next picture in the definefile.
  79.  
  80.   How CPM works:
  81.   
  82.   
  83.   CPM calculates the complex formula Zn+1=Zn*Zn+C until |Zn| is greater than
  84. 10000, where C is the complex coordinate of the point. When that is done, it
  85. calculates  the  potential  of  the  point  as  if  the  MandelBrot  set was
  86. electrically 0 and a circle of positive potential was positioned around  the
  87. set at infinity by:
  88.  
  89.   Pot = 0.5 * log(X*X+Y*Y) / pow(2.0 , Number_Of_Iterations_Used)
  90.   
  91.   This  gives  a  number  going  towards  0  near  the set, which isn't very
  92. interesting to look at. Therefore a rescaling  function  is  used,  in  this
  93. case:
  94.  
  95.   Height = MaxHeight * (1-pow(pow(2.0 , Scale) * Pot , Lift))
  96.   
  97.   Here  is  shown what exactly Scale and Lift does, though is may be hard to
  98. say what they will do for the picture. The result is a height rising towards
  99. the MandelBrot set, going towards MaxHeight, which  is  the  height  of  the
  100. screen  in pixels. As a direct display of this would let the top go straight
  101. through the top of the screen, it is cut off midways, and  all  height  over
  102. that are used to determine the color instead.
  103.  
  104.  
  105.   Disclaimer, future ideas and all that stuff:
  106.  
  107.  
  108.   I can, as usual, not take any responsibility for what this program does to
  109. your data, computer, sleep or anything else. Is is given to you 'as is'.
  110.  
  111.   If  anybody  find  bugs,  make any improvements, want something more (like
  112. Intuition interface or a smoothed cutting), or just like my program,  please
  113. send any letters, other programs, $$$, etc. to:
  114.  
  115.                 Lars R. Clausen
  116.                 Hougårdsvej 29
  117.                 8220 Brabrand
  118.                 Denmark
  119.                 
  120.                 FidoNet nr: 2:230/22.34
  121.  
  122. P.S.  If  my  English  sounds a little wierd, do forgive me, as I be reading
  123. 'The Lord Of The Rings' rather intensively these days.
  124.  
  125. P.P.S. Keep up the good work, everybody. This computer is too good not to be
  126. the best!
  127.