home *** CD-ROM | disk | FTP | other *** search
- Popcorn
- -------
- An algorithm developed by Clifford Pickover featured in Scientific American
- July 1989, then in Fractint (where the name Popcorn was given), and
- contributed here by Joyce Haslam. There are 9 different equations used with
- an option to plot the pattern in a wave like form or a pixel by pixel form
- (Julia).
-
- The equation is selected from the Popcorn->Types menu. Click on
- Popcorn->Julia to activate the pixel mode plot. The Julia is slow due to the
- repeated use of SIN and TAN, so use small values for limit and threshold to
- speed things up.
-
- Popcorn in non-Julia mode plots points, the colours of which are set from
- the main Plot Options dialogue box in the Effects menu. For best resuls
- choose Random but other interesting effects can be used. In Julia mode the
- colour is set from the number of iterations.
-
- The data items after the standard x/y width/height are:
-
- Limit: for Julia the iteration limit, otherwise the iteration limit sets the
- length of each arm plotted.
-
- Step Rate: controls the effect each iteration has on previous values. Higher
- values produce more exaggerated plots.
-
- Detail: for the non-Julia plots - 0 gives maximum detail, higher values
- give rougher images which allows quicker examination.
-
- Threshold: for Julia, the escape value. Higher values take longer to
- calculate but produce more detail.
-
- n: The multiplier in the SIN and TAN equations. Try different values to see
- the effect.
-
- A 3d version of the Julia image can be drawn directly by turning on the
- 3d X/Y Plot option. See the 3d section of !MainHelp for details.
-
- Algorithms
- ----------
- The nine equations are as shown in the Popcorn->Types menu. They are
- implemented in code as shown in the 2 examples below:
-
- Julia: for each pixel set the x and y value then :
- repeat
- sqsum=x*x+y*y
- if sqsum < threshold
- xx=x-dt*sin(y+tan(n*y)) where dt=step rate
- y=y-dt*sin(x+tan(n*x))
- x=xx
- iter=iter+1
- until sqsum>=threshold or iter=limit
- colour=iter
-
- non-Julia: for each nth x/y pixel where the value of n is increased with the
- value of "detail".
-
- repeat
- xx=x-dt*sin(y+tan(n*y)) where dt=step rate
- y=y-dt*sin(x+tan(n*x))
- x=xx
- iter=iter+1
- plot x*scalar,y*scalar
- until iter=limit
-