comment{ ****************************************************** Here are my formulas :o If you want to send me a mail feel free to do it : fracdb@NOSPAMgmail.com (delete NOSPAM) - Languages IT FR EN ;) Send me links to your gallery too if you like, but don't expect a sure reply :( See my fractals here http://www.renderosity.com/homepage.php?page=3&userid=689745 Good luck!!! :D ****************************************************** } spider_custom_lgn { ; version 0.1 sun 18 - oct 2009 ; support 10 presets, 8 transf. modes for each formula, perturb, power, iterskip init: z = pixel + p1 c = pixel ;-------------- DECLARATIONS ;-------------- z1 = z c1 = c int iter = 0 p = @pow X1 = @Xp1 X2 = @Xp2 inc = @infc int MoZ = @modeZ int MoC = @modeC bool Sk = @skipiter int NSk = @skipN ;-------------- PRESETS ;-------------- if (@PreSet == 1) p = (3,0) ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! inc = (-0.0375,0) MoZ = 3 MoC = 2 Sk = true NSk = 3 elseif (@PreSet == 2) p = (6,0) ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! inc = (-0.87,.21) MoZ = 2 MoC = 3 Sk = true NSk = 2 elseif (@PreSet == 3) p = (7,0) X1 = (.29, 0) ;X2 = @Xp2 don't care! inc = (-0.04,0) MoZ = 7 MoC = 2 Sk = true NSk = 2 elseif (@PreSet == 4) p = (7,0) ;X1 = @Xp1 don't care! X2 = (.06, 0) inc = (0.4,0) MoZ = 1 MoC = 6 Sk = false ;NSk = @skipN don't care! elseif (@PreSet == 5) p = (5,0) ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! inc = (.31,.003) MoZ = 3 MoC = 1 Sk = true NSk = 7 elseif (@PreSet == 6) p = (2,0) ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! inc = (-.22,.3) MoZ = 5 MoC = 3 Sk = true NSk = 2 elseif (@PreSet == 7) p = (2,0) ;X1 = @Xp1 don't care! X2 = (-.16, -0.065) inc = (-.055,-.565) MoZ = 2 MoC = 6 Sk = true NSk = 16 elseif (@PreSet == 8) p = (2,0) ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! inc = (-.44,0) MoZ = 4 MoC = 4 Sk = false ;NSk = @skipN don't care! elseif (@PreSet == 9) ; tip! outside = smooth p = (3.6,-0.08) ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! inc = (-.03125,0.1875) MoZ = 4 MoC = 3 Sk = true NSk = 4 elseif (@PreSet == 10) ;p = Free choice! TRY NEGATIVE VALUES! ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! ;inc = Free choice! Works as a "julia seed" !!! ;) MoZ = 1 MoC = 3 Sk = true NSk = 3 elseif (@PreSet == 11) p = (4,0) ;X1 = @Xp1 don't care! ;X2 = @Xp2 don't care! inc = (-.012,-.2) MoZ = 0 MoC = 2 Sk = false ;NSk = @skipN don't care! endif ;-------------- CUSTOMIZED F()'s ;-------------- complex func Fz(const complex a) if (@PreSet == 1) return sqr(a) elseif (@PreSet == 2) return exp(a) elseif (@PreSet == 3) return log(a) elseif (@PreSet == 4) return exp(a) elseif (@PreSet == 5) return conj(a) elseif (@PreSet == 6) return abs(a) elseif (@PreSet == 7) return tan(a) elseif (@PreSet == 8) return sqrt(a) elseif (@PreSet == 9) return conj(a) elseif (@PreSet == 10) return cos(a) elseif (@PreSet == 11) return sin(a) endif return @FuncZ(a) ;DEFAULT DON'T REMOVE endfunc complex func Fc(const complex a) if (@PreSet == 1) return cos(a) elseif (@PreSet == 2) return zero(a) elseif (@PreSet == 3) return log(a) elseif (@PreSet == 4) return ident(a) elseif (@PreSet == 5) return conj(a) elseif (@PreSet == 6) return flip(a) elseif (@PreSet == 7) return abs(a) elseif (@PreSet == 8) return sqrt(a) elseif (@PreSet == 9) return cabs(a) elseif (@PreSet == 10) return tanh(a) elseif (@PreSet == 11) return round(a) endif return @FuncC(a) ;DEFAULT DON'T REMOVE endfunc ;-------------- loop: if !(Sk) || !( iter % NSk == 0 ) if MoZ == 0 z1 = Fz ( z ) elseif MoZ == 1 z1 = (inc * z + (1 - inc) * Fz ( z )) elseif MoZ == 2 z1 = (z + Fz ( z )) / 2 elseif MoZ == 3 z1 = sqrt(z * Fz ( z )) elseif MoZ == 4 z1 = (z ^ p + Fz ( z ) ^ p ) ^ ( 1 / p ) elseif MoZ == 5 z1 = z elseif MoZ == 6 z1 = z * ( X1 - (Fz ( z )) ^ p ) / ( 5*X1 + z ^ (2*p) ) elseif MoZ == 7 z1 = z * ( X1 + (Fz ( X1 - z )) ^ p ) / ( 5*X1 + z ^ (2*p) ) endif if MoC == 0 c1 = Fc ( c ) elseif MoC == 1 c1 = (inc * c + (1 - inc) * Fc ( c )) elseif MoC == 2 c1 = (c + Fc ( c )) / 2 elseif MoC == 3 c1 = sqrt(c * Fc ( c )) elseif MoC == 4 c1 = (c ^ p + Fc ( c ) ^ p ) ^ ( 1 / p ) elseif MoC == 5 c1 = c elseif MoC == 6 c1 = c * ( X2 - (Fc ( c )) ^ p ) / ( 5*X2 + z ^ (2*p) ) elseif MoC == 6 c1 = c * ( X2 + (Fc ( X2 - c )) ^ p ) / ( 5*X2 + z ^ (2*p) ) endif endif z = ( z1 ) ^ p + c c = z + inc * c1 iter = iter + 1 bailout: (@test == 0 && |z| <= @bailout) || \ (@test == 1 && sqr(real(z)) <= @bailout) || \ (@test == 2 && sqr(imag(z)) <= @bailout) || \ (@test == 3 && (sqr(real(z)) <= @bailout && sqr(imag(z)) < @bailout)) || \ (@test == 4 && (sqr(real(z)) <= @bailout || sqr(imag(z)) < @bailout)) || \ (@test == 5 && (sqr(abs(real(z)) + abs(imag(z))) <= @bailout)) || \ (@test == 6 && (sqr(real(z) + imag(z)) <= @bailout)) default: title = "Spider (L.G.N. Custom)" param PreSet caption = "Presets" default = 0 enum = "Disable presets" "1" "2" "3" "4 (zoom it!)" "5" "6 (p.check. off!)" \ "7" "8" "9" "10 ('jmode')" "11" endparam param p1 caption = "Perturbation" default = (0,0) endparam param pow caption = "Power" default = (2,0) visible = (@PreSet == 0 || @PreSet == 10) endparam bool param skipiter caption = "Iter-skip mode?" default = false visible = @PreSet == 0 endparam int param skipN caption = "Use old z1,c1 every" default = 7 min = 2 max = 100 visible = @PreSet == 0 endparam param infc caption = "Seed of c" default = (.5,0) visible = (@PreSet == 0 || @PreSet == 10) endparam func FuncZ caption = "Z Transform (Loop)" default = ident() visible = (@PreSet == 0) endfunc func FuncC caption = "C Transform (Loop)" default = ident() visible = @PreSet == 0 endfunc param modeZ caption = "Z Transforming Mode" default = 2 enum = "F(z)" "I.c Wgt. Mean" "Mean" "Geom. Mean" "Power of p Mean" \ "z" "Neo1(F,z,p,xp1)" "Neo2(F,z,p,xp1)" visible = @PreSet == 0 endparam param modeC caption = "C Transforming Mode" default = 2 enum = "F(c)" "I.c Wgt. Mean" "Mean" "Geom. Mean" "Power of p Mean" \ "c" "Neo1(F,c,p,xp2)" "Neo2(F,c,p,xp2)" visible = @PreSet == 0 endparam param Xp1 caption = "Xtra param 1" default = (.1,0) visible = @PreSet == 0 endparam param Xp2 caption = "Xtra param 2" default = (.1,0) visible = @PreSet == 0 endparam param test caption = "Bailout Test" default = 0 enum = "mod" "real" "imag" "or" "and" "manh" "manr" endparam param bailout caption = "Bailout value" default = 100.0 min = 1 endparam } man_GonioLimit { ; TIP! SPECIFY MAPPING = KALEIDOSCOPE (ORDER = 1) ; IF YOU NEED A SYMMETRIC IMAGE! ; 18 oct 09: beta ; 19 oct 09: final edition, with angles, angle ; distortions, specials (and the shift) ; 20 oct 09: Q.Mean, Hyperbolic, Circle ; AtanInv, Inv+ & Atan(Inv+) modes added (weird modes... but funny!) ; Also added an imaginary part for the shift (but don't mess too much with it!) ; Simplified and joined some pieces of the main fmla ; 21 oct 09: Added BailNoise, and the switch "Advanced" to show less params ; Added support to additional fmlas; LAMBDA, GEN. MAGNET ; But GEN. MAGNET is still unsatisfying. :( Seems to dislike X-shift init: z = @start int ite = 1 lim = 0 fz = 0 u = @thet Dz = @shif + (0,1) * @shif_i if @Fvtn == 2 ; this seems to fix the Magnet mode quite a bit Dz = Dz -1 endif if (u == -1) ; **** SPECIAL MODES **** if @SpMd == 0 u = real(#pixel) elseif @SpMd == 1 u = imag(#pixel) elseif @SpMd == 2 u = real(#pixel) * imag(#pixel) elseif @SpMd == 3 u = real(#pixel) + imag(#pixel) elseif @SpMd == 4 u = real(#pixel) - imag(#pixel) elseif @SpMd == 5 u = real(#pixel) / imag(#pixel) elseif @SpMd == 6 u = atan(real(#pixel) / imag(#pixel)) * 2 / pi elseif @SpMd == 7 u = atan(imag(#pixel) / real(#pixel)) * 2 / pi elseif @SpMd == 8 u = 1 / real(#pixel) + 1 / imag(#pixel) elseif @SpMd == 9 u = atan(1 / real(#pixel) + 1 / imag(#pixel)) elseif @SpMd == 10 u = sqrt(sqr(real(#pixel)) + sqr(imag(#pixel))) elseif @SpMd == 11 u = sqrt(abs(sqr(real(#pixel)) - sqr(imag(#pixel)))) elseif @SpMd == 12 u = sqrt(abs(4 - sqr(real(#pixel)) - sqr(imag(#pixel)))) endif endif loop: ; **** MAIN **** ; calculate the cmplx that corresponds to @theta ; ^ ite = final rotation angle. / ite to be asyntotically 0 fz = (( cos( u * pi ) + (0,1) * sin ( u * pi ) ) ^ ite) / ite ;lim tends to reach value 1, when ite tends to infinity... if @vtn == 0 lim = ( sin ( z + Dz ) ) ^ (2 + fz) + ( cos ( z + Dz ) ) ^ (2 + fz) elseif @vtn == 1 lim = ( sin ( z + Dz ) ) ^ (2 + fz) + ( cos ( z + Dz ) ) ^ (2 - fz) elseif @vtn == 2 lim = ( sin ( z + Dz ) ) ^ (2 - fz) + ( cos ( z + Dz ) ) ^ (2 + fz) elseif @vtn == 3 lim = ( sin ( z + Dz ) ) ^ (2 - fz) + ( cos ( z + Dz ) ) ^ (2 - fz) endif if (@Fvtn == 0) z = lim * ( z ^ @power + #pixel ) elseif (@Fvtn == 1) z = lim * ( #pixel*z*(1-z)^(@power-1) ) elseif (@Fvtn == 2) z = lim * (( (z ^ @power + #pixel - 1) / (2*z + #pixel - 2) ) ^ ( @power )) endif u = u * @thet_dist ite = ite + 1 bailout: (((@Fvtn == 0 || @Fvtn == 1) && |z| <= (@bailout - ite * ( @bail_noise + 1 ) / 100))) || \ (@Fvtn == 2 && (|z| <= (@bailout - ite * ( @bail_noise + 1 ) / 100) && (|z - 1| > 1E-20))) default: title = "Mandelbrot GonioLimit Plus" center = (-0.5, 0) param Fvtn caption = "Choose formula" default = 0 enum = "Mandelbrot" "Lambda" "Gen. Magnet (beta)" endparam param start caption = "Starting point" default = (0,0) hint = "Set to (0.5,0) for Lambda (standard)! (0,0) won't plot but julia mode still works" endparam float param shif caption = "X shift" default = 0 max = 1 min = -1 endparam float param shif_i caption = "Y shift" visible = (@adv_M == true) default = 0 max = 1 min = -1 hint = "Has a strange effect on the fractal, so be careful" endparam param power caption = "Power" default = (2,0) hint = "Try also a power = (1,0) or (0,0) with a very big bailout" endparam param vtn caption = "Variations" default = 0 enum = "(+)(+)" "(+)(-)" "(-)(+)" "(-)(-)" endparam float param thet caption = "Angle (-1 = special)" visible = (@adv_M == true) default = 1 max = 1 min = -1 endparam param SpMd visible = @thet == -1 caption = "Special Mode" visible = (@adv_M == true) default = 0 enum = "Re(pix)" "Im(pix)" "Re*Im(pix)" "Re+Im(pix)" \ "Re-Im(pix)" "Re/Im(pix)" "Atan" "AtanInv" "Inv+" "Atan(Inv+)" \ "Q.Mean" "Hyperbolic" "Circle" endparam float param thet_dist caption = "D%Angle (1 = no)" hint = "A factor that lowers the angle at every iteration" default = 1 max = 1 min = -1 endparam float param bailout caption = "Bailout" default = 4.0 min = 1.0 endparam float param bail_noise caption = "Bail noise %" visible = (@adv_M == true) default = 0 min = 0 max = 100 endparam bool param adv_M caption = "Advanced Mode?" default = false hint = "Shows all the available regulations (enable it!!!)" endparam switch: type = "jul_GonioLimit" Fvtn = Fvtn seed = #pixel power = power bailout = bailout bail_noise = bail_noise vtn = vtn shif = shif shif_i = shif_i thet = thet thet_dist = thet_dist SpMd = SpMd adv_M = adv_M } jul_GonioLimit { ; TIP! SPECIFY MAPPING = KALEIDOSCOPE (ORDER = 1) ; IF YOU NEED A SYMMETRIC IMAGE! ; HIStory: see -> man_GonioLimit init: z = #pixel int ite = 1 lim = 0 fz = 0 u = @thet Dz = @shif + (0,1) * @shif_i if @Fvtn == 2 Dz = Dz -1 endif if (u == -1) ; **** SPECIAL MODES **** if @SpMd == 0 u = real(#pixel) elseif @SpMd == 1 u = imag(#pixel) elseif @SpMd == 2 u = real(#pixel) * imag(#pixel) elseif @SpMd == 3 u = real(#pixel) + imag(#pixel) elseif @SpMd == 4 u = real(#pixel) - imag(#pixel) elseif @SpMd == 5 u = real(#pixel) / imag(#pixel) elseif @SpMd == 6 u = atan(real(#pixel) / imag(#pixel)) * 2 / pi elseif @SpMd == 7 u = atan(imag(#pixel) / real(#pixel)) * 2 / pi elseif @SpMd == 8 u = 1 / real(#pixel) + 1 / imag(#pixel) elseif @SpMd == 9 u = atan(1 / real(#pixel) + 1 / imag(#pixel)) elseif @SpMd == 10 u = sqrt(sqr(real(#pixel)) + sqr(imag(#pixel))) elseif @SpMd == 11 u = sqrt(abs(sqr(real(#pixel)) - sqr(imag(#pixel)))) elseif @SpMd == 12 u = sqrt(abs(4 - sqr(real(#pixel)) - sqr(imag(#pixel)))) endif endif loop: ; **** MAIN **** ; calculate the cmplx that corresponds to @theta ; ^ ite = final rotation angle. / ite to be asyntotically 0 fz = (( cos( u * pi ) + (0,1) * sin ( u * pi ) ) ^ ite) / ite ;lim tends to reach value 1, when ite tends to infinity... if @vtn == 0 lim = ( sin ( z + Dz ) ) ^ (2 + fz) + ( cos ( z + Dz ) ) ^ (2 + fz) elseif @vtn == 1 lim = ( sin ( z + Dz ) ) ^ (2 + fz) + ( cos ( z + Dz ) ) ^ (2 - fz) elseif @vtn == 2 lim = ( sin ( z + Dz ) ) ^ (2 - fz) + ( cos ( z + Dz ) ) ^ (2 + fz) elseif @vtn == 3 lim = ( sin ( z + Dz ) ) ^ (2 - fz) + ( cos ( z + Dz ) ) ^ (2 - fz) endif if (@Fvtn == 0) z = lim * ( z ^ @power + @seed ) elseif (@Fvtn == 1) z = lim * ( @seed*z*(1-z)^(@power-1) ) elseif (@Fvtn == 2) z = lim * (( (z ^ @power + @seed - 1) / (2*z + @seed - 2) ) ^ ( @power )) endif u = u * @thet_dist ite = ite + 1 bailout: (((@Fvtn == 0 || @Fvtn == 1) && |z| <= (@bailout - ite * ( @bail_noise + 1 ) / 100))) || \ (@Fvtn == 2 && (|z| <= (@bailout - ite * ( @bail_noise + 1 ) / 100) && (|z - 1| > 1E-20))) default: title = "Julia GonioLimit Plus" param Fvtn caption = "Choose formula" default = 0 enum = "Mandelbrot" "Lambda" "Gen. Magnet (beta)" endparam param seed caption = "Julia seed" default = (-0.7875, 0.15) endparam float param shif caption = "X shift" default = 0 max = 1 min = -1 endparam float param shif_i caption = "Y shift" visible = (@adv_M == true) default = 0 max = 1 min = -1 hint = "Has a strange effect on the fractal, so be careful" endparam param power caption = "Power" default = (2,0) hint = "Try also a power = (1,0) or (0,0) with a very big bailout" endparam param vtn caption = "Variations" default = 0 enum = "(+)(+)" "(+)(-)" "(-)(+)" "(-)(-)" endparam float param thet caption = "Angle (-1 = special)" visible = (@adv_M == true) default = 1 max = 1 min = -1 endparam param SpMd visible = @thet == -1 caption = "Special Mode" visible = (@adv_M == true) default = 0 enum = "Re(pix)" "Im(pix)" "Re*Im(pix)" "Re+Im(pix)" \ "Re-Im(pix)" "Re/Im(pix)" "Atan" "AtanInv" "Inv+" "Atan(Inv+)" \ "Q.Mean" "Hyperbolic" "Circle" endparam float param thet_dist caption = "D%Angle (1 = no)" hint = "A factor that lowers the angle at every iteration" default = 1 max = 1 min = -1 endparam float param bailout caption = "Bailout" default = 4.0 min = 1.0 endparam float param bail_noise caption = "Bail noise %" visible = (@adv_M == true) default = 0 min = 0 max = 100 endparam bool param adv_M caption = "Advanced Mode?" default = false hint = "Shows all the available regulations (enable it!!!)" endparam switch: type = "man_GonioLimit" Fvtn = Fvtn power = power bailout = bailout bail_noise = bail_noise vtn = vtn shif = shif shif_i = shif_i thet = thet thet_dist = thet_dist SpMd = SpMd adv_M = adv_M } stripsy { ; released on 23 oct 2009 ; This formula has many, many, many variations, almost fully customizable ; it's based on a stripe distorsion. The chaos op inclines the axis ; in a particular fashion, the bigger it is and the bigger effect ; you get for a "circular" deformation. ; However you'll see stripes only if you choose real, image as stripe type! init: if @cu == 0 z = @start else z = #pixel endif p = @pow ; I need to extract two values from perv fkt = sqrt(sqr(real(@perv)) + sqr(imag(@perv))) ;extracts R pvs = @perv / fkt ;extracts theta k=y=0 ;turn off warning ; initializing k,y in different fashions if @kinit == 0 k = pvs * #pixel ^ p elseif @kinit == 1 k = #pixel elseif @kinit == 2 k = @f1(#pixel) elseif @kinit == 3 k = (z+#pixel)/2 endif if @yinit == 0 y = @f1(k) + k elseif @yinit == 1 y = @f1(k) - k elseif @yinit == 2 y = @f1(k) * k elseif @yinit == 3 y = @f1(k) / k endif aux = 0 float au2 = 0 loop: ; here is the main fmla if @cu == 0 z = pvs * (z ^ p) + #pixel + k / y else z = pvs * (z ^ p) + @start + k / y endif if @styp == 0 au2 = |real(z)| elseif @styp == 1 au2 = |imag(z)| elseif @styp == 2 au2 = |abs(z)| elseif @styp == 3 au2 = |z ^ p| elseif @styp == 4 au2 = | (|imag(z)| + |real(z)|) / 2 | endif ; here the stripe fmla if au2 < @stripepwr z = @fs(z) endif ; here we twist k and y a bit!!! ; 0.6 is a softening value for the circular ; deformation, it seems a good value k = ( 0.6*flip(fkt)*(sqrt(abs(1 - sqr(real(k)) - sqr(imag(k))))) \ + 1 / cabs(y) ) * real(k) ; log(k) gives a good effect, so I wanted to leave it ; as the main ingredient aux = log(k)*4/5 + @f1(k)/5 y = y - 1 / real(aux) ;ends here bailout: |z| < @bailout default: title = "LGN Stripsy Man/Jul" center = (-.5,0) param start caption = "Seed/Perturb" default = (0,0) endparam param pow caption = "Pow" default = (2,0) endparam func f1 caption = "Function" default = log() endfunc param kinit caption = "kinit" enum = "pvs*pix^p" "pix" "F(pix)" "(z+pix)/2" default = 3 endparam param yinit caption = "yinit" enum = "+" "-" "*" "/" default = 3 endparam param styp caption = "Stripe type" enum = "Real" "Imag" "Abs (Bubbles)" "z^p" "ReImAverage" default = 2 endparam float param stripepwr caption = "Stripe Power" default = 0.02 min = 0 max = 1 endparam func fs caption = "Stripe-Function" default = sqr() endfunc param perv caption = "Chaos Op." default = (.6,.02) endparam param bailout caption = "bailout" default = 4 endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "stripsy" start = #pixel pow = pow f1 = f1 fs = fs perv = perv stripepwr = stripepwr bailout = bailout kinit = kinit yinit = yinit styp = styp cu = sw sw = cu } ssm_manjul { ; What if you use a pixel-dependent power for z? ; A very odd transformation of Mandelbrot set! That's it ; Scilla was a mytho. monster, living in Sicilia for the ancient Greeks ; 24 oct 09 beta ; 25 oct fixed - and now we have 6 different kinds of mirror init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif complex c2 = #pixel / |log(@dsft)| - @shif float chi = 0 ; d is the distance from the origin; it's a float zero-positive number float d = (sqr(real(c2)) + sqr(imag(c2))) if @mirr == 0 ; d<4 -> a circle but when d tends to infy this diverge chi = sqrt(abs( 4 - d )) elseif @mirr == 1 ; Fixed convergent version! if d < 4 chi = sqrt(abs( 4 - d )) else ; When d-> infinity chi is forced to tend to 2 (converge) chi = 2 * ( d - 2 ) / d endif elseif @mirr == 2 if d < 4 chi = sqrt(abs( 4 - d )) * sqrt(d) else ; When d-> infinity chi is forced to tend to 2 (converge) chi = 2 * ( d - 2 ) / d endif elseif @mirr == 3 chi = sqrt( 4 + abs(sqr(real(c2)) - sqr(imag(c2)))) elseif @mirr == 4 ; To enhance the regularity, I soften d two times chi = exp( log(2) - d / |log(@dsft)| ) elseif @mirr == 5 ; To enhance the regularity, I soften d two times chi = 2 - exp( log(2) - d / |log(@dsft)| ) endif loop: ; The loop is very, very simple :) z = z^chi + c bailout: |z|<@bailout default: title = "Scilla's mirror Man/Jul" param shif caption = "Focus" default = (0,0) endparam param mirr caption = "Mirror mode" enum = "Spheric-Hyp" "Spheric-Flat" "Lemniscate-Flat" \ "Hyperbolic" "Gauss Bell" "Reversed G.B." hint = "Reversed G.B. has focus -> infy" default = 1 endparam param dsft caption = "Mirror Log-Power" hint = "Range 0-1" default=.2 min=0 max=1 endparam param bailout caption = "Bailout Value" hint = "This is the bail-out value" default=4.0 min=1 max=2097152 endparam param start caption = "Seed/Perturb" hint = "Julia modes show an interesting blend-mutation of the seed!" default = (0,0) endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "ssm_manjul" start = #pixel stripepwr = stripepwr bailout = bailout mirr = mirr dsft = dsft shif = shif cu = sw sw = cu } LGNspidy { ; A generalized version (with julia set!) of a ; variation of the Spider fmla. Enjoy init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif y = z int made = 0 loop: if @fml == 1 z = z * y + c if (@sk == 1) || ( made % @sk != 0) y = @fy(@q1 * c + z) / @p c = @fc(@q2 * z + y) / @p else y = (2 * c + z ) / 2 c = (1 * z + y ) / 2 endif elseif @fml == 2 z = z * y + c if (@sk == 1) || ( made % @sk != 0) y = @fy(@q1 * z + sqrt(z * y - z) ) / @p c = @fc(@q2 * y + sqrt(z * y - c) ) / @p else y = (2 * c + z ) / 2 c = (1 * z + y ) / 2 endif elseif @fml == 3 z = z * y - c if (@sk == 1) || ( made % @sk != 0) y = @fy(@q1 * z ) / @p + y c = @fc(@q2 * c - z) / @p else y = (2 * z ) / 2 + y c = (1 * c - z) / 2 endif else ;ORIGINAL FORMULA! z = z * y + c if (@sk == 1) || ( made % @sk != 0) y = @fy(@q1 * z + c) / @p c = @fc(@q2 * y + c) / @p else y = (2 * z + c) / 2 c = (1 * y + c) / 2 endif endif made = made + 1 bailout: (|z| < @bailout) default: title = "LGN Spidy" complex param q1 caption="Zoom y" default=2 endparam complex param q2 caption="Zoom c" default=1 endparam complex param p caption="Scaling" default=2 endparam func fy caption = "Function of y" default = ident() endfunc func fc caption = "Function of c" default = ident() endfunc int param sk caption="Use classic fmla every" hint = "Useful if otherwise won't plot (but 1 = off)" default = 1 min = 1 endparam param fml caption = "Current fmla" enum = "1" "2" "3" "4" default = 0 endparam float param bailout caption="Bailout value" min=0 default=1000 endparam param start caption = "Seed/Perturb" default = (0,0) endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "LGNspidy" q1 = q1 q2 = q2 p = p fy = fy fc = fc sk = sk fml = fml bailout = bailout start = #pixel cu = sw sw = cu } tst0 { ; ; init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif c1 = c loop: if @fml == 1 z = (sin(z+@shif)*z + cos(z+@shif)*(@k-z)) \ * sqrt(@k - z^(2*@pow)) + c c1 = @fc1(c-real(z)) c = c * (1 - @c1w) + c1 * @c1w else z = (sin(z+@shif)*z + cos(z+@shif)*(@k-z)) \ * sqrt(@k - z^(2*@pow)) / (@k + |z| ) + c c1 = @fc1(c-real(z)) c = c * (1 - @c1w) + c1 * @c1w endif bailout: |z | < @bailout default: title = "Disarmonic ManJul" magn = 0.4 param start caption = "Seed/Perturb" default = (0,0) endparam param pow caption = "Pow" default = (2,0) endparam func fc1 caption = "Function of c1" default = atan() endfunc float param c1w caption = "c1 weight" default = .7 min = 0 max = 1 endparam float param k caption = "k" default = 0.975 min = 0 endparam float param shif caption = "Phase shift" default = -1.87 endparam param bailout caption = "Bailout" default = 8 endparam param fml caption = "Current fmla" enum = "1" "2" default = 0 endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "Tst0" start = #pixel cu = sw sw = cu bailout = @bailout shif = shif fc1 = fc1 c1w = c1w fml = fml k = k } custoMand { init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif loop: z = z^@power + c zr = real(z) zi = imag(z) cr = real(c) ci = imag(c) z1 = -(zi + cr * (0,1)) ; minus seems to have a better effect! c1 = (ci + zr * (0,1)) z = (@k*z + z1) / (@k+1) c = (@q*c + c1) / (@q+1) bailout: |z| <= @bailout default: title = "ReImZ/C Mandtwist ManJul" param start caption = "Seed/Perturb" default = (0,0) endparam param power caption = "Power" default = (2,0) endparam param bailout caption = "Bailout" default = 100 endparam float param k caption = "Oldz Strength" default = 50 hint = "Interesting values are near to zero, near to infinity, negative" endparam float param q caption = "Oldc Strength" default = 50 hint = "Interesting values are near to zero, near to infinity, negative" endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "custoMand" start = #pixel power = power bailout = bailout k = k q = q cu = sw sw = cu } custoMand2 { ; 4-11-2009 Released, and added "Headache" ; Headache has interesting effects: to see this at best ; turn off "Origami". Lots of interesting Julia sets... init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif c = @pfc( c ) pz1 = 0 pz2 = 0 h = 0 loop: if @hst == 0 h = z elseif @hst == 1 h = c elseif @hst == 2 h = real(z)+imag(c)*(0,1) elseif @hst == 3 h = real(c)+imag(z)*(0,1) elseif @hst == 4 h = z + c elseif @hst == 5 h = z - c elseif @hst == 6 h = z * c elseif @hst == 7 h = z * z + c endif if @ppz1 == 1 pz1 = real(h) elseif @ppz1 == 2 pz1 = imag(h) elseif @ppz1 == 3 pz1 = real(h)*imag(h) elseif @ppz1 == 4 pz1 = real(h)+imag(h) elseif @ppz1 == 5 pz1 = real(h)-imag(h) elseif @ppz1 == 6 pz1 = abs(h) elseif @ppz1 == 7 pz1 = cabs(h) elseif @ppz1 == 8 if real(h)>imag(h) pz1 = real(h) else pz1 = imag(h) endif endif if @ppz2 == 1 pz2 = real(h) elseif @ppz2 == 2 pz2 = imag(h) elseif @ppz2 == 3 pz2 = real(h)*imag(h) elseif @ppz2 == 4 pz2 = real(h)+imag(h) elseif @ppz2 == 5 pz2 = real(h)-imag(h) elseif @ppz2 == 6 pz2 = abs(h) elseif @ppz2 == 7 pz2 = cabs(h) elseif @ppz2 == 8 if real(h)>imag(h) pz2 = real(h) else pz2 = imag(h) endif endif if @k != 0 z1 = asin(sin(@k*z + pz1*@pps))/@k z2 = acos(cos(@k*z + pz2*@pps))/@k else z1 = z + pz1*@pps z2 = z + pz2*@pps endif if @fa == 1 z = z2*z2 + c elseif @fa == 2 z = z1*z + c elseif @fa == 3 z = z2*z + c elseif @fa == 4 z = z2*z1 + c elseif @fa == 5 z = 2*c*z1*(1-z) elseif @fa == 6 z = 2*c*z2*(1-z) elseif @fa == 7 z = 2*c*z2*(1-z1) elseif @fa == 8 z = 2*c*z1*(1-z2) elseif @fa == 9 z = -z * sqrt(z2*z1) + c elseif @fa == 10 z = -z1 * sqrt(z*z2) + c elseif @fa == 11 z = -z2 * sqrt(z*z1) + c elseif @fa == 12 z = z*z + z2 - z1 + c elseif @fa == 13 z = z*z - z2 + z1 + c ;formulas with atan2 are noisy, but don't ask me why! (branch discontinuity???) ;simple atan will not work elseif @fa == 14 z = .5*z*z - (c * atan2(z2 / z1)) elseif @fa == 15 z = .5*z*z - (c * atan2(z1 / z2)) elseif @fa == 16 z = .5*z*z1 - (c * atan2(z / z2)) elseif @fa == 17 z = .5*z*z1 - (c * atan2(z2 / z)) elseif @fa == 18 z = .5*z*z2 - (c * atan2(1 - z / z1)) elseif @fa == 19 z = .5*z*z2 - (c * atan2(1 - z1 / z)) else z = z1*z1 + c endif z = @lfz( z ) bailout: |z| <= @bailout default: title = "SinCos Origami + Headache ManJul" periodicity = 0 heading caption = "Origami Parameters" expanded = true endheading param fa caption = "Style / Main formula" enum = "sin" "cos" "sinz" "cosz" "sincos" \ "lambdasin" "lambdacos" "lb.sincos1" "lb.sincos2" \ "mixed1a" "mixed1b" "mixed1c" "mixed2a" "mixed2b" "c*atan2a" "c*atan2b" \ "c*atan2c" "c*atan2d" "c*atan2e" "c*atan2f" hint = "In Default Option sheet, choose start = (0.5,0) when using lambda formulas" default = 0 endparam param k caption = "Strength" default = (.5,1) hint = "High values will slow down the plot! \ (0,0) = effect OFF. Often, using only imag gives a good effect. \ Effect strength affects sostantially the formula, so if the fractal \ seems not good you need to change this to fix!" endparam ; ---------------------------------------------------------------------------------- heading caption = "Headache Parameters" expanded = true endheading param hst caption = "Style" enum = "z" "c" "Mix(z,c)" "Mix(c,z)" "z+c" "z-c" "z*c" "z*z+c" default = 0 endparam param ppz1 caption = "Sin headache" enum = "-OFF-" "Re" "Im" "Re*Im" "Re+Im" "Re-Im" "Abs" "CAbs" "Max(Re,Im)" default = 0 endparam param ppz2 caption = "Cos headache" enum = "-OFF-" "Re" "Im" "Re*Im" "Re+Im" "Re-Im" "Abs" "CAbs" "Max(Re,Im)" default = 0 endparam param pps caption = "Strength" default = (.3,-.1) endparam ; ---------------------------------------------------------------------------------- heading caption = "Mapping Options" expanded = false endheading func lfz caption = "z loopfunc" default = ident() endfunc func pfc caption = "c prefunc" hint = "The same old remap of the coords..." default = ident() endfunc ; ---------------------------------------------------------------------------------- heading caption = "Default Options" expanded = false endheading param start caption = "Seed/Perturb" default = (0,0) endparam param bailout caption = "Bailout" default = 100 endparam int param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "custoMand2" start = #pixel bailout = bailout cu = sw sw = cu k = k fa = fa lfz = lfz pfc = pfc hst = hst ppz1 = ppz1 ppz2 = ppz2 pps = pps } lgngeneral { ; This formula is a generalization of many fractal formulas ; This can plot Mandel and Newton sets as well if correctly set up! ; In 99% of cases this formula plots fast ; If f(t) are both zero, formula (standard mode) is; ; F1(a z^3 + b z^2 + c z + d) ; z = ----------------------------- + F3(c) ; F2(e z^3 + f z^2 + g z + h) ; f(t) can change formula and make it "less polynomial". ; t can be chosen from z^n (n int and 0 epsil) || \ (@bailM == 2 && ((|z| <= @bailout) && (|z-zbak| >= epsil))) default: title = "Poly General Fmla ( plus f(t) )" param MF caption = "Main formula" enum = "p1(z) / p2(z) + f(c)" "p1(z) * p2(z) + f(c)" "p1(z) * f(c) + p2(z)" \ "p1(z) / p2(z) * f(c)" "p1(z) * p2(z) * f(c)" default = 0 endparam heading caption = "Params for c" text = "Mapping (use zero to disable c addition)" expanded = false endheading func FOC caption = "F(c)" default = ident() endfunc heading caption = "Upside params" text = "The numerator of the formula" expanded = true endheading func FUP caption = "Glob.Upside F()" default = ident() endfunc param z31 caption = "z^3 *" default = (0,0) endparam param z21 caption = "z^2 *" default = (1,0) endparam param z11 caption = "z *" default = (0,0) endparam func fz1 caption = "f(t)" default = zero() visible = (@fthide == false) endfunc param fmod11 caption = "f(t) mode" enum = "*z^3" "*z^2" "*z" "*Root" "+" default = 4 visible = (@fthide == false) endparam param fmod21 caption = "t" enum = "z^3" "z^2" "z" "c" "zold" "zbak" default = 2 visible = (@fthide == false) endparam param tw1 caption = "t *" default = (1,0) visible = (@fthide == false) endparam bool param finv1 caption = "Invert f(t)?" default = false visible = (@fthide == false) endparam param cn1 caption = "Root" default = (0,0) endparam heading caption = "Down params" expanded = false text = "The inverse part of the formula" endheading func FDW caption = "Glob.Down F()" default = ident() endfunc param z32 caption = "z^3 *" default = (0,0) endparam param z22 caption = "z^2 *" default = (0,0) endparam param z12 caption = "z *" default = (0,0) endparam param cn2 caption = "Root" default = (1,0) endparam func fz2 caption = "f(t)" default = zero() visible = (@fthide == false) endfunc param fmod12 caption = "f(t) mode" enum = "*z^3" "*z^2" "*z" "*Root" "+" default = 4 visible = (@fthide == false) endparam param fmod22 caption = "t" enum = "z^3" "z^2" "z" "c" "zold" "zbak" default = 2 visible = (@fthide == false) endparam param tw2 caption = "t *" default = (1,0) visible = (@fthide == false) endparam bool param finv2 caption = "Invert f(t)?" default = false visible = (@fthide == false) endparam heading caption = "Standard params" expanded = false endheading param start caption = "Seed/Perturb" default = (0,0) endparam float param bailout caption = "Bailout (M)" default = 1e12 min = 1 endparam float param bailout2 caption = "1/Epsilon (N)" default = 1e12 min = 1 endparam param bailM caption = "Bailout style" enum = "Div (Mandel)" "Conv (Newton)" "Mixed" hint = "Use Conv (Newton) if you use some down params, or when you invert f(t) \ or when just everything else fails!" default = 0 endparam bool param fthide caption = "Hide f(t)?" default = false hint = "Poly only mode" endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "lgngeneral" start = #pixel power = power MF = MF bailout = bailout, bailout2 = bailout2 bailM = bailM FUP = FUP, FDW = FDW , FOC = FOC fz1 = fz1, fz2 = fz2 z11 = z11, z21 = z21, z31 = z31, cn1 = cn1 z12 = z12, z22 = z22, z32 = z32, cn2 = cn2 tw1 = tw1, tw2 = tw2 fmod11 = fmod11, fmod12 = fmod12 fmod21 = fmod21, fmod22 = fmod22 finv1 = finv1, finv2 = finv2 fthide = fthide cu = sw sw = cu } randLGN001 { init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif loop: z = .4*(1.5*z^3 + @k1*z^2)*cabs( 1+.4*z^3+@k2*z^2+.2*z ) if cabs(z)<0 z = z + c else z = z + sqrt(c+c*abs(c)) endif bailout: |z| <= @bailout default: title = "MandelBubbly" magn = 3 param start caption = "Seed/Perturb" default = (0,0) endparam param k1 caption = "k1" default = (3,0) endparam param k2 caption = "k2" default = (-.6,0) endparam param bailout caption = "Bailout" default = 100 endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "randLGN001" start = #pixel bailout = bailout k1 = k1 k2 = k2 cu = sw sw = cu } mjfibo { ; RELEASE + FIX october 2010 ; Squared conv. - 27 october '10 ; "Fibonacci distortion" for Mandelbrot fractal ; If used without " softening" is weird ; init: r = -1 ^ @rot float k = 0 ; Squared conv. factor float ww = @w*@w ; ----------- if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif ; ----------- if @pfcb == false c = @pfc(c) endif float x = real(c) float y = imag(c) if @pfcb == true ; Fibo and coords will be independent, and it's "wrong" ; The plot will be "less predictable" ;) c = @pfc(c) endif loop: c1 = r * (x + flip(y)) ; ----------- if @dsl1 ; This distortion is very strong, so it's counted ; with a squared conv. factor z = z*z + (1-ww)*c + ww*c1 else z = z*z + c1 endif ; ----------- if @dsl2 k = @w*(x + y) else ; original "Fibonacci" k = x + y endif if @dsl2 ; ----------- This is a fix to force "Mandelbrot" similarity ; for w->0 in case of dsl1 = ON if @falt y = @w*x + (1-@w)*imag(c) x = @w*k + (1-@w)*real(c) else x = @w*y + (1-@w)*real(c) y = @w*k + (1-@w)*imag(c) endif else ; don't care at all if @falt y = x x = k else x = y y = k endif endif ; Rotates the rotation itself lol r = r * (-1 ^ @rotrot) ; ----------- bailout: |z| <= @bailout default: title = "Man/Jul Fibo" magn = 1 param start caption = "Seed/Perturb" default = (0,0) endparam param bailout caption = "Bailout" default = 100 endparam bool param dsl1 caption = "Fibo Div. Soft. 1" default = true endparam bool param dsl2 caption = "Fibo Div. Soft. 2" default = true endparam float param w caption="Fibo Amount" visible = (@dsl1 || @dsl2) default = .5 min=0 max=1 endparam bool param falt caption = "Fibo Alt" default = false endparam float param rot caption = "Rotation" hint = "Not quite a canonic rotation!" default = 0 min=-1 max=1 endparam float param rotrot caption = "RotoDistort" default = 0 min=-1 max=1 endparam func pfc caption = "c prefunc" hint = "The same old remap of the coords..." default = ident() endfunc bool param pfcb caption = "Prefunc bug?" default = false endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "mjfibo" start = #pixel bailout = bailout w=w dsl1=dsl1 dsl2=dsl2 falt=falt rot=rot rotrot=rotrot pfc = pfc pfcb = pfcb cu = sw sw = cu } mjfibo2 { ; RELEASE 28 october 2010 ; "Fibonacci" fractal ; init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif ; ----------- c = @pfc(c) x = 0 y = @pfz k = y loop: zold = z if @MF==0 z = z^@pz - (z^k-1) / (k * z^(@pfz-1)) + c elseif @MF==1 z = z^(k-@pz) - (z^k-1) / (k * z^(@pfz-1)) + c elseif @MF==1 z = z^@pz - (z^k-1) / (@pfz * z^(k-1)) + c endif if @FM==1 x = real(z)*x elseif @FM==2 x = imag(z)*x elseif @FM==3 x = real(c)*x elseif @FM==4 x = imag(c)*x endif ; original "Fibonacci" k = x + y if @falt y = x x = k else x = y y = k endif ; ----------- bailout: |z-zold| > @bailout default: title = "Man/Jul FiboNova" magn = 1 param start caption = "Seed/Perturb" default = (1,0) endparam param MF caption = "Main formula" enum = "N1" "N2" \ "N3" default = 0 endparam param FM caption = "Formula Modifier" enum = "Nothing" "xz mix1" "xz mix2"\ "xc mix1" "xc mix2" default = 0 endparam param pz caption = "Power of z" default = (2,0) endparam param pfz caption = "Power of fiboz" default = (1,0) endparam param bailout caption = "Bailout" default = 1e-13 endparam bool param falt caption = "Fibo Alt 1" default = false endparam func pfc caption = "c prefunc" hint = "The same old remap of the coords..." default = ident() endfunc param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "mjfibo2" start = #pixel bailout = bailout MF=MF FM=FM pz=pz pfz=pfz falt=falt fal2=fal2 rot=rot rotrot=rotrot pfc = pfc cu = sw sw = cu } ftMand { init: int numite = 0 if @cu == 0 z = @start c = #pixel if @mir c = real(c) + flip(abs(imag(c))) endif else z = #pixel c = @start if @mir z = real(z) + flip(abs(imag(z))) endif endif r1 = -1 ^ @rot r2 = -1 ^ (2*@rot) loop: ; (A+B)(A-B) = A^2 - B^2 ; When A^2 = z*z and B^2 = -c ... etc. z = (z^@zp + r1*flip(c^@le))*(@zh*z + r2*flip(c^@ri)) numite = numite + 1 if @phas != 0 if numite%@phas == 0 z = z * r1 endif endif bailout: |z| <= @bailout default: title = "Flippoon ManJul" param start caption = "Seed/Perturb" default = (0,0) endparam param zp caption = "ZetaP" default = (1.2,0) endparam param zh caption = "ZetaH" default = (1,0) endparam param le caption = "Left" default = (.5,0) endparam param ri caption = "Right" default = (.7,0) endparam float param rot caption = "Angle of c" default = 1 min=-1 max=1 endparam int param phas caption = "Rot.z every (0=no)" default = 0 min = 0 max = 100 endparam param bailout caption = "Bailout" default = 100 endparam bool param mir caption = "Mirror?" default = true endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "ftMand" start = #pixel power = power bailout = bailout zp = zp zh = zh le = le ri = ri rot = rot phas = phas mir = mir cu = sw sw = cu } Nobunaga { init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif loop: if @f1(z)<0 c = @k3*z + c else c = @k3*z - c endif z = @k2*(z^(@k1-z)) + @f2(c) bailout: |z| <= @bailout default: title = "Nobunaga" magn = 1 param start caption = "Seed/Perturb" default = (0,0) endparam func f1 caption = "FunZ" default = conj() endfunc func f2 caption = "FunC" default = sqr() endfunc param k1 caption = "k1" default = (4,0) endparam param k2 caption = "k2" default = (.6,0) endparam param k3 caption = "k3" default = (.3,0) endparam param bailout caption = "Bailout" default = 4096 endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "Nobunaga" start = #pixel bailout = bailout f1 = f1 f2 = f2 k1 = k1 k2 = k2 k3 = k3 cu = sw sw = cu } LGNfeatbwp7 { ; This is not my formula; I give credit to the original creators. ;) ; Now you can see many variations, some of them very creative :D ; The final result is strongly affected by the bailout, change and see more :) ; Original formula - see BWP.UFM Thanx :) I added tweaks anyway... ; Bailout tests copied exactly from "FANTAISIE BAILOUT" MDE.UFM Thanx :) ; the PATH mode gives wonderful effects... Try it!!! init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif float phi = 0.0 int iter=0 float path = 0.0 float diff = 0.0 oldz = z float bailtest = 0.0 loop: phi = atan2(z)/#pi if phi < 0.0 phi = phi + 2.0 endif iter=iter+1 path = path + cabs(z) diff = cabs(z-oldz) oldz=z ; FORMULA START! if @zm == 0 z = tanh(z * @zk + c * @ck) - c * @val2 elseif @zm == 1 z = tan(z * @zk + c * @ck / iter) - c * @val2 elseif @zm == 2 z = tanh(z * @zk * (-1 ^ phi) + c * @ck) - c * @val2 endif if @cm == 0 c = recip(z * @val1) elseif @cm == 1 c = c * @ck + recip(z * @val1) elseif @cm == 2 c = c * (-1 ^ phi) + recip(z * @val1) endif ; FORMULA END... ;) if @test == 0 bailtest = |z| elseif @test == 1 bailtest = sqr(real(z)) elseif @test == 2 bailtest = sqr(imag(z)) elseif @test == 5 bailtest = sqr(abs(real(z)) + abs(imag(z))) elseif @test == 6 bailtest = sqr(real(z) + imag(z)) elseif @test == 7 bailtest = |z|+iter^2 elseif @test == 8 bailtest = |z|+phi^2 elseif @test == 9 bailtest = |z|+path^2 elseif @test == 10 bailtest = |z|+diff^2 elseif @test == 11 bailtest = sqr(abs(real(z))- abs(imag(z))) elseif @test == 12 bailtest = sqr(abs(real(z))* abs(imag(z))) elseif @test == 13 bailtest = sqr(abs(real(z))/ abs(imag(z))) elseif @test == 14 bailtest = sqr(abs(real(z))^ abs(imag(z))) elseif @test == 15 bailtest = sqr(abs(imag(z))^ abs(real(z))) endif bailout: (@test == 3 && @fnbl(sqr(real(z))) <= @bailout &&@fnbl(sqr(imag(z))) < @bailout) || \ (@test == 4 && @fnbl(sqr(real(z)) <= @bailout || @fnbl(sqr(imag(z))) < @bailout)) || \ (@test < 3 || @test >4) && @fnbl(bailtest) <= @bailout default: title = "BWP 07 (LGN remix)" param val1 caption = "Value 1" default = (50, 0) endparam param val2 caption = "Value 2" default = (1, 0) endparam param zk caption = "z fac" default = (1, 0) endparam param ck caption = "c fac" default = (.3, 0) endparam param zm caption = "z mode" enum = "Original" "New" "Twisted" endparam param cm caption = "c mode" enum = "Original" "New" "Twisted" endparam float param bailout caption = "Bailout Value" default = 8.0 endparam param test caption = "Bailout Test" enum = "mod" "real" "imag" "or" "and" "manh" "manr" "iter" "angle" \ "path" "diff" "minus" "product" "division" "real^imag" \ "imag^real" hint = "This gives a choice of test conditions for bailing out" endparam func fnbl caption = "Bailout Function" default = ident() hint = "To choose some function for further bailout tests" endfunc param start caption = "Start/Seed" default = (0,0) endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "LGNfeatbwp7" start = #pixel bailout = bailout zk = zk ck = ck cm = cm zm = zm val1 = val1 val2 = val2 test = test fnbl = fnbl sof = sof cu = sw sw = cu } opartManJul { ; This Mandelbrot variation has a contamination ; whenever z falls into geometric regions ; arranged in a lattice ; You can modify the shape in lots of ways! ; Many effects and tweaks are inspired by Vasarely's paintings. ; Initial release; 2 dec 2010. ; V3.50 - 11 dec 2010 - Ginger formula REMOVED, replaced with Barnsley ; and added Phoenix distortion for ALL fractal types! ; V3.60 - 12 dec 2010 - Added "Biomorph" variations + minor fix on Barny functions ; BAILOUT TESTS FROM FANTAISIE BAILOUT... THANK YOU SO MUCH! ; ORIGINAL CELTIC FORMULAS FROM MT.UFM... THANK YOU SO MUCH! ; ORIGINAL PHOENIX/BARNSLEY FORMULA; gnd-PhoenixBarnsley1M ... THANK YOU SO MUCH! ; I extended Phoenix distortion for all other types, it is a simple but great idea! init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif float px = @psz/100 float py = @ipsz/100 float OP = 0 float thet = 0 int NL = @pla bool watch=true int XX=0 int YY=0 int XXr=0 int YYr=0 float phi = 0.0 int iter=0 float path = 0.0 float diff = 0.0 oldz = z float bailtest = 0.0 float pu = 0 float zw = 0 float turbu = 0 if @pla==2 NL = 3 endif loop: phi = atan2(z)/#pi if phi < 0.0 phi = phi + 2.0 endif path = path + cabs(z) diff = cabs(z-oldz) oldz=z float zw = 0.0 ; main useful variables z1 = @gshi+z*@gzom*(0,1)^(@grot) z1 = z1 + @gara*imag(z*@gzom) + @gske*real(z*@gzom) z1 = z1 + @gvas*floor(imag(z*@gzom)) XX = floor(imag(z1)) YY = floor(real(z1)) ; Pseudorandom checkerboard. Inspired to Joker in mt.uf (but slightly changed!) XXr = sqr(XX*(XX+7) * (2473-XX) % 536 - 127*XX) % 65536 - 8019 YYr = sqr(YY*(YY-7) * (2473-YY) % 536 - 127*YY) % 65536 - 8017 ; I have to mix x&y to obtain a real randomness! XXr = sqr(XXr*YYr * 2473 % 65537 - 129*XXr + @seed ) % 65537 + floor(XXr/655) YYr = sqr(YYr*XXr * 2473 % 65535 - 129*YYr + @seed ) % 65537 + floor(YYr/655) XXr = XXr*XXr * 5381 % 65536 - @seed + floor(YYr/654) YYr = YYr*YYr * 5381 % 65536 - 8191 + floor(XXr/654) z1 = z1 - floor(z1) ;x = real(z1) ;y = imag(z1) z1 = (z1 - (.5,.5))* (0,1)^(1-4*@psk*0.5/NL) if @prt!=0 z1 = z1 * (0,1)^(@prt) endif if @randro==1 z1 = z1 * (0,1)^((XXr+YYr)%360/360) elseif @randro==2 z1 = z1 * (0,1)^(.5*((XXr+YYr)%2)) elseif @randro==3 z1 = z1 * (0,1)^(.25*((XXr+YYr)%4-2)) endif if @randsz==1 ; It's necessary reinit px&py ; Starting to 1 in randomness prevents disappearing of shapes :o px = @psz*(1+(XXr+YYr)%20/30)/100 py = @ipsz*(1+(XXr+YYr)%20/30)/100 elseif @randsz==2 px = @psz*(1+(XXr+YYr)%2/3)/100 py = @ipsz*(1+(XXr+YYr)%2/3)/100 ; Weird patterns; sometimes shapes disappear! elseif @randsz==3 px = @psz*((XXr+YYr)%2)/100 py = @ipsz*((XXr+YYr)%2)/100 elseif @randsz==4 px = @psz*((XXr+YYr)%20/10)/100 py = @ipsz*((XXr+YYr)%20/10)/100 endif if (@swirl!=0)||(@lgswi!=0) z1 = z1 * (0,1)^(@swirl*(cabs(z1)^.2)+@lgswi*log(1+cabs(z1))) endif OP = cabs(z1) thet = atan2(z1)/(2*#pi) if thet < 0.0 thet = thet + 2.0 endif ; Wave turbulence if @wavx!=0 turbu = sin(real(z1)*@wapx)/@wavx endif if @wavy!=0 turbu = turbu + cos(imag(z1)*@wapy)/@wavy endif pu = 1-@pinch*(@pincQ-OP) ; Polygonal general + grid + wave turbulence z1 = z1 * (0,1)^(1-4*floor(thet*NL)/NL) z1 = z1 * (0,1)^(1-4*@psk*0.5/NL) ; Shape axioms if (@pwt==1) zw = pu*(-(imag(z1))) elseif (@pwt==2) if imag(z1)>0 zw = pu*(-(real(z1* (0,1)^(-@ssharp)))) else zw = pu*(-(real(z1* (0,1)^(@ssharp)))) endif else zw = pu*(-(real(z1))) endif watch = (zw < (px + turbu)) if py > 0 watch = watch && (zw > (py + turbu)) endif if @reve watch = !watch endif if @chkb!=0 ; - - - - - if @chkb==1&&(XX+YY)%2==0 watch = !watch elseif @chkb==2&&(XX)%2==0 watch = !watch elseif @chkb==3&&(YY)%2==0 watch = !watch elseif @chkb==4 if (XXr+YYr)%2==0 watch = !watch endif ; squares elseif @chkb==5 if (|XX|>=|YY|) if (XX)%2==0 watch = !watch endif else if (YY)%2==0 watch = !watch endif endif ; linear elseif @chkb==6 if (|XX|>=|YY|) if (YY)%2==0 watch = !watch endif else if (XX)%2==0 watch = !watch endif endif endif ; - - - - - endif if watch if @newr z1 = @f1(z) * (-1^@rot) else z1 = @f1(z * (-1^@rot)) endif z1=z1*@zom else z1 = z endif if @ordz && iter==0 ; Don't draw unchanged shapes (order 0) z1 = z endif if @ordo && iter==1 ; Don't draw order 1 z1 = z endif if @fml==1 z = sqr(z+z1)/4 + c + @as*oldz elseif @fml==2 if iter%2==0 z = sqr(z) + c + @as*oldz else z = sqr(z1) + c + @as*oldz endif elseif @fml==3 ; Absolutely crazy, but has nice effects!!! if iter%2==0 z = sqr(real(z)+flip(imag(z1))) + c + @as*oldz else z = sqr(real(z1)+flip(imag(z))) + c + @as*oldz endif elseif @fml==4 z = (z*z1)^(@pow/2) + c + @as*oldz elseif @fml==5 z = ((z+z1)/2)^(@pow) + c + @as*oldz elseif @fml==6 z = z*z1 z = z - real(z) + abs(real(z)) - c + @as*(oldz-real(oldz)+ abs(real(oldz))) elseif @fml==7 z = sqr(z+z1)/4 z = z - real(z) + abs(real(z)) - c + @as*(oldz-real(oldz)+ abs(real(oldz))) elseif @fml==8 if iter%2==0 z = sqr(z) else z = sqr(z1) endif z = z - real(z) + abs(real(z)) - c + @as*(oldz-real(oldz)+ abs(real(oldz))) elseif @fml==9 if iter%2==0 z = sqr(real(z)+flip(imag(z1))) else z = sqr(real(z1)+flip(imag(z))) endif z = z - real(z) + abs(real(z)) - c + @as*(oldz-real(oldz)+ abs(real(oldz))) elseif @fml==10 z = 1.2*(((c+@fattr(c))/2 * sqrt(z*z1)) - c + @as*oldz) elseif @fml==11 z = 1.2*((c+@fattr(c))/2 *sqrt(sqr(z+z1)/4) - c + @as*oldz) elseif @fml==12 if iter%2==0 z = 1.2*((c+@fattr(c))/2 * sqrt(sqr(z)) - c + @as*oldz) else z = 1.2*((c+@fattr(c))/2 * sqrt(sqr(z1)) - c + @as*oldz) endif elseif @fml==13 if iter%2==0 z = 1.2*((c+@fattr(c))/2 * sqrt(sqr(real(z)+flip(imag(z1)))) - c + @as*oldz) else z = 1.2*((c+@fattr(c))/2 * sqrt(sqr(real(z1)+flip(imag(z)))) - c + @as*oldz) endif elseif @fml==14 if @biotype==1 z = .6*(z*z1)^(@pow/2) +.4*z1^(1+cabs(z)) + c + @as*oldz elseif @biotype==2 z = .6*(z*z1)^(@pow/2) +.2*z1^(2-z) +.2*z1^(1+cabs(z)) + c + @as*oldz else z = .6*(z*z1)^(@pow/2) +.4*z1^(2-z) + c + @as*oldz endif elseif @fml==15 if @biotype==1 z = .6*((z+z1)/2)^(@pow) +.4*z1^(1+cabs(z)) + c + @as*oldz elseif @biotype==2 z = .6*((z+z1)/2)^(@pow) +.2*z1^(2-z) +.2*z1^(1+cabs(z)) + c + @as*oldz else z = .6*((z+z1)/2)^(@pow) +.4*z1^(2-z) + c + @as*oldz endif z = ((z+z1)/2)^(@pow) + c + @as*oldz elseif @fml==16 if @biotype==1 z = .6*sqrt(z*z1)+.8*z1^(1+cabs(z)) elseif @biotype==2 z = .6*sqrt(z*z1)+.2*z1^(1+cabs(z))+.2*z^(2-z) else z = .6*sqrt(z*z1)+.4*z1^(2-z) endif z = ((c+@fattr(c))/2 * z) - c + @as*oldz elseif @fml==17 if @biotype==1 z = 1.2*sqrt(sqr(z+z1)/4)+.8*z1^(1+cabs(z)) elseif @biotype==2 z = 1.2*sqrt(sqr(z+z1)/4)+.4*z1^(1+cabs(z))+.4*z^(2-z) else z = 1.2*sqrt(sqr(z+z1)/4)+.8*z1^(2-z) endif z = ((c+@fattr(c))/2 * z) - c + @as*oldz elseif @fml==18 if iter%2==0 if @biotype==1 z = 1.2*sqrt(sqr(z))+.8*z^(1+cabs(z)) elseif @biotype==2 z = 1.2*sqrt(sqr(z))+.4*z^(1+cabs(z))+.4*z^(2-z) else z = 1.2*sqrt(sqr(z))+.8*z^(2-z) endif else if @biotype==1 z = 1.2*sqrt(sqr(z1))+.8*z1^(1+cabs(z1)) elseif @biotype==2 z = 1.2*sqrt(sqr(z1))+.4*z1^(1+cabs(z1))+.4*z^(2-z1) else z = 1.2*sqrt(sqr(z1))+.8*z1^(2-z1) endif endif z = ((c+@fattr(c))/2 * z) - c + @as*oldz elseif @fml==19 if iter%2==0 if @biotype==1 z = 1.2*sqrt(sqr(real(z)+flip(imag(z1))))+.8*z^(1+cabs(z)) elseif @biotype==2 z = 1.2*sqrt(sqr(real(z)+flip(imag(z1))))+.4*z^(1+cabs(z))+.4*z^(2-z) else z = 1.2*sqrt(sqr(real(z)+flip(imag(z1))))+.8*z^(2-z) endif else if @biotype==1 z = 1.2*sqrt(sqr(imag(z)+flip(real(z1))))+.8*z1^(1+cabs(z1)) elseif @biotype==2 z = 1.2*sqrt(sqr(imag(z)+flip(real(z1))))+.4*z1^(1+cabs(z1))+.4*z^(2-z1) else z = 1.2*sqrt(sqr(imag(z)+flip(real(z1))))+.8*z1^(2-z1) endif endif z = ((c+@fattr(c))/2 * z) - c + @as*oldz else z = z*z1 + c + @as*oldz endif if @pla==2 NL = NL+1 if @ordz && iter==0 ; Don't draw unchanged shapes (order 0) NL = 3 endif if @ordo && iter==1 ; Don't draw order 1 NL = 3 endif endif iter=iter+1 if @test == 0 bailtest = |z| elseif @test == 1 bailtest = sqr(real(z)) elseif @test == 2 bailtest = sqr(imag(z)) elseif @test == 5 bailtest = sqr(abs(real(z)) + abs(imag(z))) elseif @test == 6 bailtest = sqr(real(z) + imag(z)) elseif @test == 7 bailtest = |z|+iter^2 elseif @test == 8 bailtest = |z|+phi^2 elseif @test == 9 bailtest = |z|+path^2 elseif @test == 10 bailtest = |z|+diff^2 elseif @test == 11 bailtest = sqr(abs(real(z))- abs(imag(z))) elseif @test == 12 bailtest = sqr(abs(real(z))* abs(imag(z))) elseif @test == 13 bailtest = sqr(abs(real(z))/ abs(imag(z))) elseif @test == 14 bailtest = sqr(abs(real(z))^ abs(imag(z))) elseif @test == 15 bailtest = sqr(abs(imag(z))^ abs(real(z))) endif bailout: (@test == 3 && @fnbl(sqr(real(z))) <= @bailout &&@fnbl(sqr(imag(z))) < @bailout) || \ (@test == 4 && @fnbl(sqr(real(z)) <= @bailout || @fnbl(sqr(imag(z))) < @bailout)) || \ (@test < 3 || @test >4) && @fnbl(bailtest) <= @bailout default: title = "Op Art MCB+PJ" param fml caption = "Main formula" enum = "Mix" "Avg" "Altern" "AltEvil" \ "Mix^p" "Avg^p" "CelticMix" \ "CeltAvg" "CeltAlt" "CeltAltEvil" \ "BarnyMix" "BarnyAvg" "BarnyAlt" "BarnyAltEvil" \ "Bio+Mix^p" "Bio+Avg^p" \ "Bio+BarnyMix" "Bio+BarnyAvg" "Bio+BarnyAlt" "Bio+BarnyAltEvil" default = 0 endparam param pow caption = "pow" default = (2,0) visible=(@fml==4||@fml==5||@fml==14||@fml==15) endparam param as caption = "Phoenix distort" default = (0,0) endparam func fattr caption = "Barnsley f(c)" default = ident() visible=(@fml==10||@fml==11||@fml==12||@fml==13 \ ||@fml==16||@fml==17||@fml==18||@fml==19) endfunc param biotype caption = "Biomorph type" enum = "Regular" "Cabs" "Hybrid" visible=(@fml==14||@fml==15||@fml==16||@fml==17||@fml==18||@fml==19) endparam param start caption = "Seed/Perturb" default = (0,0) endparam bool param reve caption = "Reverse effect?" default = false endparam param chkb caption = "Odd-even" enum = "OFF" "Checkerboard" "X" "Y" "Crazy pattern" "Squared" "Linear" default = 0 hint="Some effects are awesome when poly size=0 and \ grid zoom = 10. Checkerboard is always good. Crazy pattern is affected by \ random seed, see Bailout & misc to change it." endparam bool param ordz caption = "Hide order 0?" default = true hint="Smoother plot, but abstract effect is less strong" endparam bool param ordo caption = "Hide order 1?" hint="Smoother plot, but abstract effect is less strong" endparam ; ---------------------------------------------------------------------------------- heading caption = "Poly modifiers" text = "Linear shape modifiers." expanded = false endheading param pwt caption = "Shape axiom" enum = "Poly" "Fan" "Star" default = 0 endparam float param ssharp caption = "Star sharpness" default = .4 min = 0 max = 1 hint="0 to 1 - be careful, more sharpness means bigger stars!" visible=(@pwt==2) endparam int param pla caption = "N° of sides" default = 4 min = 2 max = 100 hint="3 to 100 - To get circles use 100. 2 -> multishape (slower)" endparam float param psz caption = "Poly size" default = 25 min = 0 hint="If it doesn't draw well choose a lower value!" endparam float param prt caption = "Shape rotation" hint="-1 to 1. Use 0.125 to rotate 45°" default = 0 min=-1 max=1 endparam float param ipsz caption = "Frame effect" default = 0 min = 0 hint="If it doesn't draw well choose a lower value!" endparam float param psk caption = "Shape effect" default = 1 hint="It's funny change this!" endparam ; ---------------------------------------------------------------------------------- heading caption = "Poly mod 2" text = "Nonlinear modifiers. \ Warning; may affect poly size or destroy the shape itself." expanded = false endheading float param pinch caption = "Pinch/punch" default = 0 endparam float param pincQ caption = "Pinch factor" default = .4 hint="Adjust to change a bit the effect, don't mind!" visible=(@pinch!=0) endparam float param swirl caption = "Swirliness" default = 0 endparam float param lgswi caption = "Log-Swirl" default = 0 hint="Try to use together with regular swirl but with opposite sign \ to obtain nice effects" endparam float param wavx caption = "X wave soft" default = 0 hint="0=OFF; try high values" endparam float param wavy caption = "Y wave soft" default = 0 hint="0=OFF; try high values" endparam float param wapx caption = "X phase" default = 1 min = 0 visible=(@wavx!=0) endparam float param wapy caption = "Y phase" default = 1 min = 0 visible=(@wavy!=0) endparam ; ---------------------------------------------------------------------------------- heading caption = "Random art" expanded = false endheading param randro caption = "Rotations?" enum = "OFF" "Crazy" "Pattern" "Pattern 2" default = 0 endparam param randsz caption = "Sizes?" enum = "OFF" "Crazy" "Pattern" "Weird" "Weird & crazy" default = 0 endparam ; ---------------------------------------------------------------------------------- heading caption = "Cubist modifiers" expanded = false endheading func f1 caption = "Cubist function" default = sqrt() hint="Change it!" endfunc float param rot caption = "Cubist rotation" hint="-1 to 1. Use 0.125 to rotate 45°" default = 0 min=-1 max=1 endparam bool param newr caption = "Alternate rotation?" default = false visible=(@rot!=0) endparam float param zom caption = "Cubist zoom" default = 1 endparam ; ---------------------------------------------------------------------------------- heading caption = "Grid modifiers" expanded = false endheading float param grot caption = "Grid rotation" hint="-1 to 1. Use 0.125 to rotate 45°" default = 0 min=-1 max=1 endparam float param gzom caption = "Grid zoom" default = 1 endparam float param gske caption = "Asp. ratio changer" default = 0 endparam float param gara caption = "Skew" default = 0 endparam float param gvas caption = "Vasarely skew" hint="Use 0.5 to plot a hex lattice instead of a square one" default = 0 endparam param gshi caption = "Grid shift" default = (0,0) endparam ; ---------------------------------------------------------------------------------- heading caption = "Bailout & misc" expanded = false endheading param bailout caption = "Bailout" default = 100 endparam param test caption = "Bailout Test" enum = "mod" "real" "imag" "or" "and" "manh" "manr" "iter" "angle" \ "path" "diff" "minus" "product" "division" "real^imag" \ "imag^real" hint = "This gives a choice of test conditions for bailing out" endparam func fnbl caption = "Bailout Function" default = ident() hint = "To choose some function for further bailout tests" endfunc param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam int param seed caption = "Random seed" default = 7654321 endparam switch: type = "opartManJul" start = #pixel bailout = bailout test=test fnbl=fnbl chkb=chkb ordz=ordz ordo=ordo grot=grot randro=randro randsz=randsz gara=gara gske=gske gvas=gvas gzom=gzom gshi=gshi psz=psz ipsz=ipsz pinch=pinch pincQ=pincQ swirl=swirl lgswi=lgswi wavx=wavx wavy=wavy wapx=wapx wapy=wapy pla=pla psk=psk ssharp=ssharp pwt=pwt prt=prt reve=reve rot=rot zom=zom newr=newr f1=f1 fml=fml pow=pow cw=cw as=as fattr=fattr biotype=biotype cu = sw sw = cu seed=seed } insensatez { ; A surreal mixture of Mandelbrot, Julia and Spider concepts. ; The julia set ... is not a "normal" Julia set... ; The shapes generated are deformed in an unpredictable way... ; The fractal is NOT auto-similar... ; Dec 8, 2010 init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif l = z m = c n = @m4 z1=z loop: z1=z if @vz1==1 z = z*l elseif @vz1==2 z = z*cos(l) elseif @vz1==3 z = z*z*sqrt(1-sqr(l)) else z = z*z endif if @smok z=-z*((0,1)^(1-@wm/cabs(@wfu(n)))) else z=z endif z=z^(@pow/2) if @vz2==1 z = z + m + @f1(z1) elseif @vz2==2 z = z + m - @f1(z) elseif @vz2==3 z = z + m + @f1(z) elseif @vz2==4 z = z + m - ident(z1*@f1(z1)) elseif @vz2==5 z = z + m + ident(z1*@f1(z1)) else z = z + m - @f1(z1) endif if (n==0) n=1 endif l = z /(1+@f2(l)) + (real(@m0)*@m1+imag(@m0)*real(@ba^c))*l*(1+1/n) m = l /(1+@f2(m)) + (real(@m0)*@m2+imag(@m0)*imag(@ba^c))*m*(1+1/n) n = 1 + @m3/(l+m) bailout: |z| < @bailout default: title = "Insensatéz" param start caption = "Seed/Perturb" default = (0,0) endparam param bailout caption="Bailout Value" default=1000 endparam func f1 caption = "Additional f(z)" default = sin() endfunc func f2 caption = "f(l,m)" default = cabs() endfunc param vz1 caption = "Variéz 1" enum = "A" "B" "C" "D" default = 1 endparam param vz2 caption = "Variéz 2" enum = "A" "B" "C" "D" "E" "F" default = 0 endparam param ba caption = "Pow base" default = (3,0) endparam param pow caption = "Pow of z" default = (2,0) endparam param m4 caption = "Init" default = (1,0) hint = "This won't change the shape much." endparam param m1 caption = "Morph 1" default = (1,0) endparam param m2 caption = "Morph 2" default = (1,0) endparam param m3 caption = "Morph 3" default = (1,0) endparam bool param smok caption = "Hurricanes?" default = false endparam func wfu caption = "Wind func" default = ident() visible=(@smok==true) endfunc param wm caption = "Wind morph" default = (1,0) visible=(@smok==true) endparam param m0 caption = "Basic morph" default = (.3,.2) hint = "Don't change if you are not sure..." endparam param cu caption = "Current mode" enum = "Mandeléz" "Juliéz" default = 0 endparam param sw caption = "Switch to" enum = "Mandeléz" "Juliéz" default = 1 endparam switch: type = "insensatez" start = #pixel bailout = bailout f1=f1 f2=f2 ba=ba smok=smok wfu=wfu wm=wm vz1=vz1 vz2=vz2 pow=pow m0=m0 m1=m1 m2=m2 m3=m3 m4=m4 cu = sw sw = cu } barnsLGN { ; This formula is a powerful mixer of formulas & variations, taking ; as a base "Barnsley 1 & 2" of Fractint. But I extended many concepts here. ; Ringy formula (original name is Ring) and some other concepts are taken from mt.ufm, thanks! ; Durbish conditions are inspired to Durbidaa formulas, but I changed something. ; Qubeys are inspired by Qubex (a formula by Ruy Parracho) - but totally different! ; version 1.60 - IKENAY FORMULA BUGFIXED - Now works!!! (But is very different than before) ; added all cubey formulas and a Manowar type (customizable ;) ) ; version 1.70 - Added Orbit Boost, based on Damien Jones' Orbit Boost ; Gnarbuly is a mutation of the Gnarl formula, from my imagination. :) ; version 1.80 - added POY ORDER & SHIFT - Copied from "Polygonal Barnsley" - THANKS!!! init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif float x = 0 float y = 0 float x2 = 0 float y2 = 0 float u = 0 float v = 0 float t = 0 t0=0 typ0=0 t1=@thr1 t2=@thr2 bool maybe = false float am2 = 0 s = 0 zbak = z zold = z int numi=0 float d = 0, float radius2 = 0, float iradius = 0 ; TURN OFF WARNINGS if (@boostradius != 0) radius2 = sqr(@boostradius); pre-calc this iradius = 1/@boostradius; pre-calc this endif loop: arg = atan2(z) arg = -round(arg/(2*pi)*@order)/@order*(2*pi) z = z*exp(1i*(arg+pi*@as/180)) zold = zold*exp(1i*(arg+pi*@as/180)) if @condtyxy==1 x = imag(flip(|z-1.2i|)-1.8i) y = real(|z-1.2|-1.8) else x = imag(z) y = real(z) endif if @condtyuv==1 u = imag(flip(|z-1.2i|)-1.8i) v = real(|c-1.2|-1.8) else u = imag(c) v = real(c) endif x2=x , y2=y x=real(@prefx(x2)+@afx(y2)), y=real(@prefy(y2)+@afy(x2)) t = @fix+real(@fxy(@ix/100*x))+real(@fxy(@iy/100*y)) t = t+real(@fuv(@iu/100*u))+real(@fuv(@iv/100*v)) t = t+real(@f3(@ixv/100*x*v))+real(@f3(@iyu/100*y*u)) am2=@fixam/100 z = (1-am2)*z + am2*@fz(zold^@pow) if @rfixam>0 am2=u*u+v*v if am2>1 am2=1 elseif am2<0 am2=0 endif am2=am2*@rfixam/100 z = (1-am2)*z + am2*@fz(zold^@pow) endif am2 = @fixbi/100 if @biotype==1 z = (1-am2)*z+am2*zold^(2-zold) elseif @biotype==2 z = (1-am2)*z+am2*zold^(1+cabs(zold)) elseif @biotype==3 z = (1-am2)*z+am2/2*zold^(1+cabs(zold))+am2/2*zold^(2-zold) else z = z endif if (numi%@refresh==0) t1 = t1*@thm1, t2 = t2*@thm2 ; WARPING endif zinf=zold, fixer = @thr3 if @zinft==1 zinf=z elseif @zinft==2 fixer= fixer + z - zold endif if @condty == 0 maybe = (t > 0) else maybe = (t >= 0) endif if maybe t0=t1, typ0= @f1type else t0=t2, typ0= @f2type endif if typ0==1 z = (zinf + t0) * (zinf + c+@fattr(c))/2 + fixer elseif typ0==2 z = (zinf*zinf * t0) + (c+@fattr(c))/2 + fixer elseif typ0==3 z = (t0+zinf)*(t0-zinf)*(c+@fattr(c))/2 + fixer elseif typ0==4 z = (t0+zinf)*(zinf*zinf + c*(c+@fattr(c)-2)/2) + fixer ; IKENAGA BUGFIXED. ; BEFORE WAS; zinf*(...) elseif typ0==5 z = zinf^3 + zinf*(c+@fattr(c))/2 - zinf*t0 -(c+@fattr(c))/2 + fixer elseif typ0==6 z = (zinf*zinf * t0) + (c+@fattr(c))/2 + s s = |cabs(zinf) - .5 - fixer| elseif typ0==7 s = (zinf - sqrt( t0*t0 - 4)) / 2 z = 1/3*(s^3) + t0/2*(s*s) + s + 2*(c+@fattr(c))+ fixer elseif typ0==8 s = (sqrt( t0*t0 - 4) - t0 ) / 2 z = 1/3*(zinf^3) + t0/2*(zinf*zinf) + s*zinf + (c+@fattr(c))/2 + fixer elseif typ0==9 s = (sqrt( t0*t0 - 4) - t0 ) / 2 z = 1/3*(s*zinf^3) + t0/2*(zinf*zinf*s) + (s+zinf+c+@fattr(c))/2 + fixer elseif typ0==10 z = zinf*zinf + zbak*t0 + (c+@fattr(c))/2 + fixer elseif typ0==11 z = z+2i*(sin(x2-t0*sin(y2+cos(y2)))+1i*sin(y2-t0*sin(x2+cos(x2)))) + (c+@fattr(c))/2 + fixer else z = (z + t0) * (c+@fattr(c))/2 + fixer endif if (@boostradius != 0) d = |z - @boostcenter|; distance to boost area if (d < radius2); within threshold if (@boostmode == 0); displace (addition) z = z + @boostamount elseif (@boostmode == 1); orbit origin (multiply) z = z * @boostamount elseif (@boostmode == 2); orbit boost (multiply) z = (z-@boostcenter) * @boostamount + @boostcenter elseif (@boostmode == 3); flip out (reverse distance) d = 2*@boostradius/sqrt(d)-1 z = @boostcenter + (z-@boostcenter)*d*@boostamount elseif (@boostmode == 4); repel (reverse distance squared) d = 1-sqr(1-@boostradius/sqrt(d)) z = @boostcenter + (z-@boostcenter)*d*@boostamount elseif (@boostmode == 5); exponentiate origin (exponent) z = z ^ @boostamount elseif (@boostmode == 6); exponentiate boost (exponent) z = (z-@boostcenter) ^ @boostamount + @boostcenter elseif (@boostmode == 7); invert z = conj(iradius/(z-@boostcenter)) + @boostcenter elseif (@boostmode == 8); pass through z = z + 2*(z-@boostcenter)*@boostamount elseif (@boostmode == 9); pass through 2 z = z + 2*(@boostcenter-z)/cabs(@boostcenter-z)*@boostradius*@boostamount endif endif endif zbak = zold, zold = z, numi=numi+1 bailout: (|z| <= @bailout && |z| > @sbai) default: title = "Barnsley customizer" param start caption = "Seed/Perturb" default = (0,0) endparam heading caption = "Settings" expanded = false text = "When using non-normal formulas, set corresponding shift to 1 to see \ a 'correct' effect (otherwise you'll see new effects). \ Please note that some formulas are incorrectly implemented, \ but they still give good graphics." endheading param thr3 caption = "Extern shift" default = (0,0) endparam func fattr caption = "f(c)" default = ident() hint="Change strongly mset shape" endfunc func fz caption = "f(z)" default = ident() hint = "log, recip will not work too bad!" endfunc param pow caption = "Pow" default = (1,0) hint="If you change this, Barnsley-type shapes may disappear" endparam float param fixam caption = "% of f,p" hint="As long as f=ident and p=1 this has NO effect..." default = 10 min=0 max=100 endparam float param rfixam caption = "Rho% of f,p" hint="As long as f=ident and p=1 this has NO effect..." default = 0 min=0 max=100 endparam int param refresh caption = "Warp every" min=0 hint="0=always - Softens the effect of warps, \ can be used for interesting effects (mainly frac-in-frac). \ Remember that warp=1 means that warping is off! These effects \ normally need maxiter > 100 to be seen in a pleasant way (slow convergence)." default = 0 endparam param biotype caption = "Biomorph type" enum = "OFF" "Regular" "Cabs" "Hybrid" hint="If you change this, Barnsley-type shapes may disappear" default = 0 endparam float param fixbi caption = "% of bio" hint="Tries to limit biomorph effect" default = .5 min=0 max=100 endparam param zinft caption = "In formulas use" enum = "unchanged z" "f(z^p)" "z and fix f(z,p)" hint="This setting affects non-normal formulas \ only when you also change f(z) or Pow or you use biomorph; they'll be \ calculated in the specified way, as you wish. It is an 'advanced \ setting' and it don't affect the fractal much." default = 0 endparam param condty caption = "Precedence" enum = "R" "L" hint="This setting can fix some bugs, has a little effect otherwise." default = 0 endparam heading caption = "z&c tweaks L" expanded = false endheading param thr1 caption = "Shift L" default = (-1,0) endparam param thm1 caption = "Shift warper L" default = (1,0) hint="Stunning effects when you set values \ like 1.03 (in mset). Sometimes this param can make the fractal look 'rough'. \ 'Warp every' setting affects strongly the way this param works (you can use a \ wider range of values and see a lot of fantastic effects)." endparam param f1type caption = "Formula L" enum = "Normal" "WrongMandey" "Mandey" "Lambdy" "Ikenay1" "Ikenay2" "Ringy" \ "Qubey1" "Qubey2" "Qubey3" "Manowary" "Gnarbuly" hint="If you change this, Barnsley-type shapes may disappear" default = 0 endparam heading caption = "z&c tweaks R" expanded = false endheading param thr2 caption = "Shift R" default = (1,0) endparam param thm2 caption = "Shift warper R" default = (1,0) hint="Stunning effects when you set values \ like 1.03 (in mset). Sometimes this param can make the fractal look 'rough'. \ 'Warp every' setting affects strongly the way this param works (you can use a \ wider range of values and see a lot of fantastic effects)." endparam param f2type caption = "Formula R" enum = "Normal" "WrongMandey" "Mandey" "Lambdy" "Ikenay1" "Ikenay2" "Ringy" \ "Qubey1" "Qubey2" "Qubey3" "Manowary" "Gnarbuly" hint="If you change this, Barnsley-type shapes may disappear" default = 0 endparam heading caption = "Condition tweaks" expanded = false text = "Real part of functions is counted. \ 'Fix. factor' is called 'Thresold' in M.T.'s Barnsleyish formula. \ For Fractint's Barnsley 2 use 100% of xv & yu, others zero, and bailout = 4. \ To make work correctly Durbish conditions, select f.fac. = 1, use negative \ percentages." endheading param condtyxy caption = "Fashion (x,y)" enum = "Barnsley (squared)" "Durbish (circular)" default = 0 endparam param condtyuv caption = "Fashion (u,v)" enum = "Barnsley (squared)" "Durbish (circular)" default = 0 endparam func prefx caption = "x:=f(x)" default = ident() endfunc func afx caption = "x+=f(y)" default = zero() endfunc func prefy caption = "y:=f(y)" default = ident() endfunc func afy caption = "y+=f(x)" default = zero() endfunc float param fix caption = "Fixed factor" default = 0 endparam float param ix caption = "% of x" default = 0 endparam float param iy caption = "% of y" default = 100 endparam func fxy caption = "Func 1" default = ident() endfunc float param iu caption = "% of u" default = 0 endparam float param iv caption = "% of v" default = 0 endparam func fuv caption = "Func 2" default = ident() endfunc float param ixv caption = "% of xv" default = 0 endparam float param iyu caption = "% of yu" default = 0 endparam func f3 caption = "Func 3" default = ident() endfunc heading caption = "Polygonal effects" expanded = false endheading param order caption = "Polygon Order" default = (1,0) endparam param as caption = "Angle Shift" default = 0.0 endparam heading caption = "Orbit boost" expanded = false endheading param boostcenter caption = "B. Center" default = (0,0) hint = "This is the location of the boost area in the complex plane." endparam param boostradius caption = "B. Radius (0 = OFF)" default = 0.0 hint = "This is the size of the boost area. Try also negative values!" endparam param boostmode caption = "B. Mode" default = 0 enum = "displace" "orbit origin" "orbit boost" "flip out" "repel" \ "exponentiate origin" "exponentiate boost" "invert" "pass through" \ "pass through 2" hint = "Sets the type of effect when the orbit enters the boost area." endparam param boostamount caption = "B. Amount" default = (1,0) hint = "This is the amount to boost." endparam heading caption = "Bailout & misc" expanded = false endheading float param bailout caption = "Bailout" default = 100 endparam float param sbai caption = "Small bailout (0 = OFF)" default = 0 endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "barnsLGN" start = #pixel bailout = bailout sbai=sbai fattr=fattr fz=fz pow=pow thr1=thr1 thr2=thr2 thr3=thr3 thm1=thm1 thm2=thm2 f1type=f1type f2type=f2type biotype=biotype condtyxy=condtyxy condtyuv=condtyuv fixam=fixam rfixam=rfixam fixbi=fixbi fix=fix ix=ix iy=iy iu=iu iv=iv ixv=ixv iyu=iyu fxy=fxy fuv=fuv f3=f3 afx=afx afy=afy prefx=prefx prefy=prefy zinft=zinft condty=condty refresh=refresh boostcenter = boostcenter boostradius = boostradius boostmode = boostmode boostamount = boostamount mode = mode order = order as=as cu = sw sw = cu } barpinLGN { ; This formula is a variation of the classic Fractint's Sierpinski triangle, ; with a Barnsley flavor :D ... ( A simple z*c instead of z + c and a 'Barnsley' come out!) ; The basic concept is taken from Sierpinski01m in MAC.UFM, hybridated with ; my "Barnsley customizer" tweaks. A BIG thank to Marcelo Anelli! ; See that formula(s) for other infos. ; 22 DEC '09 WARPING BUGFIX and important bugfix in shifting ; 31 DEC '09 added POY ORDER & SHIFT - Copied from "Polygonal Barnsley" - THANKS!!! init: bool func logics(const bool h1,const bool h2, const int opcode) if opcode==0 return (h1) elseif opcode==1 return (h1 && h2) elseif opcode==2 return (h1 || h2) elseif opcode==3 return (h1 != h2) elseif opcode==4 return (h1 && (!h2)) elseif opcode==5 return (h1 || (!h2)) elseif opcode==6 return (h1 != (!h2)) elseif opcode==7 return (!h1) elseif opcode==8 return ((!h1) && h2) elseif opcode==9 return ((!h1) || h2) elseif opcode==10 return ((!h1) != h2) elseif opcode==11 return ((!h1) && (!h2)) elseif opcode==12 return ((!h1) || (!h2)) elseif opcode==13 return ((!h1) != (!h2)) else return false ; DUMMY! endif endfunc if @cu == 0 z = #pixel c = z else z = #pixel c = @start endif float x = 0 float y = 0 float x2 = 0 float y2 = 0 float u = 0 float v = 0 t0=0 int typ0=0 t1=@thr1 t2=@thr2 t3=@thrm bool maybe1 = false bool maybe2 = false float am2 = 0 s = 0 zbak = z zold = z int numi=0 float d = 0, float radius2 = 0, float iradius = 0 ; TURN OFF WARNINGS if (@boostradius != 0) radius2 = sqr(@boostradius); pre-calc this iradius = 1/@boostradius; pre-calc this endif loop: arg = atan2(z) arg = -round(arg/(2*pi)*@order)/@order*(2*pi) z = z * exp(1i*(arg+pi*@as/180)) zold = zold * exp(1i*(arg+pi*@as/180)) if @condtyxy==1 y = imag(flip(|z-1.2i|)-1.8i) * cabs(@convergence) x = real(|z-1.2|-1.8) * cabs(@convergence) else y = imag(z * @convergence) x = real(z * @convergence) endif x2=x , y2=y x=real(@prefx(x2)+@afx(y2)), y=real(@prefy(y2)+@afy(x2)) z = z * @convergence ;if @condtyuv==1 ;u = imag(flip(|z-1.2i|)-1.8i) ;v = real(|c-1.2|-1.8) ;else u = imag(c) v = real(c) ;endif ;t = @fix+real(@fxy(@ix/100*x))+real(@fxy(@iy/100*y)) ;t = t+real(@fuv(@iu/100*u))+real(@fuv(@iv/100*v)) ;t = t+real(@f3(@ixv/100*x*v))+real(@f3(@iyu/100*y*u)) am2=@fixam/100 z = (1-am2)*z + am2*@fz(zold^@pow) if @rfixam>0 am2=u*u+v*v if am2>1 am2=1 elseif am2<0 am2=0 endif am2=am2*@rfixam/100 z = (1-am2)*z + am2*@fz(zold^@pow) endif am2 = @fixbi/100 if @biotype==1 z = (1-am2)*z+am2*zold^(2-zold) elseif @biotype==2 z = (1-am2)*z+am2*zold^(1+cabs(zold)) elseif @biotype==3 z = (1-am2)*z+am2/2*zold^(1+cabs(zold))+am2/2*zold^(2-zold) else z = z endif if (numi%@refresh==0) t1 = t1*@thm1, t3 = t3*@thmm ; WARPING if (@copyfromL == 0) t2 = t2*@thm2 else t2 = t1 ; BUGFIX! endif endif zinf=zold, fixer = @thr3 if @zinft==1 zinf=z elseif @zinft==2 fixer= fixer + z - zold endif maybe1 = logics( (-@fix1a*@c_e+@ix1a/100*x+@iy1a/100*y > 0), \ (-@fix1b*@c_e+@ix1b/100*x+@iy1b/100*y > 0),@op1) maybe2 = logics( (-@fix2a*@c_e+@ix2a/100*x+@iy2a/100*y > 0), \ (-@fix2b*@c_e+@ix2b/100*x+@iy2b/100*y > 0),@op2) t0=t3 ; typ0 unassigned - has no sense here if maybe1 t0=t1, typ0= @f1type endif if maybe2 if (@copyfromL == 1) t0=t0+flip(t1), typ0= @f1type ; FLIP elseif (@copyfromL == 2) t0=t1, typ0= @f1type ; UNCHANGED elseif (@copyfromL == 3) typ0= @f1type if (typ0<2), t0=t0+flip(t1), else, t0=t1, endif ; SMART else t0=t0+t2, typ0= @f2type endif endif if (maybe1 == maybe2) typ0= @fmtype ; AUTOFIX endif if typ0==1 z = (z + t0) * (c+@fattr(c))/2 + fixer ; SIERPINSKI TRIANGLE BARNSLEY FASHION elseif typ0==2 z = (zinf + t0) * (zinf + c+@fattr(c))/2 + fixer elseif typ0==3 z = (zinf*zinf * t0) + (c+@fattr(c))/2 + fixer elseif typ0==4 z = (t0+zinf)*(t0-zinf)*(c+@fattr(c))/2 + fixer elseif typ0==5 z = (t0+zinf)*(zinf*zinf + c*(c+@fattr(c)-2)/2) + fixer ; IKENAGA BUGFIXED. ; BEFORE WAS; zinf*(...) elseif typ0==6 z = zinf^3 + zinf*(c+@fattr(c))/2 - zinf*t0 -(c+@fattr(c))/2 + fixer elseif typ0==7 z = (zinf*zinf * t0) + (c+@fattr(c))/2 + s s = |cabs(zinf) - .5 - fixer| elseif typ0==8 s = (zinf - sqrt( t0*t0 - 4)) / 2 z = 1/3*(s^3) + t0/2*(s*s) + s + 2*(c+@fattr(c))+ fixer elseif typ0==9 s = (sqrt( t0*t0 - 4) - t0 ) / 2 z = 1/3*(zinf^3) + t0/2*(zinf*zinf) + s*zinf + (c+@fattr(c))/2 + fixer elseif typ0==10 s = (sqrt( t0*t0 - 4) - t0 ) / 2 z = 1/3*(s*zinf^3) + t0/2*(zinf*zinf*s) + (s+zinf+c+@fattr(c))/2 + fixer elseif typ0==11 z = zinf*zinf + zbak*t0 + (c+@fattr(c))/2 + fixer elseif typ0==12 z = zinf+2i*(sin(x2-t0*sin(y2+cos(y2)))+1i*sin(y2-t0*sin(x2+cos(x2)))) + (c+@fattr(c))/2 + fixer else z = (z + t0) + (c+@fattr(c))/2 + fixer ; CANONIC SIERPINSKI TRIANGLE (ifs) endif z = (1-@postperc/100)*z + @postperc/100*@postf(@postfr(real(z)) \ + @postfi(flip(imag(z)))) if (@boostradius != 0) d = |z - @boostcenter|; distance to boost area if (d < radius2); within threshold if (@boostmode == 0); displace (addition) z = z + @boostamount elseif (@boostmode == 1); orbit origin (multiply) z = z * @boostamount elseif (@boostmode == 2); orbit boost (multiply) z = (z-@boostcenter) * @boostamount + @boostcenter elseif (@boostmode == 3); flip out (reverse distance) d = 2*@boostradius/sqrt(d)-1 z = @boostcenter + (z-@boostcenter)*d*@boostamount elseif (@boostmode == 4); repel (reverse distance squared) d = 1-sqr(1-@boostradius/sqrt(d)) z = @boostcenter + (z-@boostcenter)*d*@boostamount elseif (@boostmode == 5); exponentiate origin (exponent) z = z ^ @boostamount elseif (@boostmode == 6); exponentiate boost (exponent) z = (z-@boostcenter) ^ @boostamount + @boostcenter elseif (@boostmode == 7); invert z = conj(iradius/(z-@boostcenter)) + @boostcenter elseif (@boostmode == 8); pass through z = z + 2*(z-@boostcenter)*@boostamount elseif (@boostmode == 9); pass through 2 z = z + 2*(@boostcenter-z)/cabs(@boostcenter-z)*@boostradius*@boostamount endif endif endif zbak = zold, zold = z, numi=numi+1 bailout: (|z| < @bailout && |z| > @sbai) default: title = "Pinsky's Bar customizer" param start caption = "Seed/Perturb" default = (0,0) endparam param convergence caption = "Convergence" hint = "Standard Sierpinski factor is 2. \ But you can choose anything here; the imaginary part twists the shapes." default = (1,0) endparam float param c_e caption = "Cut factor" hint = "This is a multiplier for all edges. \ You can manipulate it, or go to manually \ change the axiom, as you like." default = 1 endparam heading caption = "Settings" expanded = false text = "Please note that this implementation of Sierpinski's triangle \ is not symmetric in the 'standard' way, so \ you will not get symmetric fractals, but with strange shapes (and it's normal). \ When using non-normal formulas, set corresponding shift to 1 to see \ a 'correct' effect (otherwise you'll see new effects). \ Please note that some formulas are incorrectly implemented, \ but they still give good graphics." endheading param thr3 caption = "Extern shift" default = (0,0) endparam func fattr caption = "f(c)" default = ident() hint="Change strongly mset shape" endfunc func fz caption = "f(z)" default = ident() hint = "log, recip will not work too bad!" endfunc param pow caption = "Pow" default = (1,0) hint="If you change this, Barnsley-type shapes may disappear" endparam float param fixam caption = "% of f,p" hint="As long as f=ident and p=1 this has NO effect..." default = 10 min=0 max=100 endparam float param rfixam caption = "Rho% of f,p" hint="As long as f=ident and p=1 this has NO effect..." default = 0 min=0 max=100 endparam int param refresh caption = "Warp every" min=0 hint="0=always - Softens the effect of warps, \ can be used for interesting effects (mainly frac-in-frac). \ Remember that warp=1 means that warping is off! These effects \ normally need maxiter > 100 to be seen in a pleasant way (slow convergence)." default = 0 endparam param biotype caption = "Biomorph type" enum = "OFF" "Regular" "Cabs" "Hybrid" hint="If you change this, Barnsley-type shapes may disappear" default = 0 endparam float param fixbi caption = "% of bio" hint="Tries to limit biomorph effect" default = .5 min=0 max=100 endparam param zinft caption = "In formulas use" enum = "unchanged z" "f(z^p)" "z and fix f(z,p)" hint="This setting affects non-normal formulas \ only when you also change f(z) or Pow or you use biomorph; they'll be \ calculated in the specified way, as you wish. It is an 'advanced \ setting' and it don't affect the fractal much." default = 0 endparam heading caption = "z&c tweaks middle" expanded = false endheading param thrm caption = "Shift m" default = (0,0) endparam param thmm caption = "Shift warper m" default = (1,0) hint="Stunning effects when you set values \ like 1.03 (in mset). Sometimes this param can make the fractal look 'rough'. \ 'Warp every' setting affects strongly the way this param works (you can use a \ wider range of values and see a lot of fantastic effects)." endparam param fmtype caption = "Formula m" enum = "Sierpinski" "Pinski's Bar" "WrongMandey" "Mandey" "Lambdy" "Ikenay1" "Ikenay2" "Ringy" \ "Qubey1" "Qubey2" "Qubey3" "Manowary" "Gnarbuly" hint="If you change this, Barnsley-type shapes may disappear" default = 1 endparam heading caption = "z&c tweaks L" expanded = false endheading param thr1 caption = "Shift L" default = (-1,0) endparam param thm1 caption = "Shift warper L" default = (1,0) hint="Stunning effects when you set values \ like 1.03 (in mset). Sometimes this param can make the fractal look 'rough'. \ 'Warp every' setting affects strongly the way this param works (you can use a \ wider range of values and see a lot of fantastic effects)." endparam param f1type caption = "Formula L" enum = "Sierpinski" "Pinski's Bar" "WrongMandey" "Mandey" "Lambdy" "Ikenay1" "Ikenay2" "Ringy" \ "Qubey1" "Qubey2" "Qubey3" "Manowary" "Gnarbuly" hint="If you change this, Barnsley-type shapes may disappear" default = 1 endparam heading caption = "z&c tweaks R" text = "AUTO and unchanged modes are reccomended when using non-standard \ functions in L part (Sierpinski formula uses vector sums that alter values).\ However you may want to try something else." expanded = false endheading param copyfromL caption = "Copy from L" enum = "OFF" "ON (+flip)" "ON (unchanged)" "AUTO" default = 3 ; SMART mode endparam param thr2 caption = "Shift R" visible = (@copyfromL == 0) default = (0,-1) endparam param thm2 caption = "Shift warper R" visible = (@copyfromL == 0) default = (1,0) hint="Stunning effects when you set values \ like 1.03 (in mset). Sometimes this param can make the fractal look 'rough'. \ 'Warp every' setting affects strongly the way this param works (you can use a \ wider range of values and see a lot of fantastic effects)." endparam param f2type caption = "Formula R" visible = (@copyfromL == 0) enum = "Sierpinski" "Pinski's Bar" "WrongMandey" "Mandey" "Lambdy" "Ikenay1" "Ikenay2" "Ringy" \ "Qubey1" "Qubey2" "Qubey3" "Manowary" "Gnarbuly" hint="If you change this, Barnsley-type shapes may disappear" default = 1 endparam heading caption = "Post z retouch" text = "Classic z post-functions, global and for real&imag part of z. \ Retouch = abs() gives a 4 way symmetry (Sierpinski square)." expanded = false endheading func postf caption = "Retouch" default = ident() endfunc func postfr caption = "Re:=f(Re)" default = ident() endfunc func postfi caption = "Im:=f(Im)" default = ident() endfunc float param postperc caption = "Influence" default = 100 max=100 min=0 endparam heading caption = "Axiom tweaks" expanded = false text = "To make work correctly Durbish conditions, select edges = 1, use negative \ percentages (-100%). Final tip; test the tweaks on the simple Sierpinski \ triangle (that has convergence = 2) \ to see the basic effect, then edventually change formulas too." endheading param condtyxy caption = "Fashion (x,y)" enum = "Barnsley (squared)" "Durbish (circular)" default = 0 endparam func prefx caption = "x:=f(x)" default = ident() endfunc func afx caption = "x+=f(y)" default = zero() endfunc func prefy caption = "y:=f(y)" default = ident() endfunc func afy caption = "y+=f(x)" default = zero() endfunc param op1 caption = "Opcode 1" enum = "RETN a" "a AND b" "a OR b" "a XOR b" \ "a AND !b" "a OR !b" "a XOR !b" \ "RETN !a" "!a AND b" "!a OR b" "!a XOR b" \ "!a AND !b" "!a OR !b" "!a XOR !b" default = 4 endparam float param fix1a caption = "Edge 1a" default = 1 endparam float param ix1a caption = "% of x 1a" default = 100 endparam float param iy1a caption = "% of y 1a" default = 0 endparam float param fix1b caption = "Edge 1b" visible = (@op1!=0) default = 1 endparam float param ix1b caption = "% of x 1b" visible = (@op1!=0) default = 0 endparam float param iy1b caption = "% of y 1b" visible = (@op1!=0) default = 100 endparam param op2 caption = "Opcode 2" enum = "RETN a" "a AND b" "a OR b" "a XOR b" \ "a AND !b" "a OR !b" "a XOR !b" \ "RETN !a" "!a AND b" "!a OR b" "!a XOR b" \ "!a AND !b" "!a OR !b" "!a XOR !b" default = 0 endparam float param fix2a caption = "Edge 2a" default = 1 endparam float param ix2a caption = "% of x 2a" default = 0 endparam float param iy2a caption = "% of y 2a" default = 100 endparam float param fix2b caption = "Edge 2b" visible = (@op2!=0) default = 1 endparam float param ix2b caption = "% of x 2b" visible = (@op2!=0) default = 100 endparam float param iy2b caption = "% of y 2b" visible = (@op2!=0) default = 100 endparam heading caption = "Polygonal effects" expanded = false endheading param order caption = "Polygon Order" default = (1,0) endparam param as caption = "Angle Shift" default = 0.0 endparam heading caption = "Orbit boost" expanded = false endheading param boostcenter caption = "B. Center" default = (0,0) hint = "This is the location of the boost area in the complex plane." endparam param boostradius caption = "B. Radius (0 = OFF)" default = 0.0 hint = "This is the size of the boost area. Try also negative values!" endparam param boostmode caption = "B. Mode" default = 0 enum = "displace" "orbit origin" "orbit boost" "flip out" "repel" \ "exponentiate origin" "exponentiate boost" "invert" "pass through" \ "pass through 2" hint = "Sets the type of effect when the orbit enters the boost area." endparam param boostamount caption = "B. Amount" default = (1,0) hint = "This is the amount to boost." endparam heading caption = "Bailout & misc" expanded = false endheading float param bailout caption = "Bailout" default = 100 endparam float param sbai caption = "Small bailout (0 = OFF)" default = 0 endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "barpinLGN" start = #pixel bailout = bailout convergence = convergence c_e=c_e sbai=sbai fattr=fattr fz=fz pow=pow thr1=thr1 thr2=thr2 thr3=thr3 thm1=thm1 thm2=thm2 thrm=thrm thmm=thmm f1type=f1type f2type=f2type fmtype=fmtype biotype=biotype condtyxy=condtyxy fixam=fixam rfixam=rfixam fixbi=fixbi fix1a=fix1a fix1b=fix1b fix2a=fix2a fix2b=fix2b afx=afx afy=afy prefx=prefx prefy=prefy ix1a=ix1a ix1b=ix1b ix2a=ix2a ix2b=ix2b iy1a=iy1a iy1b=iy1b iy2a=iy2a iy2b=iy2b op1=op1 op2=op2 postf=postf postfr=postfr postfi=postfi postperc=postperc copyfromL=copyfromL zinft=zinft refresh=refresh boostcenter = boostcenter boostradius = boostradius boostmode = boostmode boostamount = boostamount mode = mode order = order as=as cu = sw sw = cu } lgnGnarbulous { ; Tip! To plot this you need to change the gradient in 'inside' tab. ; Never bailout, entirely itercount-controlled ; Gnarbulous attractor is 'inspired' to Gnarl formulas, but it's ; less regular, so effects are less predictable. ; If you use non-zero imaginary parts, you will see strange things. init: ;int numite = 0 z = #pixel + @start float x = imag(z) float y = real(z) int n_iter = 0 , int flavor = @flava loop: ; Iterate the Gnarbulous formula xx = x n_iter = n_iter + 1 if @mixer flavor = @flava + floor(n_iter * .25) flavor = flavor % 3 endif if flavor == 0 x = y + @h * real( sin(@c*x + (@fl0s1-.5)* 2 * sin( y + (@fl0s2-.5)* 2 * @a * cos (y) )) ) y = x + @h * real( sin(@c*y + (@fl0s3-.5)* 2 * sin( xx + (@fl0s4-.5)* 2 * @b * cos (xx) )) ) elseif flavor == 1 x = y + @h * cabs( cos(x + (@fl1s1-.5)* 2 * @c*sin( @a * y + (@fl1s2-.5)* 2 * cos (y) )) ) y = x + @h * cabs( cos(y + (@fl1s3-.5)* 2 * @c*sin( @b * xx + (@fl1s4-.5)* 2 * cos (xx) )) ) elseif flavor == 2 x = x + @h * real( sin(@a * x + (@fl2s1-.5)* 2 * cos( @c*y + (@fl2s2-.5)* 2 * sin (@b * y) )) ) y = y + @h * real( sin(@a * y + (@fl2s3-.5)* 2 * cos( @c*xx + (@fl2s4-.5)* 2 * sin (@b * xx) )) ) else float newx = y float newy = x int i = 0 while i < flavor i = i + 1 newx = x + real( sin(@c*x - sin( y + @a * cos (y) )) ) newy = y + real( sin(@c*y - sin( xx + @b * cos (xx) )) ) endwhile x = x + @h * sin(newx) y = y + @h * sin(newy) endif z = x + flip(y) ;z = z^@zp+@fc1*(sin(@fc2*x2-@fc3*sin(y2+@fc5*cos(y2)))+ \ ;1i*sin(@fc2*y2-@fc4*sin(x2+@fc6*cos(x2)))) + c ;numite = numite + 1 bailout: true ;n_iter < @max_iterations default: title = "Gnarbulous Attractor" maxiter = 10 param start caption = "Seed" default = (0,0) endparam int param flava caption = "Flavour" default = 0 endparam bool param mixer caption = "Flavour mixer?" default = false endparam float param h caption = "Step size" default = .05 endparam param a caption = "Alpha" default = (3,0) endparam param b caption = "Beta" default = (3,0) endparam param c caption = "Gamma" default = (1,0) endparam heading caption = "Flavor zero" expanded = false endheading param fl0s1 caption = "Sign 1" enum = "-" "+" default = 0 endparam param fl0s2 caption = "Sign 2" enum = "-" "+" default = 1 endparam param fl0s3 caption = "Sign 3" enum = "-" "+" default = 0 endparam param fl0s4 caption = "Sign 4" enum = "-" "+" default = 1 endparam heading caption = "Flavor one" expanded = false endheading param fl1s1 caption = "Sign 1" enum = "-" "+" default = 0 endparam param fl1s2 caption = "Sign 2" enum = "-" "+" default = 1 endparam param fl1s3 caption = "Sign 3" enum = "-" "+" default = 0 endparam param fl1s4 caption = "Sign 4" enum = "-" "+" default = 1 endparam heading caption = "Flavor two" expanded = false endheading param fl2s1 caption = "Sign 1" enum = "-" "+" default = 0 endparam param fl2s2 caption = "Sign 2" enum = "-" "+" default = 1 endparam param fl2s3 caption = "Sign 3" enum = "-" "+" default = 0 endparam param fl2s4 caption = "Sign 4" enum = "-" "+" default = 1 endparam } randLGN003 { ; Ideas of how to customize the formula comes from tma2.ufm, ; but this is my formula, and I used many new concepts ; I don't exausted all possible variations, however! (54 variations in current version) init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif z0 = z z1 = z z2 = z z3 = z zbak=z oldz=z loop: complex func pickvar(const int sel,const complex z,const complex c, \ const complex zbak, const complex z1,const complex z2,const complex z3) temp=(0,0) if sel == 0 return z elseif sel == 1 return z1 elseif sel == 2 return z2 elseif sel == 3 return z3 elseif sel == 4 if (|c|<|z|), return c, else, return z, endif elseif sel == 5 if (|c|>|z|), return c, else, return z, endif elseif sel == 6 return z+c elseif sel == 7 return (z-c) elseif sel == 8 return z*c elseif sel == 9 return z/c elseif sel == 10 return sqrt(cabs(1+z^2+c^2)) elseif sel == 11 return sqrt(cabs(1-z^2+c^2)) elseif sel == 12 return sqrt(cabs(1+z^2-c^2)) elseif sel == 13 return sqrt(cabs(1-z^2-c^2)) elseif sel == 14 return sqrt(c^2-4*z1*z2) elseif sel == 15 return sqrt(c^2-4*z2*z3) elseif sel == 16 return sqrt(c^2-4*z1*z3) elseif sel == 17 return c^z elseif sel == 18 return z^c elseif sel == 19 return (1+1/c)^z elseif sel == 20 return (1+1/c)^zbak elseif sel == 21 return log(exp(c)+exp(z)) elseif sel == 22 return (z*atan2(c)) elseif sel == 23 return (c*atan2(z)) elseif sel == 24 return (cabs(z)+flip(atan2(c))) elseif sel == 25 return (cabs(c)+flip(atan2(z))) elseif sel == 26 return real(z)+flip(imag(c)) elseif sel == 27 return real(z)-flip(imag(c)) elseif sel == 28 return real(z)*flip(imag(c)) elseif sel == 29 return real(z)/flip(imag(c)) elseif sel == 30 return real(z*c)+flip(imag(z+c)) elseif sel == 31 return real(z*c)+flip(imag(c-z)) elseif sel == 32 return real(z+c)+flip(imag(z*c)) elseif sel == 33 return real(c-z)+flip(imag(z*c)) elseif sel == 34 return imag(z)+flip(real(c)) elseif sel == 35 return imag(z)-flip(real(c)) elseif sel == 36 return imag(z)*flip(real(c)) elseif sel == 37 return imag(z)/flip(real(c)) elseif sel == 38 return imag(z*c)+flip(real(z+c)) elseif sel == 39 return imag(z*c)+flip(real(c-z)) elseif sel == 40 return imag(z+c)+flip(real(z*c)) elseif sel == 41 return imag(c-z)+flip(real(z*c)) elseif sel == 42 return (z+z1)/2 elseif sel == 43 if (|z1|<|z|), return z1, else, return z, endif elseif sel == 44 if (|z1|>|z|), return z1, else, return z, endif elseif sel == 45 return (z+z2)/2 elseif sel == 46 if (|z2|<|z|), return z2, else, return z, endif elseif sel == 47 if (|z2|>|z|), return z2, else, return z, endif elseif sel == 48 return (z+z3)/2 elseif sel == 49 if (|z3|<|z|), return z3, else, return z, endif elseif sel == 50 if (|z3|>|z|), return z3, else, return z, endif elseif sel == 51 return (z+zbak)/2 elseif sel == 52 if (|zbak|<|z|), return zbak, else, return z, endif elseif sel == 53 if (|zbak|>|z|), return zbak, else, return z, endif elseif sel == 54 return (z+z1+z2+z3)/4 elseif sel == 55 if (|z1|<|z|), temp = z1, else, temp = z , endif if (|z2|<|temp|), temp = z2, endif if (|z3|<|temp|), temp = z3, endif return temp elseif sel == 56 if (|z1|>|z|), temp = z1, else, temp = z , endif if (|z2|>|temp|), temp = z2, endif if (|z3|>|temp|), temp = z3, endif return temp elseif sel == 57 return (z+c+zbak)/3 elseif sel == 58 return (z+c+z1+z2+z3+zbak)/6 endif return -9999 endfunc z=real(@prefx(real(z)+@afx(imag(z))))+ flip(real(@prefy(imag(z))+@afy(real(z)))) z0 = pickvar(@mode1,z,c,zbak,z1,z2,z3) z1 = z0^@pow + (zbak^@manop1)*@manof1 + @phof1*c*(z^@phop1) + c z0 = pickvar(@mode2,z,c,zbak,z1,z2,z3) z2 = z0^(2+@a1)/(@b1+z0^(@a1*@c1)) + c z0 = pickvar(@mode3,z,c,zbak,z1,z2,z3) z3 = z0^@pow3 + c^(1+@a2)/(@b2+c^(@a2*@c2)) if @modez==1 z = (z1^@w1*(z2^@w2)*(z3^@w3))^(1/(@w1+@w2+@w3)) else z = ((@w1*(z1^@ap)+@w2*(z2^@ap)+@w3*(z3^@ap))/(@w1+@w2+@w3))^(1/@ap) endif z0 = pickvar(@modesp,z,c,zbak,z1,z2,z3) c=@spiderf2*c+@spiderf1*z0 zbak=oldz oldz=z bailout: (|pickvar(@modeba,z,-9999,zbak,z1,z2,z3)| <= @bailout) && (|z-zbak| > @cbail) default: title = "ExoticPoly mixer" magn=.5 param start caption = "Seed/Perturb" default = (0,0) endparam param modeba caption = "Bailout variable" enum = "z" "z1 (Mandel)" "z2 (Var.1)" "z3 (Var.2)" default = 0 endparam float param bailout caption = "Bailout" hint = "High values if you use smooth outside" default = 1024 endparam float param cbail caption = "Convg.bail. (-1=OFF)" hint = "1e-6 is a good value" default = -1 endparam heading caption = "ExoticPoly modes" text = "Re/Im modes (and maybe others) perturb internal magnitude. \ Perturbated zones are very noisy with standard params. \ To see the perturbations use 'Magnitude' or 'Pseudo Lyapunov' \ as Inside options (or use convergent bailout), then set maxiter = 10 to 50. \ Some perturbations are \ very interesting to see. Min/Max modes are incompatible with 'Smooth' coloring." expanded = false endheading param mode1 caption = "In Mandel use" enum = "z" "z1 (Mandel)" "z2 (Var.1)" "z3 (Var.2)" \ "Min(z,c)" "Max(z,c)" "z+c" "z-c" "z*c" "z/c" \ "sqrt|1+z^2+c^2|" "sqrt|1-z^2+c^2|" "sqrt|1+z^2-c^2|" "sqrt|1-z^2-c^2|" \ "sqrt(c^2-4*z1*z2)" "sqrt(c^2-4*z2*z3)" "sqrt(c^2-4*z1*z3)" \ "c^z" "z^c" "(1+1/c)^z" "(1+1/c)^zbak" "log(exp(c)+exp(z))" \ "z*angle(c)" "c*angle(z)" \ "cabs(z)+ i*angle(c)" "cabs(c)+ i*angle(z)" \ "Re(z)+Im(c)" "Re(z)-Im(c)" "Re(z)*Im(c)" "Re(z)/Im(c)" \ "Re(z*c)+Im(z+c)" "Re(z*c)+Im(c-z)" "Re(z+c)+Im(z*c)" "Re(c-z)+Im(c*z)" \ "Im(z)+Re(c)" "Im(z)-Re(c)" "Im(z)*Re(c)" "Im(z)/Re(c)" \ "Im(z*c)+Re(z+c)" "Im(z*c)+Re(c-z)" "Im(z+c)+Re(z*c)" "Im(c-z)+Re(c*z)" \ "Mix(z,z1)" "Min(z,z1)" "Max(z,z1)" \ "Mix(z,z2)" "Min(z,z2)" "Max(z,z2)" \ "Mix(z,z3)" "Min(z,z3)" "Max(z,z3)" \ "Mix(z,zbak)" "Min(z,zbak)" "Max(z,zbak)" \ "Mix(z,z1,z2,z3)" "Min(z,z1,z2,z3)" "Max(z,z1,z2,z3)" "Mix(z,c,zbak)" "Mix(everything)" default = 0 endparam param mode2 caption = "In var.1 use" enum = "z" "z1 (Mandel)" "z2 (Var.1)" "z3 (Var.2)" \ "Min(z,c)" "Max(z,c)" "z+c" "z-c" "z*c" "z/c" \ "sqrt|1+z^2+c^2|" "sqrt|1-z^2+c^2|" "sqrt|1+z^2-c^2|" "sqrt|1-z^2-c^2|" \ "sqrt(c^2-4*z1*z2)" "sqrt(c^2-4*z2*z3)" "sqrt(c^2-4*z1*z3)" \ "c^z" "z^c" "(1+1/c)^z" "(1+1/c)^zbak" "log(exp(c)+exp(z))" \ "z*angle(c)" "c*angle(z)" \ "cabs(z)+ i*angle(c)" "cabs(c)+ i*angle(z)" \ "Re(z)+Im(c)" "Re(z)-Im(c)" "Re(z)*Im(c)" "Re(z)/Im(c)" \ "Re(z*c)+Im(z+c)" "Re(z*c)+Im(c-z)" "Re(z+c)+Im(z*c)" "Re(c-z)+Im(c*z)" \ "Im(z)+Re(c)" "Im(z)-Re(c)" "Im(z)*Re(c)" "Im(z)/Re(c)" \ "Im(z*c)+Re(z+c)" "Im(z*c)+Re(c-z)" "Im(z+c)+Re(z*c)" "Im(c-z)+Re(c*z)" \ "Mix(z,z1)" "Min(z,z1)" "Max(z,z1)" \ "Mix(z,z2)" "Min(z,z2)" "Max(z,z2)" \ "Mix(z,z3)" "Min(z,z3)" "Max(z,z3)" \ "Mix(z,zbak)" "Min(z,zbak)" "Max(z,zbak)" \ "Mix(z,z1,z2,z3)" "Min(z,z1,z2,z3)" "Max(z,z1,z2,z3)" "Mix(z,c,zbak)" "Mix(everything)" default = 0 endparam param mode3 caption = "In var.2 use" enum = "z" "z1 (Mandel)" "z2 (Var.1)" "z3 (Var.2)" \ "Min(z,c)" "Max(z,c)" "z+c" "z-c" "z*c" "z/c" \ "sqrt|1+z^2+c^2|" "sqrt|1-z^2+c^2|" "sqrt|1+z^2-c^2|" "sqrt|1-z^2-c^2|" \ "sqrt(c^2-4*z1*z2)" "sqrt(c^2-4*z2*z3)" "sqrt(c^2-4*z1*z3)" \ "c^z" "z^c" "(1+1/c)^z" "(1+1/c)^zbak" "log(exp(c)+exp(z))" \ "z*angle(c)" "c*angle(z)" \ "cabs(z)+ i*angle(c)" "cabs(c)+ i*angle(z)" \ "Re(z)+Im(c)" "Re(z)-Im(c)" "Re(z)*Im(c)" "Re(z)/Im(c)" \ "Re(z*c)+Im(z+c)" "Re(z*c)+Im(c-z)" "Re(z+c)+Im(z*c)" "Re(c-z)+Im(c*z)" \ "Im(z)+Re(c)" "Im(z)-Re(c)" "Im(z)*Re(c)" "Im(z)/Re(c)" \ "Im(z*c)+Re(z+c)" "Im(z*c)+Re(c-z)" "Im(z+c)+Re(z*c)" "Im(c-z)+Re(c*z)" \ "Mix(z,z1)" "Min(z,z1)" "Max(z,z1)" \ "Mix(z,z2)" "Min(z,z2)" "Max(z,z2)" \ "Mix(z,z3)" "Min(z,z3)" "Max(z,z3)" \ "Mix(z,zbak)" "Min(z,zbak)" "Max(z,zbak)" \ "Mix(z,z1,z2,z3)" "Min(z,z1,z2,z3)" "Max(z,z1,z2,z3)" "Mix(z,c,zbak)" "Mix(everything)" default = 0 endparam param pow3 caption = "z pow in var.2" default = (1,0) endparam func prefx caption = "x:=f(x)" default = ident() endfunc func afx caption = "x+=f(y)" default = zero() endfunc func prefy caption = "y:=f(y)" default = ident() endfunc func afy caption = "y+=f(x)" default = zero() endfunc heading caption = "ExoticPoly factors" expanded = false endheading float param a1 caption = "a1" default = 4 endparam param b1 caption = "b1" default = (1,0) endparam float param c1 caption = "c1" default = 1 endparam float param a2 caption = "a2" default = 4 endparam param b2 caption = "b2" default = (1,0) endparam float param c2 caption = "c2" default = 1 endparam heading caption = "Average modes" text = "Negative Avg. powers will perturb magnitude in strange ways." expanded = false endheading float param w1 caption = "Weight of Mandel" default = 1 hint = ".001 to 1000" min = .001 max = 1000 endparam float param w2 caption = "Weight of var.2" default = 1 hint = ".001 to 1000" min = 0.001 max = 1000 endparam float param w3 caption = "Weight of var.3" default = 1 hint = ".001 to 1000" min = 0.001 max = 1000 endparam param modez caption = "Final z mode" enum = "Weighted avg ^ p" "Pow w. a." default = 0 endparam param ap caption = "Avg. power" visible = (@modez==0) default = (1,0) endparam heading caption = "Spidy global distortions" expanded = false endheading param modesp caption = "Spidy perturb" enum = "z" "z1 (Mandel)" "z2 (Var.1)" "z3 (Var.2)" \ "Min(z,c)" "Max(z,c)" "z+c" "z-c" "z*c" "z/c" \ "sqrt|1+z^2+c^2|" "sqrt|1-z^2+c^2|" "sqrt|1+z^2-c^2|" "sqrt|1-z^2-c^2|" \ "sqrt(c^2-4*z1*z2)" "sqrt(c^2-4*z2*z3)" "sqrt(c^2-4*z1*z3)" \ "c^z" "z^c" "(1+1/c)^z" "(1+1/c)^zbak" "log(exp(c)+exp(z))" \ "z*angle(c)" "c*angle(z)" \ "cabs(z)+ i*angle(c)" "cabs(c)+ i*angle(z)" \ "Re(z)+Im(c)" "Re(z)-Im(c)" "Re(z)*Im(c)" "Re(z)/Im(c)" \ "Re(z*c)+Im(z+c)" "Re(z*c)+Im(c-z)" "Re(z+c)+Im(z*c)" "Re(c-z)+Im(c*z)" \ "Im(z)+Re(c)" "Im(z)-Re(c)" "Im(z)*Re(c)" "Im(z)/Re(c)" \ "Im(z*c)+Re(z+c)" "Im(z*c)+Re(c-z)" "Im(z+c)+Re(z*c)" "Im(c-z)+Re(c*z)" \ "Mix(z,z1)" "Min(z,z1)" "Max(z,z1)" \ "Mix(z,z2)" "Min(z,z2)" "Max(z,z2)" \ "Mix(z,z3)" "Min(z,z3)" "Max(z,z3)" \ "Mix(z,zbak)" "Min(z,zbak)" "Max(z,zbak)" \ "Mix(z,z1,z2,z3)" "Min(z,z1,z2,z3)" "Max(z,z1,z2,z3)" "Mix(z,c,zbak)" "Mix(everything)" default = 0 endparam param spiderf1 caption = "Spidy pert. fac." default = (0,0) endparam param spiderf2 caption = "Spidy c factor" default = (1,0) endparam heading caption = "Mandel classic distortions" expanded = false endheading param pow caption = "z power" default = (2,0) endparam param phof1 caption = "Phoenix factor" default = (0,0) endparam param phop1 caption = "Phoenix power" default = (1,0) endparam param manof1 caption = "Manowar factor" default = (0,0) endparam param manop1 caption = "Manowar power" default = (1,0) endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam switch: type = "randLGN003" start = #pixel bailout = bailout cbail = cbail modez=modez mode1=mode1 mode2=mode2 mode3=mode3 modesp=modesp modeba=modeba afx=afx afy=afy prefx=prefx prefy=prefy ap=ap pow=pow pow3=pow3 w1 = w1 w2 = w2 w3 = w3 a1 = a1 b1 = b1 c1 = c1 a2 = a2 b2 = b2 c3 = c3 phof1=phof1 phop1=phop1 manof1=manof1 manop1=manop1 spiderf1=spiderf1 spiderf2=spiderf2 cu = sw sw = cu } gammabetapoly { ; By L.G.N. 03 01 2010 ; Uses Euler's algorithm for Gamma (found in Wikipedia) ; Remember that Gamma(N) = N! when N is a integer > 0 - see Wiki's page for further details ; Too bad Gamma(z) tends to infinity when z -> 0 ; I redefined the function; now Gamma(0) can be arbitrarily assigned (for a better result) ; Default values are ONLY an example of course, tweak them init: if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif zbak=z, oldz=z complex func gamma(const complex x) ; don't get in trouble! if (x==0), return @g0, endif ; Avoids some troubles - G(0) redefinition ; because 1/0 is a trouble :) if (cabs(x) > @gmx), return x, endif int s = @Gacc if (s > 1000), s=1000, endif ; For mental safety. :P complex gam = 1/x, int i = 1 while (i <= s) ;if (cabs(gam) > @gmx) ;return gam / x ;else gam = gam / (1+x/i) * ((1+1/i)^x) ; I divide at first - should be better ;endif i = i + 1 endwhile return gam endfunc complex func beta(const complex x, const complex y) ; don't get in trouble! if (x==0)||(y==0), return @b0, endif ; Avoids some troubles - B(0) redefinition ; because 1/0 is a trouble :) if (cabs(x*y) > @bmx), return sqrt(2*#pi), endif int s = @Bacc if (s > 1000), s=1000, endif ; For mental safety. :P complex bet = (x+y)/(x*y), int i = 1 while (i <= s) bet = bet / (1 + (x*y/(i*(x+y+i))) ) i = i + 1 endwhile return bet endfunc loop: z = @Gf1*gamma( z ) + @Gf2*gamma( 1/z ) + \ @Bf1*beta( z, c ) + @Bf2*beta( 1/z, c ) + \ @fuz(z^@pow) + (zbak^@manop1)*@manof1 + @phof1*c*(z^@phop1) + c zbak=oldz, oldz=z bailout: |z| < @bailout default: title = "Mandel/Julia + G() + B()" center = (-.5,0) magn=10 heading caption = "Information" text = "This formula uses modified versions of the 'special functions' \ Gamma and Beta. In my tests they converge fast, but it is not always guaranteed... \ Try to change Magnification in Location tab, or you'll see \ only a small detail of the set." expanded = true endheading param start caption = "Seed/Perturb" default = (0,0) endparam param Gf1 caption = "G(z) factor" default = (0,0) endparam param Gf2 caption = "G(1/z) factor" default = (1,0) endparam param Bf1 caption = "B(z,c) factor" default = (0,0) endparam param Bf2 caption = "B(1/z,c) factor" default = (0,0) endparam func fuz caption = "z function" default = ident() endfunc param pow caption = "z power" default = (2,0) endparam param phof1 caption = "Phoenix factor" default = (1,0) endparam param phop1 caption = "Phoenix power" default = (1,0) endparam param manof1 caption = "Manowar factor" default = (0,0) endparam param manop1 caption = "Manowar power" default = (1,0) endparam float param bailout caption = "Bailout" default = 1e8 endparam param cu caption = "Current mode" enum = "Mandel" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Mandel" "Julia" default = 1 endparam heading caption = "Gamma() modes" text = "Set G(0) = 100 to see a closer approx. of the real Gamma function \ (in this case, use very low G() weights). G(0) = 1 is a wrong value (but \ less troubleful than the 'real' one)." expanded = false endheading param g0 caption = "G(0) = " hint = "G(0) doesn't exist, so I redefined it" default = (1,0) endparam int param Gacc caption = "G() iterations" default = 10 hint = "2 to 100; more iterations = more accuracy and less speed. \ But 'inaccurate plot' doesn't mean 'weird plot'." min = 2 max = 100 endparam float param gmx caption = "G() cutoff" default = 100 ; best compromise hint = "1 to 1e100; whenever this value the calculation stops. \ Remember that Gamma function grows VERY fast (even more than Exp)." min = 1 max = 1e100 endparam heading caption = "Beta() modes" expanded = false endheading param b0 caption = "B(0) = " hint = "B(0) doesn't exist, so I redefined it" default = (1,0) endparam int param Bacc caption = "B() iterations" default = 10 hint = "2 to 100; more iterations = more accuracy and less speed. \ But 'inaccurate plot' doesn't mean 'weird plot'." min = 2 max = 100 endparam float param bmx caption = "B() cutoff" default = 1e20 hint = "1 to 1e100; whenever this value the calculation stops - I leave \ a very high value because Beta has less 'troubles' than Gamma." min = 1 max = 1e100 endparam switch: type = "gammabetapoly" start = #pixel bailout = bailout pow=pow fuz=fuz phof1=phof1 phop1=phop1 manof1=manof1 manop1=manop1 Gf1=Gf1 Gf2=Gf2 Bf1=Bf1 Bf2=Bf2 g0=g0 Gacc = Gacc gmx = gmx b0=b0 Bacc = Bacc bmx = bmx cu = sw sw = cu } LGNnewt96 { ; NEEDS PERIODICITY CHECKING=OFF! ; An implementation of a Flarium24 old formula called 'Newton variation n° 96' ; This formula has a lot of added capabilities. The original formula was fixed ; In reality this is a Nova type formula. ; Flarium24 was a freeware software by S.C. Ferguson 1998 - Now his site is down ; To exactly reproduce original effect set exponent 3 = (2,0) ; Flarium's 'abs' is UF's 'cabs' ^ 2 ... Odd but works! ; tip; use 'wrong' bailout, it's much more interesting ;) ; ------------------ ; NOTE ON COLOURING METHODS! ; This fractal is convergent AND divergent so normally "smoothed" colourings DO NOT work. ; (If you use some discontinue functions you can NOT use any smooth algorithm as well) ; Too bad some algorithms are not compatible with "wrong" bailout setting. :( ; My suggestions for working GOOD gradients are; ; Instead of "Triangle Ineq. Av." use "Stripes" in jh.ucl ; "Fibers and things gradient" in reb5.ucl works perfectly too if you adjust bailout! ; Instead of "Decomposition" use "Magnet Decomp" or "Newton Decomp" in mt.ucl ; Instead of "Expon. Smoothing" use "Expon. Smoothing (General)" in dmj.ucl ; Instead of "Distance est." use "D.e. gradient" in reb5.ucl ; Instead of "Smooth" use "General Smoothing Gradient" in reb5.ucl (perfectly accurate - other methods work too but not always) ; Also "Fibers and things gradient" -> Flavor = Smooth ; Also "Log smoothing" in mt.ufm ; All orbit trapping methods should work, but I'm not 100% sure, so try by yourself ;) init: int numite = 1 if @cu == 0 z = @start c = #pixel else z = #pixel c = @start endif z1 = z z2 = z float zb = -10.24 zbak=z, oldz=z loop: z2 = z1 z1 = z if (@formty == 0) z = @efun(@a5*@fun2(z)^@e1 - (@a1*(z^@e2) - @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) * c - @a6*c/numite elseif (@formty == 1) z = @efun((@a5*@fun2(z)^@e1 + @a1*(z^@e2) + @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) * c - @a6*c/numite elseif (@formty == 2) z = @efun(@a5*@fun2(z)^@e1 - (@a1*(z^@e2) - @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) + c - @a6*z*c/numite elseif (@formty == 3) z = @efun((@a5*@fun2(z)^@e1 + @a1*(z^@e2) + @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) + c - @a6*c/numite elseif (@formty == 4) z = @efun(@a5*@fun2(c)^@e1 - (@a1*(z^@e2) - @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) * z - @a6*c/numite elseif (@formty == 5) z = @efun(@a5*@fun2(z)^@e1 - c * (@a1*(z^@e2) + @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) * z - @a6*c/numite elseif (@formty == 6) z = @efun(@a5*@fun2(z)^@e1 - (@a1*(z^@e2) - @a2*c)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3*c)) * z - @a6*c/numite elseif (@formty == 7) z = @efun((@a5*@fun2(z)^@e1 + @a1*(z^@e2) + @a2*c)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3*c)) * z - @a6*c/numite elseif (@formty == 8) z = @efun(@a5*@fun2(real(z)+1i*imag(c))^@e1 - (@a1*(z^@e2) - @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) * (real(c)+1i*imag(z)) - @a6*c/numite elseif (@formty == 9) z = @efun(@a5*@fun2(real(c)+1i*imag(z))^@e1 - (@a1*(z^@e2) - @a2)/(@e2*@a1*(z^(@e2-1)) - \ @a4*@fun1(z)^@e3 - @a3)) * (real(z)+1i*imag(c)) - @a6*c/numite endif z = z + (zbak^@manop1)*@manof1 + @phof1*c*(z^@phop1) if (@balty == 0) zb = |z1-z| elseif (@balty == 1) zb = |z2-z| endif numite = numite + 1 zbak=oldz, oldz=z bailout: (zb >= @cba) && (|z| < @dba) default: title = "Newton #96 (generalized)" param start caption = "Seed/Perturb" default = (1,0) endparam param formty caption = "Formula" enum = "Right (* c)" "Wrong" "+ c" "Wrong +c" \ "Swap c-z" "c inside" "c * roots" "Wrong c * roots" "ReIm twist 1" "ReIm twist 2" default = 0 endparam param e2 caption = "Newtonian order" default = (3,0) hint = "It's better to set integer values but NOT 2" endparam param a2 caption = "Upper root" default = (1,0) hint = "Do NOT set 0" endparam param a3 caption = "Down root" default = (1,0) hint = "Do NOT set 2" endparam param e1 caption = "Exponent 1" default = (1,0) endparam param e3 caption = "Exponent 2" default = (1,0) ; (2,0) is the original but I like much more 1 hint = "Set (2,0) to see the original formula" endparam param a1 caption = "Factor 1" default = (1,0) endparam param a4 caption = "Factor 2" default = (1,0) endparam param a5 caption = "Factor 3" default = (1,0) endparam param a6 caption = "Jolly factor" default = (0,0) endparam func efun caption = "Overall function" default = ident() endfunc func fun1 caption = "Perturb function" default = cabs() endfunc func fun2 caption = "Jolly function" default = ident() endfunc param balty caption = "Bailout type" enum = "Right" "Wrong" default = 0 endparam float param dba caption = "Dvg. bailout" default = 1E6 endparam float param cba caption = "Cvg. bailout" default = 1E-6 endparam param phof1 caption = "Phoenix factor" default = (0,0) endparam param phop1 caption = "Phoenix power" default = (1,0) endparam param manof1 caption = "Manowar factor" default = (0,0) endparam param manop1 caption = "Manowar power" default = (1,0) endparam param cu caption = "Current mode" enum = "Newton" "Julia" default = 0 endparam param sw caption = "Switch to" enum = "Newton" "Julia" default = 1 endparam switch: type = "LGNnewt96" start = #pixel power = power cba = cba dba = dba formty=formty balty=balty e1=e1 e2=e2 e3=e3 a1=a1 a2=a2 a3=a3 a4=a4 a5=a5 a6=a6 fun1=fun1 fun2=fun2 efun=efun phof1=phof1 phop1=phop1 manof1=manof1 manop1=manop1 cu = sw sw = cu }