home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / f / fractal112 / !Fractal / Help / Popcorn < prev    next >
Text File  |  1996-10-09  |  2KB  |  65 lines

  1. Popcorn
  2. -------
  3. An algorithm developed by Clifford Pickover featured in Scientific American
  4. July 1989, then in Fractint (where the name Popcorn was given), and
  5. contributed here by Joyce Haslam. There are 9 different equations used with
  6. an option to plot the pattern in a wave like form or a pixel by pixel form
  7. (Julia).
  8.  
  9. The equation is selected from the Popcorn->Types menu. Click on
  10. Popcorn->Julia to activate the pixel mode plot. The Julia is slow due to the
  11. repeated use of SIN and TAN, so use small values for limit and threshold to
  12. speed things up.
  13.  
  14. Popcorn in non-Julia mode plots points, the colours of which are set from
  15. the main Plot Options dialogue box in the Effects menu. For best resuls
  16. choose Random but other interesting effects can be used. In Julia mode the
  17. colour is set from the number of iterations.
  18.  
  19. The data items after the standard x/y width/height are:
  20.  
  21. Limit: for Julia the iteration limit, otherwise the iteration limit sets the
  22. length of each arm plotted.
  23.  
  24. Step Rate: controls the effect each iteration has on previous values. Higher
  25. values produce more exaggerated plots.
  26.  
  27. Detail: for the non-Julia plots - 0 gives maximum detail, higher values
  28. give rougher images which allows quicker examination.
  29.  
  30. Threshold: for Julia, the escape value. Higher values take longer to
  31. calculate but produce more detail.
  32.  
  33. n: The multiplier in the SIN and TAN equations. Try different values to see
  34. the effect.
  35.  
  36. A 3d version of the Julia image can be drawn directly by turning on the
  37. 3d X/Y Plot option. See the 3d section of !MainHelp for details.
  38.  
  39. Algorithms
  40. ----------
  41. The nine equations are as shown in the Popcorn->Types menu. They are
  42. implemented in code as shown in the 2 examples below:
  43.  
  44. Julia: for each pixel set the x and y value then :
  45.   repeat
  46.     sqsum=x*x+y*y
  47.     if sqsum < threshold
  48.        xx=x-dt*sin(y+tan(n*y))           where dt=step rate
  49.        y=y-dt*sin(x+tan(n*x))
  50.        x=xx
  51.        iter=iter+1
  52.   until sqsum>=threshold or iter=limit
  53.   colour=iter
  54.  
  55. non-Julia: for each nth x/y pixel where the value of n is increased with the
  56. value of "detail".
  57.  
  58.   repeat
  59.      xx=x-dt*sin(y+tan(n*y))             where dt=step rate
  60.      y=y-dt*sin(x+tan(n*x))
  61.      x=xx
  62.      iter=iter+1
  63.      plot x*scalar,y*scalar
  64.   until iter=limit
  65.