comment { ; Formulae by Andreas Lober Last update on June 08, 2000 For the latest version of this file go to: http://wizzle.simplenet.com/fractals/ufresources } MyFirstFormula { init: z = 0 loop: z = z*sin(#pixel)+ #pixel*cos(z) + #pixel*z*z bailout: |z| < 4 default: title = "1. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL0 { init: z = 0 loop: if (z==0) z = @trfFkt(z^2) + @pixFkt(#pixel) else z = @trfFkt(z^2 + @_a/z + @_b/z^3) + @pixFkt(#pixel) endif bailout: |real(z)| < 4 default: title = "Mandel" maxiter = 1000 method = multipass periodicity = 0 param _a caption = "Joukowskij" default = (0.0,0.0) endparam param _b caption = "RecipCube" default = (0.0,0.0) endparam func pixFkt caption = "Pixel Addition" default = ident() endfunc func trfFkt caption = "Mandel" default = ident() endfunc } AL0-M { init: z = @start int iter = 1 complex oldZ = z complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 loop: iter = iter + 1 oldZ = z if (z==0) z = @trfFkt(0) + @pixFkt(#pixel) else z = @trfFkt(z^@power + @_a/z + @_b/z^3) + @pixFkt(#pixel) endif IF (@bailMode == 0) bailZ = z ELSEIF (@bailMode == 1) bailZ = z-oldZ ELSEIF (@bailMode == 2) bailZ = (z+oldZ)/2 ELSEIF (@bailMode == 3) bailZ = z-#pixel ELSEIF (@bailMode == 4) bailZ = z/|oldZ| ELSEIF (@bailMode == 5) bailZ = z/real(z) ELSEIF (@bailMode == 6) bailZ = z/imag(z) ELSEIF (@bailMode == 7) bailZ = z/(|real(z)|+1) ELSEIF (@bailMode == 8) bailZ = z/(|imag(z)|+1) ELSEIF (@bailMode == 9) bailZ = z/real(oldZ) ELSEIF (@bailMode == 10) bailZ = z/imag(oldZ) ELSEIF (@bailMode == 11) bailZ = z/(|real(oldZ)|+1) ELSEIF (@bailMode == 12) bailZ = z/(|imag(oldZ)|+1) ENDIF if (@bailNorm == 1) bailZ = bailZ/(|oldZ|+@normConst) elseif (@bailNorm == 2) bailZ = bailZ/(|#pixel|+@normConst) elseif (@bailNorm == 3) bailZ = bailZ/(|oldZ-#pixel|+@normConst) endif IF (@test == 0) bailCheck = bailZ ELSEIF (@test == 1) bailCheck = real(bailZ)^2 ELSEIF (@test == 2) bailCheck = imag(bailZ)^2 ELSEIF (@test == 3) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe < bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 4) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe > bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Cube Mandel" maxiter = 1000 method = multipass periodicity = 0 param start caption = "Starting point" default = (0,0) hint = "Perturbation. Use (0,0) for the standard Mandelbrot set." endparam param power caption = "Power" default = (2,0) hint = "This defines the power of the Mandelbrot set. Use (2,0) \ for the standard Mandelbrot set." endparam param _a caption = "Joukowskij" default = (0.0,0.0) endparam param _b caption = "RecipCube" default = (0.0,0.0) endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 0 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func pixFkt caption = "Pixel Addition" default = ident() endfunc func trfFkt caption = "Mandel" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc switch: type = "AL0-J" seed = #pixel _a = _a _b = _b power = power bailout = bailout test = test bailMode = bailMode bailNorm = bailNorm normConst = normConst bailUp = bailUp pixFkt = pixFkt trfFkt = trfFkt bailFunc = bailFunc goofFunc = goofFunc } AL0-J { init: z = #pixel int iter = 1 complex oldZ = z complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 loop: iter = iter + 1 oldZ = z if (z==0) z = @trfFkt(0) + @pixFkt(@seed) else z = @trfFkt(z^@power + @_a/z + @_b/z^3) + @pixFkt(@seed) endif IF (@bailMode == 0) bailZ = z ELSEIF (@bailMode == 1) bailZ = z-oldZ ELSEIF (@bailMode == 2) bailZ = (z+oldZ)/2 ELSEIF (@bailMode == 3) bailZ = z-#pixel ELSEIF (@bailMode == 4) bailZ = z/|oldZ| ELSEIF (@bailMode == 5) bailZ = z/real(z) ELSEIF (@bailMode == 6) bailZ = z/imag(z) ELSEIF (@bailMode == 7) bailZ = z/(|real(z)|+1) ELSEIF (@bailMode == 8) bailZ = z/(|imag(z)|+1) ELSEIF (@bailMode == 9) bailZ = z/real(oldZ) ELSEIF (@bailMode == 10) bailZ = z/imag(oldZ) ELSEIF (@bailMode == 11) bailZ = z/(|real(oldZ)|+1) ELSEIF (@bailMode == 12) bailZ = z/(|imag(oldZ)|+1) ENDIF if (@bailNorm == 1) bailZ = bailZ/(|oldZ|+@normConst) elseif (@bailNorm == 2) bailZ = bailZ/(|#pixel|+@normConst) elseif (@bailNorm == 3) bailZ = bailZ/(|oldZ-#pixel|+@normConst) endif IF (@test == 0) bailCheck = bailZ ELSEIF (@test == 1) bailCheck = real(bailZ)^2 ELSEIF (@test == 2) bailCheck = imag(bailZ)^2 ELSEIF (@test == 3) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe < bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 4) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe > bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Cube Jule" maxiter = 1000 method = multipass periodicity = 0 param seed caption = "Julia seed" default = (-1.25, 0) hint = "Use this to create many different Julia sets. You can \ also set this value using the Switch feature." endparam param power caption = "Power" default = (2,0) hint = "This defines the power of the Julia set. Use (2,0) \ for the standard Julia set." endparam param _a caption = "Joukowskij" default = (0.0,0.0) endparam param _b caption = "RecipCube" default = (0.0,0.0) endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 0 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func pixFkt caption = "Pixel Addition" default = ident() endfunc func trfFkt caption = "Mandel" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc switch: type = "AL0-M" _a = _a _b = _b power = power bailout = bailout test = test bailMode = bailMode bailNorm = bailNorm normConst = normConst bailUp = bailUp pixFkt = pixFkt trfFkt = trfFkt bailFunc = bailFunc goofFunc = goofFunc } AL2 { init: z = 0 loop: z = z*z*sin(#pixel)*sin(#pixel) \ + z*#pixel*cos(#pixel)*sin(#pixel) \ + #pixel*#pixel*cos(#pixel)*cos(#pixel) bailout: |z| < 4 default: title = "2. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL3 { init: z = 0 loop: z = (z + 1i*sin(#pixel)) * (z + 1i*cos(#pixel)) bailout: |z| < 4 default: title = "3. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL4 { init: z = 0 loop: z = (z + #pixel*sin(#pixel)) * (#pixel + z*cos(z)) bailout: |z| < 4 default: title = "4. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL5 { init: z = 0 loop: z = z^3 - 3*real(#pixel)^2*z + imag(#pixel) bailout: |z| < 4 default: title = "5. Formel von AL (Staub)" maxiter = 1000 method = multipass periodicity = 0 } AL6 { init: z = 0 loop: z = z^3 - 3*#pixel^2*z + #pixel bailout: |z| < 4 default: title = "6. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL7 { init: z = 0 loop: z = conj(z)^2 + z^2 + #pixel bailout: |z| < 4 default: title = "7. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL8 { init: z = 0 loop: z = z*z + conj(z) + #pixel bailout: |z| < 4 default: title = "8. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL9 { init: z = 0 loop: z = z^2 + conj(z) + flip(z) + #pixel bailout: |z| < 4 default: title = "9. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL10 { init: z = 0 loop: if (z==0) z = 1 + #pixel else z = (z + sin(z)/z)^2 + #pixel endif bailout: |z| < 4 default: title = "10. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL11 { init: z = 0 loop: if (z==0) z = 1 + #pixel else z = (sin(z)+ 1/z)^2 + #pixel endif bailout: |z| < 4 default: title = "11. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 } AL12 { init: z = 0 loop: if (|z| <= @_bailout*@_bailout_part) z = (@_fkt1(z))^2 + #pixel else z = (@_fkt2(z))^2 + #pixel endif bailout: |z| < @_bailout default: title = "Switch Formula" maxiter = 1000 method = multipass periodicity = 0 param _bailout caption="Bailout" default=4 endparam param _bailout_part caption="Part of Bailout for Function Switch" default=0.5 min=0.0 max=1.0 endparam func _fkt1 caption="First Iteration Function" default=ident() endfunc func _fkt2 caption="Second Iteration Function" default=tan() endfunc } ; AL12 AL12b { ; ; Created March 02, 2000 ; init: z = 0 int iter = 0 loop: iter = iter + 1 ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ; Do the switch if (iter%2 == 0) z = (@_fkt1(z))^2 + #pixel else z = (@_fkt2(z))^2 + #pixel endif ; Apply an exponent? if (@exponent != 1) z = z^@exponent endif z = @addFkt(z) if (@pure) z = z + #pixel endif bailout: |z| < @_bailout default: title = "Switch Formula #2" maxiter = 1000 method = multipass periodicity = 0 param _bailout caption="Bailout" default=4 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param pure caption = "f: With Pixel Addition" default = FALSE endparam param exponent caption = "f: Exponent for Transfer" default = 1.0 endparam func _fkt1 caption="First Iteration Function" default=recip() endfunc func _fkt2 caption="Second Iteration Function" default=sqrt() endfunc func addFkt caption = "Additional Loop Function" default = ident() hint = "End of the else part of the loop: section" endfunc } ; AL12b AL13 { init: z = #pixel complex c = #pixel - @_fkt1(z) loop: c = #pixel + c/(z^@_exp1) - z^@_exp2 z = z*#pixel + c/(z^@_exp1) bailout: |z| < @_bailout default: title = "Fractory Plus" maxiter = 1000 method = multipass periodicity = 0 param _bailout caption="Bailout" default=4 endparam param _exp1 caption="Additional Exponent 1" default=1.0 endparam param _exp2 caption="Additional Exponent 2" default=1.0 endparam func _fkt1 caption="Iteration Function" default=sin() endfunc } ; AL13 AL14 { init: complex f_n_minus_2 = #pixel complex f_n_minus_1 = #pixel loop: f_n_minus_2 = f_n_minus_1 f_n_minus_1 = @_fkt1(z) z = f_n_minus_1^@_exp1 + f_n_minus_2^@_exp2 bailout: |z| < @_bailout default: title = "Fibonacci" maxiter = 1000 method = multipass periodicity = 0 param _bailout caption="Bailout" default=4 endparam param _exp1 caption="Additional Exponent 1" default=1.0 endparam param _exp2 caption="Additional Exponent 2" default=1.0 endparam func _fkt1 caption="Iteration Function" default=ident() endfunc } ; AL14 AL15 { init: z = @initVal xy = 0 loop: if (@mode == 0) ; real xy = real(z) elseif (@mode == 1) ; imag xy = imag(z) elseif (@mode == 2) ; real+imag xy = real(z)+imag(z) elseif (@mode == 3) ; real*imag xy = real(z)*imag(z) elseif (@mode == 4) ; pix real xy = #x elseif (@mode == 5) ; pix imag xy = #y elseif (@mode == 6) ; pix real+imag xy = #x+#y elseif (@mode == 7) ; pix real*imag xy = #x*#y endif z = z*xy+ #pixel bailout: |z| < 4 default: title = "15. Formel von AL" maxiter = 1000 method = multipass periodicity = 0 param mode caption = "Real/Imag-Mode" enum= "Real" "Imag" "Real+Imag" "Real*Imag" \ "PixReal" "PixImag" "PixReal+Imag" "PixReal*Imag" endparam param intVal caption = "Init" default=(1,0) endparam } ; AL15 AL16 { init: z = #pixel int iter = 0 loop: iter = iter+1 int lat_real = 0 int lat_imag = 0 complex lat_comp_pp = 0 complex lat_comp_pn = 0 complex lat_comp_np = 0 complex lat_comp_nn = 0 complex W_Fkt_z = 0 if (z == 0) W_Fkt_z = 0 else if (@Weierstrass == 0) ; P-Function W_Fkt_z = 1/z^2 elseif (@Weierstrass == 1) ; Zeta-Function W_Fkt_z = 1/z elseif (@Weierstrass == 2) ; Sigma-Function W_Fkt_z = z endif endif ; ; Calculate the P-Function ; while (lat_real <= iter) while (lat_imag <= iter) ; ; Calculate all 4 directions in the lattice ; lat_comp_pp = lat_real*@vector1 + lat_imag*@vector2 lat_comp_pn = lat_real*@vector1 - lat_imag*@vector2 lat_comp_np = -lat_real*@vector1 + lat_imag*@vector2 lat_comp_np = -lat_real*@vector1 - lat_imag*@vector2 if (lat_comp_pp != 0 && (z != lat_comp_pp || @Weierstrass == 2)) if (@Weierstrass == 0) ; P-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_pp)^2 - 1/lat_comp_pp^2 elseif (@Weierstrass == 1) ; Zeta-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_pp) + 1/lat_comp_pp \ + z/lat_comp_pp^2 elseif (@Weierstrass == 2) ; Sigma-Function W_Fkt_z = W_Fkt_z * (1-z/lat_comp_pp) \ * exp(z/lat_comp_pp + 0.5*(z/lat_comp_pp)^2) endif endif if (lat_comp_pn != 0 && (z != lat_comp_pn || @Weierstrass == 2)) if (@Weierstrass == 0) ; P-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_pn)^2 - 1/lat_comp_pn^2 elseif (@Weierstrass == 1) ; Zeta-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_pn) + 1/lat_comp_pn \ + z/lat_comp_pn^2 elseif (@Weierstrass == 2) ; Sigma-Function W_Fkt_z = W_Fkt_z * (1-z/lat_comp_pn) \ * exp(z/lat_comp_pn + 0.5*(z/lat_comp_pn)^2) endif endif if (lat_comp_np != 0 && (z != lat_comp_np || @Weierstrass == 2)) if (@Weierstrass == 0) ; P-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_np)^2 - 1/lat_comp_np^2 elseif (@Weierstrass == 1) ; Zeta-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_np) + 1/lat_comp_np \ + z/lat_comp_np^2 elseif (@Weierstrass == 2) ; Sigma-Function W_Fkt_z = W_Fkt_z * (1-z/lat_comp_np) \ * exp(z/lat_comp_np + 0.5*(z/lat_comp_np)^2) endif endif if (lat_comp_nn != 0 && (z != lat_comp_nn || @Weierstrass == 2)) if (@Weierstrass == 0) ; P-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_nn)^2 - 1/lat_comp_nn^2 elseif (@Weierstrass == 1) ; Zeta-Function W_Fkt_z = W_Fkt_z + 1/(z-lat_comp_nn) + 1/lat_comp_nn \ + z/lat_comp_nn^2 elseif (@Weierstrass == 2) ; Sigma-Function W_Fkt_z = W_Fkt_z * (1-z/lat_comp_nn) \ * exp(z/lat_comp_nn + 0.5*(z/lat_comp_nn)^2) endif endif lat_imag = lat_imag+1 endwhile ; lat_imag <= iter lat_real = lat_real+1 endwhile ; lat_real <= iter if (@pure) z = W_Fkt_z^@exponent + #pixel else z = W_Fkt_z^@exponent endif bailout: |z| < @_bailout default: title = "Three Weierstrass Functions" maxiter = 1000 method = multipass periodicity = 0 param Weierstrass caption = "Weierstrass Function" enum = "P-Function" "Zeta-Function" "Sigma-Function" endparam param intVal caption = "Init" default=(1,0) endparam param exponent caption="Exponent for P" default=1.0 endparam param vector1 caption="Lattice Vector 1" default=(1,0) endparam param vector2 caption="Lattice Vector 2" default=(0,1) endparam param _bailout caption="Bailout" default=4.0 endparam param pure caption="With Pixel Addition" default=TRUE endparam } ; AL16 AL17 { init: z = #pixel int iter = 0 loop: iter = iter+1 int n = 1 complex R_Fkt_z = 0 ; ; Calculate the Riemann Zeta-Function ; while (n <= iter) R_Fkt_z = R_Fkt_z + 1/n^z n = n+1 endwhile ; n <= iter if (@pure) z = R_Fkt_z^@exponent + #pixel else z = R_Fkt_z^@exponent endif bailout: |z| < @_bailout default: title = "Riemann Zeta Function" maxiter = 1000 method = multipass periodicity = 0 param intVal caption = "Init" default=(1,0) endparam param exponent caption="Exponent for Zeta" default=2.0 endparam param _bailout caption="Bailout" default=4.0 endparam param pure caption="With Pixel Addition" default=TRUE endparam } ; AL17 AL18 { init: z = #pixel loop: complex J_Fkt_z = 0 ; ; Calculate the Joukowskij Function ; J_Fkt_z = (z + @epsilon/z)/2 if (@pure) z = J_Fkt_z^@exponent + #pixel else z = J_Fkt_z^@exponent endif bailout: |z| < @_bailout default: title = "Joukowskij Function" maxiter = 1000 method = multipass periodicity = 0 param exponent caption="Exponent for Joukowskij" default=2.0 endparam param epsilon caption="Epsilon, Coeff. for 1/z" default=1.0 endparam param _bailout caption="Bailout" default=4.0 endparam param pure caption="With Pixel Addition" default=TRUE endparam } ; AL18 AL19 { init: z = #pixel int iter = 0 loop: iter = iter+1 int n = 0 complex Th_Fkt1_z = 0 complex Th_Fkt2_z = 0 complex Th_Fkt3_z = 0 ; ; Calculate the Jacobi Theta-Function ; while (n <= iter) if (@exponent1 > 0) if (n==0) Th_Fkt1_z = Th_Fkt1_z + exp(#pi*1i*(@offset^2)*z) else Th_Fkt1_z = Th_Fkt1_z + exp(#pi*1i*((@offset+n)^2)*z) \ + exp(#pi*1i*((@offset-n)^2)*z) endif endif if (@exponent2 > 0) if (n==0) Th_Fkt2_z = Th_Fkt2_z + exp(#pi*1i*(@offset^2)*z) else Th_Fkt2_z = Th_Fkt2_z + (-1)^n*exp(#pi*1i*((@offset+n)^2)*z) \ + (-1)^n*exp(#pi*1i*((@offset-n)^2)*z) endif endif if (@exponent3 > 0) if (n==0) Th_Fkt3_z = Th_Fkt3_z + exp(#pi*1i*(@offset^2+0.5)*z) else Th_Fkt3_z = Th_Fkt3_z + exp(#pi*1i*((@offset+n+0.5)^2)*z) \ + exp(#pi*1i*((@offset-n+0.5)^2)*z) endif endif n = n+1 endwhile ; n <= iter complex Mod_Fkt_z = 1 if (@exponent1 > 0) Mod_Fkt_z = Mod_Fkt_z * (Th_Fkt1_z^@exponent1) endif if (@exponent2 > 0) Mod_Fkt_z = Mod_Fkt_z * (Th_Fkt2_z^@exponent2) endif if (@exponent3 > 0) Mod_Fkt_z = Mod_Fkt_z * (Th_Fkt3_z^@exponent3) endif if (@pure) z = Mod_Fkt_z + #pixel else z = Mod_Fkt_z endif bailout: |z| < @_bailout default: title = "Jacobi Theta Functions" maxiter = 1000 method = multipass periodicity = 0 param exponent1 caption="Exponent for J-Theta #1" default=1 min=0 endparam param exponent2 caption="Exponent for J-Theta #2" default=0 min=0 endparam param exponent3 caption="Exponent for J-Theta #3" default=0 min=0 endparam param offset caption="Complex offset" default=(0.0,0.0) endparam param _bailout caption="Bailout" default=4.0 endparam param pure caption="With Pixel Addition" default=TRUE endparam } ; AL19 AL20 { init: z = #pixel int iter = 0 loop: iter = iter+1 int n = 1 complex Z_Fkt_z = 0 ; ; Calculate the Eppstein Zeta-Function ; while (n <= iter) Z_Fkt_z = Z_Fkt_z + 2*((@offset/n^2))^z n = n+1 endwhile ; n <= iter if (@pure) z = Z_Fkt_z^@exponent + #pixel else z = Z_Fkt_z^@exponent endif bailout: |z| < @_bailout default: title = "Eppstein Zeta Functions" maxiter = 1000 method = multipass periodicity = 0 param exponent caption="Exponent E-Zeta" default=1.0 endparam param offset caption="Complex offset" default=(1.0,0.0) endparam param _bailout caption="Bailout" default=4.0 endparam param pure caption="With Pixel Addition" default=TRUE endparam } ; AL20 AL21 { init: float _a = real(#pixel) float _b = imag(#pixel) complex _x = 0 complex _y = 0 complex J_Fkt_z = 0 loop: _x = |z| _y = sqrt(_x^3+_a*_x^2+_b*_x) J_Fkt_z = _x + 1i*_y if (@pure) z = z^2 + J_Fkt_z^@exponent + #pixel else z = z^2 + J_Fkt_z^@exponent endif bailout: |z| < @_bailout default: title = "Elliptic Logarithm" maxiter = 1000 method = multipass periodicity = 0 param exponent caption="Exponent for EL" default=2.0 endparam param _bailout caption="Bailout" default=4.0 endparam param pure caption="With Pixel Addition" default=TRUE endparam } ; AL21 castaway {;©1999 by Aubrey Minnick init: z = @_initVal loop: z = @_fkt1(@_fkt2(z ^ (z * z) ^ z ^ (z * z) ^ z)) * \ @_fkt2(@_fkt1(z ^ (z * z) ^ z ^ (z * z) ^ z)) * #pixel bailout: |z| < @_bailout default: title = "CastAway Revisited" maxiter = 1000 method = multipass periodicity = 0 param _initVal caption="InitValue" default=(0,0) endparam param _bailout caption="Bailout" default=2 endparam func _fkt1 caption="First Iteration Function" default=sin() endfunc func _fkt2 caption="Second Iteration Function" default=cos() endfunc } ; castaway gfp2lis01 { ; ; Formula derived from Witch of Agnesi of Gedeon Peteri, 1999 ; Andreas Lober, 2000 ; init: z = @fn1(#pixel) x_part = 0 y_part = 0 loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (@mode == 0) ; Classical x_part = sin(@a*z) y_part = cos(@b*z) elseif (@mode == 1) ; Arcus x_part = asin(@a*z) y_part = acos(@b*z) elseif (@mode == 2) ; Hyperbolicus x_part = sinh(@a*z) y_part = cosh(@b*z) elseif (@mode == 3) ; Arc Hyp x_part = asinh(@a*z) y_part = acosh(@b*z) endif ; finale grande x=@p1*x_part^@exp_x, y=@p2*y_part^@exp_y z=@fn2(z^@exp_z) + @p3*@fn3(x + 1i*y) bailout: ( @test == 0 && |z| <= @bailout) || \ ( @test == 1 && real(z) <= @bailout^2) || \ ( @test == 2 && imag(z) <= @bailout^2) || \ ( @test == 3 && real(z) <= @bailout^2 && imag(z) < @bailout^2) || \ ( @test == 4 && real(z) <= @bailout^2 || imag(z) < @bailout^2) || \ ( @test == 5 && abs(real(z)) + abs(imag(z)) <= @bailout^2) || \ ( @test == 6 && real(z) + imag(z) <= @bailout^2) default: title="Lissajous 1" maxiter = 1000 method = multipass periodicity = 0 param p1 caption="Width (x)" default=(0.2,0.0) endparam param p2 caption="Height (y)" default=(1.0,0.0) endparam param p3 caption="Parameter (x+iy)" default=(1.0,0.0) endparam param exp_x caption="Exponent (x)" default=(0.5,0.0) endparam param exp_y caption="Exponent (y)" default=(0.5,0.0) endparam param exp_z caption="Exponent (z)" default=(2.0,0.0) endparam param a caption="Circle distorsion (x)" default=2 hint="Circle distorsions (x) and (y) \ should have gcd(x,y)==1 \ as is in the defaults" endparam param b caption="Circle distorsion (y)" default=3 hint="Circle distorsions (x) and (y) \ should have gcd(x,y)==1 \ as is in the defaults" endparam param bailout caption="Bailout" default=4.0 endparam param test caption = "Bailout Test" default = 0 enum = "mod" "real" "imag" "or" "and" "manh" "manr" endparam param mode caption = "Mode" default = 0 enum = "Classical" "Arcus" "Hyperbolicus" "Arc Hyp" endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (2.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func fn1 caption = "Pixel Function" default = sin() endfunc func fn2 caption = "Mandel Function (z)" default = ident() endfunc func fn3 caption = "Lissajous Function (x+iy)" default = ident() endfunc } Jouk-Dalinskij { ; Formula by KPK January 2000 ; Basics from Samuel Monnier ; A Joukowskij term added by Andreas Lober ; Latest version: March 02, 2000 ; after an idea by Sam to use zc a second time. ; init: complex z = #pixel + @epsilon/#pixel complex zc = atan(z/@sizesq)*@sizesq z = 2*(z + @epsilon/z - zc)/@sizesq complex q = 1 int iter = 0 int reti = 0 loop: if (@sams_par == 3) iter = iter +1 reti = iter%3 endif IF (imag(z)>0.5) z = 2*real(z) + flip(2*imag(z)-1) ELSEIF (real(z)>0.5) z = 2*real(z)-1 + flip(2*imag(z)) ELSEIF (real(z)<0.1) z = 2*fn1(z)-1 + flip(2*imag(z)) ELSE z = 2*fn2(z) + flip(2*imag(z)) ENDIF if (@sams_par == 1) z = z*fn3(zc) elseif (@sams_par == 2) q = fn3(zc) if (q == 0) q = 1 endif z = z/q elseif (@sams_par == 3) if (reti == 0) q = fn3(zc) if (q == 0) q = 1 endif z = z/q else z = z*fn3(zc) endif endif if (@exponent != 1) z = z^@exponent endif if (@pure) z = z + #pixel endif bailout: |z| < @bailout default: title = "Joukowskij-Dalinsky" center = (0.4, 0.1) magn = 1.5 maxiter = 500 method = multipass periodicity = 0 param power caption = "Power" default = (2,0) endparam param epsilon caption="Epsilon, Coeff. for 1/z" default=1.0 endparam param sizesq caption = "Magnification" default = 0.5 endparam param bailout caption = "Bailout" default = 1e20 endparam param pure caption="With Pixel Addition" default=FALSE endparam param exponent caption="Exponent for Transfer" default=1.0 endparam param sams_par caption="Sam's Julia Mode" enum = "None" "Product" "Quotient" "Mix" default=0 endparam func fn1 caption = "Function 1" default = ident() endfunc func fn2 caption = "Function 2" default = flip() endfunc func fn3 caption = "Sam's Function" default = flip() endfunc } Joukowskij-Carr2100 { ; Updated for UF2 by Erik Reckase, Sept 1999 ; Modified Sylvie Gallet frm. [101324,3444],1996 ; Modified Andreas Lober 2000 ; init: c = @initVal z = conj(tan(#pixel)) \ -sqr(conj(0.10/#pixel)) \ -sqr(flip(0.020/#pixel)) z1 = 1.5*z, z2 = 2.25*z, z3 = 3.375*z, z4 = 5.0625*z l1 = real(p1), l2 = imag(p1), l3 = real(p2), l4 = imag(p2) bailout=16, iter=0 loop: IF (iter==l1) z = z1, c = z1 ELSEIF (iter==l2) z = z2, c = z2 ELSEIF (iter==l3) z = z3, c = z3 ELSEIF (iter==l4) z = z4, c = z4 ENDIF ; Here comes the Joukowskij z = (z-1/z^2)^2 + c iter = iter + 1 bailout: (|real(z)|) <= bailout default: title = "Joukowskij-Carr 2100" periodicity = 0 maxiter = 500 magn = 1.1 center = (0,0) method = multipass param initVal caption = "Init Value" default = (-0.7456,-0.13) endparam param p1 caption = "Parameter 1" default = (100,200) endparam param p2 caption = "Parameter 2" default = (300,400) endparam } ; Joukowskij-Carr2100 Ellipinskij { ; From Luke Plant's Sierpinski ; Modified by KPK December 1999 init: complex z = 0.3*@fn1(#pixel + @epsilon/#pixel) if (@_c * z + @_d == 0) ; don't divide by 0!! z = @_a * z + @_b else z = (@_a * z + @_b) / (@_c * z + @_d) endif loop: IF (imag(z) > @corte && 2*@corte < imag(z)) z = @factor*real(z) + flip(@factor*imag(z)-1) ELSEIF (real(z) > @corte && 2*@corte < real(z)) z = @factor*real(z)-1 + flip(@factor*imag(z)) ELSEIF (imag(z) < @corte && 0.5*@corte < imag(z)) z = @factor*real(z)+0.75 + flip(@factor+imag(z)) ELSEIF (real(z) < @corte && 0.5*@corte < real(z)) z = @factor*real(z) + flip(@factor*imag(z)) ELSE z = z^2 + #pixel ENDIF if (@pure) z = z^@exponent + #pixel else z = z^@exponent endif bailout: |z| < @bailout default: title = "Ellipinsky" maxiter = 1000 method = multipass periodicity = 0 param exponent caption="Exponent" default=1.0 endparam param epsilon caption="Epsilon, Coeff. for 1/z" default=1.0 endparam param pure caption="With Pixel Addition" default=TRUE endparam param _a caption = "a, upper left coefficient" default = -1 endparam param _b caption = "b, upper right coefficient" default = -1 endparam param _c caption = "c, lower left coefficient" default = 1 endparam param _d caption = "d, lower right coefficient" default = 0 endparam param bailout caption = "Bailout" default = 256 min = 1 endparam param corte caption = "Cutting edges" default = 0.5 endparam param factor caption = "Factor Transformation" default = 2.0 endparam func fn1 caption = "Function 1" default = sqrt() hint = "Shape of the wings" endfunc } agm { init: complex ar = 0 complex ge = 0 complex arit = 0 complex geom = 0 complex oldz = 0 complex old_z = 0 int iter = 0 z = 0 loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ar = |@fn1(z)| ge = |@fn2(old_z)| iter = 0 while (|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation || \ iter < @maxIter*@granulation) iter = iter +1 ; Calculate new values of arithmetical ; and geometrical mean arit = (ar+ge)/2.0 geom = sqrt(ar*ge) ; give these values back ; for the next loop-run ar = arit ge = geom endwhile old_z = oldz oldz = z z = ((z+old_z)/2.0)^(2/iter) + (z*old_z)^iter + #pixel bailout: |z| < 4 default: title = "Arithmetic Geometric Mean #1" maxiter = 1000 method = multipass periodicity = 0 param epsilon caption = "epsilon" default = 0.1 min = 0.0 endparam param granulation caption = "Granulation" default = 1.0 min = 0.0001 endparam param maxIter caption = "Maximum Iterations" default = 20 min = 1 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func fkt caption = "Test Function" default = ident() endfunc func trf caption = "Transfer Function" default = ident() endfunc func fn1 caption = "Real Part Init Function" default = ident() endfunc func fn2 caption = "Imag Part Init Function" default = ident() endfunc } ; agm AGMinsky { init: complex ar = 0 complex ge = 0 complex arit = 0 complex geom = 0 complex oldz = 0 complex old_z = 0 int iter = 0 z = 0.3*@startFkt(#pixel + @jouk/#pixel) loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ar = |@fn1(z)| ge = |@fn2(old_z)| iter = 0 while (|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation || \ iter < @maxIter*@granulation) iter = iter +1 ; Calculate new values of arithmetical ; and geometrical mean arit = (ar+ge)/2.0 geom = sqrt(ar*ge) ; give these values back ; for the next loop-run ar = arit ge = geom endwhile old_z = oldz oldz = z if (imag(z) > @corte/iter) z = 2*(z - iter*1i/(1+iter)) elseif (real(z) > @corte/iter) z = 2*(z - iter/(1+iter)) else if (@elseFlavour == 0) ; Almond z = z^iter + #pixel elseif (@elseFlavour == 1) ; Julio z = #pixel^iter + z elseif (@elseFlavour == 2) ; z = @jouk/z + #pixel^iter endif z = @elseFkt(z) endif bailout: |z| < 4 default: title = "AGMinsky" maxiter = 1000 method = multipass periodicity = 0 param epsilon caption = "epsilon" default = 1e-20 min = 0.0 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param corte caption = "Cutting edges" default = 0.5 endparam param granulation caption = "Granulation" default = 1.0 min = 0.0001 endparam param maxIter caption = "Maximum Iterations" default = 20 min = 1 endparam param elseFlavour caption = "Else Branch Flavours" enum = "Almond" "Julio" "Jouko" "Only With Function" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func startFkt caption = "Start Function" default = abs() endfunc func fkt caption = "Test Function" default = ident() endfunc func fn1 caption = "Real Part Init Function" default = ident() endfunc func fn2 caption = "Imag Part Init Function" default = ident() endfunc func elseFkt caption = "Else Branch Function" default = ident() endfunc } ; AGMinsky agm_carr2100 { init: complex ar = 0 complex ge = 0 complex arit = 0 complex geom = 0 complex oldz = 0 complex old_z = 0 int iter = 0 complex c = 0 z = conj(tan(#pixel)) \ -sqr(conj(0.10/#pixel)) \ -sqr(flip(0.020/#pixel)) int modConst = 4+@skip loop: z1 = 1.5*z, z2 = 2.25*z, z3 = 3.375*z, z4 = 5.0625*z ar = |@fn1(z)| ge = |@fn2(old_z)| iter = 0 while (|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation || \ iter < @maxIter*@granulation) iter = iter +1 ; Calculate new values of arithmetical ; and geometrical mean arit = (ar+ge)/2.0 geom = sqrt(ar*ge) ; give these values back ; for the next loop-run ar = arit ge = geom endwhile old_z = oldz oldz = z if (iter%modConst == 0) z = z1, c = z1 elseif (iter%modConst == 1) z = z2, c = z2 elseif (iter%modConst == 2) z = z3, c = z3 elseif (iter%modConst == 3) z = z4, c = z4 endif ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ; Here comes the Joukowskij z = (z-@jouk/z)^iter + c bailout: |z| < 4 default: title = "AGM Carr2100" maxiter = 1000 method = multipass periodicity = 0 param epsilon caption = "Epsilon" default = 0.1 min = 0.0 endparam param granulation caption = "Granulation" default = 1.0 min = 0.0001 endparam param maxIter caption = "Maximum Iterations" default = 60 min = 1 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param skip caption = "Skip" default = 1 min = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func fkt caption = "Test Function" default = ident() endfunc func trf caption = "Transfer Function" default = ident() endfunc func fn1 caption = "Real Part Init Function" default = ident() endfunc func fn2 caption = "Imag Part Init Function" default = ident() endfunc } ; agm_carr2100 agm_deriv { ; ; inspired by GFW.Albrecht's ; HomePage ; init: bool cond0 = false bool condition0 = false bool cond1 = false bool condition1 = false complex ar = 0 complex ge = 0 complex arit = 0 complex geom = 0 int iter = 0 z = conj(tan(#pixel)) \ -sqr(conj(0.1/#pixel)) \ -sqr(flip(0.02/#pixel)) int modConst = 4+@skip loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (z == 0) deriv = @derivFkt(0) else deriv = (@derivFkt(z) - @derivFkt(0))/z endif ar = |@fn1(z)| ge = |@fn2(deriv)| iter = 0 cond0 = (|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation) cond1 = (iter < @maxIter*@granulation) condition0 = (cond0 || cond1) condition1 = (cond0 && cond1) while (((@loopFlavour == 0 && \ ((|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation)|| \ (iter < @maxIter*@granulation))) || \ (@loopFlavour == 1 && \ ((|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation)&& \ (iter < @maxIter*@granulation))) ) && iter < 1000) iter = iter +1 ; Calculate new values of arithmetical ; and geometrical mean arit = (ar+ge)/2.0 geom = sqrt(ar*ge) ; give these values back ; for the next loop-run ar = arit ge = geom endwhile ; Here comes the Joukowskij z = (z-@jouk/z)^iter + deriv bailout: |z| < 4 default: title = "AGM Deriv" maxiter = 1000 method = multipass periodicity = 0 param epsilon caption = "Epsilon" default = 0.1 min = 0.0 endparam param granulation caption = "Granulation" default = 1.0 min = 0.0001 endparam param maxIter caption = "Maximum Iterations" default = 60 min = 1 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param skip caption = "Skip" default = 1 min = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param loopFlavour caption = "Loop Flavour" enum = "Andreas" "Sam" default = 0 endparam func derivFkt caption = "Derivated Function" default = exp() endfunc func fkt caption = "Test Function" default = ident() endfunc func trf caption = "Transfer Function" default = ident() endfunc func fn1 caption = "Real Part Init Function" default = ident() endfunc func fn2 caption = "Imag Part Init Function" default = ident() endfunc } ; agm_deriv deriv { ; ; inspired by GFW.Albrecht's ; HomePage ; init: z = #pixel loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (z == 0) deriv = @derivFkt(0) else deriv = (@derivFkt(z) - @derivFkt(0))/z endif ; Here comes the Joukowskij z = z-@jouk/z + deriv bailout: |z| < 4 default: title = "Derivation" maxiter = 1000 method = multipass periodicity = 0 param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func derivFkt caption = "Derivated Function" default = cotanh() endfunc } ; deriv deriv2 { ; ; inspired by GFW.Albrecht's ; HomePage ; init: z = #pixel loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (z == 0) deriv = @derivFkt(0) else deriv = (@derivFkt(z) - @derivFkt(0))/z endif ; Here comes the Joukowskij z = deriv^@exponent - @jouk/deriv if (@pure) z = z + #pixel endif bailout: |z| < 4 default: title = "Derivation #2" maxiter = 1000 method = multipass periodicity = 0 param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param exponent caption = "Transfer Exponent" default = 1.0 endparam param pure caption = "With Pixel Addition" default = FALSE endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func derivFkt caption = "Derivated Function" default = cotanh() endfunc } ; deriv2 deriv3 { ; ; inspired by GFW.Albrecht's ; HomePage ; init: z = @initVal loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (z == #pixel) deriv = @derivFkt(#pixel) else deriv = (@derivFkt(z) - @derivFkt(#pixel))/(z-#pixel) endif ; Here comes the Joukowskij z = deriv^@exponent - @jouk/deriv if (@pure) z = z + #pixel endif bailout: |z| < 4 default: title = "Derivation #3" maxiter = 1000 method = multipass periodicity = 0 param initVal caption = "Init Value" default = (0.0,0.0) endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param exponent caption = "Transfer Exponent" default = 1.0 endparam param pure caption = "With Pixel Addition" default = FALSE endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func derivFkt caption = "Derivated Function" default = cotanh() endfunc } ; deriv3 derivinsky { ; ; inspired by GFW.Albrecht's ; HomePage ; init: z = @initVal complex placeOfDeriv = 0 if (@derivation == 0) ; Pixel placeOfDeriv = #pixel else placeOfDeriv = @placeOfDeriv endif int iter = 0 loop: iter = iter+1 ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (imag(z) > @corte) if (@iterMode) z = 2*(z - iter*1i/(1+iter)) else z = 2*(z - 1i) endif elseif (real(z) > @corte) if (@iterMode) z = 2*(z - iter/(1+iter)) else z = 2*(z - 1+iter) endif else if (z == placeOfDeriv) z = @derivFkt(#pixel) else z = (@derivFkt(z) - @derivFkt(placeOfDeriv))/(z-placeOfDeriv) endif if (@exponent != 1) z = z^@exponent endif ; Here comes the Joukowskij if (@jouk != 0) z = z + @jouk/z endif if (@pure) z = z + #pixel endif endif bailout: |z| < 4 default: title = "Derivinsky" maxiter = 500 periodicity = 0 magn = 0.5 method = multipass center = (0,0) param initVal caption = "Init Value" default = (0.0,0.0) endparam param iterMode caption = "Iteration Mode Y/N?" default = FALSE endparam param derivation caption = "Derivation Type" enum = "Pixel" "Place of Derivation" default = 1 endparam param placeOfDeriv caption = "Place of Derivation" default = (0.0,0.0) endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param exponent caption = "Transfer Exponent" default = 1.0 endparam param pure caption = "With Pixel Addition" default = FALSE endparam param corte caption = "Cutting edges" default = 0.5 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func derivFkt caption = "Derivated Function" default = sqrt() endfunc } ; derivinsky Hevia { ; ; Andreas Lober, Feb 20, 2000 ; ; inspired by GFW.Albrecht's Matrix formulas ; and the song "busindre reel" by Hevia ; ; look at z as a real 2-dim vector ; look at the neighborhood of z ; as the 4 entries of a complex 2x2-Matrix ; imagine the FIVE on a dice: z is in the middle ; a,b,c,d are around z ; ; Hints: 1. * Take Operation "Pseudo Scalar" ; * Take Neighbourhood "Flow" ; * Take Lattice Type "None" or "something^2" ; * Play with all the formula's Transfer functions ; * Outside colouring Mark Townsend's "Harlequin" ; with Transfer Function "log" ; and Color Density 1 ; ; 2. * Take Operation "Scalar Product" or "Pseudo Scalar" ; * Take Neighbourhood "Flow" ; * Take Lattice Type "None" or "abs" or "something^2" ; but not "r-something^2" ; * Formula's Transfer Function "sin" is not bad ; * Play with all the formula's Operational functions ; * Play with Joukowskij constant > 0 ; from 1e-7, 1e-6, 1e-5, ..., 0.1, 1, 10, 100, 1000. ; * Outside colouring Mark Townsend's "Harlequin" ; with Transfer Function "log" ; and Color Density 1 ; ; init: z = #pixel complex a = 0 complex b = 0 complex c = 0 complex d = 0 float x = 0 float y = 0 float xf = 0 float yf = 0 float xc = 0 float yc = 0 complex nenner = 0 complex zq = 0 loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ; calculate the "vector" x = real(z) y = imag(z) ; calculate the neighborhood if (@latticeType == 0) ; round xf = @latticeFac*round(x) yf = @latticeFac*round(y) xc = xf+@latticeFac yc = yf+@latticeFac elseif (@latticeType == 1) ; floor/ceil xf = floor(@latticeFac*x)/@latticeFac yf = floor(@latticeFac*y)/@latticeFac xc = ceil(@latticeFac*x)/@latticeFac yc = ceil(@latticeFac*y)/@latticeFac elseif (@latticeType == 2) ; trunc xf = @latticeFac*trunc(x) yf = @latticeFac*trunc(y) xc = xf+@latticeFac yc = yf+@latticeFac elseif (@latticeType == 3) ; flow xf = @latticeFac*x yf = @latticeFac*y xc = xf+@latticeFac yc = yf+@latticeFac endif ; matrix a = xf + 1i*yc b = xc + 1i*yc c = xf + 1i*yf d = xc + 1i*yf if(@operation == 2 || @operation == 3 || @operation == 4) zq = @fn2(z) else zq = 0 endif if (@operation == 0) ; linear ; matrix algebra z = a*x + b*y + 1i*(c*x+d*y) elseif (@operation == 1) ; elliptic nenner = c*z + d if (nenner == 0) nenner = nenner+0.001 endif z = (a*z + b)/nenner elseif (@operation == 2) ; Plane1 z = a*z + b*zq elseif (@operation == 3) ; Plane2 z = c*z + d*zq elseif (@operation == 4) ; Scalar Product z = a*z^2 + (b+c)*z*zq + d*zq^2 elseif (@operation == 5) ; Real Scalar z = a*x^2 + (b+c)*x*y + d*y^2 elseif (@operation == 5) ; Pseudo Scalar z = a*x^2 + b*x*y + 1i*(c*x*y + d*y^2) endif if (@exponent != 1) z = z^@exponent endif if (z != 0 && @jouk != 0) z = z + @jouk/z endif if (@pure) z = z + #pixel endif z = fn1(z) bailout: |z| < 4 default: title = "Hevia" maxiter = 1000 method = multipass periodicity = 0 param latticeType caption = "Neighbourhood" enum = "round" "floor/ceil" "trunc" "flow" default = 1 endparam param latticeFac caption = "Neighbour Factor" default = 1.0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param exponent caption = "Transfer Exponent" default = 1.0 endparam param operation caption = "Operation" enum = "Linear" "Elliptic" "Plane 1" "Plane 2" \ "Scalar Product" "Real Scalar" "Pseudo Scalar" default = 0 endparam param pure caption = "With Pixel Addition" default = FALSE endparam func fn1 caption = "Transfer Function" default = sinh() endfunc func fn2 caption = "Operational Function" default = conj() hint = "Works with Operations Plane1/2 and Scalar Product" endfunc } ; Hevia Hevinsky { init: z = 0.3*@startFkt(#pixel + @jouk/#pixel) complex a = 0 complex b = 0 complex c = 0 complex d = 0 float x = 0 float y = 0 float xf = 0 float yf = 0 float xc = 0 float yc = 0 complex nenner = 0 complex zq = 0 loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (imag(z) > @corte) z = 2*(z - 1) elseif (real(z) > @corte) z = 2*(z - 1i) else ; calculate the "vector" x = real(z) y = imag(z) ; calculate the neighborhood if (@neighbourhood == 0) ; round xf = @neighbour*round(x) yf = @neighbour*round(y) xc = xf+@neighbour yc = yf+@neighbour elseif (@neighbourhood == 1) ; floor/ceil xf = floor(@neighbour*x)/@neighbour yf = floor(@neighbour*y)/@neighbour xc = ceil(@neighbour*x)/@neighbour yc = ceil(@neighbour*y)/@neighbour elseif (@neighbourhood == 2) ; trunc xf = @neighbour*trunc(x) yf = @neighbour*trunc(y) xc = xf+@neighbour yc = yf+@neighbour elseif (@neighbourhood == 3) ; flow xf = @neighbour*x yf = @neighbour*y xc = xf+@neighbour yc = yf+@neighbour endif if(@operation == 2 || @operation == 3 || @operation == 4) zq = @fn2(z) else zq = 0 endif ; matrix a = xf + 1i*yc b = xc + 1i*yc c = xf + 1i*yf d = xc + 1i*yf if (@operation == 0) ; linear ; matrix algebra z = a*x + b*y + 1i*(c*x+d*y) elseif (@operation == 1) ; elliptic nenner = c*z + d if (nenner == 0) nenner = nenner+0.001 endif z = (a*z + b)/nenner elseif (@operation == 2) ; Plane1 z = a*z + b*zq elseif (@operation == 3) ; Plane2 z = c*z + d*zq elseif (@operation == 4) ; Scalar Product z = a*z^2 + (b+c)*z*zq + d*zq^2 elseif (@operation == 5) ; Real Scalar z = a*x^2 + (b+c)*x*y + d*y^2 elseif (@operation == 5) ; Pseudo Scalar z = a*x^2 + b*x*y + 1i*(c*x*y + d*y^2) endif z = @elseFkt(z) endif bailout: |z| < 4 default: title = "Hevinsky" maxiter = 1000 method = multipass periodicity = 0 param neighbourhood caption = "Neighbourhood" enum = "round" "floor/ceil" "trunc" "flow" default = 1 endparam param neighbour caption = "Neighbour Factor" default = 1.0 endparam param operation caption = "Operation" enum = "Linear" "Elliptic" "Plane 1" "Plane 2" \ "Scalar Product" "Real Scalar" "Pseudo Scalar" default = 0 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param corte caption = "Cutting edges" default = 0.5 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func startFkt caption = "Start Function" default = abs() endfunc func elseFkt caption = "Else Branch Function" default = ident() endfunc func fn2 caption = "Operational Function" default = conj() hint = "Works with Operations Plane1/2 and Scalar Product" endfunc } ; Hevinsky stars_and_stripes { init: if (@initType == 0) ; Zero z = 0 else z = #pixel endif complex teiler = 0 complex x = 0 complex y = 0 loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ;calculate the stars term x = real(z) y = imag(z) teiler = (x^2+1e-20)/(y^2+1e-20) x = 0 y = 0 if (@teilType == 0 || @teilType == 2) ; real || both x = @teilFkt(teiler) endif if (@teilType == 1 || @teilType == 2) ; imag || both y = 1i*@teilFkt(1/teiler) endif teiler = x+y ; stars term ready if (@exponent != 1) z = z^@exponent endif z = teiler*z + @jouk/z if (@pure) z = z + #pixel endif bailout: |z| < 4 default: title = "Stars and Stripes" maxiter = 1000 method = multipass periodicity = 0 param initType caption = "Init Type" enum = "Zero" "Pixel" default = 1 endparam param teilType caption = "Partitioning Type" enum = "Real" "Imag" "Both" default = 0 endparam param exponent caption = "Transfer Exponent" default = 1.0 endparam param pure caption = "With Pixel Addition" default = TRUE endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func teilFkt caption = "Partitioning Function" default = round() endfunc } allinone { ; ; Andreas Lober, March 04, 2000 ; ; ; init: z = #pixel complex a = 0 complex b = 0 complex c = 0 complex d = 0 float x = 0 float y = 0 float xf = 0 float yf = 0 float xc = 0 float yc = 0 int iter = 0 loop: ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (@transformation == 0) ; None z = @HarlFkt(z) elseif (@transformation == 1) ; Joukowskij z = @HarlFkt(z + @transfConst/z) elseif (@transformation == 2) ; Elliptic z = -(z+@transfConst)/@HarlFkt(z) elseif (@transformation == 3 || @transformation == 4) ; Harlequin1+2 if (@transformation == 3) ; Harlequin1 if (@townsend == 0) z = 2*atan(imag(z)/real(z)) else z = 2*atan2(imag(z)/real(z)) endif else ; Harlequin2 if (@townsend == 0) z = 2*atan(z) else z = 2*atan2(z) endif endif z = @HarlFkt(1-z^(@transfConst*4)) elseif (@transformation >= 5 && @transformation <= 8) ; Hevia1-4 z = @HarlFkt(z) x = real(z) y = imag(z) xf = @transfConst*round(x) yf = @transfConst*round(y) xc = xf+@transfConst yc = yf+@transfConst a = xf + 1i*yc b = xc + 1i*yc c = xf + 1i*yf d = xc + 1i*yf if (@transformation == 5) z = a*x + b*y + 1i*(c*x+d*y) elseif (@transformation == 6) z = a*z^2 + (b+c)*z*conj(z) + d*conj(z)^2 elseif (@transformation == 7) z = a*x^2 + (b+c)*x*y + d*y^2 elseif (@transformation == 8) z = a*x^2 + b*x*y + 1i*(c*x*y + d*y^2) endif elseif (@transformation == 9 || @transformation == 10) ; Lissajous a = sin (2*z) b = cos (3*z) c = @HarlFkt(a+1i*b) if (c == 0) c = z endif if (@transformation == 9) z = c^@transfConst else z = @HarlFkt(z^@transfConst) + c endif ; z = 1/c^@transfConst elseif (@transformation >= 11 && @transformation <= 14) ; MT-Sine* x = |z| ; MT: r if (@townsend == 0) y = real(atan(z)) ; MT: theta else y = atan2(z) ; MT: theta endif if (y > 0) y = y + 2*#pi endif if (@transformation == 11) ; MT-Sine z = x*( cos(y) + 1i* sin(y)) elseif (@transformation == 12) ; MT-ArcSine z = x*(acos(y) + 1i*asin(y)) elseif (@transformation == 13) ; MT-SineHyp z = x*( cosh(y) + 1i* sinh(y)) elseif (@transformation == 14) ; MT-ArSineHyp z = x*(acosh(y) + 1i*asinh(y)) endif z = @HarlFkt(z) elseif (@transformation >= 15 && @transformation <= 18) ; Cardioid if (@townsend == 0) y = real(atan(z)) ; MT: theta and atan2 else y = atan2(z) ; MT: theta and atan2 endif x = 1-cos(y) ; MT: radius if (@transformation == 15) ; MT-Cardioid z = x*( cos(y) + 1i* sin(y)) elseif (@transformation == 16) ; ArcDroid z = x*(acos(y) + 1i*asin(y)) elseif (@transformation == 17) ; CardioHype z = x*( cosh(y) + 1i* sinh(y)) elseif (@transformation == 18) ; ArDioidHype z = x*(acosh(y) + 1i*asinh(y)) endif z = @HarlFkt(z) elseif (@transformation >= 19 || @transformation <= 21) ; Sam's Julia complex zz = #pixel z = exp(-1i*#pi/180)*z float samsBail = 1000 if (@transformation == 20) samsBail = samsBail + iter*100000 elseif(@transformation == 21) samsBail = 1e20 endif x = 1/sqrt(2)*real(z) y = sqrt(2)*imag(z) complex start = x+1i*y ; z ; (-1.745,.01) int i = 0 while (i < 100 && |zz| < samsBail) i=i+1 zz = zz^2/@transfConst + start endwhile z = @HarlFkt(zz) endif if (@exponent != 1) z = z^@exponent endif if (z != 0 && @jouk != 0) z = z + @jouk/z endif if (@pure) z = z + #pixel endif z = fn1(z) bailout: |z| < 4 default: title = "Alli None" maxiter = 500 periodicity = 0 magn = 3.5 method = multipass center = (1.575,0) angle = 270 param transformation caption = "Transformation" enum = "None" \ "Joukowskij" "Elliptic" \ "Harlequin 1" "Harlequin 2" \ "Hevia 1" "Hevia 2" "Hevia 3" "Hevia 4" \ "Lissajous" "Lissajous+" \ "MT-Sine" "MT-ArcSine" "MT-SineHyp" "MT-ArSineHyp" \ "MT-Cardioid" "ArcDroid" "CardioHype" "ArDioidHype" \ "Sam's Julia small" "Sam's Julia grow" "Sam's Julia big" default = 2 endparam param transfConst caption = "Transf. Constant" default = 1.0 min = 0.01 endparam param townsend caption = "For MT-Transforms" enum = "atan" "atan2" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 2 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param exponent caption = "Transfer Exponent" default = 1.2 endparam param pure caption = "With Pixel Addition" default = FALSE endparam func HarlFkt caption = "Transfer Function" default = ident() endfunc func fn1 caption = "Additional Function" default = log() endfunc } ; allinone Alli_Nonesky { init: int iter = 0 z = 0.3*@startFkt(#pixel + @jouk/#pixel) bool elseBranchActive = FALSE float y = 0 float x = 0 int l_coord = @coordLoop int koord = @coord loop: iter = iter+1 int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif elseBranchActive = FALSE if (imag(z) > @corte) z = 2*(z - iter*1i/(1+iter)) elseif (real(z) > @corte) z = 2*(z - iter/(1+iter)) else elseBranchActive = TRUE endif if (elseBranchActive) if (@transformation == 0) ; None z = @HarlFkt(z) elseif (@transformation == 1) ; Joukowskij z = @HarlFkt(z + @transfConst/z) elseif (@transformation == 2) ; Elliptic z = -(z+@transfConst)/@HarlFkt(z) elseif (@transformation == 3 || @transformation == 4) ; Harlequin1+2 if (@transformation == 3) ; Harlequin1 if (@townsend == 0) z = 2*atan(imag(z)/real(z)) else z = 2*atan2(imag(z)/real(z)) endif else ; Harlequin2 if (@townsend == 0) z = 2*atan(z) else z = 2*atan2(z) endif endif z = @HarlFkt(1-z^(@transfConst*4)) elseif (@transformation >= 5 && @transformation <= 8) ; Hevia1-4 z = @HarlFkt(z) x = real(z) y = imag(z) xf = @transfConst*round(x) yf = @transfConst*round(y) xc = xf+@transfConst yc = yf+@transfConst a = xf + 1i*yc b = xc + 1i*yc c = xf + 1i*yf d = xc + 1i*yf if (@transformation == 5) z = a*x + b*y + 1i*(c*x+d*y) elseif (@transformation == 6) z = a*z^2 + (b+c)*z*conj(z) + d*conj(z)^2 elseif (@transformation == 7) z = a*x^2 + (b+c)*x*y + d*y^2 elseif (@transformation == 8) z = a*x^2 + b*x*y + 1i*(c*x*y + d*y^2) endif elseif (@transformation == 9 || @transformation == 10) ; Lissajous a = sin (2*z) b = cos (3*z) c = @HarlFkt(a+1i*b) if (c == 0) c = z endif if (@transformation == 9) z = c^@transfConst else z = @HarlFkt(z^@transfConst) + c endif ; z = 1/c^@transfConst elseif (@transformation >= 11 && @transformation <= 14) ; MT-Sine* x = |z| ; MT: r if (@townsend == 0) y = real(atan(z)) ; MT: theta else y = atan2(z) ; MT: theta endif if (y > 0) y = y + 2*#pi endif if (@transformation == 11) ; MT-Sine z = x*( cos(y) + 1i* sin(y)) elseif (@transformation == 12) ; MT-ArcSine z = x*(acos(y) + 1i*asin(y)) elseif (@transformation == 13) ; MT-SineHyp z = x*( cosh(y) + 1i* sinh(y)) elseif (@transformation == 14) ; MT-ArSineHyp z = x*(acosh(y) + 1i*asinh(y)) endif z = @HarlFkt(z) elseif (@transformation >= 15 && @transformation <= 18) ; Cardioid if (@townsend == 0) y = real(atan(z)) ; MT: theta and atan2 else y = atan2(z) ; MT: theta and atan2 endif x = 1-cos(y) ; MT: radius if (@transformation == 15) ; MT-Cardioid z = x*( cos(y) + 1i* sin(y)) elseif (@transformation == 16) ; ArcDroid z = x*(acos(y) + 1i*asin(y)) elseif (@transformation == 17) ; CardioHype z = x*( cosh(y) + 1i* sinh(y)) elseif (@transformation == 18) ; ArDioidHype z = x*(acosh(y) + 1i*asinh(y)) endif z = @HarlFkt(z) elseif (@transformation >= 19 || @transformation <= 21) ; Sam's Julia complex zz = #pixel z = exp(-1i*#pi/180)*z float samsBail = 1000 int samsLoop = 10 if (@transformation == 20) samsBail = samsBail + iter*100000 samsLoop = samsLoop + iter elseif(@transformation == 21) samsBail = 1e20 samsLoop = 100 endif x = 1/sqrt(2)*real(z)*@transfConst y = sqrt(2)*imag(z)*@transfConst complex start = x+1i*y ; z ; (-1.745,.01) int i = 0 while (i < samsLoop && |zz| < samsBail) i=i+1 zz = zz^2 + start*i endwhile z = @HarlFkt(zz) endif endif bailout: |z| < 4 default: title = "Alli Nonesky" maxiter = 500 periodicity = 0 method = multipass magn = 0.4 param transformation caption = "Transformation" enum = "None" \ "Joukowskij" "Elliptic" \ "Harlequin 1" "Harlequin 2" \ "Hevia 1" "Hevia 2" "Hevia 3" "Hevia 4" \ "Lissajous" "Lissajous+" \ "MT-Sine" "MT-ArcSine" "MT-SineHyp" "MT-ArSineHyp" \ "MT-Cardioid" "ArcDroid" "CardioHype" "ArDioidHype" \ "Sam's Julia small" "Sam's Julia grow" "Sam's Julia big" default = 13 endparam param transfConst caption = "Transf. Constant" default = 1.0 min = 0.01 endparam param townsend caption = "For MT-Transforms" enum = "atan" "atan2" default = 0 endparam param jouk caption = "Joukowskij Constant" default = (0.00,0.00) endparam param corte caption = "Cutting edges" default = 0.5 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func startFkt caption = "Start Function" default = abs() endfunc func HarlFkt caption = "Else Branch Function" default = ident() endfunc } ; Alli Nonesky Hevinsky-Angel { ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: z = 0.3*@startFkt(#pixel + @jouk/#pixel) complex a = 0 complex b = 0 complex c = 0 complex d = 0 float x = 0 float y = 0 float xf = 0 float yf = 0 float xc = 0 float yc = 0 complex nenner = 0 complex zq = 0 float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = testAngle1*@corte2 complex rotAngle1 = 2*1i*testAngle1 complex rotAngle2 = 2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif arg = atan2(z) if (abs(arg) < testAngle1) z = z*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = z*exp(rotAngle2) else ; calculate the "vector" x = real(z) y = imag(z) ; calculate the neighborhood if (@neighbourhood == 0) ; round xf = @neighbour*round(x) yf = @neighbour*round(y) xc = xf+@neighbour yc = yf+@neighbour elseif (@neighbourhood == 1) ; floor/ceil xf = floor(@neighbour*x)/@neighbour yf = floor(@neighbour*y)/@neighbour xc = ceil(@neighbour*x)/@neighbour yc = ceil(@neighbour*y)/@neighbour elseif (@neighbourhood == 2) ; trunc xf = @neighbour*trunc(x) yf = @neighbour*trunc(y) xc = xf+@neighbour yc = yf+@neighbour elseif (@neighbourhood == 3) ; flow xf = @neighbour*x yf = @neighbour*y xc = xf+@neighbour yc = yf+@neighbour endif if(@operation == 2 || @operation == 3 || @operation == 4) zq = @fn2(z) else zq = 0 endif ; matrix a = xf + 1i*yc b = xc + 1i*yc c = xf + 1i*yf d = xc + 1i*yf if (@operation == 0) ; linear ; matrix algebra z = a*x + b*y + 1i*(c*x+d*y) elseif (@operation == 1) ; elliptic nenner = c*z + d if (nenner == 0) nenner = nenner+0.001 endif z = (a*z + b)/nenner elseif (@operation == 2) ; Plane1 z = a*z + b*zq elseif (@operation == 3) ; Plane2 z = c*z + d*zq elseif (@operation == 4) ; Scalar Product z = a*z^2 + (b+c)*z*zq + d*zq^2 elseif (@operation == 5) ; Real Scalar z = a*x^2 + (b+c)*x*y + d*y^2 elseif (@operation == 5) ; Pseudo Scalar z = a*x^2 + b*x*y + 1i*(c*x*y + d*y^2) endif z = @elseFkt(z) endif bailout: |z| < 4 default: title = "Hevinsky Angel" magn = 0.25 maxiter = 250 method = multipass periodicity = 0 param neighbourhood caption = "Neighbourhood" enum = "round" "floor/ceil" "trunc" "flow" default = 1 endparam param neighbour caption = "Neighbour Factor" default = 1.0 endparam param operation caption = "Operation" enum = "Linear" "Elliptic" "Plane 1" "Plane 2" \ "Scalar Product" "Real Scalar" "Pseudo Scalar" default = 0 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 3.0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func startFkt caption = "Start Function" default = abs() endfunc func elseFkt caption = "Else Branch Function" default = ident() endfunc func fn2 caption = "Operational Function" default = conj() hint = "Works with Operations Plane1/2 and Scalar Product" endfunc } ; Hevinsky-Angel sierpinski-angle { ; Written by Luke Plant ; Modified by Frederik Slijkerman ; Modified by Samuel Monnier ; (Twist functions added) ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex z = #pixel float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif arg = atan2(z) if (abs(arg) < testAngle1) z = @f1(z)*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = @f2(z)*exp(rotAngle2) else z = @f3(2*real(z) + flip(2*imag(z))) endif bailout: |z| < @bailout default: title = "Sir Pinksi Angle" magn = 1.1538 maxiter = 149 method = multipass periodicity = 0 param bailout caption = "Bailout value" default = 127 min = 1 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func f1 caption = "Function 1" default = ident() endfunc func f2 caption = "Function 2" default = ident() endfunc func f3 caption = "Function 3" default = ident() endfunc } sierpinski-angle-fct { ; Written by Luke Plant ; Modified by Frederik Slijkerman ; Modified by Samuel Monnier ; (Twist functions added) ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex z = #pixel float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif arg = atan2(z) if (abs(arg) < testAngle1) z = @f1(z)*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = @f2(z)*exp(rotAngle2) else z = cos(z) if (@cortexp != 1) z = z^@cortexp endif z = @f3(z) endif bailout: |z| < @bailout default: title = "Sierpinksi Angle fct" magn = 1.1538 maxiter = 149 method = multipass periodicity = 0 param bailout caption = "Bailout value" default = 127 min = 1 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param cortexp caption = "Cutting exponent" default = (1.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func f1 caption = "Function 1" default = ident() endfunc func f2 caption = "Function 2" default = ident() endfunc func f3 caption = "Function 3" default = ident() endfunc } sierpinski-angel1 { ; Written by Luke Plant ; Modified by Frederik Slijkerman ; Modified by Samuel Monnier ; (Twist functions added) ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex z = #pixel float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (imag(z)>0.5) z = @f1(2*real(z) + flip(2*imag(z)-1)) elseif (real(z)>0.5) z = @f2(2*real(z)-1 + flip(2*imag(z))) else arg = atan2(z) if (abs(arg) < testAngle1) z = z*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = z*exp(rotAngle2) else z = @f3(2*real(z) + flip(2*imag(z))) endif endif bailout: |z| < @bailout default: title = "Sierpinksi Angel #1" magn = 1.1538 maxiter = 149 method = multipass periodicity = 0 param bailout caption = "Bailout value" default = 127 min = 1 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func f1 caption = "Function 1" default = ident() endfunc func f2 caption = "Function 2" default = ident() endfunc func f3 caption = "Function 3" default = ident() endfunc } sierpinski-angel2 { ; Written by Luke Plant ; Modified by Frederik Slijkerman ; Modified by Samuel Monnier ; (Twist functions added) ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex z = #pixel float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif arg = atan2(z) if (abs(arg) < testAngle1) z = z*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = z*exp(rotAngle2) else IF (imag(z)>0.5) z = @f1(2*real(z) + flip(2*imag(z)-1)) ELSEIF (real(z)>0.5) z = @f2(2*real(z)-1 + flip(2*imag(z))) ELSE z = @f3(2*real(z) + flip(2*imag(z))) ENDIF ENDIF bailout: |z| < @bailout default: title = "Sierpinksi Angel #2" magn = 1.1538 maxiter = 149 method = multipass periodicity = 0 param bailout caption = "Bailout value" default = 127 min = 1 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func f1 caption = "Function 1" default = ident() endfunc func f2 caption = "Function 2" default = ident() endfunc func f3 caption = "Function 3" default = ident() endfunc } sierpinski-octangel { ; Written by Luke Plant ; Modified by Frederik Slijkerman ; Modified by Samuel Monnier ; (Twist functions added) ; OctAngel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex z = #pixel float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = #pi/@corte2 complex rotAngle1 = 1i*testAngle1 complex rotAngle2 = 1i*testAngle2 float x = 0 float y = 0 float angle = @angle*#pi/180 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif x = real(z) y = imag(z) if x < 0 x = -x endif if y < 0 y = -y endif z = x + flip(y) arg = atan2(z) if (arg > testAngle1-angle) z = z*exp(-rotAngle1) elseif (arg < testAngle1-angle && arg > angle) z = z*exp(-rotAngle2) z = z*sin(angle)/sin(rotAngle2-angle) else IF (imag(z)>0.5) z = @f1(2*real(z) + flip(2*imag(z)-1)) ELSEIF (real(z)>0.5) z = @f2(2*real(z)-1 + flip(2*imag(z))) ELSE z = @f3(2*real(z) + flip(2*imag(z))) ENDIF ENDIF bailout: |z| < @bailout default: title = "Sierpinksi OctAngel" magn = 0.25 maxiter = 149 method = multipass periodicity = 0 param angle caption = "Angle" default = 45.0 endparam param bailout caption = "Bailout value" default = 127 min = 1 endparam param corte1 caption = "Old Cutting edges" default = 2.0 endparam param corte2 caption = "New Cutting edges" default = 4.0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func f1 caption = "Function 1" default = ident() endfunc func f2 caption = "Function 2" default = ident() endfunc func f3 caption = "Function 3" default = ident() endfunc } AGMinsky-Angel { ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex ar = 0 complex ge = 0 complex arit = 0 complex geom = 0 complex oldz = 0 complex old_z = 0 int iter = 0 z = 0.3*@startFkt(#pixel + @jouk/#pixel) float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ar = |@fn1(z)| ge = |@fn2(old_z)| iter = 0 while (|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation || \ iter < @maxIter*@granulation) iter = iter +1 ; Calculate new values of arithmetical ; and geometrical mean arit = (ar+ge)/2.0 geom = sqrt(ar*ge) ; give these values back ; for the next loop-run ar = arit ge = geom endwhile old_z = oldz oldz = z arg = atan2(z) if (abs(arg) < testAngle1) z = z*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = z*exp(rotAngle2) else if (imag(z) > @corte/iter) z = 2*(z - iter*1i/(1+iter)) elseif (real(z) > @corte/iter) z = 2*(z - iter/(1+iter)) else if (@elseFlavour == 0) ; Almond z = z^iter + #pixel elseif (@elseFlavour == 1) ; Julio z = #pixel^iter + z elseif (@elseFlavour == 2) ; z = @jouk/z + #pixel^iter endif z = @elseFkt(z) endif endif bailout: |z| < @bailout default: title = "AGMinsky Angel #1" magn = 0.25 maxiter = 250 method = multipass periodicity = 0 param bailout caption = "Bailout value" default = 4 min = 1 endparam param epsilon caption = "Epsilon" default = 1e-20 min = 0.0 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param corte caption = "Cutting edges" default = 0.5 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param granulation caption = "Granulation" default = 1.0 min = 0.0001 endparam param maxIter caption = "Maximum Iterations" default = 20 min = 1 endparam param elseFlavour caption = "Else Branch Flavours" enum = "Almond" "Julio" "Jouko" "Only With Function" default = 0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func startFkt caption = "Start Function" default = abs() endfunc func fkt caption = "Test Function" default = ident() endfunc func fn1 caption = "Real Part Init Function" default = ident() endfunc func fn2 caption = "Imag Part Init Function" default = ident() endfunc func elseFkt caption = "Else Branch Function" default = ident() endfunc } ; AGMinsky-Angel AGMinsky-Angel2 { ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex ar = 0 complex ge = 0 complex arit = 0 complex geom = 0 complex oldz = 0 complex old_z = 0 int iter = 0 z = 0.3*@startFkt(#pixel + @jouk/#pixel) float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif ar = |@fn1(z)| ge = |@fn2(old_z)| iter = 0 while (|@fkt(ar)-@fkt(ge)| > @epsilon/@granulation || \ iter < @maxIter*@granulation) iter = iter +1 ; Calculate new values of arithmetical ; and geometrical mean arit = (ar+ge)/2.0 geom = sqrt(ar*ge) ; give these values back ; for the next loop-run ar = arit ge = geom endwhile old_z = oldz oldz = z arg = atan2(z) if (imag(z) > @corte/iter) z = 2*(z - iter*1i/(1+iter)) elseif (real(z) > @corte/iter) z = 2*(z - iter/(1+iter)) else if (abs(arg) < testAngle1) z = z*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = z*exp(rotAngle2) else if (@elseFlavour == 0) ; Almond z = z^iter + #pixel elseif (@elseFlavour == 1) ; Julio z = #pixel^iter + z elseif (@elseFlavour == 2) ; z = @jouk/z + #pixel^iter endif z = @elseFkt(z) endif endif bailout: |z| < @bailout default: title = "AGMinsky Angel #2" magn = 0.25 maxiter = 250 method = multipass periodicity = 0 param bailout caption = "Bailout value" default = 4 min = 1 endparam param epsilon caption = "Epsilon" default = 1e-20 min = 0.0 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param corte caption = "Cutting edges" default = 0.5 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param granulation caption = "Granulation" default = 1.0 min = 0.0001 endparam param maxIter caption = "Maximum Iterations" default = 20 min = 1 endparam param elseFlavour caption = "Else Branch Flavours" enum = "Almond" "Julio" "Jouko" "Only With Function" default = 0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func startFkt caption = "Start Function" default = abs() endfunc func fkt caption = "Test Function" default = ident() endfunc func fn1 caption = "Real Part Init Function" default = ident() endfunc func fn2 caption = "Imag Part Init Function" default = ident() endfunc func elseFkt caption = "Else Branch Function" default = ident() endfunc } ; AGMinsky-Angel2 turnaround { ; From Luke Plant's Sierpinski ; Modified by KPK December 1999 ; OctAngel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex z = pixel float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif arg = atan2(z) if (abs(arg) < testAngle1) z = z*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = z*exp(rotAngle2) else if (arg < 0) arg = arg + 2*#pi endif z = @fn1(z)*arg ;z = flip(z) + arg/(2*#pi) ;z = flip(z) + 1i*arg/(2*#pi) ;z = conj(flip(z)+1i*arg/(2*#pi)) endif bailout: |z| < @bailout default: title = "Turnaround" method = multipass periodicity = 0 maxiter = 500 param bailout caption = "Bailout value" default = 3 min = 1 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func fn1 caption = "Else Function" default = flip() endfunc func startFct caption = "Start Function" default = ident() endfunc } ; turnaround turnaround_8 { ; From Luke Plant's Sierpinski ; Modified by KPK December 1999 ; OctAngel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier ; init: complex z = pixel float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = #pi/@corte2 complex rotAngle1 = 1i*testAngle1 complex rotAngle2 = 1i*testAngle2 float x = 0 float y = 0 float angle = @angle*#pi/180 int l_coord = @coordLoop int koord = @coord loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif x = real(z) y = imag(z) if x < 0 x = -x endif if y < 0 y = -y endif z = x + flip(y) arg = atan2(z) if (arg > testAngle1-angle) z = z*exp(-rotAngle1) elseif (arg < testAngle1-angle && arg > angle) z = z*exp(-rotAngle2) z = z*sin(angle)/sin(rotAngle2-angle) else if (arg < 0) arg = arg + 2*#pi endif z = flip(z) + 1i*arg/(2*#pi) z = @fn1(z*arg) endif bailout: |z| < @bailout default: title = "Turnaround 8" method = multipass periodicity = 0 maxiter = 500 param angle caption = "Angle" default = 45.0 endparam param bailout caption = "Bailout value" default = 3 min = 1 endparam param corte1 caption = "Old Cutting edges" default = 2.0 endparam param corte2 caption = "New Cutting edges" default = 4.0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func fn1 caption = "Else Function" default = flip() endfunc func startFct caption = "Start Function" default = ident() endfunc } ; turnaround EllipticJulia { ; When I saw the Magnetic Julia by ; Edward M. Perry ; I was reminded at once of my ; elliptic colouring: ; Instead of (az+c)/(bz-c) ; elliptic goes (az+b)/(cz+d). ; Therefore Magnetic Julia is included here... ; The rest is toolbox stuff... ; init: ;turnaround float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = #pi/@corte2 complex rotAngle1 = 1i*testAngle1 complex rotAngle2 = 1i*testAngle2 float x = 0 float y = 0 float angle = @angle*#pi/180 ;elliptic float _xx = 0 float _yy = 0 ;complex a = 0 ;complex b = 0 int l_coord = @coordLoop int koord = @coord ;complex w = (0,0) z = #pixel loop: int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = @startFct(z) ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif if (@with_Turnaround8) x = real(z) y = imag(z) if x < 0 x = -x endif if y < 0 y = -y endif z = x + flip(y) arg = atan2(z) if (arg > testAngle1-angle) z = z*exp(-rotAngle1) elseif (arg < testAngle1-angle && arg > angle) z = z*exp(-rotAngle2) z = z*sin(angle)/sin(rotAngle2-angle) else if (@with_FullTurnaround8) if (arg < 0) arg = arg + 2*#pi endif z = flip(z) + 1i*arg/(2*#pi) z = @fn1(z*arg) endif endif endif ; Here comes the Joukowskij if (z != 0 && @jouk != 0) z = z + @jouk/z endif if (@exponent != 1) z = z^@exponent endif if (@with_PreSeedAdd) z = z + @seed endif if (@with_PrePixelAdd) z = z + #pixel endif ; ; transformation ; if (@_pseudo) float _x = real(z) float _y = imag(z) ; ; calculate the temp real _xx ; if (@_c * _x + @_d == 0) ; don't divide by 0!! _xx = @_a * _x + @_b else if (@_pseudoMix) if (@_mixMode == 0) ; normal mix _xx = (@_a * _y + @_b) / (@_c * _x + @_d) elseif (@_mixMode == 1) ; diff mix _xx = (@_a * (_x-_y)+ @_b) / (@_c * _x + @_d) elseif (@_mixMode == 2) ; sum mix _xx = (@_a * (_x+_y)+ @_b) / (@_c * _x + @_d) elseif (@_mixMode == 3) ; prod mix _xx = (@_a * (_x*_y)+ @_b) / (@_c * _x + @_d) elseif (@_mixMode == 4) ; prod mix _xx = (@_a * (_x^_y)+ @_b) / (@_c * _x + @_d) endif else _xx = (@_a * _x + @_b) / (@_c * _x + @_d) endif endif ; ; calculate the temp imag _yy ; if (@_c * _y + @_d == 0) ; don't divide by 0!! _yy = @_a * _y + @_b else if (@_pseudoMix) if (@_mixMode == 0) ; normal mix _yy = (@_a * _x + @_b) / (@_c * _y + @_d) elseif (@_mixMode == 1) ; diff mix _yy = (@_a * (_y-_x) + @_b) / (@_c * _y + @_d) elseif (@_mixMode == 2) ; sum mix _yy = (@_a * (_y+_x) + @_b) / (@_c * _y + @_d) elseif (@_mixMode == 3) ; prod mix _yy = (@_a * (_y*_x) + @_b) / (@_c * _y + @_d) elseif (@_mixMode == 4) ; prod mix _yy = (@_a * (_y^_x) + @_b) / (@_c * _y + @_d) endif else _yy = (@_a * _y + @_b) / (@_c * _y + @_d) endif endif z = real(@mixFkt_x(_xx)) + 1i*real(@mixFkt_y(_yy)) else if (@_c * z + @_d == 0) ; don't divide by 0!! z = @_a * z + @_b else z = (@_a * z + @_b) / (@_c * z + @_d) endif endif if (@with_PostSeedAdd) z = z + @seed endif if (@with_PostPixelAdd) z = z + #pixel endif z = @fkt(z) bailout: |z| <= @bailout default: title = "Elliptic Turnaround" maxiter = 1000 method = multipass periodicity = 0 param seed caption = "Julia seed" default = (-1.25, 0) hint = "Julia Seed" endparam param _a caption = "a, upper left coefficient" default = -1 endparam param _b caption = "b, upper right coefficient" default = -1 endparam param _c caption = "c, lower left coefficient" default = 1 endparam param _d caption = "d, lower right coefficient" default = 0 endparam param _pseudo caption = "Pseudo Elliptic" default = false hint = "separate transforming real and imag" endparam param _pseudoMix caption = "Pseudo Mix Real and Imag" default = false hint = "only in use with Pseudo Elliptic" endparam param _mixMode caption = "Mix Mode for Pseudo Mix" enum = "Normal" "Difference" "Sum" "Product" "Exponent" endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (0.1,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (0.1,0.0) endparam param bailout caption = "Bailout value" default = 4.0 min = 1.0 hint = "Bailout" endparam param exponent caption = "Exponent for Elliptic" default = 6.0 endparam param with_PrePixelAdd caption = "Pre Pixel Addition" default = false hint = "Adds the pixel before the Elliptic Transformation" endparam param with_PreSeedAdd caption = "Pre Seed Addition" default = false hint = "Adds the seed before the Elliptic Transformation" endparam param with_PostPixelAdd caption = "Post Pixel Addition" default = false hint = "Adds the pixel after the Elliptic Transformation" endparam param with_PostSeedAdd caption = "Post Seed Addition" default = true hint = "Adds the seed after the Elliptic Transformation" endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.01) endparam param with_Turnaround8 caption = "Turnaround 8?" default = true hint = "" endparam param with_FullTurnaround8 caption = "Full Turnaround 8?" default = false hint = "" endparam param angle caption = "Angle" default = 10.0 endparam param corte1 caption = "Old Cutting edges" default = 2.0 endparam param corte2 caption = "New Cutting edges" default = 4.0 endparam func mixFkt_x caption = "PseudoMix x-Function" default = ident() endfunc func mixFkt_y caption = "PseudoMix y-Function" default = ident() endfunc func startFct caption = "Start Function" default = ident() endfunc func fkt caption = "Additional Function" default = ident() hint = "Last Transfer to Index" endfunc func fn1 caption = "Turnaround Function" default = sin() hint = "Last Transfer to Index" endfunc } Bayley'sJuliout { ; Generic Julia set init: z = @startFct(#pixel) int iter = 1 complex oldZ = z complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 int l_coord = @coordLoop int koord = @coord loop: iter = iter + 1 oldZ = z int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = z^@power + @seed IF (@bailMode == 0) bailZ = z ELSEIF (@bailMode == 1) bailZ = z-oldZ ELSEIF (@bailMode == 2) bailZ = (z+oldZ)/2 ELSEIF (@bailMode == 3) bailZ = z-#pixel ELSEIF (@bailMode == 4) bailZ = z/|oldZ| ELSEIF (@bailMode == 5) bailZ = z/real(z) ELSEIF (@bailMode == 6) bailZ = z/imag(z) ELSEIF (@bailMode == 7) bailZ = z/(|real(z)|+1) ELSEIF (@bailMode == 8) bailZ = z/(|imag(z)|+1) ELSEIF (@bailMode == 9) bailZ = z/real(oldZ) ELSEIF (@bailMode == 10) bailZ = z/imag(oldZ) ELSEIF (@bailMode == 11) bailZ = z/(|real(oldZ)|+1) ELSEIF (@bailMode == 12) bailZ = z/(|imag(oldZ)|+1) ENDIF if (@bailNorm == 1) bailZ = bailZ/(|oldZ|+@normConst) elseif (@bailNorm == 2) bailZ = bailZ/(|#pixel|+@normConst) elseif (@bailNorm == 3) bailZ = bailZ/(|oldZ-#pixel|+@normConst) endif IF (@test == 0) bailCheck = bailZ ELSEIF (@test == 1) bailCheck = real(bailZ)^2 ELSEIF (@test == 2) bailCheck = imag(bailZ)^2 ELSEIF (@test == 3) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe < bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 4) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe > bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Bailey's Juliout " method = multipass periodicity = 0 param seed caption = "Julia seed" default = (-1.25, 0) hint = "Use this to create many different Julia sets. You can \ also set this value using the Switch feature." endparam param power caption = "Power" default = (2,0) hint = "This defines the power of the Julia set. Use (2,0) \ for the standard Julia set." endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 0 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFct caption = "Start Function" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc switch: type = "Bailey'sMandelbrout" power = power coord = coord coordLoop = coordLoop coordMode = coordMode bailout = bailout test = test bailMode = bailMode bailNorm = bailNorm normConst = normConst bailUp = bailUp startFct = startFct bailFunc = bailFunc goofFunc = goofFunc } Bailey'sMandelbrout { ; Generic Mandelbrot set init: z = @start int iter = 1 complex oldZ = z complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 int l_coord = @coordLoop int koord = @coord loop: iter = iter + 1 oldZ = z int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten z = z^@power + @startFct(#pixel) IF (@bailMode == 0) bailZ = z ELSEIF (@bailMode == 1) bailZ = z-oldZ ELSEIF (@bailMode == 2) bailZ = (z+oldZ)/2 ELSEIF (@bailMode == 3) bailZ = z-#pixel ELSEIF (@bailMode == 4) bailZ = z/|oldZ| ELSEIF (@bailMode == 5) bailZ = z/real(z) ELSEIF (@bailMode == 6) bailZ = z/imag(z) ELSEIF (@bailMode == 7) bailZ = z/(|real(z)|+1) ELSEIF (@bailMode == 8) bailZ = z/(|imag(z)|+1) ELSEIF (@bailMode == 9) bailZ = z/real(oldZ) ELSEIF (@bailMode == 10) bailZ = z/imag(oldZ) ELSEIF (@bailMode == 11) bailZ = z/(|real(oldZ)|+1) ELSEIF (@bailMode == 12) bailZ = z/(|imag(oldZ)|+1) ENDIF if (@bailNorm == 1) bailZ = bailZ/(|oldZ|+@normConst) elseif (@bailNorm == 2) bailZ = bailZ/(|#pixel|+@normConst) elseif (@bailNorm == 3) bailZ = bailZ/(|oldZ-#pixel|+@normConst) endif IF (@test == 0) bailCheck = bailZ ELSEIF (@test == 1) bailCheck = real(bailZ)^2 ELSEIF (@test == 2) bailCheck = imag(bailZ)^2 ELSEIF (@test == 3) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe < bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 4) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe > bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Bailey's Mandelbrout" method = multipass periodicity = 0 center = (-0.5, 0) param start caption = "Starting point" default = (0,0) hint = "Perturbation. Use (0,0) for the standard Mandelbrot set." endparam param power caption = "Power" default = (2,0) hint = "This defines the power of the Mandelbrot set. Use (2,0) \ for the standard Mandelbrot set." endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 0 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFct caption = "Start Function" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc switch: type = "Bayley'sJuliout" seed = #pixel power = power coord = coord coordLoop = coordLoop coordMode = coordMode bailout = bailout test = test bailMode = bailMode bailNorm = bailNorm normConst = normConst startFct = startFct bailUp = bailUp bailFunc = bailFunc goofFunc = goofFunc } Coconut { init: complex oldOldZ = 0 complex oldZ = 0 z = @startFkt(#pixel) complex vector1 = 0 if (@jouk != 0 && z != 0) z = z + @jouk/z endif complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 int iter = 1 loop: iter = iter + 1 oldOldZ = oldZ oldZ = z if (@projSmooth == 0) vector1 = (z+oldZ)/2 elseif (@projSmooth == 1) vector1 = (z+oldZ)/2-oldOldZ elseif (@projSmooth == 2) vector1 = oldZ-oldOldZ elseif (@projSmooth == 3) vector1 = (oldZ+oldOldZ)/2 elseif (@projSmooth == 4) endif ; projection of zStart on vector1 vector1 = (real(z)*real(vector1) + imag(z)*imag(vector1))/|vector1|*vector1 vector1 = @ProjFct1(vector1) complex ZAT = 0 if (@projectionStart == 0) ZAT = z elseif (@projectionStart == 1) ZAT = #pixel endif ZAT = @ProjFct2(ZAT) if (@projectionMode == 0) z = vector1 elseif (@projectionMode == 1) z = vector1 - ZAT elseif (@projectionMode == 2) z = vector1 / ZAT elseif (@projectionMode == 3) z = vector1 + ZAT elseif (@projectionMode == 4) z = ZAT / vector1 elseif (@projectionMode == 5) z = real(ZAT)*real(vector1) + 1i*imag(ZAT)*imag(vector1) elseif (@projectionMode == 6) z = real(ZAT)*imag(vector1) + 1i*imag(ZAT)*real(vector1) elseif (@projectionMode == 7) z = real(ZAT)*imag(vector1) + 1i*imag(ZAT)*real(vector1) endif if (@power != 1) z = z^@power endif z = z + @seed ; loopPoint z = @projFct3(z) IF (@bailMode == 0) bailZ = z ELSEIF (@bailMode == 1) bailZ = z-oldZ ELSEIF (@bailMode == 2) bailZ = (z+oldZ)/2 ELSEIF (@bailMode == 3) bailZ = z-#pixel ELSEIF (@bailMode == 4) bailZ = z/|oldZ| ELSEIF (@bailMode == 5) bailZ = z/real(z) ELSEIF (@bailMode == 6) bailZ = z/imag(z) ELSEIF (@bailMode == 7) bailZ = z/(|real(z)|+1) ELSEIF (@bailMode == 8) bailZ = z/(|imag(z)|+1) ELSEIF (@bailMode == 9) bailZ = z/real(oldZ) ELSEIF (@bailMode == 10) bailZ = z/imag(oldZ) ELSEIF (@bailMode == 11) bailZ = z/(|real(oldZ)|+1) ELSEIF (@bailMode == 12) bailZ = z/(|imag(oldZ)|+1) ENDIF if (@bailNorm == 1) bailZ = bailZ/(|oldZ|+@normConst) elseif (@bailNorm == 2) bailZ = bailZ/(|#pixel|+@normConst) elseif (@bailNorm == 3) bailZ = bailZ/(|oldZ-#pixel|+@normConst) endif IF (@test == 0) bailCheck = bailZ ELSEIF (@test == 1) bailCheck = real(bailZ)^2 ELSEIF (@test == 2) bailCheck = imag(bailZ)^2 ELSEIF (@test == 3) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe < bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 4) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe > bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Coconut Projection" maxiter = 500 periodicity = 0 method = multipass magn = 0.25 param projectionStart caption = "Take Zat?" enum = "Zat" "Pix" default = 0 endparam param projSmooth caption = "Projection Smooth" enum = "Old0+Old1" "Old0+Old1-Old2" \ "Old1-Old2" "Old1+Old2" "Old1+Old2-Old3" default = 0 endparam param projectionMode caption = "Projection" enum = "None" "Normal" "Quot" "Add" "Inverse" "Scalar" "Scalar Mix1" default = 1 endparam param jouk caption = "Joukowskij Constant" default = (0.0,0.0) endparam param seed caption = "Julia seed" default = (0.0, 0.0) hint = "Use this to create many different sets." endparam param power caption = "Power" default = (1.0,0.0) endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 0 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFkt caption = "Start function" default = ident() hint = "In the init: section" endfunc func ProjFct1 caption = "Projection 1" default = log() endfunc func ProjFct2 caption = "Projection 2" default = ident() endfunc func ProjFct3 caption = "Projection 3" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc } medial_section_M { init: complex zCalc = 0 float reCalc = 0 float imCalc = 0 float small = 0 float large = 0 float whole = 0 z = @seed complex oldZ = 0 complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 int iter = 1 int l_coord = @coordLoop int koord = @coord loop: iter = iter + 1 oldZ = z int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten zCalc = @startFct(z) reCalc = real(zCalc) imCalc = imag(zCalc) if (reCalc bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Medial Section Mandel" method = multipass periodicity = 0 param calculate caption = "Calculate" enum = "Sum" "Abs" "Diff" default = 1 endparam param seed caption = "Mandel seed" default = (1.0, 0.0) hint = "Use this to create many different sets." endparam param power caption = "Power" default = (1.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param bailout caption = "Bailout value" default = 500.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 9 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFct caption = "Start Function" default = abs() endfunc func loopFct caption = "Loop Function" default = ident() hint = "Applied to the added Pixel" endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc switch: type = "medial_section_J" calculate = calculate seed = #pixel power = power coord = coord coordLoop = coordLoop coordMode = coordMode bailout = bailout test = test bailMode = bailMode bailNorm = bailNorm normConst = normConst startFct = startFct bailUp = bailUp bailFunc = bailFunc goofFunc = goofFunc } medial_section_J { init: complex zCalc = 0 float reCalc = 0 float imCalc = 0 float small = 0 float large = 0 float whole = 0 z = @startFct(log(#pixel)) complex oldZ = 0 complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 int iter = 0 int l_coord = @coordLoop int koord = @coord loop: iter = iter + 1 oldZ = z int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten zCalc = @loopFct(z) reCalc = real(zCalc) imCalc = imag(zCalc) if (reCalc bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Medial Section Julia" method = multipass periodicity = 0 param calculate caption = "Calculate" enum = "Sum" "Abs" "Diff" default = 1 endparam param seed caption = "Julia seed" default = (1.0, 0.0) hint = "Use this to create many different sets." endparam param power caption = "Power" default = (1.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param bailout caption = "Bailout value" default = 500.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 9 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFct caption = "Start Function" default = abs() endfunc func loopFct caption = "Loop Function" default = ident() hint = "Applied to the added Pixel" endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc switch: type = "medial_section_M" calculate = calculate seed = #pixel power = power coord = coord coordLoop = coordLoop coordMode = coordMode bailout = bailout test = test bailMode = bailMode bailNorm = bailNorm normConst = normConst startFct = startFct bailUp = bailUp bailFunc = bailFunc goofFunc = goofFunc } medial_section_sky { init: complex zCalc = 0 float reCalc = 0 float imCalc = 0 float small = 0 float large = 0 float whole = 0 z = @startFct(#pixel) complex oldZ = 0 complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 int iter = 0 int l_coord = @coordLoop int koord = @coord loop: iter = iter + 1 oldZ = z int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten bool cond1 = true bool cond2 = true if (@sierpMode1 == 0) cond1 = (imag(z) > @corte) elseif (@sierpMode1 == 1) cond1 = (imag(z) > @corte && real(z) < @corte) elseif (@sierpMode1 == 2) cond1 = (imag(z) > @corte && real(z) > @corte) endif if (@sierpMode2 == 0) cond2 = (real(z) > @corte) elseif (@sierpMode2 == 1) cond2 = (real(z) > @corte && imag(z) < @corte) elseif (@sierpMode2 == 2) cond2 = (|real(z)-imag(z)| < @corte*@corte) endif if (cond1) z = 2*(@loopFct1(z) - 1) elseif (cond2) z = 2*(@loopFct2(z) - 1i) else zCalc = @loopFct3(z) reCalc = real(zCalc) imCalc = imag(zCalc) if (reCalc bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Medial Section -sky" method = multipass periodicity = 0 param calculate caption = "Calculate" enum = "Sum" "Abs" "Diff" default = 1 endparam param seed caption = "Julia seed" default = (1.0, 0.0) hint = "Use this to create many different sets." endparam param power caption = "Power" default = (1.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param sierpMode1 caption = "SierpMode 1st Cond." enum = "Normal" "Var 1" "Var 2" default = 0 endparam param sierpMode2 caption = "SierpMode 2nd Cond." enum = "Normal" "Var 1" "Var 2" default = 0 endparam param corte caption = "Cutting edges" default = 0.5 endparam param bailout caption = "Bailout value" default = 500.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 9 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFct caption = "Start Function" default = abs() endfunc func loopFct1 caption = "Loop Function 1" default = ident() endfunc func loopFct2 caption = "Loop Function 2" default = ident() endfunc func loopFct3 caption = "Loop Function 3" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc } medial_section_angel { init: complex zCalc = 0 float reCalc = 0 float imCalc = 0 float small = 0 float large = 0 float whole = 0 z = @startFct(#pixel) complex oldZ = 0 ;complex oldOldZ = 0 complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 int iter = 0 float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = testAngle1*@corte2 complex rotAngle1 = 2*1i*testAngle1 complex rotAngle2 = 2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: iter = iter + 1 oldZ = z int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten arg = atan2(z) if (abs(arg) < testAngle1) z = @loopFct1(z)*exp(rotAngle1) elseif (abs(arg) > testAngle2) z = @loopFct2(z)*exp(rotAngle2) else zCalc = @loopFct3(z) reCalc = real(zCalc) imCalc = imag(zCalc) if (reCalc bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Medial Section Angel" method = multipass periodicity = 0 param calculate caption = "Calculate" enum = "Sum" "Abs" "Diff" default = 1 endparam param seed caption = "Julia seed" default = (0.0, 0.0) hint = "Use this to create many different sets." endparam param power caption = "Power" default = (2.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 11 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 3.0 endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 9 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFct caption = "Start Function" default = log() endfunc func loopFct1 caption = "Loop Function 1" default = sin() endfunc func loopFct2 caption = "Loop Function 2" default = ident() endfunc func loopFct3 caption = "Loop Function 3" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc } AGMinsky-Barny { ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: ;complex ar = 0 ;complex ge = 0 ;complex arit = 0 ;complex geom = 0 complex oldz = 0 complex old_z = 0 int iter = 0 z = 0.3*@startFkt(#pixel + @jouk/#pixel) ;float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 ;complex rotAngle1 = @corte2*1i*testAngle1 ;complex rotAngle2 = @corte2*1i*testAngle2 int l_coord = @coordLoop int koord = @coord loop: iter = iter + 1 int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif old_z = oldz oldz = z if (real(z)*imag(#pixel) + imag(z)*real(#pixel) > 0) z = (z-1)^@power * @start else if (imag(z) > @corte) z = @f1(2*real(z) + flip(2*imag(z)-1)) elseif (real(z) > @corte) z = @f2(2*real(z)-1 + flip(2*imag(z))) else z = @f3(2*real(z) + flip(2*imag(z))) z = @elseFkt(z) endif z = (z+1)^@power * @start endif bailout: |z| < @bailout default: title = "AGMinsky Barny" magn = 0.25 maxiter = 250 method = multipass periodicity = 0 param start caption = "Barnsley Set" default = (0.6, 1.2) endparam param power caption = "Power" default = (2,0) hint = "This defines the power of the Julia set. Use (2,0) \ for the standard Julia set." endparam param bailout caption = "Bailout value" default = 4 min = 1 endparam param epsilon caption = "Epsilon" default = 1e-20 min = 0.0 endparam param jouk caption = "Joukowskij Constant" default = (0.01,0.00) endparam param corte caption = "Cutting edges" default = 0.5 endparam param corte1 caption = "Old Cutting edges" default = 4.0 endparam param corte2 caption = "New Cutting edges" default = 2.0 endparam param granulation caption = "Granulation" default = 1.0 min = 0.0001 endparam param maxIter caption = "Maximum Iterations" default = 20 min = 1 endparam param elseFlavour caption = "Else Branch Flavours" enum = "Almond" "Julio" "Jouko" "Only With Function" default = 0 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam func startFkt caption = "Start Function" default = abs() endfunc func f1 caption = "Function 1" default = ident() endfunc func f2 caption = "Function 2" default = ident() endfunc func f3 caption = "Function 3" default = ident() endfunc func elseFkt caption = "Else Branch Function" default = ident() endfunc } ; AGMinsky-Angel Barny-Barny { ; Angel parts and akl toolbox elements ; added by Andreas Lober May 2000 ; with kind permission of Samuel Monnier init: complex oldz = 0 ;complex old_z = 0 int iter = 0 z = 0.3*@startFkt(#pixel + @jouk/#pixel) int l_coord = @coordLoop int koord = @coord complex bailCheck = 0 complex bailFix = 0 complex bailZ = 0 loop: iter = iter + 1 int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) z = cabs(z) + 1i*atan2(z) elseif (koord == 2) float rad = cabs(z) float phi = atan2(z) z = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(z) float phi = atan2(z) z = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(z) float phi = atan2(z) z = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) z = real(sin(z)) + 1i*cos(z) elseif (koord == 6) z = real(sinh(z)) + 1i*cosh(z) elseif (koord == 7) z = real(asin(z)) + 1i*acos(z) elseif (koord == 8) z = real(asinh(z)) + 1i*acosh(z) elseif (koord == 9) z = abs(z) + conj(z)/(|z|+1e-20) elseif (koord >= 10 && koord <= 19) if (z != 0) float rad = cabs(z) float re = real(z)/rad float im = imag(z)/rad if (koord == 10) z = re*z + im*conj(z) elseif (koord == 11) z = re*z + im*flip(z) elseif (koord == 12) z = re*sin(z) + im*cos(z) elseif (koord == 13) z = re*sin(z) + 1i*im*cos(z) elseif (koord == 14) z = re*asin(z) + im*acos(z) elseif (koord == 15) z = re*asin(z) + 1i*im*acos(z) elseif (koord == 16) z = re*sinh(z) + im*cosh(z) elseif (koord == 17) z = re*sinh(z) + 1i*im*cosh(z) elseif (koord == 18) z = re*asinh(z) + im*acosh(z) elseif (koord == 19) z = re*asinh(z) + 1i*im*acosh(z) endif endif endif endwhile ; Schleife über die Koordinaten ; ; Start with the lattices ; if (@lattice == 1) z = round(@lattFac1*z) - @lattFac2*z elseif (@lattice == 2) z = trunc(@lattFac1*z) - @lattFac2*z elseif (@lattice == 3) z = floor(@lattFac1*z) - @lattFac2*z elseif (@lattice == 4) z = ceil(@lattFac1*z) - @lattFac2*z elseif (@lattice == 5) z = abs(@lattFac1*z) - @lattFac2*z^2 elseif (@lattice == 6) z = round(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 7) z = trunc(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 8) z = floor(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 9) z = ceil(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 10) z = abs(@lattFac1*z) - @lattFac2*sqrt(real(z)*imag(z)) elseif (@lattice == 11) z = round((round(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 12) z = trunc((trunc(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 13) z = floor((floor(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 14) z = ceil((ceil(@lattFac1*z) - @lattFac1*z)^2) \ - @lattFac2*z^2 elseif (@lattice == 15) z = abs((abs(@lattFac1*z) - @lattFac1*z^2)^2) \ - @lattFac2*z^2 elseif (@lattice == 16) z = round((round(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 17) z = trunc((trunc(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 18) z = floor((floor(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 19) z = ceil((ceil(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 elseif (@lattice == 20) z = abs((abs(@lattFac1*z) \ - @lattFac1*sqrt(real(z)*imag(z)))^2) \ - @lattFac2*z^2 endif oldz = z if (@barnyMode == 0 || @barnyMode == 2) if (real(z) > 0) z = @fnr1(z-1)^@power * @start elseif (real(z) < 0) z = @fnr2(z+1)^@power * @start endif endif if (@barnyMode == 1 || @barnyMode == 2) if (imag(z) > 0) z = @fni1(z-1i)^@power * @start elseif (imag(z) < 0) z = @fni2(z+1i)^@power * @start endif endif if (@barnyMode == 3) if (real(z) > 0) z = @fnr1(z-1)^@power * @start elseif (real(z) < 0) z = @fnr2(z+1)^@power * @start elseif (imag(z) > 0) z = @fni1(z-1i)^@power * @start elseif (imag(z) < 0) z = @fni2(z+1i)^@power * @start endif endif if (@barnskyMode) if (imag(z) > @corte) z = @f1(2*real(z) + flip(2*imag(z)-1)) elseif (real(z) > @corte) z = @f2(2*real(z)-1 + flip(2*imag(z))) else z = @f3(2*real(z) + flip(2*imag(z))) z = @elseFkt(z) endif endif IF (@bailMode == 0) bailZ = z ELSEIF (@bailMode == 1) bailZ = z-oldZ ELSEIF (@bailMode == 2) bailZ = (z+oldZ)/2 ELSEIF (@bailMode == 3) bailZ = z-#pixel ELSEIF (@bailMode == 4) bailZ = z/|oldZ| ELSEIF (@bailMode == 5) bailZ = z/real(z) ELSEIF (@bailMode == 6) bailZ = z/imag(z) ELSEIF (@bailMode == 7) bailZ = z/(|real(z)|+1) ELSEIF (@bailMode == 8) bailZ = z/(|imag(z)|+1) ELSEIF (@bailMode == 9) bailZ = z/real(oldZ) ELSEIF (@bailMode == 10) bailZ = z/imag(oldZ) ELSEIF (@bailMode == 11) bailZ = z/(|real(oldZ)|+1) ELSEIF (@bailMode == 12) bailZ = z/(|imag(oldZ)|+1) ENDIF if (@bailNorm == 1) bailZ = bailZ/(|oldZ|+@normConst) elseif (@bailNorm == 2) bailZ = bailZ/(|#pixel|+@normConst) elseif (@bailNorm == 3) bailZ = bailZ/(|oldZ-#pixel|+@normConst) endif IF (@test == 0) bailCheck = bailZ ELSEIF (@test == 1) bailCheck = real(bailZ)^2 ELSEIF (@test == 2) bailCheck = imag(bailZ)^2 ELSEIF (@test == 3) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe < bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 4) float bailRe = real(bailZ)^2 float bailIm = imag(bailZ)^2 IF (bailRe > bailIm) bailCheck = @goofFunc(bailIm) ELSE bailCheck = @goofFunc(bailRe) ENDIF ELSEIF (@test == 5) bailCheck = (abs(real(bailZ)) + abs(imag(bailZ)))^2 ELSEIF (@test == 6) bailCheck = @goofFunc(real(bailZ)) + imag(bailZ) ELSEIF (@test == 7) bailCheck = @goofFunc((real(bailZ)/imag(bailZ)))^2 ELSEIF (@test == 8) bailCheck = @goofFunc((imag(bailZ)/real(bailZ)))^2 ELSEIF (@test == 9) bailCheck = @goofFunc(bailZ*iter) ELSEIF (@test == 10) bailCheck = @goofFunc(bailZ + iter)/sqrt(#maxiter) ELSEIF (@test == 11) bailCheck = @goofFunc(real(bailZ) - imag(bailZ))^2 ELSEIF (@test == 12) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2 ELSEIF (@test == 13) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)/phi^2 ELSEIF (@test == 14) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*phi^2/sqrt(iter) ELSEIF (@test == 15) float phi = atan2(bailZ)/#pi IF phi < 0.0 phi = phi + 2.0 ENDIF bailCheck = @goofFunc(bailZ)*iter/phi^2 ELSEIF (@test == 16) float reZ = real(bailZ) bailCheck = @goofFunc(reZ)*reZ/abs(imag(bailZ)) ELSEIF (@test == 17) bailCheck = @goofFunc(abs(real(bailZ))) + abs(imag(bailZ)) ELSEIF (@test == 18) bailCheck = @goofFunc(bailZ)*iter/#maxiter ENDIF bailCheck = @bailFunc(bailCheck) if (@bailUp == 0) bailFix = bailCheck elseif (@bailUp == 1) bailFix = bailFix + bailCheck elseif (@bailUp == 2) bailFix = bailFix + bailCheck/iter elseif (@bailUp == 3) bailFix = bailFix + bailCheck/iter^2 elseif (@bailUp == 4) bailFix = bailFix + bailCheck/sqrt(iter) elseif (@bailUp == 5) bailFix = bailFix + log(bailCheck) elseif (@bailUp == 6) bailFix = bailFix + log(bailCheck)/iter elseif (@bailUp == 7) bailFix = bailFix + log(bailCheck)/iter^2 elseif (@bailUp == 8) bailFix = bailFix + log(bailCheck)/sqrt(iter) elseif (@bailUp == 9) bailFix = bailFix + |bailCheck| elseif (@bailUp == 10) bailFix = bailFix + |bailCheck|/iter elseif (@bailUp == 11) bailFix = bailFix + |bailCheck|/iter^2 elseif (@bailUp == 12) bailFix = bailFix + |bailCheck|/sqrt(iter) endif bailout: ( (@test <= 18 && |bailFix| <= @bailout) \ || (@test == 19 && real(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ || (@test == 20 && imag(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 21 && real(@bailFunc(z))*imag(@goofFunc(oldZ)) < @bailout) \ || (@test == 22 && imag(@bailFunc(z))*real(@goofFunc(oldZ)) < @bailout) \ ) default: title = "Barny Barninsky" magn = 0.25 maxiter = 250 method = multipass periodicity = 0 param barnyMode caption = "Barny Mode" enum = "Real" "Imag" "Both separate" "Both combined" default = 2 endparam param barnskyMode caption = "Barnsky Mode" default = true endparam param start caption = "Barnsley Set" default = (0.6, 1.2) endparam param power caption = "Power" default = (2.0,0.0) endparam param jouk caption = "Joukowskij Constant" default = (0.00,0.00) endparam param corte caption = "Cutting edges" default = 0.5 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the inner set anymore." endparam param test caption = "Shape Modifier" enum = "mod" "real" "imag" "or" "and" "manh" \ "manr" "abs(x*x/y)" "abs(y*y/x)" "iter" \ "avg iter" "diff" "angle" "angle inv" \ "angle/iter" "iter/angle" "float" "check" "dust" \ "crossing 1" "crossing 2" "hyper crossing 1" "hyper crossing 2" default = 0 endparam param bailMode caption = "Shaping" enum = "Normal" "Smooth" "Average" "Mixel" "Normed" \ "Crazy Real" "Crazy Imag" "Real Horse" "Imag Horse" \ "Crazy O'Real" "Crazy O'Imag" "O'Real Horse" "O'Imag Horse" default = 0 endparam param bailNorm caption = "Norming" enum = "None" "With old Z" "With Pixel" "With Diff" default = 0 endparam param normConst caption = "Norming Constant" default = 1.0 min = 1e-20 endparam param bailUp caption = "Fixit for Shape" enum = "Each" "Sum" "W-Sum" "W^2-Sum" "S-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" "LS-Sum" \ "Orbit" "W-Orbit" "W^2-Orbit" "S-Orbit" default = 0 endparam func startFkt caption = "Start Function" default = abs() endfunc func fnr1 caption = "R-Barny Fct 1" default = ident() endfunc func fnr2 caption = "R-Barny Fct 2" default = ident() endfunc func fni1 caption = "I-Barny Fct 1" default = ident() endfunc func fni2 caption = "I-Barny Fct 2" default = ident() endfunc func f1 caption = "Barnsky Fct 1" default = ident() endfunc func f2 caption = "Barnsky Fct 2" default = ident() endfunc func f3 caption = "Barnsky Fct 3" default = ident() endfunc func elseFkt caption = "Else Branch Function" default = ident() endfunc func bailFunc caption = "Bailout Function" default = ident() endfunc func goofFunc caption = "Bailout Goof" default = ident() endfunc } ; MoebiusMandel { init: z = @start float xLim = abs(real(@limit)) float yLim = abs(imag(@limit)) float reZ = 0 float imZ = 0 loop: z = z^@power + #pixel reZ = real(z) imZ = imag(z) reZNew = reZ imZNew = imZ if (reZ < -xLim) reZNew = reZNew + 2*xLim if (@mode == 1) imZNew = imZNew - yLim elseif (@mode == 2) imZNew = -imZNew endif elseif (reZ > xLim) reZNew = reZNew - 2*xLim if (@mode == 1) imZNew = imZNew + yLim elseif (@mode == 2) imZNew = -imZNew endif endif if (imZ < -yLim) imZNew = imZNew + 2*yLim if (@mode == 1) reZNew = reZNew - xLim elseif (@mode == 2) reZNew = -reZNew endif elseif (imZ > yLim) imZNew = imZNew - 2*yLim if (@mode == 1) reZNew = reZNew + xLim elseif (@mode == 2) reZNew = reZNew endif endif z = reZNew + 1i*imZNew bailout: |z| < @bailout default: title = "Moebius' Mandel" center = (-0.5, 0) maxiter = 100 method = multipass periodicity = 0 param start caption = "Starting point" default = (0,0) hint = "Perturbation. Use (0,0) for the standard Mandelbrot set." endparam param limit caption = "Moebius limits" default = (2,2) endparam param mode caption = "Moebius Mode" enum = "Normal" "Double" "Inverse" default = 0 endparam param power caption = "Power" default = (2,0) hint = "This defines the power of the Mandelbrot set. Use (2,0) \ for the standard Mandelbrot set." endparam param bailout caption = "Bailout value" default = 4.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the inner set anymore." endparam switch: type = "MoebiusJulia" seed = #pixel power = power bailout = bailout limit = limit mode = mode } MoebiusJulia { ; Generic Julia set init: z = #pixel float xLim = abs(real(@limit)) float yLim = abs(imag(@limit)) float reZ = 0 float imZ = 0 loop: z = z^@power + @seed reZ = real(z) imZ = imag(z) reZNew = reZ imZNew = imZ if (reZ < -xLim) reZNew = reZNew + 2*xLim if (@mode == 1) imZNew = imZNew - yLim elseif (@mode == 2) imZNew = -imZNew endif elseif (reZ > xLim) reZNew = reZNew - 2*xLim if (@mode == 1) imZNew = imZNew + yLim elseif (@mode == 2) imZNew = -imZNew endif endif if (imZ < -yLim) imZNew = imZNew + 2*yLim if (@mode == 1) reZNew = reZNew - xLim elseif (@mode == 2) reZNew = -reZNew endif elseif (imZ > yLim) imZNew = imZNew - 2*yLim if (@mode == 1) reZNew = reZNew + xLim elseif (@mode == 2) reZNew = reZNew endif endif z = reZNew + 1i*imZNew bailout: |z| <= @bailout default: title = "Moebius' Julia" center = (-0.5, 0) maxiter = 100 method = multipass periodicity = 0 param seed caption = "Julia seed" default = (-1.25, 0) hint = "Use this to create many different Julia sets. You can \ also set this value using the Switch feature." endparam param limit caption = "Moebius limits" default = (2,2) endparam param mode caption = "Moebius Mode" enum = "Normal" "Double" "Inverse" default = 0 endparam param power caption = "Power" default = (2,0) hint = "This defines the power of the Julia set. Use (2,0) \ for the standard Julia set." endparam param bailout caption = "Bailout value" default = 4.0 min = 1.0 hint = "Defines how soon an orbit bails out, i.e. doesn't belong \ to the Mandelbrot set anymore." endparam switch: type = "MoebiusMandel" power = power bailout = bailout start = #pixel limit = limit mode = mode }