comment { This iteration of FRACTINT.FRM was first released with Fractint 19.0 The formulas at the beginning of this file are from Mark Peterson, who built this fractal interpreter feature. The rest are grouped by contributor. Formulas by unidentified authors are grouped at the end. If you would like to contribute formulas for future versions of this file, please contact one of the authors listed in FRACTINT.DOC. All contributions are assumed to belong to the public domain. There are several hard-coded restrictions in the formula interpreter: 1) The fractal name through the open curly bracket must be on a single line. 2) There is a hard-coded limit of 2000 formulas per formula file, only because of restrictions in the prompting routines. 3) Formulas can contain at most 250 operations (references to variables and arithmetic); this is bigger than it sounds. 4) Comment blocks can be set up using dummy formulas with no formula name or with the special name "comment". Note that the builtin "cos" function had a bug which was corrected in version 16. To recreate an image from a formula which used cos before v16, change "cos" in the formula to "cosxx" which is a new function provided for backward compatibility with that bug. } {--- MARK PETERSON -------------------------------------------------------} Mandelbrot(XAXIS) {; Mark Peterson ; Classical fractal showing LastSqr speedup z = Pixel, z = Sqr(z): ; Start with z**2 to initialize LastSqr z = z + Pixel z = Sqr(z) LastSqr <= 4 ; Use LastSqr instead of recalculating } Dragon (ORIGIN) {; Mark Peterson z = Pixel: z = sqr(z) + (-0.74543, 0.2) |z| <= 4 } Daisy (ORIGIN) {; Mark Peterson z = pixel: z = z*z + (0.11031, -0.67037) |z| <= 4 } InvMandel (XAXIS) {; Mark Peterson c = z = 1 / pixel: z = sqr(z) + c |z| <= 4 } DeltaLog(XAXIS) {; Mark Peterson z = pixel, c = log(pixel): z = sqr(z) + c |z| <= 4 } Newton4(XYAXIS) {; Mark Peterson ; Note that floating-point is required to make this compute accurately z = pixel, Root = 1: z3 = z*z*z z4 = z3 * z z = (3 * z4 + Root) / (4 * z3) .004 <= |z4 - Root| } {--- DON ARCHER ----------------------------------------------------------} DAFRM01 {; Don Archer, 1993 z = pixel : z = z ^ (z - 1) * (fn1(z) + pixel) |z| <= 4 } DAFRM07 { z = pixel, c = p1 : z = z ^ (z - 1) * fn1(z) + pixel |z| <= 4 } DAFRM09 { z = pixel, c = z + z^ (z - 1): tmp = fn1(z) real(tmp) = real(tmp) * real(c) - imag(tmp) * imag(c) imag(tmp) = real(tmp) * imag(c) - imag(tmp) * real(c) z = tmp + pixel + 12 |z| <= 4 } dafrm21 { z = pixel: x = real(z), y = imag(z) x1 = -fn1((x*x*x + y*y*y - 1) - 6*x)*x/(2*x*x*x + y*y*y - 1) y1 = -fn2((x*x*x + y*y*y - 1) + 6*x)*y/(2*x*x*x + y*y*y - 1) x2 = x1*x1*x1 - y1*y1*y1 + p1 + 5 y2 = 4*x*y - 18 z = x2 + flip(y2) |z| <= 100 } 3daMand01 {; Mandelbrot/Zexpe via Lee Skinner ; based on 4dFRACT.FRM by Gordon Lamb (CIS: 100272,3541) z=real(pixel)+flip(imag(pixel)*p1) c=p2+p1*real(pixel)+flip(imag(pixel)): z=z^2.71828182845905 + c |z|<=100 } 3daMand02 {; Mandelbrot/Xexpe/Feigenbaum's alpha constant=exponent ; based on 4dFRACT.FRM by Gordon Lamb (CIS: 100272,3541) z=real(pixel)+flip(imag(pixel)*p1) c=p2+p1*real(pixel)+flip(imag(pixel)): z=z^2.502907875095 + c |z|<=100 } {--- RON BARNETT ---------------------------------------------------------} Julike { ; Ron Barnett, 1993 ; a Julia function based upon the Ikenaga function z = Pixel: z = z*z*z + (P1-1)*z - P1 |z| <= 4 } Mask { ; Ron Barnett, 1993 ; try fn1 = log, fn2 = sinh, fn3 = cosh ;P1 = (0,1), P2 = (0,1) ;Use floating point z = fn1(pixel): z = P1*fn2(z)^2 + P2*fn3(z)^2 + pixel |z| <= 4 } JMask { ; Ron Barnett, 1993 z = fn1(pixel): z = P1*fn2(z)^2 + P2 |z| <= 4 } PseudoZeePi {; Ron Barnett, 1993 z = pixel: x = 1-z^p1; z = z*((1-x)/(1+x))^(1/p1) + p2 |z| <= 4 } ZeePi { ; Ron Barnett, 1993 ; This Julia function is based upon Ramanujan's iterative ; function for calculating pi z = pixel: x = (1-z^p1)^(1/p1) z = z*(1-x)/(1+x) + p2 |z| <= 4 } IkeNewtMand {; Ron Barnett, 1993 z = c = pixel: zf = z*z*z + (c-1)*z - c zd = 3*z*z + c-1 z = z - p1*zf/zd 0.001 <= |zf| } Frame-RbtM(XAXIS) {; Ron Barnett, 1993 ; from Mazes for the Mind by Pickover z = c = pixel: z = z*z*z/5 + z*z + c |z| <= 100 } FrRbtGenM {; Ron Barnett, 1993 z = pixel: z = p1*z*z*z + z*z + pixel |z| <= 100 } FlipLambdaJ { ; Ron Barnett, 1993 z = pixel: z = p1*z*(1-flip(z)*flip(z)) |z| <= 100 } REBRefInd2 { ; Ron Barnett, 1993 ; Use floating point z = pixel: z = (z*z-1)/(z*z+2)*fn1(z)*fn2(z) + p1 |z| <= 100 } GopalsamyFn { z = pixel: x = real(z), y = imag(z) x1 = fn1(x)*fn2(y) y1 = fn3(x)*fn4(y) x2 = -2*x1*y1 + p1 y = y1*y1 - x1*x1 z = x2 + flip(y) |z| <= 100 } REB004A {; Ron Barnett, 1993 z = pixel: z =p1*fn1(z) + p1*p1*fn2(p2*z) + pixel |z| <= 100 } REB004K {; Ron Barnett, 1993 ; floating point required z = pixel: x = flip(pixel + fn1(3/z - z/4)) z = x*z + p1 |z| <= 100 } REB004L {; Ron Barnett, 1993 ; floating point required z = pixel: x = flip(pixel + fn1(p1/z - z/(p2+1))) z = x*z + pixel |z| <= 100 } REB004M {; Ron Barnett, 1993 ; floating point required z = pixel: x = real(z), y = imag(z) const = x*x + y*y x1 = -fn1(const - 12*x)*x/(4*const) y1 = -fn2(const + 12*x)*y/(4*const) x2 = x1*x1 - y1*y1 + p1 y2 = 2*x*y z = x2 + flip(y2) |z| <= 100 } REB005A {; Ron Barnett, 1993 ; floating point required z = pixel: x = real(z), y = imag(z) const = x*x + y*y x1 = -fn1(const - 12*x)*x/(4*const) y1 = -fn2(const + 12*y)*y/(4*const) x2 = x1*x1 - y1*y1 + p1 y2 = 2*x1*y1 z = x2 + flip(y2) |z| <= 100 } REB005E {; Ron Barnett, 1993 ; floating point required z = pixel: x = real(z), y = imag(z) const = x*x + y*y x1 = -fn1((const - x)*x/const) y1 = -fn2((const + y)*y/const) x2 = x1*x1 - y1*y1 + p1 y2 = 2*x1*y1 z = x2 + flip(y2) |z| <= 100 } REB005F {; Ron Barnett, 1993 ; floating point required z = pixel: x = real(z), y = imag(z) const = x*x + y*y x1 = -fn1((const - 12*x)*x/(4*const)) y1 = -fn2((const + 12*y)*y/(4*const)) x2 = x1*x1 - y1*y1 + p1 y2 = 2*x1*y1 z = x2 + flip(y2) |z| <= 100 } REB005G {; Ron Barnett, 1993 ; floating point required z = pixel: x = real(z), y = imag(z) const = x*x + y*y x1 = -fn1(const + p1*x)*y/const y1 = -fn2(const + y)*x/const x2 = x1*x1 - y1*y1 + p2 y2 = 2*x1*y1 z = x2 + flip(y2) |z| <= 100 } {--- BRADLEY BEACHAM -----------------------------------------------------} OK-01 { ;TRY P1 REAL = 10000, FN1 = SQR z = 0, c = pixel: z = (c^z) + c z = fn1(z) |z| <= (5 + p1) } OK-04 { ;TRY FN2 = SQR, DIFFERENT FUNCTIONS FOR FN1 z = 0, c = fn1(pixel): z = fn2(z) + c |z| <= (5 + p1) } OK-08 { z = pixel, c = fn1(pixel): z = z^z / fn2(z) z = c / z |z| <= (5 + p1) } OK-21 { z = pixel, c = fn1(pixel): z = fn2(z) + c fn3(z) <= p1 } OK-22 { z = v = pixel: v = fn1(v) * fn2(z) z = fn1(z) / fn2(v) |z| <= (5 + p1) } OK-32 { z = y = x = pixel, k = 1 + p1: a = fn1(z) b = (a <= y) * ((a * k) + y) e = (a > y) * ((a * k) + x) x = y y = z z = b + e |z| <= (5 + p2) } OK-34 { z = pixel, c = (fn1(pixel) * p1): x = abs(real(z)) y = abs(imag(z)) a = (x <= y) * (fn2(z) + y + c) b = (x > y) * (fn2(z) + x + c) z = a + b |z| <= (10 + p2) } OK-35 { z = pixel, k = 1 + p1: v = fn1(z) x = (z*v) y = (z/v) a = (|x| <= |y|) * ((z + y) * k) b = (|x| > |y|) * ((z + x) * k) z = fn2((a + b) * v) + v |z| <= (10 + p2) } OK-36 { ; DISSECTED MANDELBROT ; TO GENERATE "STANDARD" MANDELBROT, SET P1 = 0,0 & ALL FN = IDENT z = pixel, cx = fn1(real(z)), cy = fn2(imag(z)), k = 2 + p1: zx = real(z), zy = imag(z) x = fn3(zx*zx - zy*zy) + cx y = fn4(k * zx * zy) + cy z = x + flip(y) |z| < (10 + p2) } OK-38 { ; DISSECTED CUBIC MANDELBROT ; TO GENERATE "STANDARD" CUBIC MANDELBROT, SET P1 = 0,0 & ALL FN = IDENT z = pixel, cx = fn1(real(pixel)), cy = fn2(imag(pixel)), k = 3 + p1: zx = real(z), zy = imag(z) x = fn3(zx*zx*zx - k*zx*zy*zy) + cx y = fn4(k*zx*zx*zy - zy*zy*zy) + cy z = x + flip(y) |z| < (4 + p2) } OK-42 { ; MUTATION OF FN + FN z = pixel, p1x = real(p1)+1, p1y = imag(p1)+1 p2x = real(p2)+1, p2y = imag(p2)+1: zx = real(z), zy = imag(z) x = fn1(zx*p1x - zy*p1y) + fn2(zx*p2x - zy*p2y) y = fn3(zx*p1y + zy*p1x) + fn4(zx*p2y + zy*p2x) z = x + flip(y) |z| <= 20 } OK-43 { ; DISSECTED SPIDER ; TO GENERATE "STANDARD" SPIDER, SET P1 = 0,0 & ALL FN = IDENT z = c = pixel, k = 2 + p1: zx = real(z), zy = imag(z) cx = real(c), cy = imag(c) x = fn1(zx*zx - zy*zy) + cx y = fn2(k*zx*zy) + cy z = x + flip(y) c = fn3((cx + flip(cy))/k) + z |z| < (10 + p2) } Larry { ; Mutation of 'Michaelbrot' and 'Element' ; Original formulas by Michael Theroux [71673,2767] ; For 'Michaelbrot', set FN1 & FN2 =IDENT and P1 & P2 = default ; For 'Element', set FN1=IDENT & FN2=SQR and P1 & P2 = default ; p1 = Parameter (default 0.5,0), real(p2) = Bailout (default 4) z = pixel ; The next line sets c=default if p1=0, else c=p1 c = ((0.5,0) * (|p1|<=0) + p1) ; The next line sets test=4 if real(p2)<=0, else test=real(p2) test = (4 * (real(p2)<=0) + real(p2) * (0=|0.01| } F'M-SetInNewtonA(XAXIS) {; use float=yes ; jon horner 100112,1700, 12 feb 93 z = 0, c = fn1(pixel), cminusone = c-1: oldz = z, nm = p1*c-2*z*cminusone, dn = p1*(3*z*z+cminusone) z = nm/dn+2*z/p1 |(z-oldz)|>=|0.01| } F'M-SetInNewtonC(XAXIS) { ; same as F'M-SetInNewtonB except for bailout ; use float=yes, periodicity=no ; (3 <= p1 <= ?) and (1e-30 < p2 < .01) z=0, c=fn1(pixel), cm1=c-1, cm1x2=cm1*2, twoop1=2/p1, p1xc=c*real(p1): z = (p1xc - z*cm1x2 )/( (sqr(z)*3 + cm1 ) * real(p1) ) + z*real(twoop1) abs(|z| - real(lastsqr) ) >= p2 } {--- CHRIS GREEN ---------------------------------------------------------} comment { These fractals all use Newton's or Halley's formula for approximation of a function. In all of these fractals, p1 real is the "relaxation coefficient". A value of 1 gives the conventional newton or halley iteration. Values <1 will generally produce less chaos than values >1. 1-1.5 is probably a good range to try. P1 imag is the imaginary component of the relaxation coefficient, and should be zero but maybe a small non-zero value will produce something interesting. Who knows? For more information on Halley maps, see "Computers, Pattern, Chaos, and Beauty" by Pickover. } Halley (XYAXIS) {; Chris Green. Halley's formula applied to x^7-x=0. ; P1 real usually 1 to 1.5, P1 imag usually zero. Use floating point. ; Setting P1 to 1 creates the picture on page 277 of Pickover's book z=pixel: z5=z*z*z*z*z z6=z*z5 z7=z*z6 z=z-p1*((z7-z)/ ((7.0*z6-1)-(42.0*z5)*(z7-z)/(14.0*z6-2))) 0.0001 <= |z7-z| } CGhalley (XYAXIS) {; Chris Green -- Halley's formula ; P1 real usually 1 to 1.5, P1 imag usually zero. Use floating point. z=(1,1): z5=z*z*z*z*z z6=z*z5 z7=z*z6 z=z-p1*((z7-z-pixel)/ ((7.0*z6-1)-(42.0*z5)*(z7-z-pixel)/(14.0*z6-2))) 0.0001 <= |z7-z-pixel| } halleySin (XYAXIS) {; Chris Green. Halley's formula applied to sin(x)=0. ; Use floating point. ; P1 real = 0.1 will create the picture from page 281 of Pickover's book. z=pixel: s=sin(z), c=cos(z) z=z-p1*(s/(c-(s*s)/(c+c))) 0.0001 <= |s| } NewtonSinExp (XAXIS) {; Chris Green ; Newton's formula applied to sin(x)+exp(x)-1=0. ; Use floating point. z=pixel: z1=exp(z) z2=sin(z)+z1-1 z=z-p1*z2/(cos(z)+z1) .0001 < |z2| } CGNewtonSinExp (XAXIS) { z=pixel: z1=exp(z) z2=sin(z)+z1-z z=z-p1*z2/(cos(z)+z1) .0001 < |z2| } CGNewton3 {; Chris Green -- A variation on newton iteration. ; The initial guess is fixed at (1,1), but the equation solved ; is different at each pixel ( x^3-pixel=0 is solved). ; Use floating point. ; Try P1=1.8. z=(1,1): z2=z*z z3=z*z2 z=z-p1*(z3-pixel)/(3.0*z2) 0.0001 < |z3-pixel| } HyperMandel {; Chris Green. ; A four dimensional version of the mandelbrot set. ; Use P1 to select which two-dimensional plane of the ; four dimensional set you wish to examine. ; Use floating point. a=(0,0),b=(0,0): z=z+1 anew=sqr(a)-sqr(b)+pixel b=2.0*a*b+p1 a=anew |a|+|b| <= 4 } OldHalleySin (XYAXIS) { z=pixel: s=sin(z) c=cosxx(z) z=z-p1*(s/(c-(s*s)/(c+c))) 0.0001 <= |s| } {--- RICHARD HUGHES ------------------------------------------------------} phoenix_m { ; Mandelbrot style map of the Phoenix curves z=x=y=nx=ny=x1=y1=x2=y2=0: x2 = sqr(x), y2 = sqr(y) x1 = x2 - y2 + real(pixel) + imag(pixel) * nx y1 = 2 * x * y + imag(pixel) * ny nx=x, ny=y, x=x1, y=y1, z=x + flip(y) |z| <= 4 } {--- GORDON LAMB ---------------------------------------------------------} SJMAND01 {;Mandelbrot z=real(pixel)+flip(imag(pixel)*p1) c=p2+p1*real(pixel)+flip(imag(pixel)): z=z*z+c |z|<=64 } 3RDIM01 {;Mandelbrot z=p1*real(pixel)+flip(imag(pixel)) c=p2+real(pixel)+flip(imag(pixel)*p1): z=z*z+c |z|<=64 } SJMAND03 {;Mandelbrot function z=real(pixel)+p1*(flip(imag(pixel))) c=p2+p1*real(pixel)+flip(imag(pixel)): z=fn1(z)+c |z|<=64 } SJMAND05 {;Mandelbrot lambda function z=real(pixel)+flip(imag(pixel)*p1) c=p2+p1*real(pixel)+flip(imag(pixel)): z=fn1(z)*c |z|<=64 } 3RDIM05 {;Mandelbrot lambda function z=p1*real(pixel)+flip(imag(pixel)) c=p2+real(pixel)+flip(imag(pixel)*p1): z=fn1(z)*c |z|<=64 } SJMAND10 {;Mandelbrot power function z=real(pixel),c=p2+flip(imag(pixel)): z=(fn1(z)+c)^p1 |z|<=4 } SJMAND11 {;Mandelbrot lambda function - lower bailout z=real(pixel)+flip(imag(pixel)*p1) c=p2+p1*real(pixel)+flip(imag(pixel)): z=fn1(z)*c |z|<=4 } {--- KEVIN LEE -----------------------------------------------------------} LeeMandel1(XYAXIS) {; Kevin Lee z=Pixel: ;; c=sqr(pixel)/z, c=z+c, z=sqr(z), this line was an error in v16 c=sqr(pixel)/z, c=z+c, z=sqr(c) |z|<4 } LeeMandel2(XYAXIS) {; Kevin Lee z=Pixel: c=sqr(pixel)/z, c=z+c, z=sqr(c*pixel) |z|<4 } LeeMandel3(XAXIS) {; Kevin Lee z=Pixel, c=Pixel-sqr(z): c=Pixel+c/z, z=c-z*pixel |z|<4 } {--- RON LEWEN -----------------------------------------------------------} RCL_Cross1 { ; Ron Lewen ; Try p1=(0,1), fn1=sin and fn2=sqr. Set corners at ; -10/10/-7.5/7.5 to see a cross shape. The larger ; lakes at the center of the cross have good detail ; to zoom in on. ; Use floating point. z=pixel: z=p1*fn1(fn2(z+p1)) |z| <= 4 } RCL_Pick13 { ; Ron Lewen ; Formula from Frontpiece for Appendix C ; and Credits in Pickover's book. ; Set p1=(3,0) to generate the Frontpiece ; for Appendix C and to (2,0) for Credits ; Use Floating Point z=.001: z=z^p1+(1/pixel)^p1 |z| <= 100 } RCL_1 (XAXIS) { ; Ron Lewen ; An interesting Biomorph inspired by Pickover's ; Computers, Pattern, Choas and Beauty. ; Use Floating Point z=pixel: z=pixel/z-z^2 |real(z)| <= 100 || |imag(z)| <= 100 } RCL_Cosh (XAXIS) { ; Ron Lewen, 76376,2567 ; Try corners=2.008874/-3.811126/-3.980167/3.779833/ ; -3.811126/3.779833 to see Figure 9.7 (P. 123) in ; Pickover's Computers, Pattern, Chaos and Beauty. ; Figures 9.9 - 9.13 can be found by zooming. ; Use floating point z=0: z=cosh(z) + pixel abs(z) < 40 } Mothra (XAXIS) { ; Ron Lewen, 76376,2567 ; Remember Mothra, the giant Japanese-eating moth? ; Well... here he (she?) is as a fractal! z=pixel: a=z^5 + z^3 + z + pixel b=z^4 + z^2 + pixel z=b^2/a, |real(z)| <= 100 || |imag(z)| <= 100 } RCL_10 { ; Ron Lewen, 76376,2567 z=pixel: z=flip((z^2+pixel)/(pixel^2+z)) |z| <= 4 } {--- JONATHAN OSUCH ------------------------------------------------------} BirdOfPrey(XAXIS_NOPARM) { z=p1, x=1: (x<10)*(z=sqr(z)+pixel) (10<=x)*(z=cosxx(z)+pixel) x=x+1 |z|<=4 } FractalFenderC(XAXIS_NOPARM) {;Spectacular! z=p1,x=|z|: (z=cosh(z)+pixel)*(1