home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 437a.lha / Mandel_v1.0 / source / mbrot.i < prev    next >
Encoding:
Text File  |  1990-11-09  |  1.6 KB  |  60 lines

  1.  
  2.      IFND EXEC_TYPES_I
  3.      INCLUDE "exec/types.i"
  4.      ENDC
  5.  
  6. * signed 32-bit fixed point, scaled by 2^29 (range -4 .. 4)
  7. FIXED MACRO
  8.       LONG  \1
  9.       ENDM
  10.  
  11.    STRUCTURE   mbrot,0
  12.  
  13. * Rastport image will be drawn to
  14.       APTR  mb_RastPort
  15.  
  16. * These define z = x0 + y0 i that will be mapped to upper lefthand
  17. * corner of Rastport (that is (0,0) NOT (x1,y1))
  18.       FIXED mb_x0
  19.       FIXED mb_y0
  20.  
  21. * Deltas in both directions, i.e. how much to increment z for each pixel
  22.       FIXED mb_dx
  23.       FIXED mb_dy
  24.  
  25. * If this is actually a Julia set, this is the c = jx + jy i
  26.       FIXED mb_jx
  27.       FIXED mb_jy
  28.  
  29. * (x1,y1)-(x2,y2) rectangle within rastport to fill with mandelbrot
  30.       UWORD mb_x1
  31.       UWORD mb_y1
  32.       UWORD mb_x2
  33.       UWORD mb_y2
  34.  
  35. * Pointer to a call-back procedure (or NULL) that should return
  36. * with Z clear (result nonzero) if some kind of break condition is met
  37.       APTR  mb_break
  38.  
  39.       UWORD mb_i           ; max. number of iterations, 0<= i <=65533
  40.       UWORD mb_colors      ; number of colors used in colouring OUTSIDE
  41.       UBYTE mb_flags       ; see below
  42.       BYTE  mb_pad
  43.    LABEL mb_SIZEOF
  44.  
  45. * Flags for mb_flags
  46.       BITDEF   MB,HIGH,0   ; 32 bit precision enabled
  47.       BITDEF   MB,CRAWL,1  ; crawling enabled
  48.       BITDEF   MB,JULIA,2  ; this is actually a Julia set
  49.       BITDEF   MB,AUTOPREC,3 ; automatic precision (16/32 bits, ignore HIGH)
  50.       BITDEF   MB,AUTOCRAWL,4 ; automatic crawling when adequate, ign. CRAWL
  51.  
  52. * Limit for AUTOPREC
  53. DELTALIMIT  EQU   $40000
  54.  
  55. * PIXEL color defines
  56. CLEAR    EQU   0  ; the color (x1,y1)-(x2,y2) is cleared to
  57. INTERIOR EQU   1  ; inside the set
  58. FIRST    EQU   2  ; outside the set
  59.  
  60.