home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / share / dos / varios / fractint / fractint.frm < prev    next >
Encoding:
Text File  |  1996-08-25  |  46.0 KB  |  1,827 lines

  1. comment {
  2.  This iteration of FRACTINT.FRM was first released with Fractint 19.0
  3.  
  4.  The formulas at the beginning of this file are from Mark Peterson, who
  5.  built this fractal interpreter feature.  The rest are grouped by contributor.
  6.  Formulas by unidentified authors are grouped at the end.
  7.  
  8.  If you would like to contribute formulas for future versions of this file,
  9.  please contact one of the authors listed in FRACTINT.DOC.
  10.  All contributions are assumed to belong to the public domain.
  11.  
  12.  There are several hard-coded restrictions in the formula interpreter:
  13.  
  14.  1) The fractal name through the open curly bracket must be on a single line.
  15.  2) There is a hard-coded limit of 2000 formulas per formula file, only
  16.     because of restrictions in the prompting routines.
  17.  3) Formulas can contain at most 2000 operations (references to variables and
  18.     arithmetic); this is bigger than it sounds.
  19.  4) Comment blocks can be set up using dummy formulas with no formula name
  20.     or with the special name "comment".
  21.  
  22.  Note that the builtin "cos" function had a bug which was corrected in
  23.  version 16.  To recreate an image from a formula which used cos before
  24.  v16, change "cos" in the formula to "cosxx" which is a new function
  25.  provided for backward compatibility with that bug.
  26.  }
  27.  
  28. {--- MARK PETERSON -------------------------------------------------------}
  29.  
  30. Mandelbrot(XAXIS) {; Mark Peterson
  31.   ; Classical fractal showing LastSqr speedup
  32.   z = Pixel, z = Sqr(z):  ; Start with z**2 to initialize LastSqr
  33.    z = z + Pixel
  34.    z = Sqr(z)
  35.     LastSqr <= 4      ; Use LastSqr instead of recalculating
  36.   }
  37.  
  38. Dragon (ORIGIN) {; Mark Peterson
  39.   z = Pixel:
  40.    z = sqr(z) + (-0.74543, 0.2)
  41.     |z| <= 4
  42.   }
  43.  
  44. Daisy (ORIGIN) {; Mark Peterson
  45.   z = pixel:
  46.    z = z*z + (0.11031, -0.67037)
  47.     |z| <= 4
  48.   }
  49.  
  50. InvMandel (XAXIS) {; Mark Peterson
  51.   c = z = 1 / pixel:
  52.    z = sqr(z) + c
  53.     |z| <= 4
  54.   }
  55.  
  56. DeltaLog(XAXIS) {; Mark Peterson
  57.   z = pixel, c = log(pixel):
  58.    z = sqr(z) + c
  59.     |z| <= 4
  60.   }
  61.  
  62. Newton4(XYAXIS) {; Mark Peterson
  63.   ; Note that floating-point is required to make this compute accurately
  64.   z = pixel, Root = 1:
  65.    z3 = z*z*z
  66.    z4 = z3 * z
  67.    z = (3 * z4 + Root) / (4 * z3)
  68.     .004 <= |z4 - Root|
  69.   }
  70.  
  71. {--- DON ARCHER ----------------------------------------------------------}
  72.  
  73. DAFRM01 {;  Don Archer, 1993
  74.   z = pixel :
  75.    z = z ^ (z - 1) * (fn1(z) + pixel)
  76.     |z| <= 4
  77.   }
  78.  
  79. DAFRM07 {
  80.   z = pixel, c = p1 :
  81.    z = z ^ (z - 1) * fn1(z) + pixel
  82.     |z| <= 4
  83.   }
  84.  
  85. DAFRM09 {
  86.   z = pixel, c = z + z^ (z - 1):
  87.    tmp = fn1(z)
  88.    real(tmp) = real(tmp) * real(c) - imag(tmp) * imag(c)
  89.    imag(tmp) = real(tmp) * imag(c) - imag(tmp) * real(c)
  90.    z = tmp + pixel + 12
  91.     |z| <= 4
  92.   }
  93.  
  94. dafrm21 {
  95.   z = pixel:
  96.    x = real(z), y = imag(z)
  97.    x1 = -fn1((x*x*x + y*y*y - 1) - 6*x)*x/(2*x*x*x + y*y*y - 1)
  98.    y1 = -fn2((x*x*x + y*y*y - 1) + 6*x)*y/(2*x*x*x + y*y*y - 1)
  99.    x2 = x1*x1*x1 - y1*y1*y1 + p1 + 5
  100.    y2 = 4*x*y - 18
  101.    z = x2 + flip(y2)
  102.     |z| <= 100
  103.   }
  104.  
  105. 3daMand01 {; Mandelbrot/Zexpe via Lee Skinner
  106.   ; based on 4dFRACT.FRM by Gordon Lamb (CIS: 100272,3541)
  107.   z=real(pixel)+flip(imag(pixel)*p1)
  108.   c=p2+p1*real(pixel)+flip(imag(pixel)):
  109.    z=z^2.71828182845905 + c
  110.     |z|<=100
  111.   }
  112.  
  113. 3daMand02 {; Mandelbrot/Xexpe/Feigenbaum's alpha constant=exponent
  114.   ; based on 4dFRACT.FRM by Gordon Lamb (CIS: 100272,3541)
  115.   z=real(pixel)+flip(imag(pixel)*p1)
  116.   c=p2+p1*real(pixel)+flip(imag(pixel)):
  117.    z=z^2.502907875095 + c
  118.     |z|<=100
  119.   }
  120.  
  121. {--- RON BARNETT ---------------------------------------------------------}
  122.  
  123. Julike { ; Ron Barnett, 1993
  124.   ; a Julia function based upon the Ikenaga function
  125.   z = Pixel:
  126.    z = z*z*z + (P1-1)*z - P1
  127.     |z| <= 4
  128.   }
  129.  
  130. Mask { ; Ron Barnett, 1993
  131.   ; try fn1 = log, fn2 = sinh, fn3 = cosh
  132.   ;P1 = (0,1), P2 = (0,1)
  133.   ;Use floating point
  134.   z = fn1(pixel):
  135.    z = P1*fn2(z)^2 + P2*fn3(z)^2 + pixel
  136.     |z| <= 4
  137.   }
  138.  
  139. JMask {  ; Ron Barnett, 1993
  140.   z = fn1(pixel):
  141.    z = P1*fn2(z)^2 + P2
  142.     |z| <= 4
  143.   }
  144.  
  145. PseudoZeePi {; Ron Barnett, 1993
  146.   z = pixel:
  147.    x = 1-z^p1;
  148.    z = z*((1-x)/(1+x))^(1/p1) + p2
  149.     |z| <= 4
  150.   }
  151.  
  152. ZeePi {  ; Ron Barnett, 1993
  153.   ; This Julia function is based upon Ramanujan's iterative
  154.   ; function for calculating pi
  155.   z = pixel:
  156.    x = (1-z^p1)^(1/p1)
  157.    z = z*(1-x)/(1+x) + p2
  158.     |z| <= 4
  159.   }
  160.  
  161. IkeNewtMand {; Ron Barnett, 1993
  162.   z = c = pixel:
  163.    zf = z*z*z + (c-1)*z - c
  164.    zd = 3*z*z + c-1
  165.    z = z - p1*zf/zd
  166.     0.001 <= |zf|
  167.   }
  168.  
  169. Frame-RbtM(XAXIS) {; Ron Barnett, 1993
  170.   ; from Mazes for the Mind by Pickover
  171.   z = c = pixel:
  172.    z = z*z*z/5 + z*z + c
  173.     |z| <= 100
  174.   }
  175.  
  176. FrRbtGenM {; Ron Barnett, 1993
  177.   z = pixel:
  178.    z = p1*z*z*z + z*z + pixel
  179.     |z| <= 100
  180.   }
  181.  
  182. FlipLambdaJ { ; Ron Barnett, 1993
  183.   z = pixel:
  184.    z = p1*z*(1-flip(z)*flip(z))
  185.     |z| <= 100
  186.   }
  187.  
  188. REBRefInd2 {  ; Ron Barnett, 1993
  189.   ; Use floating point
  190.   z = pixel:
  191.    z = (z*z-1)/(z*z+2)*fn1(z)*fn2(z) + p1
  192.     |z| <= 100
  193.   }
  194.  
  195. GopalsamyFn {
  196.   z = pixel:
  197.    x = real(z), y = imag(z)
  198.    x1 = fn1(x)*fn2(y)
  199.    y1 = fn3(x)*fn4(y)
  200.    x2 = -2*x1*y1 + p1
  201.    y = y1*y1 - x1*x1
  202.    z = x2 + flip(y)
  203.     |z| <= 100
  204.   }
  205.  
  206. REB004A {; Ron Barnett, 1993
  207.   z = pixel:
  208.    z =p1*fn1(z) + p1*p1*fn2(p2*z) + pixel
  209.     |z| <= 100
  210.   }
  211.  
  212. REB004K {; Ron Barnett, 1993
  213.   ; floating point required
  214.   z = pixel:
  215.    x = flip(pixel + fn1(3/z - z/4))
  216.    z = x*z + p1
  217.     |z| <= 100
  218.   }
  219.  
  220. REB004L {; Ron Barnett, 1993
  221.   ; floating point required
  222.   z = pixel:
  223.    x = flip(pixel + fn1(p1/z - z/(p2+1)))
  224.    z = x*z + pixel
  225.     |z| <= 100
  226.   }
  227.  
  228. REB004M {; Ron Barnett, 1993
  229.   ; floating point required
  230.   z = pixel:
  231.    x = real(z), y = imag(z)
  232.    const = x*x + y*y
  233.    x1 = -fn1(const - 12*x)*x/(4*const)
  234.    y1 = -fn2(const + 12*x)*y/(4*const)
  235.    x2 = x1*x1 - y1*y1 + p1
  236.    y2 = 2*x*y
  237.    z = x2 + flip(y2)
  238.     |z| <= 100
  239.   }
  240.  
  241. REB005A {; Ron Barnett, 1993
  242.   ; floating point required
  243.   z = pixel:
  244.    x = real(z), y = imag(z)
  245.    const = x*x + y*y
  246.    x1 = -fn1(const - 12*x)*x/(4*const)
  247.    y1 = -fn2(const + 12*y)*y/(4*const)
  248.    x2 = x1*x1 - y1*y1 + p1
  249.    y2 = 2*x1*y1
  250.    z = x2 + flip(y2)
  251.     |z| <= 100
  252.   }
  253.  
  254. REB005E {; Ron Barnett, 1993
  255.   ; floating point required
  256.   z = pixel:
  257.    x = real(z), y = imag(z)
  258.    const = x*x + y*y
  259.    x1 = -fn1((const - x)*x/const)
  260.    y1 = -fn2((const + y)*y/const)
  261.    x2 = x1*x1 - y1*y1 + p1
  262.    y2 = 2*x1*y1
  263.    z = x2 + flip(y2)
  264.     |z| <= 100
  265.   }
  266.  
  267. REB005F {; Ron Barnett, 1993
  268.   ; floating point required
  269.   z = pixel:
  270.    x = real(z), y = imag(z)
  271.    const = x*x + y*y
  272.    x1 = -fn1((const - 12*x)*x/(4*const))
  273.    y1 = -fn2((const + 12*y)*y/(4*const))
  274.    x2 = x1*x1 - y1*y1 + p1
  275.    y2 = 2*x1*y1
  276.    z = x2 + flip(y2)
  277.     |z| <= 100
  278.   }
  279.  
  280. REB005G {; Ron Barnett, 1993
  281.   ; floating point required
  282.   z = pixel:
  283.    x = real(z), y = imag(z)
  284.    const = x*x + y*y
  285.    x1 = -fn1(const + p1*x)*y/const
  286.    y1 = -fn2(const + y)*x/const
  287.    x2 = x1*x1 - y1*y1 + p2
  288.    y2 = 2*x1*y1
  289.    z = x2 + flip(y2)
  290.     |z| <= 100
  291.   }
  292.  
  293. {--- BRADLEY BEACHAM -----------------------------------------------------}
  294.  
  295. OK-01 { ;TRY P1 REAL = 10000, FN1 = SQR
  296.   z = 0, c = pixel:
  297.    z = (c^z) + c
  298.    z = fn1(z)
  299.     |z| <= (5 + p1)
  300.   }
  301.  
  302. OK-04 { ;TRY FN2 = SQR, DIFFERENT FUNCTIONS FOR FN1
  303.   z = 0, c = fn1(pixel):
  304.    z = fn2(z) + c
  305.     |z| <= (5 + p1)
  306.   }
  307.  
  308. OK-08 {
  309.   z = pixel, c = fn1(pixel):
  310.    z = z^z / fn2(z)
  311.    z = c / z
  312.     |z| <= (5 + p1)
  313.   }
  314.  
  315. OK-21 {
  316.   z = pixel, c = fn1(pixel):
  317.    z = fn2(z) + c
  318.     fn3(z) <= p1
  319.   }
  320.  
  321. OK-22 {
  322.   z = v = pixel:
  323.    v = fn1(v) * fn2(z)
  324.    z = fn1(z) / fn2(v)
  325.     |z| <= (5 + p1)
  326.   }
  327.  
  328. OK-32 {
  329.   z = y = x = pixel, k = 1 + p1:
  330.    a = fn1(z)
  331.    b = (a <= y) * ((a * k) + y)
  332.    e = (a > y) * ((a * k) + x)
  333.    x = y
  334.    y = z
  335.    z = b + e
  336.     |z| <= (5 + p2)
  337.   }
  338.  
  339. OK-34 {
  340.   z = pixel, c = (fn1(pixel) * p1):
  341.    x = abs(real(z))
  342.    y = abs(imag(z))
  343.    a = (x <= y) * (fn2(z) + y + c)
  344.    b = (x > y) * (fn2(z) + x + c)
  345.    z = a + b
  346.     |z| <= (10 + p2)
  347.   }
  348.  
  349. OK-35 {
  350.   z = pixel, k = 1 + p1:
  351.    v = fn1(z)
  352.    x = (z*v)
  353.    y = (z/v)
  354.    a = (|x| <= |y|) * ((z + y) * k)
  355.    b = (|x| > |y|) * ((z + x) * k)
  356.    z = fn2((a + b) * v) + v
  357.     |z| <= (10 + p2)
  358.   }
  359.  
  360. OK-36 { ; DISSECTED MANDELBROT
  361.   ; TO GENERATE "STANDARD" MANDELBROT, SET P1 = 0,0 & ALL FN = IDENT
  362.   z = pixel, cx = fn1(real(z)), cy = fn2(imag(z)), k = 2 + p1:
  363.    zx = real(z), zy = imag(z)
  364.    x = fn3(zx*zx - zy*zy) + cx
  365.    y = fn4(k * zx * zy) + cy
  366.    z = x + flip(y)
  367.     |z| <  (10 + p2)
  368.   }
  369.  
  370. OK-38 { ; DISSECTED CUBIC MANDELBROT
  371.   ; TO GENERATE "STANDARD" CUBIC MANDELBROT, SET P1 = 0,0 & ALL FN = IDENT
  372.   z = pixel,  cx = fn1(real(pixel)), cy = fn2(imag(pixel)), k = 3 + p1:
  373.    zx = real(z), zy = imag(z)
  374.    x = fn3(zx*zx*zx - k*zx*zy*zy) + cx
  375.    y = fn4(k*zx*zx*zy - zy*zy*zy) + cy
  376.    z =  x + flip(y)
  377.     |z| <  (4 + p2)
  378.   }
  379.  
  380. OK-42 { ; MUTATION OF FN + FN
  381.   z = pixel, p1x = real(p1)+1, p1y = imag(p1)+1
  382.   p2x = real(p2)+1, p2y = imag(p2)+1:
  383.    zx = real(z), zy = imag(z)
  384.    x = fn1(zx*p1x - zy*p1y) + fn2(zx*p2x - zy*p2y)
  385.    y = fn3(zx*p1y + zy*p1x) + fn4(zx*p2y + zy*p2x)
  386.    z = x + flip(y)
  387.     |z| <= 20
  388.   }
  389.  
  390. OK-43 { ; DISSECTED SPIDER
  391.   ; TO GENERATE "STANDARD" SPIDER, SET P1 = 0,0 & ALL FN = IDENT
  392.   z = c = pixel, k = 2 + p1:
  393.    zx = real(z), zy = imag(z)
  394.    cx = real(c), cy = imag(c)
  395.    x = fn1(zx*zx - zy*zy) + cx
  396.    y = fn2(k*zx*zy) + cy
  397.    z = x + flip(y)
  398.    c = fn3((cx + flip(cy))/k) + z
  399.     |z| <  (10 + p2)
  400.   }
  401.  
  402. Larry { ; Mutation of 'Michaelbrot' and 'Element'
  403.   ; Original formulas by Michael Theroux [71673,2767]
  404.   ; For 'Michaelbrot', set FN1 & FN2 =IDENT and P1 & P2 = default
  405.   ; For 'Element', set FN1=IDENT & FN2=SQR and P1 & P2 = default
  406.   ; p1 = Parameter (default 0.5,0), real(p2) = Bailout (default 4)
  407.   z = pixel
  408.   ; The next line sets c=default if p1=0, else c=p1
  409.   c = ((0.5,0) * (|p1|<=0) + p1)
  410.   ; The next line sets test=4 if real(p2)<=0, else test=real(p2)
  411.   test = (4 * (real(p2)<=0) + real(p2) * (0<p2)):
  412.    z = fn1(fn2(z*z)) + c
  413.     |z| <= test
  414.   }
  415.  
  416. Moe { ; Mutation of 'Zexpe'.
  417.   ; Original formula by Lee Skinner [75450,3631]
  418.   ; For 'Zexpe', set FN1 & FN2 =IDENT and P1 = default
  419.   ; real(p1) = Bailout (default 100)
  420.   s = exp(1.,0.), z = pixel, c = fn1(pixel)
  421.   ; The next line sets test=100 if real(p1)<=0, else test=real(p1)
  422.   test = (100 * (real(p1)<=0) + real(p1) * (0<p1)):
  423.    z = fn2(z)^s + c
  424.     |z| <= test
  425.   }
  426.  
  427. Groucho { ; Mutation of 'Fish2'.
  428.   ; Original formula by Dave Oliver via Tim Wegner
  429.   ; For 'Fish2', set FN1 & FN2 =IDENT and P1 & P2 = default
  430.   ; p1 = Parameter (default 1,0), real(p2) = Bailout (default 4)
  431.   z = c = pixel
  432.   ; The next line sets k=default if p1=0, else k=p1
  433.   k = ((1,0) * (|p1|<=0) + p1)
  434.   ; The next line sets test=4 if real(p2)<=0, else test=real(p2)
  435.   test = (4 * (real(p2)<=0) + real(p2) * (0<p2)):
  436.    z1 = c^(fn1(z)-k)
  437.    z = fn2(((c*z1)-k)*(z1))
  438.     |z| <= test
  439.   }
  440.  
  441. Zeppo { ; Mutation of 'Liar4'.
  442.   ; Original formula by Chuck Ebbert [76306,1226]
  443.   ; For 'Liar4' set FN1 & FN2 =IDENT and P1 & P2 = default
  444.   ; p1 & p2 = Parameters (default 1,0 and 0,0)
  445.   z = pixel
  446.   ; The next line sets p=default if p1=0, else p=p1
  447.   p = (1 * (|p1|<=0) + p1):
  448.    z =fn1(1-abs(imag(z)*p-real(z)))+flip(fn2(1-abs(1-real(z)-imag(z))))-p2
  449.     |z| <= 1
  450.   }
  451.  
  452. inandout02 {
  453.   ;p1 = Parameter (default 0), real(p2) = Bailout (default 4)
  454.   ;The next line sets test=4 if real(p2)<=0, else test=real(p2)
  455.   test = (4 * (real(p2)<=0) + real(p2) * (0<p2))
  456.   z = oldz = pixel:
  457.    a = (|z| <= |oldz|) * (fn1(z)) ;IN
  458.    b = (|oldz| < |z|) * (fn2(z))  ;OUT
  459.    oldz = z
  460.    z = a + b + p1
  461.     |z| <= test
  462.   }
  463.  
  464. inandout03 {
  465.   ;p1 = Parameter (default 0), real(p2) = Bailout (default 4)
  466.   ;The next line sets test=4 if real(p2)<=0, else test=real(p2)
  467.   test = (4 * (real(p2)<=0) + real(p2) * (0<p2))
  468.   z = oldz = c = pixel:
  469.    a = (|z| <= |oldz|) * (c)    ;IN
  470.    b = (|oldz| < |z|)  * (z*p1) ;OUT
  471.    c = fn1(a + b)
  472.    oldz = z
  473.    z = fn2(z*z) + c
  474.     |z| <= test
  475.   }
  476.  
  477. inandout04 {
  478.   ;p1 = Parameter (default 1), real(p2) = Bailout (default 4)
  479.   ;The next line sets k=default if p1=0, else k=p1
  480.   k = ((1) * (|p1|<=0) + p1)
  481.   ;The next line sets test=4 if real(p2)<=0, else test=real(p2)
  482.   test = (4 * (real(p2)<=0) + real(p2) * (0<p2))
  483.   z = oldz = c = pixel:
  484.    a = (|z| <= |oldz|) * (c)   ;IN
  485.    b = (|oldz| < |z|)  * (c*k) ;OUT
  486.    c = a + b
  487.    oldz = z
  488.    z = fn1(z*z) + c
  489.     |z| <= test
  490.   }
  491.  
  492. comment {
  493.   In this formula, a running count of the iterations is kept. After a
  494.   specified iteration number has been reached, the algorithm is changed.
  495.   }
  496.  
  497. shifter01 { ; After shift, switch from z*z to z*z*z
  498.             ; Bradley Beacham  [74223,2745]
  499.   ; P1 = shift value, P2 varies bailout value
  500.   z = c = pixel, iter = 1, shift = p1, test = 4 + p2:
  501.    lo = (z*z) * (iter <= shift)
  502.    hi = (z*z*z) * (shift < iter)
  503.    iter = iter + 1
  504.    z = lo + hi + c
  505.     |z| < test
  506.   }
  507.  
  508. {--- PIETER BRANDERHORST -------------------------------------------------}
  509.  
  510. comment {
  511.   The following resulted from a FRACTINT bug. Version 13 incorrectly
  512.   calculated Spider (see above). We fixed the bug, and reverse-engineered
  513.   what it was doing to Spider - so here is the old "spider"
  514.   }
  515.  
  516. Wineglass(XAXIS) {; Pieter Branderhorst
  517.   c = z = pixel:
  518.    z = z * z + c
  519.    c = (1+flip(imag(c))) * real(c) / 2 + z
  520.     |z| <= 4
  521.   }
  522.  
  523. {--- ROBERT W. CARR ------------------------------------------------------}
  524.  
  525. COMMENT {
  526.   This formula is based on Sylvie Gallet's Five-Mandels formula.
  527.   Though it shouldn't produce a symmetrical image, a modification of pixel
  528.   forces symmetry around the Y axis.
  529.   }
  530.  
  531. Carr2289 (YAXIS) {; Modified Sylvie Gallet frm. [101324,3444],1996
  532.   ; 0 < real(p1) < imag(p1) < real(p2) < imag(p2) < maxiter, periodicity=0
  533.   pixel = -abs(real(pixel)) + flip(imag(pixel))
  534.   c = pixel + pixel - flip(0.001/pixel) - conj(0.01/pixel)
  535.   z = pixel - conj(asin(pixel+pixel+0.32))
  536.   d1 = flip(-0.0005935/pixel) , d4 = 4*d1
  537.   z1 = 1.5*z+d1 , z2 = 2.25*z+d1 , z3 = 3.375*z+d1 , z4 = 5.0625*z+d1
  538.   l1 = real(p1) , l2 = imag(p1) , l3 = real(p2) , l4 = imag(p2)
  539.   bailout = 16 , iter = 0 :
  540.    t1 = iter==l1 , t2 = iter==l2 , t3 = iter==l3 , t4 = iter==l4
  541.    t = 1 - (t1||t2||t3||t4) , ct = z1*t1 + z2*t2 + z3*t3 + z4*t4 + d4
  542.    z = z*t + ct , c = c*t + ct
  543.    z = z*z + c
  544.    iter = iter + 1
  545.     |real(z)| <= bailout
  546.   }
  547.  
  548. {--- JM COLLARD-RICHARD --------------------------------------------------}
  549.  
  550. comment {
  551.   These are the original "Richard" types sent by Jm Collard-Richard. Their
  552.   generalizations are tacked on to the end of the "Jm" list below, but
  553.   we felt we should keep these around for historical reasons.
  554.   }
  555.  
  556. Richard1 (XYAXIS) {; Jm Collard-Richard
  557.   z = pixel:
  558.    sq=z*z, z=(sq*sin(sq)+sq)+pixel
  559.     |z|<=50
  560.   }
  561.  
  562. Richard2 (XYAXIS) {; Jm Collard-Richard
  563.   z = pixel:
  564.    z=1/(sin(z*z+pixel*pixel))
  565.     |z|<=50
  566.   }
  567.  
  568. Richard3 (XAXIS) {; Jm Collard-Richard
  569.   z = pixel:
  570.    sh=sinh(z), z=(1/(sh*sh))+pixel
  571.     |z|<=50
  572.   }
  573.  
  574. Richard4 (XAXIS) {; Jm Collard-Richard
  575.   z = pixel:
  576.    z2=z*z, z=(1/(z2*cos(z2)+z2))+pixel
  577.     |z|<=50
  578.   }
  579.  
  580. Richard5 (XAXIS) {; Jm Collard-Richard
  581.   z = pixel:
  582.    z=sin(z*sinh(z))+pixel
  583.     |z|<=50
  584.   }
  585.  
  586. Richard6 (XYAXIS) {; Jm Collard-Richard
  587.   z = pixel:
  588.    z=sin(sinh(z))+pixel
  589.     |z|<=50
  590.   }
  591.  
  592. Richard7 (XAXIS) {; Jm Collard-Richard
  593.   z=pixel:
  594.    z=log(z)*pixel
  595.     |z|<=50
  596.   }
  597.  
  598. Richard8 (XYAXIS) {; Jm Collard-Richard
  599.   ; This was used for the "Fractal Creations" cover
  600.   z=pixel,sinp = sin(pixel):
  601.    z=sin(z)+sinp
  602.     |z|<=50
  603.   }
  604.  
  605. Richard9 (XAXIS) {; Jm Collard-Richard
  606.   z=pixel:
  607.    sqrz=z*z, z=sqrz + 1/sqrz + pixel
  608.     |z|<=4
  609.   }
  610.  
  611. Richard10(XYAXIS) {; Jm Collard-Richard
  612.   z=pixel:
  613.    z=1/sin(1/(z*z))
  614.     |z|<=50
  615.   }
  616.  
  617. Richard11(XYAXIS) {; Jm Collard-Richard
  618.   z=pixel:
  619.    z=1/sinh(1/(z*z))
  620.     |z|<=50
  621.   }
  622.  
  623. comment {
  624.   These types are generalizations of types sent to us by the French
  625.   mathematician Jm Collard-Richard. If we hadn't generalized them
  626.   there would be --ahhh-- quite a few. With 26 possible values for
  627.   each fn variable, Jm_03, for example, has 456,976 variations!
  628.   }
  629.  
  630. Jm_01 {; generalized Jm Collard-Richard type
  631.   z=pixel,t=p1+4:
  632.    z=(fn1(fn2(z^pixel)))*pixel
  633.     |z|<=t
  634.   }
  635.  
  636. Jm_02 {; generalized Jm Collard-Richard type
  637.   z=pixel,t=p1+4:
  638.    z=(z^pixel)*fn1(z^pixel)
  639.     |z|<=t
  640.   }
  641.  
  642. Jm_03 {; generalized Jm Collard-Richard type
  643.   z=pixel,t=p1+4:
  644.    z=fn1((fn2(z)*pixel)*fn3(fn4(z)*pixel))*pixel
  645.     |z|<=t
  646.   }
  647.  
  648. Jm_03a {; generalized Jm Collard-Richard type
  649.   z=pixel,t=p1+4:
  650.    z=fn1((fn2(z)*pixel)*fn3(fn4(z)*pixel))+pixel
  651.     |z|<=t
  652.   }
  653.  
  654. Jm_04 {; generalized Jm Collard-Richard type
  655.   z=pixel,t=p1+4:
  656.    z=fn1((fn2(z)*pixel)*fn3(fn4(z)*pixel))
  657.     |z|<=t
  658.   }
  659.  
  660. Jm_05 {; generalized Jm Collard-Richard type
  661.   z=pixel,t=p1+4:
  662.    z=fn1(fn2((z^pixel)))
  663.     |z|<=t
  664.   }
  665.  
  666. Jm_06 {; generalized Jm Collard-Richard type
  667.   z=pixel,t=p1+4:
  668.    z=fn1(fn2(fn3((z^z)*pixel)))
  669.     |z|<=t
  670.   }
  671.  
  672. Jm_07 {; generalized Jm Collard-Richard type
  673.   z=pixel,t=p1+4:
  674.    z=fn1(fn2(fn3((z^z)*pixel)))*pixel
  675.     |z|<=t
  676.   }
  677.  
  678. Jm_08 {; generalized Jm Collard-Richard type
  679.   z=pixel,t=p1+4:
  680.    z=fn1(fn2(fn3((z^z)*pixel)))+pixel
  681.     |z|<=t
  682.   }
  683.  
  684. Jm_09 {; generalized Jm Collard-Richard type
  685.   z=pixel,t=p1+4:
  686.    z=fn1(fn2(fn3(fn4(z))))+pixel
  687.     |z|<=t
  688.   }
  689.  
  690. Jm_10 {; generalized Jm Collard-Richard type
  691.   z=pixel,t=p1+4:
  692.    z=fn1(fn2(fn3(fn4(z)*pixel)))
  693.     |z|<=t
  694.   }
  695.  
  696. Jm_11 {; generalized Jm Collard-Richard type
  697.   z=pixel,t=p1+4:
  698.    z=fn1(fn2(fn3(fn4(z)*pixel)))*pixel
  699.     |z|<=t
  700.   }
  701.  
  702. Jm_11a {; generalized Jm Collard-Richard type
  703.   z=pixel,t=p1+4:
  704.    z=fn1(fn2(fn3(fn4(z)*pixel)))+pixel
  705.     |z|<=t
  706.   }
  707.  
  708. Jm_12 {; generalized Jm Collard-Richard type
  709.   z=pixel,t=p1+4:
  710.    z=fn1(fn2(fn3(z)*pixel))
  711.     |z|<=t
  712.   }
  713.  
  714. Jm_13 {; generalized Jm Collard-Richard type
  715.   z=pixel,t=p1+4:
  716.    z=fn1(fn2(fn3(z)*pixel))*pixel
  717.     |z|<=t
  718.   }
  719.  
  720. Jm_14 {; generalized Jm Collard-Richard type
  721.   z=pixel,t=p1+4:
  722.    z=fn1(fn2(fn3(z)*pixel))+pixel
  723.     |z|<=t
  724.   }
  725.  
  726. Jm_15 {; generalized Jm Collard-Richard type
  727.   z=pixel,t=p1+4:
  728.    f2=fn2(z),z=fn1(f2)*fn3(fn4(f2))*pixel
  729.     |z|<=t
  730.   }
  731.  
  732. Jm_16 {; generalized Jm Collard-Richard type
  733.   z=pixel,t=p1+4:
  734.    f2=fn2(z),z=fn1(f2)*fn3(fn4(f2))+pixel
  735.     |z|<=t
  736.   }
  737.  
  738. Jm_17 {; generalized Jm Collard-Richard type
  739.   z=pixel,t=p1+4:
  740.    z=fn1(z)*pixel*fn2(fn3(z))
  741.     |z|<=t
  742.   }
  743.  
  744. Jm_18 {; generalized Jm Collard-Richard type
  745.   z=pixel,t=p1+4:
  746.    z=fn1(z)*pixel*fn2(fn3(z)*pixel)
  747.     |z|<=t
  748.   }
  749.  
  750. Jm_19 {; generalized Jm Collard-Richard type
  751.   z=pixel,t=p1+4:
  752.    z=fn1(z)*pixel*fn2(fn3(z)+pixel)
  753.     |z|<=t
  754.   }
  755.  
  756. Jm_20 {; generalized Jm Collard-Richard type
  757.   z=pixel,t=p1+4:
  758.    z=fn1(z^pixel)
  759.     |z|<=t
  760.   }
  761.  
  762. Jm_21 {; generalized Jm Collard-Richard type
  763.   z=pixel,t=p1+4:
  764.    z=fn1(z^pixel)*pixel
  765.     |z|<=t
  766.   }
  767.  
  768. Jm_22 {; generalized Jm Collard-Richard type
  769.   z=pixel,t=p1+4:
  770.    sq=fn1(z), z=(sq*fn2(sq)+sq)+pixel
  771.     |z|<=t
  772.   }
  773.  
  774. Jm_23 {; generalized Jm Collard-Richard type
  775.   z=pixel,t=p1+4:
  776.    z=fn1(fn2(fn3(z)+pixel*pixel))
  777.     |z|<=t
  778.   }
  779.  
  780. Jm_24 {; generalized Jm Collard-Richard type
  781.   z=pixel,t=p1+4:
  782.    z2=fn1(z), z=(fn2(z2*fn3(z2)+z2))+pixel
  783.     |z|<=t
  784.   }
  785.  
  786. Jm_25 {; generalized Jm Collard-Richard type
  787.   z=pixel,t=p1+4:
  788.    z=fn1(z*fn2(z)) + pixel
  789.     |z|<=t
  790.   }
  791.  
  792. Jm_26 {; generalized Jm Collard-Richard type
  793.   z=pixel,t=p1+4:
  794.    z=fn1(fn2(z)) + pixel
  795.     |z|<=t
  796.   }
  797.  
  798. Jm_27 {; generalized Jm Collard-Richard type
  799.   z=pixel,t=p1+4:
  800.    sqrz=fn1(z), z=sqrz + 1/sqrz + pixel
  801.     |z|<=t
  802.   }
  803.  
  804. Jm_ducks(XAXIS) {; Jm Collard-Richard
  805.   ; Not so ugly at first glance and lot of corners to zoom in.
  806.   ; try this: corners=-1.178372/-0.978384/-0.751678/-0.601683
  807.   z=pixel,tst=p1+4,t=1+pixel:
  808.    z=sqr(z)+t
  809.     |z|<=tst
  810.   }
  811.  
  812. Gamma(XAXIS) { ; first order gamma function from Prof. Jm
  813.   ; "It's pretty long to generate even on a 486-33 comp but there's a lot
  814.   ; of corners to zoom in and zoom and zoom...beautiful pictures :)"
  815.   z=pixel,twopi=6.283185307179586,r=10:
  816.    z=(twopi*z)^(0.5)*(z^z)*exp(-z)+pixel
  817.     |z|<=r
  818.   }
  819.  
  820. ZZ(XAXIS) { ; Prof Jm using Newton-Raphson method
  821.   ; use floating point with this one
  822.   z=pixel,solution=1:
  823.    z1=z^z
  824.    z2=(log(z)+1)*z1
  825.    z=z-(z1-1)/z2
  826.     0.001 <= |solution-z1|
  827.   }
  828.  
  829. ZZa(XAXIS) { ; Prof Jm using Newton-Raphson method
  830.   ; use floating point with this one
  831.   z=pixel,solution=1:
  832.    z1=z^(z-1)
  833.    z2=(((z-1)/z)+log(z))*z1
  834.    z=z-((z1-1)/z2)
  835.     .001 <= |solution-z1|
  836.   }
  837.  
  838. GenInvMand1_N { ; Jm Collard-Richard
  839.   c=z=1/pixel:
  840.    z=fn1(z)*fn2(z)+fn3(fn4(c))
  841.     |z|<=4
  842.   }
  843.  
  844. {--- W. LEROY DAVIS ------------------------------------------------------}
  845.  
  846. comment {
  847.   These are from: "AKA MrWizard W. LeRoy Davis;SM-ALC/HRUC"
  848.       davisl@sm-logdis1-aflc.af.mil
  849.   The first 3 are variations of:
  850.          z
  851.      gamma(z) = (z/e) * sqrt(2*pi*z) * R
  852.   }
  853.  
  854. Sterling(XAXIS) {; davisl
  855.   z = Pixel:
  856.    z = ((z/2.7182818)^z)/sqr(6.2831853*z)
  857.     |z| <= 4
  858.   }
  859.  
  860. Sterling2(XAXIS) {; davisl
  861.   z = Pixel:
  862.    z = ((z/2.7182818)^z)/sqr(6.2831853*z) + pixel
  863.     |z| <= 4
  864.   }
  865.  
  866. Sterling3(XAXIS) {; davisl
  867.   z = Pixel:
  868.    z = ((z/2.7182818)^z)/sqr(6.2831853*z) - pixel
  869.     |z| <= 4
  870.   }
  871.  
  872. PsudoMandel(XAXIS) {; davisl - try center=0,0/magnification=28
  873.   z = Pixel:
  874.    z = ((z/2.7182818)^z)*sqr(6.2831853*z) + pixel
  875.     |z| <= 4
  876.   }
  877.  
  878. {--- ROB DEN BRAASEM -----------------------------------------------------}
  879.  
  880. J_TchebychevC3 {
  881.   c = pixel, z = P1:
  882.    z = c*z*(z*z-3)
  883.     |z|<100
  884.   }
  885.  
  886. J_TchebychevC7 {
  887.   c = pixel, z = P1:
  888.    z = c*z*(z*z*(z*z*(z*z-7)+14)-7)
  889.     |z|<100
  890.   }
  891.  
  892. J_TchebychevS4 {
  893.   c = pixel, z = P1:
  894.    z = c*(z*z*(z*z-3)+1)
  895.     |z|<100
  896.   }
  897.  
  898. J_TchebychevS6 {
  899.   c = pixel, z = P1:
  900.    z = c*(z*z*(z*z*(z*z-5)+6)-1)
  901.     |z|<100
  902.   }
  903.  
  904. J_TchebychevS7 {
  905.   c = pixel, z = P1:
  906.    z = c*z*(z*z*(z*z*(z*z-6)+10)-4)
  907.     |z|<100
  908.   }
  909.  
  910. J_Laguerre2 {
  911.   c = pixel, z = P1:
  912.    z = (z*(z - 4) +2 ) / 2 + c
  913.     |z| < 100
  914.   }
  915.  
  916. J_Laguerre3 {
  917.   c = pixel, z = P1:
  918.    z = (z*(z*(-z + 9) -18) + 6 ) / 6 + c
  919.     |z| < 100
  920.   }
  921.  
  922. J_Lagandre4 {
  923.   c = pixel, z = P1:
  924.    z = (z*z*(35 * z*z - 30) + 3) / 8 + c
  925.     |z| < 100
  926.   }
  927.  
  928. M_TchebychevT5 {
  929.   c = P1, z = Pixel:
  930.    z = c*(z*(z*z*(16*z*z-20)+5))
  931.     |z|<100
  932.   }
  933.  
  934. M_TchebychevC5 {
  935.   c = P1, z = Pixel:
  936.    z = c*z*(z*z*(z*z-5)+5)
  937.     |z|<100
  938.   }
  939.  
  940. M_TchebychevU3 {
  941.   c = P1, z = Pixel:
  942.    z = c*z*(8*z*z-4)
  943.     |z|<100
  944.   }
  945.  
  946. M_TchebychevS3 {
  947.   c = P1, z = Pixel:
  948.    z = c*z*(z*z-2)
  949.     |z|<100
  950.   }
  951.  
  952. M_Lagandre2 {
  953.   c = P1, z = Pixel:
  954.    z = (3 * z*z - 1) / 2 + c
  955.     |z| < 100
  956.   }
  957.  
  958. M_Lagandre6 {
  959.   c = P1, z = Pixel:
  960.    z = (z*z*(z*z*(231 * z*z - 315)  + 105 ) - 5) / 16 + c
  961.     |z| < 100
  962.   }
  963.  
  964. {--- CHUCK EBBERT & JON HORNER -------------------------------------------}
  965.  
  966. comment {
  967.   Chaotic Liar formulas for FRACTINT. These formulas reproduce some of the
  968.   pictures in the paper 'Pattern and Chaos: New Images in the Semantics of
  969.   Paradox' by Gary Mar and Patrick Grim of the Department of Philosophy,
  970.   SUNY at Stony Brook. "...what is being graphed within the unit square is
  971.   simply information regarding the semantic behavior for different inputs
  972.   of a pair of English sentences:"
  973.   }
  974.  
  975. Liar1 { ; by Chuck Ebbert.
  976.   ; X: X is as true as Y
  977.   ; Y: Y is as true as X is false
  978.   ; Calculate new x and y values simultaneously.
  979.   ; y(n+1)=abs((1-x(n) )-y(n) ), x(n+1)=1-abs(y(n)-x(n) )
  980.   z = pixel:
  981.    z = 1 - abs(imag(z)-real(z) ) + flip(1 - abs(1-real(z)-imag(z) ) )
  982.     |z| <= 1
  983.   }
  984.  
  985. Liar3 { ; by Chuck Ebbert.
  986.   ; X: X is true to P1 times the extent that Y is true
  987.   ; Y: Y is true to the extent that X is false.
  988.   ; Sequential reasoning.  P1 usually 0 to 1.  P1=1 is Liar2 formula.
  989.   ; x(n+1) = 1 - abs(p1*y(n)-x(n) );
  990.   ; y(n+1) = 1 - abs((1-x(n+1) )-y(n) );
  991.   z = pixel:
  992.    x = 1 - abs(imag(z)*real(p1)-real(z) )
  993.    z = flip(1 - abs(1-real(x)-imag(z) ) ) + real(x)
  994.     |z| <= 1
  995.   }
  996.  
  997. Liar4 { ; by Chuck Ebbert.
  998.   ; X: X is as true as (p1+1) times Y
  999.   ; Y: Y is as true as X is false
  1000.   ; Calculate new x and y values simultaneously.
  1001.   ; Real part of p1 changes probability.  Use floating point.
  1002.   ; y(n+1)=abs((1-x(n) )-y(n) ), x(n+1)=1-abs(y(n)-x(n) )
  1003.   z = pixel, p = p1 + 1:
  1004.    z = 1-abs(imag(z)*p-real(z))+flip(1-abs(1-real(z)-imag(z)))
  1005.     |z| <= 1
  1006.   }
  1007.  
  1008. F'Liar1 { ; Generalization by Jon Horner of Chuck Ebbert formula.
  1009.   ; X: X is as true as Y
  1010.   ; Y: Y is as true as X is false
  1011.   ; Calculate new x and y values simultaneously.
  1012.   ; y(n+1)=abs((1-x(n) )-y(n) ), x(n+1)=1-abs(y(n)-x(n) )
  1013.   z = pixel:
  1014.    z = 1 - abs(imag(z)-real(z) ) + flip(1 - abs(1-real(z)-imag(z) ) )
  1015.     fn1(abs(z))<p1
  1016.   }
  1017.  
  1018. M-SetInNewton(XAXIS) {; use float=yes
  1019.   ; jon horner 100112,1700, 12 feb 93
  1020.   z = 0,  c = pixel,  cminusone = c-1:
  1021.    oldz = z, nm = 3*c-2*z*cminusone, dn = 3*(3*z*z+cminusone)
  1022.    z = nm/dn+2*z/3
  1023.     |(z-oldz)|>=|0.01|
  1024.   }
  1025.  
  1026. F'M-SetInNewtonA(XAXIS) {; use float=yes
  1027.   ; jon horner 100112,1700, 12 feb 93
  1028.   z = 0,  c = fn1(pixel),  cminusone = c-1:
  1029.    oldz = z, nm = p1*c-2*z*cminusone, dn = p1*(3*z*z+cminusone)
  1030.    z = nm/dn+2*z/p1
  1031.     |(z-oldz)|>=|0.01|
  1032.   }
  1033.  
  1034. F'M-SetInNewtonC(XAXIS) { ; same as F'M-SetInNewtonB except for bailout
  1035.   ; use float=yes, periodicity=no
  1036.   ; (3 <= p1 <= ?) and (1e-30 < p2 < .01)
  1037.   z=0, c=fn1(pixel), cm1=c-1, cm1x2=cm1*2, twoop1=2/p1, p1xc=c*real(p1):
  1038.    z = (p1xc - z*cm1x2 )/( (sqr(z)*3 + cm1 ) * real(p1) ) + z*real(twoop1)
  1039.     abs(|z| - real(lastsqr) ) >= p2
  1040.   }
  1041.  
  1042. {--- SYLVIE GALLET -------------------------------------------------------}
  1043.  
  1044. comment {
  1045.   Because of its large size, this formula requires Fractint version 19.3 or
  1046.   later to run.
  1047.   It uses Newton's formula applied to the equation z^6-1 = 0 and, in the
  1048.   foreground, spells out the word 'FRACTINT'.
  1049.   }
  1050.  
  1051. Fractint {; Sylvie Gallet [101324,3444], 1996
  1052.           ; requires 'periodicity=0'
  1053.   z = pixel-0.025 , x=real(z) , y=imag(z) , x1=x*1.8 , x3=3*x
  1054.   ty2 = ( (y<0.025) && (y>-0.025) ) || (y>0.175)
  1055.   f = ( (x<-1.2) || ty2 ) && ( (x>-1.25) && (x<-1) )
  1056.   r = ( (x<-0.9) || ty2 ) && ( (x>-0.95) && (x<-0.8) )
  1057.   r = r || ((cabs(sqrt(|z+(0.8,-0.1)|)-0.1)<0.025) && (x>-0.8))
  1058.   r = r || (((y<(-x1-1.44)) && (y>(-x1-1.53))) && (y<0.025))
  1059.   a = (y>(x3+1.5)) || (y>(-x3-1.2)) || ((y>-0.125) && (y<-0.075))
  1060.   a = a && ((y<(x3+1.65)) && (y<(-x3-1.05)))
  1061.   c = (cabs(sqrt(|z+0.05|)-0.2)<0.025) && (x<0.05)
  1062.   t1 = ((x>0.225) && (x<0.275) || (y>0.175)) && ((x>0.1) && (x<0.4))
  1063.   i = (x>0.45) && (x<0.5)
  1064.   n = (x<0.6) || (x>0.8) || ((y>-x1+1.215) && (y<-x1+1.305))
  1065.   n = n && (x>0.55) && (x<0.85)
  1066.   t2 = ((x>1.025) && (x<1.075) || (y>0.175)) && ((x>0.9) && (x<1.2))
  1067.   test = 1 - (real(f||r||a||c||t1||i||n||t2)*real(y>-0.225)*real(y<0.225))
  1068.   z = 1+(0.0,-0.65)/(pixel+(0.0,.75)) :
  1069.    z2 = z*z , z4 = z2*z2 , n = z4*z2-1 , z = z-n/(6*z4*z)
  1070.     (|n|>=0.0001) && test
  1071.   }
  1072.  
  1073. comment {
  1074.   This formula uses Newton's formula applied to the real equation :
  1075.      F(x,y) = 0 where F(x,y) = (x^3 + y^2 - 1 , y^3 - x^2 + 1)
  1076.      starting with (x_0,y_0) = z0 = pixel
  1077.   It calculates:
  1078.      (x_(n+1),y_(n+1)) = (x_n,y_n) - (F'(x_n,y_n))^-1 * F(x_n,y_n)
  1079.      where (F'(x_n,y_n))^-1 is the inverse of the Jacobian matrix of F.
  1080.   }
  1081.  
  1082. Newton_real { ; Sylvie Gallet [101324,3444], 1996
  1083.   ; Newton's method applied to   x^3 + y^2 - 1 = 0
  1084.   ;                              y^3 - x^2 + 1 = 0
  1085.   ;                              solution (0,-1)
  1086.   ; One parameter : real(p1) = bailout value
  1087.   z = pixel , x = real(z) , y = imag(z) :
  1088.    xy = x*y
  1089.    d = 9*xy+4 , x2 = x*x , y2 = y*y
  1090.    c = 6*xy+2
  1091.    x1 = x*c - (y*y2 - 3*y - 2)/x
  1092.    y1 = y*c + (x*x2 + 2 - 3*x)/y
  1093.    z = (x1+flip(y1))/d , x = real(z) , y = imag(z)
  1094.     (|x| >= p1) || (|y+1| >= p1)
  1095.   }
  1096.  
  1097. comment {
  1098.   Five-Mandels shows five Mandelbrot sets that fit into each other.
  1099.   It uses the following algorithm:
  1100.     z=c=pixel
  1101.     FOR iter:=0 to l1-1
  1102.       IF the orbit of z*z + c escapes THEN end
  1103.         ELSE
  1104.           z:=z1
  1105.           FOR iter:=L1+1 to l2-1
  1106.             IF the orbit of z*z + z1 escapes THEN end
  1107.               ELSE
  1108.                 z:=z2
  1109.                 FOR iter:=L2+1 to l3-1
  1110.                   ...
  1111.   To work correctly, this formula requires the use of periodicity=0.
  1112.   }
  1113.  
  1114. Five-Mandels (XAXIS) {; Sylvie Gallet [101324,3444], 1996
  1115.   ; 0 < real(p1) < imag(p1) < real(p2) < imag(p2) < maxiter, periodicity=0
  1116.   c = z = pixel
  1117.   z1 = 1.5*z , z2 = 2.25*z , z3 = 3.375*z , z4 = 5.0625*z
  1118.   l1 = real(p1) , l2 = imag(p1) , l3 = real(p2) , l4 = imag(p2)
  1119.   bailout = 16 , iter = 0 :
  1120.    t1 = (iter==l1) , t2 = (iter==l2) , t3 = (iter==l3) , t4 = (iter==l4)
  1121.    t = 1-(t1||t2||t3||t4) , ct = z1*t1 + z2*t2 + z3*t3 + z4*t4
  1122.    z = z*t + ct , c = c*t + ct
  1123.    z = z*z + c
  1124.    iter = iter+1
  1125.     |z| <= bailout
  1126.   }
  1127.  
  1128. comment {
  1129.   The following formula draws the graphs of 4 real functions at a time.
  1130.   }
  1131.  
  1132. Graph { ; Sylvie Gallet [101324,3444], 1996
  1133.   ; 2 parameters: curves thickness = real(p1)
  1134.   ;                 axes thickness = imag(p1)
  1135.   ; choose for example real(p1) = 0.002 and imag(p1) = 0.001
  1136.   epsilon = abs(real(p1)) , axes = abs(imag(p1))
  1137.   x = round(real(pixel)/epsilon) * epsilon
  1138.   z1 = x + flip(fn1(x)) , z2 = x + flip(fn2(x))
  1139.   z3 = x + flip(fn3(x)) , z4 = x + flip(fn4(x))
  1140.   testaxes = (|real(pixel)|<=axes) || (|imag(pixel)|<=axes)
  1141.   testfn1 = 2*(|z1-pixel|<=epsilon) , testfn2 = 4*(|z2-pixel|<=epsilon)
  1142.   testfn3 = 8*(|z3-pixel|<=epsilon) , testfn4 = 16*(|z4-pixel|<=epsilon)
  1143.   z = testaxes + testfn1 + testfn2 + testfn3 + testfn4
  1144.   z = z + 100*(z==0) :
  1145.    z = z - 1
  1146.     z > 0
  1147.   }
  1148.  
  1149. G-3-03-M  { ; Sylvie Gallet [101324,3444], 1996
  1150.             ; Modified Gallet-3-03 formula
  1151.   z = pixel :
  1152.    x = real(z) , y = imag(z)
  1153.    x1 = x - p1 * fn1(y*y + round(p2*fn2(y)))
  1154.    y1 = y - p1 * fn1(x*x + round(p2*fn2(x)))
  1155.    z = x1 + flip(y1)
  1156.     |z| <= 4
  1157.   }
  1158.  
  1159. comment {
  1160.   The following formula overlays a Mandel and a reverse-Mandel, using a
  1161.   checkerboard dithering invisible at very high resolutions.
  1162.   Since it uses the new predefined variable "whitesq", it's now resolution
  1163.   independent and the image can be interrupted, saved and restored.
  1164.   Panning an even number of pixels is now possible.
  1165.   }
  1166.  
  1167. JD-SG-04-1 { ; Sylvie Gallet [101324,3444], 1996
  1168.   ; On an original idea by Jim Deutch [104074,3171]
  1169.   ; use p1 and p2 to adjust the inverted Mandel
  1170.   ; 16-bit Pseudo-HiColor
  1171.   z = c = pixel * whitesq + (p1 / (pixel+p2)) * (whitesq==0) :
  1172.    z = z*z + c
  1173.     |z| < 4
  1174.   }
  1175.  
  1176. comment {
  1177.   These formula overlay 3 or 4 fractals.
  1178.   }
  1179.  
  1180. ptc+mjn { ; Sylvie Gallet [101324,3444], 1996
  1181.           ; 24-bit Pseudo-TrueColor
  1182.           ; Mandel: z^2 + c , Julia: z^2 + p1 , Newton: z^p2 - 1 = 0
  1183.   cr = real(scrnpix) + imag(scrnpix)
  1184.   r = cr - 3 * trunc(cr / real(3))
  1185.   z = pixel , b1 = 256 , b2 = 0.000001 , ex = p2 - 1
  1186.   c = pixel * (r==0) + p1 * (r==1) :
  1187.    zd = z^ex , zn = zd*z , n = zn - 1 , d = p2 * zd
  1188.    z = (z*z + c) * (r!=2) + (z - n/d) * (r==2)
  1189.     ((|z| <= b1) && (r!=2)) || ((|n| >= b2 ) && (r==2))
  1190.   }
  1191.  
  1192. ptc+4mandels { ; Sylvie Gallet [101324,3444], 1996
  1193.                ; 32-bit Pseudo-TrueColor
  1194.   cr = real(scrnpix) + 2*imag(scrnpix)
  1195.   r = cr - 4 * trunc(cr / 4)
  1196.   c = r == 0 , c1 = p1 * (r == 1)
  1197.   c2 = p2 * (r == 2) , c3 = p3 * (r == 3)
  1198.   z = c = pixel * (c + c1 + c2 + c3) :
  1199.    z = z * z + c
  1200.     |z| <= 4
  1201.   }
  1202.  
  1203. {--- CHRIS GREEN ---------------------------------------------------------}
  1204.  
  1205. comment {
  1206.   These fractals all use Newton's or Halley's formula for approximation of
  1207.   a function.  In all of these fractals, p1 real is the "relaxation
  1208.   coefficient". A value of 1 gives the conventional newton or halley
  1209.   iteration. Values <1 will generally produce less chaos than values >1.
  1210.   1-1.5 is probably a good range to try.  P1 imag is the imaginary
  1211.   component of the relaxation coefficient, and should be zero but maybe a
  1212.   small non-zero value will produce something interesting.  Who knows?
  1213.   For more information on Halley maps, see "Computers, Pattern, Chaos, and
  1214.   Beauty" by Pickover.
  1215.   }
  1216.  
  1217. Halley (XYAXIS) {; Chris Green. Halley's formula applied to x^7-x=0.
  1218.   ; P1 real usually 1 to 1.5, P1 imag usually zero. Use floating point.
  1219.   ; Setting P1 to 1 creates the picture on page 277 of Pickover's book
  1220.   z=pixel:
  1221.    z5=z*z*z*z*z
  1222.    z6=z*z5
  1223.    z7=z*z6
  1224.    z=z-p1*((z7-z)/ ((7.0*z6-1)-(42.0*z5)*(z7-z)/(14.0*z6-2)))
  1225.     0.0001 <= |z7-z|
  1226.   }
  1227.  
  1228. CGhalley (XYAXIS) {; Chris Green -- Halley's formula
  1229.   ; P1 real usually 1 to 1.5, P1 imag usually zero. Use floating point.
  1230.   z=(1,1):
  1231.    z5=z*z*z*z*z
  1232.    z6=z*z5
  1233.    z7=z*z6
  1234.    z=z-p1*((z7-z-pixel)/ ((7.0*z6-1)-(42.0*z5)*(z7-z-pixel)/(14.0*z6-2)))
  1235.     0.0001 <= |z7-z-pixel|
  1236.   }
  1237.  
  1238. halleySin (XYAXIS) {; Chris Green. Halley's formula applied to sin(x)=0.
  1239.   ; Use floating point.
  1240.   ; P1 real = 0.1 will create the picture from page 281 of Pickover's book.
  1241.   z=pixel:
  1242.    s=sin(z), c=cos(z)
  1243.    z=z-p1*(s/(c-(s*s)/(c+c)))
  1244.     0.0001 <= |s|
  1245.   }
  1246.  
  1247. NewtonSinExp (XAXIS) {; Chris Green
  1248.   ; Newton's formula applied to sin(x)+exp(x)-1=0.
  1249.   ; Use floating point.
  1250.   z=pixel:
  1251.    z1=exp(z)
  1252.    z2=sin(z)+z1-1
  1253.    z=z-p1*z2/(cos(z)+z1)
  1254.     .0001 < |z2|
  1255.   }
  1256.  
  1257. CGNewtonSinExp (XAXIS) {
  1258.   z=pixel:
  1259.    z1=exp(z)
  1260.    z2=sin(z)+z1-z
  1261.    z=z-p1*z2/(cos(z)+z1)
  1262.     .0001 < |z2|
  1263.   }
  1264.  
  1265. CGNewton3 {; Chris Green -- A variation on newton iteration.
  1266.   ; The initial guess is fixed at (1,1), but the equation solved
  1267.   ; is different at each pixel ( x^3-pixel=0 is solved).
  1268.   ; Use floating point.
  1269.   ; Try P1=1.8.
  1270.   z=(1,1):
  1271.    z2=z*z
  1272.    z3=z*z2
  1273.    z=z-p1*(z3-pixel)/(3.0*z2)
  1274.     0.0001 < |z3-pixel|
  1275.   }
  1276.  
  1277. HyperMandel {; Chris Green.
  1278.   ; A four dimensional version of the mandelbrot set.
  1279.   ; Use P1 to select which two-dimensional plane of the
  1280.   ; four dimensional set you wish to examine.
  1281.   ; Use floating point.
  1282.   a=(0,0),b=(0,0):
  1283.    z=z+1
  1284.    anew=sqr(a)-sqr(b)+pixel
  1285.    b=2.0*a*b+p1
  1286.    a=anew
  1287.     |a|+|b| <= 4
  1288.   }
  1289.  
  1290. OldHalleySin (XYAXIS) {
  1291.   z=pixel:
  1292.    s=sin(z)
  1293.    c=cosxx(z)
  1294.    z=z-p1*(s/(c-(s*s)/(c+c)))
  1295.     0.0001 <= |s|
  1296.   }
  1297.  
  1298. {--- RICHARD HUGHES ------------------------------------------------------}
  1299.  
  1300. phoenix_m { ; Mandelbrot style map of the Phoenix curves
  1301.   z=x=y=nx=ny=x1=y1=x2=y2=0:
  1302.    x2 = sqr(x), y2 = sqr(y)
  1303.    x1 = x2 - y2 + real(pixel) + imag(pixel) * nx
  1304.    y1 = 2 * x * y + imag(pixel) * ny
  1305.    nx=x, ny=y, x=x1, y=y1, z=x + flip(y)
  1306.     |z| <= 4
  1307.   }
  1308.  
  1309. {--- GORDON LAMB ---------------------------------------------------------}
  1310.  
  1311. SJMAND01 {;Mandelbrot
  1312.   z=real(pixel)+flip(imag(pixel)*p1)
  1313.   c=p2+p1*real(pixel)+flip(imag(pixel)):
  1314.    z=z*z+c
  1315.     |z|<=64
  1316.   }
  1317.  
  1318. 3RDIM01 {;Mandelbrot
  1319.   z=p1*real(pixel)+flip(imag(pixel))
  1320.   c=p2+real(pixel)+flip(imag(pixel)*p1):
  1321.    z=z*z+c
  1322.     |z|<=64
  1323.   }
  1324.  
  1325. SJMAND03 {;Mandelbrot function
  1326.   z=real(pixel)+p1*(flip(imag(pixel)))
  1327.   c=p2+p1*real(pixel)+flip(imag(pixel)):
  1328.    z=fn1(z)+c
  1329.     |z|<=64
  1330.   }
  1331.  
  1332. SJMAND05 {;Mandelbrot lambda function
  1333.   z=real(pixel)+flip(imag(pixel)*p1)
  1334.   c=p2+p1*real(pixel)+flip(imag(pixel)):
  1335.    z=fn1(z)*c
  1336.     |z|<=64
  1337.   }
  1338.  
  1339. 3RDIM05 {;Mandelbrot lambda function
  1340.   z=p1*real(pixel)+flip(imag(pixel))
  1341.   c=p2+real(pixel)+flip(imag(pixel)*p1):
  1342.    z=fn1(z)*c
  1343.     |z|<=64
  1344.   }
  1345.  
  1346. SJMAND10 {;Mandelbrot power function
  1347.   z=real(pixel),c=p2+flip(imag(pixel)):
  1348.    z=(fn1(z)+c)^p1
  1349.     |z|<=4
  1350.   }
  1351.  
  1352. SJMAND11 {;Mandelbrot lambda function - lower bailout
  1353.   z=real(pixel)+flip(imag(pixel)*p1)
  1354.   c=p2+p1*real(pixel)+flip(imag(pixel)):
  1355.    z=fn1(z)*c
  1356.     |z|<=4
  1357.   }
  1358.  
  1359. {--- KEVIN LEE -----------------------------------------------------------}
  1360.  
  1361. LeeMandel1(XYAXIS) {; Kevin Lee
  1362.   z=Pixel:
  1363. ;; c=sqr(pixel)/z, c=z+c, z=sqr(z),  this line was an error in v16
  1364.    c=sqr(pixel)/z, c=z+c, z=sqr(c)
  1365.     |z|<4
  1366.   }
  1367.  
  1368. LeeMandel2(XYAXIS) {; Kevin Lee
  1369.   z=Pixel:
  1370.    c=sqr(pixel)/z, c=z+c, z=sqr(c*pixel)
  1371.     |z|<4
  1372.    }
  1373.  
  1374. LeeMandel3(XAXIS) {; Kevin Lee
  1375.   z=Pixel, c=Pixel-sqr(z):
  1376.    c=Pixel+c/z, z=c-z*pixel
  1377.     |z|<4
  1378.   }
  1379.  
  1380. {--- RON LEWEN -----------------------------------------------------------}
  1381.  
  1382. RCL_Cross1 { ; Ron Lewen
  1383.   ; Try p1=(0,1), fn1=sin and fn2=sqr.  Set corners at
  1384.   ; -10/10/-7.5/7.5 to see a cross shape.  The larger
  1385.   ; lakes at the center of the cross have good detail
  1386.   ; to zoom in on.
  1387.   ; Use floating point.
  1388.   z=pixel:
  1389.    z=p1*fn1(fn2(z+p1))
  1390.     |z| <= 4
  1391.   }
  1392.  
  1393. RCL_Pick13 { ; Ron Lewen
  1394.   ;  Formula from Frontpiece for Appendix C
  1395.   ;  and Credits in Pickover's book.
  1396.   ;  Set p1=(3,0) to generate the Frontpiece
  1397.   ;  for Appendix C and to (2,0) for Credits
  1398.   ;  Use Floating Point
  1399.   z=.001:
  1400.    z=z^p1+(1/pixel)^p1
  1401.     |z| <= 100
  1402.   }
  1403.  
  1404. RCL_1 (XAXIS) { ; Ron Lewen
  1405.   ;  An interesting Biomorph inspired by Pickover's
  1406.   ;  Computers, Pattern, Choas and Beauty.
  1407.   ;  Use Floating Point
  1408.   z=pixel:
  1409.    z=pixel/z-z^2
  1410.     |real(z)| <= 100 || |imag(z)| <= 100
  1411.   }
  1412.  
  1413. RCL_Cosh (XAXIS) { ; Ron Lewen, 76376,2567
  1414.   ; Try corners=2.008874/-3.811126/-3.980167/3.779833/
  1415.   ; -3.811126/3.779833 to see Figure 9.7 (P. 123) in
  1416.   ; Pickover's Computers, Pattern, Chaos and Beauty.
  1417.   ; Figures 9.9 - 9.13 can be found by zooming.
  1418.   ; Use floating point
  1419.   z=0:
  1420.    z=cosh(z) + pixel
  1421.     abs(z) < 40
  1422.   }
  1423.  
  1424. Mothra (XAXIS) { ; Ron Lewen, 76376,2567
  1425.   ; Remember Mothra, the giant Japanese-eating moth?
  1426.   ; Well... here he (she?) is as a fractal!
  1427.   z=pixel:
  1428.    a=z^5 + z^3 + z + pixel
  1429.    b=z^4 + z^2 + pixel
  1430.    z=b^2/a,
  1431.     |real(z)| <= 100 || |imag(z)| <= 100
  1432.   }
  1433.  
  1434. RCL_10 { ; Ron Lewen, 76376,2567
  1435.   z=pixel:
  1436.    z=flip((z^2+pixel)/(pixel^2+z))
  1437.     |z| <= 4
  1438.   }
  1439.  
  1440. {--- JONATHAN OSUCH ------------------------------------------------------}
  1441.  
  1442. BirdOfPrey(XAXIS_NOPARM) {
  1443.   z=p1, x=1:
  1444.    (x<10)*(z=sqr(z)+pixel)
  1445.    (10<=x)*(z=cosxx(z)+pixel)
  1446.    x=x+1
  1447.     |z|<=4
  1448.   }
  1449.  
  1450. FractalFenderC(XAXIS_NOPARM) {;Spectacular!
  1451.   z=p1,x=|z|:
  1452.    (z=cosh(z)+pixel)*(1<x)+(z=z)*(x<=1)
  1453.    z=sqr(z)+pixel,x=|z|
  1454.     x<=4
  1455.   }
  1456.  
  1457. {--- LEE SKINNER ---------------------------------------------------------}
  1458.  
  1459. MTet (XAXIS) {; Mandelbrot form 1 of the Tetration formula --Lee Skinner
  1460.   z = pixel:
  1461.    z = (pixel ^ z) + pixel
  1462.     |z| <= (P1 + 3)
  1463.   }
  1464.  
  1465. AltMTet(XAXIS) {; Mandelbrot form 2 of the Tetration formula --Lee Skinner
  1466.   z = 0:
  1467.    z = (pixel ^ z) + pixel
  1468.     |z| <= (P1 + 3)
  1469.   }
  1470.  
  1471. JTet (XAXIS) {; Julia form 1 of the Tetration formula --Lee Skinner
  1472.   z = pixel:
  1473.    z = (pixel ^ z) + P1
  1474.     |z| <= (P2 + 3)
  1475.   }
  1476.  
  1477. AltJTet (XAXIS) {; Julia form 2 of the Tetration formula --Lee Skinner
  1478.   z = P1:
  1479.    z = (pixel ^ z) + P1
  1480.     |z| <= (P2 + 3)
  1481.   }
  1482.  
  1483. Cubic (XYAXIS) {; Lee Skinner
  1484.   p = pixel, test = p1 + 3
  1485.   t3 = 3*p, t2 = p*p
  1486.   a = (t2 + 1)/t3, b = 2*a*a*a + (t2 - 2)/t3
  1487.   aa3 = a*a*3, z = 0 - a :
  1488.    z = z*z*z - aa3*z + b
  1489.     |z| < test
  1490.  }
  1491.  
  1492. Fzppfnre {; Lee Skinner
  1493.   z = pixel, f = 1./(pixel):
  1494.    z = fn1(z) + f
  1495.     |z| <= 50
  1496.   }
  1497.  
  1498. Fzppfnpo {; Lee Skinner
  1499.   z = pixel, f = (pixel)^(pixel):
  1500.    z = fn1(z) + f
  1501.     |z| <= 50
  1502.   }
  1503.  
  1504. Fzppfnsr {; Lee Skinner
  1505.   z = pixel, f = (pixel)^.5:
  1506.    z = fn1(z) + f
  1507.     |z| <= 50
  1508.   }
  1509.  
  1510. Fzppfnta {; Lee Skinner
  1511.   z = pixel, f = tan(pixel):
  1512.    z = fn1(z) + f
  1513.     |z|<= 50
  1514.   }
  1515.  
  1516. Fzppfnct {; Lee Skinner
  1517.   z = pixel, f = cos(pixel)/sin(pixel):
  1518.    z = fn1(z) + f
  1519.     |z|<= 50
  1520.   }
  1521.  
  1522. Fzppfnse {; Lee Skinner
  1523.   z = pixel, f = 1./sin(pixel):
  1524.    z = fn1(z) + f
  1525.     |z| <= 50
  1526.   }
  1527.  
  1528. Fzppfncs {; Lee Skinner
  1529.   z = pixel, f = 1./cos(pixel):
  1530.    z = fn1(z) + f
  1531.     |z| <= 50
  1532.   }
  1533.  
  1534. Fzppfnth {; Lee Skinner
  1535.   z = pixel, f = tanh(pixel):
  1536.    z = fn1(z)+f
  1537.     |z|<= 50
  1538.   }
  1539.  
  1540. Fzppfnht {; Lee Skinner
  1541.   z = pixel, f = cosh(pixel)/sinh(pixel):
  1542.    z = fn1(z)+f
  1543.     |z|<= 50
  1544.   }
  1545.  
  1546. Fzpfnseh {; Lee Skinner
  1547.   z = pixel, f = 1./sinh(pixel):
  1548.    z = fn1(z) + f
  1549.     |z| <= 50
  1550.   }
  1551.  
  1552. Fzpfncoh {; Lee Skinner
  1553.   z = pixel, f = 1./cosh(pixel):
  1554.    z = fn1(z) + f
  1555.     |z| <= 50
  1556.   }
  1557.  
  1558. Zexpe (XAXIS) {
  1559.   s = exp(1.,0.), z = Pixel:
  1560.    z = z ^ s + pixel
  1561.     |z| <= 100
  1562.   }
  1563.  
  1564. comment {
  1565.   s = log(-1.,0.) / (0.,1.)   is   (3.14159265358979, 0.0)
  1566.   }
  1567.  
  1568. Exipi (XAXIS) {
  1569.   s = log(-1.,0.) / (0.,1.), z = Pixel:
  1570.    z = z ^ s + pixel
  1571.     |z| <= 100
  1572.   }
  1573.  
  1574. Fzppchco {
  1575.   z = pixel, f = cosxx (pixel):
  1576.    z = cosh (z) + f
  1577.     |z| <= 50
  1578.   }
  1579.  
  1580. Fzppcosq {
  1581.   z = pixel, f = sqr (pixel):
  1582.    z = cosxx (z)  + f
  1583.     |z| <= 50
  1584.   }
  1585.  
  1586. Fzppcosr {
  1587.   z = pixel, f = (pixel) ^ 0.5:
  1588.    z = cosxx (z)  + f
  1589.     |z| <= 50
  1590.   }
  1591.  
  1592. Leeze (XAXIS) {
  1593.   s = exp(1.,0.), z = Pixel, f = Pixel ^ s:
  1594.    z = cosxx (z) + f
  1595.     |z| <= 50
  1596.   }
  1597.  
  1598. OldManowar (XAXIS) {
  1599.   z0 = 0
  1600.   z1 = 0
  1601.   test = p1 + 3
  1602.   c = pixel :
  1603.    z = z1*z1 + z0 + c
  1604.    z0 = z1
  1605.    z1 = z
  1606.     |z| < test
  1607.   }
  1608.  
  1609. ScSkLMS(XAXIS) {
  1610.   z = pixel, TEST = (p1+3):
  1611.    z = log(z) - sin(z)
  1612.     |z|<TEST
  1613.   }
  1614.  
  1615. ScSkZCZZ(XYAXIS) {
  1616.   z = pixel, TEST = (p1+3):
  1617.    z = (z*cosxx(z)) - z
  1618.     |z|<TEST
  1619.   }
  1620.  
  1621. TSinh (XAXIS) {; Tetrated Hyperbolic Sine - Improper Bailout
  1622.   z = c = sinh(pixel):
  1623.    z = c ^ z
  1624.     z <= (p1 + 3)
  1625.   }
  1626.  
  1627. {--- TERREN SUYDAM -------------------------------------------------------}
  1628.  
  1629. comment {
  1630.   These formulas are designed to create tilings based on the Mandel or Julia
  1631.   formulas that can be used as HTML page or Windows backgrounds.
  1632.   Zoom in on a favorite spot on Mandel or Julia. Write down the center and
  1633.   magnification for that particular view. If it's a Julia, write down
  1634.   the real & imag. parameter as well.
  1635.   The numbers you write down will be parameters to the fractal type
  1636.   TileMandel or TileJulia.
  1637.   - For both, paramter p1 is the center of the image you want to tile.
  1638.   - The real part of p2 is the magnification (the default is 1/3).
  1639.   - The imag. part is the number of tiles you want to be drawn (the default
  1640.     is 3).
  1641.   - For TileJulia, p3 is the Julia parameter.
  1642.      These formulas need 'periodicity=0'.
  1643.   }
  1644.  
  1645. TileMandel { ; Terren Suydam (terren@io.com), 1996
  1646.              ; modified by Sylvie Gallet [101324,3444]
  1647.   ; p1 = center = coordinates for a good Mandel
  1648.   ; 0 <= real(p2) = magnification. Default for magnification is 1/3
  1649.   ; 0 <= imag(p2) = numtiles. Default for numtiles is 3
  1650.   center = p1 , mag = real(p2)*(p2>0) + (p2<=0)/3
  1651.   numtiles = imag(p2)*(flip(p2)>0) + 3*(flip(p2)<=0)
  1652.   omega = numtiles*2*pi/3
  1653.   x = asin(sin(omega*real(pixel))) , y = asin(sin(omega*imag(pixel)))
  1654.   z = c = (x+flip(y)) / mag + center :
  1655.    z = z*z + c
  1656.     |z| <= 4
  1657.   }
  1658.  
  1659. TileJulia { ; Terren Suydam (terren@io.com), 1996
  1660.             ; modified by Sylvie Gallet [101324,3444]
  1661.   ; p1 = center = coordinates for a good Julia
  1662.   ; 0 <= real(p2) = magnification. Default for magnification is 1/3
  1663.   ; 0 <= imag(p2) = numtiles. Default for numtiles is 3
  1664.   ; p3 is the Julia set parameter
  1665.   center = p1 , mag = real(p2)*(p2>0) + (p2<=0)/3
  1666.   numtiles = imag(p2)*(flip(p2)>0) + 3*(flip(p2)<=0)
  1667.   omega = numtiles*2*pi/3
  1668.   x = asin(sin(omega*real(pixel))) , y = asin(sin(omega*imag(pixel)))
  1669.   z = (x+flip(y)) / mag + center :
  1670.    z = z*z + p3
  1671.     |z| <= 4
  1672.   }
  1673.  
  1674. {--- SCOTT TAYLOR --------------------------------------------------------}
  1675.  
  1676. comment {
  1677.   The following is from Scott Taylor.
  1678.   Scott says they're "Dog" because the first one he looked at reminded him
  1679.   of a hot dog. This was originally several fractals, we have generalized it.
  1680.   }
  1681.  
  1682. FnDog(XYAXIS) {; Scott Taylor
  1683.   z = Pixel, b = p1+2:
  1684.    z = fn1( z ) * pixel
  1685.     |z| <= b
  1686.   }
  1687.  
  1688. Ent {; Scott Taylor
  1689.   ; Try params=.5/.75 and the first function as exp.
  1690.   ; Zoom in on the swirls around the middle.  There's a
  1691.   ; symmetrical area surrounded by an asymmetric area.
  1692.   z = Pixel, y = fn1(z), base = log(p1):
  1693.    z = y * log(z)/base
  1694.     |z| <= 4
  1695.   }
  1696.  
  1697. Ent2 {; Scott Taylor
  1698.   ; try params=2/1, functions=cos/cosh, potential=255/355
  1699.   z = Pixel, y = fn1(z), base = log(p1):
  1700.    z = fn2( y * log(z) / base )
  1701.     |z| <= 4
  1702.   }
  1703.  
  1704. {--- MICHAEL THEROUX & RON BARNETT ---------------------------------------}
  1705.  
  1706. test3 {; Michael Theroux [71673,2767]
  1707.   ;fix and generalization by Ron Barnett [70153,1233]
  1708.   ;=phi
  1709.   ;try p1 = 2.236067977 for the golden mean
  1710.   z = ((p1 + 1)/2)/pixel:
  1711.    z =  z*z + pixel*((p1 + 1)/2)/((p1 - 1)/2)
  1712.     |z| <= 4
  1713.   }
  1714.  
  1715. {--- TIMOTHY WEGNER ------------------------------------------------------}
  1716.  
  1717. Newton_poly2 { ; Tim Wegner - use float=yes
  1718.   ; fractal generated by Newton formula z^3 + (c-1)z - c
  1719.   ; p1 is c in above formula
  1720.   z = pixel, z2 = z*z, z3 = z*z2:
  1721.    z = (2*z3 + p1) / (3*z2 + (p1 - 1))
  1722.    z2 = z*z
  1723.    z3 = z*z2
  1724.    .004 <= |z3 + (p1-1)*z - p1|
  1725.   }
  1726.  
  1727. Newt_ellipt_oops { ; Tim Wegner - use float=yes and periodicity=0
  1728.   ; fractal generated by Newton formula  (z^3 + c*z^2 +1)^.5
  1729.   ; try p1 = 1 and p2 = .1
  1730.   ; if p2 is small (say .001), converges very slowly so need large maxit
  1731.   ; another "tim's error" - mistook sqr for sqrt (see next)
  1732.   z = pixel, z2 = z*z, z3 = z*z2:
  1733.    num = (z3 + p1*z2 + 1)^.5      ; f(z)
  1734.    denom = (1.5*z2 + p1*z)/num    ; f'(z)
  1735.    z = z - (num/denom)            ; z - f(z)/f'(z)
  1736.    z2 = z*z
  1737.    z3 = z*z2
  1738.     p2 <= |z3 + p1*z2 + 1|  ; no need for sqrt because sqrt(z)==0 iff z==0
  1739.   }
  1740.  
  1741. Newton_elliptic { ; Tim Wegner - use float=yes and periodicity=0
  1742.   ; fractal generated by Newton formula f(z) = (z^3 + c*z^2 +1)^2
  1743.   ; try p1 = 1 and p2 = .0001
  1744.   z = pixel, z2 = z*z, z3 = z*z2:
  1745.    z = z - (z3 + p1*z2 + 1)/(6*z2 + 4*p1*z)      ; z - f(z)/f'(z)
  1746.    z2 = z*z
  1747.    z3 = z*z2
  1748.     p2 <= |z3 + p1*z2 + 1|  ; no need for sqr because sqr(z)==0 iff z==0
  1749.   }
  1750.  
  1751. {--- TIM WEGNER & MARK PETERSON ------------------------------------------}
  1752.  
  1753. comment {
  1754.   These are a few of the examples from the book, Fractal Creations, by Tim
  1755.   Wegner and Mark Peterson.
  1756.   }
  1757.  
  1758. MyFractal {; Fractal Creations example
  1759.   c = z = 1/pixel:
  1760.    z = sqr(z) + c
  1761.     |z| <= 4
  1762.   }
  1763.  
  1764. Bogus1 {; Fractal Creations example
  1765.   z = 0; z = z + * 2
  1766.    |z| <= 4
  1767.   }
  1768.  
  1769. MandelTangent {; Fractal Creations example (revised for v.16)
  1770.   z = pixel:
  1771.    z = pixel * tan(z)
  1772.     |real(z)| < 32
  1773.   }
  1774.  
  1775. Mandel3 {; Fractal Creations example
  1776.   z = pixel, c = sin(z):
  1777.    z = (z*z) + c
  1778.    z = z * 1/c
  1779.     |z| <= 4
  1780.   }
  1781.  
  1782. {--- AUTHORS UNKNOWN -----------------------------------------------------}
  1783.  
  1784. moc {
  1785.   z=0, c=pixel:
  1786.    z=sqr(z)+c
  1787.    c=c+p1/c
  1788.     |z| <= 4
  1789.   }
  1790.  
  1791. Bali {;The difference of two squares
  1792.   z=x=1/pixel, c= fn1 (z):
  1793.    z = (x+c) * (x-c)
  1794.    x=fn2(z)
  1795.     |z| <=3
  1796.   }
  1797.  
  1798. Fatso {;
  1799.   z=x=1/pixel, c= fn1 (z):
  1800.    z = (x^3)-(c^3)
  1801.    x=fn2(z)
  1802.     |z| <=3
  1803.   }
  1804.  
  1805. Bjax {;
  1806.   z=c=2/pixel:
  1807.    z =(1/((z^(real(p1)))*(c^(real(p2))))*c) + c
  1808.   }
  1809.  
  1810. ULI_4 {
  1811.   z = Pixel:
  1812.    z = fn1(1/(z+p1))*fn2(z+p1)
  1813.     |z| <= p2
  1814.   }
  1815.  
  1816. ULI_5 {
  1817.   z = Pixel, c = fn1(pixel):
  1818.    z = fn2(1/(z+c))*fn3(z+c)
  1819.     |z| <= p1
  1820.   }
  1821.  
  1822. ULI_6 {
  1823.   z = Pixel:
  1824.    z = fn1(p1+z)*fn2(p2-z)
  1825.     |z| <= p2+16
  1826.   }
  1827.