;These formulas have been taken from Standard.ufm and ;have been modified by Michael W. Brown and Sharon S. ;Schultz. The credit for making the new functions work ;goes to Sharon herself. MandelbrotChanged+SSS { ; ; This is an experiment on the M-Set by Michael W. Brown. ; Modified by Sharon S. Schultz, June, 2004. init: z = @start loop: z = fn1(fn2(fn3(z^@power + #pixel)* @factor/(@divisor))) bailout: |z| <= @bailout default: title = "Mandelbrot Changed + SSS" method = multipass periodicity = 0 maxiter = 100 center = (-0.5, 0) helpfile = "Uf3.chm" helptopic = "Html\formulas\standard\mandelbrot.html" heading caption = "Parameters" endheading param bailout caption = "Bailout value" default = 4.0 min = 0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param start caption = "Starting Point" default = (0.0,0.0) hint = "Perturbation. Use (0,0) for the standard Mandelbrot set." endparam param divisor caption = "Divisor" default = (1.0,0.0) hint = "A parameter" endparam param factor caption = "Factor" default = 1.0 hint = "Does *something*" endparam param power caption = "Power" default = (2.0,0.0) hint = "This defines the power of the Mandelbrot set. Use (2,0) \ for the standard Mandelbrot set." endparam heading caption = "Functions" endheading func fn1 caption = "Change" default = ident() hint = "Select a function to change the formula." endfunc func fn2 caption = "Change More" default = ident() hint = "Select a function to change the formula more." endfunc func fn3 caption = "Total change" default = ident() hint = "Select a function to totally change the formula." endfunc switch: type = "JuliaChanged+SSS" seed = #pixel power = power factor = factor bailout = bailout divisor = divisor fn1 = fn1 fn2 = fn2 fn3 = fn3 } JuliaChanged+SSS { ; ; Modified Julia Set. ; Modified by Sharon S. Schultz, June, 2004. init: z = #pixel loop: z = fn1(fn2(fn3(z^@power + @seed)*@factor/(@divisor))) bailout: |z| <= @bailout default: title = "Julia Changed + SSS" method = multipass periodicity = 0 maxiter = 100 helpfile = "Uf3.chm" helptopic = "Html\formulas\standard\julia.html" heading caption = "Parameters" endheading float param bailout caption = "Bailout value" default = 4.0 min = 1.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam complex param seed caption = "Julia Seed" default = (-1.25, 0.00) hint = "Use this to create many different Julia sets. You can \ also set this value using the Switch feature." endparam complex param power caption = "Power" default = (2.0,0.0) hint = "This defines the power of the Julia set. Use (2,0) \ for the standard Julia set." endparam float param factor caption = "Factor" default = 1.0 hint = "Does *something*" endparam float param divisor caption = "Divisor" default = 1.0 hint = "A parameter" endparam heading caption = "Functions" endheading func fn1 caption = "Change" default = ident() hint = "Select a function to change the formula." endfunc func fn2 caption = "Change More" default = ident() hint = "Select a function to change the formula more." endfunc func fn3 caption = "Total change" default = ident() hint = "Select a function to totally change the formula." endfunc switch: type = "MandelbrotChanged+SSS" power = power factor = factor divisor = divisor bailout = bailout fn1 = fn1 fn2 = fn2 fn3 = fn3 } { ; Here, you can describe the fractal formula. This text ; will appear in the browsers as comments. ; For more information about fractal formulas, look up ; "writing fractal formulas" in the online help index. global: ; This section is executed once per image. This is a good ; place for initializing variables and precalculating tables. ; Variables declared here will be read-only in the rest of ; the coloring algorithm. init: ; The code in this section is executed once per pixel, before ; the iteration loop is entered. It should set up variables ; used in the loop: section. loop: ; The code in this section is repeatedly executed, until ; either the maximum iteration count has been reached (then ; the pixel being computed is considered to be inside), or ; the boolean expression in the bailout: section becomes ; false (then the pixel is considered to be outside). bailout: ; This section should contain a boolean expression, such as ; |z| < 4. When this expression becomes false, the iteration ; loop is stopped, and the pixel is considered to be outside. default: ; This section contains default settings that make the ; fractal formula and its parameters easier to use. title = "odified by Sharon S. Schultz, June, 2004." switch: ; This section is optional and can be used to specify a formula ; in the same file that forms a switch pair with this formula. ; This is the case for example with Mandelbrot and Julia sets. } Formula1J { ;Written March 2005 for UF3 by Michael W. Brown ;A modified version of the Julia Set. ;Change "Operator" to None to get the standard set. global: init: z = #pixel loop: IF(@oper==0) z = z^@power + @seed + z^@fn1(z) ELSEIF(@oper==1) z = z^@power + @seed - z^@fn1(z) ELSEIF(@oper==2) z = z^@power + @seed * z^@fn1(z) ELSEIF(@oper==3) z = z^@power + @seed / z^@fn1(z) ELSEIF(@oper==4) z = z^@power + @seed ENDIF IF(@use_inv == true) invZ = 1/z ELSE invZ = 0 ENDIF z = z + invZ bailout: |z| < @bailout default: param seed caption = "Julia Seed" default = (-1.25,0) endparam float param bailout caption = "Bailout" default = 4 min = 0 endparam func fn1 caption = "Primary Function" default = ident() endfunc param power caption = "Power" default = (2,0) endparam param oper caption = "Operator" default = 0 enum = "+""-""*""/""None (Mandelbrot)" endparam bool param use_inv caption = "Add inverse?" default = false endparam switch: type = "Formula1M" power = power bailout = bailout fn1 = fn1 use_inv = use_inv oper = oper } Formula1M { ;Written March 2005 for UF3 by Michael W. Brown ;A modified version of the Mandelbrot Set. ;Change "Operator" to None to get the standard set. global: init: ;Z Initialization testing IF(@zINIT==0) z = #pixel ELSEIF(@zINIT==1) z = @start ENDIF loop: IF(@oper==0) z = z^@power + #pixel + z^@fn1(z) ELSEIF(@oper==1) z = z^@power + #pixel - z^@fn1(z) ELSEIF(@oper==2) z = z^@power + #pixel * z^@fn1(z) ELSEIF(@oper==3) z = z^@power + #pixel / z^@fn1(z) ELSEIF(@oper==4) z = fn1(z^@power) + #pixel ENDIF IF(@use_inv == true) invZ = 1/z ELSE invZ = 0 ENDIF z = z + invZ bailout: |z| < @bailout default: param zINIT caption = "z Initialization" default = 0 enum = "#pixel""Starting Point" endparam float param bailout caption = "Bailout" default = 4 min = 0 endparam func fn1 caption = "Primary Function" default = ident() endfunc param power caption = "Power" default = (2,0) endparam param oper caption = "Operator" default = 0 enum = "+""-""*""/""None (Mandelbrot)" endparam bool param use_inv caption = "Add inverse?" default = false endparam param start visible = (@zINIT==1) caption = "Starting Point" default=(0,0) endparam switch: type = "Formula1J" seed = #pixel fn1 = fn1 use_inv = use_inv oper = oper power = power bailout = bailout } Formula2J { global: init: z = #pixel loop: IF(@numeroper==0) numerator = (@n1+z) ELSEIF(@numeroper==1) numerator = (@n1-z) ELSEIF(@numeroper==2) numerator = (z-@n1) ELSEIF(@numeroper==3) numerator = (@n1*z) ELSEIF(@numeroper==4) numerator = (@n1/z) ELSEIF(@numeroper==5) numerator = (z/@n1) ELSEIF(@numeroper==6) numerator = (@n1^z) ELSEIF(@numeroper==7) numerator = (z^@n1) ELSE numerator = 0 ENDIF IF(@denomoper==0) denominator = (@n2+z) ELSEIF(@denomoper==1) denominator = (@n2-z) ELSEIF(@denomoper==2) denominator = (z-@n2) ELSEIF(@denomoper==3) denominator = (@n2*z) ELSEIF(@denomoper==4) denominator = (@n2/z) ELSEIF(@denomoper==5) denominator = (z/@n2) ELSEIF(@denomoper==6) denominator = (@n2^z) ELSEIF(@denomoper==7) denominator = (z^@n2) ELSE denominator = 0 ENDIF z = @fn1(numerator)/@fn2(denominator) + @seed bailout: |z| <= real(@bailout) default: title = "Formula2J" param seed caption = "Julia Seed" default = (-1.25,0) endparam float param bailout caption = "Bailout" default = 50 min = 0 endparam param numeroper caption = "Numerator Operator" enum = "n1+z""n1-z""z-n1""n1*z""n1/z""z/n1""n1^z""z^n1" default = 0 endparam param denomoper caption = "Denomiator Operator" enum = "n2+z""n2-z""z-n2""n2*z""n2/z""z/n2""n2^z""z^n2" default = 0 endparam func fn1 caption = "Numerator Function" default = ident() endfunc func fn2 caption = "Denomerator Function" default = ident() endfunc float param n1 caption = "Numerator Binomial (n1)" hint = "Specifies the number in the numerator" default = 1.0 endparam float param n2 caption = "Denominator Binomial (n2)" hint = "Specifies the number in the denominator" endparam switch: type = "Formula2M" n1 = n1 n2 = n2 fn1 = fn1 fn2 = fn2 bailout = bailout numeroper = numeroper denomoper = denomoper } Formula2M { global: init: z = #pixel loop: IF(@numeroper==0) numerator = (@n1+z) ELSEIF(@numeroper==1) numerator = (@n1-z) ELSEIF(@numeroper==2) numerator = (z-@n1) ELSEIF(@numeroper==3) numerator = (@n1*z) ELSEIF(@numeroper==4) numerator = (@n1/z) ELSEIF(@numeroper==5) numerator = (z/@n1) ELSEIF(@numeroper==6) numerator = (@n1^z) ELSEIF(@numeroper==7) numerator = (z^@n1) ELSE numerator = 0 ENDIF IF(@denomoper==0) denominator = (@n2+z) ELSEIF(@denomoper==1) denominator = (@n2-z) ELSEIF(@denomoper==2) denominator = (z-@n2) ELSEIF(@denomoper==3) denominator = (@n2*z) ELSEIF(@denomoper==4) denominator = (@n2/z) ELSEIF(@denomoper==5) denominator = (z/@n2) ELSEIF(@denomoper==6) denominator = (@n2^z) ELSEIF(@denomoper==7) denominator = (z^@n2) ELSE denominator = 0 ENDIF z = @fn1(numerator)/@fn2(denominator) + #pixel bailout: |z| <= real(@bailout) default: title = "Formula2M" float param bailout caption = "Bailout" default = 50 min = 0 endparam param numeroper caption = "Numerator Operator" enum = "n1+z""n1-z""z-n1""n1*z""n1/z""z/n1""n1^z""z^n1" default = 0 endparam param denomoper caption = "Denomiator Operator" enum = "n2+z""n2-z""z-n2""n2*z""n2/z""z/n2""n2^z""z^n2" default = 0 endparam func fn1 caption = "Numerator Function" default = ident() endfunc func fn2 caption = "Denomerator Function" default = ident() endfunc float param n1 caption = "Numerator Binomial (n1)" hint = "Specifies the number in the numerator" default = 1.0 endparam float param n2 caption = "Denominator Binomial (n2)" hint = "Specifies the number in the denominator" endparam switch: type = "Formula2J" n1 = n1 n2 = n2 seed = #pixel fn1 = fn1 fn2 = fn2 bailout = bailout numeroper = numeroper denomoper = denomoper } Formula3J { global: init: z = #pixel loop: IF(@op1==0) z = @fn1(z+@c)^@power ELSEIF(@op1==1) z = @fn1(z-@c)^@power ELSEIF(@op1==2) z = @fn1(z*@c)^@power ELSEIF(@op1==3) z = @fn1(z/@c)^@power ELSEIF(@op1==4) z = @fn1(@c/z)^@power ELSEIF(@op1==5) z = @fn1(z^@c)^@power ELSEIF(@op1==6) z = @fn1(@c^z)^@power ENDIF IF(@invSwitch==1) z = 1/z ELSEIF(@invSwitch==2) z = z + (1/z) ELSE z = z ENDIF bailout: |z| <= @bail default: title = "Formula3J" param bail default = 50.0 min = 0.0 caption = "Bailout" endparam param op1 caption = "Method" enum = "+""-""*""z/pix""pix/z""z^pix""pix^z" default = 0 endparam param power caption = "Power" default = (2,0) endparam func fn1 caption = "Function 1" default = ident() endfunc param invSwitch caption = "Inversion Options" enum = "None""Invert Z""Add Inversion to Z" default = 0 endparam switch: type = "Formula3M" bail = bail op1 = op1 power = power fn1 = fn1 invSwitch = invSwitch } Formula3M { global: init: z = #pixel loop: IF(@op1==0) z = @fn1(z+#pixel)^@power ELSEIF(@op1==1) z = @fn1(z-#pixel)^@power ELSEIF(@op1==2) z = @fn1(z*#pixel)^@power ELSEIF(@op1==3) z = @fn1(z/#pixel)^@power ELSEIF(@op1==4) z = @fn1(#pixel/z)^@power ELSEIF(@op1==5) z = @fn1(z^#pixel)^@power ELSEIF(@op1==6) z = @fn1(#pixel^z)^@power ENDIF IF(@invSwitch==1) z = 1/z ELSEIF(@invSwitch==2) z = z + (1/z) ELSE z = z ENDIF bailout: |z| <= @bail default: title = "Formula3M" param bail default = 50.0 min = 0.0 caption = "Bailout" endparam param op1 caption = "Method" enum = "+""-""*""z/pix""pix/z""z^pix""pix^z" default = 0 endparam param power caption = "Power" default = (2,0) endparam func fn1 caption = "Function 1" default = ident() endfunc param invSwitch caption = "Inversion Options" enum = "None""Invert Z""Add Inversion to Z" default = 0 endparam switch: type = "Formula3J" bail = bail op1 = op1 power = power fn1 = fn1 invSwitch = invSwitch c = #pixel } Formula4M { init: z = #pixel loop: IF (@addpix) && (@beforepix) z = z + #pixel ENDIF z = 1 / z ;Invert Z IF (@addpix) && (@beforechange) z = z + #pixel ENDIF z = fn1(z) ;Change Z IF (@addpix) && (@afterchange) z = z + #pixel ENDIF z = 1 / z ;Flip Z back IF (@addpix) && (@afterrev) z = z + #pixel ENDIF bailout: |z| <= @bail default: title = "Formula4M" param bail caption = "Bailout" default = 4.0 min = 0 endparam func fn1 caption = "Inversion Function" default = ident() endfunc Heading caption = "#pixel Options" endheading param addpix caption = "Add #pixel" default = false endparam param beforepix caption = "Before Invert" visible = @addpix default = false endparam param beforechange caption = "After Invert" visible = @addpix default = false endparam param afterchange caption = "After Change" visible = @addpix default = false endparam param afterrev caption = "After Revert" visible = @addpix default = false endparam switch: type = "formula4j" bail = bail fn1 = fn1 addpix = addpix beforepix = beforepix beforechange = beforechange afterchange = afterchange afterrev = afterrev c = #pixel } Formula4J { init: z = #pixel loop: IF (@addpix) && (@beforepix) z = z + @c ENDIF z = 1 / z ;Invert Z IF (@addpix) && (@beforechange) z = z + @c ENDIF z = fn1(z) ;Change Z IF (@addpix) && (@afterchange) z = z + @c ENDIF z = 1 / z ;Flip Z back IF (@addpix) && (@afterrev) z = z + @c ENDIF bailout: |z| <= @bail default: title = "Formula4J" param bail caption = "Bailout" default = 4.0 min = 0 endparam func fn1 caption = "Inversion Function" default = ident() endfunc param c caption = "Julia Seed" default = (0,0) endparam Heading caption = "Seed Options" endheading param addpix caption = "Add Seed" default = false endparam param beforepix caption = "Before Invert" visible = @addpix default = false endparam param beforechange caption = "After Invert" visible = @addpix default = false endparam param afterchange caption = "After Change" visible = @addpix default = false endparam param afterrev caption = "After Revert" visible = @addpix default = false endparam switch: type = "formula4M" bail = bail fn1 = fn1 addpix = addpix beforepix = beforepix beforechange = beforechange afterchange = afterchange afterrev = afterrev }