5748353 [rkeene@sledge /home/rkeene/devel/archive/quickbasic]$ cat -n chaos15.bas
   1: '
   2: 'THE MANDELBROT SET
   3: '
   4: 'Chaos in low resolution
   5: '
   6: '  after you start    pick x from -2 to +2     (left and right)
   7: '     CHAOS15:
   8: '                     pick y from -1 to +1     (up and down)
   9: '                            
  10: '                     pick m from 1 to 1000    (magnification)
  11: '
  12: '            Will beep when picture is done press any key to stop beep
  13: '                press       Ctrl and Break     to abort
  14: '      
  15: '        Try  x=-1.5  y=0  m=3 to start  then make 'm' larger to zoom in.)
  16: '   
  17: '    >>>------------------>   PRESS SHIFT F5 to start  <----------------<<<
  18: '
  19: '      
  20: '
  21: CLS : SCREEN 13: cl = 50: FOR p = 10 TO 1 STEP -1: PALETTE p, 70 - p * 7: PALETTE 16 - p, 70 - p * 7: NEXT p
  22: PRINT "enter x from -2 to 2     =left and right", "enter y from -1 to 1     =up and down", "enter m from 1 to 1000   =magnification"
  23:  INPUT "x"; y: INPUT "y"; x: INPUT "m"; w: w = w - .6: IF w = 0 THEN w = .6
  24: w = 1 / w: x = x - w / 2: x2 = x + w: y = y - w / 2: y2 = y + w
  25: CLS : PRINT , , , , , , , , , , , , , , , , , , , , , , , , "         higher magnifications", "             take longer", , , , , , "          Ctrl Break to abort", , , "       press any key to stop beep"
  26: FOR a = x TO x2 STEP w / 200
  27: r = r + 1: c = 30
  28: FOR b = y TO y2 STEP w / 250
  29: c = c + 1: yr = b: xi = a
  30: FOR z = 53 TO 80 STEP w
  31: cl = cl - 1
  32: zrt = zr: zit = zi
  33: zr = zr * zr + zi * zi * -1 + yr
  34: zi = zit * zrt + zit * zrt + xi: IF zi + zr > 12 OR zi + zr < -12 THEN 100
  35: NEXT z: PSET (c, r), 17: GOTO 200
  36: 100 PSET (c, r), cl
  37: 200  cl = 50: zi = 0: zr = 0:    NEXT b: NEXT a
  38: 300 BEEP:  IF INKEY$ = "" THEN 300
  39: 400 GOTO 400
  40: '             IF you want to a save your picture to disk you must
  41: '         load a screen grabber like NEOGRAB before you run this program
  42:           
  43: 
  44: '                        press SHIFT F5
  45: '                      to run program again
  46:                
  47: '                   <EMAIL COMMENTS TO VILBERT>
  48: 
  49: 
  50: 
  51: 
  52: 
  53: 
  54: 
  55: 
  56: 
  57: 
  58: 
5748354 [rkeene@sledge /home/rkeene/devel/archive/quickbasic]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2000-05-09 21:00:53