home *** CD-ROM | disk | FTP | other *** search
/ Graphics 16,000 / graphics-16000.iso / amiga / fractal / fcloud.arc / cloud.doc < prev    next >
Text File  |  1989-11-05  |  4KB  |  84 lines

  1. ***************************************************************
  2. ***************************************************************
  3.  
  4.                  Welcome to FractalCloud!
  5.  
  6. ***************************************************************
  7. ***************************************************************
  8.  
  9.     I have always been interested in fractals, especially 
  10. fractal mountains. I had been searching the world over for 
  11. easily coded routines to generating them, but I usually
  12. ran up into a big brick wall, that is, until I found the 
  13. wonderful book "The Science of Fractal Images" by Heinz-Otto
  14. Peitgen and Dietmar Saupe (Springer-Verlag, New York, 1988).
  15. They give actual pseudo-code, which makes my job a lot easier.
  16.  
  17.     What is my job? Well, as a neophyte Amiga programmer, I 
  18. at first just wanted to get a program done. But then a higher 
  19. calling said "Help Others!" so I decided to post my program, 
  20. plus something people to learn, my code. The theory behind the
  21. code is not too complex.
  22.  
  23.     Essentially a grid of 2^N x 2^N (I use N=7) is at zero. The 
  24. grid is divided into quarters and the vertices are raised or 
  25. lowered a fractal (based upon the Gaussian distribution) amount.
  26. These quarters are then split up into quarters (sixteenths of
  27. the original) and the vertices are adjusted again. This process
  28. is then repeated N times, until each vertex has been changed.
  29.  
  30.     Then, the relative "height" (for lack of a better term) is
  31. used to determine a color (with all below a certain amount pure
  32. blue) that is then displayed. Simple. Of course, there is the
  33. Amiga Intuition Routines around all this, which was actually
  34. the hard part. 
  35.  
  36.     This archive is made up of:
  37.         cloud             :   The executable
  38.         cloud.c            :   The source code
  39.         cloud.doc        :   This file
  40.         Gauss_sup.c        :   The Gaussian support routines
  41.         S_sup.c            :   The screen support routines
  42.         W_sup.c            :   The window support routines
  43.         I_sup.c            :   The Intuition support routines
  44.  
  45.     The last three are straight from "The Waite Group's Inside
  46. the Amiga with C," by John Thomas Berry (Howard W. Sams & Company,
  47. Indianapolis, 1988)
  48.  
  49.     To use cloud, there is one optional argument, H, which is 
  50. 3-D, where D is defined as the Fractal Dimension. H must be 
  51. greater than 0 and less than 1, that is 0 < H < 1. If no 
  52. argument or an invalid argument is given, H defaults to 0.5.
  53. A good value is 0.3 < H < 0.5.
  54.  
  55.     This code compilies under Lattice C 5.02, but I see no
  56. reason why it shouldn't under Manx. No special options are
  57. needed, just compile and link cloud.c and all the _sup.c
  58. routines and run. Easy!
  59.  
  60.     Of course, I am not responsible for any havoc this program
  61. may cause. It is freeware, just put it anywhere you feel
  62. like. I want everybody to learn.
  63.  
  64.     In the future: This routine is slow... and not to flexible.
  65. I want to convert it to a routine using and inverse FFT, but
  66. I don't have the code for one. That will allow leaving the
  67. 2^N by 2^N size restriction on the array behind so I can use
  68. the whole screen. Also, there is no stopping me from using
  69. these "heights" as 3-d data to model fractal mountains. I know
  70. the algorithms for ray tracing, so maybe that too is in the
  71. future. Of course, no promises are made, but I'll try.
  72.  
  73.     So, try them you'll like them. I also have sundry other
  74. routines that generate fractal motion in 1-dimension, if anyone
  75. wants them, ask. If you want to get in contact with me, try GEnie, 
  76. @ P.MACCGOVERN. Also, you can send me a Inverse FFT routine. 
  77. Also US Mail:
  78.         Phil MacGovern
  79.         3433 1st ave.
  80.         San Diego, CA, 
  81.         92103.
  82.  
  83. Have fun.
  84.