jam-O6-hypercomplex { ; Simplified version of order-6 hypercomplex number systems with various rule sets. ; 211220 ; The basis units used are 1, e1, e2, e3, e4, and e5. For all implemented rule sets, ; 1x1=1; 1xe1 = e1x1 = e1, 1xe2 = e2x1 = e2, 1xe3 = e3x1 = e3, 1xe4 = e4x1 = e4, ; 1xe5 = e5x1 = e5. ; In addition to the above, the other components of the unit multiplication rules are: ; Ruleset A: e1^2 = e2^2 = e3^2 = e4^2 = e5^2 = -1; ; e1e2 = -e2e1 = e3, e2e3 = -e3e2 = e4, e3e4 = -e4e3 = e5, ; e4e5 = -e5e4 = e1, e5e1 = - e1e5 = e2; ; e1e3 = -e3e1 = -e5, e2e4 = -e4e2 = -e1, e3e5 = -e5e3 = -e2, ; e4e1 = -e1e4 = -e3, e5e2 = -e2e5 = -e4. ; B: Same combination rules as above, except: ; Plotting options are the following planes: ; real-e1, real-e2, real-e3, real-e4, real-e5, e1-e2, e1-e3, e1-e4, e1-e5, ; e2-e3, e2-e4, e2-e5, e3-e4, e3-e5, and e4-e5. ; The bailout variable can be the magnitude of the hypercomplex number, h, ; or any pair of these components: real,e1; real,e2; real,e3; real,e4; real, e5; ; e1,e2; e1,e3; e1,e4; e1, e5; e2,e3; e2,e4; e2, e5; e3,e4; e3, e5; or e4, e5, ; or, alternatively, the absolute value of any single component. global: init: complex jc = (0,0) ; Julia constant (Julia) or pixel value (Mandelbrot) float jcreal = float jcimag = 0.0 float bailoutvalue = 0.0 ; Working variables for the iteration: ; The hypercomplex H = h0 + h1e1 + h2e2 + h3e3 + h4e4 + h5e5, where the hs are real (scalars) float h0 = float h1 = float h2 = float h3 = float h4 = float h5 = 0.0 ; An order-6 hypercomplex when squared will generate 36 terms using the non-commutative ; multiplication rules; after partial simplification using scalar commutativity, there are ; 21 unique, individual coefficients. For simplicity and ; clarity rather than efficiency, these 21 term coefficients are defined here. float c0 = float c1 = float c2 = float c3 = float c4 = float c5 = 0.0 float c6 = float c7 = float c8 = float c9 = float c10 = float c11 = float c12 = 0.0 float c13 = float c14 = float c15 = float c16 = float c17 = float c18 = 0.0 float c19 = float c20 = 0.0 float temp = 0.0 ; scratch variable if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif ; jc1 and jc2 will be added to the appropriate components of the ; hypercomplex number corresponding to the selected plot plane. jcreal = real(jc) jcimag = imag(jc) ; initialize the hypercomplex number if @plotplane == "real, e1" h0 = real(#z) h1 = imag(#z) h2 = @e2start h3 = @e3start h4 = @e4start h5 = @e5start elseif @plotplane == "real, e2" h0 = real(#z) h1 = @e1start h2 = imag(#z) h3 = @e3start h4 = @e4start h5 = @e5start elseif @plotplane == "real, e3" h0 = real(#z) h1 = @e1start h2 = @e2start h3 = imag(#z) h4 = @e4start h5 = @e5start elseif @plotplane == "real, e4" h0 = real(#z) h1 = @e1start h2 = @e2start h3 = @e3start h4 = imag(#z) h5 = @e5start elseif @plotplane == "real, e5" h0 = real(#z) h1 = @e1start h2 = @e2start h3 = @e3start h4 = @e4start h5 = imag(#z) elseif @plotplane == "e1, e2" h0 = @realstart h1 = real(#z) h2 = imag(#z) h3 = @e3start h4 = @e4start h5 = @e5start elseif @plotplane == "e1, e3" h0 = @realstart h1 = real(#z) h2 = @e2start h3 = imag(#z) h4 = @e4start h5 = @e5start elseif @plotplane == "e1, e4" h0 = @realstart h1 = real(#z) h2 = @e2start h3 = @e3start h4 = imag(#z) h5 = @e5start elseif @plotplane == "e1, e5" h0 = @realstart h1 = real(#z) h2 = @e2start h3 = @e3start h4 = @e4start h5 = imag(#z) elseif @plotplane == "e2, e3" h0 = @realstart h1 = @e1start h2 = real(#z) h3 = imag(#z) h4 = @e4start h5 = @e5start elseif @plotplane == "e2, e4" h0 = @realstart h1 = @e1start h2 = real(#z) h3 = @e3start h4 = imag(#z) h5 = @e5start elseif @plotplane == "e2, e5" h0 = @realstart h1 = @e1start h2 = real(#z) h3 = @e3start h4 = @e4start h5 = imag(#z) elseif @plotplane == "e3, e4" h0 = @realstart h1 = @e1start h2 = @e2start h3 = real(#z) h4 = imag(#z) h5 = @e5start elseif @plotplane == "e3, e5" h0 = @realstart h1 = @e1start h2 = @e2start h3 = real(#z) h4 = @e4start h5 = imag(#z) elseif @plotplane == "e4, e5" h0 = @realstart h1 = @e1start h2 = @e2start h3 = @e3start h4 = real(#z) h5 = imag(#z) endif ; @plotplane loop: ; Iterate the hypercomplex number according to the chosen ruleset, ; h(n+1) = h(n)^2 + jc = h0^2 + h1^2 e1^2 + h2^2 e2^2 + h3^2 e3^2 + h4^2 e4^2 ; + h5^2 e5^2 + 2h0h1 e1 + 2h0h2 e2 + 2h0h3 e3 + 2h0h4 e4 + 2h0h5 e5 + h1h2 e1e2 ; + h1h2 e2e1 + h1h3 e1e3 + h1h3 e3e1 + + h1h4 e1e4 + h1h4 e4e1 + h1h5 e1e5 + h1h5 e5e1 ; + h2h3 e2e3 + h2h3 e3e2 + h2h4 e2e4 + h2h4 e4e2 + h2h5 e2e5 + h2h5 e5e2 + ; h3h4 e3e4 + h3h4 e4e3 + h3h5 e3e5 + h3h5 e5e3 + h4h5 e4e5 + h4h5 e5e4 + jc ; First, calculate all 21 independent coefficients c0,...,c20 c0 = sqr(h0) c1 = sqr(h1) c2 = sqr(h2) c3 = sqr(h3) c4 = sqr(h4) c5 = sqr(h5) temp = 2 * h0 c6 = temp * h1 c7 = temp * h2 c8 = temp * h3 c9 = temp * h4 c10 = temp * h5 c11 = h1 * h2 c12 = h1 * h3 c13 = h1 * h4 c14 = h1 * h5 c15 = h2 * h3 c16 = h2 * h4 c17 = h2 * h5 c18 = h3 * h4 c19 = h3 * h5 c20 = h4 * h5 ; Second, combine the coefficients according to the current ruleset. if @ruleset == "A" h0 = c0 - c1 - c2 - c3 - c4 -c5 h1 = c6 h2 = c7 h3 = c8 h4 = c9 h5 = c10 ; elseif @ruleset == "B" endif ; @ruleset ; Next, add the Julia constant or #pixel value to the hypercomplex number if @plotplane == "real, e1" h0 = h0 + jcreal h1 = h1 + jcimag #z = h0 + flip(h1) elseif @plotplane == "real, e2" h0 = h0 + jcreal h2 = h2 + jcimag #z = h0 + flip(h2) elseif @plotplane == "real, e3" h0 = h0 + jcreal h3 = h3 + jcimag #z = h0 + flip(h3) elseif @plotplane == "real, e4" h0 = h0 + jcreal h4 = h4 + jcimag #z = h0 + flip(h4) elseif @plotplane == "real, e5" h0 = h0 + jcreal h5 = h5 + jcimag #z = h0 + flip(h5) elseif @plotplane == "e1, e2" h1 = h1 + jcreal h2 = h2 + jcimag #z = h1 + flip(h2) elseif @plotplane == "e1, e3" h1 = h1 + jcreal h3 = h3 + jcimag #z = h1 + flip(h3) elseif @plotplane == "e1, e4" h1 = h1 + jcreal h4 = h4 + jcimag #z = h1 + flip(h4) elseif @plotplane == "e1, e5" h1 = h1 + jcreal h5 = h5 + jcimag #z = h1 + flip(h5) elseif @plotplane == "e2, e3" h2 = h2 + jcreal h3 = h3 + jcimag #z = h2 + flip(h3) elseif @plotplane == "e2, e4" h2 = h2 + jcreal h4 = h4 + jcimag #z = h2 + flip(h4) elseif @plotplane == "e2, e5" h2 = h2 + jcreal h5 = h5 + jcimag #z = h2 + flip(h5) elseif @plotplane == "e3, e4" h3 = h3 + jcreal h4 = h4 + jcimag #z = h3 + flip(h4) elseif @plotplane == "e3, e5" h3 = h3 + jcreal h5 = h5 + jcimag #z = h3 + flip(h5) elseif @plotplane == "e4, e5" h4 = h4 + jcreal h5 = h5 + jcimag #z = h4 + flip(h5) endif ; @plotplane ; Calculate the value used in the bailout test if @bailvar == "hypercomplex norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1) + sqr(h2) + sqr(h3) + sqr(h4) + sqr(h5)) elseif @bailvar == "real, e1 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1)) elseif @bailvar == "real, e2 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h2)) elseif @bailvar == "real, e3 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h3)) elseif @bailvar == "real, e4 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h4)) elseif @bailvar == "real, e5 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h5)) elseif @bailvar == "e1, e2 norm" bailoutvalue = sqrt(sqr(h1) + sqr(h2)) elseif @bailvar == "e1, e3 norm" bailoutvalue = sqrt(sqr(h1) + sqr(h3)) elseif @bailvar == "e1, e4 norm" bailoutvalue = sqrt(sqr(h1) + sqr(h4)) elseif @bailvar == "e1, e5 norm" bailoutvalue = sqrt(sqr(h1) + sqr(h5)) elseif @bailvar == "e2, e3 norm" bailoutvalue = sqrt(sqr(h2) + sqr(h3)) elseif @bailvar == "e2, e4 norm" bailoutvalue = sqrt(sqr(h2) + sqr(h4)) elseif @bailvar == "e2, e5 norm" bailoutvalue = sqrt(sqr(h2) + sqr(h5)) elseif @bailvar == "e3, e4 norm" bailoutvalue = sqrt(sqr(h3) + sqr(h4)) elseif @bailvar == "e3, e5 norm" bailoutvalue = sqrt(sqr(h3) + sqr(h5)) elseif @bailvar == "e4, e5 norm" bailoutvalue = sqrt(sqr(h4) + sqr(h5)) elseif @bailvar == "|real|" bailoutvalue = abs(h0) elseif @bailvar == "|e1|" bailoutvalue = abs(h1) elseif @bailvar == "|e2|" bailoutvalue = abs(h2) elseif @bailvar == "|e3|" bailoutvalue = abs(h3) elseif @bailvar == "|e4|" bailoutvalue = abs(h4) elseif @bailvar == "|e5|" bailoutvalue = abs(h5) endif ; @bailvar bailout: bailoutvalue < @bail default: title = "Order-6 Hypercomplex Streamlined" center = (0,0) maxiter = 500 method = multipass periodicity = 0 heading text = "A sampling of order-6 hypercomplex number systems" endheading param ruleset caption = "Multiplication Ruleset" enum = "A" default = 0 hint = "This parameter determines how the basis units of the hypercomplex system \ combine when multiplied. The different rules are listed in the comments at \ the top of the formula entry. Set 'F' are Olariu's polar 5-complex numbers." endparam param plotplane caption = "Plot Plane" enum = "real, e1" "real, e2" "real, e3" "real, e4" "real, e5" "e1, e2" "e1, e3" "e1, e4" \ "e1, e5" "e2, e3" "e2, e4" "e2, e5" "e3, e4" "e3, e5" "e4, e5" default = 0 hint = "This parameter determines which components of the hypercomplex iterate \ are plotted on the screen." endparam param bailvar caption = "Bailout Variable" enum = "hypercomplex norm" "real, e1 norm" "real, e2 norm" "real, e3 norm" "real, e4 norm" \ "real, e5 norm" "e1, e2 norm" "e1, e3 norm" "e1, e4 norm" "e1, e5 norm" "e2, e3 norm" \ "e2, e4 norm" "e2, e5 norm" "e3, e4 norm" "e3, e5 norm" "e4, e5 norm" "|real|" "|e1|" \ "|e2|" "|e3|" "|e4|" "|e5|" default = 0 hint = "This setting determines which magnitude value is used in the bailout test. \ The norm of the selected quantities is tested." endparam param realstart caption = "Real Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve the real axis, then this parameter sets the \ initial value of the real component of the hypercomplex number." visible = !((@plotplane == "real, e1") || (@plotplane == "real, e2") || (@plotplane == "real, e3") \ || (@plotplane == "real, e4") || (@plotplane == "real, e5")) endparam param e1start caption = "e1 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e1, then this parameter sets the \ initial value of the e1 component of the hypercomplex number." visible = !((@plotplane == "real, e1") || (@plotplane == "e1, e2") || (@plotplane == "e1, e3") \ || (@plotplane == "e1, e4") || (@plotplane == "e1, e5")) endparam param e2start caption = "e2 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e2, then this parameter sets the \ initial value of the e2 component of the hypercomplex number." visible = !((@plotplane == "real, e2") || (@plotplane == "e1, e2") || (@plotplane == "e2, e3") \ || (@plotplane == "e2, e4") || (@plotplane == "e2, e5")) endparam param e3start caption = "e3 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e3, then this parameter sets the \ initial value of the e3 component of the hypercomplex number." visible = !((@plotplane == "real, e3") || (@plotplane == "e1, e3") || (@plotplane == "e2, e3") \ || (@plotplane == "e3, e4") || (@plotplane == "e3, e5")) endparam param e4start caption = "e4 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e4, then this parameter sets the \ initial value of the e4 component of the hypercomplex number." visible = !((@plotplane == "real, e4") || (@plotplane == "e1, e4") || (@plotplane == "e2, e4") \ || (@plotplane == "e3, e4") || (@plotplane == "e4, e5")) endparam param e5start caption = "e5 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e5, then this parameter sets the \ initial value of the e5 component of the hypercomplex number." visible = !((@plotplane == "real, e5") || (@plotplane == "e1, e5") || (@plotplane == "e2, e5") \ || (@plotplane == "e3, e5") || (@plotplane == "e4, e5")) endparam param bail caption = "Bailout Value" default = 16.0 hint = "Value needed to 'escape' to infinity" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-O6-hypercomplex" ruleset = ruleset plotplane = plotplane bailvar = bailvar realstart = realstart e1start = e1start e2start = e2start e3start = e3start e4start = e4start e5start = e5start jconstant = #pixel bail = bail mandy = julia julia = mandy } jam-O2-hypercomplex { ; If not indicated otherwise below, implemented multiplication rules ; for the basis units 1, i include: ; 1x1=1; 1i = i1 = i. ; Additional multiplication rules implemented for the imaginary unit i are: ; Ruleset A: i^2 = 1 (double numbers) ; B: i^2 = 0 (dual numbers) ; C: i^2 = 1 + i ; D: i^2 = 1 - i ; E: i^2 = i - 1 ; F: i^2 = -1 - i ; G: i^2 = -1 (complex numbers, for completeness) ; The bailout variable can be the magnitude of the hypercomplex number, h, ; or, alternatively, the absolute value of any single component. global: init: complex jc = (0,0) ; Julia constant (Julia) or pixel value (Mandelbrot) float h0 = float h1 = 0.0 ; hypercomplex components float bailoutvalue = 0.0 ; working variables for the iteration ; An order-2 hypercomplex when squared will generate 3 terms after ; partial simplification using the multiplication rules. ; (h0 + h1 i)^2 = h0^2 + 2 h0h1 i + h1^2 i^2 float c1 = float c2 = float c3 = 0.0 if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif ; initialize the hypercomplex number h0 = real(#z) h1 = imag(#z) loop: ; Iterate the hypercomplex number according to the chosen ruleset, ; h(n+1) = h(n)^2 + jc ; First, calculate the 3 coefficients c1 = h0 * h0 c2 = 2 * h0 * h1 c3 = h1 * h1 ; Second, combine the coefficients according to the current ruleset. if @ruleset == "A" ; i^2 = 1 (double numbers) h0 = c1 + c3 h1 = c2 elseif @ruleset == "B" ; i^2 = 0 (dual numbers) h0 = c1 h1 = c2 elseif @ruleset == "C" ; i^2 = 1 + i h0 = c1 + c3 h1 = c2 + c3 elseif @ruleset == "D" ; i^2 = 1 - i h0 = c1 + c3 h1 = c2 - c3 elseif @ruleset == "E" ; i^2 = i - 1 h0 = c1 - c3 h1 = c2 + c3 elseif @ruleset == "F" ; i^2 = -1 - i h0 = c1 - c3 h1 = c2 - c3 elseif @ruleset == "G" ; i^2 = -1 (standard complex numbers) h0 = c1 - c3 h1 = c2 endif ; @ruleset ; Next, add the Julia constant or #pixel value to the hypercomplex number h0 = h0 + real(jc) h1 = h1 + imag(jc) #z = h0 + flip(h1) ; Calculate the value used in the bailout test if @bailvar == "hypercomplex norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1)) elseif @bailvar == "|real|" bailoutvalue = abs(h0) elseif @bailvar == "|i|" bailoutvalue = abs(h1) endif ; @bailvar bailout: bailoutvalue < @bail default: title = "Order-2 Hypercomplex Streamlined" center = (0,0) maxiter = 2500 method = multipass periodicity = 0 heading text = "A sampling of order-2 hypercomplex number systems" endheading param ruleset caption = "Multiplication Ruleset" enum = "A" "B" "C" "D" "E" "F" "G" default = 0 hint = "This parameter determines how the basis units of the hypercomplex system \ combine when multiplied. The different rules are listed in the comments at \ the top of the formula entry. 'A' is the Double Numbers, 'B' the Dual Numbers, \ and 'G' the standard complex numbers." endparam param bailvar caption = "Bailout Variable" enum = "hypercomplex norm" "|real|" "|i|" default = 0 hint = "This setting determines which magnitude value is used in the bailout test. \ The norm of the selected quantities is tested." endparam param bail caption = "Bailout Value" default = 16.0 hint = "Value needed to 'escape' to infinity" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-O2-hypercomplex" ruleset = ruleset bailvar = bailvar jconstant = #pixel bail = bail mandy = julia julia = mandy } jam-O5-hypercomplex { ; Simplified version of jam-quintonions with additional rule sets. ; 211206 ; The basis units used are 1, e1, e2, e3, and e4. For all implemented rule sets, ; 1x1=1; 1xe1 = e1x1 = e1, 1xe2 = e2x1 = e2, 1xe3 = e3x1 = e3, 1xe4 = e4x1 = e4. ; In addition to the above, the other components of the unit multiplication rules are: ; Ruleset A: e1^2 = e2^2 = e3^2 = e4^2 = -1; e1e2 = e3, e2e3 = e4, e3e4 = e1, ; e4e1 = e2; e2e1 = -e3, e3e2 = -e4, e4e3 = -e1, e1e4 = -e2; ; e1e3 = e3e1 = e2e4 = e4e2 = 1. ; B: Same combination rules as above, except the last line becomes: ; e1e3 = e3e1 = e2e4 = e4e2 = 0. ; C: Same, except e1e3 = e3e1 = e2e4 = e4e2 = -1. ; D: Same, except e1e3 = -e3e1 = -1, e2e4 = -e4e2 = 1. [Same as B] ; E: Same, except e1e3 = e2+e4, e3e1 = e2-e4, e2e4 = e1+e3, e4e2 = e1-e3. ; F: e1^2 = e2, e2^2 = e4, e3^2 = e1, e4^2 = e3; e1e2 = e2e1 = e3; ; e1e3 = e3e1 = e4; e1e4 = e4e1 = 1; e2e3 = e3e2 = 1; ; e2e4 = e4e2 = e1; e3e4 = e4e3 = e2 (Olariu's polar 5-complex numbers). ; G: e1^2 = e2^2 = e3^2 = e4^2 = -1; e1e2 = e3, e2e3 = e4, e3e4 = e1, ; e4e1 = e2; e2e1 = -e3, e3e2 = -e4, e4e3 = -e1, e1e4 = -e2; ; e1e3 = -e3e1 = -e4, e2e4 = -e4e2 = -e1. [Same as B] ; H: e1^2 = e2, e2^2 = e3, e3^2 = e4, e4^2 = e1; ; e1e2 = -e2e1 = e4, e2e3 = -e3e2 = e1, e3e4 = - e4e3 = e2; ; e1e4 = e4e1 = -1; e1e3 = e3e1 = 1; e2e4 = 1, e4e2 = -1. ; Plotting options are the following planes: ; real-e1, real-e2, real-e3, real-e4, e1-e2, e1-e3, e1-e4, e2-e3, e2-e4, and e3-e4. ; The bailout variable can be the magnitude of the hypercomplex number, h, ; or any pair of these components: real,e1; real,e2; real,e3; real,e4; e1,e2; e1,e3; ; e1,e4; e2,e3; e2,e4; or e3,e4, ; or, alternatively, the absolute value of any single component. global: init: complex jc = (0,0) ; Julia constant (Julia) or pixel value (Mandelbrot) float jcreal = float jcimag = 0.0 float bailoutvalue = 0.0 ; Working variables for the iteration: ; The hypercomplex H = h0 + h1e1 + h2e2 + h3e3 + h4e4, where the hs are real (scalars) float h0 = float h1 = float h2 = float h3 = float h4 = 0.0 ; An order-5 hypercomplex when squared will generate 25 terms before ; simplification using the multiplication rules. ; After partial simplification using scalar commutativity, there are ; 21 individual coefficients. For simplicity and ; clarity rather than efficiency, these 21 term coefficients are defined here. float c0 = float c1 = float c2 = float c3 = float c4 = float c5 = 0.0 float c6 = float c7 = float c8 = float c9 = float c10 = float c11 = float c12 = 0.0 float c13 = float c14 = float c15 = float c16 = float c17 = float c18 = 0.0 float c19 = float c20 = 0.0 float temp = 0.0 if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif ; jc1 and jc2 will be added to the appropriate components of the ; hypercomplex number corresponding to the selected plot plane. jcreal = real(jc) jcimag = imag(jc) ; initialize the hypercomplex number if @plotplane == "real, e1" h0 = real(#z) h1 = imag(#z) h2 = @e2start h3 = @e3start h4 = @e4start elseif @plotplane == "real, e2" h0 = real(#z) h1 = @e1start h2 = imag(#z) h3 = @e3start h4 = @e4start elseif @plotplane == "real, e3" h0 = real(#z) h1 = @e1start h2 = @e2start h3 = imag(#z) h4 = @e4start elseif @plotplane == "real, e4" h0 = real(#z) h1 = @e1start h2 = @e2start h3 = @e3start h4 = imag(#z) elseif @plotplane == "e1, e2" h0 = @realstart h1 = real(#z) h2 = imag(#z) h3 = @e3start h4 = @e4start elseif @plotplane == "e1, e3" h0 = @realstart h1 = real(#z) h2 = @e2start h3 = imag(#z) h4 = @e4start elseif @plotplane == "e1, e4" h0 = @realstart h1 = real(#z) h2 = @e2start h3 = @e3start h4 = imag(#z) elseif @plotplane == "e2, e3" h0 = @realstart h1 = @e1start h2 = real(#z) h3 = imag(#z) h4 = @e4start elseif @plotplane == "e2, e4" h0 = @realstart h1 = @e1start h2 = real(#z) h3 = @e3start h4 = imag(#z) elseif @plotplane == "e3, e4" h0 = @realstart h1 = @e1start h2 = @e2start h3 = real(#z) h4 = imag(#z) endif ; @plotplane loop: ; Iterate the hypercomplex number according to the chosen ruleset, ; h(n+1) = h(n)^2 + jc = h0^2 + h1^2 e1^2 + h2^2 e2^2 + h3^2 e3^2 + h4^2 e4^2 + ; 2h0h1 e1 + 2h0h2 e2 + 2h0h3 e3 + 2h0h4 e4 + h1h2 e1e2 + h1h2 e2e1 + ; h1h3 e1e3 + h1h3 e3e1 + + h1h4 e1e4 + h1h4 e4e1 + h2h3 e2e3 + h2h3 e3e2 + ; h2h4 e2e4 + h2h4 e4e2 + h3h4 e3e4 + h3h4 e4e3 + jc ; First, calculate all 21 independent coefficients c0,...,c20 c0 = sqr(h0) temp = 2 * h0 c1 = sqr(h1) c2 = sqr(h2) c3 = sqr(h3) c4 = sqr(h4) c5 = temp * h1 c6 = temp * h2 c7 = temp * h3 c8 = temp * h4 c9 = h1 * h2 c10 = c9 c11 = h1 * h3 c12 = c11 c13 = h1 * h4 c14 = c13 c15 = h2 * h3 c16 = c15 c17 = h2 * h4 c18 = c17 c19 = h3 * h4 c20 = c19 ; Second, combine the coefficients according to the current ruleset. if @ruleset == "A" h0 = c0 - c1 - c2 - c3 - c4 + c11 + c12 + c17 + c18 h1 = c5 h2 = c6 h3 = c7 h4 = c8 elseif @ruleset == "B" h0 = c0 - c1 - c2 - c3 - c4 h1 = c5 h2 = c6 h3 = c7 h4 = c8 elseif @ruleset == "C" h0 = c0 - c1 - c2 - c3 - c4 - c11 - c12 - c17 - c18 h1 = c5 h2 = c6 h3 = c7 h4 = c8 elseif @ruleset == "D" h0 = c0 - c1 - c2 - c3 - c4 h1 = c5 h2 = c6 h3 = c7 h4 = c8 elseif @ruleset == "E" h0 = c0 - c1 - c2 - c3 - c4 h1 = c5 + c17 + c18 h2 = c6 + c11 + c12 h3 = c7 h4 = c8 elseif @ruleset == "F" ; Olariu's polar 5-complex numbers h0 = c0 + c13 + c14 + c15 + c16 h1 = c5 + c3 + c17 + c18 h2 = c6 + c1 + c19 + c20 h3 = c7 + c4 + c9 + c10 h4 = c8 + c2 + c11 + c12 elseif @ruleset == "G" h0 = c0 - c1 - c2 - c3 - c4 h1 = c5 h2 = c6 h3 = c7 h4 = c8 elseif @ruleset == "H" h0 = c0 + c11 - c13 + c12 - c14 h1 = c5 + c4 h2 = c6 + c1 h3 = c7 + c2 h4 = c8 + c3 endif ; @ruleset ; Next, add the Julia constant or #pixel value to the hypercomplex number if @plotplane == "real, e1" h0 = h0 + jcreal h1 = h1 + jcimag #z = h0 + flip(h1) elseif @plotplane == "real, e2" h0 = h0 + jcreal h2 = h2 + jcimag #z = h0 + flip(h2) elseif @plotplane == "real, e3" h0 = h0 + jcreal h3 = h3 + jcimag #z = h0 + flip(h3) elseif @plotplane == "real, e4" h0 = h0 + jcreal h4 = h4 + jcimag #z = h0 + flip(h4) elseif @plotplane == "e1, e2" h1 = h1 + jcreal h2 = h2 + jcimag #z = h1 + flip(h2) elseif @plotplane == "e1, e3" h1 = h1 + jcreal h3 = h3 + jcimag #z = h1 + flip(h3) elseif @plotplane == "e1, e4" h1 = h1 + jcreal h4 = h4 + jcimag #z = h1 + flip(h4) elseif @plotplane == "e2, e3" h2 = h2 + jcreal h3 = h3 + jcimag #z = h2 + flip(h3) elseif @plotplane == "e2, e4" h2 = h2 + jcreal h4 = h4 + jcimag #z = h2 + flip(h4) elseif @plotplane == "e3, e4" h3 = h3 + jcreal h4 = h4 + jcimag #z = h3 + flip(h4) endif ; @plotplane ; Calculate the value used in the bailout test if @bailvar == "hypercomplex norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1) + sqr(h2) + sqr(h3) + sqr(h4)) elseif @bailvar == "real, e1 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1)) elseif @bailvar == "real, e2 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h2)) elseif @bailvar == "real, e3 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h3)) elseif @bailvar == "real, e4 norm" bailoutvalue = sqrt(sqr(h0) + sqr(h4)) elseif @bailvar == "e1, e2 norm" bailoutvalue = sqrt(sqr(h1) + sqr(h2)) elseif @bailvar == "e1, e3 norm" bailoutvalue = sqrt(sqr(h1) + sqr(h3)) elseif @bailvar == "e1, e4 norm" bailoutvalue = sqrt(sqr(h1) + sqr(h4)) elseif @bailvar == "e2, e3 norm" bailoutvalue = sqrt(sqr(h2) + sqr(h3)) elseif @bailvar == "e2, e4 norm" bailoutvalue = sqrt(sqr(h2) + sqr(h4)) elseif @bailvar == "e3, e4 norm" bailoutvalue = sqrt(sqr(h3) + sqr(h4)) elseif @bailvar == "|real|" bailoutvalue = abs(h0) elseif @bailvar == "|e1|" bailoutvalue = abs(h1) elseif @bailvar == "|e2|" bailoutvalue = abs(h2) elseif @bailvar == "|e3|" bailoutvalue = abs(h3) elseif @bailvar == "|e4|" bailoutvalue = abs(h4) endif ; @bailvar bailout: bailoutvalue < @bail default: title = "Order-5 Hypercomplex Streamlined" center = (0,0) maxiter = 2500 method = multipass periodicity = 0 heading text = "A sampling of order-5 hypercomplex number systems" endheading param ruleset caption = "Multiplication Ruleset" enum = "A" "B" "C" "D" "E" "F" "G" "H" default = 0 hint = "This parameter determines how the basis units of the hypercomplex system \ combine when multiplied. The different rules are listed in the comments at \ the top of the formula entry. Set 'F' are Olariu's polar 5-complex numbers." endparam param plotplane caption = "Plot Plane" enum = "real, e1" "real, e2" "real, e3" "real, e4" "e1, e2" "e1, e3" "e1, e4" \ "e2, e3" "e2, e4" "e3, e4" default = 0 hint = "This parameter determines which components of the hypercomplex iterate \ are plotted on the screen." endparam param bailvar caption = "Bailout Variable" enum = "hypercomplex norm" "real, e1 norm" "real, e2 norm" "real, e3 norm" "real, e4 norm" \ "e1, e2 norm" "e1, e3 norm" "e1, e4 norm" "e2, e3 norm" "e2, e4 norm" "e3, e4 norm" \ "|real|" "|e1|" "|e2|" "|e3|" "|e4|" default = 0 hint = "This setting determines which magnitude value is used in the bailout test. \ The norm of the selected quantities is tested." endparam param realstart caption = "Real Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve the real axis, then this parameter sets the \ initial value of the real component of the hypercomplex number." visible = (@plotplane == "e1, e2") || (@plotplane == "e1, e3") || (@plotplane == "e1, e4") \ || (@plotplane == "e2, e3") || (@plotplane == "e2, e4") || (@plotplane == "e3, e4") endparam param e1start caption = "e1 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e1, then this parameter sets the \ initial value of the e1 component of the hypercomplex number." visible = (@plotplane == "real, e2") || (@plotplane == "real, e3") || (@plotplane == "real, e4") \ || (@plotplane == "e2, e3") || (@plotplane == "e2, e4") || (@plotplane == "e3, e4") endparam param e2start caption = "e2 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e2, then this parameter sets the \ initial value of the e2 component of the hypercomplex number." visible = (@plotplane == "real, e1") || (@plotplane == "real, e3") || (@plotplane == "real, e4") \ || (@plotplane == "e1, e3") || (@plotplane == "e1, e4") || (@plotplane == "e3, e4") endparam param e3start caption = "e3 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e3, then this parameter sets the \ initial value of the e3 component of the hypercomplex number." visible = (@plotplane == "real, e1") || (@plotplane == "real, e2") || (@plotplane == "real, e4") \ || (@plotplane == "e1, e2") || (@plotplane == "e1, e4") || (@plotplane == "e2, e4") endparam param e4start caption = "e4 Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve e4, then this parameter sets the \ initial value of the e4 component of the hypercomplex number." visible = (@plotplane == "real, e1") || (@plotplane == "real, e2") || (@plotplane == "real, e3") \ || (@plotplane == "e1, e2") || (@plotplane == "e1, e3") || (@plotplane == "e2, e3") endparam param bail caption = "Bailout Value" default = 16.0 hint = "Value needed to 'escape' to infinity" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-O5-hypercomplex" ruleset = ruleset plotplane = plotplane bailvar = bailvar realstart = realstart e1start = e1start e2start = e2start e3start = e3start e4start = e4start jconstant = #pixel bail = bail mandy = julia julia = mandy } jam-O4-hypercomplex { ; Simplified version of jam-quaternions with additional rule sets. ; 211201 ; All implemented multiplication rules for the basis units 1, i, j, k include: ; 1x1=1; 1i = i1 = i; 1j = j1 = j; 1k = k1 = k. ; Additional multiplication rules implemented for the imaginary units i, j and k are: ; Ruleset A: i^2 = j^2 = k^2 = -1; ij = -ji = k, jk = -kj = i, ki = -ik = j (quaternions) ; B: i^2 = -1; j^2 = k^2 = 1; ij = -ji = k, jk = -kj = -i; ki = -ik = j (split quaternions) ; C: i^2 = -1; j^2 = k^2 = 0; ij = -ji = k, jk = kj = 0, ki = -ik = j (dual complex) ; D: i^2 = k^2 = -1, j^2 = 1; ij = ji = k, jk = kj = i, ki = ik = -j (bicomplex/tessarines) ; E: i^2 = j^2 = -1; k^2 = 0; ij = -ji = k, jk = -kj = i, ki = -ik = j ; F: i^2 = -1; j^2 = 1; k^2 = 0; ij = -ji = k, jk = -kj = i, ki = -ik = j ; G: i^2 = k^2 = -1; j^2 = 1; ij = -ji = k, jk = -kj = i, ki = -ik = j ; H: i^2 = -1; j^2 = k^2 = 1; ij = -ji = k, jk = -kj = i, ki = -ik = j ; I: i^2 = j^2 = k^2 = -1; ij = -ji = k; jk = -kj = i + 1; ki = -ik = j ; J: i^2 = -1; j^2 = i + k; k^2 = i - j; ij = -ji = k, jk = -kj = i, ki = -ik = j ; K: i^2 = j - 1; j^2 = k - 1; k^2 = i - 1; ij = -ji = k, jk = -kj = i, ki = -ik = j ; L: i^2 = j^2 = k^2 = 1; ij = ji = k, ik = ki = j, jk = kj = i (Olariu hyperbolic 4-complex) ; M: i^2 = -k^2 = j; j^2 = -1; ij = ji = k, jk = kj = -i, ik = ki = -1 (Olariu planar 4-complex) ; N: i^2 = k^2 = j; j^2 = 1; ij = ji = k, jk = kj = i, ik = ki = -1 (Olariu polar 4-complex) ; Plotting options are the real-i, real-j, real-k, i-j, j-k, or ki planes. ; The bailout variable can be the magnitude of the hypercomplex number, h, ; or any pair of these components: real,i; real,j; real,k; i,j; j,k; or k,i, ; or, alternatively, the absolute value of any single component. global: init: complex jc = (0,0) ; Julia constant (Julia) or pixel value (Mandelbrot) float jcreal = float jcimag = 0.0 float bailoutvalue = 0.0 ; Working variables for the iteration: ; The hypercomplex H = h0 + h1i + h2j + h3k, where the hs are real (scalars) float h0 = float h1 = float h2 = float h3 = 0.0 ; An order-4 hypercomplex when squared will generate 16 terms before ; simplification using the multiplication rules. ; After partial simplification using scalar commutativity, there are ; 13 individual coefficients. For simplicity and ; clarity rather than efficiency, these 13 term coefficients are defined here. ; h^2 = h0^2 + 2h0h1 i + 2h0h2 j + 2h0h3 k + h1^2 i^2 + h2^2 j^2 + h3^2 k^2 + ; h1h2 ij + h1h2 ji + h1h3 ik + h1h3 ki + h2h3 jk + h2h3 kj float c0 = float c1 = float c2 = float c3 = float c4 = float c5 = 0.0 float c6 = float c7 = float c8 = float c9 = float c10 = float c11 = float c12 = 0.0 float temp = 0.0 if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif ; jcreal and jcimag will be added to the appropriate components of the ; hypercomplex number corresponding to the selected plot plane. jcreal = real(jc) jcimag = imag(jc) ; initialize the hypercomplex number if @plotplane == "real, i" h0 = real(#z) h1 = imag(#z) h2 = @jstart h3 = @kstart elseif @plotplane == "real, j" h0 = real(#z) h1 = @istart h2 = imag(#z) h3 = @kstart elseif @plotplane == "real, k" h0 = real(#z) h1 = @istart h2 = @jstart h3 = imag(#z) elseif @plotplane == "i, j" h0 = @realstart h1 = real(#z) h2 = imag(#z) h3 = @kstart elseif @plotplane == "j, k" h0 = @realstart h1 = @istart h2 = real(#z) h3 = imag(#z) elseif @plotplane == "k, i" h0 = @realstart h1 = imag(#z) h2 = @jstart h3 = real(#z) endif ; @plotplane loop: ; Iterate the hypercomplex number according to the chosen ruleset, ; h(n+1) = h(n)^2 + jc = h0^2 + 2h0h1i + 2h0h2j + 2h0h3k + h1^2i^2 + ; h2^2j^2 + h3^2k^2 + h1h2ij + h1h2ji + h1h3ik + h1h3ki + ; h2h3jk + h2h3kj + jc ; First, calculate all 13 independent coefficients c0,...,c12 c0 = sqr(h0) temp = 2 * h0 c1 = temp * h1 c2 = temp * h2 c3 = temp * h3 c4 = sqr(h1) c5 = sqr(h2) c6 = sqr(h3) c7 = h1 * h2 c8 = c7 c9 = h1 * h3 c10 = c9 c11 = h2 * h3 c12 = c11 ; Second, combine the coefficients according to the current ruleset. if @ruleset == "A" ; quaternions h0 = c0 - c4 - c5 - c6 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "B" ; split quaternions h0 = c0 + c5 + c6 - c4 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "C" ; dual complex numbers h0 = c0 - c4 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "D" ; bicomplex numbers/tessarines h0 = c0 + c5 - c4 - c6 h1 = c1 + c11 + c12 h2 = c2 - c9 - c10 h3 = c3 + c7 + c8 elseif @ruleset == "E" h0 = c0 - c4 - c5 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "F" h0 = c0 - c4 + c5 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "G" h0 = c0 - c4 + c5 - c6 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "H" h0 = c0 - c4 + c5 + c6 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "I" h0 = c0 - c4 - c5 - c6 + c11 - c12 h1 = c1 h2 = c2 h3 = c3 elseif @ruleset == "J" h0 = c0 - c4 h1 = c1 + c5 + c6 h2 = c2 - c6 h3 = c3 elseif @ruleset == "K" h0 = c0 - c4 - c5 - c6 h1 = c1 + c6 h2 = c2 + c4 h3 = c3 + c5 elseif @ruleset == "L" ; Olariu hyperbolic 4-complex h0 = c0 + c4 + c5 + c6 h1 = c1 + c11 + c12 h2 = c2 + c9 + c10 h3 = c3 + c7 + c8 elseif @ruleset == "M"; Olariu planar 4-complex h0 = c0 - c5 - c9 - c10 h1 = c1 - c11 - c12 h2 = c2 + c4 - c6 h3 = c3 + c7 + c8 elseif @ruleset == "N"; Olariu planar 4-complex h0 = c0 + c5 - c9 - c10 h1 = c1 + c11 + c12 h2 = c2 + c4 + c6 h3 = c3 + c7 + c8 endif ; @ruleset ; Next, add the Julia constant or #pixel value to the hypercomplex number if @plotplane == "real, i" h0 = h0 + jcreal h1 = h1 + jcimag #z = h0 + flip(h1) elseif @plotplane == "real, j" h0 = h0 + jcreal h2 = h2 + jcimag #z = h0 + flip(h2) elseif @plotplane == "real, k" h0 = h0 + jcreal h3 = h3 + jcimag #z = h0 + flip(h3) elseif @plotplane == "i, j" h1 = h1 + jcreal h2 = h2 + jcimag #z = h1 + flip(h2) elseif @plotplane == "j, k" h2 = h2 + jcreal h3 = h3 + jcimag #z = h2 + flip(h3) elseif @plotplane == "k, i" h3 = h3 + jcreal h1 = h1 + jcimag #z = h3 + flip(h1) endif ; @plotplane ; Calculate the value used in the bailout test if @bailvar == "hypercomplex norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1) + sqr(h2) + sqr(h3)) elseif @bailvar == "real, i norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1)) elseif @bailvar == "real, j norm" bailoutvalue = sqrt(sqr(h0) + sqr(h2)) elseif @bailvar == "real, k norm" bailoutvalue = sqrt(sqr(h0) + sqr(h3)) elseif @bailvar == "i, j norm" bailoutvalue = sqrt(sqr(h1) + sqr(h2)) elseif @bailvar == "j, k norm" bailoutvalue = sqrt(sqr(h2) + sqr(h3)) elseif @bailvar == "k, i norm" bailoutvalue = sqrt(sqr(h1) + sqr(h3)) elseif @bailvar == "|real|" bailoutvalue = abs(h0) elseif @bailvar == "|i|" bailoutvalue = abs(h1) elseif @bailvar == "|j|" bailoutvalue = abs(h2) elseif @bailvar == "|k|" bailoutvalue = abs(h3) endif ; @bailvar bailout: bailoutvalue < @bail default: title = "Order-4 Hypercomplex Streamlined" center = (0,0) maxiter = 2500 method = multipass periodicity = 0 heading text = "A sampling of order-4 hypercomplex number systems" endheading param ruleset caption = "Multiplication Ruleset" enum = "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" default = 0 hint = "This parameter determines how the basis units of the hypercomplex system \ combine when multiplied. The different rules are listed in the comments at \ the top of the formula entry. Set A are the quaternions, B the split quaternions, \ C the dual complex numbers, D the bicomplex numbers (tessarines). Olariu's \ hyperbolic, planar, and polar 4-complex numbers are sets L, M, and N, respectively." endparam param plotplane caption = "Plot Plane" enum = "real, i" "real, j" "real, k" "i, j" "j, k" "k, i" default = 0 hint = "This parameter determines which components of the hypercomplex iterate \ are plotted on the screen." endparam param bailvar caption = "Bailout Variable" enum = "hypercomplex norm" "real, i norm" "real, j norm" "real, k norm" "i, j norm" \ "j, k norm" "k, i norm" "|real|" "|i|" "|j|" "|k|" default = 0 hint = "This setting determines which magnitude value is used in the bailout test. \ The norm of the selected quantities is tested." endparam param realstart caption = "Real Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve the real axis, then this parameter sets the \ initial value of the real component of the hypercomplex number." visible = (@plotplane == "i, j") || (@plotplane == "j, k") || (@plotplane == "k, i") endparam param istart caption = "i Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve i, then this parameter sets the \ initial value of the i component of the hypercomplex number." visible = (@plotplane == "real, j") || (@plotplane == "real, k") || (@plotplane == "j, k") endparam param jstart caption = "j Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve j, then this parameter sets the \ initial value of the j component of the hypercomplex number." visible = (@plotplane == "real, i") || (@plotplane == "real, k") || (@plotplane == "k, i") endparam param kstart caption = "k Component Value" default = 0.1 hint = "If parameter 'Plot Plane' does not involve k, then this parameter sets the \ initial value of the k component of the hypercomplex number." visible = (@plotplane == "real, i") || (@plotplane == "real, j") || (@plotplane == "i, j") endparam param bail caption = "Bailout Value" default = 16.0 hint = "Value needed to 'escape' to infinity" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-O4-hypercomplex" ruleset = ruleset plotplane = plotplane bailvar = bailvar kstart = kstart jstart = jstart istart = istart realstart = realstart jconstant = #pixel bail = bail mandy = julia julia = mandy } jam-O3-hypercomplex { ; Simplified version of jam-teronions with expanded rule sets. ; 211201 ; If not indicated otherwise below, implemented multiplication rules ; for the basis units 1, i, j include: ; 1x1=1; 1i = i1 = i; 1j = j1 = j; i^2 = j^2 = -1. ; Additional multiplication rules implemented for the imaginary units i and j are: ; Ruleset A: ij = ji = -1 ; B: ij = -1; ji = 1 ; C: ij = 1/2; ji = 1/2 ; D: ij = j; ji = i ; E: ij = -j; ji = i ; F: ij = i+j; ji = i-j ; G: ij = ji = i+j ; H: ij = 1/2 + i; ji = -1/2 + j ; I: ij = 1/2 + i; ji = 1/2 + j ; J: ij = 1/2 + i; ji = 1/2 - j ; K: ij = ji = 0 [Same as B] ; L: j^2 = ij = ji = 0 ; M: j^2 = 1; ij = i; ji = j ; N: j^2 = 1; ij = ji = -1 ; O: j^2 = 1; ij = j; ji = -i ; P: j^2 = 1; ij = -1; ji = 1 ; Q: j^2 = 1; ij = ji = i + j ; R: j^2 = 1; ij = i - j; ji = i + j ; S: j^2 = 1; ij = ji = 0 [Same as P] ; T: j^2 = 1; ij = i + j; ji = -i - j [Same as P] ; U: ij = i + j; ji = -i - j [Same as B] ; V: i^2 = j, j^2 = i; ij = ji = 1 (polar hypercomplex (tricomplex) --- ; see Olariu (2000)) ; W: ij = ji = 1 + i + j ; Plotting options are the real-i, real-j, or i-j planes. ; The bailout variable can be the magnitude of the hypercomplex number, h, ; or any pair of these components: real,i; real,j; or i,j, or, alternatively, ; the absolute value of any single component. global: init: complex jc = (0,0) ; Julia constant (Julia) or pixel value (Mandelbrot) float h0 = float h1 = float h2 = 0.0 ; hypercomplex components float jc1 = float jc2 = 0.0 float bailoutvalue = 0.0 ; working variables for the iteration ; An order-3 hypercomplex when squared will generate 9 terms before ; simplification using the multiplication rules. For simplicity and ; clarity rather than efficiency, these 9 term coefficients are defined here. ; (h0 + h1e1 + h2e2)^2 = h0^2 + h0h1e1 + h0h2e2 + h0h1e1 + h1^2e1^2 + ; h1h2e1e2 + h0h2e2 + h1h2e2e1 + h2^2e2^2 float c1 = float c2 = float c3 = float c4 = float c5 = 0.0 float c6 = float c7 = float c8 = float c9 = 0.0 if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif ; jc1 and jc2 will be added to the appropriate components of the ; hypercomplex number corresponding to the selected plot plane. jc1 = real(jc) jc2 = imag(jc) ; initialize the hypercomplex number if @plotplane == "real, i" h0 = real(#z) h1 = imag(#z) h2 = @jstart elseif @plotplane == "real, j" h0 = real(#z) h1 = @istart h2 = imag(#z) elseif @plotplane == "i, j" h0 = @realstart h1 = real(#z) h2 = imag(#z) endif ; @plotplane loop: ; Iterate the hypercomplex number according to the chosen ruleset, ; h(n+1) = h(n)^2 + jc ; h(n)^2 = h0^2 + h0h1e1 + h0h2e2 + h0h1e1 + h1^2e1^2 + h1h2e1e2 + h0h2e2 + h1h2e2e1 + h2^2e2^2 ; First, calculate all the 9 coefficients c1 = h0 * h0 c2 = h0 * h1 c3 = h0 * h2 c4 = c2 ; scalar multiplication is commutative c5 = h1 * h1 c6 = h1 * h2 c7 = c3 c8 = c6 c9 = h2 * h2 ; Second, combine the coefficients according to the current ruleset. ; Since most rule sets only differ in the ij and ji terms, the other ; terms can be calculated first. h0 = c1 - c5 - c9 h1 = c2 + c4 h2 = c3 + c7 ; Now calculate the ij/ji terms and combine appropriately if @ruleset == "A" ; ij = ji = -1 h0 = h0 - c6 - c8 ; elseif @ruleset == "B" ; ij = -1, ji = 1; nothing to do elseif @ruleset == "C" ; ij = 1/2, ji = 1/2 h0 = h0 + (0.5 * (c6 + c8)) elseif @ruleset == "D" ; ij = j, ji = i h2 = h2 + c6 h1 = h1 + c8 elseif @ruleset == "E" ; ij = -j, ji = i h2 = h2 - c6 h1 = h1 + c8 elseif @ruleset == "F" ; ij = i+j, ji = i-j h1 = h1 + c6 + c8 h2 = h2 elseif @ruleset == "G" ; ij = i+j, ji = i+j h1 = h1 + c6 + c8 h2 = h2 + c6 + c8 elseif @ruleset == "H" ; ij = 1/2 + i, ji = -1/2 + j h1 = h1 + c6 h2 = h2 + c8 elseif @ruleset == "I" ; ij = 1/2 + i, ji = 1/2 + j h0 = h0 + 0.5 * (c6 + c8) h1 = h1 + c6 h2 = h2 + c8 elseif @ruleset == "J" ; ij = 1/2 + i, ji = 1/2 - j h0 = h0 + 0.5 * (c6 + c8) h1 = h1 + c6 h2 = h2 - c8 ; elseif @ruleset == "K" --- ij = 0, ji = 0, so nothing to do [same as B] elseif @ruleset == "L" ; j^2 = ij = ji = 0 h2 = 0 elseif @ruleset == "M" ; j^2 = 1; ij = i; ji = j h0 = c1 - c5 + c9 h1 = h1 + c6 h2 = h2 + c8 elseif @ruleset == "N" ; j^2 = 1; ij = ji = -1 h0 = c1 - c5 + c9 - c6 - c8 elseif @ruleset == "O" ; j^2 = 1; ij = j; ji = -i h0 = c1 - c5 + c9 h1 = h1 - c8 h2 = h2 + c6 elseif @ruleset == "P" ; j^2 = 1; ij = -1; ji = 1 h0 = c1 - c5 + c9 elseif @ruleset == "Q" ; j^2 = 1; ij = ji = i + j h0 = c1 - c5 + c9 h1 = h1 + c6 + c8 h2 = h2 + c6 + c8 elseif @ruleset == "R" ; j^2 = 1; ij = i - j; ji = i + j h0 = c1 - c5 + c9 h1 = h1 + c6 + c8 elseif @ruleset == "S" ; j^2 = 1; ij = ji = 0 [same as P] h0 = c1 - c5 + c9 elseif @ruleset == "T" ; j^2 = 1; ij = i + j; ji = -i - j [same as P] h0 = c1 - c5 + c9 ; elseif @ruleset == "U" ; ij = i + j; ji = -i - j ; [same as B] elseif @ruleset == "V" ; i^2 = j, j^2 = 1, ij = ji = 1 (polar hypercomplex) h0 = c1 + c6 + c8 h1 = h1 + c9 h2 = h2 + c5 elseif @ruleset == "W" ; i^2 = j^2 = -1, ij = ji = 1 + i + j h0 = h0 + c6 + c8 h1 = h1 + c6 + c8 h2 = h2 + c6 + c8 endif ; @ruleset ; Next, add the Julia constant or #pixel value to the hypercomplex number if @plotplane == "real, i" h0 = h0 + jc1 h1 = h1 + jc2 #z = h0 + flip(h1) elseif @plotplane == "real, j" h0 = h0 + jc1 h2 = h2 + jc2 #z = h0 + flip(h2) elseif @plotplane == "i, j" h1 = h1 + jc1 h2 = h2 + jc2 #z = h1 + flip(h2) endif ; @plotplane ; Calculate the value used in the bailout test if @bailvar == "hypercomplex norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1) + sqr(h2)) elseif @bailvar == "real, i norm" bailoutvalue = sqrt(sqr(h0) + sqr(h1)) elseif @bailvar == "real, j norm" bailoutvalue = sqrt(sqr(h0) + sqr(h2)) elseif @bailvar == "i, j norm" bailoutvalue = sqrt(sqr(h1) + sqr(h2)) elseif @bailvar == "|real|" bailoutvalue = abs(h0) elseif @bailvar == "|i|" bailoutvalue = abs(h1) elseif @bailvar == "|j|" bailoutvalue = abs(h2) endif ; @bailvar bailout: bailoutvalue < @bail default: title = "Order-3 Hypercomplex Streamlined" center = (0,0) maxiter = 2500 method = multipass periodicity = 0 heading text = "A sampling of order-3 hypercomplex number systems" endheading param ruleset caption = "Multiplication Ruleset" enum = "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" \ "O" "P" "Q" "R" "S" "T" "U" "V" "W" default = 0 hint = "This parameter determines how the basis units of the hypercomplex system \ combine when multiplied. The different rules are listed in the comments at \ the top of the formula entry." endparam param plotplane caption = "Plot Plane" enum = "real, i" "real, j" "i, j" default = 0 hint = "This parameter determines which components of the hypercomplex iterate \ are plotted on the screen." endparam param bailvar caption = "Bailout Variable" enum = "hypercomplex norm" "real, i norm" "real, j norm" "i, j norm" "|real|" "|i|" "|j|" default = 0 hint = "This setting determines which magnitude value is used in the bailout test. \ The norm of the selected quantities is tested." endparam param jstart caption = "j Component Value" default = 0.1 hint = "If parameter 'Plot Plane' = 'real, i', then this parameter sets the \ initial value of the j component of the hypercomplex number." visible = @plotplane == "real, i" endparam param istart caption = "i Component Value" default = 0.1 hint = "If parameter 'Plot Plane' = 'real, j', then this parameter sets the \ initial value of the i component of the hypercomplex number." visible = @plotplane == "real, j" endparam param realstart caption = "Real Component Value" default = 0.1 hint = "If parameter 'Plot Plane' = 'i, j', then this parameter sets the \ initial value of the real component of the hypercomplex number." visible = @plotplane == "i, j" endparam param bail caption = "Bailout Value" default = 16.0 hint = "Value needed to 'escape' to infinity" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-O3-hypercomplex" ruleset = ruleset plotplane = plotplane bailvar = bailvar jstart = jstart istart = istart realstart = realstart jconstant = #pixel bail = bail mandy = julia julia = mandy } jam-catseye { ; jam 8/12/2017 ; based on the Xaos Catseye formula as deduced from the ; source code init: complex jc = (0,0) float zreal = float zimag = float pixreal = float piximag = 0.0 float realpart = float imagpart = 0.0 float zdenom = 0.0 float pixdenom = 0.0 if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif pixreal = real(jc), piximag = imag(jc) pixdenom = 1/(sqr(pixreal) + sqr(piximag)) loop: zdenom = 1/(sqr(real(#z)) + sqr(imag(#z))) realpart = (pixreal * real(#z) + piximag * imag(#z)) * zdenom imagpart = (-pixreal * imag(#z) + piximag * real(#z)) * zdenom zreal = (real(#z) * pixreal + imag(#z) * piximag) * pixdenom + realpart zimag = (-real(#z) * piximag + imag(#z) * pixreal) * pixdenom + imagpart realpart = sqr(zreal) imagpart = sqr(zimag) #z = zreal + flip(zimag) bailout: (realpart + imagpart) < @bail + 0.0001 default: title = "Xaos Catseye" center = (0,0) maxiter = 1000 method = multipass periodicity = 0 param bail caption = "Bailout Value" default = 4.0 hint = "Value needed to 'escape' to infinity" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-catseye" jconstant = #pixel bail = bail mandy = julia julia = mandy } jam-factorials { ; jam 030309 ; Mandelbrot/Julia based on power series incorporating generalized factorials, ; ___ ; f(z) = \ [(-1)^n] * a(n) * z^n / n! . ; /__ ; n ; The factorial denominator can be a normal factorial, double factorial, ; or generalized triple, quadruple, etc. factorials. Examples: for double ; factorials, 8!! = 8 x 6 x 4 x 2, and 7!! = 7 x 5 x 3 x 1; for triple ; factorials, 12!!! = 12 x 9 x 6 x 3, 13!!! = 13 x 10 x 7 x 4 x 1, and ; 14!!! = 14 x 11 x 8 x 5 x 2; etc. The terms of the series so defined may ; optionally alternate sign, and the coefficients a(n), exponents n, and ; factorial denominator n! (or n!!, n!!!, etc) may depend simply and directly ; on n, or each may independently be defined by a function of the form ; ; coefficient/exponent/factorial = kn + m , ; ; where the constants k and m are user-specified. The starting value of n, ; normally 0, may also be specified. For purposes of this formula, negative ; factorials are defined = 1. ; ; The function is implemented either as a static Taylor series expansion about ; z=0 using a fixed, user-specified number of terms (minimally 1 term), ; or dynamically using an indefinite number of terms based on the current ; iteration count. The z argument may be modified before or after passage to ; the series by another overall function, and/or the series terms may be ; multiplied by an overall constant. ; Some of the options are based on techniques of Dave Makin, as are some of the ; series based on simple factorials. Thanks, Dave! ; Contact Joe Maddry (maddry@sri.org) with comments/questions. Enjoy! global: ; initialize arrays/variables that will be needed (static mode) complex numcoeffs[@staticterms] ; numerator coefficients and final coefficients complex exponents[@staticterms] ; the z power float lastfactvalues[@factorialorder] ; holds value of last-computed factorial ; in each factorial series int lastfactindexes[@factorialorder] ; holds the integer used to compute the ; last factorial value in each series int sloop = int sloop2 = 0 int stempint = int stempindex = int scurrentterm = 0 ; figure the amount each index should be adjusted for computation of ; the next factorial if @factorialstart == "kn+m" int sincrement = @factmultiplier * @factorialorder else int sincrement = @factorialorder endif ; @factorialstart bool sfirstset = TRUE ; the first time thru the factorial values array, we have ; to calculate the starting value; after that, we just ; add on to what's already there if @mode == "static" ; set up the factorials computation ; first, set the initial index sloop = 0 while sloop < @factorialorder stempindex = (sloop + @firstterm) % @factorialorder if stempindex < 0 stempindex = stempindex + @factorialorder endif ; stempindex ; increment is subtracted to set the array indexes to the position ; immediately before the desired starting index; this index will ; then be incremented to the desired starting index later, by the ; normal factorial calculation code if @factorialstart == "n" lastfactindexes[stempindex] = sloop + @firstterm - sincrement elseif @factorialstart == "n+1" lastfactindexes[stempindex] = sloop + @firstterm + 1 - sincrement elseif @factorialstart == "n-1" lastfactindexes[stempindex] = sloop + @firstterm - 1 - sincrement else ; @factorialstart == "kn+m" lastfactindexes[stempindex] = @factmultiplier * (sloop + @firstterm) \ + @factoffset - sincrement endif ; @factorialstart lastfactvalues[sloop] = 1.0 ; all begin with value = 1 sloop = sloop + 1 endwhile ; sloop ; compute coefficients for static series sloop = 0 while sloop < @staticterms scurrentterm = sloop + @firstterm if @coeffnum == "1" numcoeffs[sloop] = (1.0,0) elseif @coeffnum == "n" numcoeffs[sloop] = scurrentterm elseif @coeffnum == "n+1" numcoeffs[sloop] = scurrentterm + 1 elseif @coeffnum == "n-1" numcoeffs[sloop] = scurrentterm - 1 elseif @coeffnum == "kn+m" numcoeffs[sloop] = @nummultiplier * scurrentterm + @numoffset else ; @coeff == 1/n if scurrentterm == 0 numcoeffs[sloop] = 1 else numcoeffs[sloop] = 1/scurrentterm endif ; scurrentterm endif ; @coeffnum ; apply any specified function to the numerator coefficient if @coefffunc == "power" numcoeffs[sloop] = numcoeffs[sloop]^@numpower endif ; @coefffunc if @multconst if @constpower == (1,0) numcoeffs[sloop] = @seriesconst * numcoeffs[sloop] elseif @constpower == (0,0) numcoeffs[sloop] = @seriesconst^scurrentterm * numcoeffs[sloop] elseif @constpower == (-1,0) numcoeffs[sloop] = @seriesconst^(@nummultiplier * scurrentterm + @numoffset) * numcoeffs[sloop] else ; numcoeffs[sloop] = @seriesconst^@constpower * numcoeffs[sloop] endif ; @constpower endif ; multconst if @altsign if abs(scurrentterm % 2) == 1 numcoeffs[sloop] = -numcoeffs[sloop] endif ; abs() endif ; @altsign if @zexponent == "n" exponents[sloop] = scurrentterm elseif @zexponent == "n+1" exponents[sloop] = scurrentterm + 1 elseif @zexponent == "n-1" exponents[sloop] = scurrentterm - 1 else ; @zexponent == "kn+m" exponents[sloop] = @expmultiplier * scurrentterm + @expoffset endif ; @zexponent ; now calculate the factorial based on the factorial index and the ; factorial order stempindex = scurrentterm % @factorialorder if stempindex < 0 stempindex = stempindex + @factorialorder endif ; stempindex ; save old index, calculate next index stempint = lastfactindexes[stempindex] if sfirstset || (stempint < 1) stempint = 1 endif ; stempint lastfactindexes[stempindex] = lastfactindexes[stempindex] + sincrement ; calculate next factorial value if lastfactindexes[stempindex] > 1 if lastfactindexes[stempindex] <= @factorialorder lastfactvalues[stempindex] = lastfactindexes[stempindex] else sloop2 = lastfactindexes[stempindex] while sloop2 > stempint lastfactvalues[stempindex] = lastfactvalues[stempindex] * sloop2 sloop2 = sloop2 - @factorialorder endwhile ; sloop2 endif ; lastfactindex[] endif ; lastfactindex[] ; compute final coefficient for current term numcoeffs[sloop] = numcoeffs[sloop]/lastfactvalues[stempindex] ; move on to next term sloop = sloop + 1 if sloop == @factorialorder sfirstset = FALSE ; make sure we don't recalculate each term from beginning endif ; sloop endwhile ; sloop endif ; @static init: if @mandy z = @jconstant, jc = #pixel else ; Julia z = #pixel, jc = @jconstant endif ; general variables complex ztemp = complex zextra = complex zorig = (0,0) complex zsum = @sumconst, complex zprod = @prodconst float tempx = float tempy = 0.0 float vcreal = real(@vectconst), float vcimag = imag(@vectconst) int seed = @randseed ; declare vars for powers of z complex zpower[@staticterms] ; initialize arrays/variables that will be needed (dynamic mode) complex numcoeff = (0,0); numerator coefficients and final coefficients complex exponent = (0,0); the z exponent float lastfactvalue[@factorialorder] ; holds value of last-computed factorial ; in each factorial series int lastfactindex[@factorialorder] ; holds the integer used to compute the ; last factorial value in each series int dloop = int dloop2 = 0 int dtempint = int dtempindex = int dcurrentterm = 0 ; figure the amount each index should be adjusted for computation of ; the next factorial if @factorialstart == "kn+m" int dincrement = @factmultiplier * @factorialorder else int dincrement = @factorialorder endif ; @factorialstart bool dfirstset = TRUE ; the first time thru the factorial values array, we have ; to calculate the starting value; after that, we just ; add on to what's already there if @mode == "dynamic" ; set up the factorials computation ; first, set the initial index dloop = 0 while dloop < @factorialorder dtempindex = (dloop + @firstterm) % @factorialorder if dtempindex < 0 dtempindex = dtempindex + @factorialorder endif ; dtempindex ; increment is subtracted to set the array indexes to the position ; immediately before the desired starting index; this index will ; then be incremented to the desired starting index later, by the ; normal factorial calculation code if @factorialstart == "n" lastfactindex[dtempindex] = dloop + @firstterm - dincrement elseif @factorialstart == "n+1" lastfactindex[dtempindex] = dloop + @firstterm + 1 - dincrement elseif @factorialstart == "n-1" lastfactindex[dtempindex] = dloop + @firstterm - 1 - dincrement else ; @factorialstart == "kn+m" lastfactindex[dtempindex] = @factmultiplier * (dloop + @firstterm) \ + @factoffset - dincrement endif ; @factorialstart lastfactvalue[dloop] = 1.0 ; all begin with value = 1 dloop = dloop + 1 endwhile ; dloop ; compute initial coefficient for dynamic series dloop = 0 if @coeffnum == "1" numcoeff = (1.0,0) elseif @coeffnum == "n" numcoeff = @firstterm elseif @coeffnum == "n+1" numcoeff = @firstterm + 1 elseif @coeffnum == "n-1" numcoeff = @firstterm - 1 elseif @coeffnum == "kn+m" numcoeff = @nummultiplier * @firstterm + @numoffset else if @firstterm == 0 numcoeff = 1 else numcoeff = 1/@firstterm endif ; @firstterm endif ; @coeffnum ; apply any specified function to the numerator coefficient if @coefffunc == "power" numcoeff = numcoeff^@numpower endif ; @coefffunc if @multconst if @constpower == (1,0) numcoeff = @seriesconst * numcoeff elseif @constpower == (0,0) numcoeff = @seriesconst^@firstterm * numcoeff elseif @constpower == (-1,0) numcoeff = @seriesconst^(@nummultiplier * @firstterm + @numoffset) * numcoeff else ; numcoeff = @seriesconst^@constpower * numcoeff endif ; @constpower endif ; multconst if @altsign if abs(@firstterm % 2) == 1 numcoeff = -numcoeff endif ; abs() endif ; @altsign if @zexponent == "n" exponent = @firstterm elseif @zexponent == "n+1" exponent = @firstterm + 1 elseif @zexponent == "n-1" exponent = @firstterm - 1 else ; @zexponent == "kn+m" exponent = @expmultiplier * @firstterm + @expoffset endif ; @zexponent ; now calculate the factorial based on the factorial index and the ; factorial order dtempindex = @firstterm % @factorialorder if dtempindex < 0 dtempindex = dtempindex + @factorialorder endif ; dtempindex ; save old index, calculate next index dtempint = lastfactindex[dtempindex] if dfirstset || (dtempint < 1) dtempint = 1 endif ; dtempint lastfactindex[dtempindex] = lastfactindex[dtempindex] + dincrement ; calculate next factorial value if lastfactindex[dtempindex] > 1 if lastfactindex[dtempindex] <= @factorialorder lastfactvalue[dtempindex] = lastfactindex[dtempindex] else dloop2 = lastfactindex[dtempindex] while dloop2 > dtempint lastfactvalue[dtempindex] = lastfactvalue[dtempindex] * dloop2 dloop2 = dloop2 - @factorialorder endwhile ; dloop2 endif ; lastfactindex[] endif ; lastfactindex[] ; compute final coefficient for current term numcoeff = numcoeff/lastfactvalue[dtempindex] ; move on to next term dloop = dloop + 1 if dloop == @factorialorder dfirstset = FALSE ; make sure we don't recalculate each term from beginning endif ; dloop else ; @mode == "static" int loopcount = 0 ; to store iteration count endif ; @mode ; Pixel/constant initialization section if @pixelformula == 1 jc = jc * jc elseif @pixelformula == 2 jc = jc * jc * jc elseif @pixelformula == 3 zextra = jc * jc jc = zextra * zextra elseif @pixelformula == 4 jc = jc ^ @ppower elseif @pixelformula == 5 jc = 1/jc elseif @pixelformula == 6 jc = sqrt(jc) elseif @pixelformula == 7 jc = 1 / ( jc * jc ) elseif @pixelformula == 8 jc = log(jc) elseif @pixelformula == 9 jc = exp( jc) elseif @pixelformula == 10 jc = jc^jc elseif @pixelformula == 11 jc = sin( jc ) elseif @pixelformula == 12 jc = cos( jc ) elseif @pixelformula == 13 jc = tan( jc ) elseif @pixelformula == 14 jc = asin( jc ) elseif @pixelformula == 15 jc = acos( jc ) elseif @pixelformula == 16 jc = atan( jc ) elseif @pixelformula == 17 jc = sinh( jc ) elseif @pixelformula == 18 jc = cosh( jc ) elseif @pixelformula == 19 jc = tanh( jc ) elseif @pixelformula == 20 jc = asinh( jc ) elseif @pixelformula == 21 jc = acosh( jc ) elseif @pixelformula == 22 jc = atanh( jc ) elseif @pixelformula == 23 jc = log( 1/jc ) elseif @pixelformula == 24 jc = log( log( jc )) elseif @pixelformula == 25 jc = exp( -jc ) elseif @pixelformula == 26 jc = exp( 1/jc ) elseif @pixelformula == 27 jc = jc^(-jc) elseif @pixelformula == 28 zextra = sin( jc ) jc = zextra * zextra elseif @pixelformula == 29 zextra = cos( jc ) jc = zextra * zextra elseif @pixelformula == 30 zextra = tan( jc ) jc = zextra * zextra elseif @pixelformula == 31 jc = cotan( jc ) elseif @pixelformula == 32 jc = 1/cos( jc ) elseif @pixelformula == 33 jc = 1/sin( jc ) elseif @pixelformula == 34 zextra = cotan( jc ) jc = zextra * zextra elseif @pixelformula == 35 zextra = 1/cos( jc ) jc = zextra * zextra elseif @pixelformula == 36 zextra = 1/sin( jc ) jc = zextra * zextra elseif @pixelformula == 37 zextra = jc^(jc) jc = jc^zextra elseif @pixelformula == 38 zextra = jc^(jc) jc = 1/( jc^zextra ) elseif @pixelformula == 39 jc = log(-jc) elseif @pixelformula == 40 jc = 1/log( jc ) elseif @pixelformula == 41 jc = jc * log( jc ) elseif @pixelformula == 42 jc = sin( jc ) / jc elseif @pixelformula == 43 jc = cos( jc ) / jc elseif @pixelformula == 44 jc = sin( jc ) * cos( jc ) elseif @pixelformula == 45 jc = sin( jc^2 ) elseif @pixelformula == 46 jc = exp( -1/jc ) elseif @pixelformula == 47 jc = jc * exp( jc ) elseif @pixelformula == 48 jc = jc * exp( -jc ) elseif @pixelformula == 49 jc = jc * exp( 1/jc ) elseif @pixelformula == 50 jc = jc * exp( -1/jc ) elseif @pixelformula == 51 jc = jc * jc * jc elseif @pixelformula == 52 jc = 1 / ( jc * jc * jc ) elseif @pixelformula == 53 jc = atan( 1 / jc ) elseif @pixelformula == 54 jc = acos( 1 / jc ) elseif @pixelformula == 55 jc = asin( 1 / jc ) elseif @pixelformula == 56 jc = tan( jc ) / jc elseif @pixelformula == 57 jc = cotan( jc ) / jc elseif @pixelformula == 58 jc = 1 / ( jc * cos( jc )) elseif @pixelformula == 59 jc = 1 / ( jc * sin( jc )) elseif @pixelformula == 60 jc = jc * sin( jc ) elseif @pixelformula == 61 jc = jc * cos( jc ) elseif @pixelformula == 62 jc = jc * tan( jc ) elseif @pixelformula == 63 jc = jc * cotan( jc ) elseif @pixelformula == 64 jc = jc/cos( jc ) elseif @pixelformula == 65 jc = jc/sin( jc ) elseif @pixelformula == 66 jc = sin( 1/jc ) elseif @pixelformula == 67 jc = cos( 1/jc ) elseif @pixelformula == 68 jc = tan( 1/jc ) elseif @pixelformula == 69 jc = cotan( 1/jc ) elseif @pixelformula == 70 jc = 1/cos( 1/jc ) elseif @pixelformula == 71 jc = 1/sin( 1/jc ) elseif @pixelformula == 72 jc = cotanh( jc ) elseif @pixelformula == 73 jc = 1/cosh( jc ) elseif @pixelformula == 74 jc = 1/sinh( jc ) elseif @pixelformula == 75 jc = atanh( 1/jc ) elseif @pixelformula == 76 jc = acosh( 1/jc ) elseif @pixelformula == 77 jc = asinh( 1/jc ) elseif @pixelformula == 78 jc = @coeffpa * jc^@exponentpa + @coeffpb * jc^@exponentpb + \ @coeffpc * jc^@exponentpc elseif @pixelformula == 79 zextra = sinh(#z) jc = zextra * zextra elseif @pixelformula == 80 zextra = cosh( jc ) jc = zextra * zextra elseif @pixelformula == 81 zextra = tanh(jc) jc = zextra * zextra elseif @pixelformula == 82 zextra = cotanh( jc ) jc = zextra * zextra elseif @pixelformula == 83 zextra = (1,0)/cosh(jc) jc = zextra * zextra elseif @pixelformula == 84 zextra = (1,0) / sinh( jc ) jc = zextra * zextra elseif @pixelformula == 85 jc = sinh(1/jc) elseif @pixelformula == 86 jc = cosh(1/jc) elseif @pixelformula == 87 jc = tanh(1/jc) elseif @pixelformula == 88 jc = cotanh(1/jc) elseif @pixelformula == 89 jc = (1,0)/cosh(1/jc) elseif @pixelformula == 90 jc = (1,0)/sinh(1/jc) elseif @pixelformula == 91 jc = sin( jc ) * tan(jc) elseif @pixelformula == 92 jc = sinh(jc) * tanh(jc) elseif @pixelformula == 93 jc = sinh(jc) * cosh(jc) elseif @pixelformula == 94 ztemp = sinh(jc), zextra = cosh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 95 ztemp = sin(jc), zextra = cos(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 96 zextra = 1/jc jc = sin(zextra)*cos(zextra) elseif @pixelformula == 97 zextra = sin( 1/jc ) jc = zextra*zextra elseif @pixelformula == 98 jc = sin(jc) * cos(1/jc) elseif @pixelformula == 99 jc = sin(jc) * sin(1/jc) elseif @pixelformula == 100 zextra = log(jc) jc = zextra*zextra elseif @pixelformula == 101 jc = sin(jc) * sin(2*jc) elseif @pixelformula == 102 jc = exp(2*jc) elseif @pixelformula == 103 jc = exp(-2*jc) elseif @pixelformula == 104 zextra = 1/jc jc = sinh(zextra)*cosh(zextra) elseif @pixelformula == 105 zextra = sinh( 1/jc ) jc = zextra*zextra elseif @pixelformula == 106 jc = sinh(jc) * cosh(1/jc) elseif @pixelformula == 107 jc = sinh(jc) * sinh(1/jc) elseif @pixelformula == 108 jc = sin(jc) * sinh(jc) elseif @pixelformula == 109 jc = sin(jc) * cosh(jc) elseif @pixelformula == 110 zextra = sin(jc), ztemp = sinh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 111 jc = sin(jc)*exp(jc) elseif @pixelformula == 112 jc = cos(jc)*exp(jc) elseif @pixelformula == 113 jc = sinh(jc)*exp(jc) elseif @pixelformula == 114 jc = cosh(jc)*exp(jc) elseif @pixelformula == 115 jc = sin(jc)*log(jc) elseif @pixelformula == 116 jc = cos(jc)*log(jc) elseif @pixelformula == 117 jc = sinh(jc)*log(jc) elseif @pixelformula == 118 jc = cosh(jc)*log(jc) endif ; @pixelformula = 1 loop: if @pmode != 0 z = z + jc endif ; pmode zorig = z if (@func1app == "prefunction") || (@func1app == "both") if @function1 == 1 z = z * z elseif @function1 == 2 z = z * z * z elseif @function1 == 3 zextra = z * z z = zextra * zextra elseif @function1 == 4 z = z ^ @f1power elseif @function1 == 5 z = 1/z elseif @function1 == 6 z = sqrt(z) elseif @function1 == 7 z = 1 / ( z * z ) elseif @function1 == 8 z = log(z) elseif @function1 == 9 z = exp( z) elseif @function1 == 10 z = z^z elseif @function1 == 11 z = sin( z ) elseif @function1 == 12 z = cos( z ) elseif @function1 == 13 z = tan( z ) elseif @function1 == 14 z = asin( z ) elseif @function1 == 15 z = acos( z ) elseif @function1 == 16 z = atan( z ) elseif @function1 == 17 z = sinh( z ) elseif @function1 == 18 z = cosh( z ) elseif @function1 == 19 z = tanh( z ) elseif @function1 == 20 z = asinh( z ) elseif @function1 == 21 z = acosh( z ) elseif @function1 == 22 z = atanh( z ) elseif @function1 == 23 z = log( 1/z ) elseif @function1 == 24 z = log( log( z )) elseif @function1 == 25 z = exp( -z ) elseif @function1 == 26 z = exp( 1/z ) elseif @function1 == 27 z = z^(-z) elseif @function1 == 28 zextra = sin( z ) z = zextra * zextra elseif @function1 == 29 zextra = cos( z ) z = zextra * zextra elseif @function1 == 30 zextra = tan( z ) z = zextra * zextra elseif @function1 == 31 z = cotan( z ) elseif @function1 == 32 z = 1/cos( z ) elseif @function1 == 33 z = 1/sin( z ) elseif @function1 == 34 zextra = cotan( z ) z = zextra * zextra elseif @function1 == 35 zextra = 1/cos( z ) z = zextra * zextra elseif @function1 == 36 zextra = 1/sin( z ) z = zextra * zextra elseif @function1 == 37 zextra = z^(z) z = z^zextra elseif @function1 == 38 zextra = z^(z) z = 1/( z^zextra ) elseif @function1 == 39 z = log(-z) elseif @function1 == 40 z = 1/log( z ) elseif @function1 == 41 z = z * log( z ) elseif @function1 == 42 z = sin( z ) / z elseif @function1 == 43 z = cos( z ) / z elseif @function1 == 44 z = sin( z ) * cos( z ) elseif @function1 == 45 z = sin( z^2 ) elseif @function1 == 46 z = exp( -1/z ) elseif @function1 == 47 z = z * exp( z ) elseif @function1 == 48 z = z * exp( -z ) elseif @function1 == 49 z = z * exp( 1/z ) elseif @function1 == 50 z = z * exp( -1/z ) elseif @function1 == 51 z = z * z * z elseif @function1 == 52 z = 1 / ( z * z * z ) elseif @function1 == 53 z = atan( 1 / z ) elseif @function1 == 54 z = acos( 1 / z ) elseif @function1 == 55 z = asin( 1 / z ) elseif @function1 == 56 z = tan( z ) / z elseif @function1 == 57 z = cotan( z ) / z elseif @function1 == 58 z = 1 / ( z * cos( z )) elseif @function1 == 59 z = 1 / ( z * sin( z )) elseif @function1 == 60 z = z * sin( z ) elseif @function1 == 61 z = z * cos( z ) elseif @function1 == 62 z = z * tan( z ) elseif @function1 == 63 z = z * cotan( z ) elseif @function1 == 64 z = z/cos( z ) elseif @function1 == 65 z = z/sin( z ) elseif @function1 == 66 z = sin( 1/z ) elseif @function1 == 67 z = cos( 1/z ) elseif @function1 == 68 z = tan( 1/z ) elseif @function1 == 69 z = cotan( 1/z ) elseif @function1 == 70 z = 1/cos( 1/z ) elseif @function1 == 71 z = 1/sin( 1/z ) elseif @function1 == 72 z = cotanh( z ) elseif @function1 == 73 z = 1/cosh( z ) elseif @function1 == 74 z = 1/sinh( z ) elseif @function1 == 75 z = atanh( 1/z ) elseif @function1 == 76 z = acosh( 1/z ) elseif @function1 == 77 z = asinh( 1/z ) elseif @function1 == 78 z = exp(z*z) elseif @function1 == 79 zextra = sinh(#z) z = zextra * zextra elseif @function1 == 80 zextra = cosh( z ) z = zextra * zextra elseif @function1 == 81 zextra = tanh(z) z = zextra * zextra elseif @function1 == 82 zextra = cotanh( z ) z = zextra * zextra elseif @function1 == 83 zextra = (1,0)/cosh(z) z = zextra * zextra elseif @function1 == 84 zextra = (1,0) / sinh( z ) z = zextra * zextra elseif @function1 == 85 z = sinh(1/z) elseif @function1 == 86 z = cosh(1/z) elseif @function1 == 87 z = tanh(1/z) elseif @function1 == 88 z = cotanh(1/z) elseif @function1 == 89 z = (1,0)/cosh(1/z) elseif @function1 == 90 z = (1,0)/sinh(1/z) elseif @function1 == 91 z = sin( z ) * tan(z) elseif @function1 == 92 z = sinh(z) * tanh(z) elseif @function1 == 93 z = sinh(z) * cosh(z) elseif @function1 == 94 ztemp = sinh(z), zextra = cosh(z) z = ztemp*ztemp*zextra*zextra elseif @function1 == 95 ztemp = sin(z), zextra = cos(z) z = ztemp*ztemp*zextra*zextra elseif @function1 == 96 zextra = 1/z z = sin(zextra)*cos(zextra) elseif @function1 == 97 zextra = sin( 1/z ) z = zextra*zextra elseif @function1 == 98 z = sin(z) * cos(1/z) elseif @function1 == 99 z = sin(z) * sin(1/z) elseif @function1 == 100 zextra = log(z) z = zextra*zextra elseif @function1 == 101 z = sin(z) * sin(2*z) elseif @function1 == 102 z = exp(2*z) elseif @function1 == 103 z = exp(-2*z) elseif @function1 == 104 zextra = 1/z z = sinh(zextra)*cosh(zextra) elseif @function1 == 105 zextra = sinh( 1/z ) z = zextra*zextra elseif @function1 == 106 z = sinh(z) * cosh(1/z) elseif @function1 == 107 z = sinh(z) * sinh(1/z) elseif @function1 == 108 z = sin(z) * sinh(z) elseif @function1 == 109 z = sin(z) * cosh(z) elseif @function1 == 110 zextra = sin(z), ztemp = sinh(z) z = ztemp*ztemp*zextra*zextra elseif @function1 == 111 z = sin(z)*exp(z) elseif @function1 == 112 z = cos(z)*exp(z) elseif @function1 == 113 z = sinh(z)*exp(z) elseif @function1 == 114 z = cosh(z)*exp(z) elseif @function1 == 115 z = sin(z)*log(z) elseif @function1 == 116 z = cos(z)*log(z) elseif @function1 == 117 z = sinh(z)*log(z) elseif @function1 == 118 z = cosh(z)*log(z) elseif @function1 == 119 z = exp(-z*z) elseif @function1 == 120 z = exp(1/(z*z)) elseif @function1 == 121 z = exp(-1/(z*z)) endif ; @function1 endif ; @func1app if @summode z = z + zsum zsum = z endif ; @summode if @prodmode if z != (0,0) z = z * zprod zprod = z endif ; z endif ; @prodmode if @matrixmode tempx = @matconst11 * real(z) + @matconst12 * imag(z) tempy = @matconst21 * real(z) + @matconst22 * imag(z) z = tempx + flip(tempy) endif ; @matrixmode if @vectormode z = z + vcreal + flip(vcimag) if @vectperturb seed = random(seed) tempx = @vperturbamt * seed / #randomrange vcreal = vcreal + tempx * vcreal vcimag = vcimag + tempx * vcimag endif ; @vectperturb endif ; @vectormode ztemp = (0,0) if @mode == "static" ; standard Taylor series expansion loopcount = 0 while loopcount < @staticterms zpower[loopcount] = z^exponents[loopcount] ztemp = ztemp + numcoeffs[loopcount] * zpower[loopcount] loopcount = loopcount + 1 endwhile ; loopcount else ; @mode == dynamic; number of terms based on iteration count ; calculate the next term in the series zpower[0] = z^exponent ztemp = numcoeff * zpower[0] ; now update coeffs, factorials, exponents for next iteration ; loop is now the number of the current iteration dcurrentterm = dloop + @firstterm if @coeffnum == "1" numcoeff = (1.0,0) elseif @coeffnum == "n" numcoeff = dcurrentterm elseif @coeffnum == "n+1" numcoeff = dcurrentterm + 1 elseif @coeffnum == "n-1" numcoeff = dcurrentterm - 1 elseif @coeffnum == "kn+m" numcoeff = @nummultiplier * dcurrentterm + @numoffset else if dcurrentterm == 0 numcoeff = 1 else numcoeff = 1/dcurrentterm endif ; dcurrentterm endif ; @coeffnum ; apply any specified function to the numerator coefficient if @coefffunc == "power" numcoeff = numcoeff^@numpower endif ; @coefffunc if @multconst numcoeff = @seriesconst * numcoeff if @constpower == (1,0) numcoeff = @seriesconst * numcoeff elseif @constpower == (0,0) numcoeff = @seriesconst^dcurrentterm * numcoeff elseif @constpower == (-1,0) numcoeff = @seriesconst^(@nummultiplier * dcurrentterm + @numoffset) * numcoeff else ; numcoeff = @seriesconst^@constpower * numcoeff endif ; @constpower endif ; multconst if @altsign if abs(dcurrentterm % 2) == 1 numcoeff = -numcoeff endif ; abs() endif ; @altsign if @zexponent == "n" exponent = dcurrentterm elseif @zexponent == "n+1" exponent = dcurrentterm + 1 elseif @zexponent == "n-1" exponent = dcurrentterm - 1 else ; @zexponent == "kn+m" exponent = @expmultiplier * dcurrentterm + @expoffset endif ; @zexponent ; now calculate the next factorial based on the factorial index and the ; factorial order dtempindex = dcurrentterm % @factorialorder if dtempindex < 0 dtempindex = dtempindex + @factorialorder endif ; dtempindex ; save old index, calculate next index dtempint = lastfactindex[dtempindex] if dfirstset || (dtempint < 1) dtempint = 1 endif ; dtempint lastfactindex[dtempindex] = lastfactindex[dtempindex] + dincrement ; calculate next factorial value if lastfactindex[dtempindex] > 1 if lastfactindex[dtempindex] <= @factorialorder lastfactvalue[dtempindex] = lastfactindex[dtempindex] else dloop2 = lastfactindex[dtempindex] while dloop2 > dtempint lastfactvalue[dtempindex] = lastfactvalue[dtempindex] * dloop2 dloop2 = dloop2 - @factorialorder endwhile ; dloop2 endif ; lastfactindex[] endif ; lastfactindex[] ; compute final coefficient for current term numcoeff = numcoeff/lastfactvalue[dtempindex] ; move on to next term dloop = dloop + 1 if dloop == @factorialorder dfirstset = FALSE ; make sure we don't recalculate each term from beginning endif ; dloop endif ; @mode z = ztemp if (@func1app == "postfunction") || (@func1app == "both") if @function1 == 1 z = z * z elseif @function1 == 2 z = z * z * z elseif @function1 == 3 zextra = z * z z = zextra * zextra elseif @function1 == 4 z = z ^ @f1power elseif @function1 == 5 z = 1/z elseif @function1 == 6 z = sqrt(z) elseif @function1 == 7 z = 1 / ( z * z ) elseif @function1 == 8 z = log(z) elseif @function1 == 9 z = exp( z) elseif @function1 == 10 z = z^z elseif @function1 == 11 z = sin( z ) elseif @function1 == 12 z = cos( z ) elseif @function1 == 13 z = tan( z ) elseif @function1 == 14 z = asin( z ) elseif @function1 == 15 z = acos( z ) elseif @function1 == 16 z = atan( z ) elseif @function1 == 17 z = sinh( z ) elseif @function1 == 18 z = cosh( z ) elseif @function1 == 19 z = tanh( z ) elseif @function1 == 20 z = asinh( z ) elseif @function1 == 21 z = acosh( z ) elseif @function1 == 22 z = atanh( z ) elseif @function1 == 23 z = log( 1/z ) elseif @function1 == 24 z = log( log( z )) elseif @function1 == 25 z = exp( -z ) elseif @function1 == 26 z = exp( 1/z ) elseif @function1 == 27 z = z^(-z) elseif @function1 == 28 zextra = sin( z ) z = zextra * zextra elseif @function1 == 29 zextra = cos( z ) z = zextra * zextra elseif @function1 == 30 zextra = tan( z ) z = zextra * zextra elseif @function1 == 31 z = cotan( z ) elseif @function1 == 32 z = 1/cos( z ) elseif @function1 == 33 z = 1/sin( z ) elseif @function1 == 34 zextra = cotan( z ) z = zextra * zextra elseif @function1 == 35 zextra = 1/cos( z ) z = zextra * zextra elseif @function1 == 36 zextra = 1/sin( z ) z = zextra * zextra elseif @function1 == 37 zextra = z^(z) z = z^zextra elseif @function1 == 38 zextra = z^(z) z = 1/( z^zextra ) elseif @function1 == 39 z = log(-z) elseif @function1 == 40 z = 1/log( z ) elseif @function1 == 41 z = z * log( z ) elseif @function1 == 42 z = sin( z ) / z elseif @function1 == 43 z = cos( z ) / z elseif @function1 == 44 z = sin( z ) * cos( z ) elseif @function1 == 45 z = sin( z^2 ) elseif @function1 == 46 z = exp( -1/z ) elseif @function1 == 47 z = z * exp( z ) elseif @function1 == 48 z = z * exp( -z ) elseif @function1 == 49 z = z * exp( 1/z ) elseif @function1 == 50 z = z * exp( -1/z ) elseif @function1 == 51 z = z * z * z elseif @function1 == 52 z = 1 / ( z * z * z ) elseif @function1 == 53 z = atan( 1 / z ) elseif @function1 == 54 z = acos( 1 / z ) elseif @function1 == 55 z = asin( 1 / z ) elseif @function1 == 56 z = tan( z ) / z elseif @function1 == 57 z = cotan( z ) / z elseif @function1 == 58 z = 1 / ( z * cos( z )) elseif @function1 == 59 z = 1 / ( z * sin( z )) elseif @function1 == 60 z = z * sin( z ) elseif @function1 == 61 z = z * cos( z ) elseif @function1 == 62 z = z * tan( z ) elseif @function1 == 63 z = z * cotan( z ) elseif @function1 == 64 z = z/cos( z ) elseif @function1 == 65 z = z/sin( z ) elseif @function1 == 66 z = sin( 1/z ) elseif @function1 == 67 z = cos( 1/z ) elseif @function1 == 68 z = tan( 1/z ) elseif @function1 == 69 z = cotan( 1/z ) elseif @function1 == 70 z = 1/cos( 1/z ) elseif @function1 == 71 z = 1/sin( 1/z ) elseif @function1 == 72 z = cotanh( z ) elseif @function1 == 73 z = 1/cosh( z ) elseif @function1 == 74 z = 1/sinh( z ) elseif @function1 == 75 z = atanh( 1/z ) elseif @function1 == 76 z = acosh( 1/z ) elseif @function1 == 77 z = asinh( 1/z ) elseif @function1 == 78 z = exp(z*z) elseif @function1 == 79 zextra = sinh(#z) z = zextra * zextra elseif @function1 == 80 zextra = cosh( z ) z = zextra * zextra elseif @function1 == 81 zextra = tanh(z) z = zextra * zextra elseif @function1 == 82 zextra = cotanh( z ) z = zextra * zextra elseif @function1 == 83 zextra = (1,0)/cosh(z) z = zextra * zextra elseif @function1 == 84 zextra = (1,0) / sinh( z ) z = zextra * zextra elseif @function1 == 85 z = sinh(1/z) elseif @function1 == 86 z = cosh(1/z) elseif @function1 == 87 z = tanh(1/z) elseif @function1 == 88 z = cotanh(1/z) elseif @function1 == 89 z = (1,0)/cosh(1/z) elseif @function1 == 90 z = (1,0)/sinh(1/z) elseif @function1 == 91 z = sin( z ) * tan(z) elseif @function1 == 92 z = sinh(z) * tanh(z) elseif @function1 == 93 z = sinh(z) * cosh(z) elseif @function1 == 94 ztemp = sinh(z), zextra = cosh(z) z = ztemp*ztemp*zextra*zextra elseif @function1 == 95 ztemp = sin(z), zextra = cos(z) z = ztemp*ztemp*zextra*zextra elseif @function1 == 96 zextra = 1/z z = sin(zextra)*cos(zextra) elseif @function1 == 97 zextra = sin( 1/z ) z = zextra*zextra elseif @function1 == 98 z = sin(z) * cos(1/z) elseif @function1 == 99 z = sin(z) * sin(1/z) elseif @function1 == 100 zextra = log(z) z = zextra*zextra elseif @function1 == 101 z = sin(z) * sin(2*z) elseif @function1 == 102 z = exp(2*z) elseif @function1 == 103 z = exp(-2*z) elseif @function1 == 104 zextra = 1/z z = sinh(zextra)*cosh(zextra) elseif @function1 == 105 zextra = sinh( 1/z ) z = zextra*zextra elseif @function1 == 106 z = sinh(z) * cosh(1/z) elseif @function1 == 107 z = sinh(z) * sinh(1/z) elseif @function1 == 108 z = sin(z) * sinh(z) elseif @function1 == 109 z = sin(z) * cosh(z) elseif @function1 == 110 zextra = sin(z), ztemp = sinh(z) z = ztemp*ztemp*zextra*zextra elseif @function1 == 111 z = sin(z)*exp(z) elseif @function1 == 112 z = cos(z)*exp(z) elseif @function1 == 113 z = sinh(z)*exp(z) elseif @function1 == 114 z = cosh(z)*exp(z) elseif @function1 == 115 z = sin(z)*log(z) elseif @function1 == 116 z = cos(z)*log(z) elseif @function1 == 117 z = sinh(z)*log(z) elseif @function1 == 118 z = cosh(z)*log(z) elseif @function1 == 119 z = exp(-z*z) elseif @function1 == 120 z = exp(1/(z*z)) elseif @function1 == 121 z = exp(-1/(z*z)) endif ; @function1 endif ; @func1app if @blend z = @weight1*z + @weight2*zorig^@blendpower endif ; @blend if @pmode != 1 z = z + jc endif ; pmode bailout: |z| < @bail default: title = "zFactorial Fun" center = (0,0) maxiter = 100 method = multipass periodicity = 0 magn = 0.75 heading caption = "There is a newer version of this formula" endheading param factorialorder caption = "Factorial Order" default = 1 min = 1 hint = "This value defines how the factorial denominator is defined. 1 = \ normal factorials, 2 = double factorials (2x4x6x... or 1x3x5x...), \ 3 = triple factorials (3x6x9x... or 2x5x8x... or 1x4x7x...), etc. \ Integers >= 1 only" endparam param firstterm caption = "First Term (n)" default = 0 hint = "This value sets the initial value of n, the index for the Taylor \ series. It is used in defining the factorial values, coefficients, \ and z exponents. Integers only" endparam param factorialstart caption = "Factorial Index" enum = "n" "n+1" "n-1" "kn+m" default = 0 hint = "This parameter defines how the factorial index is computed from \ the Taylor series index, 'First Term (n). For 'kn+m', also set \ parameters 'Factorial Multiplier' and 'Factorial Offset' (k and m, \ respectively)" endparam param factmultiplier caption = "Factorial Multiplier k" default = 1 hint = "If param 'Factorial Index' is set to 'kn+m', then this value \ is the multiplier, k. Integers only" visible = @factorialstart == "kn+m" endparam param factoffset caption = "Factorial Offset m" default = 0 hint = "If param 'Factorial Index' is set to 'kn+m', then this value \ is the offset, m. Integers only" visible = @factorialstart == "kn+m" endparam param coeffnum caption = "Coefficient" enum = "1" "n" "n+1" "n-1" "kn+m" "1/n" default = 0 hint = "This parameter defines the coefficient of each term in the series \ (except for the factorial denominator), in terms of the series index, \ n. For 'kn+m', also set params 'Coeff Multiplier' (k) and 'Coeff \ Offset' (m)" endparam param nummultiplier caption = "Coeff Multiplier k" default = (2,0) hint = "If param 'Coefficient' is set to 'kn+m', then this value \ is the multiplier, k. Complex value" visible = (@coeffnum == "kn+m") || (@constpower == (-1,0)) endparam param numoffset caption = "Coeff Offset m" default = (1,0) hint = "If param 'Coefficient' is set to 'kn+m', then this value \ is the offset, m. Complex value" visible = @coeffnum == "kn+m" endparam param coefffunc caption = "Coeff Function" enum = "none" "power" default = 0 hint = "Each term coefficient can be fed to this function. The function \ is executed before optional sign alternation and multiplication by \ a constant are applied" endparam param numpower caption = "Coeff Power" default = (2,0) hint = "If param 'Coeff Function' is set to 'power', then this value is \ used as the exponent. Complex value" visible = @coefffunc == "power" endparam param multconst caption = "Mult Coeff?" default = FALSE hint = "If enabled, then each coefficient term will be multiplied by \ a complex constant value, set by param 'Series Multiplier'. The \ multiplication is done after application of 'Coeff Function'" endparam param seriesconst caption = "Series Multiplier" default = (-1,0) hint = "If 'Mult Coeff?' is enabled, then this value is multiplied \ by each term's coefficient in the series. Complex value. \ This multiplier can optionally be raised to a power by setting \ the exponent param 'Constant Power'" visible = @multconst == TRUE endparam param constpower caption = "Constant Power" default = (1,0) hint = "If 'Mult Coeff' is enabled, then the constant 'Series Multiplier' \ is raised to this power before being multiplied by the series. \ The special value of (0,0) can be used to set the exponent of \ 'Series Multiplier' to 'n', the current series term; the special \ value (-1,0) sets the multiplier exponent to the current value of \ the coeeficient 'kn+m'. Complex value" visible = @multconst == TRUE endparam param zexponent caption = "Exponent Index" enum = "n" "n+1" "n-1" "kn+m" default = 0 hint = "This parameter defines the z exponent of each term in the series, \ in terms of the series index, n. For 'kn+m', also set params 'Exponent \ Multiplier' (k) and 'Exponent Offset' (m)" endparam param expmultiplier caption = "Exp Multiplier k" default = (2,0) hint = "If param 'Exponent Index' is set to 'kn+m', then this value \ is the multiplier, k. Complex value" visible = @zexponent == "kn+m" endparam param expoffset caption = "Exp Offset m" default = (1,0) hint = "If param 'Exponent Index' is set to 'kn+m', then this value \ is the offset, m. Complex value" visible = @zexponent == "kn+m" endparam param mode caption = "Iteration Mode" default = 0 enum = "static" "dynamic" hint = "This parameter determines how the series is iterated. If 'static', \ then each iteration sends the current z to a partial Taylors series \ employing a fixed number of terms, as set by param 'Static Terms'. If \ 'dynamic' is set, then each iteration uses z to compute just a single \ term in the series (the term corresponding to the next n)" endparam param staticterms caption = "Static Terms" default = 8 min = 1 hint = "If param 'Iteration Mode' is set to 'static', then this value \ determines how many terms of the series are used in the iteration. \ Integers >= 1 only" visible = @mode == "static" endparam param altsign caption = "Alternate Terms?" default = TRUE hint = "If enabled, the terms of the Taylor series will alternate in sign; \ otherwise, all terms are of the same sign" endparam param summode caption = "Sumarize?" default = FALSE hint = "Like Dave Makin's 'iterate the sum' option. If enabled, set param \ 'Sumarize Constant'" endparam param sumconst caption = "Sumarize Const" default = (0,0) hint = "Initial constant for 'Sumarize'. Complex value" visible = @summode == TRUE endparam param prodmode caption = "Multiprize?" default = FALSE hint = "Like Dave Makin's 'iterate the product' option. If enabled, set \ param 'Multiprize Constant'" endparam param prodconst caption = "Multiprize Const" default = (1,0) hint = "Initial constant for 'Multiprize'. Complex value" visible = @prodmode == TRUE endparam param matrixmode caption = "Matricize?" default = FALSE hint = "z can be multipled by a general 2x2 matrix before iteration. If \ enabled, set the 4 constants 'Matricize 1,1', 'Matricize 1,2', \ 'Matricize 2,1', and 'Matricize 2,2'" endparam param matconst11 caption = "Matricize 1,1" default = 0.866025403784438646763723170752936 hint = "Row 1, Column 1 constant for 'Matricize'. Float value" visible = @matrixmode == TRUE endparam param matconst12 caption = "Matricize 1,2" default = -0.5 hint = "Row 1, Column 2 constant for 'Matricize'. Float value" visible = @matrixmode == TRUE endparam param matconst21 caption = "Matricize 2,1" default = 0.5 hint = "Row 2, Column 1 constant for 'Matricize'. Float value" visible = @matrixmode == TRUE endparam param matconst22 caption = "Matricize 2,2" default = 0.866025403784438646763723170752936 hint = "Row 2, Column 2 constant for 'Matricize'. Float value" visible = @matrixmode == TRUE endparam param vectormode caption = "Vectorize?" default = FALSE hint = "z can be translated by a general 2D vector before iteration. If \ enabled, set param 'Vectorize Const'" endparam param vectconst caption = "Vectorize Constant" default = (1,-1) hint = "X- (real) and Y- (imag) components of initial constant for \ 'Vectorrize'. Complex value" visible = @vectormode == TRUE endparam param vectperturb caption = "Perturb Vector?" default = FALSE hint = "If enabled, then each iteration the value of 'Vectorize Constant' \ is modified based on the value of param 'Perturb Strength'" visible = @vectormode == TRUE endparam param vperturbamt caption = "Perturb Strength" default = 0.1 hint = "If 'Perturb Vector' is enabled, this value is the amount of \ perturbation each iteration. Float value" visible = @vectperturb == TRUE endparam param randseed caption = "Random Seed" default = 1111 hint = "If 'Perturb Vector' is enabled, this number initializes the \ random number generator. Integers only" visible = @vectperturb == TRUE endparam param func1app caption = "Function 1 Usage" default = 0 enum = "none" "prefunction" "postfunction" "both" hint = "Function 1 can be applied at various stages of the calculation, \ depending upon this setting. 'prefunction' means z is fed to \ Function 1 each iteration before other options are applied; \ 'postfunction' means the function is applied to the new z at the \ end of each iteration; and 'argument' means that Function 1 is applied \ to the modified z before being fed to the Taylor series" endparam param function1 caption = "Function 1" enum = "z" "z^2" "z^3" "z^4" "z^power" \ "1/z" "sqrt(z)" "1/z^2" "log(z)" "e^z" \ "z^z" "sin(z)" "cos(z)" "tan(z)" "asin(z)" \ "acos(z)" "atan(z)" "sinh(z)" "cosh(z)" "tanh(z)" \ "asinh(z)" "acosh(z)" "atanh(z)" "log(1/z)" "log(log(z))" \ "e^-z" "e^(1/z)" "z^-z" "sin(z)^2" "cos(z)^2" \ "tan(z)^2" "cot(z)" "sec(z)" "csc(z)" "cot(z)^2" \ "sec(z)^2" "csc(z)^2" "z^z^z" "1/z^z^z" "log(-z)" \ "1/log(z)" "zlog(z)" "sin(z)/z" "cos(z)/z" "sin(z)*cos(z)" \ "sin(z^2)" "e^(-1/z)" "ze^z" "ze^-z" "ze^(1/z)" \ "ze^(-1/z)" "z^3" "1/z^3" "acot(z)" "asec(z)" \ "acsc(z)" "tan(z)/z" "cot(z)/z" "sec(z)/z" "csc(z)/z" \ "zsin(z)" "zcos(z)" "ztan(z)" "zcot(z)" "zsec(z)" \ "zcsc(z)" "sin(1/z)" "cos(1/z)" "tan(1/z)" "cot(1/z)" \ "sec(1/z)" "csc(1/z)" "cotanh(z)" "sech(z)" "cosech(z)" \ "acoth(z)" "asech(z)" "acosech(z)" "e^(z^2)" "sinh(z)^2" \ "cosh(z)^2" "tanh(z)^2" "cotanh(z)^2" "sech(z)^2" "cosech(z)^2" \ "sinh(1/z)" "cosh(1/z)" "tanh(1/z)" "cotanh(1/z)" "sech(1/z)" \ "cosech(1/z)" "sin(z)tan(z)" "sinh(z)tanh(z)" "sinh(z)cosh(z)" \ "sinh(z)^2*cosh(z)^2" \ "sin(z)^2*cos(z)^2" "sin(1/z)*cos(1/z)" "sin(1/z)^2" "sin(z)cos(1/z)" \ "sin(z)sin(1/z)" \ "log(z)^2" "sin(z)sin(2z)" "e^2z" "e^-2z" "sinh(1/z)cosh(1/z)" \ "sinh(1/z)^2" "sinh(z)cosh(1/z)" "sinh(z)sinh(1/z)" "sin(z)sinh(z)" \ "sin(z)cosh(z)" \ "sin(z)^2*sinh(z)^2" "sin(z)e^z" "cos(z)e^z" "sinh(z)e^z" "cosh(z)e^z" \ "sin(z)log(z)" "cos(z)log(z)" "sinh(z)log(z)" "cosh(z)log(z)" \ "e^(-z^2)" \ "e^(1/z^2)" "e^(-1/z^2)" default = 0 hint = "This function is applied in the manner specified by param \ 'Function 1 Usage'" visible = @func1app != "none" endparam param f1power caption = "Func 1 Power" default = (5,0) hint = "This is the power used if param 'Function 1' is set to 'z^power'. \ Complex value" visible = @function1 == "z^power" endparam param pixelformula caption = "Pixel Formula" enum = "p" "p^2" "p^3" "p^4" "p^power" "1/p" "sqrt(p)" "1/p^2" "log(p)" "e^p" \ "p^p" "sin(p)" "cos(p)" \ "tan(p)" "asin(p)" "acos(p)" "atan(p)" "sinh(p)" "cosh(p)" "tanh(p)" \ "asinh(p)" "acosh(p)" "atanh(p)" "log(1/p)" "log(log(p))" "e^-p" \ "e^(1/p)" "p^-p" "sin(p)^2" "cos(p)^2" "tan(p)^2" "cot(p)" "sec(p)" \ "csc(p)" "cot(p)^2" "sec(p)^2" "csc(p)^2" "p^p^p" "1/p^p^p" "log(-p)" \ "1/log(p)" "plog(p)" "sin(p)/p" "cos(p)/p" "sin(p)*cos(p)" "sin(p^2)" \ "e^(-1/p)" "pe^p" "pe^-p" "pe^(1/p)" "pe^(-1/p)" "p^3" "1/p^3" \ "acot(p)" "asec(p)" "acsc(p)" "tan(p)/p" "cot(p)/p" "sec(p)/p" \ "csc(p)/p" "psin(p)" "pcos(p)" "ptan(p)" "pcot(p)" "psec(p)" "pcsc(p)" \ "sin(1/p)" "cos(1/p)" "tan(1/p)" "cot(1/p)" "sec(1/p)" "csc(1/p)" \ "cotanh(p)" "sech(p)" "cosech(p)" "acoth(p)" "asech(p)" "acosech(p)" \ "3-term polynomial" "sinh(p)^2" "cosh(p)^2" "tanh(p)^2" "cotanh(p)^2" \ "sech(p)^2" "cosech(p)^2" "sinh(1/p)" "cosh(1/p)" "tanh(1/p)" \ "cotanh(1/p)" "sech(1/p)" "cosech(1/p)" "sin(p)tan(p)" "sinh(p)tanh(p)" \ "sinh(p)cosh(p)" "sinh(p)^2*cosh(p)^2" "sin(p)^2*cos(p)^2" \ "sin(1/p)*cos(1/p)" "sin(1/p)^2" "sin(p)cos(1/p)" "sin(p)sin(1/p)" \ "log(p)^2" "sin(p)sin(2p)" "e^2p" "e^-2p" "sinh(1/p)cosh(1/p)" \ "sinh(1/p)^2" "sinh(p)cosh(1/p)" "sinh(p)sinh(1/p)" "sin(p)sinh(p)" \ "sin(p)cosh(p)" "sin(p)^2*sinh(p)^2" "sin(p)e^p" "cos(p)e^p" \ "sinh(p)e^p" "cosh(p)e^p" "sin(p)log(p)" "cos(p)log(p)" "sinh(p)log(p)" \ "cosh(p)log(p)" default = 0 hint = "Pixel value (Mand) or seed (Julia) can be initialized \ before iterating. For 'p^power', set parameter 'Pixel Power'; \ for '3-term polynomial', set 'Coeff Pa', 'Exponent Pa', 'Coeff Pb', \ 'Exponent Pb', 'Coeff Pc', 'Exponent Pc'. 'p' results in normal \ initialization" endparam param ppower caption = "Pixel Power" default = (5,0) hint = "This is the power used if param 'Pixel Formula' is set to 'p^power'. \ Complex value" visible = @pixelformula == "p^power" endparam param coeffpa caption = "Coeff Pa" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the \ coefficient of the 1st term. Complex value" visible = @pixelformula == "3-term polynomial" endparam param exponentpa caption = "Exponent Pa" default = (6,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 1st term. Complex value" visible = @pixelformula == "3-term polynomial" endparam param coeffpb caption = "Coeff Pb" default = (-1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the \ coefficient of the 2nd term. Complex value" visible = @pixelformula == "3-term polynomial" endparam param exponentpb caption = "Exponent Pb" default = (4,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 2nd term. Complex value" visible = @pixelformula == "3-term polynomial" endparam param coeffpc caption = "Coeff Pc" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the \ coefficient of the 3rd term. Complex value" visible = @pixelformula == "3-term polynomial" endparam param exponentpc caption = "Exponent Pc" default = (2,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 3rd term. Complex value" visible = @pixelformula == "3-term polynomial" endparam param blend caption = "Blend Z^Power" default = FALSE hint = "If true, then the factorial function is blended with a normal \ z^powerMandelbrot/Julia, z = c1*factorial(z) + c2*z^power. Set the \ weight coefficients c1 & c2 with params 'Factorial Weight' and 'Z^Power \ Weight'. The exponent is set with param 'Blend Power'" endparam param weight1 caption = "Factorial Weight" default = -0.1 hint = "If 'Blend Z^Power' is enabled (TRUE), then this coefficient sets the \ relative proportion of the factorial function that is blended \ with z^power each iteration to obtain the final z" endparam param weight2 caption = "Z^Power Weight" default = 1.0 hint = "If 'Blend Z^Power' is enabled (TRUE), then this coefficient sets the \ relative proportion of the z^power function that is blended \ with the factorial function each iteration to obtain the final z" endparam param blendpower caption = "Blend Power" default = (2,0) hint = "If 'Blend Z^Power' is enabled (TRUE), then this parameter sets the \ exponent for the z^power function (i.e., this is the power)" endparam param pmode caption = "Pixel Mode" default = 0 enum = "Post-add" "Pre-add" "Both" hint = "If 'Post-add', the formula is executed, then pixel/constant is added \ to the result (normal Mandelbrot/Julia behavior); if 'Pre-add', then \ the pixel/constant is added to z before any formulas are executed. \ 'Both' results in a pixel/constant addition, formula execution, then \ another pixel/constant addition to the result each iteration" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types. Complex value" endparam param bail caption = "Bailout Value" default = 1024.0 hint = "Value needed to 'escape' to infinity. Float value" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" endparam switch: type = "jam-factorials" jconstant = #pixel factorialorder = factorialorder firstterm = firstterm factorialstart = factorialstart factmultiplier = factmultiplier factoffset = factoffset coeffnum = coeffnum nummultiplier = nummultiplier numoffset = numoffset coefffunc = coefffunc numpower = numpower multconst = multconst constpower = constpower seriesconst = seriesconst zexponent = zexponent expmultiplier = expmultiplier expoffset = expoffset mode = mode staticterms = staticterms altsign = altsign summode = summode sumconst = sumconst prodmode = prodmode prodconst = prodconst matrixmode = matrixmode matconst11 = matconst11 matconst12 = matconst12 matconst21 = matconst21 matconst22 = matconst22 vectormode = vectormode vectconst = vectconst vectperturb = vectperturb vperturbamt = vperturbamt randseed = randseed func1app = func1app function1 = function1 f1power = f1power bail = bail pixelformula = pixelformula ppower = ppower coeffpa = coeffpa exponentpa = exponentpa coeffpb = coeffpb exponentpb = exponentpb coeffpc = coeffpc exponentpc = exponentpc blend = blend weight1 = weight1 weight2 = weight2 blendpower = blendpower pmode = pmode mandy = julia julia = mandy } jam-hypergeometricPFQ { ; jam 030309 ; Mandelbrot/Julia based on the generalized hypergeometric function pFq, ; pFq(a1,a2,...,ap;b1,b2,...,bq;z) = 1 + (a1*a2*...*ap/(b1*b2*...*bq*1!))z + ; (a1*[a1+1]*a2*[a2+2]*...*ap*[ap+1]/(b1*[b1+1]*b2*[b2+1]*...*bq*[bq+1]*2!))z^2 ; + ... ; The function is implemented either as a static, 11-term series expansion about ; z=0, or using an indefinite number of terms based on the current iteration ; count; z argument may be modified before passage to the hypergeometric ; function, and the HG function may also be multiplied by 1 or 2 other functions. ; Thanks to Dave Makin for comments and testing, and particularly for ideas ; relating to the dynamic iteration method. ; Contact Joe Maddry (maddry@sri.org) with comments/questions. Enjoy! init: if @mandy z = @jconstant, jc = #pixel else ; Julia z = #pixel, jc = @jconstant endif complex zextra = complex ztemp = (0,0) ; temp/spare scratch variables complex zarg = complex zpre1 = complex zpre2 = (0,0) ; declare vars for powers of z complex z2 = complex z3 = complex z4 = complex z5 = complex z6 = (0,0) complex z7 = complex z8 = complex z9 = (0,0) ; compute coefficients for series ; start with the numerator and denominator input parameters (the a's & b's) complex a1_1 = @a1, complex a2_1 = @a2, complex a3_1 = @a3, complex a4_1 = @a4 complex b1_1 = @b1, complex b2_1 = @b2, complex b3_1 = @b3, complex b4_1 = @b4 complex a5_1 = @a5, complex b5_1 = @b5 ; initialize all the other variables, to eliminate annoying warning messages complex a1_2 = complex a1_3 = complex a1_4 = complex a1_5 = (0,0) complex a1_6 = complex a1_7 = complex a1_8 = complex a1_9 = complex a1_10 = (0,0) complex a2_2 = complex a2_3 = complex a2_4 = complex a2_5 = (0,0) complex a2_6 = complex a2_7 = complex a2_8 = complex a2_9 = complex a2_10 = (0,0) complex a3_2 = complex a3_3 = complex a3_4 = complex a3_5 = (0,0) complex a3_6 = complex a3_7 = complex a3_8 = complex a3_9 = complex a3_10 = (0,0) complex a4_2 = complex a4_3 = complex a4_4 = complex a4_5 = (0,0) complex a4_6 = complex a4_7 = complex a4_8 = complex a4_9 = complex a4_10 = (0,0) complex a5_2 = complex a5_3 = complex a5_4 = complex a5_5 = (0,0) complex a5_6 = complex a5_7 = complex a5_8 = complex a5_9 = complex a5_10 = (0,0) complex b1_2 = complex b1_3 = complex b1_4 = complex b1_5 = (0,0) complex b1_6 = complex b1_7 = complex b1_8 = complex b1_9 = complex b1_10 = (0,0) complex b2_2 = complex b2_3 = complex b2_4 = complex b2_5 = (0,0) complex b2_6 = complex b2_7 = complex b2_8 = complex b2_9 = complex b2_10 = (0,0) complex b3_2 = complex b3_3 = complex b3_4 = complex b3_5 = (0,0) complex b3_6 = complex b3_7 = complex b3_8 = complex b3_9 = complex b3_10 = (0,0) complex b4_2 = complex b4_3 = complex b4_4 = complex b4_5 = (0,0) complex b4_6 = complex b4_7 = complex b4_8 = complex b4_9 = complex b4_10 = (0,0) complex b5_2 = complex b5_3 = complex b5_4 = complex b5_5 = (0,0) complex b5_6 = complex b5_7 = complex b5_8 = complex b5_9 = complex b5_10 = (0,0) complex coeff0 = complex coeff1 = (1,0) complex coeff2 = complex coeff3 = (1,0) complex coeff4 = complex coeff5 = (1,0) complex coeff6 = complex coeff7 = (1,0) complex coeff8 = complex coeff9 = (1,0) complex coeff10 = (1,0) complex numerator1 = complex numerator2 = complex numerator3 = (1,0) complex numerator4 = complex numerator5 = complex numerator6 = (1,0) complex numerator7 = complex numerator8 = complex numerator9 = (1,0) complex numerator10 = (1,0) int iter = -1, float sign = 1.0 if @static ; using 11-term Taylor series expansion ; now define the coefficient numerator constants if @p == 0 ; nothing more to do to the numerator coeff0 = coeff0 ; but we have to do something to avoid a UF error else ; p must be at least 1 a1_2 = a1_1+@ca1, a1_3 = a1_2+@ca1 a1_4 = a1_3+@ca1, a1_5 = a1_4+@ca1, a1_6 = a1_5+@ca1 a1_7 = a1_6+@ca1, a1_8 = a1_7+@ca1, a1_9 = a1_8+@ca1 a1_10 = a1_9+@ca1 if @p > 1 ; p must be at least 2 a2_2 = a2_1+@ca2, a2_3 = a2_2+@ca2 a2_4 = a2_3+@ca2, a2_5 = a2_4+@ca2, a2_6 = a2_5+@ca2 a2_7 = a2_6+@ca2, a2_8 = a2_7+@ca2, a2_9 = a2_8+@ca2 a2_10 = a2_9+@ca2 endif ; @p if @p > 2 ; p must be at least 3 a3_2 = a3_1+@ca3, a3_3 = a3_2+@ca3 a3_4 = a3_3+@ca3, a3_5 = a3_4+@ca3, a3_6 = a3_5+@ca3 a3_7 = a3_6+@ca3, a3_8 = a3_7+@ca3, a3_9 = a3_8+@ca3 a3_10 = a3_9+@ca3 endif ; @p if @p > 3 ; p must be at least 4 a4_2 = a4_1+@ca4, a4_3 = a4_2+@ca4 a4_4 = a4_3+@ca4, a4_5 = a4_4+@ca4, a4_6 = a4_5+@ca4 a4_7 = a4_6+@ca4, a4_8 = a4_7+@ca4, a4_9 = a4_8+@ca4 a4_10 = a4_9+@ca4 endif ; @p if @p > 4 ; p must be at least 5 a5_2 = a5_1+@ca5, a5_3 = a5_2+@ca5 a5_4 = a5_3+@ca5, a5_5 = a5_4+@ca5, a5_6 = a5_5+@ca5 a5_7 = a5_6+@ca5, a5_8 = a5_7+@ca5, a5_9 = a5_8+@ca5 a5_10 = a5_9+@ca5 endif ; @p endif ; @p ; define the coefficient denominator constants if @q == 0 ; nothing more to do to the denominator coeff0 = coeff0 ; but we have to do something to avoid a UF error else ; q must be at least 1 b1_2 = b1_1+@cb1, b1_3 = b1_2+@cb1 b1_4 = b1_3+@cb1, b1_5 = b1_4+@cb1, b1_6 = b1_5+@cb1 b1_7 = b1_6+@cb1, b1_8 = b1_7+@cb1, b1_9 = b1_8+@cb1 b1_10 = b1_9+@cb1 if @q > 1 ; q must be at least 2 b2_2 = b2_1+@cb2, b2_3 = b2_2+@cb2 b2_4 = b2_3+@cb2, b2_5 = b2_4+@cb2, b2_6 = b2_5+@cb2 b2_7 = b2_6+@cb2, b2_8 = b2_7+@cb2, b2_9 = b2_8+@cb2 b2_10 = b2_9+@cb2 endif ; @q if @q > 2 ; q must be at least 3 b3_2 = b3_1+@cb3, b3_3 = b3_2+@cb3 b3_4 = b3_3+@cb3, b3_5 = b3_4+@cb3, b3_6 = b3_5+@cb3 b3_7 = b3_6+@cb3, b3_8 = b3_7+@cb3, b3_9 = b3_8+@cb3 b3_10 = b3_9+@cb3 endif ; @q if @q > 3 ; q must be at least 4 b4_2 = b4_1+@cb4, b4_3 = b4_2+@cb4 b4_4 = b4_3+@cb4, b4_5 = b4_4+@cb4, b4_6 = b4_5+@cb4 b4_7 = b4_6+@cb4, b4_8 = b4_7+@cb4, b4_9 = b4_8+@cb4 b4_10 = b4_9+@cb4 endif ; @q if @q > 4 ; q must be at least 5 b5_2 = b5_1+@cb5, b5_3 = b5_2+@cb5 b5_4 = b5_3+@cb5, b5_5 = b5_4+@cb5, b5_6 = b5_5+@cb5 b5_7 = b5_6+@cb5, b5_8 = b5_7+@cb5, b5_9 = b5_8+@cb5 b5_10 = b5_9+@cb5 endif ; @q endif ; @q ; now put them all together, in the process converting the factorials to their ; reciprocals. We are doing it the long way, to minimize the number of divisions if @q == 1 coeff1 = coeff0*b1_1 coeff2 = coeff1*b1_2 coeff3 = coeff2*b1_3 coeff4 = coeff3*b1_4 coeff5 = coeff4*b1_5 coeff6 = coeff5*b1_6 coeff7 = coeff6*b1_7 coeff8 = coeff7*b1_8 coeff9 = coeff8*b1_9 coeff10 = coeff9*b1_10 elseif @q == 2 coeff1 = coeff0*b1_1*b2_1 coeff2 = coeff1*b1_2*b2_2 coeff3 = coeff2*b1_3*b2_3 coeff4 = coeff3*b1_4*b2_4 coeff5 = coeff4*b1_5*b2_5 coeff6 = coeff5*b1_6*b2_6 coeff7 = coeff6*b1_7*b2_7 coeff8 = coeff7*b1_8*b2_8 coeff9 = coeff8*b1_9*b2_9 coeff10 = coeff9*b1_10*b2_10 elseif @q == 3 coeff1 = coeff0*b1_1*b2_1*b3_1 coeff2 = coeff1*b1_2*b2_2*b3_2 coeff3 = coeff2*b1_3*b2_3*b3_3 coeff4 = coeff3*b1_4*b2_4*b3_4 coeff5 = coeff4*b1_5*b2_5*b3_5 coeff6 = coeff5*b1_6*b2_6*b3_6 coeff7 = coeff6*b1_7*b2_7*b3_7 coeff8 = coeff7*b1_8*b2_8*b3_8 coeff9 = coeff8*b1_9*b2_9*b3_9 coeff10 = coeff9*b1_10*b2_10*b3_10 elseif @q == 4 coeff1 = coeff0*b1_1*b2_1*b3_1*b4_1 coeff2 = coeff1*b1_2*b2_2*b3_2*b4_2 coeff3 = coeff2*b1_3*b2_3*b3_3*b4_3 coeff4 = coeff3*b1_4*b2_4*b3_4*b4_4 coeff5 = coeff4*b1_5*b2_5*b3_5*b4_5 coeff6 = coeff5*b1_6*b2_6*b3_6*b4_6 coeff7 = coeff6*b1_7*b2_7*b3_7*b4_7 coeff8 = coeff7*b1_8*b2_8*b3_8*b4_8 coeff9 = coeff8*b1_9*b2_9*b3_9*b4_9 coeff10 = coeff9*b1_10*b2_10*b3_10*b4_10 elseif @q == 5 coeff1 = coeff0*b1_1*b2_1*b3_1*b4_1*b5_1 coeff2 = coeff1*b1_2*b2_2*b3_2*b4_2*b5_2 coeff3 = coeff2*b1_3*b2_3*b3_3*b4_3*b5_3 coeff4 = coeff3*b1_4*b2_4*b3_4*b4_4*b5_4 coeff5 = coeff4*b1_5*b2_5*b3_5*b4_5*b5_5 coeff6 = coeff5*b1_6*b2_6*b3_6*b4_6*b5_6 coeff7 = coeff6*b1_7*b2_7*b3_7*b4_7*b5_7 coeff8 = coeff7*b1_8*b2_8*b3_8*b4_8*b5_8 coeff9 = coeff8*b1_9*b2_9*b3_9*b4_9*b5_9 coeff10 = coeff9*b1_10*b2_10*b3_10*b4_10*b5_10 endif ; @q if @p == 1 numerator1 = a1_1 numerator2 = a1_2*numerator1 numerator3 = a1_3*numerator2 numerator4 = a1_4*numerator3 numerator5 = a1_5*numerator4 numerator6 = a1_6*numerator5 numerator7 = a1_7*numerator6 numerator8 = a1_8*numerator7 numerator9 = a1_9*numerator8 numerator10 = a1_10*numerator9 elseif @p == 2 numerator1 = a1_1*a2_1 numerator2 = a1_2*a2_2*numerator1 numerator3 = a1_3*a2_3*numerator2 numerator4 = a1_4*a2_4*numerator3 numerator5 = a1_5*a2_5*numerator4 numerator6 = a1_6*a2_6*numerator5 numerator7 = a1_7*a2_7*numerator6 numerator8 = a1_8*a2_8*numerator7 numerator9 = a1_9*a2_9*numerator8 numerator10 = a1_10*a2_10*numerator9 elseif @p == 3 numerator1 = a1_1*a2_1*a3_1 numerator2 = a1_2*a2_2*a3_2*numerator1 numerator3 = a1_3*a2_3*a3_3*numerator2 numerator4 = a1_4*a2_4*a3_4*numerator3 numerator5 = a1_5*a2_5*a3_5*numerator4 numerator6 = a1_6*a2_6*a3_6*numerator5 numerator7 = a1_7*a2_7*a3_7*numerator6 numerator8 = a1_8*a2_8*a3_8*numerator7 numerator9 = a1_9*a2_9*a3_9*numerator8 numerator10 = a1_10*a2_10*a3_10*numerator9 elseif @p == 4 numerator1 = a1_1*a2_1*a3_1*a4_1 numerator2 = a1_2*a2_2*a3_2*a4_2*numerator1 numerator3 = a1_3*a2_3*a3_3*a4_3*numerator2 numerator4 = a1_4*a2_4*a3_4*a4_4*numerator3 numerator5 = a1_5*a2_5*a3_5*a4_5*numerator4 numerator6 = a1_6*a2_6*a3_6*a4_6*numerator5 numerator7 = a1_7*a2_7*a3_7*a4_7*numerator6 numerator8 = a1_8*a2_8*a3_8*a4_8*numerator7 numerator9 = a1_9*a2_9*a3_9*a4_9*numerator8 numerator10 = a1_10*a2_10*a3_10*a4_10*numerator9 elseif @p == 5 numerator1 = a1_1*a2_1*a3_1*a4_1*a5_1 numerator2 = a1_2*a2_2*a3_2*a4_2*a5_2*numerator1 numerator3 = a1_3*a2_3*a3_3*a4_3*a5_3*numerator2 numerator4 = a1_4*a2_4*a3_4*a4_4*a5_4*numerator3 numerator5 = a1_5*a2_5*a3_5*a4_5*a5_5*numerator4 numerator6 = a1_6*a2_6*a3_6*a4_6*a5_6*numerator5 numerator7 = a1_7*a2_7*a3_7*a4_7*a5_7*numerator6 numerator8 = a1_8*a2_8*a3_8*a4_8*a5_8*numerator7 numerator9 = a1_9*a2_9*a3_9*a4_9*a5_9*numerator8 numerator10 = a1_10*a2_10*a3_10*a4_10*a5_10*numerator9 endif ; @p coeff1 = numerator1/coeff1 coeff2 = numerator2/(2*coeff2) coeff3 = numerator3/(6*coeff3) coeff4 = numerator4/(24*coeff4) coeff5 = numerator5/(120*coeff5) coeff6 = numerator6/(720*coeff6) coeff7 = numerator7/(5040*coeff7) coeff8 = numerator8/(40320*coeff8) coeff9 = numerator9/(362880*coeff9) coeff10 = numerator10/(3628800*coeff10) endif ; @static ; Pixel/constant initialization section if @pixelformula != 0 if @pixelformula == 1 jc = jc * jc elseif @pixelformula == 2 jc = jc * jc * jc elseif @pixelformula == 3 zextra = jc * jc jc = zextra * zextra elseif @pixelformula == 4 jc = jc ^ @ppower elseif @pixelformula == 5 jc = 1/jc elseif @pixelformula == 6 jc = sqrt(jc) elseif @pixelformula == 7 jc = 1 / ( jc * jc ) elseif @pixelformula == 8 jc = log(jc) elseif @pixelformula == 9 jc = exp( jc) elseif @pixelformula == 10 jc = jc^jc elseif @pixelformula == 11 jc = sin( jc ) elseif @pixelformula == 12 jc = cos( jc ) elseif @pixelformula == 13 jc = tan( jc ) elseif @pixelformula == 14 jc = asin( jc ) elseif @pixelformula == 15 jc = acos( jc ) elseif @pixelformula == 16 jc = atan( jc ) elseif @pixelformula == 17 jc = sinh( jc ) elseif @pixelformula == 18 jc = cosh( jc ) elseif @pixelformula == 19 jc = tanh( jc ) elseif @pixelformula == 20 jc = asinh( jc ) elseif @pixelformula == 21 jc = acosh( jc ) elseif @pixelformula == 22 jc = atanh( jc ) elseif @pixelformula == 23 jc = log( 1/jc ) elseif @pixelformula == 24 jc = log( log( jc )) elseif @pixelformula == 25 jc = exp( -jc ) elseif @pixelformula == 26 jc = exp( 1/jc ) elseif @pixelformula == 27 jc = jc^(-jc) elseif @pixelformula == 28 zextra = sin( jc ) jc = zextra * zextra elseif @pixelformula == 29 zextra = cos( jc ) jc = zextra * zextra elseif @pixelformula == 30 zextra = tan( jc ) jc = zextra * zextra elseif @pixelformula == 31 jc = cotan( jc ) elseif @pixelformula == 32 jc = 1/cos( jc ) elseif @pixelformula == 33 jc = 1/sin( jc ) elseif @pixelformula == 34 zextra = cotan( jc ) jc = zextra * zextra elseif @pixelformula == 35 zextra = 1/cos( jc ) jc = zextra * zextra elseif @pixelformula == 36 zextra = 1/sin( jc ) jc = zextra * zextra elseif @pixelformula == 37 zextra = jc^(jc) jc = jc^zextra elseif @pixelformula == 38 zextra = jc^(jc) jc = 1/( jc^zextra ) elseif @pixelformula == 39 jc = log(-jc) elseif @pixelformula == 40 jc = 1/log( jc ) elseif @pixelformula == 41 jc = jc * log( jc ) elseif @pixelformula == 42 jc = sin( jc ) / jc elseif @pixelformula == 43 jc = cos( jc ) / jc elseif @pixelformula == 44 jc = sin( jc ) * cos( jc ) elseif @pixelformula == 45 jc = sin( jc^2 ) elseif @pixelformula == 46 jc = exp( -1/jc ) elseif @pixelformula == 47 jc = jc * exp( jc ) elseif @pixelformula == 48 jc = jc * exp( -jc ) elseif @pixelformula == 49 jc = jc * exp( 1/jc ) elseif @pixelformula == 50 jc = jc * exp( -1/jc ) elseif @pixelformula == 51 jc = jc * jc * jc elseif @pixelformula == 52 jc = 1 / ( jc * jc * jc ) elseif @pixelformula == 53 jc = atan( 1 / jc ) elseif @pixelformula == 54 jc = acos( 1 / jc ) elseif @pixelformula == 55 jc = asin( 1 / jc ) elseif @pixelformula == 56 jc = tan( jc ) / jc elseif @pixelformula == 57 jc = cotan( jc ) / jc elseif @pixelformula == 58 jc = 1 / ( jc * cos( jc )) elseif @pixelformula == 59 jc = 1 / ( jc * sin( jc )) elseif @pixelformula == 60 jc = jc * sin( jc ) elseif @pixelformula == 61 jc = jc * cos( jc ) elseif @pixelformula == 62 jc = jc * tan( jc ) elseif @pixelformula == 63 jc = jc * cotan( jc ) elseif @pixelformula == 64 jc = jc/cos( jc ) elseif @pixelformula == 65 jc = jc/sin( jc ) elseif @pixelformula == 66 jc = sin( 1/jc ) elseif @pixelformula == 67 jc = cos( 1/jc ) elseif @pixelformula == 68 jc = tan( 1/jc ) elseif @pixelformula == 69 jc = cotan( 1/jc ) elseif @pixelformula == 70 jc = 1/cos( 1/jc ) elseif @pixelformula == 71 jc = 1/sin( 1/jc ) elseif @pixelformula == 72 jc = cotanh( jc ) elseif @pixelformula == 73 jc = 1/cosh( jc ) elseif @pixelformula == 74 jc = 1/sinh( jc ) elseif @pixelformula == 75 jc = atanh( 1/jc ) elseif @pixelformula == 76 jc = acosh( 1/jc ) elseif @pixelformula == 77 jc = asinh( 1/jc ) elseif @pixelformula == 78 jc = @coeffpa * jc^@exponentpa + @coeffpb * jc^@exponentpb + \ @coeffpc * jc^@exponentpc elseif @pixelformula == 79 zextra = sinh(#z) jc = zextra * zextra elseif @pixelformula == 80 zextra = cosh( jc ) jc = zextra * zextra elseif @pixelformula == 81 zextra = tanh(jc) jc = zextra * zextra elseif @pixelformula == 82 zextra = cotanh( jc ) jc = zextra * zextra elseif @pixelformula == 83 zextra = (1,0)/cosh(jc) jc = zextra * zextra elseif @pixelformula == 84 zextra = (1,0) / sinh( jc ) jc = zextra * zextra elseif @pixelformula == 85 jc = sinh(1/jc) elseif @pixelformula == 86 jc = cosh(1/jc) elseif @pixelformula == 87 jc = tanh(1/jc) elseif @pixelformula == 88 jc = cotanh(1/jc) elseif @pixelformula == 89 jc = (1,0)/cosh(1/jc) elseif @pixelformula == 90 jc = (1,0)/sinh(1/jc) elseif @pixelformula == 91 jc = sin( jc ) * tan(jc) elseif @pixelformula == 92 jc = sinh(jc) * tanh(jc) elseif @pixelformula == 93 jc = sinh(jc) * cosh(jc) elseif @pixelformula == 94 ztemp = sinh(jc), zextra = cosh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 95 ztemp = sin(jc), zextra = cos(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 96 zextra = 1/jc jc = sin(zextra)*cos(zextra) elseif @pixelformula == 97 zextra = sin( 1/jc ) jc = zextra*zextra elseif @pixelformula == 98 jc = sin(jc) * cos(1/jc) elseif @pixelformula == 99 jc = sin(jc) * sin(1/jc) elseif @pixelformula == 100 zextra = log(jc) jc = zextra*zextra elseif @pixelformula == 101 jc = sin(jc) * sin(2*jc) elseif @pixelformula == 102 jc = exp(2*jc) elseif @pixelformula == 103 jc = exp(-2*jc) elseif @pixelformula == 104 zextra = 1/jc jc = sinh(zextra)*cosh(zextra) elseif @pixelformula == 105 zextra = sinh( 1/jc ) jc = zextra*zextra elseif @pixelformula == 106 jc = sinh(jc) * cosh(1/jc) elseif @pixelformula == 107 jc = sinh(jc) * sinh(1/jc) elseif @pixelformula == 108 jc = sin(jc) * sinh(jc) elseif @pixelformula == 109 jc = sin(jc) * cosh(jc) elseif @pixelformula == 110 zextra = sin(jc), ztemp = sinh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 111 jc = sin(jc)*exp(jc) elseif @pixelformula == 112 jc = cos(jc)*exp(jc) elseif @pixelformula == 113 jc = sinh(jc)*exp(jc) elseif @pixelformula == 114 jc = cosh(jc)*exp(jc) elseif @pixelformula == 115 jc = sin(jc)*log(jc) elseif @pixelformula == 116 jc = cos(jc)*log(jc) elseif @pixelformula == 117 jc = sinh(jc)*log(jc) else ; @pixelformula == 118 jc = cosh(jc)*log(jc) endif ; @pixelformula = 1 endif ; @pixelformula != 0 loop: if @pmode != 0 z = z + jc endif ; pmode ; Execute PF1 if @pre1multiplier != (1,0) zpre1 = @pre1multiplier*z else zpre1 = z endif ; @pre1multiplier if @prefunc1 == 0 zpre1 = (1,0) elseif @prefunc1 == 2 zpre1 = 1/zpre1 elseif @prefunc1 == 3 zpre1 = zpre1*zpre1 elseif @prefunc1 == 4 zpre1 = zpre1^@pre1power elseif @prefunc1 == 5 zpre1 = exp(zpre1) elseif @prefunc1 == 6 zpre1 = exp(-zpre1) elseif @prefunc1 == 7 zpre1 = exp(zpre1^@pre1power) elseif @prefunc1 == 8 zpre1 = exp(-(zpre1^@pre1power)) elseif @prefunc1 == 9 zpre1 = sin(zpre1) elseif @prefunc1 == 10 zpre1 = cos(zpre1) elseif @prefunc1 == 11 zpre1 = sin(z^@pre1power) elseif @prefunc1 == 12 zpre1 = (sin(zpre1))^@pre1power elseif @prefunc1 == 13 zpre1 = log(zpre1) elseif @prefunc1 == 14 zpre1 = log(log(zpre1)) elseif @prefunc1 == 15 zpre1 = zpre1^zpre1 elseif @prefunc1 == 16 zpre1 = zpre1^(-zpre1) elseif @prefunc1 == 17 zpre1 = zpre1^(zpre1^@pre1power) elseif @prefunc1 == 18 zpre1 = zpre1^(-(zpre1^@pre1power)) elseif @prefunc1 == 19 zpre1 = sinh(zpre1) elseif @prefunc1 == 20 zpre1 = cosh(zpre1) elseif @prefunc1 == 21 zpre1 = sinh(zpre1^@pre1power) elseif @prefunc1 == 22 zpre1 = cosh(zpre1^@pre1power) elseif @prefunc1 == 23 zpre1 = sinh(zpre1)^@pre1power elseif @prefunc1 == 24 zpre1 = cosh(zpre1)^@pre1power elseif @prefunc1 == 25 zpre1 = zpre1 + 1 elseif @prefunc1 == 26 zpre1 = (zpre1 + 1)^@pre1power elseif @prefunc1 == 27 zpre1 = zpre1 - 1 elseif @prefunc1 == 28 zpre1 = (zpre1 - 1)^@pre1power elseif @prefunc1 == 29 zpre1 = 1 - zpre1 elseif @prefunc1 == 30 zpre1 = (1 - zpre1)^@pre1power elseif @prefunc1 == 31 zpre1 = (zpre1+1)*(zpre1-1) elseif @prefunc1 == 32 zpre1 = ((zpre1+1)*(zpre1-1))^@pre1power elseif @prefunc1 == 33 zpre1 = zpre1*zpre1+1 elseif @prefunc1 == 34 zpre1 = (zpre1*zpre1+1)^@pre1power elseif @prefunc1 == 35 zpre1 = zpre1*zpre1-1 elseif @prefunc1 == 36 zpre1 = (zpre1*zpre1-1)^@pre1power elseif @prefunc1 == 37 zpre1 = 1-zpre1*zpre1 elseif @prefunc1 == 38 zpre1 = (1-zpre1*zpre1)^@pre1power elseif @prefunc1 == 39 zpre1 = zpre1^@pre1power + 1 elseif @prefunc1 == 40 zpre1 = zpre1^@pre1power - 1 elseif @prefunc1 == 41 zpre1 = 1 - zpre1^@pre1power elseif @prefunc1 == 42 zpre1 = (zpre1 + 1)/(zpre1 - 1) elseif @prefunc1 == 43 zpre1 = ((zpre1 + 1)/(zpre1 - 1))^@pre1power elseif @prefunc1 == 44 zpre1 = (zpre1-1)/(zpre1+1) elseif @prefunc1 == 45 zpre1 = ((zpre1-1)/(zpre1+1))^@pre1power endif ; @prefunc1 ; Execute PF2 if @pre2multiplier != (1,0) zpre2 = @pre2multiplier*z else zpre2 = z endif ; @pre2multiplier if @prefunc2 == 0 zpre2 = (1,0) elseif @prefunc2 == 2 zpre2 = 1/zpre2 elseif @prefunc2 == 3 zpre2 = zpre2*zpre2 elseif @prefunc2 == 4 zpre2 = zpre2^@pre2power elseif @prefunc2 == 5 zpre2 = exp(zpre2) elseif @prefunc2 == 6 zpre2 = exp(-zpre2) elseif @prefunc2 == 7 zpre2 = exp(zpre2^@pre2power) elseif @prefunc2 == 8 zpre2 = exp(-(zpre2^@pre2power)) elseif @prefunc2 == 9 zpre2 = sin(zpre2) elseif @prefunc2 == 10 zpre2 = cos(zpre2) elseif @prefunc2 == 11 zpre2 = sin(z^@pre2power) elseif @prefunc2 == 12 zpre2 = (sin(zpre2))^@pre2power elseif @prefunc2 == 13 zpre2 = log(zpre2) elseif @prefunc2 == 14 zpre2 = log(log(zpre2)) elseif @prefunc2 == 15 zpre2 = zpre2^zpre2 elseif @prefunc2 == 16 zpre2 = zpre2^(-zpre2) elseif @prefunc2 == 17 zpre2 = zpre2^(zpre2^@pre2power) elseif @prefunc2 == 18 zpre2 = zpre2^(-(zpre2^@pre2power)) elseif @prefunc2 == 19 zpre2 = sinh(zpre2) elseif @prefunc2 == 20 zpre2 = cosh(zpre2) elseif @prefunc2 == 21 zpre2 = sinh(zpre2^@pre2power) elseif @prefunc2 == 22 zpre2 = cosh(zpre2^@pre2power) elseif @prefunc2 == 23 zpre2 = sinh(zpre2)^@pre2power elseif @prefunc2 == 24 zpre2 = cosh(zpre2)^@pre2power elseif @prefunc2 == 25 zpre2 = zpre2 + 1 elseif @prefunc2 == 26 zpre2 = (zpre2 + 1)^@pre2power elseif @prefunc2 == 27 zpre2 = zpre2 - 1 elseif @prefunc2 == 28 zpre2 = (zpre2 - 1)^@pre2power elseif @prefunc2 == 29 zpre2 = 1 - zpre2 elseif @prefunc2 == 30 zpre2 = (1 - zpre2)^@pre2power elseif @prefunc2 == 31 zpre2 = (zpre2+1)*(zpre2-1) elseif @prefunc2 == 32 zpre2 = ((zpre2+1)*(zpre2-1))^@pre2power elseif @prefunc2 == 33 zpre2 = zpre2*zpre2+1 elseif @prefunc2 == 34 zpre2 = (zpre2*zpre2+1)^@pre2power elseif @prefunc2 == 35 zpre2 = zpre2*zpre2-1 elseif @prefunc2 == 36 zpre2 = (zpre2*zpre2-1)^@pre2power elseif @prefunc2 == 37 zpre2 = 1-zpre2*zpre2 elseif @prefunc2 == 38 zpre2 = (1-zpre2*zpre2)^@pre2power elseif @prefunc2 == 39 zpre2 = zpre2^@pre2power + 1 elseif @prefunc2 == 40 zpre2 = zpre2^@pre2power - 1 elseif @prefunc2 == 41 zpre2 = 1 - zpre2^@pre2power elseif @prefunc2 == 42 zpre2 = (zpre2 + 1)/(zpre2 - 1) elseif @prefunc2 == 43 zpre2 = ((zpre2 + 1)/(zpre2 - 1))^@pre2power elseif @prefunc2 == 44 zpre2 = (zpre2-1)/(zpre2+1) elseif @prefunc2 == 45 zpre2 = ((zpre2-1)/(zpre2+1))^@pre2power endif ; @prefunc2 ; Execute argument function if @argmultiplier != (1,0) zarg = @argmultiplier*z else zarg = z endif ; @argmultiplier if @argument == 1 zarg = 1/zarg elseif @argument == 2 zarg = zarg*zarg elseif @argument == 3 zarg = zarg^@argpower elseif @argument == 4 zarg = exp(zarg) elseif @argument == 5 zarg = exp(-zarg) elseif @argument == 6 zarg = exp(zarg^@argpower) elseif @argument == 7 zarg = exp(-(zarg^@argpower)) elseif @argument == 8 zarg = sin(zarg) elseif @argument == 9 zarg = cos(zarg) elseif @argument == 10 zarg = sin(z^@argpower) elseif @argument == 11 zarg = (sin(zarg))^@argpower elseif @argument == 12 zarg = log(zarg) elseif @argument == 13 zarg = log(log(zarg)) elseif @argument == 14 zarg = zarg^zarg elseif @argument == 15 zarg = zarg^(-zarg) elseif @argument == 16 zarg = zarg^(zarg^@argpower) elseif @argument == 17 zarg = zarg^(-(zarg^@argpower)) elseif @argument == 18 zarg = sinh(zarg) elseif @argument == 19 zarg = cosh(zarg) elseif @argument == 20 zarg = sinh(zarg^@argpower) elseif @argument == 21 zarg = cosh(zarg^@argpower) elseif @argument == 22 zarg = sinh(zarg)^@argpower elseif @argument == 23 zarg = cosh(zarg)^@argpower elseif @argument == 24 zarg = zarg + 1 elseif @argument == 25 zarg = (zarg + 1)^@argpower elseif @argument == 26 zarg = zarg - 1 elseif @argument == 27 zarg = (zarg - 1)^@argpower elseif @argument == 28 zarg = 1 - zarg elseif @argument == 29 zarg = (1 - zarg)^@argpower elseif @argument == 30 zarg = (zarg+1)*(zarg-1) elseif @argument == 31 zarg = ((zarg+1)*(zarg-1))^@argpower elseif @argument == 32 zarg = zarg*zarg+1 elseif @argument == 33 zarg = (zarg*zarg+1)^@argpower elseif @argument == 34 zarg = zarg*zarg-1 elseif @argument == 35 zarg = (zarg*zarg-1)^@argpower elseif @argument == 36 zarg = 1-zarg*zarg elseif @argument == 37 zarg = (1-zarg*zarg)^@argpower elseif @argument == 38 zarg = zarg^@argpower + 1 elseif @argument == 39 zarg = zarg^@argpower - 1 elseif @argument == 40 zarg = 1 - zarg^@argpower elseif @argument == 41 zarg = (zarg + 1)/(zarg - 1) elseif @argument == 42 zarg = ((zarg + 1)/(zarg - 1))^@argpower elseif @argument == 43 zarg = (zarg-1)/(zarg+1) elseif @argument == 44 zarg = ((zarg-1)/(zarg+1))^@argpower endif ; @argument if @static ; standard 11-term Taylor expansion ; Execute the hypergeometric formula z2 = zarg*zarg, z3 = z2*zarg, z4 = z3*zarg, z5 = z4*zarg, z6 = z5*zarg z7 = z6*zarg, z8 = z7*zarg, z9 = z8*zarg zarg = coeff0 + coeff1*zarg + coeff2*z2 + coeff3*z3 + coeff4*z4 + \ coeff5*z5 + coeff6*z6 + coeff7*z7 + coeff8*z8 + \ coeff9*z9 + coeff10*z9*zarg if !@blend z = zpre1*zpre2*zarg else z = @weight1 * zpre1*zpre2*zarg + @weight2 * z^@blendpower endif ; @blend else ; dynamic number of terms, based on iteration count iter = iter + 1 if iter > 1 if @p == 0 numerator1 = numerator1 elseif @p == 1 a1_1 = a1_1 + @ca1 numerator1 = numerator1*a1_1 elseif @p == 2 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2 numerator1 = numerator1*a1_1*a2_1 elseif @p == 3 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2, a3_1 = a3_1 + @ca3 numerator1 = numerator1*a1_1*a2_1*a3_1 elseif @p == 4 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2, a3_1 = a3_1 + @ca3 a4_1 = a4_1 + @ca4 numerator1 = numerator1*a1_1*a2_1*a3_1*a4_1 elseif @p == 5 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2, a3_1 = a3_1 + @ca3 a4_1 = a4_1 + @ca4, a5_1 = a5_1 + @ca5 numerator1 = numerator1*a1_1*a2_1*a3_1*a4_1*a5_1 endif ; @p if @q == 0 ; store denominator in variable coeff1 coeff1 = coeff1 elseif @q == 1 b1_1 = b1_1 + @cb1 coeff1 = coeff1*b1_1 elseif @q == 2 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2 coeff1 = coeff1*b1_1*b2_1 elseif @q == 3 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2, b3_1 = b3_1 + @cb3 coeff1 = coeff1*b1_1*b2_1*b3_1 elseif @q == 4 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2, b3_1 = b3_1 + @cb3 b4_1 = b4_1 + @cb4 coeff1 = coeff1*b1_1*b2_1*b3_1*b4_1 elseif @q == 5 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2, b3_1 = b3_1 + @cb3 b4_1 = b4_1 + @cb4, b5_1 = b5_1 + @cb5 coeff1 = coeff1*b1_1*b2_1*b3_1*b4_1*b5_1 endif ; @q zarg = numerator1*(zarg^iter)/(iter*coeff1) elseif iter == 0 zarg = (1,0) ; first series term is always constant, 1 else ; iter == 1 if @p == 0 numerator1 = numerator1 elseif @p == 1 numerator1 = a1_1 elseif @p == 2 numerator1 = a1_1*a2_1 elseif @p == 3 numerator1 = a1_1*a2_1*a3_1 elseif @p == 4 numerator1 = a1_1*a2_1*a3_1*a4_1 elseif @p == 5 numerator1 = a1_1*a2_1*a3_1*a4_1*a5_1 endif ; @p if @q == 0 ; store denominator in variable coeff1 coeff1 = coeff1 elseif @q == 1 coeff1 = b1_1 elseif @q == 2 coeff1 = b1_1*b2_1 elseif @q == 3 coeff1 = b1_1*b2_1*b3_1 elseif @q == 4 coeff1 = b1_1*b2_1*b3_1*b4_1 elseif @q == 5 coeff1 = b1_1*b2_1*b3_1*b4_1*b5_1 endif ; @q zarg = numerator1*zarg/coeff1 endif ; iter if iter >= @skipped if @alternate if iter%2 == 0 sign = 1.0 else sign = -1.0 endif ; sign endif ; @alternate if !@blend z = z + sign*zpre1*zpre2*zarg else z = @weight1 * (z + sign*zpre1*zpre2*zarg) + @weight2 * z^@blendpower endif ; @blend endif ; iter endif ; @static if @pmode != 1 z = z + jc endif ; pmode bailout: |z| < @bail default: title = "zHypergeo pFq Enhanced" center = (0,0) maxiter = 100 method = multipass periodicity = 0 magn = 0.25 heading caption = "There is a newer version of this formula" endheading param p caption = "Numerator Constants" min = 0 max = 5 default = 2 hint = "This is p, the number of distinct numerator parameters used as input \ to the generalized hypergeometric function \ pFq(a1,a2,...,ap;b1,b2,...,bq;z). Enter 0-5" endparam param q caption = "Denominator Constants" min = 0 max = 5 default = 2 hint = "This is q, the number of distinct denominator parameters used as \ input to the generalized hypergeometric function \ pFq(a1,a2,...,ap;b1,b2,...,bq;z). Enter 0-5" endparam param a1 caption = "Constant a1" default = (0.5,0.0) hint = "This is the first constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 0" endparam param a2 caption = "Constant a2" default = (0.5,0.0) hint = "This is the second constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 1" endparam param a3 caption = "Constant a3" default = (0.5,0.0) hint = "This is the third constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 2" endparam param a4 caption = "Constant a4" default = (0.5,0.0) hint = "This is the fourth constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 3" endparam param a5 caption = "Constant a5" default = (0.5,0.0) hint = "This is the fifth constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 4" endparam param b1 caption = "Constant b1" default = (1.0,0.0) hint = "This is the first constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 0" endparam param b2 caption = "Constant b2" default = (1.0,0.0) hint = "This is the second constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 1" endparam param b3 caption = "Constant b3" default = (0.75,0.0) hint = "This is the third constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 2" endparam param b4 caption = "Constant b4" default = (0.75,0.0) hint = "This is the fourth constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 3" endparam param b5 caption = "Constant b5" default = (0.75,0.0) hint = "This is the fifth constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 4" endparam param argument caption = "Argument Function" default = 0 enum = "z" "1/z" "z^2" "z^power" "e^z" "e^-z" "e^z^power" "e^-(z^power)" \ "sin z" "cos z" "sin(z^power)" "(sin z)^power" "log z" "loglog z" "z^z" \ "z^-z" "z^z^power" "z^-(z^power)" "sinh z" "cosh z" "sinh z^power" \ "cosh z^power" "(sinh z)^power" "(cosh z)^power" "z+1" "(z+1)^power" \ "z-1" "(z-1)^power" "1-z" "(1-z)^power" "(z+1)(z-1)" "((z+1)(z-1))^power" \ "z^2 + 1" "(z^2 + 1)^power" "z^2 - 1" "(z^2 - 1)^power" "1-z^2" \ "(1-z^2)^power" "z^power + 1" "z^power - 1" "1 - z^power" "(z+1)/(z-1)" \ "((z+1)/(z-1))^power" "(z-1)/(z+1)" "((z-1)/(z+1))^power" hint = "This is the argument to the hypergeometric series; z can be modified \ by this function prior to being fed to the HG" endparam param argpower caption = "Argument Power" default = (2,0) hint = "If param 'Argument Function' needs an exponent, this is it" endparam param argmultiplier caption = "Argument Multiplier" default = (1,0) hint = "z is multiplied by this value before being modified by 'Argument Function'" endparam param prefunc1 caption = "Prefunction 1" default = 0 enum = "none" "z" "1/z" "z^2" "z^power" "e^z" "e^-z" "e^z^power" "e^-(z^power)" \ "sin z" "cos z" "sin(z^power)" "(sin z)^power" "log z" "loglog z" "z^z" \ "z^-z" "z^z^power" "z^-(z^power)" "sinh z" "cosh z" "sinh z^power" \ "cosh z^power" "(sinh z)^power" "(cosh z)^power" "z+1" "(z+1)^power" \ "z-1" "(z-1)^power" "1-z" "(1-z)^power" "(z+1)(z-1)" "((z+1)(z-1))^power" \ "z^2 + 1" "(z^2 + 1)^power" "z^2 - 1" "(z^2 - 1)^power" "1-z^2" \ "(1-z^2)^power" "z^power + 1" "z^power - 1" "1 - z^power" "(z+1)/(z-1)" \ "((z+1)/(z-1))^power" "(z-1)/(z+1)" "((z-1)/(z+1))^power" hint = "The hypergeometric function can be multiplied by this function" endparam param pre1power caption = "PF 1 Power" default = (2,0) hint = "If param 'Prefunction 1' needs an exponent, this is it" endparam param pre1multiplier caption = "PF 1 Multiplier" default = (1,0) hint = "z is multiplied by this value before being fed to 'Prefunction 1'" endparam param prefunc2 caption = "Prefunction 2" default = 0 enum = "none" "z" "1/z" "z^2" "z^power" "e^z" "e^-z" "e^z^power" "e^-(z^power)" \ "sin z" "cos z" "sin(z^power)" "(sin z)^power" "log z" "loglog z" "z^z" \ "z^-z" "z^z^power" "z^-(z^power)" "sinh z" "cosh z" "sinh z^power" \ "cosh z^power" "(sinh z)^power" "(cosh z)^power" "z+1" "(z+1)^power" \ "z-1" "(z-1)^power" "1-z" "(1-z)^power" "(z+1)(z-1)" "((z+1)(z-1))^power" \ "z^2 + 1" "(z^2 + 1)^power" "z^2 - 1" "(z^2 - 1)^power" "1-z^2" \ "(1-z^2)^power" "z^power + 1" "z^power - 1" "1 - z^power" "(z+1)/(z-1)" \ "((z+1)/(z-1))^power" "(z-1)/(z+1)" "((z-1)/(z+1))^power" hint = "The hypergeometric function can be multiplied by this function" endparam param pre2power caption = "PF 2 Power" default = (2,0) hint = "If param 'Prefunction 2' needs an exponent, this is it" endparam param pre2multiplier caption = "PF 2 Multiplier" default = (1,0) hint = "z is multiplied by this value before being fed to 'Prefunction 2'" endparam param ca1 caption = "a1 Increment" default = (1,0) hint = "This is the amount that constant a1 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 0" endparam param ca2 caption = "a2 Increment" default = (1,0) hint = "This is the amount that constant a2 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 1" endparam param ca3 caption = "a3 Increment" default = (1,0) hint = "This is the amount that constant a3 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 2" endparam param ca4 caption = "a4 Increment" default = (1,0) hint = "This is the amount that constant a4 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 3" endparam param ca5 caption = "a5 Increment" default = (1,0) hint = "This is the amount that constant a5 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 4" endparam param cb1 caption = "b1 Increment" default = (1,0) hint = "This is the amount that constant b1 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 0" endparam param cb2 caption = "b2 Increment" default = (1,0) hint = "This is the amount that constant b2 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 1" endparam param cb3 caption = "b3 Increment" default = (1,0) hint = "This is the amount that constant b3 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 2" endparam param cb4 caption = "b4 Increment" default = (1,0) hint = "This is the amount that constant b4 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 3" endparam param cb5 caption = "b5 Increment" default = (1,0) hint = "This is the amount that constant b5 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 4" endparam param static caption = "Static Mode" default = TRUE hint = "If enabled, a static, 11-term Taylor series is used to define \ the hypergeometric function; otherwise, the series is dynamically \ summed based on the current iteration count" endparam param skipped caption = "Terms to Skip" default = 0 min = 0 hint = "In Dynamic mode only, this number of terms in the hypergeometric \ series will be skipped" endparam param alternate caption = "Alternate Terms?" default = FALSE hint = "In Dynamic mode only, if enabled, the terms of the hypergeometric \ series will alternate in sign" endparam param pixelformula caption = "Pixel Formula" enum = "p" "p^2" "p^3" "p^4" "p^power" "1/p" "sqrt(p)" "1/p^2" "log(p)" "e^p" \ "p^p" "sin(p)" "cos(p)" \ "tan(p)" "asin(p)" "acos(p)" "atan(p)" "sinh(p)" "cosh(p)" "tanh(p)" \ "asinh(p)" "acosh(p)" "atanh(p)" "log(1/p)" "log(log(p))" "e^-p" \ "e^(1/p)" "p^-p" "sin(p)^2" "cos(p)^2" "tan(p)^2" "cot(p)" "sec(p)" \ "csc(p)" "cot(p)^2" "sec(p)^2" "csc(p)^2" "p^p^p" "1/p^p^p" "log(-p)" \ "1/log(p)" "plog(p)" "sin(p)/p" "cos(p)/p" "sin(p)*cos(p)" "sin(p^2)" \ "e^(-1/p)" "pe^p" "pe^-p" "pe^(1/p)" "pe^(-1/p)" "p^3" "1/p^3" \ "acot(p)" "asec(p)" "acsc(p)" "tan(p)/p" "cot(p)/p" "sec(p)/p" \ "csc(p)/p" "psin(p)" "pcos(p)" "ptan(p)" "pcot(p)" "psec(p)" "pcsc(p)" \ "sin(1/p)" "cos(1/p)" "tan(1/p)" "cot(1/p)" "sec(1/p)" "csc(1/p)" \ "cotanh(p)" "sech(p)" "cosech(p)" "acoth(p)" "asech(p)" "acosech(p)" \ "3-term polynomial" "sinh(p)^2" "cosh(p)^2" "tanh(p)^2" "cotanh(p)^2" \ "sech(p)^2" "cosech(p)^2" "sinh(1/p)" "cosh(1/p)" "tanh(1/p)" \ "cotanh(1/p)" "sech(1/p)" "cosech(1/p)" "sin(p)tan(p)" "sinh(p)tanh(p)" \ "sinh(p)cosh(p)" "sinh(p)^2*cosh(p)^2" "sin(p)^2*cos(p)^2" \ "sin(1/p)*cos(1/p)" "sin(1/p)^2" "sin(p)cos(1/p)" "sin(p)sin(1/p)" \ "log(p)^2" "sin(p)sin(2p)" "e^2p" "e^-2p" "sinh(1/p)cosh(1/p)" \ "sinh(1/p)^2" "sinh(p)cosh(1/p)" "sinh(p)sinh(1/p)" "sin(p)sinh(p)" \ "sin(p)cosh(p)" "sin(p)^2*sinh(p)^2" "sin(p)e^p" "cos(p)e^p" \ "sinh(p)e^p" "cosh(p)e^p" "sin(p)log(p)" "cos(p)log(p)" "sinh(p)log(p)" \ "cosh(p)log(p)" default = 0 hint = "Pixel value (Mand) or seed (Julia) can be initialized \ before iterating. For 'p^power', set parameter 'Pixel Power'; \ for '3-term polynomial', set 'Coeff Pa', 'Exponent Pa', 'Coeff Pb', \ 'Exponent Pb', 'Coeff Pc', 'Exponent Pc'. 'p' results in normal \ initialization" endparam param ppower caption = "Pixel Power" default = (5,0) hint = "This is the power used if parameter \ 'Pixel Formula' is set to 'p^power'" endparam param coeffpa caption = "Coeff Pa" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 1st term" endparam param exponentpa caption = "Exponent Pa" default = (6,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 1st term" endparam param coeffpb caption = "Coeff Pb" default = (-1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" endparam param exponentpb caption = "Exponent Pb" default = (4,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 2nd term" endparam param coeffpc caption = "Coeff Pc" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" endparam param exponentpc caption = "Exponent Pc" default = (2,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 3rd term" endparam param pmode caption = "Pixel Mode" default = 0 enum = "Post-add" "Pre-add" "Both" hint = "'Post-add' -- formula is executed, then pixel/constant is added to result; \ 'Pre-add' -- pixel is added to z, then formula executed; 'Both' -- pixel added, \ formula executed, then pixel added again to result" endparam param blend caption = "Blend Z^Power" default = FALSE hint = "If true, then the hypergeometric function is blended with a normal \ z^powerMandelbrot/Julia, z = c1*hypergeo(z) + c2*z^power. Set the \ weight coefficients c1 & c2 with params 'Hypergeo Weight' and 'Z^Power \ Weight'. The exponent is set with param 'Blend Power'" endparam param weight1 caption = "Hypergeo Weight" default = -0.1 hint = "If 'Blend Z^Power' is enabled (TRUE), then this coefficient sets the \ relative proportion of the hypergeometric function that is blended \ with z^power each iteration to obtain the final z" endparam param weight2 caption = "Z^Power Weight" default = 1.0 hint = "If 'Blend Z^Power' is enabled (TRUE), then this coefficient sets the \ relative proportion of the z^power function that is blended \ with the hypergeometric each iteration to obtain the final z" endparam param blendpower caption = "Blend Power" default = (2,0) hint = "If 'Blend Z^Power' is enabled (TRUE), then this parameter sets the \ exponent for the z^power function (i.e., this is the power)" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param bail caption = "Bailout Value" default = 64.0 hint = "Value needed to 'escape' to infinity" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" endparam switch: type = "jam-hypergeometricPFQ" jconstant = #pixel bail = bail p = p q = q a1 = a1 a2 = a2 a3 = a3 a4 = a4 a5 = a5 b1 = b1 b2 = b2 b3 = b3 b4 = b4 b5 = b5 argument = argument argpower = argpower argmultiplier = argmultiplier prefunc1 = prefunc1 pre1power = pre1power pre1multiplier = pre1multiplier prefunc2 = prefunc2 pre2power = pre2power pre2multiplier = pre2multiplier ca1 = ca1 ca2 = ca2 ca3 = ca3 ca4 = ca4 ca5 = ca5 cb1 = cb1 cb2 = cb2 cb3 = cb3 cb4 = cb4 cb5 = cb5 static = static skipped = skipped alternate = alternate pixelformula = pixelformula ppower = ppower coeffpa = coeffpa exponentpa = exponentpa coeffpb = coeffpb exponentpb = exponentpb coeffpc = coeffpc exponentpc = exponentpc blend = blend weight1 = weight1 weight2 = weight2 blendpower = blendpower pmode = pmode mandy = julia julia = mandy } jam-hypergeometricPFQ-explorer { ; jam 020424 ; Fake Mandelbrot/Julia based on the generalized hypergeometric function pFq, ; pFq(a1,a2,...,ap;b1,b2,...,bq;z) = 1 + (a1*a2*...*ap/(b1*b2*...*bq*1!))z + ; (a1*[a1+1]*a2*[a2+2]*...*ap*[ap+1]/(b1*[b1+1]*b2*[b2+1]*...*bq*[bq+1]*2!))z^2 ; + ... ; The function is implemented as an 11-term series expansion about z=0, ; or as a dynamic expansion using an indefinite number of terms based on ; the current iteration count. ; z argument may be modified before passage to the hypergeometric function, ; and the HG function may also be multiplied by 1 or 2 other functions. ; This formula is not really meant for iterating fractals, but for ; identifying useful or interesting input constants for the ; generalized hypergeometric fractal jam-hypergeometricPFQ ('pFq Enhanced'). ; After finding constants here, use that formula instead, i.e., after identifying ; constants of interest, switch to the other formula ; for a faster iterating, Mandelbrot/Julia formula pair. ; Please disregard the initially all black screen should it occur. This ; view results from the 'Switch Constant' not yet being properly intialized. ; Just turn on UF's switch feature, move the cursor around normally, ; and click when the preview window shows something interesting. The ; constants selected by the switch can then be read off from the formula ; parameter 'Switch Constant', and correspond to whichever hypergeometric ; constants are currently selected by param 'Switch Variables'. ; If these formulas are directly used for iterating fractals, there will ; be some performance hit due to the overhead associated with the ; 'Switch Variables' logic, and ordinary switching between Mandelbrot/Julia ; types will not be possible. ; Please contact me (maddry@sri.org) if you have questions/comments about ; these formulas. Thanks, enjoy, & happy fractaling! ; In a bit more detail: ; This is a fake Mandelbrot formula to facilitate finding interesting ; a & b constants for the hypergeometric function pFq, as defined above. ; The function is implemented as an 11-term series expansion about z=0 ; (static mode enabled, the default), or as a continuous summation ; based on iteration count. ; By selecting the appropriate pair of 'Switch Variables', UF's switching feature ; can be used to search for interesting combinations of the a & b constants. ; Use the Explorer this way: set the 'Switch Variables' to the pair of ; HG constants you wish to vary, & set the others manually if desired. Then ; enter switch mode, move the cursor to vary the selected constants, then click ; upon finding something interesting. After the switch, the selected ; constants can be read off from UF param 'Switch Constant'; the real part ; corresponds to the first of the 'Switch Variables', the imag part to the ; second of the 'Switch Variables'. You can then set these manually and change ; the 'Switch Variables' setting to continue searching for other HG constants. ; Disregard any initially blank screen, which results from the 'Switch Constant' ; not having been set yet; just turn on UF's switch feature and move around ; the screen normally. Either two numerator constants, two denominator ; constants, or one numerator and one denominator constant may be searched at a ; time. init: if @mandy z = @jconstant, jc = #pixel else ; Julia z = #pixel, jc = @jconstant endif complex zextra = complex ztemp = (0,0) ; temp/spare scratch variables complex zarg = complex zpre1 = complex zpre2 = (0,0) ; declare vars for powers of z complex z2 = complex z3 = complex z4 = complex z5 = complex z6 = (0,0) complex z7 = complex z8 = complex z9 = (0,0) ; compute coefficients for series ; start with the numerator and denominator input parameters (the a's & b's) complex a1_1 = @a1, complex a2_1 = @a2, complex a3_1 = @a3, complex a4_1 = @a4 complex b1_1 = @b1, complex b2_1 = @b2, complex b3_1 = @b3, complex b4_1 = @b4 complex a5_1 = @a5, complex b5_1 = @b5 if @switchvars == 0 ; a1--a2 a1_1 = real(@switchconst), a2_1 = imag(@switchconst) elseif @switchvars == 1 ; a1--b1 a1_1 = real(@switchconst), b1_1 = imag(@switchconst) elseif @switchvars == 2 ; b1--b2 b1_1 = real(@switchconst), b2_1 = imag(@switchconst) endif ; @switchvars ; initialize all the other variables, to eliminate annoying warning messages complex a1_2 = complex a1_3 = complex a1_4 = complex a1_5 = (0,0) complex a1_6 = complex a1_7 = complex a1_8 = complex a1_9 = complex a1_10 = (0,0) complex a2_2 = complex a2_3 = complex a2_4 = complex a2_5 = (0,0) complex a2_6 = complex a2_7 = complex a2_8 = complex a2_9 = complex a2_10 = (0,0) complex a3_2 = complex a3_3 = complex a3_4 = complex a3_5 = (0,0) complex a3_6 = complex a3_7 = complex a3_8 = complex a3_9 = complex a3_10 = (0,0) complex a4_2 = complex a4_3 = complex a4_4 = complex a4_5 = (0,0) complex a4_6 = complex a4_7 = complex a4_8 = complex a4_9 = complex a4_10 = (0,0) complex a5_2 = complex a5_3 = complex a5_4 = complex a5_5 = (0,0) complex a5_6 = complex a5_7 = complex a5_8 = complex a5_9 = complex a5_10 = (0,0) complex b1_2 = complex b1_3 = complex b1_4 = complex b1_5 = (0,0) complex b1_6 = complex b1_7 = complex b1_8 = complex b1_9 = complex b1_10 = (0,0) complex b2_2 = complex b2_3 = complex b2_4 = complex b2_5 = (0,0) complex b2_6 = complex b2_7 = complex b2_8 = complex b2_9 = complex b2_10 = (0,0) complex b3_2 = complex b3_3 = complex b3_4 = complex b3_5 = (0,0) complex b3_6 = complex b3_7 = complex b3_8 = complex b3_9 = complex b3_10 = (0,0) complex b4_2 = complex b4_3 = complex b4_4 = complex b4_5 = (0,0) complex b4_6 = complex b4_7 = complex b4_8 = complex b4_9 = complex b4_10 = (0,0) complex b5_2 = complex b5_3 = complex b5_4 = complex b5_5 = (0,0) complex b5_6 = complex b5_7 = complex b5_8 = complex b5_9 = complex b5_10 = (0,0) complex coeff0 = complex coeff1 = (1,0) complex coeff2 = complex coeff3 = (1,0) complex coeff4 = complex coeff5 = (1,0) complex coeff6 = complex coeff7 = (1,0) complex coeff8 = complex coeff9 = (1,0) complex coeff10 = (1,0) complex numerator1 = complex numerator2 = complex numerator3 = (1,0) complex numerator4 = complex numerator5 = complex numerator6 = (1,0) complex numerator7 = complex numerator8 = complex numerator9 = (1,0) complex numerator10 = (1,0) int iter = -1, float sign = 1.0 if @static ; using 11-term Taylor series expansion ; now define the coefficient numerator constants if @p == 0 ; nothing more to do to the numerator coeff0 = coeff0 ; but we have to do something to avoid a UF error else ; p must be at least 1 a1_2 = a1_1+@ca1, a1_3 = a1_2+@ca1 a1_4 = a1_3+@ca1, a1_5 = a1_4+@ca1, a1_6 = a1_5+@ca1 a1_7 = a1_6+@ca1, a1_8 = a1_7+@ca1, a1_9 = a1_8+@ca1 a1_10 = a1_9+@ca1 if @p > 1 ; p must be at least 2 a2_2 = a2_1+@ca2, a2_3 = a2_2+@ca2 a2_4 = a2_3+@ca2, a2_5 = a2_4+@ca2, a2_6 = a2_5+@ca2 a2_7 = a2_6+@ca2, a2_8 = a2_7+@ca2, a2_9 = a2_8+@ca2 a2_10 = a2_9+@ca2 endif ; @p if @p > 2 ; p must be at least 3 a3_2 = a3_1+@ca3, a3_3 = a3_2+@ca3 a3_4 = a3_3+@ca3, a3_5 = a3_4+@ca3, a3_6 = a3_5+@ca3 a3_7 = a3_6+@ca3, a3_8 = a3_7+@ca3, a3_9 = a3_8+@ca3 a3_10 = a3_9+@ca3 endif ; @p if @p > 3 ; p must be at least 4 a4_2 = a4_1+@ca4, a4_3 = a4_2+@ca4 a4_4 = a4_3+@ca4, a4_5 = a4_4+@ca4, a4_6 = a4_5+@ca4 a4_7 = a4_6+@ca4, a4_8 = a4_7+@ca4, a4_9 = a4_8+@ca4 a4_10 = a4_9+@ca4 endif ; @p if @p > 4 ; p must be at least 5 a5_2 = a5_1+@ca5, a5_3 = a5_2+@ca5 a5_4 = a5_3+@ca5, a5_5 = a5_4+@ca5, a5_6 = a5_5+@ca5 a5_7 = a5_6+@ca5, a5_8 = a5_7+@ca5, a5_9 = a5_8+@ca5 a5_10 = a5_9+@ca5 endif ; @p endif ; @p ; define the coefficient denominator constants if @q == 0 ; nothing more to do to the denominator coeff0 = coeff0 ; but we have to do something to avoid a UF error else ; q must be at least 1 b1_2 = b1_1+@cb1, b1_3 = b1_2+@cb1 b1_4 = b1_3+@cb1, b1_5 = b1_4+@cb1, b1_6 = b1_5+@cb1 b1_7 = b1_6+@cb1, b1_8 = b1_7+@cb1, b1_9 = b1_8+@cb1 b1_10 = b1_9+@cb1 if @q > 1 ; q must be at least 2 b2_2 = b2_1+@cb2, b2_3 = b2_2+@cb2 b2_4 = b2_3+@cb2, b2_5 = b2_4+@cb2, b2_6 = b2_5+@cb2 b2_7 = b2_6+@cb2, b2_8 = b2_7+@cb2, b2_9 = b2_8+@cb2 b2_10 = b2_9+@cb2 endif ; @q if @q > 2 ; q must be at least 3 b3_2 = b3_1+@cb3, b3_3 = b3_2+@cb3 b3_4 = b3_3+@cb3, b3_5 = b3_4+@cb3, b3_6 = b3_5+@cb3 b3_7 = b3_6+@cb3, b3_8 = b3_7+@cb3, b3_9 = b3_8+@cb3 b3_10 = b3_9+@cb3 endif ; @q if @q > 3 ; q must be at least 4 b4_2 = b4_1+@cb4, b4_3 = b4_2+@cb4 b4_4 = b4_3+@cb4, b4_5 = b4_4+@cb4, b4_6 = b4_5+@cb4 b4_7 = b4_6+@cb4, b4_8 = b4_7+@cb4, b4_9 = b4_8+@cb4 b4_10 = b4_9+@cb4 endif ; @q if @q > 4 ; q must be at least 5 b5_2 = b5_1+@cb5, b5_3 = b5_2+@cb5 b5_4 = b5_3+@cb5, b5_5 = b5_4+@cb5, b5_6 = b5_5+@cb5 b5_7 = b5_6+@cb5, b5_8 = b5_7+@cb5, b5_9 = b5_8+@cb5 b5_10 = b5_9+@cb5 endif ; @q endif ; @q ; now put them all together, in the process converting the factorials to their ; reciprocals. We are doing it the long way, to minimize the number of divisions if @q == 1 coeff1 = coeff0*b1_1 coeff2 = coeff1*b1_2 coeff3 = coeff2*b1_3 coeff4 = coeff3*b1_4 coeff5 = coeff4*b1_5 coeff6 = coeff5*b1_6 coeff7 = coeff6*b1_7 coeff8 = coeff7*b1_8 coeff9 = coeff8*b1_9 coeff10 = coeff9*b1_10 elseif @q == 2 coeff1 = coeff0*b1_1*b2_1 coeff2 = coeff1*b1_2*b2_2 coeff3 = coeff2*b1_3*b2_3 coeff4 = coeff3*b1_4*b2_4 coeff5 = coeff4*b1_5*b2_5 coeff6 = coeff5*b1_6*b2_6 coeff7 = coeff6*b1_7*b2_7 coeff8 = coeff7*b1_8*b2_8 coeff9 = coeff8*b1_9*b2_9 coeff10 = coeff9*b1_10*b2_10 elseif @q == 3 coeff1 = coeff0*b1_1*b2_1*b3_1 coeff2 = coeff1*b1_2*b2_2*b3_2 coeff3 = coeff2*b1_3*b2_3*b3_3 coeff4 = coeff3*b1_4*b2_4*b3_4 coeff5 = coeff4*b1_5*b2_5*b3_5 coeff6 = coeff5*b1_6*b2_6*b3_6 coeff7 = coeff6*b1_7*b2_7*b3_7 coeff8 = coeff7*b1_8*b2_8*b3_8 coeff9 = coeff8*b1_9*b2_9*b3_9 coeff10 = coeff9*b1_10*b2_10*b3_10 elseif @q == 4 coeff1 = coeff0*b1_1*b2_1*b3_1*b4_1 coeff2 = coeff1*b1_2*b2_2*b3_2*b4_2 coeff3 = coeff2*b1_3*b2_3*b3_3*b4_3 coeff4 = coeff3*b1_4*b2_4*b3_4*b4_4 coeff5 = coeff4*b1_5*b2_5*b3_5*b4_5 coeff6 = coeff5*b1_6*b2_6*b3_6*b4_6 coeff7 = coeff6*b1_7*b2_7*b3_7*b4_7 coeff8 = coeff7*b1_8*b2_8*b3_8*b4_8 coeff9 = coeff8*b1_9*b2_9*b3_9*b4_9 coeff10 = coeff9*b1_10*b2_10*b3_10*b4_10 elseif @q == 5 coeff1 = coeff0*b1_1*b2_1*b3_1*b4_1*b5_1 coeff2 = coeff1*b1_2*b2_2*b3_2*b4_2*b5_2 coeff3 = coeff2*b1_3*b2_3*b3_3*b4_3*b5_3 coeff4 = coeff3*b1_4*b2_4*b3_4*b4_4*b5_4 coeff5 = coeff4*b1_5*b2_5*b3_5*b4_5*b5_5 coeff6 = coeff5*b1_6*b2_6*b3_6*b4_6*b5_6 coeff7 = coeff6*b1_7*b2_7*b3_7*b4_7*b5_7 coeff8 = coeff7*b1_8*b2_8*b3_8*b4_8*b5_8 coeff9 = coeff8*b1_9*b2_9*b3_9*b4_9*b5_9 coeff10 = coeff9*b1_10*b2_10*b3_10*b4_10*b5_10 endif ; @q if @p == 1 numerator1 = a1_1 numerator2 = a1_2*numerator1 numerator3 = a1_3*numerator2 numerator4 = a1_4*numerator3 numerator5 = a1_5*numerator4 numerator6 = a1_6*numerator5 numerator7 = a1_7*numerator6 numerator8 = a1_8*numerator7 numerator9 = a1_9*numerator8 numerator10 = a1_10*numerator9 elseif @p == 2 numerator1 = a1_1*a2_1 numerator2 = a1_2*a2_2*numerator1 numerator3 = a1_3*a2_3*numerator2 numerator4 = a1_4*a2_4*numerator3 numerator5 = a1_5*a2_5*numerator4 numerator6 = a1_6*a2_6*numerator5 numerator7 = a1_7*a2_7*numerator6 numerator8 = a1_8*a2_8*numerator7 numerator9 = a1_9*a2_9*numerator8 numerator10 = a1_10*a2_10*numerator9 elseif @p == 3 numerator1 = a1_1*a2_1*a3_1 numerator2 = a1_2*a2_2*a3_2*numerator1 numerator3 = a1_3*a2_3*a3_3*numerator2 numerator4 = a1_4*a2_4*a3_4*numerator3 numerator5 = a1_5*a2_5*a3_5*numerator4 numerator6 = a1_6*a2_6*a3_6*numerator5 numerator7 = a1_7*a2_7*a3_7*numerator6 numerator8 = a1_8*a2_8*a3_8*numerator7 numerator9 = a1_9*a2_9*a3_9*numerator8 numerator10 = a1_10*a2_10*a3_10*numerator9 elseif @p == 4 numerator1 = a1_1*a2_1*a3_1*a4_1 numerator2 = a1_2*a2_2*a3_2*a4_2*numerator1 numerator3 = a1_3*a2_3*a3_3*a4_3*numerator2 numerator4 = a1_4*a2_4*a3_4*a4_4*numerator3 numerator5 = a1_5*a2_5*a3_5*a4_5*numerator4 numerator6 = a1_6*a2_6*a3_6*a4_6*numerator5 numerator7 = a1_7*a2_7*a3_7*a4_7*numerator6 numerator8 = a1_8*a2_8*a3_8*a4_8*numerator7 numerator9 = a1_9*a2_9*a3_9*a4_9*numerator8 numerator10 = a1_10*a2_10*a3_10*a4_10*numerator9 elseif @p == 5 numerator1 = a1_1*a2_1*a3_1*a4_1*a5_1 numerator2 = a1_2*a2_2*a3_2*a4_2*a5_2*numerator1 numerator3 = a1_3*a2_3*a3_3*a4_3*a5_3*numerator2 numerator4 = a1_4*a2_4*a3_4*a4_4*a5_4*numerator3 numerator5 = a1_5*a2_5*a3_5*a4_5*a5_5*numerator4 numerator6 = a1_6*a2_6*a3_6*a4_6*a5_6*numerator5 numerator7 = a1_7*a2_7*a3_7*a4_7*a5_7*numerator6 numerator8 = a1_8*a2_8*a3_8*a4_8*a5_8*numerator7 numerator9 = a1_9*a2_9*a3_9*a4_9*a5_9*numerator8 numerator10 = a1_10*a2_10*a3_10*a4_10*a5_10*numerator9 endif ; @p coeff1 = numerator1/coeff1 coeff2 = numerator2/(2*coeff2) coeff3 = numerator3/(6*coeff3) coeff4 = numerator4/(24*coeff4) coeff5 = numerator5/(120*coeff5) coeff6 = numerator6/(720*coeff6) coeff7 = numerator7/(5040*coeff7) coeff8 = numerator8/(40320*coeff8) coeff9 = numerator9/(362880*coeff9) coeff10 = numerator10/(3628800*coeff10) endif ; @static ; Pixel/constant initialization section if @pixelformula != 0 if @pixelformula == 1 jc = jc * jc elseif @pixelformula == 2 jc = jc * jc * jc elseif @pixelformula == 3 zextra = jc * jc jc = zextra * zextra elseif @pixelformula == 4 jc = jc ^ @ppower elseif @pixelformula == 5 jc = 1/jc elseif @pixelformula == 6 jc = sqrt(jc) elseif @pixelformula == 7 jc = 1 / ( jc * jc ) elseif @pixelformula == 8 jc = log(jc) elseif @pixelformula == 9 jc = exp( jc) elseif @pixelformula == 10 jc = jc^jc elseif @pixelformula == 11 jc = sin( jc ) elseif @pixelformula == 12 jc = cos( jc ) elseif @pixelformula == 13 jc = tan( jc ) elseif @pixelformula == 14 jc = asin( jc ) elseif @pixelformula == 15 jc = acos( jc ) elseif @pixelformula == 16 jc = atan( jc ) elseif @pixelformula == 17 jc = sinh( jc ) elseif @pixelformula == 18 jc = cosh( jc ) elseif @pixelformula == 19 jc = tanh( jc ) elseif @pixelformula == 20 jc = asinh( jc ) elseif @pixelformula == 21 jc = acosh( jc ) elseif @pixelformula == 22 jc = atanh( jc ) elseif @pixelformula == 23 jc = log( 1/jc ) elseif @pixelformula == 24 jc = log( log( jc )) elseif @pixelformula == 25 jc = exp( -jc ) elseif @pixelformula == 26 jc = exp( 1/jc ) elseif @pixelformula == 27 jc = jc^(-jc) elseif @pixelformula == 28 zextra = sin( jc ) jc = zextra * zextra elseif @pixelformula == 29 zextra = cos( jc ) jc = zextra * zextra elseif @pixelformula == 30 zextra = tan( jc ) jc = zextra * zextra elseif @pixelformula == 31 jc = cotan( jc ) elseif @pixelformula == 32 jc = 1/cos( jc ) elseif @pixelformula == 33 jc = 1/sin( jc ) elseif @pixelformula == 34 zextra = cotan( jc ) jc = zextra * zextra elseif @pixelformula == 35 zextra = 1/cos( jc ) jc = zextra * zextra elseif @pixelformula == 36 zextra = 1/sin( jc ) jc = zextra * zextra elseif @pixelformula == 37 zextra = jc^(jc) jc = jc^zextra elseif @pixelformula == 38 zextra = jc^(jc) jc = 1/( jc^zextra ) elseif @pixelformula == 39 jc = log(-jc) elseif @pixelformula == 40 jc = 1/log( jc ) elseif @pixelformula == 41 jc = jc * log( jc ) elseif @pixelformula == 42 jc = sin( jc ) / jc elseif @pixelformula == 43 jc = cos( jc ) / jc elseif @pixelformula == 44 jc = sin( jc ) * cos( jc ) elseif @pixelformula == 45 jc = sin( jc^2 ) elseif @pixelformula == 46 jc = exp( -1/jc ) elseif @pixelformula == 47 jc = jc * exp( jc ) elseif @pixelformula == 48 jc = jc * exp( -jc ) elseif @pixelformula == 49 jc = jc * exp( 1/jc ) elseif @pixelformula == 50 jc = jc * exp( -1/jc ) elseif @pixelformula == 51 jc = jc * jc * jc elseif @pixelformula == 52 jc = 1 / ( jc * jc * jc ) elseif @pixelformula == 53 jc = atan( 1 / jc ) elseif @pixelformula == 54 jc = acos( 1 / jc ) elseif @pixelformula == 55 jc = asin( 1 / jc ) elseif @pixelformula == 56 jc = tan( jc ) / jc elseif @pixelformula == 57 jc = cotan( jc ) / jc elseif @pixelformula == 58 jc = 1 / ( jc * cos( jc )) elseif @pixelformula == 59 jc = 1 / ( jc * sin( jc )) elseif @pixelformula == 60 jc = jc * sin( jc ) elseif @pixelformula == 61 jc = jc * cos( jc ) elseif @pixelformula == 62 jc = jc * tan( jc ) elseif @pixelformula == 63 jc = jc * cotan( jc ) elseif @pixelformula == 64 jc = jc/cos( jc ) elseif @pixelformula == 65 jc = jc/sin( jc ) elseif @pixelformula == 66 jc = sin( 1/jc ) elseif @pixelformula == 67 jc = cos( 1/jc ) elseif @pixelformula == 68 jc = tan( 1/jc ) elseif @pixelformula == 69 jc = cotan( 1/jc ) elseif @pixelformula == 70 jc = 1/cos( 1/jc ) elseif @pixelformula == 71 jc = 1/sin( 1/jc ) elseif @pixelformula == 72 jc = cotanh( jc ) elseif @pixelformula == 73 jc = 1/cosh( jc ) elseif @pixelformula == 74 jc = 1/sinh( jc ) elseif @pixelformula == 75 jc = atanh( 1/jc ) elseif @pixelformula == 76 jc = acosh( 1/jc ) elseif @pixelformula == 77 jc = asinh( 1/jc ) elseif @pixelformula == 78 jc = @coeffpa * jc^@exponentpa + @coeffpb * jc^@exponentpb + \ @coeffpc * jc^@exponentpc elseif @pixelformula == 79 zextra = sinh(#z) jc = zextra * zextra elseif @pixelformula == 80 zextra = cosh( jc ) jc = zextra * zextra elseif @pixelformula == 81 zextra = tanh(jc) jc = zextra * zextra elseif @pixelformula == 82 zextra = cotanh( jc ) jc = zextra * zextra elseif @pixelformula == 83 zextra = (1,0)/cosh(jc) jc = zextra * zextra elseif @pixelformula == 84 zextra = (1,0) / sinh( jc ) jc = zextra * zextra elseif @pixelformula == 85 jc = sinh(1/jc) elseif @pixelformula == 86 jc = cosh(1/jc) elseif @pixelformula == 87 jc = tanh(1/jc) elseif @pixelformula == 88 jc = cotanh(1/jc) elseif @pixelformula == 89 jc = (1,0)/cosh(1/jc) elseif @pixelformula == 90 jc = (1,0)/sinh(1/jc) elseif @pixelformula == 91 jc = sin( jc ) * tan(jc) elseif @pixelformula == 92 jc = sinh(jc) * tanh(jc) elseif @pixelformula == 93 jc = sinh(jc) * cosh(jc) elseif @pixelformula == 94 ztemp = sinh(jc), zextra = cosh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 95 ztemp = sin(jc), zextra = cos(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 96 zextra = 1/jc jc = sin(zextra)*cos(zextra) elseif @pixelformula == 97 zextra = sin( 1/jc ) jc = zextra*zextra elseif @pixelformula == 98 jc = sin(jc) * cos(1/jc) elseif @pixelformula == 99 jc = sin(jc) * sin(1/jc) elseif @pixelformula == 100 zextra = log(jc) jc = zextra*zextra elseif @pixelformula == 101 jc = sin(jc) * sin(2*jc) elseif @pixelformula == 102 jc = exp(2*jc) elseif @pixelformula == 103 jc = exp(-2*jc) elseif @pixelformula == 104 zextra = 1/jc jc = sinh(zextra)*cosh(zextra) elseif @pixelformula == 105 zextra = sinh( 1/jc ) jc = zextra*zextra elseif @pixelformula == 106 jc = sinh(jc) * cosh(1/jc) elseif @pixelformula == 107 jc = sinh(jc) * sinh(1/jc) elseif @pixelformula == 108 jc = sin(jc) * sinh(jc) elseif @pixelformula == 109 jc = sin(jc) * cosh(jc) elseif @pixelformula == 110 zextra = sin(jc), ztemp = sinh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 111 jc = sin(jc)*exp(jc) elseif @pixelformula == 112 jc = cos(jc)*exp(jc) elseif @pixelformula == 113 jc = sinh(jc)*exp(jc) elseif @pixelformula == 114 jc = cosh(jc)*exp(jc) elseif @pixelformula == 115 jc = sin(jc)*log(jc) elseif @pixelformula == 116 jc = cos(jc)*log(jc) elseif @pixelformula == 117 jc = sinh(jc)*log(jc) else ; @pixelformula == 118 jc = cosh(jc)*log(jc) endif ; @pixelformula = 1 endif ; @pixelformula != 0 loop: if @pmode != 0 z = z + jc endif ; pmode ; Execute PF1 if @pre1multiplier != (1,0) zpre1 = @pre1multiplier*z else zpre1 = z endif ; @pre1multiplier if @prefunc1 == 0 zpre1 = (1,0) elseif @prefunc1 == 2 zpre1 = 1/zpre1 elseif @prefunc1 == 3 zpre1 = zpre1*zpre1 elseif @prefunc1 == 4 zpre1 = zpre1^@pre1power elseif @prefunc1 == 5 zpre1 = exp(zpre1) elseif @prefunc1 == 6 zpre1 = exp(-zpre1) elseif @prefunc1 == 7 zpre1 = exp(zpre1^@pre1power) elseif @prefunc1 == 8 zpre1 = exp(-(zpre1^@pre1power)) elseif @prefunc1 == 9 zpre1 = sin(zpre1) elseif @prefunc1 == 10 zpre1 = cos(zpre1) elseif @prefunc1 == 11 zpre1 = sin(z^@pre1power) elseif @prefunc1 == 12 zpre1 = (sin(zpre1))^@pre1power elseif @prefunc1 == 13 zpre1 = log(zpre1) elseif @prefunc1 == 14 zpre1 = log(log(zpre1)) elseif @prefunc1 == 15 zpre1 = zpre1^zpre1 elseif @prefunc1 == 16 zpre1 = zpre1^(-zpre1) elseif @prefunc1 == 17 zpre1 = zpre1^(zpre1^@pre1power) elseif @prefunc1 == 18 zpre1 = zpre1^(-(zpre1^@pre1power)) elseif @prefunc1 == 19 zpre1 = sinh(zpre1) elseif @prefunc1 == 20 zpre1 = cosh(zpre1) elseif @prefunc1 == 21 zpre1 = sinh(zpre1^@pre1power) elseif @prefunc1 == 22 zpre1 = cosh(zpre1^@pre1power) elseif @prefunc1 == 23 zpre1 = sinh(zpre1)^@pre1power elseif @prefunc1 == 24 zpre1 = cosh(zpre1)^@pre1power elseif @prefunc1 == 25 zpre1 = zpre1 + 1 elseif @prefunc1 == 26 zpre1 = (zpre1 + 1)^@pre1power elseif @prefunc1 == 27 zpre1 = zpre1 - 1 elseif @prefunc1 == 28 zpre1 = (zpre1 - 1)^@pre1power elseif @prefunc1 == 29 zpre1 = 1 - zpre1 elseif @prefunc1 == 30 zpre1 = (1 - zpre1)^@pre1power elseif @prefunc1 == 31 zpre1 = (zpre1+1)*(zpre1-1) elseif @prefunc1 == 32 zpre1 = ((zpre1+1)*(zpre1-1))^@pre1power elseif @prefunc1 == 33 zpre1 = zpre1*zpre1+1 elseif @prefunc1 == 34 zpre1 = (zpre1*zpre1+1)^@pre1power elseif @prefunc1 == 35 zpre1 = zpre1*zpre1-1 elseif @prefunc1 == 36 zpre1 = (zpre1*zpre1-1)^@pre1power elseif @prefunc1 == 37 zpre1 = 1-zpre1*zpre1 elseif @prefunc1 == 38 zpre1 = (1-zpre1*zpre1)^@pre1power elseif @prefunc1 == 39 zpre1 = zpre1^@pre1power + 1 elseif @prefunc1 == 40 zpre1 = zpre1^@pre1power - 1 elseif @prefunc1 == 41 zpre1 = 1 - zpre1^@pre1power elseif @prefunc1 == 42 zpre1 = (zpre1 + 1)/(zpre1 - 1) elseif @prefunc1 == 43 zpre1 = ((zpre1 + 1)/(zpre1 - 1))^@pre1power elseif @prefunc1 == 44 zpre1 = (zpre1-1)/(zpre1+1) elseif @prefunc1 == 45 zpre1 = ((zpre1-1)/(zpre1+1))^@pre1power endif ; @prefunc1 ; Execute PF2 if @pre2multiplier != (1,0) zpre2 = @pre2multiplier*z else zpre2 = z endif ; @pre2multiplier if @prefunc2 == 0 zpre2 = (1,0) elseif @prefunc2 == 2 zpre2 = 1/zpre2 elseif @prefunc2 == 3 zpre2 = zpre2*zpre2 elseif @prefunc2 == 4 zpre2 = zpre2^@pre2power elseif @prefunc2 == 5 zpre2 = exp(zpre2) elseif @prefunc2 == 6 zpre2 = exp(-zpre2) elseif @prefunc2 == 7 zpre2 = exp(zpre2^@pre2power) elseif @prefunc2 == 8 zpre2 = exp(-(zpre2^@pre2power)) elseif @prefunc2 == 9 zpre2 = sin(zpre2) elseif @prefunc2 == 10 zpre2 = cos(zpre2) elseif @prefunc2 == 11 zpre2 = sin(z^@pre2power) elseif @prefunc2 == 12 zpre2 = (sin(zpre2))^@pre2power elseif @prefunc2 == 13 zpre2 = log(zpre2) elseif @prefunc2 == 14 zpre2 = log(log(zpre2)) elseif @prefunc2 == 15 zpre2 = zpre2^zpre2 elseif @prefunc2 == 16 zpre2 = zpre2^(-zpre2) elseif @prefunc2 == 17 zpre2 = zpre2^(zpre2^@pre2power) elseif @prefunc2 == 18 zpre2 = zpre2^(-(zpre2^@pre2power)) elseif @prefunc2 == 19 zpre2 = sinh(zpre2) elseif @prefunc2 == 20 zpre2 = cosh(zpre2) elseif @prefunc2 == 21 zpre2 = sinh(zpre2^@pre2power) elseif @prefunc2 == 22 zpre2 = cosh(zpre2^@pre2power) elseif @prefunc2 == 23 zpre2 = sinh(zpre2)^@pre2power elseif @prefunc2 == 24 zpre2 = cosh(zpre2)^@pre2power elseif @prefunc2 == 25 zpre2 = zpre2 + 1 elseif @prefunc2 == 26 zpre2 = (zpre2 + 1)^@pre2power elseif @prefunc2 == 27 zpre2 = zpre2 - 1 elseif @prefunc2 == 28 zpre2 = (zpre2 - 1)^@pre2power elseif @prefunc2 == 29 zpre2 = 1 - zpre2 elseif @prefunc2 == 30 zpre2 = (1 - zpre2)^@pre2power elseif @prefunc2 == 31 zpre2 = (zpre2+1)*(zpre2-1) elseif @prefunc2 == 32 zpre2 = ((zpre2+1)*(zpre2-1))^@pre2power elseif @prefunc2 == 33 zpre2 = zpre2*zpre2+1 elseif @prefunc2 == 34 zpre2 = (zpre2*zpre2+1)^@pre2power elseif @prefunc2 == 35 zpre2 = zpre2*zpre2-1 elseif @prefunc2 == 36 zpre2 = (zpre2*zpre2-1)^@pre2power elseif @prefunc2 == 37 zpre2 = 1-zpre2*zpre2 elseif @prefunc2 == 38 zpre2 = (1-zpre2*zpre2)^@pre2power elseif @prefunc2 == 39 zpre2 = zpre2^@pre2power + 1 elseif @prefunc2 == 40 zpre2 = zpre2^@pre2power - 1 elseif @prefunc2 == 41 zpre2 = 1 - zpre2^@pre2power elseif @prefunc2 == 42 zpre2 = (zpre2 + 1)/(zpre2 - 1) elseif @prefunc2 == 43 zpre2 = ((zpre2 + 1)/(zpre2 - 1))^@pre2power elseif @prefunc2 == 44 zpre2 = (zpre2-1)/(zpre2+1) elseif @prefunc2 == 45 zpre2 = ((zpre2-1)/(zpre2+1))^@pre2power endif ; @prefunc2 ; Execute argument function if @argmultiplier != (1,0) zarg = @argmultiplier*z else zarg = z endif ; @argmultiplier if @argument == 1 zarg = 1/zarg elseif @argument == 2 zarg = zarg*zarg elseif @argument == 3 zarg = zarg^@argpower elseif @argument == 4 zarg = exp(zarg) elseif @argument == 5 zarg = exp(-zarg) elseif @argument == 6 zarg = exp(zarg^@argpower) elseif @argument == 7 zarg = exp(-(zarg^@argpower)) elseif @argument == 8 zarg = sin(zarg) elseif @argument == 9 zarg = cos(zarg) elseif @argument == 10 zarg = sin(z^@argpower) elseif @argument == 11 zarg = (sin(zarg))^@argpower elseif @argument == 12 zarg = log(zarg) elseif @argument == 13 zarg = log(log(zarg)) elseif @argument == 14 zarg = zarg^zarg elseif @argument == 15 zarg = zarg^(-zarg) elseif @argument == 16 zarg = zarg^(zarg^@argpower) elseif @argument == 17 zarg = zarg^(-(zarg^@argpower)) elseif @argument == 18 zarg = sinh(zarg) elseif @argument == 19 zarg = cosh(zarg) elseif @argument == 20 zarg = sinh(zarg^@argpower) elseif @argument == 21 zarg = cosh(zarg^@argpower) elseif @argument == 22 zarg = sinh(zarg)^@argpower elseif @argument == 23 zarg = cosh(zarg)^@argpower elseif @argument == 24 zarg = zarg + 1 elseif @argument == 25 zarg = (zarg + 1)^@argpower elseif @argument == 26 zarg = zarg - 1 elseif @argument == 27 zarg = (zarg - 1)^@argpower elseif @argument == 28 zarg = 1 - zarg elseif @argument == 29 zarg = (1 - zarg)^@argpower elseif @argument == 30 zarg = (zarg+1)*(zarg-1) elseif @argument == 31 zarg = ((zarg+1)*(zarg-1))^@argpower elseif @argument == 32 zarg = zarg*zarg+1 elseif @argument == 33 zarg = (zarg*zarg+1)^@argpower elseif @argument == 34 zarg = zarg*zarg-1 elseif @argument == 35 zarg = (zarg*zarg-1)^@argpower elseif @argument == 36 zarg = 1-zarg*zarg elseif @argument == 37 zarg = (1-zarg*zarg)^@argpower elseif @argument == 38 zarg = zarg^@argpower + 1 elseif @argument == 39 zarg = zarg^@argpower - 1 elseif @argument == 40 zarg = 1 - zarg^@argpower elseif @argument == 41 zarg = (zarg + 1)/(zarg - 1) elseif @argument == 42 zarg = ((zarg + 1)/(zarg - 1))^@argpower elseif @argument == 43 zarg = (zarg-1)/(zarg+1) elseif @argument == 44 zarg = ((zarg-1)/(zarg+1))^@argpower endif ; @argument if @static ; standard 11-term Taylor expansion ; Execute the hypergeometric formula z2 = zarg*zarg, z3 = z2*zarg, z4 = z3*zarg, z5 = z4*zarg, z6 = z5*zarg z7 = z6*zarg, z8 = z7*zarg, z9 = z8*zarg z = coeff0 + coeff1*zarg + coeff2*z2 + coeff3*z3 + coeff4*z4 + \ coeff5*z5 + coeff6*z6 + coeff7*z7 + coeff8*z8 + \ coeff9*z9 + coeff10*z9*zarg z = zpre1*zpre2*z else ; dynamic number of terms, based on iteration count iter = iter + 1 if iter > 1 if @p == 0 numerator1 = numerator1 elseif @p == 1 a1_1 = a1_1 + @ca1 numerator1 = numerator1*a1_1 elseif @p == 2 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2 numerator1 = numerator1*a1_1*a2_1 elseif @p == 3 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2, a3_1 = a3_1 + @ca3 numerator1 = numerator1*a1_1*a2_1*a3_1 elseif @p == 4 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2, a3_1 = a3_1 + @ca3 a4_1 = a4_1 + @ca4 numerator1 = numerator1*a1_1*a2_1*a3_1*a4_1 elseif @p == 5 a1_1 = a1_1 + @ca1, a2_1 = a2_1 + @ca2, a3_1 = a3_1 + @ca3 a4_1 = a4_1 + @ca4, a5_1 = a5_1 + @ca5 numerator1 = numerator1*a1_1*a2_1*a3_1*a4_1*a5_1 endif ; @p if @q == 0 ; store denominator in variable coeff1 coeff1 = coeff1 elseif @q == 1 b1_1 = b1_1 + @cb1 coeff1 = coeff1*b1_1 elseif @q == 2 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2 coeff1 = coeff1*b1_1*b2_1 elseif @q == 3 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2, b3_1 = b3_1 + @cb3 coeff1 = coeff1*b1_1*b2_1*b3_1 elseif @q == 4 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2, b3_1 = b3_1 + @cb3 b4_1 = b4_1 + @cb4 coeff1 = coeff1*b1_1*b2_1*b3_1*b4_1 elseif @q == 5 b1_1 = b1_1 + @cb1, b2_1 = b2_1 + @cb2, b3_1 = b3_1 + @cb3 b4_1 = b4_1 + @cb4, b5_1 = b5_1 + @cb5 coeff1 = coeff1*b1_1*b2_1*b3_1*b4_1*b5_1 endif ; @q zarg = numerator1*(zarg^iter)/(iter*coeff1) elseif iter == 0 zarg = (1,0) ; first series term is always constant, 1 else ; iter == 1 if @p == 0 numerator1 = numerator1 elseif @p == 1 numerator1 = a1_1 elseif @p == 2 numerator1 = a1_1*a2_1 elseif @p == 3 numerator1 = a1_1*a2_1*a3_1 elseif @p == 4 numerator1 = a1_1*a2_1*a3_1*a4_1 elseif @p == 5 numerator1 = a1_1*a2_1*a3_1*a4_1*a5_1 endif ; @p if @q == 0 ; store denominator in variable coeff1 coeff1 = coeff1 elseif @q == 1 coeff1 = b1_1 elseif @q == 2 coeff1 = b1_1*b2_1 elseif @q == 3 coeff1 = b1_1*b2_1*b3_1 elseif @q == 4 coeff1 = b1_1*b2_1*b3_1*b4_1 elseif @q == 5 coeff1 = b1_1*b2_1*b3_1*b4_1*b5_1 endif ; @q zarg = numerator1*zarg/coeff1 endif ; iter if iter >= @skipped if @alternate if iter%2 == 0 sign = 1.0 else sign = -1.0 endif ; sign endif ; @alternate z = z + sign*zpre1*zpre2*zarg endif ; iter endif ; @static if @pmode != 1 z = z + jc endif ; pmode bailout: |z| < @bail default: title = "zHypergeometric pFq Explorer" center = (0,0) maxiter = 100 method = multipass periodicity = 0 magn = 0.25 heading caption = "There is a newer version of this formula" endheading param p caption = "Numerator Constants" min = 0 max = 5 default = 2 hint = "This is p, the number of distinct numerator parameters used as input \ to the generalized hypergeometric function \ pFq(a1,a2,...,ap;b1,b2,...,bq;z). Enter 0-5" endparam param q caption = "Denominator Constants" min = 0 max = 5 default = 2 hint = "This is q, the number of distinct denominator parameters used as \ input to the generalized hypergeometric function \ pFq(a1,a2,...,ap;b1,b2,...,bq;z). Enter 0-5" endparam param switchvars caption = "Switch Variables" enum = "a1 a2" "a1 b1" "b1 b2" default = 0 hint = "These are the 2 hypergeometric function constants that will be \ varied by cursor movement during a switch; the others should be \ entered manually below, if desired, using the appropriate params" endparam param switchconst caption = "Switch Constant" default = (0.5,0.5) hint = "This is a dummy variable used to set the HG function constants \ during a switch, and should not be set manually. After the switch, \ the two 'Switch Variables' can be read from the real/imag parts of \ this parameter" endparam param a1 caption = "Constant a1" default = (0.5,0.0) hint = "This is the first constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 0" endparam param a2 caption = "Constant a2" default = (0.5,0.0) hint = "This is the second constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 1" endparam param a3 caption = "Constant a3" default = (0.5,0.0) hint = "This is the third constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 2" endparam param a4 caption = "Constant a4" default = (0.5,0.0) hint = "This is the fourth constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 3" endparam param a5 caption = "Constant a5" default = (0.5,0.0) hint = "This is the fifth constant used to define the numerator of the \ hypergeometric function, if 'Numerator Constants' > 4" endparam param b1 caption = "Constant b1" default = (1.0,0.0) hint = "This is the first constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 0" endparam param b2 caption = "Constant b2" default = (1.0,0.0) hint = "This is the second constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 1" endparam param b3 caption = "Constant b3" default = (0.75,0.0) hint = "This is the third constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 2" endparam param b4 caption = "Constant b4" default = (0.75,0.0) hint = "This is the fourth constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 3" endparam param b5 caption = "Constant b5" default = (0.75,0.0) hint = "This is the fifth constant used to define the denominator of the \ hypergeometric function, if 'Denominator Constants' > 4" endparam param argument caption = "Argument Function" default = 0 enum = "z" "1/z" "z^2" "z^power" "e^z" "e^-z" "e^z^power" "e^-(z^power)" \ "sin z" "cos z" "sin(z^power)" "(sin z)^power" "log z" "loglog z" "z^z" \ "z^-z" "z^z^power" "z^-(z^power)" "sinh z" "cosh z" "sinh z^power" \ "cosh z^power" "(sinh z)^power" "(cosh z)^power" "z+1" "(z+1)^power" \ "z-1" "(z-1)^power" "1-z" "(1-z)^power" "(z+1)(z-1)" "((z+1)(z-1))^power" \ "z^2 + 1" "(z^2 + 1)^power" "z^2 - 1" "(z^2 - 1)^power" "1-z^2" \ "(1-z^2)^power" "z^power + 1" "z^power - 1" "1 - z^power" "(z+1)/(z-1)" \ "((z+1)/(z-1))^power" "(z-1)/(z+1)" "((z-1)/(z+1))^power" hint = "This is the argument to the hypergeometric series; z can be modified \ by this function prior to being fed to the HG" endparam param argpower caption = "Argument Power" default = (2,0) hint = "If param 'Argument Function' needs an exponent, this is it" endparam param argmultiplier caption = "Argument Multiplier" default = (1,0) hint = "z is multiplied by this value before being modified by 'Argument Function'" endparam param prefunc1 caption = "Prefunction 1" default = 0 enum = "none" "z" "1/z" "z^2" "z^power" "e^z" "e^-z" "e^z^power" "e^-(z^power)" \ "sin z" "cos z" "sin(z^power)" "(sin z)^power" "log z" "loglog z" "z^z" \ "z^-z" "z^z^power" "z^-(z^power)" "sinh z" "cosh z" "sinh z^power" \ "cosh z^power" "(sinh z)^power" "(cosh z)^power" "z+1" "(z+1)^power" \ "z-1" "(z-1)^power" "1-z" "(1-z)^power" "(z+1)(z-1)" "((z+1)(z-1))^power" \ "z^2 + 1" "(z^2 + 1)^power" "z^2 - 1" "(z^2 - 1)^power" "1-z^2" \ "(1-z^2)^power" "z^power + 1" "z^power - 1" "1 - z^power" "(z+1)/(z-1)" \ "((z+1)/(z-1))^power" "(z-1)/(z+1)" "((z-1)/(z+1))^power" hint = "The hypergeometric function can be multiplied by this function" endparam param pre1power caption = "PF 1 Power" default = (2,0) hint = "If param 'Prefunction 1' needs an exponent, this is it" endparam param pre1multiplier caption = "PF 1 Multiplier" default = (1,0) hint = "z is multiplied by this value before being fed to 'Prefunction 1'" endparam param prefunc2 caption = "Prefunction 2" default = 0 enum = "none" "z" "1/z" "z^2" "z^power" "e^z" "e^-z" "e^z^power" "e^-(z^power)" \ "sin z" "cos z" "sin(z^power)" "(sin z)^power" "log z" "loglog z" "z^z" \ "z^-z" "z^z^power" "z^-(z^power)" "sinh z" "cosh z" "sinh z^power" \ "cosh z^power" "(sinh z)^power" "(cosh z)^power" "z+1" "(z+1)^power" \ "z-1" "(z-1)^power" "1-z" "(1-z)^power" "(z+1)(z-1)" "((z+1)(z-1))^power" \ "z^2 + 1" "(z^2 + 1)^power" "z^2 - 1" "(z^2 - 1)^power" "1-z^2" \ "(1-z^2)^power" "z^power + 1" "z^power - 1" "1 - z^power" "(z+1)/(z-1)" \ "((z+1)/(z-1))^power" "(z-1)/(z+1)" "((z-1)/(z+1))^power" hint = "The hypergeometric function can be multiplied by this function" endparam param pre2power caption = "PF 2 Power" default = (2,0) hint = "If param 'Prefunction 2' needs an exponent, this is it" endparam param pre2multiplier caption = "PF 2 Multiplier" default = (1,0) hint = "z is multiplied by this value before being fed to 'Prefunction 2'" endparam param ca1 caption = "a1 Increment" default = (1,0) hint = "This is the amount that constant a1 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 0" endparam param ca2 caption = "a2 Increment" default = (1,0) hint = "This is the amount that constant a2 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 1" endparam param ca3 caption = "a3 Increment" default = (1,0) hint = "This is the amount that constant a3 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 2" endparam param ca4 caption = "a4 Increment" default = (1,0) hint = "This is the amount that constant a4 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 3" endparam param ca5 caption = "a5 Increment" default = (1,0) hint = "This is the amount that constant a5 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Numerator Constants' > 4" endparam param cb1 caption = "b1 Increment" default = (1,0) hint = "This is the amount that constant b1 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 0" endparam param cb2 caption = "b2 Increment" default = (1,0) hint = "This is the amount that constant b2 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 1" endparam param cb3 caption = "b3 Increment" default = (1,0) hint = "This is the amount that constant b3 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 2" endparam param cb4 caption = "b4 Increment" default = (1,0) hint = "This is the amount that constant b4 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 3" endparam param cb5 caption = "b5 Increment" default = (1,0) hint = "This is the amount that constant b5 is increased in each \ successive term of the series expansion of the hypergeometric \ function, if 'Denominator Constants' > 4" endparam param static caption = "Static Mode" default = TRUE hint = "If enabled, a static, 11-term Taylor series is used to define \ the hypergeometric function; otherwise, the series is dynamically \ summed based on the current iteration count" endparam param skipped caption = "Terms to Skip" default = 0 min = 0 hint = "In Dynamic mode only, this number of terms in the hypergeometric \ series will be skipped" endparam param alternate caption = "Alternate Terms?" default = FALSE hint = "In Dynamic mode only, if enabled, the terms of the hypergeometric \ series will alternate in sign" endparam param pixelformula caption = "Pixel Formula" enum = "p" "p^2" "p^3" "p^4" "p^power" "1/p" "sqrt(p)" "1/p^2" "log(p)" "e^p" \ "p^p" "sin(p)" "cos(p)" \ "tan(p)" "asin(p)" "acos(p)" "atan(p)" "sinh(p)" "cosh(p)" "tanh(p)" \ "asinh(p)" "acosh(p)" "atanh(p)" "log(1/p)" "log(log(p))" "e^-p" \ "e^(1/p)" "p^-p" "sin(p)^2" "cos(p)^2" "tan(p)^2" "cot(p)" "sec(p)" \ "csc(p)" "cot(p)^2" "sec(p)^2" "csc(p)^2" "p^p^p" "1/p^p^p" "log(-p)" \ "1/log(p)" "plog(p)" "sin(p)/p" "cos(p)/p" "sin(p)*cos(p)" "sin(p^2)" \ "e^(-1/p)" "pe^p" "pe^-p" "pe^(1/p)" "pe^(-1/p)" "p^3" "1/p^3" \ "acot(p)" "asec(p)" "acsc(p)" "tan(p)/p" "cot(p)/p" "sec(p)/p" \ "csc(p)/p" "psin(p)" "pcos(p)" "ptan(p)" "pcot(p)" "psec(p)" "pcsc(p)" \ "sin(1/p)" "cos(1/p)" "tan(1/p)" "cot(1/p)" "sec(1/p)" "csc(1/p)" \ "cotanh(p)" "sech(p)" "cosech(p)" "acoth(p)" "asech(p)" "acosech(p)" \ "3-term polynomial" "sinh(p)^2" "cosh(p)^2" "tanh(p)^2" "cotanh(p)^2" \ "sech(p)^2" "cosech(p)^2" "sinh(1/p)" "cosh(1/p)" "tanh(1/p)" \ "cotanh(1/p)" "sech(1/p)" "cosech(1/p)" "sin(p)tan(p)" "sinh(p)tanh(p)" \ "sinh(p)cosh(p)" "sinh(p)^2*cosh(p)^2" "sin(p)^2*cos(p)^2" \ "sin(1/p)*cos(1/p)" "sin(1/p)^2" "sin(p)cos(1/p)" "sin(p)sin(1/p)" \ "log(p)^2" "sin(p)sin(2p)" "e^2p" "e^-2p" "sinh(1/p)cosh(1/p)" \ "sinh(1/p)^2" "sinh(p)cosh(1/p)" "sinh(p)sinh(1/p)" "sin(p)sinh(p)" \ "sin(p)cosh(p)" "sin(p)^2*sinh(p)^2" "sin(p)e^p" "cos(p)e^p" \ "sinh(p)e^p" "cosh(p)e^p" "sin(p)log(p)" "cos(p)log(p)" "sinh(p)log(p)" \ "cosh(p)log(p)" default = 0 hint = "Pixel value (Mand) or seed (Julia) can be initialized \ before iterating. For 'p^power', set parameter 'Pixel Power'; \ for '3-term polynomial', set 'Coeff Pa', 'Exponent Pa', 'Coeff Pb', \ 'Exponent Pb', 'Coeff Pc', 'Exponent Pc'. 'p' results in normal \ initialization" endparam param ppower caption = "Pixel Power" default = (5,0) hint = "This is the power used if parameter \ 'Pixel Formula' is set to 'p^power'" endparam param coeffpa caption = "Coeff Pa" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 1st term" endparam param exponentpa caption = "Exponent Pa" default = (6,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 1st term" endparam param coeffpb caption = "Coeff Pb" default = (-1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" endparam param exponentpb caption = "Exponent Pb" default = (4,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 2nd term" endparam param coeffpc caption = "Coeff Pc" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" endparam param exponentpc caption = "Exponent Pc" default = (2,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 3rd term" endparam param pmode caption = "Pixel Mode" default = 0 enum = "Post-add" "Pre-add" "Both" hint = "'Post-add' -- formula is executed, then pixel/constant is added to result; \ 'Pre-add' -- pixel is added to z, then formula executed; 'Both' -- pixel added, \ formula executed, then pixel added again to result" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param bail caption = "Bailout Value" default = 64.0 hint = "Value needed to 'escape' to infinity" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Plot type. Enabled = Mandelbrot, disabled = Julia" endparam switch: type = "jam-hypergeometricPFQ-explorer" jconstant = jconstant bail = bail switchconst = #pixel switchvars = switchvars p = p q = q a1 = a1 a2 = a2 a3 = a3 a4 = a4 a5 = a5 b1 = b1 b2 = b2 b3 = b3 b4 = b4 b5 = b5 argument = argument argpower = argpower argmultiplier = argmultiplier prefunc1 = prefunc1 pre1power = pre1power pre1multiplier = pre1multiplier prefunc2 = prefunc2 pre2power = pre2power pre2multiplier = pre2multiplier ca1 = ca1 ca2 = ca2 ca3 = ca3 ca4 = ca4 ca5 = ca5 cb1 = cb1 cb2 = cb2 cb3 = cb3 cb4 = cb4 cb5 = cb5 static = static skipped = skipped alternate = alternate pixelformula = pixelformula ppower = ppower coeffpa = coeffpa exponentpa = exponentpa coeffpb = coeffpb exponentpb = exponentpb coeffpc = coeffpc exponentpc = exponentpc pmode = pmode mandy = mandy } jam-3stageGen { ; jam 020430 ; 2 or 3 different Mandelbrot/Julia style formulas are executed ; and combined in a user-specified manner, either each iteration ; or every N iterations. Each formula may depend on the current z ; or any of the previous 5 z's. The primary formula, Formula F, ; is executed every iteration, while the other 2 formulas (G & H) ; may execute each iteration, or only intermittently every N iters. ; To use just 2 formulas, set 'Formula H' to 'none'. ; Questions/comments to Joe Maddry (maddry@sri.org). Thanks! init: if @mandy z = @jconstant, jc = #pixel else z = #pixel, jc = @jconstant endif int iterations = 0 complex zextra = complex ztemp = (0,0) ; temp/spare scratch variable complex zold = complex zold2 = complex zold3 = complex zold4 = complex zold5 = (0,0) complex ztemp1 = complex ztemp2 = complex ztemp3 = (0,0) ; Pixel/constant initialization section if @pixelformula != 0 if @pixelformula == 1 jc = jc * jc elseif @pixelformula == 2 jc = jc * jc * jc elseif @pixelformula == 3 zextra = jc * jc jc = zextra * zextra elseif @pixelformula == 4 jc = jc ^ @ppower elseif @pixelformula == 5 jc = 1/jc elseif @pixelformula == 6 jc = sqrt(jc) elseif @pixelformula == 7 jc = 1 / ( jc * jc ) elseif @pixelformula == 8 jc = log(jc) elseif @pixelformula == 9 jc = exp( jc) elseif @pixelformula == 10 jc = jc^jc elseif @pixelformula == 11 jc = sin( jc ) elseif @pixelformula == 12 jc = cos( jc ) elseif @pixelformula == 13 jc = tan( jc ) elseif @pixelformula == 14 jc = asin( jc ) elseif @pixelformula == 15 jc = acos( jc ) elseif @pixelformula == 16 jc = atan( jc ) elseif @pixelformula == 17 jc = sinh( jc ) elseif @pixelformula == 18 jc = cosh( jc ) elseif @pixelformula == 19 jc = tanh( jc ) elseif @pixelformula == 20 jc = asinh( jc ) elseif @pixelformula == 21 jc = acosh( jc ) elseif @pixelformula == 22 jc = atanh( jc ) elseif @pixelformula == 23 jc = log( 1/jc ) elseif @pixelformula == 24 jc = log( log( jc )) elseif @pixelformula == 25 jc = exp( -jc ) elseif @pixelformula == 26 jc = exp( 1/jc ) elseif @pixelformula == 27 jc = jc^(-jc) elseif @pixelformula == 28 zextra = sin( jc ) jc = zextra * zextra elseif @pixelformula == 29 zextra = cos( jc ) jc = zextra * zextra elseif @pixelformula == 30 zextra = tan( jc ) jc = zextra * zextra elseif @pixelformula == 31 jc = cotan( jc ) elseif @pixelformula == 32 jc = 1/cos( jc ) elseif @pixelformula == 33 jc = 1/sin( jc ) elseif @pixelformula == 34 zextra = cotan( jc ) jc = zextra * zextra elseif @pixelformula == 35 zextra = 1/cos( jc ) jc = zextra * zextra elseif @pixelformula == 36 zextra = 1/sin( jc ) jc = zextra * zextra elseif @pixelformula == 37 zextra = jc^(jc) jc = jc^zextra elseif @pixelformula == 38 zextra = jc^(jc) jc = 1/( jc^zextra ) elseif @pixelformula == 39 jc = log(-jc) elseif @pixelformula == 40 jc = 1/log( jc ) elseif @pixelformula == 41 jc = jc * log( jc ) elseif @pixelformula == 42 jc = sin( jc ) / jc elseif @pixelformula == 43 jc = cos( jc ) / jc elseif @pixelformula == 44 jc = sin( jc ) * cos( jc ) elseif @pixelformula == 45 jc = sin( jc^2 ) elseif @pixelformula == 46 jc = exp( -1/jc ) elseif @pixelformula == 47 jc = jc * exp( jc ) elseif @pixelformula == 48 jc = jc * exp( -jc ) elseif @pixelformula == 49 jc = jc * exp( 1/jc ) elseif @pixelformula == 50 jc = jc * exp( -1/jc ) elseif @pixelformula == 51 jc = jc * jc * jc elseif @pixelformula == 52 jc = 1 / ( jc * jc * jc ) elseif @pixelformula == 53 jc = atan( 1 / jc ) elseif @pixelformula == 54 jc = acos( 1 / jc ) elseif @pixelformula == 55 jc = asin( 1 / jc ) elseif @pixelformula == 56 jc = tan( jc ) / jc elseif @pixelformula == 57 jc = cotan( jc ) / jc elseif @pixelformula == 58 jc = 1 / ( jc * cos( jc )) elseif @pixelformula == 59 jc = 1 / ( jc * sin( jc )) elseif @pixelformula == 60 jc = jc * sin( jc ) elseif @pixelformula == 61 jc = jc * cos( jc ) elseif @pixelformula == 62 jc = jc * tan( jc ) elseif @pixelformula == 63 jc = jc * cotan( jc ) elseif @pixelformula == 64 jc = jc/cos( jc ) elseif @pixelformula == 65 jc = jc/sin( jc ) elseif @pixelformula == 66 jc = sin( 1/jc ) elseif @pixelformula == 67 jc = cos( 1/jc ) elseif @pixelformula == 68 jc = tan( 1/jc ) elseif @pixelformula == 69 jc = cotan( 1/jc ) elseif @pixelformula == 70 jc = 1/cos( 1/jc ) elseif @pixelformula == 71 jc = 1/sin( 1/jc ) elseif @pixelformula == 72 jc = cotanh( jc ) elseif @pixelformula == 73 jc = 1/cosh( jc ) elseif @pixelformula == 74 jc = 1/sinh( jc ) elseif @pixelformula == 75 jc = atanh( 1/jc ) elseif @pixelformula == 76 jc = acosh( 1/jc ) elseif @pixelformula == 77 jc = asinh( 1/jc ) elseif @pixelformula == 78 jc = @coeffpa * jc^@exponentpa + @coeffpb * jc^@exponentpb + \ @coeffpc * jc^@exponentpc elseif @pixelformula == 79 zextra = sinh(#z) jc = zextra * zextra elseif @pixelformula == 80 zextra = cosh( jc ) jc = zextra * zextra elseif @pixelformula == 81 zextra = tanh(jc) jc = zextra * zextra elseif @pixelformula == 82 zextra = cotanh( jc ) jc = zextra * zextra elseif @pixelformula == 83 zextra = (1,0)/cosh(jc) jc = zextra * zextra elseif @pixelformula == 84 zextra = (1,0) / sinh( jc ) jc = zextra * zextra elseif @pixelformula == 85 jc = sinh(1/jc) elseif @pixelformula == 86 jc = cosh(1/jc) elseif @pixelformula == 87 jc = tanh(1/jc) elseif @pixelformula == 88 jc = cotanh(1/jc) elseif @pixelformula == 89 jc = (1,0)/cosh(1/jc) elseif @pixelformula == 90 jc = (1,0)/sinh(1/jc) elseif @pixelformula == 91 jc = sin( jc ) * tan(jc) elseif @pixelformula == 92 jc = sinh(jc) * tanh(jc) elseif @pixelformula == 93 jc = sinh(jc) * cosh(jc) elseif @pixelformula == 94 ztemp = sinh(jc), zextra = cosh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 95 ztemp = sin(jc), zextra = cos(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 96 zextra = 1/jc jc = sin(zextra)*cos(zextra) elseif @pixelformula == 97 zextra = sin( 1/jc ) jc = zextra*zextra elseif @pixelformula == 98 jc = sin(jc) * cos(1/jc) elseif @pixelformula == 99 jc = sin(jc) * sin(1/jc) elseif @pixelformula == 100 zextra = log(jc) jc = zextra*zextra elseif @pixelformula == 101 jc = sin(jc) * sin(2*jc) elseif @pixelformula == 102 jc = exp(2*jc) elseif @pixelformula == 103 jc = exp(-2*jc) elseif @pixelformula == 104 zextra = 1/jc jc = sinh(zextra)*cosh(zextra) elseif @pixelformula == 105 zextra = sinh( 1/jc ) jc = zextra*zextra elseif @pixelformula == 106 jc = sinh(jc) * cosh(1/jc) elseif @pixelformula == 107 jc = sinh(jc) * sinh(1/jc) elseif @pixelformula == 108 jc = sin(jc) * sinh(jc) elseif @pixelformula == 109 jc = sin(jc) * cosh(jc) elseif @pixelformula == 110 zextra = sin(jc), ztemp = sinh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 111 jc = sin(jc)*exp(jc) elseif @pixelformula == 112 jc = cos(jc)*exp(jc) elseif @pixelformula == 113 jc = sinh(jc)*exp(jc) elseif @pixelformula == 114 jc = cosh(jc)*exp(jc) elseif @pixelformula == 115 jc = sin(jc)*log(jc) elseif @pixelformula == 116 jc = cos(jc)*log(jc) elseif @pixelformula == 117 jc = sinh(jc)*log(jc) else ; @pixelformula == 118 jc = cosh(jc)*log(jc) endif ; @pixelformula = 1 endif ; @pixelformula != 0 loop: iterations = iterations + 1 if @fgen == 0 ztemp1 = z elseif @fgen == 1 ztemp1 = zold elseif @fgen == 2 ztemp1 = zold2 elseif @fgen == 3 ztemp1 = zold3 elseif @fgen == 4 ztemp1 = zold4 elseif @fgen == 5 ztemp1 = zold5 endif ; @fgen if @ggen == 0 ztemp2 = z elseif @ggen == 1 ztemp2 = zold elseif @ggen == 2 ztemp2 = zold2 elseif @ggen == 3 ztemp2 = zold3 elseif @ggen == 4 ztemp2 = zold4 elseif @ggen == 5 ztemp2 = zold5 endif ; @ggen if @hgen == 0 ztemp3 = z elseif @hgen == 1 ztemp3 = zold elseif @hgen == 2 ztemp3 = zold2 elseif @hgen == 3 ztemp3 = zold3 elseif @hgen == 4 ztemp3 = zold4 elseif @hgen == 5 ztemp3 = zold5 endif ; @hgen zold5 = zold4 zold4 = zold3 zold3 = zold2 zold2 = zold zold = z if @pmode != 0 ztemp1 = ztemp1 + jc endif ; pmode if @formula1 == 0 ztemp1 = ztemp1 * ztemp1 elseif @formula1 == 1 ztemp1 = ztemp1 * ztemp1 * ztemp1 elseif @formula1 == 2 ztemp1extra = ztemp1 * ztemp1 ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 3 ztemp1 = ztemp1 ^ @power1 elseif @formula1 == 4 ztemp1 = 1/ztemp1 elseif @formula1 == 5 ztemp1 = sqrt(ztemp1) elseif @formula1 == 6 ztemp1 = 1 / ( ztemp1 * ztemp1 ) elseif @formula1 == 7 ztemp1 = log(ztemp1) elseif @formula1 == 8 ztemp1 = exp( ztemp1) elseif @formula1 == 9 ztemp1 = ztemp1^ztemp1 elseif @formula1 == 10 ztemp1 = sin( ztemp1 ) elseif @formula1 == 11 ztemp1 = cos( ztemp1 ) elseif @formula1 == 12 ztemp1 = tan( ztemp1 ) elseif @formula1 == 13 ztemp1 = asin( ztemp1 ) elseif @formula1 == 14 ztemp1 = acos( ztemp1 ) elseif @formula1 == 15 ztemp1 = atan( ztemp1 ) elseif @formula1 == 16 ztemp1 = sinh( ztemp1 ) elseif @formula1 == 17 ztemp1 = cosh( ztemp1 ) elseif @formula1 == 18 ztemp1 = tanh( ztemp1 ) elseif @formula1 == 19 ztemp1 = asinh( ztemp1 ) elseif @formula1 == 20 ztemp1 = acosh( ztemp1 ) elseif @formula1 == 21 ztemp1 = atanh( ztemp1 ) elseif @formula1 == 22 ztemp1 = log( 1/ztemp1 ) elseif @formula1 == 23 ztemp1 = log( log( ztemp1 )) elseif @formula1 == 24 ztemp1 = exp( -ztemp1 ) elseif @formula1 == 25 ztemp1 = exp( 1/ztemp1 ) elseif @formula1 == 26 ztemp1 = ztemp1^(-ztemp1) elseif @formula1 == 27 ztemp1extra = sin( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 28 ztemp1extra = cos( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 29 ztemp1extra = tan( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 30 ztemp1 = cotan( ztemp1 ) elseif @formula1 == 31 ztemp1 = 1/cos( ztemp1 ) elseif @formula1 == 32 ztemp1 = 1/sin( ztemp1 ) elseif @formula1 == 33 ztemp1extra = cotan( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 34 ztemp1extra = 1/cos( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 35 ztemp1extra = 1/sin( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 36 ztemp1extra = ztemp1^(ztemp1) ztemp1 = ztemp1^ztemp1extra elseif @formula1 == 37 ztemp1extra = ztemp1^(ztemp1) ztemp1 = 1/( ztemp1^ztemp1extra ) elseif @formula1 == 38 ztemp1 = log(-ztemp1) elseif @formula1 == 39 ztemp1 = 1/log( ztemp1 ) elseif @formula1 == 40 ztemp1 = ztemp1 * log( ztemp1 ) elseif @formula1 == 41 ztemp1 = sin( ztemp1 ) / ztemp1 elseif @formula1 == 42 ztemp1 = cos( ztemp1 ) / ztemp1 elseif @formula1 == 43 ztemp1 = sin( ztemp1 ) * cos( ztemp1 ) elseif @formula1 == 44 ztemp1 = sin( ztemp1^2 ) elseif @formula1 == 45 ztemp1 = exp( -1/ztemp1 ) elseif @formula1 == 46 ztemp1 = ztemp1 * exp( ztemp1 ) elseif @formula1 == 47 ztemp1 = ztemp1 * exp( -ztemp1 ) elseif @formula1 == 48 ztemp1 = ztemp1 * exp( 1/ztemp1 ) elseif @formula1 == 49 ztemp1 = ztemp1 * exp( -1/ztemp1 ) elseif @formula1 == 50 ztemp1 = ztemp1 * ztemp1 * ztemp1 elseif @formula1 == 51 ztemp1 = 1 / ( ztemp1 * ztemp1 * ztemp1 ) elseif @formula1 == 52 ztemp1 = atan( 1 / ztemp1 ) elseif @formula1 == 53 ztemp1 = acos( 1 / ztemp1 ) elseif @formula1 == 54 ztemp1 = asin( 1 / ztemp1 ) elseif @formula1 == 55 ztemp1 = tan( ztemp1 ) / ztemp1 elseif @formula1 == 56 ztemp1 = cotan( ztemp1 ) / ztemp1 elseif @formula1 == 57 ztemp1 = 1 / ( ztemp1 * cos( ztemp1 )) elseif @formula1 == 58 ztemp1 = 1 / ( ztemp1 * sin( ztemp1 )) elseif @formula1 == 59 ztemp1 = ztemp1 * sin( ztemp1 ) elseif @formula1 == 60 ztemp1 = ztemp1 * cos( ztemp1 ) elseif @formula1 == 61 ztemp1 = ztemp1 * tan( ztemp1 ) elseif @formula1 == 62 ztemp1 = ztemp1 * cotan( ztemp1 ) elseif @formula1 == 63 ztemp1 = ztemp1/cos( ztemp1 ) elseif @formula1 == 64 ztemp1 = ztemp1/sin( ztemp1 ) elseif @formula1 == 65 ztemp1 = sin( 1/ztemp1 ) elseif @formula1 == 66 ztemp1 = cos( 1/ztemp1 ) elseif @formula1 == 67 ztemp1 = tan( 1/ztemp1 ) elseif @formula1 == 68 ztemp1 = cotan( 1/ztemp1 ) elseif @formula1 == 69 ztemp1 = 1/cos( 1/ztemp1 ) elseif @formula1 == 70 ztemp1 = 1/sin( 1/ztemp1 ) elseif @formula1 == 71 ztemp1 = cotanh( ztemp1 ) elseif @formula1 == 72 ztemp1 = 1/cosh( ztemp1 ) elseif @formula1 == 73 ztemp1 = 1/sinh( ztemp1 ) elseif @formula1 == 74 ztemp1 = atanh( 1/ztemp1 ) elseif @formula1 == 75 ztemp1 = acosh( 1/ztemp1 ) elseif @formula1 == 76 ztemp1 = asinh( 1/ztemp1 ) elseif @formula1 == 77 ztemp1 = @coeff1a * ztemp1^@exponent1a + @coeff1b * ztemp1^@exponent1b + \ @coeff1c * ztemp1^@exponent1c elseif @formula1 == 78 ztemp1extra = sinh(ztemp1) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 79 ztemp1extra = cosh( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 80 ztemp1extra = tanh(ztemp1) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 81 ztemp1extra = cotanh( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 82 ztemp1extra = (1,0)/cosh(ztemp1) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 83 ztemp1extra = (1,0) / sinh( ztemp1 ) ztemp1 = ztemp1extra * ztemp1extra elseif @formula1 == 84 ztemp1 = sinh(1/ztemp1) elseif @formula1 == 85 ztemp1 = cosh(1/ztemp1) elseif @formula1 == 86 ztemp1 = tanh(1/ztemp1) elseif @formula1 == 87 ztemp1 = cotanh(1/ztemp1) elseif @formula1 == 88 ztemp1 = (1,0)/cosh(1/ztemp1) elseif @formula1 == 89 ztemp1 = (1,0)/sinh(1/ztemp1) elseif @formula1 == 90 ztemp1 = sin( ztemp1 ) * tan(ztemp1) elseif @formula1 == 91 ztemp1 = sinh(ztemp1) * tanh(ztemp1) elseif @formula1 == 92 ztemp1 = sinh(ztemp1) * cosh(ztemp1) elseif @formula1 == 93 ztemp1temp = sinh(ztemp1), ztemp1extra = cosh(ztemp1) ztemp1 = ztemp1temp*ztemp1temp*ztemp1extra*ztemp1extra elseif @formula1 == 94 ztemp1temp = sin(ztemp1), ztemp1extra = cos(ztemp1) ztemp1 = ztemp1temp*ztemp1temp*ztemp1extra*ztemp1extra elseif @formula1 == 95 ztemp1extra = 1/ztemp1 ztemp1 = sin(ztemp1extra)*cos(ztemp1extra) elseif @formula1 == 96 ztemp1extra = sin( 1/ztemp1 ) ztemp1 = ztemp1extra*ztemp1extra elseif @formula1 == 97 ztemp1 = sin(ztemp1) * cos(1/ztemp1) elseif @formula1 == 98 ztemp1 = sin(ztemp1) * sin(1/ztemp1) elseif @formula1 == 99 ztemp1extra = log(ztemp1) ztemp1 = ztemp1extra*ztemp1extra elseif @formula1 == 100 ztemp1 = sin(ztemp1) * sin(2*ztemp1) elseif @formula1 == 101 ztemp1 = exp(2*ztemp1) elseif @formula1 == 102 ztemp1 = exp(-2*ztemp1) elseif @formula1 == 103 ztemp1extra = 1/ztemp1 ztemp1 = sinh(ztemp1extra)*cosh(ztemp1extra) elseif @formula1 == 104 ztemp1extra = sinh( 1/ztemp1 ) ztemp1 = ztemp1extra*ztemp1extra elseif @formula1 == 105 ztemp1 = sinh(ztemp1) * cosh(1/ztemp1) elseif @formula1 == 106 ztemp1 = sinh(ztemp1) * sinh(1/ztemp1) elseif @formula1 == 107 ztemp1 = sin(ztemp1) * sinh(ztemp1) elseif @formula1 == 108 ztemp1 = sin(ztemp1) * cosh(ztemp1) elseif @formula1 == 109 ztemp1extra = sin(ztemp1), ztemp1temp = sinh(ztemp1) ztemp1 = ztemp1temp*ztemp1temp*ztemp1extra*ztemp1extra elseif @formula1 == 110 ztemp1 = sin(ztemp1)*exp(ztemp1) elseif @formula1 == 111 ztemp1 = cos(ztemp1)*exp(ztemp1) elseif @formula1 == 112 ztemp1 = sinh(ztemp1)*exp(ztemp1) elseif @formula1 == 113 ztemp1 = cosh(ztemp1)*exp(ztemp1) elseif @formula1 == 114 ztemp1 = sin(ztemp1)*log(ztemp1) elseif @formula1 == 115 ztemp1 = cos(ztemp1)*log(ztemp1) elseif @formula1 == 116 ztemp1 = sinh(ztemp1)*log(ztemp1) elseif @formula1 == 117 ztemp1 = cosh(ztemp1)*log(ztemp1) elseif @formula1 == 118 ztemp1 = exp(ztemp1*ztemp1) elseif @formula1 == 119 ztemp1 = exp(-(ztemp1*ztemp1)) elseif @formula1 == 120 ztemp1 = exp(1/(ztemp1*ztemp1)) elseif @formula1 == 121 ztemp1 = exp(-1/(ztemp1*ztemp1)) else ztemp1 = ztemp1 endif ; @formula1 if iterations % @frequency == 0 ; execute formulas G & H and combine if @pmode != 0 ztemp2 = ztemp2 + jc ztemp3 = ztemp3 + jc endif ; pmode if @formula2 == 0 ztemp2 = ztemp2 * ztemp2 elseif @formula2 == 1 ztemp2 = ztemp2 * ztemp2 * ztemp2 elseif @formula2 == 2 zextra = ztemp2 * ztemp2 ztemp2 = zextra * zextra elseif @formula2 == 3 ztemp2 = ztemp2 ^ @power2 elseif @formula2 == 4 ztemp2 = 1/ztemp2 elseif @formula2 == 5 ztemp2 = sqrt(ztemp2) elseif @formula2 == 6 ztemp2 = 1 / ( ztemp2 * ztemp2 ) elseif @formula2 == 7 ztemp2 = log(ztemp2) elseif @formula2 == 8 ztemp2 = exp( ztemp2) elseif @formula2 == 9 ztemp2 = ztemp2^ztemp2 elseif @formula2 == 10 ztemp2 = sin( ztemp2 ) elseif @formula2 == 11 ztemp2 = cos( ztemp2 ) elseif @formula2 == 12 ztemp2 = tan( ztemp2 ) elseif @formula2 == 13 ztemp2 = asin( ztemp2 ) elseif @formula2 == 14 ztemp2 = acos( ztemp2 ) elseif @formula2 == 15 ztemp2 = atan( ztemp2 ) elseif @formula2 == 16 ztemp2 = sinh( ztemp2 ) elseif @formula2 == 17 ztemp2 = cosh( ztemp2 ) elseif @formula2 == 18 ztemp2 = tanh( ztemp2 ) elseif @formula2 == 19 ztemp2 = asinh( ztemp2 ) elseif @formula2 == 20 ztemp2 = acosh( ztemp2 ) elseif @formula2 == 21 ztemp2 = atanh( ztemp2 ) elseif @formula2 == 22 ztemp2 = log( 1/ztemp2 ) elseif @formula2 == 23 ztemp2 = log( log( ztemp2 )) elseif @formula2 == 24 ztemp2 = exp( -ztemp2 ) elseif @formula2 == 25 ztemp2 = exp( 1/ztemp2 ) elseif @formula2 == 26 ztemp2 = ztemp2^(-ztemp2) elseif @formula2 == 27 zextra = sin( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 28 zextra = cos( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 29 zextra = tan( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 30 ztemp2 = cotan( ztemp2 ) elseif @formula2 == 31 ztemp2 = 1/cos( ztemp2 ) elseif @formula2 == 32 ztemp2 = 1/sin( ztemp2 ) elseif @formula2 == 33 zextra = cotan( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 34 zextra = 1/cos( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 35 zextra = 1/sin( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 36 zextra = ztemp2^(ztemp2) ztemp2 = ztemp2^zextra elseif @formula2 == 37 zextra = ztemp2^(ztemp2) ztemp2 = 1/( ztemp2^zextra ) elseif @formula2 == 38 ztemp2 = log(-ztemp2) elseif @formula2 == 39 ztemp2 = 1/log( ztemp2 ) elseif @formula2 == 40 ztemp2 = ztemp2 * log( ztemp2 ) elseif @formula2 == 41 ztemp2 = sin( ztemp2 ) / ztemp2 elseif @formula2 == 42 ztemp2 = cos( ztemp2 ) / ztemp2 elseif @formula2 == 43 ztemp2 = sin( ztemp2 ) * cos( ztemp2 ) elseif @formula2 == 44 ztemp2 = sin( ztemp2^2 ) elseif @formula2 == 45 ztemp2 = exp( -1/ztemp2 ) elseif @formula2 == 46 ztemp2 = ztemp2 * exp( ztemp2 ) elseif @formula2 == 47 ztemp2 = ztemp2 * exp( -ztemp2 ) elseif @formula2 == 48 ztemp2 = ztemp2 * exp( 1/ztemp2 ) elseif @formula2 == 49 ztemp2 = ztemp2 * exp( -1/ztemp2 ) elseif @formula2 == 50 ztemp2 = ztemp2 * ztemp2 * ztemp2 elseif @formula2 == 51 ztemp2 = 1 / ( ztemp2 * ztemp2 * ztemp2 ) elseif @formula2 == 52 ztemp2 = atan( 1 / ztemp2 ) elseif @formula2 == 53 ztemp2 = acos( 1 / ztemp2 ) elseif @formula2 == 54 ztemp2 = asin( 1 / ztemp2 ) elseif @formula2 == 55 ztemp2 = tan( ztemp2 ) / ztemp2 elseif @formula2 == 56 ztemp2 = cotan( ztemp2 ) / ztemp2 elseif @formula2 == 57 ztemp2 = 1 / ( ztemp2 * cos( ztemp2 )) elseif @formula2 == 58 ztemp2 = 1 / ( ztemp2 * sin( ztemp2 )) elseif @formula2 == 59 ztemp2 = ztemp2 * sin( ztemp2 ) elseif @formula2 == 60 ztemp2 = ztemp2 * cos( ztemp2 ) elseif @formula2 == 61 ztemp2 = ztemp2 * tan( ztemp2 ) elseif @formula2 == 62 ztemp2 = ztemp2 * cotan( ztemp2 ) elseif @formula2 == 63 ztemp2 = ztemp2/cos( ztemp2 ) elseif @formula2 == 64 ztemp2 = ztemp2/sin( ztemp2 ) elseif @formula2 == 65 ztemp2 = sin( 1/ztemp2 ) elseif @formula2 == 66 ztemp2 = cos( 1/ztemp2 ) elseif @formula2 == 67 ztemp2 = tan( 1/ztemp2 ) elseif @formula2 == 68 ztemp2 = cotan( 1/ztemp2 ) elseif @formula2 == 69 ztemp2 = 1/cos( 1/ztemp2 ) elseif @formula2 == 70 ztemp2 = 1/sin( 1/ztemp2 ) elseif @formula2 == 71 ztemp2 = cotanh( ztemp2 ) elseif @formula2 == 72 ztemp2 = 1/cosh( ztemp2 ) elseif @formula2 == 73 ztemp2 = 1/sinh( ztemp2 ) elseif @formula2 == 74 ztemp2 = atanh( 1/ztemp2 ) elseif @formula2 == 75 ztemp2 = acosh( 1/ztemp2 ) elseif @formula2 == 76 ztemp2 = asinh( 1/ztemp2 ) elseif @formula2 == 77 ztemp2 = @coeff2a * ztemp2^@exponent2a + @coeff2b * ztemp2^@exponent2b + \ @coeff2c * ztemp2^@exponent2c elseif @formula2 == 78 zextra = sinh(ztemp2) ztemp2 = zextra * zextra elseif @formula2 == 79 zextra = cosh( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 80 zextra = tanh(ztemp2) ztemp2 = zextra * zextra elseif @formula2 == 81 zextra = cotanh( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 82 zextra = (1,0)/cosh(ztemp2) ztemp2 = zextra * zextra elseif @formula2 == 83 zextra = (1,0) / sinh( ztemp2 ) ztemp2 = zextra * zextra elseif @formula2 == 84 ztemp2 = sinh(1/ztemp2) elseif @formula2 == 85 ztemp2 = cosh(1/ztemp2) elseif @formula2 == 86 ztemp2 = tanh(1/ztemp2) elseif @formula2 == 87 ztemp2 = cotanh(1/ztemp2) elseif @formula2 == 88 ztemp2 = (1,0)/cosh(1/ztemp2) elseif @formula2 == 89 ztemp2 = (1,0)/sinh(1/ztemp2) elseif @formula2 == 90 ztemp2 = sin( ztemp2 ) * tan(ztemp2) elseif @formula2 == 91 ztemp2 = sinh(ztemp2) * tanh(ztemp2) elseif @formula2 == 92 ztemp2 = sinh(ztemp2) * cosh(ztemp2) elseif @formula2 == 93 ztemp = sinh(ztemp2), zextra = cosh(ztemp2) ztemp2 = ztemp*ztemp*zextra*zextra elseif @formula2 == 94 ztemp = sin(ztemp2), zextra = cos(ztemp2) ztemp2 = ztemp*ztemp*zextra*zextra elseif @formula2 == 95 zextra = 1/ztemp2 ztemp2 = sin(zextra)*cos(zextra) elseif @formula2 == 96 zextra = sin( 1/ztemp2 ) ztemp2 = zextra*zextra elseif @formula2 == 97 ztemp2 = sin(ztemp2) * cos(1/ztemp2) elseif @formula2 == 98 ztemp2 = sin(ztemp2) * sin(1/ztemp2) elseif @formula2 == 99 zextra = log(ztemp2) ztemp2 = zextra*zextra elseif @formula2 == 100 ztemp2 = sin(ztemp2) * sin(2*ztemp2) elseif @formula2 == 101 ztemp2 = exp(2*ztemp2) elseif @formula2 == 102 ztemp2 = exp(-2*ztemp2) elseif @formula2 == 103 zextra = 1/ztemp2 ztemp2 = sinh(zextra)*cosh(zextra) elseif @formula2 == 104 zextra = sinh( 1/ztemp2 ) ztemp2 = zextra*zextra elseif @formula2 == 105 ztemp2 = sinh(ztemp2) * cosh(1/ztemp2) elseif @formula2 == 106 ztemp2 = sinh(ztemp2) * sinh(1/ztemp2) elseif @formula2 == 107 ztemp2 = sin(ztemp2) * sinh(ztemp2) elseif @formula2 == 108 ztemp2 = sin(ztemp2) * cosh(ztemp2) elseif @formula2 == 109 zextra = sin(ztemp2), ztemp = sinh(ztemp2) ztemp2 = ztemp*ztemp*zextra*zextra elseif @formula2 == 110 ztemp2 = sin(ztemp2)*exp(ztemp2) elseif @formula2 == 111 ztemp2 = cos(ztemp2)*exp(ztemp2) elseif @formula2 == 112 ztemp2 = sinh(ztemp2)*exp(ztemp2) elseif @formula2 == 113 ztemp2 = cosh(ztemp2)*exp(ztemp2) elseif @formula2 == 114 ztemp2 = sin(ztemp2)*log(ztemp2) elseif @formula2 == 115 ztemp2 = cos(ztemp2)*log(ztemp2) elseif @formula2 == 116 ztemp2 = sinh(ztemp2)*log(ztemp2) elseif @formula2 == 117 ztemp2 = cosh(ztemp2)*log(ztemp2) elseif @formula2 == 118 ztemp2 = exp(ztemp2*ztemp2) elseif @formula2 == 119 ztemp2 = exp(-(ztemp2*ztemp2)) elseif @formula2 == 120 ztemp2 = exp(1/(ztemp2*ztemp2)) elseif @formula2 == 121 ztemp2 = exp(-1/(ztemp2*ztemp2)) else ztemp2 = ztemp2 endif ; @formula2 if @formula3 == 0 ztemp3 = ztemp3 * ztemp3 elseif @formula3 == 1 ztemp3 = ztemp3 * ztemp3 * ztemp3 elseif @formula3 == 2 zextra = ztemp3 * ztemp3 ztemp3 = zextra * zextra elseif @formula3 == 3 ztemp3 = ztemp3 ^ @power3 elseif @formula3 == 4 ztemp3 = 1/ztemp3 elseif @formula3 == 5 ztemp3 = sqrt(ztemp3) elseif @formula3 == 6 ztemp3 = 1 / ( ztemp3 * ztemp3 ) elseif @formula3 == 7 ztemp3 = log(ztemp3) elseif @formula3 == 8 ztemp3 = exp( ztemp3) elseif @formula3 == 9 ztemp3 = ztemp3^ztemp3 elseif @formula3 == 10 ztemp3 = sin( ztemp3 ) elseif @formula3 == 11 ztemp3 = cos( ztemp3 ) elseif @formula3 == 12 ztemp3 = tan( ztemp3 ) elseif @formula3 == 13 ztemp3 = asin( ztemp3 ) elseif @formula3 == 14 ztemp3 = acos( ztemp3 ) elseif @formula3 == 15 ztemp3 = atan( ztemp3 ) elseif @formula3 == 16 ztemp3 = sinh( ztemp3 ) elseif @formula3 == 17 ztemp3 = cosh( ztemp3 ) elseif @formula3 == 18 ztemp3 = tanh( ztemp3 ) elseif @formula3 == 19 ztemp3 = asinh( ztemp3 ) elseif @formula3 == 20 ztemp3 = acosh( ztemp3 ) elseif @formula3 == 21 ztemp3 = atanh( ztemp3 ) elseif @formula3 == 22 ztemp3 = log( 1/ztemp3 ) elseif @formula3 == 23 ztemp3 = log( log( ztemp3 )) elseif @formula3 == 24 ztemp3 = exp( -ztemp3 ) elseif @formula3 == 25 ztemp3 = exp( 1/ztemp3 ) elseif @formula3 == 26 ztemp3 = ztemp3^(-ztemp3) elseif @formula3 == 27 zextra = sin( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 28 zextra = cos( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 29 zextra = tan( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 30 ztemp3 = cotan( ztemp3 ) elseif @formula3 == 31 ztemp3 = 1/cos( ztemp3 ) elseif @formula3 == 32 ztemp3 = 1/sin( ztemp3 ) elseif @formula3 == 33 zextra = cotan( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 34 zextra = 1/cos( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 35 zextra = 1/sin( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 36 zextra = ztemp3^(ztemp3) ztemp3 = ztemp3^zextra elseif @formula3 == 37 zextra = ztemp3^(ztemp3) ztemp3 = 1/( ztemp3^zextra ) elseif @formula3 == 38 ztemp3 = log(-ztemp3) elseif @formula3 == 39 ztemp3 = 1/log( ztemp3 ) elseif @formula3 == 40 ztemp3 = ztemp3 * log( ztemp3 ) elseif @formula3 == 41 ztemp3 = sin( ztemp3 ) / ztemp3 elseif @formula3 == 42 ztemp3 = cos( ztemp3 ) / ztemp3 elseif @formula3 == 43 ztemp3 = sin( ztemp3 ) * cos( ztemp3 ) elseif @formula3 == 44 ztemp3 = sin( ztemp3^2 ) elseif @formula3 == 45 ztemp3 = exp( -1/ztemp3 ) elseif @formula3 == 46 ztemp3 = ztemp3 * exp( ztemp3 ) elseif @formula3 == 47 ztemp3 = ztemp3 * exp( -ztemp3 ) elseif @formula3 == 48 ztemp3 = ztemp3 * exp( 1/ztemp3 ) elseif @formula3 == 49 ztemp3 = ztemp3 * exp( -1/ztemp3 ) elseif @formula3 == 50 ztemp3 = ztemp3 * ztemp3 * ztemp3 elseif @formula3 == 51 ztemp3 = 1 / ( ztemp3 * ztemp3 * ztemp3 ) elseif @formula3 == 52 ztemp3 = atan( 1 / ztemp3 ) elseif @formula3 == 53 ztemp3 = acos( 1 / ztemp3 ) elseif @formula3 == 54 ztemp3 = asin( 1 / ztemp3 ) elseif @formula3 == 55 ztemp3 = tan( ztemp3 ) / ztemp3 elseif @formula3 == 56 ztemp3 = cotan( ztemp3 ) / ztemp3 elseif @formula3 == 57 ztemp3 = 1 / ( ztemp3 * cos( ztemp3 )) elseif @formula3 == 58 ztemp3 = 1 / ( ztemp3 * sin( ztemp3 )) elseif @formula3 == 59 ztemp3 = ztemp3 * sin( ztemp3 ) elseif @formula3 == 60 ztemp3 = ztemp3 * cos( ztemp3 ) elseif @formula3 == 61 ztemp3 = ztemp3 * tan( ztemp3 ) elseif @formula3 == 62 ztemp3 = ztemp3 * cotan( ztemp3 ) elseif @formula3 == 63 ztemp3 = ztemp3/cos( ztemp3 ) elseif @formula3 == 64 ztemp3 = ztemp3/sin( ztemp3 ) elseif @formula3 == 65 ztemp3 = sin( 1/ztemp3 ) elseif @formula3 == 66 ztemp3 = cos( 1/ztemp3 ) elseif @formula3 == 67 ztemp3 = tan( 1/ztemp3 ) elseif @formula3 == 68 ztemp3 = cotan( 1/ztemp3 ) elseif @formula3 == 69 ztemp3 = 1/cos( 1/ztemp3 ) elseif @formula3 == 70 ztemp3 = 1/sin( 1/ztemp3 ) elseif @formula3 == 71 ztemp3 = cotanh( ztemp3 ) elseif @formula3 == 72 ztemp3 = 1/cosh( ztemp3 ) elseif @formula3 == 73 ztemp3 = 1/sinh( ztemp3 ) elseif @formula3 == 74 ztemp3 = atanh( 1/ztemp3 ) elseif @formula3 == 75 ztemp3 = acosh( 1/ztemp3 ) elseif @formula3 == 76 ztemp3 = asinh( 1/ztemp3 ) elseif @formula3 == 77 ztemp3 = @coeff3a * ztemp3^@exponent3a + @coeff3b * ztemp3^@exponent3b + \ @coeff3c * ztemp3^@exponent3c elseif @formula3 == 78 zextra = sinh(ztemp3) ztemp3 = zextra * zextra elseif @formula3 == 79 zextra = cosh( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 80 zextra = tanh(ztemp3) ztemp3 = zextra * zextra elseif @formula3 == 81 zextra = cotanh( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 82 zextra = (1,0)/cosh(ztemp3) ztemp3 = zextra * zextra elseif @formula3 == 83 zextra = (1,0) / sinh( ztemp3 ) ztemp3 = zextra * zextra elseif @formula3 == 84 ztemp3 = sinh(1/ztemp3) elseif @formula3 == 85 ztemp3 = cosh(1/ztemp3) elseif @formula3 == 86 ztemp3 = tanh(1/ztemp3) elseif @formula3 == 87 ztemp3 = cotanh(1/ztemp3) elseif @formula3 == 88 ztemp3 = (1,0)/cosh(1/ztemp3) elseif @formula3 == 89 ztemp3 = (1,0)/sinh(1/ztemp3) elseif @formula3 == 90 ztemp3 = sin( ztemp3 ) * tan(ztemp3) elseif @formula3 == 91 ztemp3 = sinh(ztemp3) * tanh(ztemp3) elseif @formula3 == 92 ztemp3 = sinh(ztemp3) * cosh(ztemp3) elseif @formula3 == 93 ztemp = sinh(ztemp3), zextra = cosh(ztemp3) ztemp3 = ztemp*ztemp*zextra*zextra elseif @formula3 == 94 ztemp = sin(ztemp3), zextra = cos(ztemp3) ztemp3 = ztemp*ztemp*zextra*zextra elseif @formula3 == 95 zextra = 1/ztemp3 ztemp3 = sin(zextra)*cos(zextra) elseif @formula3 == 96 zextra = sin( 1/ztemp3 ) ztemp3 = zextra*zextra elseif @formula3 == 97 ztemp3 = sin(ztemp3) * cos(1/ztemp3) elseif @formula3 == 98 ztemp3 = sin(ztemp3) * sin(1/ztemp3) elseif @formula3 == 99 zextra = log(ztemp3) ztemp3 = zextra*zextra elseif @formula3 == 100 ztemp3 = sin(ztemp3) * sin(2*ztemp3) elseif @formula3 == 101 ztemp3 = exp(2*ztemp3) elseif @formula3 == 102 ztemp3 = exp(-2*ztemp3) elseif @formula3 == 103 zextra = 1/ztemp3 ztemp3 = sinh(zextra)*cosh(zextra) elseif @formula3 == 104 zextra = sinh( 1/ztemp3 ) ztemp3 = zextra*zextra elseif @formula3 == 105 ztemp3 = sinh(ztemp3) * cosh(1/ztemp3) elseif @formula3 == 106 ztemp3 = sinh(ztemp3) * sinh(1/ztemp3) elseif @formula3 == 107 ztemp3 = sin(ztemp3) * sinh(ztemp3) elseif @formula3 == 108 ztemp3 = sin(ztemp3) * cosh(ztemp3) elseif @formula3 == 109 zextra = sin(ztemp3), ztemp = sinh(ztemp3) ztemp3 = ztemp*ztemp*zextra*zextra elseif @formula3 == 110 ztemp3 = sin(ztemp3)*exp(ztemp3) elseif @formula3 == 111 ztemp3 = cos(ztemp3)*exp(ztemp3) elseif @formula3 == 112 ztemp3 = sinh(ztemp3)*exp(ztemp3) elseif @formula3 == 113 ztemp3 = cosh(ztemp3)*exp(ztemp3) elseif @formula3 == 114 ztemp3 = sin(ztemp3)*log(ztemp3) elseif @formula3 == 115 ztemp3 = cos(ztemp3)*log(ztemp3) elseif @formula3 == 116 ztemp3 = sinh(ztemp3)*log(ztemp3) elseif @formula3 == 117 ztemp3 = cosh(ztemp3)*log(ztemp3) elseif @formula3 == 118 ztemp3 = exp(ztemp3*ztemp3) elseif @formula3 == 119 ztemp3 = exp(-(ztemp3*ztemp3)) elseif @formula3 == 120 ztemp3 = exp(1/(ztemp3*ztemp3)) elseif @formula3 == 121 ztemp3 = exp(-1/(ztemp3*ztemp3)) elseif @formula3 == 122 ztemp3 = ztemp3 else if ((@combo == 0) || (@combo == 3) || (@combo == 4) || (@combo == 5) || \ (@combo == 10) || (@combo == 11) || (@combo == 12)) ztemp3 = (0,0) else ztemp3 = (1,0) endif ; @combo endif ; @formula3 if @blend ztemp1 = @weight1*ztemp1, ztemp2 = @weight2*ztemp2 ztemp3 = @weight3*ztemp3 endif ; @blend if @combo == 0 z = ztemp1 + ztemp2 + ztemp3 elseif @combo == 1 z = ztemp1 * ztemp2 * ztemp3 elseif @combo == 2 z = (ztemp1 + ztemp2) * ztemp3 elseif @combo == 3 z = (ztemp1 * ztemp2) + ztemp3 elseif @combo == 4 z = ztemp1 + ztemp2 - ztemp3 elseif @combo == 5 z = ztemp1 - ztemp2 - ztemp3 elseif @combo == 6 z = (ztemp1 - ztemp2) * ztemp3 elseif @combo == 7 z = (ztemp1 + ztemp2) / ztemp3 elseif @combo == 8 z = (ztemp1 - ztemp2) / ztemp3 elseif @combo == 9 z = ztemp1 * ztemp2 / ztemp3 elseif @combo == 10 z = (ztemp1 * ztemp2) - ztemp3 elseif @combo == 11 z = (ztemp1 / ztemp2) + ztemp3 elseif @combo == 12 z = (ztemp1 / ztemp2) - ztemp3 endif ; @combo else z = ztemp1 endif ; iterations if @pmode != 1 z = z + jc endif ; pmode if @biomorph if @biomorphtype == "real + imag" bail = (abs(real(z)) < @biomorphtest) || (abs(imag(z)) < @biomorphtest) elseif @biomorphtype == "real + imag + cabs" bail = (abs(real(z)) < @biomorphtest) || (abs(imag(z)) < @biomorphtest) || (cabs(z) < sqr(@biomorphtest)) elseif @biomorphtype == "real" bail = abs(real(z)) < @biomorphtest elseif @biomorphtype == "imag" bail = abs(imag(z)) < @biomorphtest elseif @biomorphtype == "cabs" bail = cabs(z) < sqr(@biomorphtest) endif ; @biomorphtype else bail = |z| < @bail endif ; @biomorph bailout: bail default: title = "oz3 Stage General" center = (0,0) maxiter = 100 method = multipass periodicity = 0 param frequency caption = "Cycle Length" default = 1 min = 1 hint = "This is the frequency that Formulas G and H are executed (Formula \ F is executed every iteration). If 'Cycle length' = 1, then Formulas \ G and H are also both executed every iter, else every N iters" endparam param combo caption = "Func Combo" enum = "f+g+h" "f*g*h" "(f+g)*h" "(f*g)+h" \ "f+g-h" "f-g-h" "(f-g)*h" "(f+g)/h" "(f-g)/h" "f*g/h" \ "(f*g)-h" "(f/g)+h" "(f/g)-h" default = 0 min = 0 hint = "Selects how the functions will be combined" endparam param formula1 caption = "Formula F" enum = "z^2" "z^3" "z^4" "z^power" "1/z" "sqrt(z)" "1/z^2" "log(z)" "e^z" "z^z" \ "sin(z)" "cos(z)" \ "tan(z)" "asin(z)" "acos(z)" "atan(z)" "sinh(z)" "cosh(z)" "tanh(z)" \ "asinh(z)" "acosh(z)" "atanh(z)" "log(1/z)" "log(log(z))" "e^-z" \ "e^(1/z)" "z^-z" "sin(z)^2" "cos(z)^2" "tan(z)^2" "cot(z)" "sec(z)" \ "csc(z)" "cot(z)^2" "sec(z)^2" "csc(z)^2" "z^z^z" "1/z^z^z" "log(-z)" \ "1/log(z)" "zlog(z)" "sin(z)/z" "cos(z)/z" "sin(z)*cos(z)" "sin(z^2)" \ "e^(-1/z)" "ze^z" "ze^-z" "ze^(1/z)" "ze^(-1/z)" "z^3" "1/z^3" \ "acot(z)" "asec(z)" "acsc(z)" "tan(z)/z" "cot(z)/z" "sec(z)/z" \ "csc(z)/z" "zsin(z)" "zcos(z)" "ztan(z)" "zcot(z)" "zsec(z)" "zcsc(z)" \ "sin(1/z)" "cos(1/z)" "tan(1/z)" "cot(1/z)" "sec(1/z)" "csc(1/z)" \ "cotanh(z)" "sech(z)" "cosech(z)" "acoth(z)" "asech(z)" "acosech(z)" \ "3-term polynomial" "sinh(z)^2" "cosh(z)^2" "tanh(z)^2" "cotanh(z)^2" \ "sech(z)^2" "cosech(z)^2" "sinh(1/z)" "cosh(1/z)" "tanh(1/z)" \ "cotanh(1/z)" "sech(1/z)" "cosech(1/z)" "sin(z)tan(z)" "sinh(z)tanh(z)" \ "sinh(z)cosh(z)" "sinh(z)^2*cosh(z)^2" "sin(z)^2*cos(z)^2" \ "sin(1/z)*cos(1/z)" "sin(1/z)^2" "sin(z)cos(1/z)" "sin(z)sin(1/z)" \ "log(z)^2" "sin(z)sin(2z)" "e^2z" "e^-2z" "sinh(1/z)cosh(1/z)" \ "sinh(1/z)^2" "sinh(z)cosh(1/z)" "sinh(z)sinh(1/z)" "sin(z)sinh(z)" \ "sin(z)cosh(z)" "sin(z)^2*sinh(z)^2" "sin(z)e^z" "cos(z)e^z" \ "sinh(z)e^z" "cosh(z)e^z" "sin(z)log(z)" "cos(z)log(z)" "sinh(z)log(z)" \ "cosh(z)log(z)" "e^(z^2)" "e^(-(z^2))" "e^(1/z^2)" "e^(-1/z^2)" "z" default = 0 hint = "Default formula, executed each iteration. For 'z^power', set \ parameter 'Power F'. For '3-term polynomial' set 6 params 'Coefficient' \ & 'Exponent' FA, FB, and FC. Operates on z selected by 'F Generation'" endparam param fgen caption = "F Generation" default = 0 enum = "Current z" "Previous z" "2nd Previous z" "3rd Previous z" \ "4th Previous z" "5th Previous z" hint = "This is the z that gets iterated by Formula F (the default \ formula) every iteration" endparam param power1 caption = "Power F" default = (5,0) hint = "This is the power used for the first formula series if parameter \ 'Formula F' is set to 'z^power'" endparam param formula2 caption = "Formula G" enum = "z^2" "z^3" "z^4" "z^power" "1/z" "sqrt(z)" "1/z^2" "log(z)" "e^z" "z^z" \ "sin(z)" "cos(z)" \ "tan(z)" "asin(z)" "acos(z)" "atan(z)" "sinh(z)" "cosh(z)" "tanh(z)" \ "asinh(z)" "acosh(z)" "atanh(z)" "log(1/z)" "log(log(z))" "e^-z" \ "e^(1/z)" "z^-z" "sin(z)^2" "cos(z)^2" "tan(z)^2" "cot(z)" "sec(z)" \ "csc(z)" "cot(z)^2" "sec(z)^2" "csc(z)^2" "z^z^z" "1/z^z^z" "log(-z)" \ "1/log(z)" "zlog(z)" "sin(z)/z" "cos(z)/z" "sin(z)*cos(z)" "sin(z^2)" \ "e^(-1/z)" "ze^z" "ze^-z" "ze^(1/z)" "ze^(-1/z)" "z^3" "1/z^3" \ "acot(z)" "asec(z)" "acsc(z)" "tan(z)/z" "cot(z)/z" "sec(z)/z" \ "csc(z)/z" "zsin(z)" "zcos(z)" "ztan(z)" "zcot(z)" "zsec(z)" "zcsc(z)" \ "sin(1/z)" "cos(1/z)" "tan(1/z)" "cot(1/z)" "sec(1/z)" "csc(1/z)" \ "cotanh(z)" "sech(z)" "cosech(z)" "acoth(z)" "asech(z)" "acosech(z)" \ "3-term polynomial" "sinh(z)^2" "cosh(z)^2" "tanh(z)^2" "cotanh(z)^2" \ "sech(z)^2" "cosech(z)^2" "sinh(1/z)" "cosh(1/z)" "tanh(1/z)" \ "cotanh(1/z)" "sech(1/z)" "cosech(1/z)" "sin(z)tan(z)" "sinh(z)tanh(z)" \ "sinh(z)cosh(z)" "sinh(z)^2*cosh(z)^2" "sin(z)^2*cos(z)^2" \ "sin(1/z)*cos(1/z)" "sin(1/z)^2" "sin(z)cos(1/z)" "sin(z)sin(1/z)" \ "log(z)^2" "sin(z)sin(2z)" "e^2z" "e^-2z" "sinh(1/z)cosh(1/z)" \ "sinh(1/z)^2" "sinh(z)cosh(1/z)" "sinh(z)sinh(1/z)" "sin(z)sinh(z)" \ "sin(z)cosh(z)" "sin(z)^2*sinh(z)^2" "sin(z)e^z" "cos(z)e^z" \ "sinh(z)e^z" "cosh(z)e^z" "sin(z)log(z)" "cos(z)log(z)" "sinh(z)log(z)" \ "cosh(z)log(z)" "e^(z^2)" "e^(-(z^2))" "e^(1/z^2)" "e^(-1/z^2)" "z" default = 1 hint = "Formula G, executed every N iterations, where N is set \ by param 'Cycle Length'. For 'z^power', set param 'Power G'. For \ '3-term polynomial' set 6 params 'Coefficient' & 'Exponent' GA, GB, \ and GC. Operates on z selected by 'G Generation'" endparam param ggen caption = "G Generation" default = 1 enum = "Current z" "Previous z" "2nd Previous z" "3rd Previous z" \ "4th Previous z" "5th Previous z" hint = "This is the z that gets iterated by Formula G either \ every iteration (if 'Cycle Length' = 1), or every N iters \ (where N = 'Cycle Length')" endparam param power2 caption = "Power G" default = (6,0) hint = "This is the power used for the second formula series if parameter \ 'Formula G' is set to 'z^power'" endparam param formula3 caption = "Formula H" enum = "z^2" "z^3" "z^4" "z^power" "1/z" "sqrt(z)" "1/z^2" "log(z)" "e^z" "z^z" \ "sin(z)" "cos(z)" \ "tan(z)" "asin(z)" "acos(z)" "atan(z)" "sinh(z)" "cosh(z)" "tanh(z)" \ "asinh(z)" "acosh(z)" "atanh(z)" "log(1/z)" "log(log(z))" "e^-z" \ "e^(1/z)" "z^-z" "sin(z)^2" "cos(z)^2" "tan(z)^2" "cot(z)" "sec(z)" \ "csc(z)" "cot(z)^2" "sec(z)^2" "csc(z)^2" "z^z^z" "1/z^z^z" "log(-z)" \ "1/log(z)" "zlog(z)" "sin(z)/z" "cos(z)/z" "sin(z)*cos(z)" "sin(z^2)" \ "e^(-1/z)" "ze^z" "ze^-z" "ze^(1/z)" "ze^(-1/z)" "z^3" "1/z^3" \ "acot(z)" "asec(z)" "acsc(z)" "tan(z)/z" "cot(z)/z" "sec(z)/z" \ "csc(z)/z" "zsin(z)" "zcos(z)" "ztan(z)" "zcot(z)" "zsec(z)" "zcsc(z)" \ "sin(1/z)" "cos(1/z)" "tan(1/z)" "cot(1/z)" "sec(1/z)" "csc(1/z)" \ "cotanh(z)" "sech(z)" "cosech(z)" "acoth(z)" "asech(z)" "acosech(z)" \ "3-term polynomial" "sinh(z)^2" "cosh(z)^2" "tanh(z)^2" "cotanh(z)^2" \ "sech(z)^2" "cosech(z)^2" "sinh(1/z)" "cosh(1/z)" "tanh(1/z)" \ "cotanh(1/z)" "sech(1/z)" "cosech(1/z)" "sin(z)tan(z)" "sinh(z)tanh(z)" \ "sinh(z)cosh(z)" "sinh(z)^2*cosh(z)^2" "sin(z)^2*cos(z)^2" \ "sin(1/z)*cos(1/z)" "sin(1/z)^2" "sin(z)cos(1/z)" "sin(z)sin(1/z)" \ "log(z)^2" "sin(z)sin(2z)" "e^2z" "e^-2z" "sinh(1/z)cosh(1/z)" \ "sinh(1/z)^2" "sinh(z)cosh(1/z)" "sinh(z)sinh(1/z)" "sin(z)sinh(z)" \ "sin(z)cosh(z)" "sin(z)^2*sinh(z)^2" "sin(z)e^z" "cos(z)e^z" \ "sinh(z)e^z" "cosh(z)e^z" "sin(z)log(z)" "cos(z)log(z)" "sinh(z)log(z)" \ "cosh(z)log(z)" "e^(z^2)" "e^(-(z^2))" "e^(1/z^2)" "e^(-1/z^2)" "z" "none" default = 2 hint = "Formula H, executed every N iterations, where N is set \ by param 'Cycle Length'. For 'z^power', set param 'Power H'. For \ '3-term polynomial' set 6 params 'Coefficient' & 'Exponent' HA, HB, \ and HC. Operates on z selected by 'H Generation'" endparam param hgen caption = "H Generation" default = 2 enum = "Current z" "Previous z" "2nd Previous z" "3rd Previous z" \ "4th Previous z" "5th Previous z" hint = "This is the z that gets iterated by Formula H either \ every iteration (if 'Cycle Length' = 1), or every N iters \ (where N = 'Cycle Length')" endparam param power3 caption = "Power H" default = (6,0) hint = "This is the power used for the third formula series if parameter \ 'Formula H' is set to 'z^power'" endparam param blend caption = "Blend Functions?" default = FALSE hint = "If enabled, then the three functions F, G, and H can be individually \ weighted, rather than being blended equally" endparam param weight1 caption = "Weight F" default = 1.0 hint = "If 'Blend Functions' is enabled, then this is the amount of function \ F that is blended with the others to yield the final z value" visible = @blend == TRUE endparam param weight2 caption = "Weight G" default = 1.0 hint = "If 'Blend Functions' is enabled, then this is the amount of function \ G that is blended with the others to yield the final z value" visible = @blend == TRUE endparam param weight3 caption = "Weight H" default = 1.0 hint = "If 'Blend Functions' is enabled, then this is the amount of function \ H that is blended with the others to yield the final z value" visible = @blend == TRUE endparam param coeff1a caption = "Coefficient FA" default = (1,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the coefficient \ of the 1st term" endparam param exponent1a caption = "Exponent FA" default = (6,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the exponent \ of the 1st term" endparam param coeff1b caption = "Coefficient FB" default = (-1,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" endparam param exponent1b caption = "Exponent FB" default = (4,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the exponent \ of the 2nd term" endparam param coeff1c caption = "Coefficient FC" default = (1,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" endparam param exponent1c caption = "Exponent FC" default = (2,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the exponent \ of the 3rd term" endparam param coeff2a caption = "Coefficient GA" default = (1,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the coefficient \ of the 1st term" endparam param exponent2a caption = "Exponent GA" default = (6,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the exponent \ of the 1st term" endparam param coeff2b caption = "Coefficient GB" default = (-1,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" endparam param exponent2b caption = "Exponent GB" default = (4,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the exponent \ of the 2nd term" endparam param coeff2c caption = "Coefficient GC" default = (1,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" endparam param exponent2c caption = "Exponent GC" default = (2,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the exponent \ of the 3rd term" endparam param coeff3a caption = "Coefficient HA" default = (1,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the coefficient \ of the 1st term" endparam param exponent3a caption = "Exponent HA" default = (6,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the exponent \ of the 1st term" endparam param coeff3b caption = "Coefficient HB" default = (-1,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" endparam param exponent3b caption = "Exponent HB" default = (4,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the exponent \ of the 2nd term" endparam param coeff3c caption = "Coefficient HC" default = (1,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" endparam param exponent3c caption = "Exponent HC" default = (2,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the exponent \ of the 3rd term" endparam param pixelformula caption = "Pixel Formula" enum = "p" "p^2" "p^3" "p^4" "p^power" "1/p" "sqrt(p)" "1/p^2" "log(p)" "e^p" "p^p" \ "sin(p)" "cos(p)" \ "tan(p)" "asin(p)" "acos(p)" "atan(p)" "sinh(p)" "cosh(p)" "tanh(p)" \ "asinh(p)" "acosh(p)" "atanh(p)" "log(1/p)" "log(log(p))" "e^-p" \ "e^(1/p)" "p^-p" "sin(p)^2" "cos(p)^2" "tan(p)^2" "cot(p)" "sec(p)" \ "csc(p)" "cot(p)^2" "sec(p)^2" "csc(p)^2" "p^p^p" "1/p^p^p" "log(-p)" \ "1/log(p)" "plog(p)" "sin(p)/p" "cos(p)/p" "sin(p)*cos(p)" "sin(p^2)" \ "e^(-1/p)" "pe^p" "pe^-p" "pe^(1/p)" "pe^(-1/p)" "p^3" "1/p^3" \ "acot(p)" "asec(p)" "acsc(p)" "tan(p)/p" "cot(p)/p" "sec(p)/p" \ "csc(p)/p" "psin(p)" "pcos(p)" "ptan(p)" "pcot(p)" "psec(p)" "pcsc(p)" \ "sin(1/p)" "cos(1/p)" "tan(1/p)" "cot(1/p)" "sec(1/p)" "csc(1/p)" \ "cotanh(p)" "sech(p)" "cosech(p)" "acoth(p)" "asech(p)" "acosech(p)" \ "3-term polynomial" "sinh(p)^2" "cosh(p)^2" "tanh(p)^2" "cotanh(p)^2" \ "sech(p)^2" "cosech(p)^2" "sinh(1/p)" "cosh(1/p)" "tanh(1/p)" \ "cotanh(1/p)" "sech(1/p)" "cosech(1/p)" "sin(p)tan(p)" "sinh(p)tanh(p)" \ "sinh(p)cosh(p)" "sinh(p)^2*cosh(p)^2" "sin(p)^2*cos(p)^2" \ "sin(1/p)*cos(1/p)" "sin(1/p)^2" "sin(p)cos(1/p)" "sin(p)sin(1/p)" \ "log(p)^2" "sin(p)sin(2p)" "e^2p" "e^-2p" "sinh(1/p)cosh(1/p)" \ "sinh(1/p)^2" "sinh(p)cosh(1/p)" "sinh(p)sinh(1/p)" "sin(p)sinh(p)" \ "sin(p)cosh(p)" "sin(p)^2*sinh(p)^2" "sin(p)e^p" "cos(p)e^p" \ "sinh(p)e^p" "cosh(p)e^p" "sin(p)log(p)" "cos(p)log(p)" "sinh(p)log(p)" \ "cosh(p)log(p)" default = 0 hint = "Pixel value (Mand) or seed (Julia) can be initialized \ before iterating. For 'p^power', set parameter 'Pixel Power'; \ for '3-term polynomial', set 'Coeff Pa', 'Exponent Pa', 'Coeff Pb', \ 'Exponent Pb', 'Coeff Pc', 'Exponent Pc'. 'p' results in normal \ initialization" endparam param ppower caption = "Pixel Power" default = (5,0) hint = "This is the power used if parameter \ 'Pixel Formula' is set to 'p^power'" endparam param coeffpa caption = "Coeff Pa" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 1st term" endparam param exponentpa caption = "Exponent Pa" default = (6,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 1st term" endparam param coeffpb caption = "Coeff Pb" default = (-1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" endparam param exponentpb caption = "Exponent Pb" default = (4,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 2nd term" endparam param coeffpc caption = "Coeff Pc" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" endparam param exponentpc caption = "Exponent Pc" default = (2,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 3rd term" endparam param pmode caption = "Pixel Mode" default = 0 enum = "Post-add" "Pre-add" "Both" hint = "'Post-add' -- formula is executed, then pixel/constant is added to result; \ 'Pre-add' -- pixel is added to z, then formula executed; 'Both' -- pixel added, \ formula executed, then pixel added again to result" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param bail caption = "Bailout Value" default = 64.0 hint = "Value needed to 'escape' to infinity" visible = !@biomorph endparam param biomorph caption = "Biomorph Bailout?" default = FALSE hint = "Enabling this setting changes the bailout condition to match \ Pickover's 'biomorph' definition. For coloring, consider using \ 'Biomorph' in the public folder 'jam2.ucl'." endparam param biomorphtest caption = "Biomorph Bailout Test" default = 10.0 hint = "The bailout value for the 'Biomorph' test." visible = @biomorph endparam param biomorphtype caption = "Biomorph Type" enum = "real" "imag" "real + imag" "real + imag + cabs" "cabs" default = 3 hint = "This determines the bailout condition for the Biomorph." visible = @biomorph endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" endparam switch: type = "jam-3stageGen" jconstant = #pixel bail = bail biomorph = biomorph biomorphtest = biomorphtest biomorphtype = biomorphtype frequency = frequency combo = combo formula1 = formula1 formula2 = formula2 formula3 = formula3 fgen = fgen ggen = ggen hgen = hgen power1 = power1 power2 = power2 power3 = power3 blend = blend weight1 = weight1 weight2 = weight2 weight3 = weight3 coeff1a = coeff1a exponent1a = exponent1a coeff1b = coeff1b exponent1b = exponent1b coeff1c = coeff1c exponent1c = exponent1c coeff2a = coeff2a exponent2a = exponent2a coeff2b = coeff2b exponent2b = exponent2b coeff2c = coeff2c exponent2c = exponent2c coeff3a = coeff3a exponent3a = exponent3a coeff3b = coeff3b exponent3b = exponent3b coeff3c = coeff3c exponent3c = exponent3c pixelformula = pixelformula ppower = ppower coeffpa = coeffpa exponentpa = exponentpa coeffpb = coeffpb exponentpb = exponentpb coeffpc = coeffpc exponentpc = exponentpc pmode = pmode mandy = julia julia = mandy } jam-LHODE { ; jam 030319 ; Mandelbrot/Julia based on some general solutions to ; linear homogeneous ordinary differential equations. ; ; The specific functions implemented, and the equations for which they are ; solutions, are: ; y = e^(z/2) * cos((sqrt(3)/2)z); y'''(z) + y(z) = 0 ; y = e^(z/2) * sin((sqrt(3)/2)z); y'''(z) + y(z) = 0 ; y = e^(-z/2) * cos((sqrt(3)/2)z); y'''(z) - y(z) = 0 ; y = e^(-z/2) * sin((sqrt(3)/2)z); y'''(z) - y(z) = 0 ; y = c1*e^-z + c2*e^(z/2) * cos((sqrt(3)/2)z) + c3*e^(z/2) * sin((sqrt(3)/2)z); ; y'''(z) - y(z) = 0 ; y = c1*e^z + c2*e^(-z/2) * cos((sqrt(3)/2)z) + c3*e^(-z/2) * sin((sqrt(3)/2)z); ; y'''(z) + y(z) = 0 ; ; Similar linearly independent solutions of the following LHODEs ; are also included: y'''' + y = 0, y''''' + y = 0, and ; y''''' - y = 0. ; ; Each of these functions can be used alone, or blended with the standard ; Mandelbrot power function, z(n+1) = z(n)^power. ; Contact Joe Maddry (maddry@sri.org) with comments/questions. Enjoy! global: ; float excoeff = 0.0, float trigcoeff = 0.0 if @solution < 6 excoeff = 1/2 trigcoeff = excoeff*sqrt(3) if @solution > 2 excoeff = -excoeff endif ; solution elseif @solution < 10 excoeff = 1/sqrt(2) trigcoeff = excoeff if @solution > 7 excoeff = -excoeff endif ; solution elseif @solution < 12 excoeff = cos(#pi/5) trigcoeff = sin(#pi/5) elseif @solution < 14 excoeff = cos(3*#pi/5) trigcoeff = sin(3*#pi/5) elseif @solution < 16 excoeff = cos(2*#pi/5) trigcoeff = sin(2*#pi/5) elseif @solution < 18 excoeff = cos(4*#pi/5) trigcoeff = sin(4*#pi/5) elseif @solution < 20 excoeff = cos(#pi/6) trigcoeff = sin(#pi/6) elseif @solution < 22 excoeff = cos(5*#pi/6) trigcoeff = sin(5*#pi/6) elseif @solution < 24 excoeff = cos(#pi/7) trigcoeff = sin(#pi/7) elseif @solution < 26 excoeff = cos(3*#pi/7) trigcoeff = sin(3*#pi/7) elseif @solution < 28 excoeff = cos(5*#pi/7) trigcoeff = sin(5*#pi/7) elseif @solution < 30 excoeff = cos(2*#pi/7) trigcoeff = sin(2*#pi/7) elseif @solution < 32 excoeff = cos(4*#pi/7) trigcoeff = sin(4*#pi/7) else ; @solution < 34 excoeff = cos(6*#pi/7) trigcoeff = sin(6*#pi/7) endif ; solution init: if @mandy z = @jconstant, jc = #pixel else ; Julia z = #pixel, jc = @jconstant endif complex zextra = complex ztemp = (0,0) ; temp/spare scratch variables ; Pixel/constant initialization section if @pixelformula != 0 if @pixelformula == 1 jc = jc * jc elseif @pixelformula == 2 jc = jc * jc * jc elseif @pixelformula == 3 zextra = jc * jc jc = zextra * zextra elseif @pixelformula == 4 jc = jc ^ @ppower elseif @pixelformula == 5 jc = 1/jc elseif @pixelformula == 6 jc = sqrt(jc) elseif @pixelformula == 7 jc = 1 / ( jc * jc ) elseif @pixelformula == 8 jc = log(jc) elseif @pixelformula == 9 jc = exp( jc) elseif @pixelformula == 10 jc = jc^jc elseif @pixelformula == 11 jc = sin( jc ) elseif @pixelformula == 12 jc = cos( jc ) elseif @pixelformula == 13 jc = tan( jc ) elseif @pixelformula == 14 jc = asin( jc ) elseif @pixelformula == 15 jc = acos( jc ) elseif @pixelformula == 16 jc = atan( jc ) elseif @pixelformula == 17 jc = sinh( jc ) elseif @pixelformula == 18 jc = cosh( jc ) elseif @pixelformula == 19 jc = tanh( jc ) elseif @pixelformula == 20 jc = asinh( jc ) elseif @pixelformula == 21 jc = acosh( jc ) elseif @pixelformula == 22 jc = atanh( jc ) elseif @pixelformula == 23 jc = log( 1/jc ) elseif @pixelformula == 24 jc = log( log( jc )) elseif @pixelformula == 25 jc = exp( -jc ) elseif @pixelformula == 26 jc = exp( 1/jc ) elseif @pixelformula == 27 jc = jc^(-jc) elseif @pixelformula == 28 zextra = sin( jc ) jc = zextra * zextra elseif @pixelformula == 29 zextra = cos( jc ) jc = zextra * zextra elseif @pixelformula == 30 zextra = tan( jc ) jc = zextra * zextra elseif @pixelformula == 31 jc = cotan( jc ) elseif @pixelformula == 32 jc = 1/cos( jc ) elseif @pixelformula == 33 jc = 1/sin( jc ) elseif @pixelformula == 34 zextra = cotan( jc ) jc = zextra * zextra elseif @pixelformula == 35 zextra = 1/cos( jc ) jc = zextra * zextra elseif @pixelformula == 36 zextra = 1/sin( jc ) jc = zextra * zextra elseif @pixelformula == 37 zextra = jc^(jc) jc = jc^zextra elseif @pixelformula == 38 zextra = jc^(jc) jc = 1/( jc^zextra ) elseif @pixelformula == 39 jc = log(-jc) elseif @pixelformula == 40 jc = 1/log( jc ) elseif @pixelformula == 41 jc = jc * log( jc ) elseif @pixelformula == 42 jc = sin( jc ) / jc elseif @pixelformula == 43 jc = cos( jc ) / jc elseif @pixelformula == 44 jc = sin( jc ) * cos( jc ) elseif @pixelformula == 45 jc = sin( jc^2 ) elseif @pixelformula == 46 jc = exp( -1/jc ) elseif @pixelformula == 47 jc = jc * exp( jc ) elseif @pixelformula == 48 jc = jc * exp( -jc ) elseif @pixelformula == 49 jc = jc * exp( 1/jc ) elseif @pixelformula == 50 jc = jc * exp( -1/jc ) elseif @pixelformula == 51 jc = jc * jc * jc elseif @pixelformula == 52 jc = 1 / ( jc * jc * jc ) elseif @pixelformula == 53 jc = atan( 1 / jc ) elseif @pixelformula == 54 jc = acos( 1 / jc ) elseif @pixelformula == 55 jc = asin( 1 / jc ) elseif @pixelformula == 56 jc = tan( jc ) / jc elseif @pixelformula == 57 jc = cotan( jc ) / jc elseif @pixelformula == 58 jc = 1 / ( jc * cos( jc )) elseif @pixelformula == 59 jc = 1 / ( jc * sin( jc )) elseif @pixelformula == 60 jc = jc * sin( jc ) elseif @pixelformula == 61 jc = jc * cos( jc ) elseif @pixelformula == 62 jc = jc * tan( jc ) elseif @pixelformula == 63 jc = jc * cotan( jc ) elseif @pixelformula == 64 jc = jc/cos( jc ) elseif @pixelformula == 65 jc = jc/sin( jc ) elseif @pixelformula == 66 jc = sin( 1/jc ) elseif @pixelformula == 67 jc = cos( 1/jc ) elseif @pixelformula == 68 jc = tan( 1/jc ) elseif @pixelformula == 69 jc = cotan( 1/jc ) elseif @pixelformula == 70 jc = 1/cos( 1/jc ) elseif @pixelformula == 71 jc = 1/sin( 1/jc ) elseif @pixelformula == 72 jc = cotanh( jc ) elseif @pixelformula == 73 jc = 1/cosh( jc ) elseif @pixelformula == 74 jc = 1/sinh( jc ) elseif @pixelformula == 75 jc = atanh( 1/jc ) elseif @pixelformula == 76 jc = acosh( 1/jc ) elseif @pixelformula == 77 jc = asinh( 1/jc ) elseif @pixelformula == 78 jc = @coeffpa * jc^@exponentpa + @coeffpb * jc^@exponentpb + \ @coeffpc * jc^@exponentpc elseif @pixelformula == 79 zextra = sinh(#z) jc = zextra * zextra elseif @pixelformula == 80 zextra = cosh( jc ) jc = zextra * zextra elseif @pixelformula == 81 zextra = tanh(jc) jc = zextra * zextra elseif @pixelformula == 82 zextra = cotanh( jc ) jc = zextra * zextra elseif @pixelformula == 83 zextra = (1,0)/cosh(jc) jc = zextra * zextra elseif @pixelformula == 84 zextra = (1,0) / sinh( jc ) jc = zextra * zextra elseif @pixelformula == 85 jc = sinh(1/jc) elseif @pixelformula == 86 jc = cosh(1/jc) elseif @pixelformula == 87 jc = tanh(1/jc) elseif @pixelformula == 88 jc = cotanh(1/jc) elseif @pixelformula == 89 jc = (1,0)/cosh(1/jc) elseif @pixelformula == 90 jc = (1,0)/sinh(1/jc) elseif @pixelformula == 91 jc = sin( jc ) * tan(jc) elseif @pixelformula == 92 jc = sinh(jc) * tanh(jc) elseif @pixelformula == 93 jc = sinh(jc) * cosh(jc) elseif @pixelformula == 94 ztemp = sinh(jc), zextra = cosh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 95 ztemp = sin(jc), zextra = cos(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 96 zextra = 1/jc jc = sin(zextra)*cos(zextra) elseif @pixelformula == 97 zextra = sin( 1/jc ) jc = zextra*zextra elseif @pixelformula == 98 jc = sin(jc) * cos(1/jc) elseif @pixelformula == 99 jc = sin(jc) * sin(1/jc) elseif @pixelformula == 100 zextra = log(jc) jc = zextra*zextra elseif @pixelformula == 101 jc = sin(jc) * sin(2*jc) elseif @pixelformula == 102 jc = exp(2*jc) elseif @pixelformula == 103 jc = exp(-2*jc) elseif @pixelformula == 104 zextra = 1/jc jc = sinh(zextra)*cosh(zextra) elseif @pixelformula == 105 zextra = sinh( 1/jc ) jc = zextra*zextra elseif @pixelformula == 106 jc = sinh(jc) * cosh(1/jc) elseif @pixelformula == 107 jc = sinh(jc) * sinh(1/jc) elseif @pixelformula == 108 jc = sin(jc) * sinh(jc) elseif @pixelformula == 109 jc = sin(jc) * cosh(jc) elseif @pixelformula == 110 zextra = sin(jc), ztemp = sinh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 111 jc = sin(jc)*exp(jc) elseif @pixelformula == 112 jc = cos(jc)*exp(jc) elseif @pixelformula == 113 jc = sinh(jc)*exp(jc) elseif @pixelformula == 114 jc = cosh(jc)*exp(jc) elseif @pixelformula == 115 jc = sin(jc)*log(jc) elseif @pixelformula == 116 jc = cos(jc)*log(jc) elseif @pixelformula == 117 jc = sinh(jc)*log(jc) else ; @pixelformula == 118 jc = cosh(jc)*log(jc) endif ; @pixelformula = 1 endif ; @pixelformula != 0 loop: if @pmode != 0 z = z + jc endif ; pmode ztemp = z ; save old value for possible blending if @solution == 4 ; linear combination of Order-3 solutions ; z(n+1) = c1*e^-z + c2*e^(z/2) * cos((sqrt(3)/2)z) + c3*e^(z/2) * sin((sqrt(3)/2)z) z = @c1*exp(-z) + (exp(excoeff*z)) * (@c2*(cos(trigcoeff*z)) + @c3*(sin(trigcoeff*z))) elseif @solution == 5 ; linear combination #2 z = @c1*exp(z) + (exp(-excoeff*z)) * (@c2*(cos(trigcoeff*z)) + @c3*(sin(trigcoeff*z))) elseif ( @solution % 2 == 0 ) z = (exp(excoeff*z)) * (cos(trigcoeff*z)) else; @solution % 2 == 1 z = (exp(excoeff*z)) * (sin(trigcoeff*z)) endif ; solution if @blend z = (@weight1 * z) + (@weight2 * (ztemp^@power)) endif ; blend if @pmode != 1 z = z + jc endif ; pmode bailout: |z| < @bail default: title = "zLHODE Solutions" center = (0,0) maxiter = 100 method = multipass periodicity = 0 magn = 0.5 heading caption = "There will soon be a newer version of this formula" endheading param solution caption = "Solution to Iterate" enum = "e^(a3*z) * cos(b3*z)" "e^(a3*z) * sin(b3*z)" \ "e^(-a3*z) * cos(b3*z)" "e^(-a3*z) * sin(b3*z)" \ "c1*e^(-z)+c2*e^(a3*z)*cos(b3*z)+c3*e^(a3*z)*sin(b3*z)" \ "c1*e^(z)+c2*e^(-a3*z)*cos(b3*z)+c3*e^(-a3*z)*sin(b3*z)" \ "e^(a4*z) * cos(b4*z)" "e^(a4*z) * sin(b4*z)" \ "e^(-a4*z) * cos(b4*z)" "e^(-a4*z) * sin(b4*z)" \ "e^(a5A*z) * cos(b5A*z)" "e^(a5A*z) * sin(b5A*z)" \ "e^(a5B*z) * cos(b5B*z)" "e^(a5B*z) * sin(b5B*z)" \ "e^(a5C*z) * cos(b5C*z)" "e^(a5C*z) * sin(b5C*z)" \ "e^(a5D*z) * cos(b5D*z)" "e^(a5D*z) * sin(b5D*z)" \ "e^(a6A*z) * cos(b6A*z)" "e^(a6A*z) * sin(b6A*z)" \ "e^(a6B*z) * cos(b6B*z)" "e^(a6B*z) * sin(b6B*z)" \ "e^(a7A*z) * cos(b7A*z)" "e^(a7A*z) * sin(b7A*z)" \ "e^(a7B*z) * cos(b7B*z)" "e^(a7B*z) * sin(b7B*z)" \ "e^(a7C*z) * cos(b7C*z)" "e^(a7C*z) * sin(b7C*z)" \ "e^(a7D*z) * cos(b7D*z)" "e^(a7D*z) * sin(b7D*z)" \ "e^(a7E*z) * cos(b7E*z)" "e^(a7E*z) * sin(b7E*z)" \ "e^(a7F*z) * cos(b7F*z)" "e^(a7F*z) * sin(b7F*z)" default = 0 hint = "This parameter selects which solution to the differential \ equation y'''(z) + y(z) = 0, y'''(z) - y(z) = 0, etc., is to be \ iterated. a3, b3 refer to the solutions to the 3rd order differential \ equations; a4, b4 to the 4th order solutions; a5A, a5B, b5A, etc. to \ 5th order solutions; etc." endparam param c1 caption = "Coeff 1" default = (1,0) hint = "If param 'Solution' equals 'c1*e(...', then this is the \ coefficient of the first term" visible = (@solution == 2) || (@solution == 5) endparam param c2 caption = "Coeff 2" default = (1,0) hint = "If param 'Solution' equals 'c1*e(...', then this is the \ coefficient of the second term" visible = (@solution == 2) || (@solution == 5) endparam param c3 caption = "Coeff 3" default = (1,0) hint = "If param 'Solution' equals 'c1*e(...', then this is the \ coefficient of the third term" visible = (@solution == 2) || (@solution == 5) endparam param blend caption = "Blend Z^Power?" default = FALSE hint = "If enabled, then each iteration the differential equation solution \ is blended with the standard Mandelbrot function, z(n+1) = z^power + c. \ Set params 'Z Power', 'ODE Weight', and 'Z^Power Weight'" endparam param power caption = "Z Power" default = (2,0) hint = "If 'Blend' is enabled, then this is the exponent of the usual \ Mandelbrot function" visible = @blend == TRUE endparam param weight1 caption = "ODE Weight" default = -0.1 hint = "If 'Blend' is enabled, this is the amount of the differential equation \ function that is added to the standard Mandelbrot function" visible = @blend == TRUE endparam param weight2 caption = "Z^Power Weight" default = 0.9 hint = "If 'Blend' is enabled, this is the amount of the standard Mandelbrot function \ that is added to the differential equation function" visible = @blend == TRUE endparam param pixelformula caption = "Pixel Formula" enum = "p" "p^2" "p^3" "p^4" "p^power" "1/p" "sqrt(p)" "1/p^2" "log(p)" "e^p" \ "p^p" "sin(p)" "cos(p)" \ "tan(p)" "asin(p)" "acos(p)" "atan(p)" "sinh(p)" "cosh(p)" "tanh(p)" \ "asinh(p)" "acosh(p)" "atanh(p)" "log(1/p)" "log(log(p))" "e^-p" \ "e^(1/p)" "p^-p" "sin(p)^2" "cos(p)^2" "tan(p)^2" "cot(p)" "sec(p)" \ "csc(p)" "cot(p)^2" "sec(p)^2" "csc(p)^2" "p^p^p" "1/p^p^p" "log(-p)" \ "1/log(p)" "plog(p)" "sin(p)/p" "cos(p)/p" "sin(p)*cos(p)" "sin(p^2)" \ "e^(-1/p)" "pe^p" "pe^-p" "pe^(1/p)" "pe^(-1/p)" "p^3" "1/p^3" \ "acot(p)" "asec(p)" "acsc(p)" "tan(p)/p" "cot(p)/p" "sec(p)/p" \ "csc(p)/p" "psin(p)" "pcos(p)" "ptan(p)" "pcot(p)" "psec(p)" "pcsc(p)" \ "sin(1/p)" "cos(1/p)" "tan(1/p)" "cot(1/p)" "sec(1/p)" "csc(1/p)" \ "cotanh(p)" "sech(p)" "cosech(p)" "acoth(p)" "asech(p)" "acosech(p)" \ "3-term polynomial" "sinh(p)^2" "cosh(p)^2" "tanh(p)^2" "cotanh(p)^2" \ "sech(p)^2" "cosech(p)^2" "sinh(1/p)" "cosh(1/p)" "tanh(1/p)" \ "cotanh(1/p)" "sech(1/p)" "cosech(1/p)" "sin(p)tan(p)" "sinh(p)tanh(p)" \ "sinh(p)cosh(p)" "sinh(p)^2*cosh(p)^2" "sin(p)^2*cos(p)^2" \ "sin(1/p)*cos(1/p)" "sin(1/p)^2" "sin(p)cos(1/p)" "sin(p)sin(1/p)" \ "log(p)^2" "sin(p)sin(2p)" "e^2p" "e^-2p" "sinh(1/p)cosh(1/p)" \ "sinh(1/p)^2" "sinh(p)cosh(1/p)" "sinh(p)sinh(1/p)" "sin(p)sinh(p)" \ "sin(p)cosh(p)" "sin(p)^2*sinh(p)^2" "sin(p)e^p" "cos(p)e^p" \ "sinh(p)e^p" "cosh(p)e^p" "sin(p)log(p)" "cos(p)log(p)" "sinh(p)log(p)" \ "cosh(p)log(p)" default = 0 hint = "Pixel value (Mand) or seed (Julia) can be initialized \ before iterating. For 'p^power', set parameter 'Pixel Power'; \ for '3-term polynomial', set 'Coeff Pa', 'Exponent Pa', 'Coeff Pb', \ 'Exponent Pb', 'Coeff Pc', 'Exponent Pc'. 'p' results in normal \ initialization" endparam param ppower caption = "Pixel Power" default = (5,0) hint = "This is the power used if parameter \ 'Pixel Formula' is set to 'p^power'" endparam param coeffpa caption = "Coeff Pa" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 1st term" endparam param exponentpa caption = "Exponent Pa" default = (6,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 1st term" endparam param coeffpb caption = "Coeff Pb" default = (-1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" endparam param exponentpb caption = "Exponent Pb" default = (4,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 2nd term" endparam param coeffpc caption = "Coeff Pc" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" endparam param exponentpc caption = "Exponent Pc" default = (2,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 3rd term" endparam param pmode caption = "Pixel Mode" default = 0 enum = "Post-add" "Pre-add" "Both" hint = "'Post-add' -- formula is executed, then pixel/constant is added to result; \ 'Pre-add' -- pixel is added to z, then formula executed; 'Both' -- pixel added, \ formula executed, then pixel added again to result" endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types" endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity" endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" endparam switch: type = "jam-LHODE" jconstant = #pixel bail = bail solution = solution c1 = c1 c2 = c2 c3 = c3 blend = blend power = power weight1 = weight1 weight2 = weight2 pixelformula = pixelformula ppower = ppower coeffpa = coeffpa exponentpa = exponentpa coeffpb = coeffpb exponentpb = exponentpb coeffpc = coeffpc exponentpc = exponentpc pmode = pmode mandy = julia julia = mandy } jam-ShapeGuidedJulia { ; Mandelbrot/Julia incorporating two different Julia constants, J1 and J2. ; The effective Julia constant used on any given iteration is interpolated ; between (or beyond) J1 and J2 based on the distance of the current value ; of the z iterate from a user-defined shape, such as a circle. ; Switch mode can be used to select suitable values for J1 and J2, and the ; rate of interpolation can be adjusted by setting a coefficient constant for ; the linear interpolation equations. ; After switching to the 'Julia 1' mode, the selected Julia constant can be ; read from the read-only variable 'Switch Constant'. This value should be ; manually copied to param 'Julia 1' before switching a second time (to mode ; 'Julia 2'), if you want to preserve the selected 'Julia 1' value after the ; second switch. ; Questions, comments, or problems welecomed at maddry@sri.org. global: float twopi = 2.0 * #pi float tangle = @rotation * #pi / 180 ; rotated trap angle if ( tangle < 0 ) tangle = tangle + twopi endif ; tangle init: if @CurrentMode == "Mandelbrot" z = @perturb, jc1 = #pixel, jc2 = @Julia2 elseif @CurrentMode == "Julia 1" z = #pixel, jc1 = @SwitchConstant, jc2 = @Julia2 else z = #pixel, jc1 = @Julia1, jc2 = @SwitchConstant endif ; @CurrentMode float distance = float zangle = float temp = 0.0 complex ztemp = complex ttemp = (0,0) complex jeffective = (0,0) ; the effective Julia constant complex jcoeff = ( jc2 - jc1)/@ilimit ; the interpolation equation coefficient loop: ; First, njormalize z to trap center, find the point on the trap closest ; to z, then find the distance between the iterate and the trap if @shape == "circle" distance = cabs(z - @center) - @tscale else ; Center on trap ztemp = z - @center ; Compute rotated z ztemp = ztemp * exp( flip(tangle)) ; Find angle of 'rotated' z zangle = atan2( ztemp ) if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle <= two pi endif ; zangle if @shape == "ellipse" temp = abs(tan(zangle)) temp = @twidthx * @theighty * sqrt(1 + temp * temp)/(@theighty^@texponent + \ (@twidthx^@texponent * temp^@texponent))^(1/@texponent) ttemp = @tscale * temp * exp(flip(zangle)) distance = cabs(ztemp - ttemp) elseif @shape == "hyperbola" distance = abs( imag(ztemp) * real(ztemp) - @tscale ) endif ; @shape [inner] endif ; @shape [outer] ; Second, interpolate to find the effective Julia constant jeffective = jcoeff * distance + jc1 ; Third, calculate the new z value z = z^@zexponent + jeffective bailout: |z| < @bail default: title = "Shape Guided Julia" center = (0,0) maxiter = 100 method = multipass periodicity = 0 param CurrentMode caption = "Current Mode" default = 0 enum = "Mandelbrot" "Julia 1" "Julia 2" hint = "This is the current switch operating mode" enabled = FALSE ; visible but not directly changeable endparam param SwitchToMode caption = "Switch To?" default = 1 enum = "Mandelbrot" "Julia 1" "Julia 2" hint = "This is the operating mode that will be active after a 'switch'" endparam param NextMode caption = "Next Mode?" default = 2 enum = "Mandelbrot" "Julia 1" "Julia 2" hint = "This is the operating mode that will be active after a second 'switch'" visible = FALSE ; never visible or directly changeable endparam param SwitchConstant caption = "Switch Constant" default = (0,0) hint = "This is the complex value selected by the cursor after a switch. \ To preserve this value before another switch, manually copy this value \ to param 'Julia 1' (if 'Switch To' is set to 'Julia 2' or 'Mandelbrot') \ or to param 'Julia 2' (if 'Switch To' is set to 'Julia 1' or \ 'Mandelbrot'). This value should not normally be set manually" endparam param Julia1 caption = "Julia 1" default = (0,0) hint = "This is the first Julia constant, which can be set as usual by \ switching if param 'Switch To' is set to 'Julia 1'. This param can also \ be set manually, for example by copying the 'Switch Constant' before \ setting 'Switch To' to 'Julia 2' and performing a second switch" endparam param Julia2 caption = "Julia 2" default = (0,0) hint = "This is the second Julia constant, which can be set as usual by \ switching if param 'Switch To' is set to 'Julia 2'. This param can also \ be set manually, for example by copying the 'Switch Constant' before \ setting 'Switch To' to 'Julia 1' and performing a second switch" endparam param shape caption = "Guide Shape" default = 0 enum = "circle" "ellipse" "hyperbola" hint = "This param determines the trap shape. The distance between the chosen \ trap and the current z is used to calculate the effective Julia constant \ for that iteration" endparam param center caption = "Trap Center" default = (0,0) hint = "This is the center of the guiding shape which affects the \ effective Julia constant used on each iteration. The effective \ Julia constant is calculated from params 'Julia 1' and 'Julia 2' \ based on the distance of the current z from this trap" endparam param tscale caption = "Trap Scale" default = 0.5 min = 0.0 hint = "This is the scale or radius of the guiding shape which affects the \ effective Julia constant used on each iteration. The effective \ Julia constant is calculated from params 'Julia 1' and 'Julia 2' \ based on the distance of the current z from the trap shape" endparam param rotation caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that the trap shape should be rotated from \ its default position" visible = @shape != "circle" endparam param texponent caption = "Ellipse Exponent" default = 2.0 hint = "Use 2 for ellipse, > 2 for superellipse, < 1 for astroid, 1-2 for \ subellipse" visible = @shape == "ellipse" endparam param twidthx caption = "Trap Width" default = 1.0 min = 0.0 hint = "Trap size in x-direction" visible = @shape == "ellipse" endparam param theighty caption = "Trap Height" default = 0.5 min = 0.0 hint = "Trap size in y-direction" visible = @shape == "ellipse" endparam param ilimit caption = "Interpolation Constant" default = 10.0 hint = "This coefficient value affects the rate at which the effective \ Julia constant varies betweek the 'Julia 1' value and the 'Julia 2' value" endparam param zexponent caption = "Mandelbrot Power" default = (2,0) hint = "This is the exponent for the Mnadelbrot function" endparam param perturb caption = "Mandy Perturbation" default = (0,0) hint = "In Mandelbrot mode, this is the initial perturbation" endparam param bail caption = "Bailout Value" default = 1024.0 hint = "This is the bailout value at which iteration ends" endparam switch: type = "jam-ShapeGuidedJulia" CurrentMode = SwitchToMode SwitchToMode = NextMode NextMode = CurrentMode SwitchConstant = #pixel Julia1 = Julia1 Julia2 = Julia2 shape = shape tscale = tscale center = center rotation = rotation texponent = texponent twidthx = twidthx theighty = theighty ilimit = ilimit zexponent = zexponent perturb = perturb bail = bail } jam-itertrig { ; iterated trig functions ; jam 170511 ; based on the iterative method of Otto Magus global: float adjustment = @adjust/100 halfpi = #pi/2 init: float x = float y = 0.0 float a = 0.0 int itercount = 0 z = @pixfunction(#pixel) loop: while itercount < @iterations itercount = itercount + 1 z = @Zfunction(z) x = real(z) y = imag(z) a = sqr(x) + sqr(y) x = x/a + real(@zperturb) y = y/a + imag(@zperturb) z = x + flip(y) if @trigfunction == "sin" ; sine function z = sin(z) elseif @trigfunction == "cos" ; cosine z = cos(z) elseif @trigfunction == "tan" ; tangent z = tan(z) elseif @trigfunction == "cot" ; cotangent z = cotan(z) elseif @trigfunction == "sec" ; secant z = 1/cos(z) elseif @trigfunction == "csc" ; cosecant z = 1/sin(z) elseif @trigfunction == "ver" ; versine z = 1 - cos(z) elseif @trigfunction == "vcs" ; vercosine z = 1 + cos(z) elseif @trigfunction == "cvs" ; coversine z = 1 - sin(z) elseif @trigfunction == "cvc" ; covercosine z = 1 + sin(z) elseif @trigfunction == "exs" ; exsecant z = 1/cos(z) - 1 elseif @trigfunction == "exc" ; excosecant z = 1/sin(z) - 1 elseif @trigfunction == "crd" ; chord z = 2 * sin(z/2) elseif @trigfunction == "asin" ; arcsine z = asin(z - trunc(z)) elseif @trigfunction == "acos" ; arccosine z = acos(z - trunc(z)) elseif @trigfunction == "atan" ; arctangent z = atan(z) elseif @trigfunction == "acot" ; arccotangent z = halfpi - atan(z) elseif @trigfunction == "asec" ; arcsecant z = acos(1/z - trunc(1/z)) elseif @trigfunction == "acsc" ; arccosecant z = asin(1/z - trunc(1/z)) elseif @trigfunction == "aver" ; arcversine z = acos(1 - z - trunc(1-z)) elseif @trigfunction == "avcs" ; arcvercosine z = acos(1 + z - trunc(1+z)) elseif @trigfunction == "acvs" ; arccoversine z = asin(1 - z - trunc(1-z)) elseif @trigfunction == "acvc" ; arccovercosine z = asin(1 + z - trunc(1+z)) elseif @trigfunction == "aexs" ; arcexsecant z = acos( (1/(z+1)) - trunc( (1/(z+1)) ) ) elseif @trigfunction == "aexc" ; arcexcosecant z = asin( (1/(z+1)) - trunc( (1/(z+1)) ) ) elseif @trigfunction == "acrd" ; arcchord z = 2 * asin( z/2 - trunc(z/2) ) endif ; @trigfunction z = @multiplier * log( abs(z))^@power + @offset endwhile ; itercount #z = adjustment * z bailout: |z| < @bail default: title = "Iterated Trig Functions" center = (0,0) maxiter = 1000 method = multipass periodicity = 0 param trigfunction caption = "Trig Function" enum = "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" default = 0 hint = "This parameter chooses which function to iterate." endparam param zperturb caption = "Z Perturbation" default = (0,0) hint = "The parameter modifies #z during the arcsine iterations." endparam func pixfunction caption = "Pixel Function" default = ident() hint = "This function modifies the #pixel value before iterations begin." endfunc func Zfunction caption = "Z Function" default = ident() hint = "This function modifies #z during the arcsine iterations." endfunc param multiplier caption = "Multiplier" default = (1,0) hint = "Each iteration of arcsine(#z) is multiplied by this value." endparam param offset caption = "Offset" default = (-1,0) hint = "This value is added to the arcsine result each iteration." endparam param power caption = "Exponent" default = (1,0) hint = "The arcsine result is raised to this power each iteration." endparam param iterations caption = "Iterations" default = 2 min = 1 hint = "This parameter determines how many times the arcsine function \ is executed." endparam param adjust caption = "Adjustment" default = 102.0 hint = "This value scales #z after the arcsine iterations." endparam param bail caption = "Bailout Value" default = 4.0 hint = "Value needed to 'escape' to infinity" endparam } jam-BernoulliPolynomials { ; Bernoulli polynomials ; Mathematica: Table[BernoulliB[n, z], {n, 0, 20}] ; jam 7/27/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = sqr(#z) - #z + 1/6 elseif @variant == "3" zpolynom = #z^3 - 1.5 * #z^2 + 0.5 * #z elseif @variant == "4" zpolynom = #z^4 - 2 * #z^3 + sqr(#z) - 1/30 elseif @variant == "5" zpolynom = #z^5 - 2.5 * #z^4 + (5/3) * #z^3 - #z/6 elseif @variant == "6" zpolynom = #z^6 - 3 * #z^5 + 2.5 * #z^4 - 0.5 * sqr(#z) + 1/42 elseif @variant == "7" zpolynom = #z^7 - 3.5 * #z^6 + 3.5 * #z^5 - (7/6) * #z^3 + #z/6 elseif @variant == "8" zpolynom = #z^8 - 4 * #z^7 + (14/3) * #z^6 - (7/3) * #z^4 + (2/3) * sqr(#z) - \ 1/30 elseif @variant == "9" zpolynom = #z^9 - 4.5 * #z^8 + 6 * #z^7 - 4.2 * #z^5 + 2 * #z^3 - 0.3 \ * #z elseif @variant == "10" zpolynom = #z^10 - 5 * #z^9 + 7.5 * #z^8 - 7 * #z^6 + 5 * #z^4 - 1.5 * sqr(#z) \ + 5/66 elseif @variant == "11" zpolynom = #z^11 - 5.5 * #z^10 + (55/6) * #z^9 - 11 * #z^7 + 11 * #z^5 - 5.5 * \ #z^3 + (5/6) * #z elseif @variant == "12" zpolynom = #z^12 - 6 * #z^11 + 11 * #z^10 - 16.5 * #z^8 + 22 * #z^6 - 16.5 * \ #z^4 + 5 * sqr(#z) - 691/2730 elseif @variant == "13" zpolynom = #z^13 - 6.5 * #z^12 + 13 * #z^11 - (143/6) * #z^9 + 286/7 * #z^7 - \ 42.9 * #z^5 + 65/3 * #z^3 - 691/210 elseif @variant == "14" zpolynom = #z^14 - 7 * #z^13 + 91/6 * #z^12 - 1001/30 * #z^10 + 71.5 * #z^8 \ - 100.1 * #z^6 + (455/6) * #z^4 - 691/30 * sqr(#z) + 7/6 elseif @variant == "15" zpolynom = #z^15 - 7.5 * #z^14 + 17.5 * #z^13 - 45.5 * #z^11 + 715/6 * #z^9 \ - 214.5 * #z^7 + 227.5 * #z^5 - 691/6 * #z^3 + 17.5 * #z elseif @variant == "16" zpolynom = #z^16 - 8 * #z^15 + 20 * #z^14 - 182/3 * #z^12 + 572/3 * #z^10 \ - 429 * #z^8 + (1820/3) * #z^6 - 1382/3 * #z^4 + 140 * sqr(#z) - 3617/510 elseif @variant == "17" zpolynom = #z^17 - 8.5 * #z^16 + 68/3 * #z^15 - 238/3 * #z^13 + 884/3 * #z^11 \ - 2431/3 * #z^9 + (4420/3) * #z^7 - 23494/15 * #z^5 + 2380/3 * #z^3 - \ 3617/30 * #z elseif @variant == "18" zpolynom = #z^18 - 9 * #z^17 + 25.5 * #z^16 - 102 * #z^14 + 442 * #z^12 - 1458.6 \ * #z^10 + 3315 * #z^8 - 4698.8 * #z^6 + 3570 * #z^4 - 1085.1 \ * sqr(#z) + 43867/798 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Bernoulli" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-BesselPolynomials { ; Bessel polynomials ; Mathematica: y[n_, z_] := Sqrt[2/(Pi*z)]*E^(1/z)*BesselK[-n - 1/2, 1/z]; ; Table[ y[n, z], {n, 0, 18}] ; jam 7/28/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = 1 + 3 * #z + 3 * sqr(#z) elseif @variant == "3" zpolynom = 1 + 6 * #z + 15 * sqr(#z) + 15 * #z^3 elseif @variant == "4" zpolynom = 1 + 10 * #z + 45 * sqr(#z) + 105 * #z^3 + 105 * #z^4 elseif @variant == "5" zpolynom = 1 + 15 * #z + 105 * sqr(#z) + 420 * #z^3 + 945 * #z^4 + 945 * #z^5 elseif @variant == "6" zpolynom = 1 + 21 * #z + 210 * sqr(#z) + 1260 * #z^3 + 4725 * #z^4 + 10395 * \ #z^5 + 10395 * #z^6 elseif @variant == "7" zpolynom = 1 + 28 * #z + 378 * sqr(#z) + 3150 * #z^3 + 17325 * #z^4 + 62370 * \ #z^5 + 135135 * #z^6 +135135 * #z^7 elseif @variant == "8" zpolynom = 1 + 36 * #z + 630 * sqr(#z) + 6930 * #z^3 + 51975 * #z^4 + 270270 \ * #z^5 + 945945 * #z^6 + 2027025 * #z^7 + 2027025 * #z^8 elseif @variant == "9" zpolynom = 1 + 45 * #z + 990 * sqr(#z) + 13860 * #z^3 + 135135 * #z^4 + \ 945945 * #z^5 + 4729725 * #z^6 + 16216200 * #z^7 + 34459425 * #z^8 + \ 34459425 * #z^9 elseif @variant == "10" zpolynom = 1 + 55 * #z + 1485 * sqr(#z) + 25740 * #z^3 + 315315 * #z^4 + \ 2837835 * #z^5 + 18918900 * #z^6 + 91891800 * #z^7 + 310134825 * #z^8 + \ 654729075 * #z^9 + 654729075 * #z^10 elseif @variant == "11" zpolynom = 1 + 66 * #z + 2145 * sqr(#z) + 45045 * #z^3 + 675675 * #z^4 + \ 7567560 * #z^5 + 64324260 * #z^6 + 413513100 * #z^7 + 1964187225 * \ #z^8 + 6.547290750e9 * #z^9 + 13.749310575e9 * #z^10 + 13.749310575e9 \ * #z^11 elseif @variant == "12" zpolynom = 1 + 78 * #z + 3003 * sqr(#z) + 75075 * #z^3 + 1351350 * #z^4 + \ 18378360 * #z^5 + 192972780 * #z^6 + 1571349780 * #z^7 + 9.820936125e9 * \ #z^8 + 45.831035250e9 * #z^9 + 151.242416325e9 * #z^10 + 316.234143225e9 \ * #z^11 + 316.234143225e9 * #z^12 elseif @variant == "13" zpolynom = 1 + 91 * #z + 4095 * sqr(#z) + 120120 * #z^3 + 2552550 * #z^4 + \ 41351310 * #z^5 + 523783260 * #z^6 + 5.237832600e9 * #z^7 + 41.247931725e9 \ * #z^8 + 252.070693875e9 * #z^9 + 1.159525191825e12 * #z^10 + \ 3.794809718700e12 * #z^11 + 7.905853580625e12 * #z^12 + 7.905853580625e12 \ * #z^13 elseif @variant == "14" zpolynom = 1 + 105 * #z + 5460 * sqr(#z) + 185640 * #z^3 + 4594590 * #z^4 + \ 87297210 * #z^5 + 1309458150 * #z^6 + 15.713497800e9 * #z^7 + 151.242416325e9 \ * #z^8 + 1.159525191825e12 * #z^9 + 6.957151150950e12 * #z^10 + \ 31.623414322500e12 * #z^11 + 102.776096548125e12 * #z^12 + 213.458046676875e12 \ * #z^13 + 213.458046676875e12 * #z^14 elseif @variant == "15" zpolynom = 1 + 120 * #z + 7140 * sqr(#z) + 278460 * #z^3 + 7936110 * #z^4 + \ 174594420 * #z^5 + 3.055402350e9 * #z^6 + 43.212118950e9 * #z^7 + 496.939367925e9 \ * #z^8 + 4.638100767300e12 * #z^9 + 34.785755754750e12 * #z^10 + \ 205.552193096250e12 * #z^11 + 924.984868933125e12 * #z^12 + 2.988412653476250e15 \ * #z^13 + 6.190283353629375e15 * #z^14 + 6.190283353629375e15 * #z^15 elseif @variant == "16" zpolynom = 1 + 136 * #z + 9180 * sqr(#z) + 406980 * #z^3 + 13226850 * #z^4 + \ 333316620 * #z^5 + 6.721885170e9 * #z^6 + 110.430970650e9 * #z^7 + \ 1.490818103775e12 * #z^8 + 16.564645597500e12 * #z^9 + 150.738274937250e12 \ * #z^10 + 1.109981842719750e15 * #z^11 + 6.474894082531875e15 * #z^12 + \ 28.887988983603750e15 * #z^13 + 92.854250304440625e15 * #z^14 + \ 191.898783962510625e15 * #z^15 + 191.898783962510625e15 * #z^16 elseif @variant == "17" zpolynom = 1 + 153 * #z + 11628 * sqr(#z) + 581400 * #z^3 + 21366450 * #z^4 \ + 611080470 * #z^5 + 14.054850810e9 * #z^6 + 265.034329560e9 * #z^7 + \ 4.141161399375e12 * #z^8 + 53.835098191875e12 * #z^9 + 581.419060472250e12 \ * #z^10 + 5.179915266025500e15 * #z^11 + 37.554385678684875e15 * \ #z^12 + 216.659917377028125e15 * #z^13 + 959.493919812553125e15 * \ #z^14 + 3.070380543400170000e18 * #z^15 + 6.332659870762850625e18 \ * #z^16 + 6.332659870762850625e18 * #z^17 elseif @variant == "18" zpolynom = 1 + 171 * #z + 14535 * sqr(#z) + 813960 * #z^3 + 33575850 * \ #z^4 + 1081142370 * #z^5 + 28.109701620e9 * #z^6 + 602.350749000e9 * #z^7 + \ 10.767019638375e12 * #z^8 + 161.505294575625e12 * #z^9 + \ 2.034966711652875e15 * #z^10 + 21.459648959248500e15 * #z^11 + \ 187.771928393424375e15 * #z^12 + 1.343291487737574375e18 * #z^13 + \ 7.675951358500425000e18 * #z^14 + 33.774185977401870000e18 * #z^15 + \ 107.655217802968460625e18 * #z^16 + 221.643095476699771875e18 * #z^17 + \ 221.643095476699771875e18 * #z^18 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Bessel" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-FibonacciPolynomials { ; Fibonacci polynomials ; Mathematica: P[z, 1] = 1; P[z, 2] = z; ; P[z_, n_] := z* P[z, n - 1] + P[z, n - 2]; ; Table[ExpandAll[P[z, n]], {n, 1, 19}] ; jam 7/29/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = sqr(#z) + 1 elseif @variant == "3" zpolynom = 2 * #z + #z^3 elseif @variant == "4" zpolynom = 1 + 3 * #z^2 + #z^4 elseif @variant == "5" zpolynom = 3 * z + 4 * #z^3 + #z^5 elseif @variant == "6" zpolynom = 1 + 6 * #z^2 + 5 * #z^4 + #z^6 elseif @variant == "7" zpolynom = 4 * #z + 10 * #z^3 + 6 * #z^5 + #z^7 elseif @variant == "8" zpolynom = 1 + 10 * #z^2 + 15 * #z^4 + 7 * #z^6 + #z^8 elseif @variant == "9" zpolynom = 5 * #z + 20 * #z^3 + 21 * #z^5 + 8 * #z^7 + #z^9 elseif @variant == "10" zpolynom = 1 + 15 * #z^2 + 35 * #z^4 + 28 * #z^6 + 9 * #z^8 + #z^10 elseif @variant == "11" zpolynom = 6 * #z + 35 * #z^3 + 56 * #z^5 + 36 * #z^7 + 10 * #z^9 + \ #z^11 elseif @variant == "12" zpolynom = 1 + 21 * #z^2 + 70 * #z^4 + 84 * #z^6 + 45 * #z^8 + 11 * \ #z^10 + #z^12 elseif @variant == "13" zpolynom = 7 * #z + 56 * #z^3 + 126 * #z^5 + 120 * #z^7 + 55 * #z^9 + \ 12 * #z^11 + #z^13 elseif @variant == "14" zpolynom = 1 + 28 * #z^2 + 126 * #z^4 + 210 * #z^6 + 165 * #z^8 + 66 * \ #z^10 + 13 * #z^12 + #z^14 elseif @variant == "15" zpolynom = 8 * #z + 84 * #z^3 + 252 * #z^5 + 330 * #z^7 + 220 * #z^9 + \ 78 * #z^11 + 14 * #z^13 + #z^15 elseif @variant == "16" zpolynom = 1 + 36 * #z^2 + 210 * #z^4 + 462 * #z^6 + 495 * #z^8 + 286 * \ #z^10 + 91 * #z^12 + 15 * #z^14 + #z^16 elseif @variant == "17" zpolynom = 9 * #z + 120 * #z^3 + 462 * #z^5 + 792 * #z^7 + 715 * #z^9 + \ 364 * #z^11 + 105 * #z^13 + 16 * #z^15 + #z^17 elseif @variant == "18" zpolynom = 1 + 45 * #z^2 + 330 * #z^4 + 924 * #z^6 + 1287 * #z^8 + 1001 * \ #z^10 + 455 * #z^12 + 120 * #z^14 + 17 * #z^16 + #z^18 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Fibonacci" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-TetranacciPolynomials { ; Tetranacci polynomials ; Mathematica: P[z, 0] = 0; P[z, 1] = 0; P[z, 2] = 1; P[z, 3] = z^3; ; P[z_, n_] := z^3* P[z, n - 1] + z^2*P[z, n - 2] + z*P[z, n - 3] + P[z, n - 4]; ; Table[ExpandAll[P[z, n], z], {n, 1, 22}] ; jam 7/30/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = #z^3 elseif @variant == "3" zpolynom = #z^2 + #z^6 elseif @variant == "4" zpolynom = #z + 2 * #z^5 + #z^9 elseif @variant == "5" zpolynom = 1 + 3 * #z^4 + 3 * #z^8 + #z^12 elseif @variant == "6" zpolynom = 4 * #z^3 + 6 * #z^7 + 4 * #z^11 + #z^15 elseif @variant == "7" zpolynom = 3 * #z^2 + 10 * #z^6 + 10 * #z^10 + 5 * #z^14 + #z^18 elseif @variant == "8" zpolynom = 2 * #z + 12 * #z^5 + 20 * #z^9 + 15 * #z^13 + 6 * #z^17 + #z^21 elseif @variant == "9" zpolynom = 1 + 12 * #z^4 + 31 * #z^8 + 35 * #z^12 + 21 * #z^16 + 7 * #z^20 \ + #z^24 elseif @variant == "10" zpolynom = 10 * #z^3 + 40 * #z^7 + 65 * #z^11 + 56 * #z^15 + 28 * #z^19 + 8 \ * #z^23 + #z^27 elseif @variant == "11" zpolynom = 6 * #z^2 + 44 * #z^6 + 101 * #z^10 + 120 * #z^14 + 84 * #z^18 + 36 \ * #z^22 + 9 * #z^26 + #z^30 elseif @variant == "12" zpolynom = 3 * #z + 40 * #z^5 + 135 * #z^9 + 216 * #z^13 + 203 * #z^17 + 120 \ * #z^21 + 45 * #z^25 + 10 * #z^29 + #z^33 elseif @variant == "13" zpolynom = 1 + 31 * #z^4 + 155 * #z^8 + 336 * #z^12 + 413 * #z^16 + 322 * \ #z^20 + 165 * #z^24 + 55 * #z^28 + 11 * #z^32 + #z^36 elseif @variant == "14" zpolynom = 20 * #z^3 + 155 * #z^7 + 456 * #z^11 + 728 * #z^15 + 728 * #z^19 + \ 486 * #z^23 + 220 * #z^27 + 66 * #z^31 + 12 * #z^35 + #z^39 elseif @variant == "15" zpolynom = 10 * #z^2 + 135 * #z^6 + 546 * #z^10 + 1128 * #z^14 + 1428 * \ #z^18 + 1206 * #z^22 + 705 * #z^26 + 286 * #z^30 + 78 * #z^34 + 13 * \ #z^38 + #z^42 elseif @variant == "16" zpolynom = 4 * #z + 101 * #z^5 + 580 * #z^9 + 1554 * #z^13 + 2472 * #z^17 \ + 2598 * #z^21 + 1902 * #z^25 + 990 * #z^29 + 364 * #z^33 + 91 * #z^37 \ + 14 * #z^41 + #z^45 elseif @variant == "17" zpolynom = 1 + 65 * #z^4 + 546 * #z^8 + 1918 * #z^12 + 3823 * #z^16 + 4950 \ * #z^20 + 4455 * #z^24 + 2882 * #z^28 + 1353 * #z^32 + 455 * #z^36 + \ 105 * #z^40 + 15 * #z^44 + #z^48 elseif @variant == "18" zpolynom = 35 * #z^3 + 456 * #z^7 + 2128 * #z^11 + 5328 * #z^15 + 8451 * \ #z^19 + 9240 * #z^23 + 7282 * #z^27 + 4224 * #z^31 + 1807 * #z^35 + 560 \ * #z^39 + 120 * #z^43 + 16 * #z^47 + #z^51 elseif @variant == "19" zpolynom = 15 * #z^2 + 336 * #z^6 + 2128 * #z^10 + 6728 * #z^14 + 13051 * \ #z^18 + 17205 * #z^22 + 16302 * #z^26 + 11440 * #z^30 + 6019 * #z^34 + \ 2366 * #z^38 + 680 * #z^42 + 136 * #z^46 + 17 * #z^50 + #z^54 elseif @variant == "20" zpolynom = 5 * #z + 216 * #z^5 + 1918 * #z^9 + 7728 * #z^13 + 18351 * #z^17 \ + 29050 * #z^21 + 32802 * #z^25 + 27456 * #z^29 + 17381 * #z^33 + 8372 * \ #z^37 + 3045 * #z^41 + 816 * #z^45 + 153 * #z^49 + 18 * #z^53 + #z^57 elseif @variant == "21" zpolynom = 1 + 120 * #z^4 + 1554 * #z^8 + 8092 * #z^12 + 23607 * #z^16 + \ 44803 * #z^20 + 59950 * #z^24 + 59268 * #z^28 + 44473 * #z^32 + 25662 * \ #z^36 + 11403 * #z^40 + 3860 * #z^44 + 969 * #z^48 + 171 * #z^52 + 19 * \ #z^56 + #z^60 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Tetranacci" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" "21" default = 6 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-GeneralPolynomials { ; General polynomial formula. Most of the other polynomial formulas in this folder, as ; well as many new ones, can be implemented here. ; jam 7/31/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == 2 zpolynom = @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 3 zpolynom = @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 4 zpolynom = @coeff4 * #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + \ @coeff1 elseif @variant == 5 zpolynom = @coeff5 * #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 * #z^@exp3 + \ @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 6 zpolynom = @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * #z^@exp4 + \ @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 7 zpolynom = @coeff7 * #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + \ @coeff4 * #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 8 zpolynom = @coeff8 * #z^@exp8 + @coeff7 * #z^@exp7 + @coeff6 * #z^@exp6 + \ @coeff5 * #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 \ * #z^@exp2 + @coeff1 elseif @variant == 9 zpolynom = @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * #z^@exp7 + \ @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 \ * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 10 zpolynom = @coeff10 * #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + \ @coeff7 * #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 \ * #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 11 zpolynom = @coeff11 * #z^@exp11 + @coeff10 * #z^@exp10 + @coeff9 * #z^@exp9 \ + @coeff8 * #z^@exp8 + @coeff7 * #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 \ * #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * \ #z^@exp2 + @coeff1 elseif @variant == 12 zpolynom = @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 13 zpolynom = @coeff13 * #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * \ #z^@exp11 + @coeff10 * #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * \ #z^@exp8 + @coeff7 * #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * \ #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * \ #z^@exp2 + @coeff1 elseif @variant == 14 zpolynom = @coeff14 * #z^@exp14 + @coeff13 * #z^@exp13 + @coeff12 * \ #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * #z^@exp10 + @coeff9 \ * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * #z^@exp7 + @coeff6 * \ #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 * \ #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 15 zpolynom = @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 \ * #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 16 zpolynom = @coeff16 * #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * \ #z^@exp14 + @coeff13 * #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 \ * #z^@exp11 + @coeff10 * #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * \ #z^@exp8 + @coeff7 * #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * \ #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * \ #z^@exp2 + @coeff1 elseif @variant == 17 zpolynom = @coeff17 * #z^@exp17 + @coeff16 * #z^@exp16 + @coeff15 * \ #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * #z^@exp13 + @coeff12 * \ #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * #z^@exp10 + @coeff9 * \ #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * #z^@exp7 + @coeff6 * \ #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * #z^@exp4 + @coeff3 * \ #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 18 zpolynom = @coeff18 * #z^@exp18 + @coeff17 * #z^@exp17 + @coeff16 * \ #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 19 zpolynom = @coeff19 * #z^@exp19 + \ @coeff18 * #z^@exp18 + @coeff17 * #z^@exp17 + @coeff16 * \ #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 20 zpolynom = @coeff20 * #z^@exp20 + @coeff19 * #z^@exp19 + \ @coeff18 * #z^@exp18 + @coeff17 * #z^@exp17 + @coeff16 * \ #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 21 zpolynom = @coeff21 * #z^@exp21 + @coeff20 * #z^@exp20 + @coeff19 * #z^@exp19 + \ @coeff18 * #z^@exp18 + @coeff17 * #z^@exp17 + @coeff16 * \ #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 22 zpolynom = @coeff22 * #z^@exp22 + \ @coeff21 * #z^@exp21 + @coeff20 * #z^@exp20 + @coeff19 * #z^@exp19 + \ @coeff18 * #z^@exp18 + @coeff17 * #z^@exp17 + @coeff16 * \ #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 23 zpolynom = @coeff23 * #z^@exp23 + @coeff22 * #z^@exp22 + \ @coeff21 * #z^@exp21 + @coeff20 * #z^@exp20 + @coeff19 * #z^@exp19 + \ @coeff18 * #z^@exp18 + @coeff17 * #z^@exp17 + @coeff16 * \ #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 elseif @variant == 24 zpolynom = @coeff24 * #z^@exp24 + @coeff23 * #z^@exp23 + @coeff22 * #z^@exp22 + \ @coeff21 * #z^@exp21 + @coeff20 * #z^@exp20 + @coeff19 * #z^@exp19 + \ @coeff18 * #z^@exp18 + @coeff17 * #z^@exp17 + @coeff16 * \ #z^@exp16 + @coeff15 * #z^@exp15 + @coeff14 * #z^@exp14 + @coeff13 * \ #z^@exp13 + @coeff12 * #z^@exp12 + @coeff11 * #z^@exp11 + @coeff10 * \ #z^@exp10 + @coeff9 * #z^@exp9 + @coeff8 * #z^@exp8 + @coeff7 * \ #z^@exp7 + @coeff6 * #z^@exp6 + @coeff5 * #z^@exp5 + @coeff4 * \ #z^@exp4 + @coeff3 * #z^@exp3 + @coeff2 * #z^@exp2 + @coeff1 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials General" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Terms" default = 3 min = 2 max = 24 hint = "This setting selects how many terms the iterated polynomial \ contains. One term is always a constant term. (2-24)" endparam param coeff1 caption = "Polynom Constant Term" default = (0,0) hint = "This parameter is the final term of the iterated polynomial." endparam param coeff2 caption = "2nd Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 2nd term of the iterated \ polynomial." endparam param exp2 caption = "2nd Term Power" default = (3,0) hint = "This parameter is the exponent of the 2nd term of the iterated \ polynomial." endparam param coeff3 caption = "3rd Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 3rd term of the iterated \ polynomial." visible = @variant > 2 endparam param exp3 caption = "3rd Term Power" default = (6,0) hint = "This parameter is the exponent of the 3rd term of the iterated \ polynomial." visible = @variant > 2 endparam param coeff4 caption = "4th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 4th term of the iterated \ polynomial." visible = @variant > 3 endparam param exp4 caption = "4th Term Power" default = (7,0) hint = "This parameter is the exponent of the 4th term of the iterated \ polynomial." visible = @variant > 3 endparam param coeff5 caption = "5th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 5th term of the iterated \ polynomial." visible = @variant > 4 endparam param exp5 caption = "5th Term Power" default = (8,0) hint = "This parameter is the exponent of the 5th term of the iterated \ polynomial." visible = @variant > 4 endparam param coeff6 caption = "6th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 6th term of the iterated \ polynomial." visible = @variant > 5 endparam param exp6 caption = "6th Term Power" default = (9,0) hint = "This parameter is the exponent of the 6th term of the iterated \ polynomial." visible = @variant > 5 endparam param coeff7 caption = "7th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 7th term of the iterated \ polynomial." visible = @variant > 6 endparam param exp7 caption = "7th Term Power" default = (10,0) hint = "This parameter is the exponent of the 7th term of the iterated \ polynomial." visible = @variant > 6 endparam param coeff8 caption = "8th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 8th term of the iterated \ polynomial." visible = @variant > 7 endparam param exp8 caption = "8th Term Power" default = (11,0) hint = "This parameter is the exponent of the 8th term of the iterated \ polynomial." visible = @variant > 7 endparam param coeff9 caption = "9th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 9th term of the iterated \ polynomial." visible = @variant > 8 endparam param exp9 caption = "9th Term Power" default = (12,0) hint = "This parameter is the exponent of the 9th term of the iterated \ polynomial." visible = @variant > 8 endparam param coeff10 caption = "10th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 10th term of the iterated \ polynomial." visible = @variant > 9 endparam param exp10 caption = "10th Term Power" default = (13,0) hint = "This parameter is the exponent of the 10th term of the iterated \ polynomial." visible = @variant > 9 endparam param coeff11 caption = "11th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 11th term of the iterated \ polynomial." visible = @variant > 10 endparam param exp11 caption = "11th Term Power" default = (14,0) hint = "This parameter is the exponent of the 11th term of the iterated \ polynomial." visible = @variant > 10 endparam param coeff12 caption = "12th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 12th term of the iterated \ polynomial." visible = @variant > 11 endparam param exp12 caption = "12th Term Power" default = (15,0) hint = "This parameter is the exponent of the 12th term of the iterated \ polynomial." visible = @variant > 11 endparam param coeff13 caption = "13th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 13th term of the iterated \ polynomial." visible = @variant > 12 endparam param exp13 caption = "13th Term Power" default = (16,0) hint = "This parameter is the exponent of the 13th term of the iterated \ polynomial." visible = @variant > 12 endparam param coeff14 caption = "14th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 14th term of the iterated \ polynomial." visible = @variant > 13 endparam param exp14 caption = "14th Term Power" default = (17,0) hint = "This parameter is the exponent of the 14th term of the iterated \ polynomial." visible = @variant > 13 endparam param coeff15 caption = "15th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 15th term of the iterated \ polynomial." visible = @variant > 14 endparam param exp15 caption = "15th Term Power" default = (18,0) hint = "This parameter is the exponent of the 15th term of the iterated \ polynomial." visible = @variant > 14 endparam param coeff16 caption = "16th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 16th term of the iterated \ polynomial." visible = @variant > 15 endparam param exp16 caption = "16th Term Power" default = (19,0) hint = "This parameter is the exponent of the 16th term of the iterated \ polynomial." visible = @variant > 15 endparam param coeff17 caption = "17th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 17th term of the iterated \ polynomial." visible = @variant > 16 endparam param exp17 caption = "17th Term Power" default = (20,0) hint = "This parameter is the exponent of the 17th term of the iterated \ polynomial." visible = @variant > 16 endparam param coeff18 caption = "18th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 18th term of the iterated \ polynomial." visible = @variant > 17 endparam param exp18 caption = "18th Term Power" default = (21,0) hint = "This parameter is the exponent of the 18th term of the iterated \ polynomial." visible = @variant > 17 endparam param coeff19 caption = "19th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 19th term of the iterated \ polynomial." visible = @variant > 18 endparam param exp19 caption = "19th Term Power" default = (20,0) hint = "This parameter is the exponent of the 19th term of the iterated \ polynomial." visible = @variant > 18 endparam param coeff20 caption = "20th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 20th term of the iterated \ polynomial." visible = @variant > 19 endparam param exp20 caption = "20th Term Power" default = (20,0) hint = "This parameter is the exponent of the 20th term of the iterated \ polynomial." visible = @variant > 19 endparam param coeff21 caption = "21th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 21th term of the iterated \ polynomial." visible = @variant > 20 endparam param exp21 caption = "21th Term Power" default = (20,0) hint = "This parameter is the exponent of the 21th term of the iterated \ polynomial." visible = @variant > 20 endparam param coeff22 caption = "22th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 22th term of the iterated \ polynomial." visible = @variant > 21 endparam param exp22 caption = "22th Term Power" default = (20,0) hint = "This parameter is the exponent of the 22th term of the iterated \ polynomial." visible = @variant > 21 endparam param coeff23 caption = "23th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 23th term of the iterated \ polynomial." visible = @variant > 22 endparam param exp23 caption = "23th Term Power" default = (20,0) hint = "This parameter is the exponent of the 23th term of the iterated \ polynomial." visible = @variant > 22 endparam param coeff24 caption = "24th Term Coefficient" default = (1,0) hint = "This constant is multiplies by the 24th term of the iterated \ polynomial." visible = @variant > 23 endparam param exp24 caption = "24th Term Power" default = (20,0) hint = "This parameter is the exponent of the 24th term of the iterated \ polynomial." visible = @variant > 23 endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-polyiteratedfunctions { ; Miscellaneous functions and series ; jam 7/27/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 ; declare and precompute factorials and reciprocal factorials ; used in someseries-defined functions float fac2 = float fac3 = float fac14 = float fac5 = 0.0 float fac6 = float fac7 = float fac8 = float fac9 = float fac10 = 0.0 float fac11 = float fac12 = float fac13 = float fac14 = float fac15 = 0.0 float fac16 = float fac17 = float fac18 = float fac19 = float fac20 = 0.0 float fac21 = float fac22 = float fac23 = float fac24 = float fac25 = 0.0 float fac26 = float fac27 = float fac28 = float fac29 = float fac30 = 0.0 if (@variant == "cos3") || (@variant == "sin3A") || (@variant == "sin3B") fac2 = 2, fac3 = 6, fac4 = 24, fac5 = 120, fac6 = 720 fac7 = 5040, fac8 = 40320, fac9 = 362880, fac10 = fac9*10 fac11 = fac10*11, fac12 = fac11*12, fac13 = fac12*13 fac14 = fac13*14, fac15 = fac14*15, fac16 = fac15*16 fac17 = fac16*17, fac18 = fac17*18, fac18 = fac17*18 fac19 = fac18*19, fac20 = fac19*20, fac21 = fac20*21 fac22 = fac21*22, fac23 = fac22*23, fac24 = fac23*24 fac25 = fac24*25, fac26 = fac25*26, fac27 = fac26*27 fac28 = fac27*28, fac29 = fac28*29, fac30 = fac29*30 fac2 = 1/fac2, fac3 = 1/fac3, fac4 = 1/fac4 fac5 = 1/fac5, fac6 = 1/fac6, fac7 = 1/fac7 fac8 = 1/fac8, fac9 = 1/fac9, fac10 = 1/fac10 fac11 = 1/fac11, fac12 = 1/fac12, fac13 = 1/fac13 fac14 = 1/fac14, fac15 = 1/fac15, fac16 = 1/fac16 fac17 = 1/fac17, fac18 = 1/fac18, fac19 = 1/fac19 fac20 = 1/fac20, fac21 = 1/fac21, fac22 = 1/fac22 fac23 = 1/fac23, fac24 = 1/fac24, fac25 = 1/fac25 fac26 = 1/fac26, fac27 = 1/fac27, fac28 = 1/fac28 fac29 = 1/fac29, fac30 = 1/fac30 endif ; @variant init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "sin" ; sine function zpolynom = sin(#z) elseif @variant == "cos" ; cosine zpolynom = cos(#z) elseif @variant == "tan" ; tangent zpolynom = tan(#z) elseif @variant == "cot" ; cotangent zpolynom = cotan(#z) elseif @variant == "sec" ; secant zpolynom = 1/cos(#z) elseif @variant == "csc" ; cosecant zpolynom = 1/sin(#z) elseif @variant == "ver" ; versine zpolynom = 1 - cos(#z) elseif @variant == "vcs" ; vercosine zpolynom = 1 + cos(#z) elseif @variant == "cvs" ; coversine zpolynom = 1 - sin(#z) elseif @variant == "cvc" ; covercosine zpolynom = 1 + sin(#z) elseif @variant == "exs" ; exsecant zpolynom = 1/cos(#z) - 1 elseif @variant == "exc" ; excosecant zpolynom = 1/sin(#z) - 1 elseif @variant == "crd" ; chord function zpolynom = 2 * sin(#z/2) elseif @variant == "asin" ; arcsine zpolynom = asin(#z - trunc(#z)) elseif @variant == "acos" ; arccosine zpolynom = acos(#z - trunc(#z)) elseif @variant == "atan" ; arctangent zpolynom = atan(#z) elseif @variant == "acot" ; arccotangent zpolynom = halfpi - atan(#z) elseif @variant == "asec" ; arcsecant zpolynom = acos(1/#z - trunc(1/#z)) elseif @variant == "acsc" ; arccosecant zpolynom = asin(1/#z - trunc(1/#z)) elseif @variant == "aver" ; arcversine zpolynom = acos(1 - #z - trunc(1-#z)) elseif @variant == "avcs" ; arcvercosine zpolynom = acos(1 + #z - trunc(1+#z)) elseif @variant == "acvs" ; arccoversine zpolynom = asin(1 - #z - trunc(1-#z)) elseif @variant == "acvc" ; arccovercosine zpolynom = asin(1 + #z - trunc(1+#z)) elseif @variant == "aexs" ; arcexsecant zpolynom = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @variant == "aexc" ; arcexcosecant zpolynom = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @variant == "acrd" ; arcchord zpolynom = 2 * asin( #z/2 - trunc(#z/2) ) elseif @variant == "asin 2" ; arcsine zpolynom = asin(#z) elseif @variant == "acos 2" ; arccosine zpolynom = acos(#z) elseif @variant == "atan 2" ; arctangent zpolynom = atan2(#z) elseif @variant == "acot 2" ; arccotangent zpolynom = halfpi - atan2(#z) elseif @variant == "asec 2" ; arcsecant zpolynom = acos(1/#z) elseif @variant == "acsc 2" ; arccosecant zpolynom = asin(1/#z) elseif @variant == "aver 2" ; arcversine zpolynom = acos(1 - #z) elseif @variant == "avcs 2" ; arcvercosine zpolynom = acos(1 + #z) elseif @variant == "acvs 2" ; arccoversine zpolynom = asin(1 - #z) elseif @variant == "acvc 2" ; arccovercosine zpolynom = asin(1 + #z) elseif @variant == "aexs 2" ; arcexsecant zpolynom = acos( (1/(#z+1))) elseif @variant == "aexc 2" ; arcexcosecant zpolynom = asin( (1/(#z+1))) elseif @variant == "acrd 2" ; arcchord zpolynom = 2 * asin( #z/2 ) elseif @variant == "exp" ; exponential function zpolynom = exp(#z) elseif @variant == "exp(-z)" ; zpolynom = exp(-#z) elseif @variant == "exp(z^2)" ; zpolynom = exp(sqr(#z)) elseif @variant == "exp(-z^2)" ; zpolynom = exp(-sqr(#z)) elseif @variant == "exp(1/z)" ; zpolynom = exp(1/#z) elseif @variant == "exp(-1/z)" ; zpolynom = exp(-1/#z) elseif @variant == "exp(1/z^2)" ; zpolynom = exp(1/sqr(#z)) elseif @variant == "exp(-1/z^2)" ; zpolynom = exp(-1/sqr(#z)) elseif @variant == "cosh" ; hyperbolic cosine zpolynom = cosh(#z) elseif @variant == "sinh" ; hyperbolic sine zpolynom = sinh(#z) elseif @variant == "tanh" ; hyperbolic tangent zpolynom = tanh(#z) elseif @variant == "cotanh" ; hyperbolic cotangent zpolynom = cotanh(#z) elseif @variant == "acosh" ; archyperbolic cosine zpolynom = acosh(#z) elseif @variant == "asinh" ; archyperbolic sine zpolynom = asinh(#z) elseif @variant == "atanh" ; archyperbolic tangent zpolynom = atanh(#z) elseif @variant == "log" ; logarithm zpolynom = log(#z) elseif @variant == "log(-z)" ; zpolynom = log(-#z) elseif @variant == "log(z^2)" ; zpolynom = log(sqr(#z)) elseif @variant == "log(-z^2)" ; zpolynom = log(-sqr(#z)) elseif @variant == "log(1/z)" ; zpolynom = log(1/#z) elseif @variant == "log(-1/z)" ; zpolynom = log(-1/#z) elseif @variant == "log(1/z^2)" ; zpolynom = log(1/sqr(#z)) elseif @variant == "log(-1/z^2)" ; zpolynom = log(-1/sqr(#z)) elseif @variant == "log log" ; zpolynom = log( log(#z) ) elseif @variant == "exp(exp)" ; zpolynom = exp( exp(#z) ) elseif @variant == "z^z" ; zpolynom = #z^#z elseif @variant == "z^z^z" ; zpolynom = #z^(#z^#z) elseif @variant == "constant^z" ; zpolynom = @zbase^#z elseif @variant == "constant^z^z" ; zpolynom = @zbase^(#z^#z) elseif @variant == "1/z" ; zpolynom = 1/#z elseif @variant == "cos3" ; zpolynom = 1 - fac3*#z^3 + fac6*#z^6 - fac9*#z^9 + fac12*#z^12 - \ fac15*#z^15 + fac18*#z^18 - fac21*#z^21 + fac24*#z^24 - \ fac27*#z^27 + fac30*#z^30 elseif @variant == "sin3A" ; zpolynom = #z - fac4*#z^4 + fac7*#z^7 - fac10*#z^10 + fac13*#z^13 - \ fac16*#z^16 + fac19*#z^19 - fac22*#z^22 + fac25*#z^25 - \ fac28*#z^28 elseif @variant == "sin3B" ; zpolynom = fac2*sqr(#z) - fac5*#z^5 + fac8*#z^8 - fac11*#z^11 + fac14*#z^14 - \ fac17*#z^17 + fac20*#z^20 - fac23*#z^23 + fac26*#z^26 - \ fac29*#z^29 endif ; @variant if @appendbinom if @appendcombo == "add" zpolynom = zpolynom + (@appendcoeff1 * #z^@appendpower1 + \ @appendcoeff2 * #z^@appendpower2) elseif @appendcombo == "multiply" zpolynom = zpolynom * (@appendcoeff1 * #z^@appendpower1 + \ @appendcoeff2 * #z^@appendpower2) elseif @appendcombo == "divide 1" zpolynom = zpolynom / (@appendcoeff1 * #z^@appendpower1 + \ @appendcoeff2 * #z^@appendpower2) elseif @appendcombo == "divide 2" zpolynom = (@appendcoeff1 * #z^@appendpower1 + \ @appendcoeff2 * #z^@appendpower2) / zpolynom elseif @appendcombo == "power 1" zpolynom = zpolynom^(@appendcoeff1 * #z^@appendpower1 + \ @appendcoeff2 * #z^@appendpower2) elseif @appendcombo == "power 2" zpolynom = (@appendcoeff1 * #z^@appendpower1 + \ @appendcoeff2 * #z^@appendpower2)^zpolynom endif ; @appendcombo endif ; @appendbinom if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "PolyIterated Functions" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Function Variant" enum = "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "asin 2" "acos 2" "atan 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" \ "aexs 2" "aexc 2" "acrd 2" "exp" "exp(-z)" "exp(z^2)" "exp(-z^2)" \ "exp(1/z)" "exp(-1/z)" "exp(1/z^2)" "exp(-1/z^2)" "cosh" "sinh" \ "tanh" "cotanh" "acosh" "asinh" "atanh" "log" "log(-z)" "log(z^2)" \ "log(-z^2)" "log(1/z)" "log(-1/z)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" "1/z" "cos3" \ "sin3A" "sin3B" default = 0 hint = "This setting selects which function equation to iterate." endparam param zbase caption = "Base Constant" default = (2,0) hint = "If 'Function Variant' is set to 'constant^z' or 'constant^z^z', \ then this parameter is the constant." visible = (@variant == "constant^z") || (@variant == "constant^z^z") endparam param appendbinom caption = "Append Z^Power?" default = FALSE hint = "If enabled, then the 'Function Variant' can be combined with \ a simple z^power binomial function. Set parameters '1st-Term Coefficient', \ '1st-Term Power', '2nd-Term Coefficient', and '2nd-Term Power' to define \ the z polynomial." endparam param appendcoeff1 caption = "1st-Term Coefficient" default = (1,0) hint = "This parameter is multiplied by the z^power factor defined in \ param '1st-Term Power'." visible = @appendbinom endparam param appendpower1 caption = "1st-Term Power" default = (5,0) hint = "This value is the exponent for the 1st #z term of the polynomial." visible = @appendbinom endparam param appendcoeff2 caption = "2nd-Term Coefficient" default = (1,0) hint = "This parameter is multiplied by the z^power factor defined in \ param '2nd-Term Power'." visible = @appendbinom endparam param appendpower2 caption = "2nd-Term Power" default = (0,0) hint = "This value is the exponent for the 2nd #z term of the polynomial." visible = @appendbinom endparam param appendcombo caption = "Combination Mode" enum = "add" "multiply" "divide 1" "divide 2" "power 1" "power 2" default = 0 hint = "This setting determines how the binomial result is conbined \ with the function result." visible = @appendbinom endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Function Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Function Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Function Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-TribonnaciPolynomials { ; Tribonacci polynomials ; Mathematica: P[z, 0] = 0; P[z, 1] = 1; P[z, 2] = z^2; ; P[z_, n_] := z^2 * P[z, n - 1] + z*P[z, n - 2] + P[z, n - 3]; ; Table[ExpandAll[P[z, n]], {n, 1, 19}]; ; jam 7/31/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = #z + #z^4 elseif @variant == "3" zpolynom = 1 + 2 * #z^3 + #z^6 elseif @variant == "4" zpolynom = 3 * #z^2 + 3 * #z^5 + #z^8 elseif @variant == "5" zpolynom = 2 * #z + 6 * #z^4 + 4 * #z^7 + #z^10 elseif @variant == "6" zpolynom = 1 + 7 * #z^3 + 10 * #z^6 + 5 * #z^9 + #z^12 elseif @variant == "7" zpolynom = 6 * #z^2 + 16 * #z^5 + 15 * #z^8 + 6 * #z^11 + #z^14 elseif @variant == "8" zpolynom = 3 * #z + 19 * #z^4 + 30 * #z^7 + 21 * #z^10 + 7 * #z^13 + #z^16 elseif @variant == "9" zpolynom = 1 + 16 * #z^3 + 45 * #z^6 + 50 * #z^9 + 28 * #z^12 + 8 * #z^15 \ + #z^18 elseif @variant == "10" zpolynom = 10 * #z^2 + 51 * #z^5 + 90 * #z^8 + 77 * #z^11 + 36 * #z^14 + \ 9 * #z^17 + #z^20 elseif @variant == "11" zpolynom = 4 * #z + 45 * #z^4 + 126 * #z^7 + 161 * #z^10 + 112 * #z^13 + \ 45 * #z^16 + 10 * #z^19 + #z^22 elseif @variant == "12" zpolynom = 1 + 30 * #z^3 + 141 * #z^6 + 266 * #z^9 + 266 * #z^12 + 156 * \ #z^15 + 55 * #z^18 + 11 * #z^21 + #z^24 elseif @variant == "13" zpolynom = 15 * #z^2 + 126 * #z^5 + 357 * #z^8 + 504 * #z^11 + 414 * \ #z^14 + 210 * #z^17 + 66 * #z^20 + 12 * #z^23 + #z^26 elseif @variant == "14" zpolynom = 5 * #z + 90 * #z^4 + 393 * #z^7 + 784 * #z^10 + 882 * #z^13 + \ 615 * #z^16 + 275 * #z^19 + 78 * #z^22 + 13 * #z^25 + #z^28 elseif @variant == "15" zpolynom = 1 + 50 * #z^3 + 357 * #z^6 + 1016 * #z^9 + 1554 * #z^12 + 1452 * \ #z^15 + 880 * #z^18 + 352 * #z^21 + 91 * #z^24 + 14 * #z^27 + #z^30 elseif @variant == "16" zpolynom = 21 * #z^2 + 266 * #z^5 + 1107 * #z^8 + 2304 * #z^11 + 2850 * #z^14 \ + 2277 * #z^17 + 1221 * #z^20 + 442 * #z^23 + 105 * #z^26 + 15 * #z^29 + #z^32 elseif @variant == "17" zpolynom = 6 * #z + 161 * #z^4 + 1016 * #z^7 + 2907 * #z^10 + 4740 * #z^13 + \ 4917 * #z^16 + 3432 * #z^19 + 1651 * #z^22 + 546 * #z^25 + 120 * #z^28 + \ 16 * #z^31 + #z^34 elseif @variant == "18" zpolynom = 1 + 77 * #z^3 + 784 * #z^6 + 3139 * #z^9 + 6765 * #z^12 + 9042 * \ #z^15 + 8074 * #z^18 + 5005 * #z^21 + 2184 * #z^24 + 665 * #z^27 + 136 * \ #z^30 + 17 * #z^33 + #z^36 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Tribonacci" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-PentanacciPolynomials { ; Pentanacci polynomials ; Mathematica: P[z, 0] = 0; P[z, 1] = 0; P[z, 2] = 0; P[z, 3] = 0; P[z, 4] = 1; ; P[z, 5] = z^4; ; P[z_, n_] := z^4* P[z, n - 1] + z^3*P[z, n - 2] + z^2*P[z, n - 3] + ; z*P[z, n - 4] + P[z, n - 5]; ; Table[ExpandAll[P[z, n], z], {n, 1, 25}] ; jam 8/1/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = z^3 + z^8 elseif @variant == "3" zpolynom = z^2 + 2 * z^7 + z^12 elseif @variant == "4" zpolynom = z + 3 * z^6 + 3 * z^11 + z^16 elseif @variant == "5" zpolynom = 1 + 4 * z^5 + 6 * z^10 + 4 * z^15 + z^20 elseif @variant == "6" zpolynom = 5 * z^4 + 10 * z^9 + 10 * z^14 + 5 * z^19 + z^24 elseif @variant == "7" zpolynom = 4 * z^3 + 15 * z^8 + 20 * z^13 + 15 * z^18 + 6 * z^23 + z^28 elseif @variant == "8" zpolynom = 3 * z^2 + 18 * z^7 + 35 * z^12 + 35 * z^17 + 21 * z^22 + 7 * \ z^27 + z^32 elseif @variant == "9" zpolynom = 2 * z + 19 * z^6 + 52 * z^11 + 70 * z^16 + 56 * z^21 + 28 * \ z^26 + 8 * z^31 + z^36 elseif @variant == "10" zpolynom = 1 + 18 * z^5 + 68 * z^10 + 121 * z^15 + 126 * z^20 + 84 * z^25 + \ 36 * z^30 +9 * z^35 + z^40 elseif @variant == "11" zpolynom = 15 * z^4 + 80 * z^9 + 185 * z^14 + 246 * z^19 + 210 * z^24 + \ 120 * z^29 + 45 * z^34 + 10 * z^39 + z^44 elseif @variant == "12" zpolynom = 10 * z^3 + 85 * z^8 + 255 * z^13 + 426 * z^18 + 455 * z^23 + \ 330 * z^28 + 165 * z^33 + 55 * z^38 + 11 * z^43 + z^48 elseif @variant == "13" zpolynom = 6 * z^2 + 80 * z^7 + 320 * z^12 + 666 * z^17 + 875 * z^22 + \ 784 * z^27 + 495 * z^32 + 220 * z^37 + 66 * z^42 + 12 * z^47 + z^52 elseif @variant == "14" zpolynom = 3 * z + 68 * z^6 + 365 * z^11 + 951 * z^16 + 1520 * z^21 + \ 1652 * z^26 + 1278 * z^31 + 715 * z^36 + 286 * z^41 + 78 * z^46 + \ 13 * z^51 + z^56 elseif @variant == "15" zpolynom = 1 + 52 * z^5 + 381 * z^10 + 1246 * z^15 + 2415 * z^20 + 3144 * \ z^25 + 2922 * z^30 + 1992 * z^35 + 1001 * z^40 + 364 * z^45 + 91 * \ z^50 + 14 * z^55 + z^60 elseif @variant == "16" zpolynom = 35 * z^4 + 365 * z^9 + 1506 * z^14 + 3535 * z^19 + 5475 * z^24 + \ 6030 * z^29 + 4905 * z^34 + 2992 * z^39 + 1365 * z^44 + 455 * z^49 + \ 105 * z^54 + 15 * z^59 + z^64 elseif @variant == "17" zpolynom = 20 * z^3 + 320 * z^8 + 1686 * z^13 + 4795 * z^18 + 8800 * z^23 + \ 11385 * z^28 + 10890 * z^33 + 7887 * z^38 + 4356 * z^43 + 1820 * z^48 + \ 560 * z^53 + 120 * z^58 + 16 * z^63 + z^68 elseif @variant == "18" zpolynom = 10 * z^2 + 255 * z^7 + 1751 * z^12 + 6055 * z^17 + 13140 * z^22 + \ 19855 * z^27 + 22110 * z^32 + 18722 * z^37 + 12232 * z^42 + 6175 * z^47 + \ 2380 * z^52 + 680 * z^57 + 136 * z^62 + 17 * z^67 + z^72 elseif @variant == "19" zpolynom = 4 * z + 185 * z^6 + 1686 * z^11 + 7140 * z^16 + 18320 * z^21 + \ 32211 * z^26 + 41470 * z^31 + 40612 * z^36 + 30888 * z^41 + 18395 * \ z^46 + 8554 * z^51 + 3060 * z^56 + 816 * z^61 + 153 * z^66 + 18 * z^71 + \ z^76 elseif @variant == "20" zpolynom = 1 + 121 * z^5 + 1506 * z^10 + 7875 * z^15 + 23940 * z^20 + 48879 * \ z^25 + 72403 * z^30 + 81367 * z^35 + 71214 * z^40 + 49205 * z^45 + 26936 * \ z^50 + 11613 * z^55 + 3876 * z^60 + 969 * z^65 + 171 * z^70 + 19 * \ z^75 + z^80 elseif @variant == "21" zpolynom = 70 * z^4 + 1246 * z^9 + 8135 * z^14 + 29400 * z^19 + 69675 * z^24 + \ 118360 * z^29 + 151778 * z^34 + 151580 * z^39 + 120055 * z^44 + 76050 * \ z^49 + 38535 * z^54 + 15488 * z^59 + 4845 * z^64 + 1140 * z^69 + 190 * \ z^74 + 20 * z^79 + z^84 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Pentanacci" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" "21" default = 5 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-ShapiroPPolynomials { ; Shapiro P polynomials ; Mathematica: P[z, 0] = 1; Q[z, 0] = 1; ; P[z_, n_] := P[z, n - 1] + z^2^(n - 1) * Q[z, n - 1]; ; Q[z_, n_] := P[z, n - 1] - z^2^(n - 1) * Q[z, n - 1]; ; Simplify[Table[P[z, n], {n, 0, 6}]] ; jam 8/3/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "1" zpolynom = 1 + #z elseif @variant == "2" zpolynom = 1 + #z + #z^2 - #z^3 elseif @variant == "3" zpolynom = 1 + #z + #z^2 - #z^3 + #z^4 + #z^5 - #z^6 + #z^7 elseif @variant == "4" zpolynom = 1 + #z + #z^2 - #z^3 + #z^4 + #z^5 - #z^6 + #z^7 + #z^8 + \ #z^9 + #z^10 - #z^11 - #z^12 - #z^13 + #z^14 - #z^15 elseif @variant == "5" zpolynom = 1 + #z + #z^2 - #z^3 + #z^4 + #z^5 - #z^6 + #z^7 + #z^8 + #z^9 + \ #z^10 - #z^11 - #z^12 - #z^13 + #z^14 - #z^15 + #z^16 + #z^17 + #z^18 - \ #z^19 + #z^20 + #z^21 - #z^22 + #z^23 - #z^24 - #z^25 - #z^26 + #z^27 + \ #z^28 + #z^29 - #z^30 + #z^31 elseif @variant == "6" zpolynom = 1 + #z + #z^2 - #z^3 + #z^4 + #z^5 - #z^6 + #z^7 + #z^8 + #z^9 + \ #z^10 - #z^11 - #z^12 - #z^13 + #z^14 - #z^15 + #z^16 + #z^17 + #z^18 - \ #z^19 + #z^20 + #z^21 - #z^22 + #z^23 - #z^24 - #z^25 - #z^26 + #z^27 + \ #z^28 + #z^29 - #z^30 + #z^31 + #z^32 + #z^33 + #z^34 - #z^35 + #z^36 + \ #z^37 - #z^38 + #z^39 + #z^40 + #z^41 + #z^42 - #z^43 - #z^44 - #z^45 + \ #z^46 - #z^47 - #z^48 - #z^49 - #z^50 + #z^51 - #z^52 - #z^53 + #z^54 - \ #z^55 + #z^56 + #z^57 + #z^58 - #z^59 - #z^60 - #z^61 + #z^62 - #z^63 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials ShapiroP" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 2500 param variant caption = "Polynomial Variant" enum = "1" "2" "3" "4" "5" "6" default = 2 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-ShapiroQPolynomials { ; Shapiro Q polynomials (complementary Shapiro polynomials) ; Mathematica: P[z, 0] = 1; Q[z, 0] = 1; ; P[z_, n_] := P[z, n - 1] + z^2^(n - 1) * Q[z, n - 1]; ; Q[z_, n_] := P[z, n - 1] - z^2^(n - 1) * Q[z, n - 1]; ; Simplify[Table[Q[z, n], {n, 0, 6}]] ; jam 8/3/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "1" zpolynom = 1 - #z elseif @variant == "2" zpolynom = 1 + #z - #z^2 + #z^3 elseif @variant == "3" zpolynom = 1 + #z + #z^2 - #z^3 - #z^4 - #z^5 + #z^6 - #z^7 elseif @variant == "4" zpolynom = 1 + #z + #z^2 - #z^3 + #z^4 + #z^5 - #z^6 + #z^7 - \ #z^8 - #z^9 - #z^10 + #z^11 + #z^12 + #z^13 - #z^14 + #z^15 elseif @variant == "5" zpolynom = 1 + #z + #z^2 - #z^3 + #z^4 + #z^5 - #z^6 + #z^7 + \ #z^8 + #z^9 + #z^10 - #z^11 - #z^12 - #z^13 + #z^14 - #z^15 - \ #z^16 - #z^17 - #z^18 + #z^19 - #z^20 - #z^21 + #z^22 - \ #z^23 + #z^24 + #z^25 + #z^26 - #z^27 - #z^28 - #z^29 + #z^30 - #z^31 elseif @variant == "6" zpolynom = 1 + #z + #z^2 - #z^3 + #z^4 + #z^5 - #z^6 + #z^7 + \ #z^8 + #z^9 + #z^10 - #z^11 - #z^12 - #z^13 + #z^14 - #z^15 + \ #z^16 + #z^17 + #z^18 - #z^19 + #z^20 + #z^21 - #z^22 + \ #z^23 - #z^24 - #z^25 - #z^26 + #z^27 + #z^28 + #z^29 - \ #z^30 + #z^31 - #z^32 - #z^33 - #z^34 + #z^35 - #z^36 - \ #z^37 + #z^38 - #z^39 - #z^40 - #z^41 - #z^42 + #z^43 + \ #z^44 + #z^45 - #z^46 + #z^47 + #z^48 + #z^49 + #z^50 - \ #z^51 + #z^52 + #z^53 - #z^54 + #z^55 - #z^56 - #z^57 - \ #z^58 + #z^59 + #z^60 + #z^61 - #z^62 + #z^63 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials ShapiroQ" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 2500 param variant caption = "Polynomial Variant" enum = "1" "2" "3" "4" "5" "6" default = 2 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-HermitePolynomials { ; Hermite polynomials ; Mathematica: Table[HermiteH[n, z], {n, 2, 20}] ; jam 8/3/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = -2 + 4 * #z^2 elseif @variant == "3" zpolynom = -12 * #z + 8 * #z^3 elseif @variant == "4" zpolynom = 12 - 48 * #z^2 + 16 * #z^4 elseif @variant == "5" zpolynom = 120 * #z - 160 * #z^3 + 32 * #z^5 elseif @variant == "6" zpolynom = -120 + 720 * #z^2 - 480 * #z^4 + 64 * #z^6 elseif @variant == "7" zpolynom = -1680 * #z + 3360 * #z^3 - 1344 * #z^5 + 128 * #z^7 elseif @variant == "8" zpolynom = 1680 - 13440 * #z^2 + 13440 * #z^4 - 3584 * #z^6 + 256 * #z^8 elseif @variant == "9" zpolynom = 30240 * #z - 80640 * #z^3 + 48384 * #z^5 - 9216 * #z^7 + \ 512 * #z^9 elseif @variant == "10" zpolynom = -30240 + 302400 * #z^2 - 403200 * #z^4 + 161280 * #z^6 - \ 23040 * #z^8 + 1024 * #z^10 elseif @variant == "11" zpolynom = -665280 * #z + 2217600 * #z^3 - 1774080 * #z^5 + 506880 * \ #z^7 - 56320 * #z^9 + 2048 * #z^11 elseif @variant == "12" zpolynom = 665280 - 7983360 * #z^2 + 13305600 * #z^4 - 7096320 * #z^6 + \ 1520640 * #z^8 - 135168 * #z^10 + 4096 * #z^12 elseif @variant == "13" zpolynom = 17297280 * #z - 69189120 * #z^3 + 69189120 * #z^5 - 26357760 * \ #z^7 + 4392960 * #z^9 - 319488 * #z^11 + 8192 * #z^13 elseif @variant == "14" zpolynom = -17297280 + 242161920 * #z^2 - 484323840 * #z^4 + 322882560 * \ #z^6 - 92252160 * #z^8 + 12300288 * #z^10 - 745472 * #z^12 + 16384 * \ #z^14 elseif @variant == "15" zpolynom = -518918400 * #z + 2.421619200e9 * #z^3 - 2.905943040e9 * #z^5 + \ 1.383782400e9 * #z^7 - 307507200 * #z^9 + 33546240 * #z^11 - 1720320 * \ #z^13 + 32768 * #z^15 elseif @variant == "16" zpolynom = 518918400 - 8.302694400e9 * #z^2 + 19.372953600e9 * #z^4 - \ 15.498362880e9 * #z^6 + 5.535129600e9 * #z^8 - 984023040 * #z^10 + \ 89456640 * #z^12 - 3932160 * #z^14 + 65536 * #z^16 elseif @variant == "17" zpolynom = 17.643225600e9 * #z - 94.097203200e9 * #z^3 + 131.736084480e9 * \ #z^5 - 75.277762560e9 * #z^7 + 20.910489600e9 * #z^9 - 3.041525760e9 * \ #z^11 + 233963520 * #z^13 - 8912896 * #z^15 + 131072 * #z^17 elseif @variant == "18" zpolynom = -17.643225600e9 + 317.578060800e9 * #z^2 - 846.874828800e9 * #z^4 + \ 790.416506880e9 * #z^6 - 338.749931520e9 * #z^8 + 75.277762560e9 * #z^10 - \ 9.124577280e9 * #z^12 + 601620480 * #z^14 - 20054016 * #z^16 + 262144 * #z^18 elseif @variant == "19" zpolynom = -670.442572800e9 * #z + 4.022655436800e12 * #z^3 - 6.436248698880e12 \ * #z^5 + 4.290832465920e12 * #z^7 - 1.430277488640e12 * #z^9 + \ 260.050452480e9 * #z^11 - 26.671841280e9 * #z^13 + 1.524105216e9 * \ #z^15 - 44826624 * #z^17 + 524288 * #z^19 elseif @variant == "20" zpolynom = 670.442572800e9 - 13.408851456000e12 * #z^2 + 40.226554368000e12 \ * #z^4 - 42.908324659200e12 * #z^6 + 21.454162329600e12 * #z^8 - \ 5.721109954560e12 * #z^10 + 866.834841600e9 * #z^12 - 76.205260800e9 * \ #z^14 + 3.810263040e9 * #z^16 - 99614720 * #z^18 + 1048576 * #z^20 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Hermite" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" default = 6 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (-8,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-CatalanPolynomials { ; for Catalan polynomials, see OEIS# A115139 ; Mathematica: p[z, 0] = 1; p[z, 1] = 1; ; p[z_, n_] := p[z, n - 1] - z*p[z, n - 2]; ; Table[p[z, n], {n, 0, 20}] // Simplify ; jam 8/5/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = 1 - #z elseif @variant == "3" zpolynom = 1 - 2 * #z elseif @variant == "4" zpolynom = 1 - 3 * #z + #z^2 elseif @variant == "5" zpolynom = 1 - 4 * #z + 3 * #z^2 elseif @variant == "6" zpolynom = 1 - 5 * #z + 6 * #z^2 - #z^3 elseif @variant == "7" zpolynom = 1 - 6 * #z + 10 * #z^2 - 4 * #z^3 elseif @variant == "8" zpolynom = 1 - 7 * #z + 15 * #z^2 - 10 * #z^3 + #z^4 elseif @variant == "9" zpolynom = 1 - 8 * #z + 21 * #z^2 - 20 * #z^3 + 5 * #z^4 elseif @variant == "10" zpolynom = 1 - 9 * #z + 28 * #z^2 - 35 * #z^3 + 15 * #z^4 - #z^5 elseif @variant == "11" zpolynom = 1 - 10 * #z + 36 * #z^2 - 56 * #z^3 + 35 * #z^4 - 6 * #z^5 elseif @variant == "12" zpolynom = 1 - 11 * #z + 45 * #z^2 - 84 * #z^3 + 70 * #z^4 - 21 * \ #z^5 + #z^6 elseif @variant == "13" zpolynom = 1 - 12 * #z + 55 * #z^2 - 120 * #z^3 + 126 * #z^4 - 56 * \ #z^5 + 7 * #z^6 elseif @variant == "14" zpolynom = 1 - 13 * #z + 66 * #z^2 - 165 * #z^3 + 210 * #z^4 - 126 * \ #z^5 + 28 * #z^6 - #z^7 elseif @variant == "15" zpolynom = 1 - 14 * #z + 78 * #z^2 - 220 * #z^3 + 330 * #z^4 - 252 * \ #z^5 + 84 * #z^6 - 8 * #z^7 elseif @variant == "16" zpolynom = 1 - 15 * #z + 91 * #z^2 - 286 * #z^3 + 495 * #z^4 - 462 * \ #z^5 + 210 * #z^6 - 36 * #z^7 + #z^8 elseif @variant == "17" zpolynom = 1 - 16 * #z + 105 * #z^2 - 364 * #z^3 + 715 * #z^4 - 792 * \ #z^5 + 462 * #z^6 - 120 * #z^7 + 9 * #z^8 elseif @variant == "18" zpolynom = 1 - 17 * #z + 120 * #z^2 - 455 * #z^3 + 1001 * #z^4 - 1287 * \ #z^5 + 924 * #z^6 - 330 * #z^7 + 45 * #z^8 - #z^9 elseif @variant == "19" zpolynom = 1 - 18 * #z + 136 * #z^2 - 560 * #z^3 + 1365 * #z^4 - 2002 * \ #z^5 + 1716 * #z^6 - 792 * #z^7 + 165 * #z^8 - 10 * #z^9 elseif @variant == "20" zpolynom = 1 - 19 * #z + 153 * #z^2 - 680 * #z^3 + 1820 * #z^4 - 3003 * \ #z^5 + 3003 * #z^6 - 1716 * #z^7 + 495 * #z^8 - 55 * #z^9 + #z^10 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Catalan" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-GeometricPolynomials { ; Geometric (or Fubini) polynomials ; Mathematica: F[z_, n_] := Sum[ StirlingS2[n, k] * k! * z^k, {k, 0, n}]; ; Table[F[z, n], {n, 0, 20}] // Simplify ; jam 8/5/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = #z + 2 * #z^2 elseif @variant == "3" zpolynom = #z + 6 * #z^2 + 6 * #z^3 elseif @variant == "4" zpolynom = #z + 14 * #z^2 + 36 * #z^3 + 24 * #z^4 elseif @variant == "5" zpolynom = #z + 30 * #z^2 + 150 * #z^3 + 240 * #z^4 + 120 * #z^5 elseif @variant == "6" zpolynom = #z + 62 * #z^2 + 540 * #z^3 + 1560 * #z^4 + 1800 * #z^5 + 720 * \ #z^6 elseif @variant == "7" zpolynom = #z + 126 * #z^2 + 1806 * #z^3 + 8400 * #z^4 + 16800 * #z^5 + \ 15120 * #z^6 + 5040 * #z^7 elseif @variant == "8" zpolynom = #z + 254 * #z^2 + 5796 * #z^3 + 40824 * #z^4 + 126000 * #z^5 + \ 191520 * #z^6 + 141120 * #z^7 + 40320 * #z^8 elseif @variant == "9" zpolynom = #z + 510 * #z^2 + 18150 * #z^3 + 186480 * #z^4 + 834120 * #z^5 + \ 1905120 * #z^6 + 2328480 * #z^7 + 1451520 * #z^8 + 362880 * #z^9 elseif @variant == "10" zpolynom = #z + 1022 * #z^2 + 55980 * #z^3 + 818520 * #z^4 + 5103000 * #z^5 \ + 16435440 * #z^6 + 29635200 * #z^7 + 30240000 * #z^8 + 16329600 * #z^9 + \ 3628800 * #z^10 elseif @variant == "11" zpolynom = #z + 2046 * #z^2 + 171006 * #z^3 + 3498000 * #z^4 + 29607600 * \ #z^5 + 129230640 * #z^6 + 322494480 * #z^7 + 479001600 * #z^8 + 419126400 * \ #z^9 + 199584000 * #z^10 + 39916800 * #z^11 elseif @variant == "12" zpolynom = #z + 4094 * #z^2 + 519156 * #z^3 + 14676024 * #z^4 + 165528000 * \ #z^5 + 953029440 * #z^6 + 3.162075840e9 * #z^7 + 6.411968640e9 * #z^8 + \ 8.083152000e9 * #z^9 + 6.187104000e9 * #z^10 + 2.634508800e9 * #z^11 + \ 479001600 * #z^12 elseif @variant == "13" zpolynom = #z + 8190 * #z^2 + 1569750 * #z^3 + 60780720 * #z^4 + 901020120 * \ #z^5 + 6.711344640e9 * #z^6 + 28.805736960e9 * #z^7 + 76.592355840e9 * \ #z^8 + 130.456085760e9 * #z^9 + 142.702560000e9 * #z^10 + 97.037740800e9 * \ #z^11 + 37.362124800e9 * #z^12 + 6.227020800e9 * #z^13 elseif @variant == "14" zpolynom = #z + 16382 * #z^2 + 4733820 * #z^3 + 249401880 * #z^4 + 4.809004200e9 \ * #z^5 + 45.674188560e9 * #z^6 + 248.619571200e9 * #z^7 + 843.184742400e9 * \ #z^8 + 1.863435974400e12 * #z^9 + 2.731586457600e12 * #z^10 + 2.637143308800e12 \ * #z^11 + 1.612798387200e12 * #z^12 + 566.658892800e9 * #z^13 + 87.178291200e9 \ * #z^14 elseif @variant == "15" zpolynom = #z + 32766 * #z^2 + 14250606 * #z^3 + 1.016542800e9 * #z^4 + \ 25.292030400e9 * #z^5 + 302.899156560e9 * #z^6 + 2.060056318320e12 * \ #z^7 + 8.734434508800e12 * #z^8 + 24.359586451200e12 * #z^9 + 45.950224320000e12 \ * #z^10 + 59.056027430400e12 * #z^11 + 50.999300352000e12 * #z^12 + \ 28.332944640000e12 * #z^13 + 9.153720576000e12 * #z^14 + 1.307674368000e12 * #z^15 elseif @variant == "16" zpolynom = #z + 65534 * #z^2 + 42850116 * #z^3 + 4.123173624e9 * #z^4 + \ 131.542866000e9 * #z^5 + 1.969147121760e12 * #z^6 + 16.540688324160e12 * \ #z^7 + 86.355926616960e12 * #z^8 + 297.846188640000e12 * #z^9 + 703.098107712000e12 \ * #z^10 + 1.155068769254400e15 * #z^11 + 1.320663933388800e15 * #z^12 + \ 1.031319184896000e15 * #z^13 + 524.813313024000e12 * #z^14 + 156.920924160000e12 * \ #z^15 + 20.922789888000e12 * #z^16 elseif @variant == "17" zpolynom = #z + 131070 * #z^2 + 128746950 * #z^3 + 16.664094960e9 * #z^4 + \ 678.330198120e9 * #z^5 + 12.604139926560e12 * #z^6 + 129.568848121440e12 * \ #z^7 + 823.172919528960e12 * #z^8 + 3.457819037312640e15 * #z^9 + 10.009442963520000e15 \ * #z^10 + 20.439835646630400e15 * #z^11 + 29.708792431718400e15 * #z^12 + \ 30.575780537702400e15 * #z^13 + 21.785854970880000e15 * #z^14 + 10.226013557760000e15 * \ #z^15 + 2.845499424768000e15 * #z^16 + 355.687428096000e12 * #z^17 elseif @variant == "18" zpolynom = #z + 262142 * #z^2 + 386634060 * #z^3 + 67.171367640e9 * #z^4 + \ 3.474971465400e12 * #z^5 + 79.694820748080e12 * #z^6 + 995.210916336000e12 * \ #z^7 + 7.621934141203200e15 * #z^8 + 38.528927611574400e15 * #z^9 + 134.672620008326400e15 \ * #z^10 + 334.942064711654400e15 * #z^11 + 601.783536940185600e15 * #z^12 + \ 783.699448602470400e15 * #z^13 + 733.062897120153600e15 * #z^14 + 480.178027929600000e15 * \ #z^15 + 209.144207720448000e15 * #z^16 + 54.420176498688000e15 * #z^17 + \ 6.402373705728000e15 * #z^18 elseif @variant == "19" zpolynom = #z + 524286 * #z^2 + 1.160688606e9 * #z^3 + 270.232006800e9 * \ #z^4 + 17.710714165200e12 * #z^5 + 499.018753280880e12 * #z^6 + \ 7.524340159588560e15 * #z^7 + 68.937160460313600e15 * #z^8 + \ 415.357755774998400e15 * #z^9 + 1.732015476199008000e18 * #z^10 + \ 5.165761531919788800e18 * #z^11 + 11.240707219822080000e18 * #z^12 + \ 18.011278812054528000e18 * #z^13 + 21.234672840116736000e18 * \ #z^14 + 18.198613875746304000e18 * #z^15 + 11.029155770400768000e18 * \ #z^16 + 4.480594531725312000e18 * #z^17 + 1.094805903679488000e18 * \ #z^18 + 121.645100408832000e15 * #z^19 elseif @variant == "20" zpolynom = #z + 1048574 * #z^2 + 3.483638676e9 * #z^3 + 1.085570781624e12 * \ #z^4 + 89.904730860000e12 * #z^5 + 3.100376804676480e15 * #z^6 + \ 56.163512390086080e15 * #z^7 + 611.692004959217280e15 * #z^8 + \ 4.358654246117808000e18 * #z^9 + 21.473732319740064000e18 * #z^10 + \ 75.875547089306764800e18 * #z^11 + 196.877625020902425600e18 * #z^12 + \ 380.275818414395904000e18 * #z^13 + 549.443323130397696000e18 * #z^14 + \ 591.499300737945600000e18 * #z^15 + 467.644314338353152000e18 * #z^16 \ + 263.665755136143360000e18 * #z^17 + 100.357207837286400000e18 * \ #z^18 + 23.112569077678080000e18 * #z^19 + 2.432902008176640000e18 * #z^20 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Geometric" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-HexanacciPolynomials { ; Hexanacci polynomials ; Mathematica: P[z, 0] = 0; P[z, 1] = 0; P[z, 2] = 0; P[z, 3] = 0; P[z, 4] = 0; ; P[z, 5] = 1; P[z, 6] = z^5; ; P[z_, n_] := z^5* P[z, n - 1] + z^4*P[z, n - 2] + z^3*P[z, n - 3] + ; z^2*P[z, n - 4] + z*P[z, n - 5] + P[z, n - 6]; ; Table[ExpandAll[P[z, n], z], {n, 0, 25}] ; jam 8/5/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = #z^5 elseif @variant == "3" zpolynom = #z^4 + #z^10 elseif @variant == "4" zpolynom = #z^3 + 2 * #z^9 + #z^15 elseif @variant == "5" zpolynom = #z^2 + 3 * #z^8 + 3 * #z^14 + #z^20 elseif @variant == "6" zpolynom = #z + 4 * #z^7 + 6 * #z^13 + 4 * #z^19 + #z^25 elseif @variant == "7" zpolynom = 1 + 5 * #z^6 + 10 * #z^12 + 10 * #z^18 + 5 * #z^24 + #z^30 elseif @variant == "8" zpolynom = 6 * #z^5 + 15 * #z^11 + 20 * #z^17 + 15 * #z^23 + 6 * #z^29 + \ #z^35 elseif @variant == "9" zpolynom = 5 * #z^4 + 21 * #z^10 + 35 * #z^16 + 35 * #z^22 + 21 * #z^28 + \ 7 * #z^34 + #z^40 elseif @variant == "10" zpolynom = 4 * #z^3 + 25 * #z^9 + 56 * #z^15 + 70 * #z^21 + 56 * #z^27 + \ 28 * #z^33 + 8 * #z^39 + #z^45 elseif @variant == "11" zpolynom = 3 * #z^2 + 27 * #z^8 + 80 * #z^14 + 126 * #z^20 + 126 * #z^26 + \ 84 * #z^32 + 36 * #z^38 + 9 * #z^44 + #z^50 elseif @variant == "12" zpolynom = 2 * #z + 27 * #z^7 + 104 * #z^13 + 205 * #z^19 + 252 * #z^25 + \ 210 * #z^31 + 120 * #z^37 + 45 * #z^43 + 10 * #z^49 + #z^55 elseif @variant == "13" zpolynom = 1 + 25 * #z^6 + 125 * #z^12 + 305 * #z^18 + 456 * #z^24 + 462 * \ #z^30 + 330 * #z^36 + 165 * #z^42 + 55 * #z^48 + 11 * #z^54 + #z^60 elseif @variant == "14" zpolynom = 21 * #z^5 + 140 * #z^11 + 420 * #z^17 + 756 * #z^23 + 917 * \ #z^29 + 792 * #z^35 + 495 * #z^41 + 220 * #z^47 + 66 * #z^53 + 12 * \ #z^59 + #z^65 elseif @variant == "15" zpolynom = 15 * #z^4 + 146 * #z^10 + 540 * #z^16 + 1161 * #z^22 + 1667 * \ #z^28 + 1708 * #z^34 + 1287 * #z^40 + 715 * #z^46 + 286 * #z^52 + 78 * \ #z^58 + 13 * #z^64 + #z^70 elseif @variant == "16" zpolynom = 10 * #z^3 + 140 * #z^9 + 651 * #z^15 + 1666 * #z^21 + 2807 * \ #z^27 + 3368 * #z^33 + 2994 * #z^39 + 2002 * #z^45 + 1001 * #z^51 + \ 364 * #z^57 + 91 * #z^63 + 14 * #z^69 + #z^75 elseif @variant == "17" zpolynom = 6 * #z^2 + 125 * #z^8 + 735 * #z^14 + 2247 * #z^20 + 4417 * \ #z^26 + 6147 * #z^32 + 6354 * #z^38 + 4995 * #z^44 + 3003 * #z^50 + 1365 * \ #z^56 + 455 * #z^62 + 105 * #z^68 + 15 * #z^74 + #z^80 elseif @variant == "18" zpolynom = 3 * #z + 104 * #z^7 + 780 * #z^13 + 2856 * #z^19 + 6538 * #z^25 + \ 10480 * #z^31 + 12465 * #z^37 + 11340 * #z^43 + 7997 * #z^49 + 4368 * \ #z^55 + 1820 * #z^61 + 560 * #z^67 + 120 * #z^73 + 16 * #z^79 + #z^85 elseif @variant == "19" zpolynom = 1 + 80 * #z^6 + 780 * #z^12 + 3431 * #z^18 + 9142 * #z^24 + \ 16808 * #z^30 + 22825 * #z^36 + 23760 * #z^42 + 19327 * #z^48 + \ 12364 * #z^54 + 6188 * #z^60 + 2380 * #z^66 + 680 * #z^72 + 136 * \ #z^78 + 17 * #z^84 + #z^90 elseif @variant == "20" zpolynom = 56 * #z^5 + 735 * #z^11 + 3906 * #z^17 + 12117 * #z^23 + \ 25488 * #z^29 + 39303 * #z^35 + 46420 * #z^41 + 43032 * #z^47 + \ 31680 * #z^53 + 18551 * #z^59 + 8568 * #z^65 + 3060 * #z^71 + \ 816 * #z^77 + 153 * #z^83 + 18 * #z^89 + #z^95 elseif @variant == "21" zpolynom = 35 * #z^4 + 651 * #z^10 + 4221 * #z^16 + 15267 * #z^22 + \ 36688 * #z^28 + 63999 * #z^34 + 85228 * #z^40 + 89232 * #z^46 + \ 74646 * #z^52 + 50219 * #z^58 + 27118 * #z^64 + 11628 * #z^70 + \ 3876 * #z^76 + 969 * #z^82 + 171 * #z^88 + 19 * #z^94 + #z^100 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Hexanacci" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" "21" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-LaguerrePolynomials { ; Laguerre polynomials ; Mathematica: Expand[Table[LaguerreL[n, z], {n, 0, 20}]] ; jam 8/8/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = 1 - #z elseif @variant == "3" zpolynom = 1 - 2 * #z + 0.5 * #z^2 elseif @variant == "4" zpolynom = 1 - 3 * #z + 1.5 * #z^2 - #z^3/6 elseif @variant == "5" zpolynom = 1 - 4 * #z + 3 * #z^2 - (2 * #z^3)/3 + #z^4/24 elseif @variant == "6" zpolynom = 1 - 5 * #z + 5 * #z^2 - (5 * #z^3)/3 + (5 * #z^4)/24 - \ #z^5/120 elseif @variant == "7" zpolynom = 1 - 6 * #z + 7.5 * #z^2 - (10 * #z^3)/3 + 0.625 * #z^4 - \ #z^5/20 + #z^6/720 elseif @variant == "8" zpolynom = 1 - 7 * #z + 10.5 * #z^2 - (35 * #z^3)/6 + (35 * #z^4)/24 - \ 0.175 * #z^5 + (7 * #z^6)/720 - #z^7/5040 elseif @variant == "9" zpolynom = 1 - 8 * #z + 14 * #z^2 - (28 * #z^3)/3 + (35 * #z^4)/12 - \ (7 * #z^5)/15 + (7 * #z^6)/180 - #z^7/630 + #z^8/40320 elseif @variant == "10" zpolynom = 1 - 9 * #z + 18 * #z^2 - 14 * #z^3 + 5.25 * #z^4 - 1.05 * \ #z^5 + (7 * #z^6)/60 - #z^7/140 + #z^8/4480 - #z^9/362880 elseif @variant == "11" zpolynom = 1 - 10 * #z + 22.5 * #z^2 - 20 * #z^3 + 8.75 * #z^4 - 2.1 * \ #z^5 + (7 * #z^6)/24 - #z^7/42 + #z^8/896 - #z^9/36288 + #z^10/3628800 elseif @variant == "12" zpolynom = 1 - 11 * #z + 27.5 * #z^2 - 27.5 * #z^3 + 13.75 * #z^4 - \ 3.85 * #z^5 + (77 * #z^6)/120 - (11 * #z^7)/168 + (11 * #z^8)/2688 - \ (11 * #z^9)/72576 + (11 * #z^10)/3628800 - #z^11/39916800 elseif @variant == "13" zpolynom = 1 - 12 * #z + 33 * #z^2 - (110 * #z^3)/3 + 20.625 * #z^4 - \ 6.6 * #z^5 + (77 * #z^6)/60 - (11 * #z^7)/70 + (11 * #z^8)/896 - \ (11 * #z^9)/18144 + (11 * #z^10)/604800 - #z^11/3326400 + #z^12/479001600 elseif @variant == "14" zpolynom = 1 - 13 * #z + 39 * #z^2 - (143 * #z^3)/3 + (715 * \ #z^4)/24 - 10.725 * #z^5 + (143 * #z^6)/60 - (143 * #z^7)/420 + \ (143 * #z^8)/4480 - (143 * #z^9)/72576 + (143 * #z^10)/1814400 - \ (13 * #z^11)/6652800 + (13 * #z^12)/479001600 - #z^13/6.227020800e9 elseif @variant == "15" zpolynom = 1 - 14 * #z + 45.5 * #z^2 - (182 * #z^3)/3 + (1001 * #z^4)/24 - \ (1001 * #z^5)/60 + (1001 * #z^6)/240 - (143 * #z^7)/210 + (143 * \ #z^8)/1920 - (143 * #z^9)/25920 + (143 * #z^10)/518400 - (13 * \ #z^11)/1425600 + (13 * #z^12)/68428800 - #z^13/444787200 + \ #z^14/87.178291200e9 elseif @variant == "16" zpolynom = 1 - 15 * #z + 52.5 * #z^2 - (455 * #z^3)/6 + 56.875 * #z^4 - \ 25.025 * #z^5 + (1001 * #z^6)/144 - (143 * #z^7)/112 + (143 * \ #z^8)/896 - (143 * #z^9)/10368 + (143 * #z^10)/172800 - (13 * \ #z^11)/380160 + (13 * #z^12)/13685760 - #z^13/59304960 + \ #z^14/5.811886080e9 - #z^15/1.307674368000e12 elseif @variant == "17" zpolynom = 1 - 16 * #z + 60 * #z^2 - (280 * #z^3)/3 + (455 * #z^4)/6 - \ 36.4 * #z^5 + (1001 * #z^6)/90 - (143 * #z^7)/63 + (143 * \ #z^8)/448 - (143 * #z^9)/4536 + (143 * #z^10)/64800 - (13 * \ #z^11)/118800 + (13 * #z^12)/3421440 - #z^13/11119680 + #z^14/726485760 - \ #z^15/81.729648000e9 + #z^16/20.922789888000e12 elseif @variant == "18" zpolynom = 1 - 17 * #z + 68 * #z^2 - (340 * #z^3)/3 + (595 * #z^4)/6 - \ (1547 * #z^5)/30 + (1547 * #z^6)/90 - (2431 * #z^7)/630 + (2431 * \ #z^8)/4032 - (2431 * #z^9)/36288 + (2431 * #z^10)/453600 - (221 * \ #z^11)/712800 + (221 * #z^12)/17107200 - (17 * #z^13)/44478720 + \ (17 * #z^14)/2.179457280e9 - (17 * #z^15)/163.459296000e9 + (17 * \ #z^16)/20.922789888000e12 - #z^17/355.687428096000e12 elseif @variant == "19" zpolynom = 1 - 18 * #z + 76.5 * #z^2 - 136 * #z^3 + 127.5 * #z^4 - \ 71.4 * #z^5 + (1547 * #z^6)/60 - (221 * #z^7)/35 + (2431 * \ #z^8)/2240 - (2431 * #z^9)/18144 + (2431 * #z^10)/201600 - (221 * \ #z^11)/277200 + (221 * #z^12)/5702400 - (17 * #z^13)/12355200 + \ (17 * #z^14)/484323840 - (17 * #z^15)/27.243216000e9 + (17 * \ #z^16)/2.324754432000e12 - #z^17/19.760412672000e12 + \ #z^18/6.402373705728000e15 elseif @variant == "20" zpolynom = 1 - 19 * #z + 85.5 * #z^2 - 161.5 * #z^3 + 161.5 * #z^4 - \ 96.9 * #z^5 + (2261 * #z^6)/60 - (4199 * #z^7)/420 + (4199 * \ #z^8)/2240 - (46189 * #z^9)/181440 + (46189 * #z^10)/1814400 - \ (4199 * #z^11)/2217600 + (4199 * #z^12)/39916800 - (323 * \ #z^13)/74131200 + (323 * #z^14)/2.421619200e9 - (323 * \ #z^15)/108.972864000e9 + (323 * #z^16)/6.974263296000e12 - \ (19 * #z^17)/39.520825344000e12 + (19 * #z^18)/6.402373705728000e15 \ - #z^19/121.645100408832000e15 elseif @variant == "21" zpolynom = 1 - 20 * #z + 95 * #z^2 - 190 * #z^3 + 201.875 * #z^4 - \ 129.2 * #z^5 + (323 * #z^6)/6 - (323 * #z^7)/21 + (4199 * #z^8)/1344 \ - (4199 * #z^9)/9072 + (46189 * #z^10)/907200 - (4199 * \ #z^11)/997920 + (4199 * #z^12)/15966720 - (323 * #z^13)/25945920 + \ (323 * #z^14)/726485760 - (323 * #z^15)/27.243216000e9 + \ (323 * #z^16)/1.394852659200e12 - (19 * #z^17)/5.928123801600e12 + \ (19 * #z^18)/640.237370572800e12 - #z^19/6.082255020441600e15 + \ #z^20/2.432902008176640000e18 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Laguerre" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" "21" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-AssocLaguerrePolynomials { ; Associated Laguerre Polynomials ; Standard Laguerre polynomials are obtained by setting parameter ; 'Laguerre Constant' to zero. ; Mathematica: Expand[Simplify[Table[LaguerreL[n, k, z], {n, 0, 17}]]] ; jam 8/8/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 complex lkterm2 = 0.5 * sqr(@lconst) + 1.5 * @lconst complex lkterm3 = @lconst * sqr(@lconst)/6 + sqr(@lconst) + 11 * \ @lconst/6 complex lkterm4 = 25*@lconst/12 + 35*sqr(@lconst)/24 + 5*@lconst^3/12 + \ sqr(sqr(@lconst))/24 complex lkterm5 = 137*@lconst/60 + 15*sqr(@lconst)/8 + 17*@lconst^3/24 \ + sqr(sqr(@lconst))/8 + @lconst^5/120 complex lkterm6 = 49*@lconst/20 + 203*sqr(@lconst)/90 + 49*@lconst^3/48 + \ 35*sqr(sqr(@lconst))/144 + 7*@lconst^5/240 + @lconst^6/720 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "1" zpolynom = 1 - #z + @lconst elseif @variant == "2" zpolynom = 1 - 2 * #z + 0.5 * #z^2 + lkterm2 - @lconst*#z elseif @variant == "3" zpolynom = 1 - 3 * #z + 1.5 * #z^2 - #z^3/6 + lkterm3 - 2.5*@lconst*#z - \ 0.5*sqr(@lconst)*#z + 0.5*@lconst*sqr(#z) elseif @variant == "4" zpolynom = 1 - 4 * #z + 3 * #z^2 - (2 * #z^3)/3 + #z^4/24 + lkterm4 - \ 13*@lconst*#z/3 - 1.5*sqr(@lconst)*#z - @lconst^3*#z/6 + \ 7*@lconst*sqr(#z)/4 + sqr(@lconst)*sqr(#z)/4 - @lconst*#z^3/6 elseif @variant == "5" zpolynom = 1 - 5 * #z + 5 * #z^2 - (5 * #z^3)/3 + (5 * #z^4)/24 - \ #z^5/120 + lkterm5 - 77*@lconst*#z/12 - 71*sqr(@lconst)*#z/24 - \ 7*@lconst^3*#z/12 - sqr(sqr(@lconst))*#z/24 + 47*@lconst*sqr(#z)/12 \ + sqr(@lconst)*sqr(#z) + @lconst^3*sqr(#z)/12 - 0.75*@lconst*#z^3 \ - sqr(@lconst)*#z^3/12 + @lconst*sqr(sqr(#z))/24 elseif @variant == "6" zpolynom = 1 - 6 * #z + 7.5 * #z^2 - (10 * #z^3)/3 + 0.625 * #z^4 - \ #z^5/20 + #z^6/720 + lkterm6 - 8.7*@lconst*#z - 29*sqr(@lconst)*#z/6 \ - 31*lconst^3*#z/24 - sqr(sqr(@lconst))*#z/6 - @lconst^5*#z/120 + \ 7.125*@lconst*sqr(#z) + 119*sqr(@lconst)*sqr(#z)/48 + \ 0.375*@lconst^3*sqr(#z) + sqr(sqr(@lconst))*sqr(#z)/48 - \ 37*@lconst*#z^3/18 - 5*sqr(@lconst)*#z^3/12 - @lconst^3*#z^3/36 + \ 11*@lconst*sqr(sqr(#z))/48 + sqr(@lconst)*sqr(sqr(#z))/48 - @lconst*#z^5/120 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Assoc Laguerre" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "1" "2" "3" "4" "5" "6" default = 2 hint = "This setting selects which polynomial equation to iterate." endparam param lconst caption = "Laguerre Constant" default = (1,0) hint = "This parameter selects which family of associated Laguerre polynomials \ to iterate. Setting this parameter to zero results in the ordinary Laguerre \ polynomials." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-SwissKnifePolynomials { ; Mathematica: Expand[Simplify[CoefficientList[Series[Exp[z*t]*Sech[t], ; {t, 0, 20}], t] * Range[0, 20]!]] ; jam 8/8/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = -1 + #z^2 elseif @variant == "3" zpolynom = -3 * #z + #z^3 elseif @variant == "4" zpolynom = 5 - 6 * #z^2 + #z^4 elseif @variant == "5" zpolynom = 25 * #z - 10 * #z^3 + #z^5 elseif @variant == "6" zpolynom = -61 + 75 * #z^2 - 15 * #z^4 + #z^6 elseif @variant == "7" zpolynom = -427 * #z + 175 * #z^3 - 21 * #z^5 + #z^7 elseif @variant == "8" zpolynom = 1385 - 1708 * #z^2 + 350 * #z^4 - 28 * #z^6 + #z^8 elseif @variant == "9" zpolynom = 12465 * #z - 5124 * #z^3 + 630 * #z^5 - 36 * #z^7 + #z^9 elseif @variant == "10" zpolynom = -50521 + 62325 * #z^2 - 12810 * #z^4 + 1050 * #z^6 - 45 * \ #z^8 + #z^10 elseif @variant == "11" zpolynom = -555731 * #z + 228525 * #z^3 - 28182 * #z^5 + 1650 * \ #z^7 - 55 * #z^9 + #z^11 elseif @variant == "12" zpolynom = 2702765 - 3334386 * #z^2 + 685575 * #z^4 - 56364 * #z^6 + \ 2475 * #z^8 - 66 * #z^10 + #z^12 elseif @variant == "13" zpolynom = 35135945 * #z - 14449006 * #z^3 + 1782495 * #z^5 - 104676 * \ #z^7 + 3575 * #z^9 - 78 * #z^11 + #z^13 elseif @variant == "14" zpolynom = -199360981 + 245951615 * #z^2 - 50571521 * #z^4 + 4159155 * \ #z^6 - 183183 * #z^8 + 5005 * #z^10 - 91 * #z^12 + #z^14 elseif @variant == "15" zpolynom = -2.990414715e9 * #z + 1.229758075e9 * #z^3 - 151714563 * \ #z^5 + 8912475* #z^7 - 305305 * #z^9 + 6825 * #z^11 - 105 * #z^13 \ + #z^15 elseif @variant == "16" zpolynom = 19.391512145e9 - 23.923317720e9 * #z^2 + 4.919032300e9 * \ #z^4 - 404572168 * #z^6 + 17824950 * #z^8 - 488488 * #z^10 + 9100 * \ #z^12 - 120 * #z^14 + #z^16 elseif @variant == "17" zpolynom = 329.655706465e9 * #z - 135.565467080e9 * #z^3 + 16.724709820e9 \ * #z^5 - 982532408 * #z^7 + 33669350 * #z^9 - 754936 * #z^11 + 11900 * \ #z^13 - 136 * #z^15 + #z^17 elseif @variant == "18" zpolynom = -2.404879675441e12 + 2.966901358185e12 * #z^2 - 610.044601860e9 \ * #z^4 + 50.174129460e9 * #z^6 - 2.210697918e9 * #z^8 + 60604830 * \ #z^10 - 1132404 * #z^12 + 15300 * #z^14 - 153 * #z^16 + #z^18 elseif @variant == "19" zpolynom = -45.692713833379e12 * #z + 18.790375268505e12 * #z^3 - \ 2.318169487068e12 * #z^5 + 136.186922820e9 * #z^7 - 4.667028938e9 * \ #z^9 + 104681070 * #z^11 - 1655052 * #z^13 + 19380 * #z^15 - 171 * \ #z^17 + #z^19 elseif @variant == "20" zpolynom = 370.371188237525e12 - 456.927138333790e12 * #z^2 + \ 93.951876342525e12 * #z^4 - 7.727231623560e12 * #z^6 + 340.467307050e9 \ * #z^8 - 9.334057876e9 * #z^10 + 174468450 * #z^12 - 2364360 * \ #z^14 + 24225 * #z^16 - 190 * #z^18 + #z^20 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Swiss Knife" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" default = 6 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (-7,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-CompSwissKnifePolynomials { ; Complementary Swiss Knife Polynomials ; jam 8/9/17 ; Mathematica: skp[n_, x_] := Sum[Binomial[n, k]*EulerE[k]*x^(n - k), {k, 0, n}]; ; v[n_, x_] := (skp[n, x + 1] - skp[n, x - 1])/2; ; Expand[Simplify[Table[v[n, x], {n, 0, 20}]]] ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = -2 + 3 * #z^2 elseif @variant == "3" zpolynom = -8 * #z + 4 * #z^3 elseif @variant == "4" zpolynom = 16 - 20 * #z^2 + 5 * #z^4 elseif @variant == "5" zpolynom = 96 * #z - 40 * #z^3 + 6 * #z^5 elseif @variant == "6" zpolynom = -272 + 336 * #z^2 - 70 * #z^4 + 7 * #z^6 elseif @variant == "7" zpolynom = -2176 * #z + 896 * #z^3 - 112 * #z^5 + 8 * #z^7 elseif @variant == "8" zpolynom = 7936 - 9792 * #z^2 + 2016 * #z^4 - 168 * #z^6 + 9 * #z^8 elseif @variant == "9" zpolynom = 79360 * #z - 32640 * #z^3 + 4032 * #z^5 - 240 * #z^7 + \ 10 * #z^9 elseif @variant == "10" zpolynom = -353792 + 436480 * #z^2 - 89760 * #z^4 + 7392 * #z^6 - \ 330 * #z^8 + 11 * #z^10 elseif @variant == "11" zpolynom = -4245504 * #z + 1745920 * #z^3 - 215424 * #z^5 + 12672 * \ #z^7 - 440 * #z^9 + 12 * #z^11 elseif @variant == "12" zpolynom = 22368256 - 27595776 * #z^2 + 5674240 * #z^4 - 466752 * \ #z^6 + 20592 * #z^8 - 572 * #z^10 + 13 * #z^12 elseif @variant == "13" zpolynom = 313155584 * #z - 128780288 * #z^3 + 15887872 * #z^5 - \ 933504 * #z^7 + 32032 * #z^9 - 728 * #z^11 + 14 * #z^13 elseif @variant == "14" zpolynom = -1.903757312e9 + 2.348666880e9 * #z^2 - 482926080 * \ #z^4 + 39719680 * #z^6 - 1750320 * #z^8 + 48048 * #z^10 - 910 * \ #z^12 + 15 * #z^14 elseif @variant == "15" zpolynom = -30.460116992e9 * #z + 12.526223360e9 * #z^3 - 1.545363456e9 * \ #z^5 + 90787840 * #z^7 - 3111680 * #z^9 + 69888 * #z^11 - 1120 * \ #z^13 + 16 * #z^15 elseif @variant == "16" zpolynom = 209.865342976e9 - 258.910994432e9 * #z^2 + 53.236449280e9 * \ #z^4 - 4.378529792e9 * #z^6 + 192924160 * #z^8 - 5289856 * #z^10 + \ 99008 * #z^12 - 1360 * #z^14 + 17 * #z^16 elseif @variant == "17" zpolynom = 3.777576173568e12 * #z - 1.553465966592e12 * #z^3 + \ 191.651217408e9 * #z^5 - 11.259076608e9 * #z^7 + 385848320 * \ #z^9 - 8656128 * #z^11 + 137088 * #z^13 - 1632 * #z^15 + 18 * \ #z^17 elseif @variant == "18" zpolynom = -29.088885112832e12 + 35.886973648896e12 * #z^2 - \ 7.378963341312e12 * #z^4 + 606.895521792e9 * #z^6 - 26.740306944e9 * \ #z^8 + 733111808 * #z^10 - 13705536 * #z^12 + 186048 * #z^14 - \ 1938 * #z^16 + 19 * #z^18 elseif @variant == "19" zpolynom = -581.777702256640e12 * #z + 239.246490992640e12 * #z^3 - \ 29.515853365248e12 * #z^5 + 1.733987205120e12 * #z^7 - 59.422904320e9 * \ #z^9 + 1.332930560e9 * #z^11 - 21085440 * #z^13 + 248064 * #z^15 - \ 2280 * #z^17 + 20 * #z^19 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynoms Comp Swiss Knife" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" default = 10 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (-16,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-HeptanacciPolynomials { ; jam 8/8/17 ; Mathematica: P[z, 0] = 0; P[z, 1] = 0; P[z, 2] = 0; P[z, 3] = 0; P[z, 4] = 0; ; P[z, 5] = 0; P[z, 6] = 1; P[z, 7] = z^6; ; P[z_, n_] := z^6* P[z, n - 1] + z^5*P[z, n - 2] + z^4*P[z, n - 3] + ; z^3*P[z, n - 4] + z^2*P[z, n - 5] + z*P[z, n - 6] + ; P[z, n - 7]; ; Table[ExpandAll[P[z, n], z], {n, 0, 25}] ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = #z^6 elseif @variant == "3" zpolynom = #z^5 + #z^12 elseif @variant == "4" zpolynom = #z^4 + 2 * #z^11 + #z^18 elseif @variant == "5" zpolynom = #z^3 + 3 * #z^10 + 3 * #z^17 + #z^24 elseif @variant == "6" zpolynom = #z^2 + 4 * #z^9 + 6 * #z^16 + 4 * #z^23 + #z^30 elseif @variant == "7" zpolynom = #z + 5 * #z^8 + 10 * #z^15 + 10 * #z^22 + 5 * #z^29 + #z^36 elseif @variant == "8" zpolynom = 1 + 6 * #z^7 + 15 * #z^14 + 20 * #z^21 + 15 * #z^28 + 6 * \ #z^35 + #z^42 elseif @variant == "9" zpolynom = 7 * #z^6 + 21 * #z^13 + 35 * #z^20 + 35 * #z^27 + 21 * \ #z^34 + 7 * #z^41 + #z^48 elseif @variant == "10" zpolynom = 6 * #z^5 + 28 * #z^12 + 56 * #z^19 + 70 * #z^26 + 56 * \ #z^33 + 28 * #z^40 + 8 * #z^47 + #z^54 elseif @variant == "11" zpolynom = 5 * #z^4 + 33 * #z^11 + 84 * #z^18 + 126 * #z^25 + 126 * \ #z^32 + 84 * #z^39 + 36 * #z^46 + 9 * #z^53 + #z^60 elseif @variant == "12" zpolynom = 4 * #z^3 + 36 * #z^10 + 116 * #z^17 + 210 * #z^24 + 252 * \ #z^31 + 210 * #z^38 + 120 * #z^45 + 45 * #z^52 + 10 * #z^59 + #z^66 elseif @variant == "13" zpolynom = 3 * #z^2 + 37 * #z^9 + 149 * #z^16 + 325 * #z^23 + 462 * \ #z^30 + 462 * #z^37 + 330 * #z^44 + 165 * #z^51 + 55 * #z^58 + \ 11 * #z^65 + #z^72 elseif @variant == "14" zpolynom = 2 * #z + 36 * #z^8 + 180 * #z^15 + 470 * #z^22 + 786 * \ #z^29 + 924 * #z^36 + 792 * #z^43 + 495 * #z^50 + 220 * #z^57 + \ 66 * #z^64 + 12 * #z^71 + #z^78 elseif @variant == "15" zpolynom = 1 + 33 * #z^7 + 206 * #z^14 + 640 * #z^21 + 1251 * #z^28 + \ 1709 * #z^35 + 1716 * #z^42 + 1287 * #z^49 + 715 * #z^56 + 286 * \ #z^63 + 78 * #z^70 + 13 * #z^77 + #z^84 elseif @variant == "16" zpolynom = 28 * #z^6 + 224 * #z^13 + 826 * #z^20 + 1876 * #z^27 + 2954 * \ #z^34 + 3424 * #z^41 + 3003 * #z^48 + 2002 * #z^55 + 1001 * #z^62 + \ 364 * #z^69 + 91 * #z^76 + 14 * #z^83 + #z^90 elseif @variant == "17" zpolynom = 21 * #z^5 + 231 * #z^12 + 1015 * #z^19 + 2667 * #z^26 + 4809 * \ #z^33 + 6371 * #z^40 + 6426 * #z^47 + 5005 * #z^54 + 3003 * #z^61 + \ 1365 * #z^68 + 455 * #z^75 + 105 * #z^82 + 15 * #z^89 + #z^96 elseif @variant == "18" zpolynom = 15 * #z^4 + 224 * #z^11 + 1190 * #z^18 + 3612 * #z^25 + 7420 * \ #z^32 + 11152 * #z^39 + 12789 * #z^46 + 11430 * #z^53 + 8008 * #z^60 + \ 4368 * #z^67 + 1820 * #z^74 + 560 * #z^81 + 120 * #z^88 + 16 * #z^95 + \ #z^102 elseif @variant == "19" zpolynom = 10 * #z^3 + 206 * #z^10 + 1330 * #z^17 + 4676 * #z^24 + 10906 * \ #z^31 + 18488 * #z^38 + 23905 * #z^45 + 24210 * #z^52 + 19437 * #z^59 + \ 12376 * #z^66 + 6188 * #z^73 + 2380 * #z^80 + 680 * #z^87 + 136 * \ #z^94 + 17 * #z^101 + #z^108 elseif @variant == "20" zpolynom = 6 * #z^2 + 180 * #z^9 + 1420 * #z^16 + 5796 * #z^23 + 15330 * \ #z^30 + 29184 * #z^37 + 42273 * #z^44 + 48070 * #z^51 + 43637 * \ #z^58 + 31812 * #z^65 + 18564 * #z^72 + 8568 * #z^79 + 3060 * \ #z^86 + 816 * #z^93 + 153 * #z^100 + 18 * #z^107 + #z^114 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Heptanacci" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" "20" default = 8 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (3,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-NorlundPolynomials { ; Norlund Polynomials or Generalized Bernoulli Polynomials ; jam 8/10/17 ; Standard Bernoulli polynomials are obtained by setting parameter ; 'Norlund Constant' to one. ; Mathematica: Expand[Table[ExpandAll[NorlundB[n, a, z], z], {n, 0, 8}]] ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 complex nor2 = sqr(@norconst) complex nor3 = @norconst*nor2 complex nor4 = @norconst*nor3 complex nor5 = @norconst*nor4 complex nor6 = @norconst*nor5 complex norterm2 = 0.25*nor2-@norconst/12 complex norterm3 = 0.125*(nor3-nor2) complex norterm4 = 0.0625*nor4-0.125*nor3+nor2/48+@norconst/120 complex norterm5 = -0.03125*nor5+5*nor4/48-5*nor3/96-nor2/48 complex norterm6 = 0.015625*nor6-0.078125*nor5+0.078125*nor4+\ 13*nor3/576-nor2/96-@norconst/252 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) complex z2 = complex z3 = complex z4 = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "1" zpolynom = #z - 0.5*@norconst elseif @variant == "2" zpolynom = sqr(#z) - @norconst*#z + norterm2 elseif @variant == "3" zpolynom = #z^3 - 1.5*@norconst*sqr(#z) + 0.75*nor2*#z - 0.25*@norconst*#z + norterm3 elseif @variant == "4" z2 = sqr(#z) zpolynom = sqr(z2) - 2*@norconst*#z^3 + 1.5*nor2*z2 - 0.5*@norconst*z2 - 0.5*nor3*#z + 0.5*nor2*#z + norterm4 elseif @variant == "5" z2 = sqr(#z) z3 = #z*z2 zpolynom = #z^5 - 2.5*@norconst*sqr(z2)+ 2.5*nor2*z3 - 5*@norconst*z3/6 - 1.25*nor3*z2 + 1.25*nor2*z2 + 0.3125*nor4*#z - 0.625*nor3*#z + 5*nor2*#z/48 + @norconst*#z/24 + norterm5 elseif @variant == "6" z2 = sqr(#z) z3 = #z*z2 z4 = sqr(z2) zpolynom = #z^6 - 3*@norconst*#z^5 + 3.75*nor2*z4 - 1.25*@norconst*z4 - 2.5*nor3*z3 + 2.5*nor2*z3 + 0.9375*nor4*z2 - 1.875*nor3*z2 + 0.3125*nor2*z2 + 0.125*@norconst*z2 - 0.1875*nor5*#z + 0.625*nor4*#z - 0.3125*nor3*#z - 0.125*nor2*#z + norterm6 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Norlund" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "1" "2" "3" "4" "5" "6" default = 2 hint = "This setting selects which polynomial equation to iterate." endparam param norconst caption = "Norlund Constant" default = (1.5,0) hint = "This parameter selects which family of Norlund polynomials \ to iterate. Setting this parameter to 1.0 results in the ordinary Bernoulli \ polynomials." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-ZetaPolynomials { ; jam 8/16/17 ; See http://www.luschny.de/math/seq/ZetaPolynomials.htm ; Mathematica: h[n_, z_] := Sum[Sum[Abs[StirlingS1[n, n - i]] * z^(n - k - 1), ; {i, 0, k}], {k, 0, n - 1}] ; zeta[n_, z_] := Sum[Sum[(-1)^v * Binomial[k, v] * h[k + 1, z]/ ; (k + 1)! * (z + v + 1)^n, {v, 0, k}], {k, 0, n}] ; Simplify[Table[zeta[n, z], {n, 1, 19}]] ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = (-#z + 2 * sqr(#z))/6 elseif @variant == "3" zpolynom = (-1 + #z) * #z^2/4 elseif @variant == "4" zpolynom = #z * (1 + #z - 9 * #z^2 + 6 * #z^3)/30 elseif @variant == "5" zpolynom = #z^2 * (1 + #z - 4 * #z^2 + 2 * #z^3)/12 elseif @variant == "6" zpolynom = #z * (-1 - #z + 6 * #z^2 + 6 * #z^3 - 15 * #z^4 + 6 * #z^5)/42 elseif @variant == "7" zpolynom = #z^2 * (-2 - 2 * #z + 5 * #z^2 + 5 * #z^3 - 9 * #z^4 + 3 * \ #z^5)/24 elseif @variant == "8" zpolynom = #z * (3 + 3 * #z - 17 * #z^2 - 17 * #z^3 + 25 * #z^4 + 25 * \ #z^5 - 35 * #z^6 + 10 * #z^7)/90 elseif @variant == "9" zpolynom = #z^2 * (3 + 3 * #z - 7 * #z^2 - 7 * #z^3 + 7 * #z^4 + 7 * #z^5 \ - 8 * #z^6 + 2 * #z^7)/20 elseif @variant == "10" zpolynom = #z * (-5 - 5 * #z + 28 * #z^2 + 28 * #z^3 - 38 * #z^4 - 38 * \ #z^5 + 28 * #z^6 + 28 * #z^7 - 27 * #z^8 + 6 * #z^9)/66 elseif @variant == "11" zpolynom = #z^2 * (-10 - 10 * #z + 23 * #z^2 + 23 * #z^3 - 21 * #z^4 - \ 21 * #z^5 + 12 * #z^6 + 12 * #z^7 - 10 * #z^8 + 2 * #z^9)/24 elseif @variant == "12" zpolynom = #z * (691 + 691 * #z - 3859 * #z^2 - 3859 * #z^3 + 5150 * #z^4 \ + 5150 * #z^5 - 3430 * #z^6 - 3430 * #z^7 + 1575 * #z^8 + 1575 * #z^9 - \ 1155 * #z^10 + 210 * #z^11)/2730 elseif @variant == "13" zpolynom = #z^2 * (691 + 691 * #z - 1584 * #z^2 - 1584 * #z^3 + 1419 * #z^4 \ + 1419 * #z^5 - 726 * #z^6 - 726 * #z^7 + 275 * #z^8 + 275 * #z^9 - 180 * \ #z^10 + 30 * #z^11)/420 elseif @variant == "14" zpolynom = #z * (-105 - 105 * #z + 586 * #z^2 + 586 * #z^3 - 779 * #z^4 - \ 779 * #z^5 + 508 * #z^6 + 508 * #z^7 - 207 * #z^8 - 207 * #z^9 + 66 * \ #z^10 + 66 * #z^11 - 39 * #z^12 + 6 * #z^13)/90 elseif @variant == "15" zpolynom = #z^2 * (-420 - 420 * #z + 962 * #z^2 + 962 * #z^3 - 858 * #z^4 - \ 858 * #z^5 + 429 * #z^6 + 429 * #z^7 - 143 * #z^8 - 143 * #z^9 + 39 * \ #z^10 + 39 * #z^11 - 21 * #z^12 + 3 * #z^13)/48 elseif @variant == "16" zpolynom = #z * (3617 + 3617 * #z - 20183 * #z^2 - 20183 * #z^3 + 26805 * \ #z^4 + 26805 * #z^5 - 17395 * #z^6 - 17395 * #z^7 + 6915 * #z^8 + 6915 * \ #z^9 - 1925 * #z^10 - 1925 * #z^11 + 455 * #z^12 + 455 * #z^13 - 225 * \ #z^14 + 30 * #z^15)/510 elseif @variant == "17" zpolynom = #z^2 * (10851 + 10851 * #z - 24849 * #z^2 - 24849 * #z^3 + 22139 \ * #z^4 + 22139 * #z^5 - 11011 * #z^6 - 11011 * #z^7 + 3575 * #z^8 + 3575 \ * #z^9 - 845 * #z^10 - 845 * #z^11 + 175 * #z^12 + 175 * #z^13 - 80 * \ #z^14 + 10 * #z^15)/180 elseif @variant == "18" zpolynom = #z * (-219335 - 219335 * #z + 1223848 * #z^2 + 1223848 * #z^3 - \ 1625012 * #z^4 - 1625012 * #z^5 + 1053304 * #z^6 + 1053304 * #z^7 - \ 416346 * #z^8 - 416346 * #z^9 + 112728 * #z^10 + 112728 * #z^11 - 22932 * \ #z^12 - 22932 * #z^13 + 4200 * #z^14 + 4200 * #z^15 - 1785 * #z^16 + 210 * \ #z^17)/3990 elseif @variant == "19" zpolynom = #z^2 * (-438670 - 438670 * #z + 1004513 * #z^2 + 1004513 * #z^3 - \ 894727 * #z^4 - 894727 * #z^5 + 444431 * #z^6 + 444431 * #z^7 - 143429 * \ #z^8 - 143429 * #z^9 + 32929 * #z^10 + 32929 * #z^11 - 5831 * #z^12 - \ 5831 * #z^13 + 952 * #z^14 + 952 * #z^15 - 378 * #z^16 + 42 * #z^17)/840 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Zeta" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" default = 7 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (4,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-HarmonicPolynomials { ; Harmonic polynomials ; These are not harmonic polynomials in the traditional mathematical sense of "harmonic", ; but rather related to the harmonic numbers and zeta polynomials. ; See http://www.luschny.de/math/seq/ZetaPolynomials.htm ; Mathematica: h[n_, z_] := Sum[Sum[Abs[StirlingS1[n, n - i]] * z^(n - k - 1), ; {i, 0, k}], {k, 0, n - 1}] ; Table[h[n, z], {n, 1, 20}] ; jam 8/17/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "2" zpolynom = 6 + 4 * #z + #z^2 elseif @variant == "3" zpolynom = 24 + 18 * #z + 7 * #z^2 + #z^3 elseif @variant == "4" zpolynom = 120 + 96 * #z + 46 * #z^2 + 11 * #z^3 + #z^4 elseif @variant == "5" zpolynom = 720 + 600 * #z + 326 * #z^2 + 101 * #z^3 + 16 * #z^4 + #z^5 elseif @variant == "6" zpolynom = 5040 + 4320 * #z + 2556 * #z^2 + 932 * #z^3 + 197 * #z^4 + \ 22 * #z^5 + #z^6 elseif @variant == "7" zpolynom = 40320 + 35280 * #z + 22212 * #z^2 + 9080 * #z^3 + 2311 * \ #z^4 + 351 * #z^5 + 29 * #z^6 + #z^7 elseif @variant == "8" zpolynom = 362880 + 322560 * #z + 212976 * #z^2 + 94852 * #z^3 + 27568 * \ #z^4 + 5119 * #z^5 + 583 * #z^6 + 37 * #z^7 + #z^8 elseif @variant == "9" zpolynom = 3628800 + 3265920 * #z + 2239344 * #z^2 + 1066644 * #z^3 + \ 342964 * #z^4 + 73639 * #z^5 + 10366 * #z^6 + 916 * #z^7 + 46 * \ #z^8 + #z^9 elseif @variant == "10" zpolynom = 39916800 + 36288000 * #z + 25659360 * #z^2 + 12905784 * #z^3 + \ 4496284 * #z^4 + 1079354 * #z^5 + 177299 * #z^6 + 19526 * #z^7 + \ 1376 * #z^8 + 56 * #z^9 + #z^10 elseif @variant == "11" zpolynom = 479001600 + 439084800 * #z + 318540960 * #z^2 + 167622984 * \ #z^3 + 62364908 * #z^4 + 16369178 * #z^5 + 3029643 * #z^6 + 392085 * \ #z^7 + 34662 * #z^8 + 1992 * #z^9 + 67 * #z^10 + #z^11 elseif @variant == "12" zpolynom = 6.227020800e9 + 5.748019200e9 * #z + 4.261576320e9 * #z^2 + \ 2.330016768e9 * #z^3 + 916001880 * #z^4 + 258795044 * #z^5 + 52724894 * \ #z^6 + 7734663 * #z^7 + 808029 * #z^8 + 58566 * #z^9 + 2796 * #z^10 + \ 79 * #z^11 + #z^12 elseif @variant == "13" zpolynom = 87.178291200e9 + 80.951270400e9 * #z + 61.148511360e9 * #z^2 + \ 34.551794304e9 * #z^3 + 14.238041208e9 * #z^4 + 4.280337452e9 * #z^5 + \ 944218666 * #z^6 + 153275513 * #z^7 + 18239040 * #z^8 + 1569387 * \ #z^9 + 94914 * #z^10 + 3823 * #z^11 + 92 * #z^12 + #z^13 elseif @variant == "14" zpolynom = 1.307674368000e12 + 1.220496076800e12 * #z + 937.030429440e9 * \ #z^2 + 544.873631616e9 * #z^3 + 233.884371216e9 * #z^4 + 74.162765536e9 * \ #z^5 + 17.499398776e9 * #z^6 + 3.090075848e9 * #z^7 + 408622073 * #z^8 + \ 40210458 * #z^9 + 2898183 * #z^10 + 148436 * #z^11 + 5111 * #z^12 + 106 * \ #z^13 + #z^14 elseif @variant == "15" zpolynom = 20.922789888000e12 + 19.615115520000e12 * #z + 15.275952518400e12 * \ #z^2 + 9.110134903680e12 * #z^3 + 4.053139199856e12 * #z^4 + \ 1.346325854256e12 * #z^5 + 336.653747176e9 * #z^6 + 63.850536496e9 * \ #z^7 + 9.219406943e9 * #z^8 + 1.011778943e9 * #z^9 + 83683203 * #z^10 + \ 5124723 * #z^11 + 225101 * #z^12 + 6701 * #z^13 + 121 * #z^14 + #z^15 elseif @variant == "16" zpolynom = 355.687428096000e12 + 334.764638208000e12 * #z + \ 264.030355814400e12 * #z^2 + 161.038110977280e12 * #z^3 +\ 73.960362101376e12 * #z^4 + 25.594352867952e12 * #z^5 + \ 6.732785809072e12 * #z^6 + 1.358262331112e12 * #z^7 + 211.361047584e9 *\ #z^8 + 25.407870031e9 * #z^9 + 2.350710191e9 * #z^10 + 165678771 * \ #z^11 + 8726339 * #z^12 + 332317 * #z^13 + 8637 * #z^14 + 137 * #z^15 + \ #z^16 elseif @variant == "17" zpolynom = 6.402373705728000e15 + 6.046686277632000e15 * #z + \ 4.823280687052800e15 * #z^2 + 3.001678242428160e15 * #z^3 + \ 1.418364266700672e15 * #z^4 + 509.064360856560e12 * #z^5 + \ 140.051711622176e12 * #z^6 + 29.823245437976e12 * #z^7 + \ 4.951400140040e12 * #z^8 + 643.294838111e9 * #z^9 + 65.369943278e9 * \ #z^10 + 5.167249298e9 * #z^11 + 314026534 * #z^12 + 14375728 * #z^13 + \ 479146 * #z^14 + 10966 * #z^15 + 154 * #z^16 + #z^17 elseif @variant == "18" zpolynom = 121.645100408832000e15 + 115.242726703104000e15 * #z + \ 92.865738644582400e15 * #z^2 + 58.853489050759680e15 * #z^3 + \ 28.532235043040256e15 * #z^4 + 10.581522762118752e15 * #z^5 + \ 3.029995170055728e15 * #z^6 + 676.870129505744e12 * #z^7 + \ 118.948447958696e12 * #z^8 + 16.530707226038e12 * #z^9 + 1.819953817115e12 * \ #z^10 + 158.380430642e9 * #z^11 + 10.819726910e9 * #z^12 + 572789638 * \ #z^13 + 23000356 * #z^14 + 676534 * #z^15 + 13738 * #z^16 + 172 * #z^17 + #z^18 elseif @variant == "19" zpolynom = 2.432902008176640000e18 + 2.311256907767808000e18 * #z + \ 1.879691760950169600e18 * #z^2 + 1.211082030609016320e18 * #z^3 + \ 600.965954868524544e15 * #z^4 + 229.581167523296544e15 * #z^5 + \ 68.151430993177584e15 * #z^6 + 15.890527630664864e15 * #z^7 + \ 2.936890640720968e15 * #z^8 + 433.031885253418e12 * #z^9 + \ 51.109829751223e12 * #z^10 + 4.829181999313e12 * #z^11 + \ 363.955241932e9 * #z^12 + 21.702730032e9 * #z^13 + 1.009796402e9 * \ #z^14 + 35854502 * #z^15 + 937556 * #z^16 + 17006 * #z^17 + 191 * \ #z^18 + #z^19 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "Polynomials Harmonic" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 1000 param variant caption = "Polynomial Variant" enum = "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" \ "13" "14" "15" "16" "17" "18" "19" default = 3 hint = "This setting selects which polynomial equation to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (-6.6,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-polySeriesExponentials { ; Partial series expansions of the exponential function ; Mathematica: expn[n_, z_] := Normal[Series[Exp[z], {z, 0, n}]] ; jam 8/24/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 halfpi = #pi/2 init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @variant == "3" zpolynom = 1 + #z + 0.5*#z^2 + #z^3/6 elseif @variant == "4" zpolynom = 1 + #z + 0.5*#z^2 + #z^3/6 + #z^4/24 elseif @variant == "5" zpolynom = 1 + #z + 0.5*#z^2 + #z^3/6 + #z^4/24 + #z^5/120 elseif @variant == "6" zpolynom = 1 + #z + 0.5*#z^2 + #z^3/6 + #z^4/24 + #z^5/120 + \ #z^6/720 elseif @variant == "7" zpolynom = 1 + #z + 0.5*#z^2 + #z^3/6 + #z^4/24 + #z^5/120 + \ #z^6/720 + #z^7/5040 elseif @variant == "8" zpolynom = 1 + #z + 0.5*#z^2 + #z^3/6 + #z^4/24 + #z^5/120 + \ #z^6/720 + #z^7/5040 + #z^8/40320 endif ; @variant if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 zpolynom = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "PolySeries Exponential" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Series Variant" enum = "3" "4" "5" "6" "7" "8" default = 3 hint = "This setting selects the number of terms in the series expansion \ of the function to iterate." endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-PolySeqPolygonal { ; Repeated iteration of polynomials based on sequences of polygonal numbers ; Mathematica: Table[PolygonalNumber[n, j], {j, 0, 20}] ; for the initial 20 members of the sequence of n-gonal numbers. ; jam 8/29/17 ; The earliest reference I can find (2011) of the use of the underlying ; algorithms implemented in these formulas can be found on Fractal Forums here: ; http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/ ; Around the same time, Sam Monier described and used the labs() and similar functions ; to produce dense fractal patterns (see description here: ; http://www.algorithmic-worlds.net/blog/blog.php?Post=20110227). ; These and other 'Ducky' type formulas had a long history of use ; in Fractal Explorer, as described by Ed Algra at the Monier link cited above. ; Otto Magus used these ideas together in his wonderful set of polynomial ; formulas found in om.ufm. Well worth exploring! These formed the ; basis for these current formulas. ; Having long worked with polynomial formulas myself (e.g., see jam.ufm), ; and inspired by Otto's work, I have produced these extensions and ; elaborations, with various modifications, tweaks, and bells & whistles, ; along with new polynomials, functions, algorithms, and variants. ; I've decided that the new functionality is significant enough to ; warrant sharing in the public database. Enjoy! global: float zadjust = @zadjustment/100 float halfpi = #pi/2 int gindex = 0 ; loop index, global section int maxterms = 17 ; maximum number of sequence terms allowed complex sequence[17] ; for holding members of the defining sequence sequence[0] = 0, sequence[1] = 1 if @variant == "3" ; triangular numbers sequence[2] = 3, sequence[3] = 6, sequence[4] = 10 sequence[5] = 15, sequence[6] = 21, sequence[7] = 28 sequence[8] = 36, sequence[9] = 45, sequence[10] = 55 sequence[11] = 66, sequence[12] = 78, sequence[13] = 91 sequence[14] = 105, sequence[15] = 120, sequence[16] = 136 elseif @variant == "4" ; square numbers sequence[2] = 4, sequence[3] = 9, sequence[4] = 16 sequence[5] = 25, sequence[6] = 36, sequence[7] = 49 sequence[8] = 64, sequence[9] = 81, sequence[10] = 100 sequence[11] = 121, sequence[12] = 144, sequence[13] = 169 sequence[14] = 196, sequence[15] = 225, sequence[16] = 256 elseif @variant == "5" ; pentagonal numbers sequence[2] = 5, sequence[3] = 12, sequence[4] = 22 sequence[5] = 35, sequence[6] = 51, sequence[7] = 70 sequence[8] = 92, sequence[9] =117, sequence[10] = 145 sequence[11] = 176, sequence[12] = 210, sequence[13] = 247 sequence[14] = 287, sequence[15] = 330, sequence[16] = 376 elseif @variant == "6" ; hexagonal numbers sequence[2] = 6, sequence[3] = 15, sequence[4] = 28 sequence[5] = 45, sequence[6] = 66, sequence[7] = 91 sequence[8] = 120, sequence[9] = 153, sequence[10] = 190 sequence[11] = 231, sequence[12] = 276, sequence[13] = 325 sequence[14] = 378, sequence[15] = 435, sequence[16] = 496 elseif @variant == "7" ; heptagonal numbers sequence[2] = 7, sequence[3] = 18, sequence[4] = 34 sequence[5] = 55, sequence[6] = 81, sequence[7] = 112 sequence[8] = 148, sequence[9] = 189, sequence[10] = 235 sequence[11] = 286, sequence[12] = 342, sequence[13] = 403 sequence[14] = 469, sequence[15] = 540, sequence[16] = 616 elseif @variant == "8" ; octagonal numbers sequence[2] = 8, sequence[3] = 21, sequence[4] = 40 sequence[5] = 65, sequence[6] = 96, sequence[7] = 133 sequence[8] = 176, sequence[9] = 225, sequence[10] = 280 sequence[11] = 341, sequence[12] = 408, sequence[13] = 481 sequence[14] = 560, sequence[15] = 645, sequence[16] = 736 elseif @variant == "9" ; nonagonal numbers sequence[2] = 9, sequence[3] = 24, sequence[4] = 46 sequence[5] = 75, sequence[6] = 111, sequence[7] = 154 sequence[8] = 204, sequence[9] = 261, sequence[10] = 325 sequence[11] = 396, sequence[12] = 474, sequence[13] = 559 sequence[14] = 651, sequence[15] = 750, sequence[16] = 856 elseif @variant == "10" ; decagonal numbers sequence[2] = 10, sequence[3] = 27, sequence[4] = 52 sequence[5] = 85, sequence[6] = 126, sequence[7] = 175 sequence[8] = 232, sequence[9] = 297, sequence[10] = 370 sequence[11] = 451, sequence[12] = 540, sequence[13] = 637 sequence[14] = 742, sequence[15] = 855, sequence[16] = 976 elseif @variant == "11" ; undecagonal numbers sequence[2] = 11, sequence[3] = 30, sequence[4] = 58 sequence[5] = 95, sequence[6] = 141, sequence[7] = 196 sequence[8] = 260, sequence[9] = 333, sequence[10] = 415 sequence[11] = 506, sequence[12] = 606, sequence[13] = 715 sequence[14] = 833, sequence[15] = 960, sequence[16] = 1096 elseif @variant == "12" ; dodecagonal numbers sequence[2] = 12, sequence[3] = 33, sequence[4] = 64 sequence[5] = 105, sequence[6] = 156, sequence[7] = 217 sequence[8] = 288, sequence[9] = 369, sequence[10] = 460 sequence[11] = 561, sequence[12] = 672, sequence[13] = 793 sequence[14] = 924, sequence[15] = 1065, sequence[16] = 1216 endif ; @variant gindex = @seqterms + 1 while gindex < maxterms sequence[gindex] = 0 ; set unused terms to zero gindex = gindex + 1 endwhile ; gindex init: int cindex = int iindex = 0 float xz = float yz = 0.0 float magn = 0.0 complex zpolynom = (0,0) if @innerpixfunc == "ident" #z = #pixel elseif @innerpixfunc == "sin" ; sine function #z = sin(#pixel) elseif @innerpixfunc == "cos" ; cosine #z = cos(#pixel) elseif @innerpixfunc == "tan" ; tangent #z = tan(#pixel) elseif @innerpixfunc == "cot" ; cotangent #z = cotan(#pixel) elseif @innerpixfunc == "sec" ; secant #z = 1/cos(#pixel) elseif @innerpixfunc == "csc" ; cosecant #z = 1/sin(#pixel) elseif @innerpixfunc == "ver" ; versine #z = 1 - cos(#pixel) elseif @innerpixfunc == "vcs" ; vercosine #z = 1 + cos(#pixel) elseif @innerpixfunc == "cvs" ; coversine #z = 1 - sin(#pixel) elseif @innerpixfunc == "cvc" ; covercosine #z = 1 + sin(#pixel) elseif @innerpixfunc == "exs" ; exsecant #z = 1/cos(#pixel) - 1 elseif @innerpixfunc == "exc" ; excosecant #z = 1/sin(#pixel) - 1 elseif @innerpixfunc == "crd" ; chord #z = 2 * sin(#pixel/2) elseif @innerpixfunc == "asin" ; arcsine #z = asin(#pixel - trunc(#pixel)) elseif @innerpixfunc == "acos" ; arccosine #z = acos(#pixel - trunc(#pixel)) elseif @innerpixfunc == "atan" ; arctangent #z = atan(#pixel) elseif @innerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#pixel) elseif @innerpixfunc == "asec" ; arcsecant #z = acos(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "acsc" ; arccosecant #z = asin(1/#pixel - trunc(1/#pixel)) elseif @innerpixfunc == "aver" ; arcversine #z = acos(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "acvs" ; arccoversine #z = asin(1 - #pixel - trunc(1-#pixel)) elseif @innerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #pixel - trunc(1+#pixel)) elseif @innerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#pixel+1)) - trunc( (1/(#pixel+1)) ) ) elseif @innerpixfunc == "acrd" ; arcchord #z = 2 * asin( #pixel/2 - trunc(#pixel/2) ) elseif @innerpixfunc == "exp" ; exponential #z = exp(#pixel) elseif @innerpixfunc == "exp(-pixel)" ; negative exponential #z = exp(-#pixel) elseif @innerpixfunc == "exp(1/pixel)" ; recip exponential #z = exp(1/#pixel) elseif @innerpixfunc == "exp(-1/pixel)" ; neg recip exponential #z = exp(-1/#pixel) elseif @innerpixfunc == "exp(pixel^2)" ; pix^2 exponential #z = exp(sqr(#pixel)) elseif @innerpixfunc == "exp(-pixel^2)" ; -pix^2 exponential #z = exp(-sqr(#pixel)) elseif @innerpixfunc == "exp(1/pixel^2)" ; recip pix^2 exponential #z = exp(1/sqr(#pixel)) elseif @innerpixfunc == "exp(-1/pixel^2)" ; -recip pix^2 exponential #z = exp(-1/sqr(#pixel)) elseif @innerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#pixel) elseif @innerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#pixel) elseif @innerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#pixel) elseif @innerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#pixel) elseif @innerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#pixel) elseif @innerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#pixel) elseif @innerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#pixel) elseif @innerpixfunc == "sqr" ; square #z = sqr(#pixel) elseif @innerpixfunc == "sqrt" ; square root #z = sqrt(#pixel) elseif @innerpixfunc == "power" ; power #z = #pixel^@innerpixpower elseif @innerpixfunc == "log" ; logarithm #z = log(#pixel) elseif @innerpixfunc == "log(-pixel)" ; #z = log(-#pixel) elseif @innerpixfunc == "log(1/pixel)" ; #z = log(1/#pixel) elseif @innerpixfunc == "log(-1/pixel)" ; #z = log(-1/#pixel) elseif @innerpixfunc == "1/pixel" ; reciprocal #z = 1/#pixel elseif @innerpixfunc == "absolute value" ; absolute value #z = abs(#pixel) elseif @innerpixfunc == "conjugation" ; conjugate #z = conj(#pixel) elseif @innerpixfunc == "flip" ; flip #z = flip(#pixel) elseif @innerpixfunc == "ceiling" ; ceiling #z = ceil(#pixel) elseif @innerpixfunc == "floor" ; floor #z = floor(#pixel) elseif @innerpixfunc == "truncation" ; truncation #z = trunc(#pixel) elseif @innerpixfunc == "rounding" ; rounding #z = round(#pixel) elseif @innerpixfunc == "asin 2" ; arcsine #z = asin(#pixel) elseif @innerpixfunc == "acos 2" ; arccosine #z = acos(#pixel) elseif @innerpixfunc == "atan 2" ; arctangent #z = atan2(#pixel) elseif @innerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#pixel) elseif @innerpixfunc == "asec 2" ; arcsecant #z = acos(1/#pixel) elseif @innerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#pixel) elseif @innerpixfunc == "aver 2" ; arcversine #z = acos(1 - #pixel) elseif @innerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #pixel) elseif @innerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #pixel) elseif @innerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #pixel) elseif @innerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#pixel+1))) elseif @innerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#pixel+1))) elseif @innerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #pixel/2 ) elseif @innerpixfunc == "log(pixel^2)" ; #z = log(sqr(#pixel)) elseif @innerpixfunc == "log(-pixel^2)" ; #z = log(-sqr(#pixel)) elseif @innerpixfunc == "log(1/pixel^2)" ; #z = log(1/sqr(#pixel)) elseif @innerpixfunc == "log(-1/pixel^2)" ; #z = log(-1/sqr(#pixel)) elseif @innerpixfunc == "log log" ; #z = log( log(#pixel) ) elseif @innerpixfunc == "exp(exp)" ; #z = exp( exp(#pixel) ) elseif @innerpixfunc == "pixel^pixel" ; #z = #pixel^#pixel elseif @innerpixfunc == "pixel^pixel^pixel" ; #z = #pixel^(#pixel^#pixel) elseif @innerpixfunc == "constant^pixel" ; #z = @pbase^#pixel elseif @innerpixfunc == "constant^pixel^pixel" ; #z = @pbase^(#pixel^#pixel) endif ; @innerpixfunc if @innerpixfunc != "ident" #z = @pixmultiplier1 * #z + @pixoffset1 if @outerpixfunc == "ident" #z = #z elseif @outerpixfunc == "sin" ; sine function #z = sin(#z) elseif @outerpixfunc == "cos" ; cosine #z = cos(#z) elseif @outerpixfunc == "tan" ; tangent #z = tan(#z) elseif @outerpixfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerpixfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerpixfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerpixfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerpixfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerpixfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerpixfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerpixfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerpixfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerpixfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerpixfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerpixfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerpixfunc == "atan" ; arctangent #z = atan(#z) elseif @outerpixfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerpixfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerpixfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerpixfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerpixfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerpixfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerpixfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerpixfunc == "exp" ; exponential #z = exp(#z) elseif @outerpixfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerpixfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerpixfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerpixfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerpixfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerpixfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerpixfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerpixfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerpixfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerpixfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerpixfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerpixfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerpixfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerpixfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerpixfunc == "sqr" ; square #z = sqr(#z) elseif @outerpixfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerpixfunc == "power" ; power #z = #z^@cyclepower elseif @outerpixfunc == "log" ; logarithm #z = log(#z) elseif @outerpixfunc == "log(-z)" ; #z = log(-#z) elseif @outerpixfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerpixfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerpixfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerpixfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerpixfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerpixfunc == "flip" ; flip #z = flip(#z) elseif @outerpixfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerpixfunc == "floor" ; floor #z = floor(#z) elseif @outerpixfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerpixfunc == "rounding" ; rounding #z = round(#z) elseif @outerpixfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerpixfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerpixfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerpixfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerpixfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerpixfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerpixfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerpixfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerpixfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerpixfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerpixfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerpixfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerpixfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerpixfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerpixfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerpixfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerpixfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerpixfunc == "log log" ; #z = log( log(#z) ) elseif @outerpixfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerpixfunc == "z^z" ; #z = #z^#z elseif @outerpixfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerpixfunc == "constant^z" ; #z = @pbase2^#z elseif @outerpixfunc == "constant^z^z" ; #z = @pbase2^(#z^#z) endif ; @outerpixfunc endif ; @innerpixfunc if (@outerpixfunc != "ident") && (@innerpixfunc != "ident") #z = @pixmultiplier2 * #z + @pixoffset2 endif ; (@outerpixfunc loop: if cindex < @cycles cindex = cindex + 1 ; increment cycle index if (@cyclefunc != 0) && @absolute #z = abs(#z) endif ; @cyclefunc if @cyclefunc == "ident" #z = #z elseif @cyclefunc == "sin" ; sine function #z = sin(#z) elseif @cyclefunc == "cos" ; cosine #z = cos(#z) elseif @cyclefunc == "tan" ; tangent #z = tan(#z) elseif @cyclefunc == "cot" ; cotangent #z = cotan(#z) elseif @cyclefunc == "sec" ; secant #z = 1/cos(#z) elseif @cyclefunc == "csc" ; cosecant #z = 1/sin(#z) elseif @cyclefunc == "ver" ; versine #z = 1 - cos(#z) elseif @cyclefunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @cyclefunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @cyclefunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @cyclefunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @cyclefunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @cyclefunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @cyclefunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @cyclefunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @cyclefunc == "atan" ; arctangent #z = atan(#z) elseif @cyclefunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @cyclefunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @cyclefunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @cyclefunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @cyclefunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @cyclefunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @cyclefunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @cyclefunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @cyclefunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @cyclefunc == "exp" ; exponential #z = exp(#z) elseif @cyclefunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @cyclefunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @cyclefunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @cyclefunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @cyclefunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @cyclefunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @cyclefunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @cyclefunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @cyclefunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @cyclefunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @cyclefunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @cyclefunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @cyclefunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @cyclefunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @cyclefunc == "sqr" ; square #z = sqr(#z) elseif @cyclefunc == "sqrt" ; square root #z = sqrt(#z) elseif @cyclefunc == "power" ; power #z = #z^@cyclepower elseif @cyclefunc == "log" ; logarithm #z = log(#z) elseif @cyclefunc == "log(-z)" ; #z = log(-#z) elseif @cyclefunc == "log(1/z)" ; #z = log(1/#z) elseif @cyclefunc == "log(-1/z)" ; #z = log(-1/#z) elseif @cyclefunc == "1/z" ; reciprocal #z = 1/#z elseif @cyclefunc == "absolute value" ; absolute value #z = abs(#z) elseif @cyclefunc == "conjugation" ; conjugate #z = conj(#z) elseif @cyclefunc == "flip" ; flip #z = flip(#z) elseif @cyclefunc == "ceiling" ; ceiling #z = ceil(#z) elseif @cyclefunc == "floor" ; floor #z = floor(#z) elseif @cyclefunc == "truncation" ; truncation #z = trunc(#z) elseif @cyclefunc == "rounding" ; rounding #z = round(#z) elseif @cyclefunc == "asin 2" ; arcsine #z = asin(#z) elseif @cyclefunc == "acos 2" ; arccosine #z = acos(#z) elseif @cyclefunc == "atan 2" ; arctangent #z = atan2(#z) elseif @cyclefunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @cyclefunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @cyclefunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @cyclefunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @cyclefunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @cyclefunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @cyclefunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @cyclefunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @cyclefunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @cyclefunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @cyclefunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @cyclefunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @cyclefunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @cyclefunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @cyclefunc == "log log" ; #z = log( log(#z) ) elseif @cyclefunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @cyclefunc == "z^z" ; #z = #z^#z elseif @cyclefunc == "z^z^z" ; #z = #z^(#z^#z) elseif @cyclefunc == "constant^z" ; #z = @cbase^#z elseif @cyclefunc == "constant^z^z" ; #z = @cbase^(#z^#z) endif ; @cyclefunc iindex = 0 ; reset iterations index if @seqreverse ; and reset sequence index seqindex = @iterations else seqindex = 0 endif ; @seqreverse while iindex < @iterations iindex = iindex + 1 ; increment iteration index if @innerzfunc == "ident" #z = #z elseif @innerzfunc == "sin" ; sine function #z = sin(#z) elseif @innerzfunc == "cos" ; cosine #z = cos(#z) elseif @innerzfunc == "tan" ; tangent #z = tan(#z) elseif @innerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @innerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @innerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @innerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @innerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @innerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @innerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @innerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @innerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @innerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @innerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @innerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @innerzfunc == "atan" ; arctangent #z = atan(#z) elseif @innerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @innerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @innerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @innerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @innerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @innerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @innerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @innerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @innerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @innerzfunc == "exp" ; exponential #z = exp(#z) elseif @innerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @innerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @innerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @innerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @innerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @innerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @innerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @innerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @innerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @innerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @innerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @innerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @innerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @innerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @innerzfunc == "sqr" ; square #z = sqr(#z) elseif @innerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @innerzfunc == "power" ; power #z = #z^@innerzpower elseif @innerzfunc == "log" ; logarithm #z = log(#z) elseif @innerzfunc == "log(-z)" ; #z = log(-#z) elseif @innerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @innerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @innerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @innerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @innerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @innerzfunc == "flip" ; flip #z = flip(#z) elseif @innerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @innerzfunc == "floor" ; floor #z = floor(#z) elseif @innerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @innerzfunc == "rounding" ; rounding #z = round(#z) elseif @innerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @innerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @innerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @innerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @innerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @innerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @innerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @innerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @innerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @innerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @innerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @innerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @innerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @innerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @innerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @innerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @innerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @innerzfunc == "log log" ; #z = log( log(#z) ) elseif @innerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @innerzfunc == "z^z" ; #z = #z^#z elseif @innerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @innerzfunc == "constant^z" ; #z = @izbase^#z elseif @innerzfunc == "constant^z^z" ; #z = @izbase^(#z^#z) endif ; @innerzfunc if @innerzfunc != "ident" #z = @izmultiplier * #z + @izoffset if @outerzfunc == "ident" #z = #z elseif @outerzfunc == "sin" ; sine function #z = sin(#z) elseif @outerzfunc == "cos" ; cosine #z = cos(#z) elseif @outerzfunc == "tan" ; tangent #z = tan(#z) elseif @outerzfunc == "cot" ; cotangent #z = cotan(#z) elseif @outerzfunc == "sec" ; secant #z = 1/cos(#z) elseif @outerzfunc == "csc" ; cosecant #z = 1/sin(#z) elseif @outerzfunc == "ver" ; versine #z = 1 - cos(#z) elseif @outerzfunc == "vcs" ; vercosine #z = 1 + cos(#z) elseif @outerzfunc == "cvs" ; coversine #z = 1 - sin(#z) elseif @outerzfunc == "cvc" ; covercosine #z = 1 + sin(#z) elseif @outerzfunc == "exs" ; exsecant #z = 1/cos(#z) - 1 elseif @outerzfunc == "exc" ; excosecant #z = 1/sin(#z) - 1 elseif @outerzfunc == "crd" ; chord #z = 2 * sin(#z/2) elseif @outerzfunc == "asin" ; arcsine #z = asin(#z - trunc(#z)) elseif @outerzfunc == "acos" ; arccosine #z = acos(#z - trunc(#z)) elseif @outerzfunc == "atan" ; arctangent #z = atan(#z) elseif @outerzfunc == "acot" ; arccotangent #z = halfpi - atan(#z) elseif @outerzfunc == "asec" ; arcsecant #z = acos(1/#z - trunc(1/#z)) elseif @outerzfunc == "acsc" ; arccosecant #z = asin(1/#z - trunc(1/#z)) elseif @outerzfunc == "aver" ; arcversine #z = acos(1 - #z - trunc(1-#z)) elseif @outerzfunc == "avcs" ; arcvercosine #z = acos(1 + #z - trunc(1+#z)) elseif @outerzfunc == "acvs" ; arccoversine #z = asin(1 - #z - trunc(1-#z)) elseif @outerzfunc == "acvc" ; arccovercosine #z = asin(1 + #z - trunc(1+#z)) elseif @outerzfunc == "aexs" ; arcexsecant #z = acos( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "aexc" ; arcexcosecant #z = asin( (1/(#z+1)) - trunc( (1/(#z+1)) ) ) elseif @outerzfunc == "acrd" ; arcchord #z = 2 * asin( #z/2 - trunc(#z/2) ) elseif @outerzfunc == "exp" ; exponential #z = exp(#z) elseif @outerzfunc == "exp(-z)" ; negative exponential #z = exp(-#z) elseif @outerzfunc == "exp(1/z)" ; recip exponential #z = exp(1/#z) elseif @outerzfunc == "exp(-1/z)" ; neg recip exponential #z = exp(-1/#z) elseif @outerzfunc == "exp(z^2)" ; z^2 exponential #z = exp(sqr(#z)) elseif @outerzfunc == "exp(-z^2)" ; -z^2 exponential #z = exp(-sqr(#z)) elseif @outerzfunc == "exp(1/z^2)" ; recip z^2 exponential #z = exp(1/sqr(#z)) elseif @outerzfunc == "exp(-1/z^2)" ; -recip z^2 exponential #z = exp(-1/sqr(#z)) elseif @outerzfunc == "sinh" ; hyperbolic sine #z = sinh(#z) elseif @outerzfunc == "asinh" ; inverse hyperbolic sine #z = asinh(#z) elseif @outerzfunc == "cosh" ; hyperbolic cosine #z = cosh(#z) elseif @outerzfunc == "acosh" ; inverse hyperbolic cosine #z = acosh(#z) elseif @outerzfunc == "tanh" ; hyperbolic tangent #z = tanh(#z) elseif @outerzfunc == "atanh" ; inverse hyperbolic tangent #z = atanh(#z) elseif @outerzfunc == "cotanh" ; hyperbolic cotangent #z = cotanh(#z) elseif @outerzfunc == "sqr" ; square #z = sqr(#z) elseif @outerzfunc == "sqrt" ; square root #z = sqrt(#z) elseif @outerzfunc == "power" ; power #z = #z^@outerzpower elseif @outerzfunc == "log" ; logarithm #z = log(#z) elseif @outerzfunc == "log(-z)" ; #z = log(-#z) elseif @outerzfunc == "log(1/z)" ; #z = log(1/#z) elseif @outerzfunc == "log(-1/z)" ; #z = log(-1/#z) elseif @outerzfunc == "1/z" ; reciprocal #z = 1/#z elseif @outerzfunc == "absolute value" ; absolute value #z = abs(#z) elseif @outerzfunc == "conjugation" ; conjugate #z = conj(#z) elseif @outerzfunc == "flip" ; flip #z = flip(#z) elseif @outerzfunc == "ceiling" ; ceiling #z = ceil(#z) elseif @outerzfunc == "floor" ; floor #z = floor(#z) elseif @outerzfunc == "truncation" ; truncation #z = trunc(#z) elseif @outerzfunc == "rounding" ; rounding #z = round(#z) elseif @outerzfunc == "asin 2" ; arcsine #z = asin(#z) elseif @outerzfunc == "acos 2" ; arccosine #z = acos(#z) elseif @outerzfunc == "atan 2" ; arctangent #z = atan2(#z) elseif @outerzfunc == "acot 2" ; arccotangent #z = halfpi - atan2(#z) elseif @outerzfunc == "asec 2" ; arcsecant #z = acos(1/#z) elseif @outerzfunc == "acsc 2" ; arccosecant #z = asin(1/#z) elseif @outerzfunc == "aver 2" ; arcversine #z = acos(1 - #z) elseif @outerzfunc == "avcs 2" ; arcvercosine #z = acos(1 + #z) elseif @outerzfunc == "acvs 2" ; arccoversine #z = asin(1 - #z) elseif @outerzfunc == "acvc 2" ; arccovercosine #z = asin(1 + #z) elseif @outerzfunc == "aexs 2" ; arcexsecant #z = acos( (1/(#z+1))) elseif @outerzfunc == "aexc 2" ; arcexcosecant #z = asin( (1/(#z+1))) elseif @outerzfunc == "acrd 2" ; arcchord #z = 2 * asin( #z/2 ) elseif @outerzfunc == "log(z^2)" ; #z = log(sqr(#z)) elseif @outerzfunc == "log(-z^2)" ; #z = log(-sqr(#z)) elseif @outerzfunc == "log(1/z^2)" ; #z = log(1/sqr(#z)) elseif @outerzfunc == "log(-1/z^2)" ; #z = log(-1/sqr(#z)) elseif @outerzfunc == "log log" ; #z = log( log(#z) ) elseif @outerzfunc == "exp(exp)" ; #z = exp( exp(#z) ) elseif @outerzfunc == "z^z" ; #z = #z^#z elseif @outerzfunc == "z^z^z" ; #z = #z^(#z^#z) elseif @outerzfunc == "constant^z" ; #z = @ozbase^#z elseif @outerzfunc == "constant^z^z" ; #z = @ozbase^(#z^#z) endif ; @outerzfunc if @outerzfunc != "ident" #z = @ozmultiplier * #z + @ozoffset endif ; @outerzfunc endif ; @innerzfunc xz = real(#z) yz = imag(#z) magn = xz^@xpower + yz^@ypower xz = xz/magn + real(@xyoffset) yz = yz/magn + imag(@xyoffset) #z = xz + flip(yz) if @seqmode == "coefficient" ; use sequence members as coefficients of polynomial terms if @seqalternate if @seqreverse zpolynom = sequence[0]* #z^16 - sequence[1]* #z^15 + sequence[2]* #z^14 - \ sequence[3]* #z^13 + sequence[4]* #z^12 - sequence[5]* #z^11 + sequence[6]* \ #z^10 - sequence[7]* #z^9 + sequence[8]* #z^8 - sequence[9]* #z^7 +\ sequence[10]* #z^6 - sequence[11]* #z^5 + sequence[12]* #z^4 - \ sequence[13]* #z^3 + sequence[14]* sqr(#z) - sequence[15]* #z + sequence[16] else ; do not reverse sequence of polynomial terms zpolynom = sequence[0] - sequence[1]* #z + sequence[2]* sqr(#z) - sequence[3]* #z^3 \ + sequence[4]* #z^4 - sequence[5]* #z^5 + sequence[6]* #z^6 - sequence[7]* \ #z^7 + sequence[8]* #z^8 - sequence[9]* #z^9 + sequence[10]* #z^10 - \ sequence[11]* #z^11 + sequence[12]* #z^12 - sequence[13]* #z^13 + \ sequence[14]* #z^14 - sequence[15]* #z^15 + sequence[16]* #z^16 endif ; @seqreverse ;!!!!! else ; do not alternate sign of polynomial terms if @seqreverse zpolynom = sequence[0]* #z^16 + sequence[1]* #z^15 + sequence[2]* #z^14 + \ sequence[3]* #z^13 + sequence[4]* #z^12 + sequence[5]* #z^11 + sequence[6]* \ #z^10 + sequence[7]* #z^9 + sequence[8]* #z^8 + sequence[9]* #z^7 +\ sequence[10]* #z^6 + sequence[11]* #z^5 + sequence[12]* #z^4 + \ sequence[13]* #z^3 + sequence[14]* sqr(#z) + sequence[15]* #z + sequence[16] else ; do not reverse sequence of polynomial terms zpolynom = sequence[0] + sequence[1]* #z + sequence[2]* sqr(#z) + sequence[3]* #z^3 \ + sequence[4]* #z^4 + sequence[5]* #z^5 + sequence[6]* #z^6 + sequence[7]* \ #z^7 + sequence[8]* #z^8 + sequence[9]* #z^9 + sequence[10]* #z^10 + \ sequence[11]* #z^11 + sequence[12]* #z^12 + sequence[13]* #z^13 + \ sequence[14]* #z^14 + sequence[15]* #z^15 + sequence[16]* #z^16 endif ; @seqreverse endif ; @seqalternate ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! elseif @seqmode == "exponent" ; use sequence members as exponents of polynomial terms if @seqalternate if @seqreverse zpolynom = #z^sequence[0] - #z^sequence[1] + #z^sequence[2] - #z^sequence[3] \ + #z^sequence[4] - #z^sequence[5] + #z^sequence[6] - #z^sequence[7] \ + #z^sequence[8] - #z^sequence[9] + #z^sequence[10] - \ #z^sequence[11] + #z^sequence[12] - #z^sequence[13] + \ #z^sequence[14] - #z^sequence[15] + #z^sequence[16] else ; do not reverse sequence of polynomial terms zpolynom = #z^sequence[0] - #z^sequence[1] + #z^sequence[2] - #z^sequence[3] \ + #z^sequence[4] - #z^sequence[5] + #z^sequence[6] - #z^sequence[7] \ + #z^sequence[8] - #z^sequence[9] + #z^sequence[10] - \ #z^sequence[11] + #z^sequence[12] - #z^sequence[13] + \ #z^sequence[14] - #z^sequence[15] + #z^sequence[16] endif ; @seqreverse ;!!!!! else ; do not alternate sign of polynomial terms if @seqreverse zpolynom = #z^sequence[0] + #z^sequence[1] + #z^sequence[2] + #z^sequence[3] \ + #z^sequence[4] + #z^sequence[5] + #z^sequence[6] + #z^sequence[7] \ + #z^sequence[8] + #z^sequence[9] + #z^sequence[10] + \ #z^sequence[11] + #z^sequence[12] + #z^sequence[13] + \ #z^sequence[14] + #z^sequence[15] + #z^sequence[16] else ; do not reverse sequence of polynomial terms zpolynom = #z^sequence[0] + #z^sequence[1] + #z^sequence[2] + #z^sequence[3] \ + #z^sequence[4] + #z^sequence[5] + #z^sequence[6] + #z^sequence[7] \ + #z^sequence[8] + #z^sequence[9] + #z^sequence[10] + \ #z^sequence[11] + #z^sequence[12] + #z^sequence[13] + \ #z^sequence[14] + #z^sequence[15] + #z^sequence[16] endif ; @seqreverse endif ; @seqalternate endif ; @seqmode if @lvariant == "log" #z = @zmultiplier * log(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "sqrt" #z = @zmultiplier * sqrt(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "power" #z = @zmultiplier * (abs(zpolynom)^@lpower)^@zpower + @zoffset elseif @lvariant == "labs" if imag(zpolynom) < 0 #z = conj(zpolynom) endif ; imag #z = @zmultiplier * log(zpolynom)^@zpower + @zoffset elseif @lvariant == "sine" #z = @zmultiplier * sin(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log sine" #z = @zmultiplier * log(abs(sin(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip abs" #z = @zmultiplier * (abs(zpolynom) + (1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "recip log 2" #z = @zmultiplier * (log(log(abs(zpolynom))) + log(1/abs(zpolynom)))^@zpower + @zoffset elseif @lvariant == "log log" #z = @zmultiplier * log(abs(log(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "recip log" #z = @zmultiplier * log(1/abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "atan" #z = @zmultiplier * atan(abs(zpolynom))^@zpower + @zoffset elseif @lvariant == "log atan" #z = @zmultiplier * log(abs(atan(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log sqrt" #z = @zmultiplier * log(abs(sqrt(abs(zpolynom))))^@zpower + @zoffset elseif @lvariant == "log power" #z = @zmultiplier * log(abs(abs(zpolynom)^@lpower))^@zpower + @zoffset endif ; @lvariant endwhile ; iindex endif ; cindex #z = zadjust * #z bailout: |z|<@bail default: title = "PolySequence Polygonal" center = (0.001, 0.001) magn = 0.25 method = multipass periodicity = 0 maxiter = 500 param variant caption = "Sequence Variant" enum = "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" default = 3 hint = "This setting selects which polygonal number sequence to iterate. \ '3' = triangular numbers, '4' = square numbers, etc." endparam param seqterms caption = "Number of Terms" default = 5 min = 2 max = 16 hint = "This parameter determines how many terms from the defining sequence \ 'Sequence Variant' are used to build the iterated polynomial (2-16)." endparam param seqmode caption = "Sequence Mode" enum = "coefficient" "exponent" default = 0 hint = "'coefficient' means that the sequence members are used as coefficients \ of a polynomial in successive powers of #z; 'exponent' means that the \ polynomial is constructed using terms based on #z^sequence member." endparam param seqalternate caption = "Alternate Terms?" default = FALSE hint = "If enabled, the terms of the polynomial alternate in sign." endparam param seqreverse caption = "Reverse Terms?" default = FALSE hint = "If enabled, the sequence is applied to the terms of the polynomial \ in reverse order." visible = @seqmode == "coefficient" endparam param innerpixfunc caption = "Inner Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-pixel)" "exp(1/pixel)" \ "exp(-1/pixel)" "exp(pixel^2)" "exp(-pixel^2)" "exp(1/pixel^2)" "exp(-1/pixel^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-pixel)" "log(1/pixel)" "log(-1/pixel)" "1/pixel" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(pixel^2)" "log(-pixel^2)" "log(1/pixel^2)" "log(-1/pixel^2)" "log log" \ "exp(exp)" "pixel^pixel" "pixel^pixel^pixel" "constant^pixel" "constant^pixel^pixel" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed BEFORE 'Outer Pixel Function'." endparam param innerpixpower caption = "Inner Pixel Exponent" default = (3,0) hint = "If the 'Inner Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = @innerpixfunc == "power" endparam param pbase caption = "Pixel Base" default = (2,0) hint = "If the 'Inner Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc == "constant^pixel") || (@innerpixfunc == \ "constant^pixel^pixel") endparam param pixmultiplier1 caption = "Pixel Multiplier 1" default = (1,0) hint = "This constant is multiplied by the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param pixoffset1 caption = "Pixel Offset 1" default = (0,0) hint = "This constant is added to the #pixel value after the inner pixel function." visible = @innerpixfunc != "ident" endparam param outerpixfunc caption = "Outer Pixel Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "Before any iterations, the #pixel value is modified by this \ function. This function is executed AFTER 'Inner Pixel Function'." visible = @innerpixfunc != "ident" endparam param outerpixpower caption = "Outer Pixel Exponent" default = (3,0) hint = "If the 'Outer Pixel Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerpixfunc != "ident") && (@outerpixfunc == "power") endparam param pbase2 caption = "Outer Pixel Base" default = (2,0) hint = "If the 'Outer Pixel Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerpixfunc != "ident") && ((@outerpixfunc == "constant^z") || \ (@outerpixfunc == "constant^z^z")) endparam param pixmultiplier2 caption = "Pixel Multiplier 2" default = (1,0) hint = "This constant is multiplied by the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param pixoffset2 caption = "Pixel Offset 2" default = (0,0) hint = "This constant is added to the #pixel value after the outer pixel function, \ prior to the iteration loops." visible = (@innerpixfunc != "ident") && (@outerpixfunc != "ident") endparam param cycles caption = "Cycles per Loop" default = 1 min = 1 hint = "This parameter determines how many iterations of #z are affected by \ the 'Variant' equation." endparam param cyclefunc caption = "Cycle Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "This parameter chooses an optional function that is iterated \ once each cycle." endparam param cbase caption = "Cycle Base" default = (4,0) hint = "If the 'Cycle Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@cyclefunc == "constant^z") || (@cyclefunc == \ "constant^z^z") endparam param absolute caption = "Absolute Value?" default = FALSE hint = "If enabled, the 'Cycle Function' uses the absolute value of #z." visible = @cyclefunc != 0 endparam param cyclepower caption = "Cycle Exponent" default = (3,0) hint = "If the 'Cycle Function' is set to 'power', then this is the \ exponent that is used." visible = @cyclefunc == "power" endparam param iterations caption = "Iterations per Cycle" default = 3 min = 1 max = 16 hint = "During each of the #z iterations set by param 'Number of Cycles', #z is \ iterated through the 'Variant' equation this many times." endparam param innerzfunc caption = "Inner Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this \ function. This function is executed BEFORE 'Outer Z Function'." endparam param innerzpower caption = "Inner Z Exponent" default = (3,0) hint = "If the 'Inner Z Function' is set to 'power', then this is the \ exponent that is used." visible = @innerzfunc == "power" endparam param izbase caption = "Inner Z Base" default = (4,0) hint = "If the 'Inner Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc == "constant^z") || (@innerzfunc == \ "constant^z^z") endparam param izmultiplier caption = "Inner Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param izoffset caption = "Inner Z Offset" default = (0,0) hint = "This constant is added to #z value after the inner #z function." visible = @innerzfunc != "ident" endparam param outerzfunc caption = "Outer Z Function" enum = "ident" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-z)" "exp(1/z)" \ "exp(-1/z)" "exp(z^2)" "exp(-z^2)" "exp(1/z^2)" "exp(-1/z^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-z)" "log(1/z)" "log(-1/z)" "1/z" "absolute value" "conjugation" \ "flip" "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(z^2)" "log(-z^2)" "log(1/z^2)" "log(-1/z^2)" "log log" \ "exp(exp)" "z^z" "z^z^z" "constant^z" "constant^z^z" default = 0 hint = "During the iterations, the #z value is modified by this function. \ This function is executed AFTER 'Inner Z Function'." visible = @innerzfunc != "ident" endparam param outerzpower caption = "Outer Z Exponent" default = (3,0) hint = "If the 'Outer Z Function' is set to 'power', then this is the \ exponent that is used." visible = (@innerzfunc != "ident") && (@outerzfunc == "power") endparam param ozbase caption = "Outer Z Base" default = (4,0) hint = "If the 'Outer Z Function' is set to 'constant^z' or 'constant^z^z', \ then this is the constant that is used." visible = (@innerzfunc != "ident") && ((@outerzfunc == "constant^z") || \ (@outerzfunc == "constant^z^z")) endparam param ozmultiplier caption = "Outer Z Multiplier" default = (1,0) hint = "This constant is multiplied by #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param ozoffset caption = "Outer Z Offset" default = (0,0) hint = "This constant is added to #z value after the outer #z function." visible = (@innerzfunc != "ident") && (@outerzfunc != "ident") endparam param xpower caption = "X Exponent" default = 2.0 hint = "Real(z) is raised to this power for calculation \ of the magnitude." endparam param ypower caption = "Y Exponent" default = 2.0 hint = "Imag(z) is raised to this power for calculation \ of the magnitude." endparam param xyoffset caption = "XY Offset" default = (0,0) hint = "The real part of this parameter is added to real(z), the imaginary \ part to imag(z)." endparam param lvariant caption = "Labs Function" enum = "log" "sqrt" "log sqrt" "power" "log power" "labs" "sine" "log sine"\ "log log" "recip log" "recip log 2" "recip abs" "atan" "log atan" default = 0 hint = "This setting how the polynomial iteration is processed." endparam param lpower caption = "Labs Exponent" default = (0.25,0) hint = "If 'Labs Function' is set to 'power', then this parameter \ is the exponent that is used." visible = (@lvariant == "power") || (@lvariant == "log power") endparam param zpower caption = "Z Exponent" default = (1,0) hint = "The 'Polynomial Variant' expression is raised to this power before \ modification by the 'Z Multiplier' and 'Z Offset'." endparam param zmultiplier caption = "Z Multiplier" default = (1,0) hint = "This value is multiplied by the equation selected by parameter \ 'Variant' during each iteration." endparam param zoffset caption = "Z Offset" default = (0,0) hint = "This value is added to the equation selected by parameter 'Variant' \ during each iteration." endparam param zadjustment caption = "Z Adjustment" default = 102.0 hint = "This setting affects how many total #z iterations are executed." endparam param bail caption = "Bailout" default = 1e7 hint = "This setting determines when the iteration of #z ends." endparam } jam-UnityRootBarnsley { ; jam 12/20/2018 ; Based on variations of the traditional Barnsley formulas. ; Some ideas from Michèle Dessureault, Ed Algra, Sam Monnier, and many others. ; The complex plane is divided into N sectors defined by the Nth roots of unity. ; Variant equations are executed each loop, determined by which sector contains ; the current #z value. global: ; maxroots = 4 ; set to maximum number of roots of unity - 1, since root (1,0) is never used float twopi = 2 * #pi float degconversion = twopi/360 float unityroots[4] ; dimension to size maxroots ; Constants for CCW and CW rotations complex rotation90 = exp(1i * #pi / 2) complex rotation180 = exp(1i * #pi) complex rotation270 = exp(1i * 3 * #pi / 2) ; If a global rotation for the sectors has been given, calculate that now float rotation = @rotate * degconversion if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation int glindex = int glindex2 = 0 ; loop indices for the global section int tempint = 0 ; Store the boundary values for the various sectors tempint = @numberofroots - 1 while glindex < tempint glindex2 = glindex + 1 unityroots[glindex] = glindex2 * twopi / @numberofroots + rotation glindex = glindex + 1 endwhile ; glindex init: complex juliaconst = (0,0) bool dontbail = TRUE float tempfloat = float tempfloat2 = float tempx = float tempy = 0.0 float zangle = float zangletemp = 0.0 complex z1 = complex z2 = (0,0) if @mandy #z = #pixel, juliaconst = #pixel else ; Julia #z = #pixel, juliaconst = @jconstant endif loop: zangle = atan2(#z) if zangle < 0 zangle = zangle + twopi endif ; zangle if @numberofroots == 2 if @barnsleytype2 == "1" if zangle <= unityroots[0] && zangle > rotation ; default is upper half-plane (when no rotation) #z = (#z - flip(1)+ @barnconst1) * juliaconst else ; lower half-plane #z = (#z + flip(1) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "2" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (#z - 1 + @barnconst1) * juliaconst else ; lower half-plane #z = (#z + 1 + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "3" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = #z * juliaconst - 1 + @barnconst1 else ; lower half-plane #z = #z * juliaconst + 1 + @barnconst2 endif ; zangle elseif @barnsleytype2 == "4" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = #z * juliaconst - (0,1) + @barnconst1 else ; lower half-plane #z = #z * juliaconst + (0,1) + @barnconst2 endif ; zangle elseif @barnsleytype2 == "5" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (sqr(#z) - (0,1) + @barnconst1) * juliaconst else ; lower half-plane #z = (sqr(#z) + (0,1) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "6" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (sqr(#z) - 1 + @barnconst1) * juliaconst else ; lower half-plane #z = (sqr(#z) + 1 + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "7" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = sqr(#z) * juliaconst - (0,1) + @barnconst1 else ; lower half-plane #z = sqr(#z) * juliaconst + (0,1) + @barnconst2 endif ; zangle elseif @barnsleytype2 == "8" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = sqr(#z) * juliaconst - 1 + @barnconst1 else ; lower half-plane #z = sqr(#z) * juliaconst + 1 + @barnconst2 endif ; zangle elseif @barnsleytype2 == "9" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (#z - 1 + @barnconst1) * juliaconst else ; lower half-plane #z = (#z + 1 + @barnconst2) * conj(juliaconst) endif ; zangle elseif @barnsleytype2 == "10" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (#z - 1 + @barnconst1) * juliaconst else ; lower half-plane #z = (#z + 1 + @barnconst2) * flip(juliaconst) endif ; zangle elseif @barnsleytype2 == "11" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (#z - (0,1) + @barnconst1) * juliaconst else ; lower half-plane #z = (#z + (0,1) + @barnconst2) * conj(juliaconst) endif ; zangle elseif @barnsleytype2 == "12" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (#z - (0,1) + @barnconst1) * juliaconst else ; lower half-plane #z = (#z + (0,1) + @barnconst2) * flip(juliaconst) endif ; zangle elseif @barnsleytype2 == "13" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (#z - (0,1) + @barnconst1) / juliaconst else ; lower half-plane #z = (#z + (0,1) + @barnconst2) / juliaconst endif ; zangle elseif @barnsleytype2 == "14" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (#z - 1 + @barnconst1) / juliaconst else ; lower half-plane #z = (#z + 1 + @barnconst2) / juliaconst endif ; zangle elseif @barnsleytype2 == "15" tempfloat = 0.5 * real(#z) tempfloat2 = 0.5 * imag(#z) if zangle <= unityroots[0] && zangle > rotation ; upper half-plane tempx = tempfloat - tempfloat2 tempy = tempfloat + tempfloat2 #z = (tempx + flip(tempy) + @barnconst1) * juliaconst else ; lower half-plane tempx = -tempfloat - tempfloat2 + 1 tempy = tempfloat - tempfloat2 #z = (tempx + flip(tempy) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "16" tempfloat = 0.5 * real(#z) tempfloat2 = 0.5 * imag(#z) if zangle <= unityroots[0] && zangle > rotation ; upper half-plane tempx = tempfloat - tempfloat2 tempy = tempfloat + tempfloat2 #z = (tempx + flip(tempy) + @barnconst1) * real(juliaconst) else ; lower half-plane tempx = -tempfloat - tempfloat2 + 1 tempy = tempfloat - tempfloat2 #z = (tempx + flip(tempy) + @barnconst2) * flip(imag(juliaconst)) endif ; zangle elseif @barnsleytype2 == "17" tempfloat = real(#z) tempfloat2 = imag(#z) if zangle <= unityroots[0] && zangle > rotation ; upper half-plane tempx = 2 * tempfloat tempy = 0.5 * tempfloat2 #z = (tempx + flip(tempy) + @barnconst1) * juliaconst else ; lower half-plane tempx = 2 * (1 - tempfloat) tempy = 1 - 0.5 * tempfloat2 #z = (tempx + flip(tempy) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "18" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = (@barnsleymult * #z - (0,1) + @barnconst1) * juliaconst else ; lower half-plane #z = ((0,1) - @barnsleymult * #z + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "19" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ( (#z - 1) * log(#z) + @barnconst1) * juliaconst else ; lower half-plane #z = ( (#z + 1) * log(#z) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "20" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ( (#z - (0,1)) * log(#z) + @barnconst1) * juliaconst else ; lower half-plane #z = ( (#z + (0,1)) * log(#z) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "21" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ( #z * log(#z-1) + @barnconst1) * juliaconst else ; lower half-plane #z = ( #z * log(#z+1) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "22" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ( #z * log(#z-(0,1)) + @barnconst1) * juliaconst else ; lower half-plane #z = ( #z * log(#z+(0,1)) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "23" if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ( #z * rotation90 + @barnconst1) * juliaconst ; counterclockwise rotation 90 else ; lower half-plane ; clockwise rotation by 90 #z = ( #z * rotation270 + @barnconst2) * juliaconst ; CW rotation endif ; zangle elseif @barnsleytype2 == "24" if zangle <= unityroots[0] && zangle > rotation ; x-axis reflection #z = ( (real(#z) + flip(-imag(#z))) + @barnconst1) * juliaconst ; else ; lower half-plane ; CCW rotation by 90 #z = ( #z * rotation90 + @barnconst2) * juliaconst ; endif ; zangle elseif @barnsleytype2 == "25" if zangle <= unityroots[0] && zangle > rotation ; y-axis reflection #z = ( (-real(#z) + flip(imag(#z))) + @barnconst1) * juliaconst ; else ; lower half-plane ; CCW rotation by 90 #z = ( #z * rotation90 + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "26" z1 = #z ; save current z if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ( #z * rotation90 + z1 + @barnconst1) * juliaconst else ; lower half-plane ; clockwise rotation by 90 #z = ( #z * rotation270 - z1 + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "27" z2 = z1 ; save previous z z1 = #z ; save current z if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ( #z * rotation90 + z1 + @barnconst1) * juliaconst else ; lower half-plane ; clockwise rotation by 90 #z = ( #z * rotation270 + z2 + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype2 == "28" ; rotation by 180 degrees ; tempfloat = #pi + (real(#z) % twopi) ; tempfloat2 = #pi + (imag(#z) % twopi) tempfloat = cabs(#z) % twopi tempfloat2 = -tempfloat if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ((#z + @barnconst1 + 0.25) * exp(1.0i * tempfloat)) * juliaconst else ; lower half-plane #z = ((#z + @barnconst2 - 0.25) * exp(1.0i * tempfloat2)) * juliaconst endif ; zangle elseif @barnsleytype2 == "29" ; rotation by 180 degrees ; tempfloat = cabs(#z) % twopi ; tempfloat2 = -tempfloat if zangle <= unityroots[0] && zangle > rotation ; upper half-plane #z = ((#z - (0,1)) * exp(1.0i * #pi) + @barnconst1) * juliaconst else ; lower half-plane #z = ((#z + (0,1)) * exp(1.0i * #pi) + @barnconst2) * juliaconst endif ; zangle endif ; @barnsleytype2 elseif @numberofroots == 3 if @barnsleytype3 == "1" if zangle <= unityroots[0] && zangle > rotation ; default, #z is in first 120-degree sector #z = (#z - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + 1 + @barnconst2) * juliaconst else ; third sector #z = (#z + flip(1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "2" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + (0,1) + @barnconst2) * juliaconst else ; third sector #z = (#z + 1 + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "3" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (sqr(#z) - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (sqr(#z) + 1 + @barnconst2) * juliaconst else ; third sector #z = (sqr(#z) + flip(1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "4" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (sqr(#z) - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (sqr(#z) + (0,1) + @barnconst2) * juliaconst else ; third sector #z = (sqr(#z) + 1 + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "5" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + @barnconst2) * juliaconst else ; third sector #z = (#z + flip(1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "6" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + @barnconst2) * juliaconst else ; third sector #z = (#z + 1 + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "7" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (sqr(#z) - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (sqr(#z) + @barnconst2) * juliaconst else ; third sector #z = (sqr(#z) + flip(1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "8" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (sqr(#z) - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (sqr(#z) + @barnconst2) * juliaconst else ; third sector #z = (sqr(#z) + 1 + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "9" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + @barnconst2) * conj(juliaconst) else ; third sector #z = (#z + flip(1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "10" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + @barnconst2) * conj(juliaconst) else ; third sector #z = (#z + 1 + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "11" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + @barnconst2) * flip(juliaconst) else ; third sector #z = (#z + flip(1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "12" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + @barnconst2) * flip(juliaconst) else ; third sector #z = (#z + 1 + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "13" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + 1 + @barnconst2) * conj(juliaconst) else ; third sector #z = (#z + flip(1) + @barnconst3) * flip(juliaconst) endif ; zangle elseif @barnsleytype3 == "14" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + (0,1) + @barnconst2) * conj(juliaconst) else ; third sector #z = (#z + 1 + @barnconst3) * flip(juliaconst) endif ; zangle elseif @barnsleytype3 == "15" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - flip(1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + 1 + @barnconst2) / juliaconst else ; third sector #z = (#z + flip(1) + @barnconst3) * flip(juliaconst) endif ; zangle elseif @barnsleytype3 == "16" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + (0,1) + @barnconst2) / juliaconst else ; third sector #z = (#z + 1 + @barnconst3) * conj(juliaconst) endif ; zangle elseif @barnsleytype3 == "17" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (conj(#z) + 1 + @barnconst2) * juliaconst else ; third sector #z = (#z + (0,1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "18" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (flip(#z) + 1 + @barnconst2) * juliaconst else ; third sector #z = (#z + (0,1) + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "19" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (conj(#z) + 1 + @barnconst2) * juliaconst else ; third sector #z = (#z + 1 + @barnconst3) * juliaconst endif ; zangle elseif @barnsleytype3 == "20" if zangle <= unityroots[0] && zangle > rotation ; #z is in first 120-degree sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (flip(#z) + 1 + @barnconst2) * juliaconst else ; third sector #z = (#z + 1 + @barnconst3) * juliaconst endif ; zangle endif ; @barnsleytype3 elseif @numberofroots == 4 if @barnsleytype4 == "1" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z + (-1,-1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (#z + (1,-1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (#z + (1,1) + @barnconst3) * juliaconst else ; fourth quadrant #z = (#z + (-1,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "2" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (sqr(#z) + (-1,-1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (sqr(#z) + (1,-1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (sqr(#z) + (1,1) + @barnconst3) * juliaconst else ; fourth quadrant #z = (sqr(#z) + (-1,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "3" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z * juliaconst) + (-1,-1) + @barnconst1 elseif zangle <= unityroots[1] ; second quadrant #z = (#z * juliaconst) + (1,-1) + @barnconst2 elseif zangle <= unityroots[2] ; third quadrant #z = (#z * juliaconst) + (1,1) + @barnconst3 else ; fourth quadrant #z = (#z * juliaconst) + (-1,1) + @barnconst4 endif ; zangle elseif @barnsleytype4 == "4" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (sqr(#z) * juliaconst) + (-1,-1) + @barnconst1 elseif zangle <= unityroots[1] ; second quadrant #z = (sqr(#z) * juliaconst) + (1,-1) + @barnconst2 elseif zangle <= unityroots[2] ; third quadrant #z = (sqr(#z) * juliaconst) + (1,1) + @barnconst3 else ; fourth quadrant #z = (sqr(#z) * juliaconst) + (-1,1) + @barnconst4 endif ; zangle elseif @barnsleytype4 == "5" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (conj(#z) - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (#z + (0,1) + @barnconst3) * juliaconst else ; fourth quadrant #z = (conj(#z) + (0,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "6" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (conj(#z) + 1 + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (#z + 1 + @barnconst3) * juliaconst else ; fourth quadrant #z = (conj(#z) - 1 + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "7" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (flip(#z) - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (#z + (0,1) + @barnconst3) * juliaconst else ; fourth quadrant #z = (flip(#z) + (0,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "8" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (flip(#z) + 1 + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (#z + 1 + @barnconst3) * juliaconst else ; fourth quadrant #z = (flip(#z) - 1 + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "9" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (conj(#z) - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (conj(#z) + (0,1) + @barnconst3) * juliaconst else ; fourth quadrant #z = (#z + (0,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "10" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (conj(#z) - 1 + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (conj(#z) + 1 + @barnconst3) * juliaconst else ; fourth quadrant #z = (#z + 1 + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "11" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (flip(#z) - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (flip(#z) + (0,1) + @barnconst3) * juliaconst else ; fourth quadrant #z = (#z + (0,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "12" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (flip(#z) - 1 + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (flip(#z) + 1 + @barnconst3) * juliaconst else ; fourth quadrant #z = (#z + 1 + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "13" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (#z - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (#z + 1 + @barnconst3) * juliaconst else ; fourth quadrant #z = (#z + (0,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "14" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (conj(#z) - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (#z + 1 + @barnconst3) * juliaconst else ; fourth quadrant #z = (conj(#z) + (0,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "15" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (conj(#z) - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second quadrant #z = (#z - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third quadrant #z = (conj(#z) + 1 + @barnconst3) * juliaconst else ; fourth quadrant #z = (#z + (0,1) + @barnconst4) * juliaconst endif ; zangle elseif @barnsleytype4 == "16" if zangle <= unityroots[0] && zangle > rotation ; #z is in first quadrant #z = (#z * juliaconst) - (1,0) + @barnconst1 elseif zangle <= unityroots[1] ; second quadrant #z = (#z * juliaconst) - (0,1) + @barnconst2 elseif zangle <= unityroots[2] ; third quadrant #z = (#z * juliaconst) + (1,0) + @barnconst3 else ; fourth quadrant #z = (#z * juliaconst) + (0,1) + @barnconst4 endif ; zangle endif ; @barnsleytype4 elseif @numberofroots == 5 if @barnsleytype5 == "1" if zangle <= unityroots[0] && zangle > rotation ; #z is in first sector #z = (#z + (-1,-1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z + (1,-1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third sector #z = (#z + (1,0) + @barnconst3) * juliaconst elseif zangle <= unityroots[3] ; fourth sector #z = (#z + (1,1) + @barnconst4) * juliaconst else ; fifth sector #z = (#z + (-1,1) + @barnconst5) * juliaconst endif ; zangle elseif @barnsleytype5 == "2" if zangle <= unityroots[0] && zangle > rotation ; #z is in first sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third sector #z = (conj(#z) + (1,0) + @barnconst3) * juliaconst elseif zangle <= unityroots[3] ; fourth sector #z = (#z + (0,1) + @barnconst4) * juliaconst else ; fifth sector #z = (#z + 1 + @barnconst5) * juliaconst endif ; zangle elseif @barnsleytype5 == "3" if zangle <= unityroots[0] && zangle > rotation ; #z is in first sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (#z - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third sector #z = (flip(#z) + (1,0) + @barnconst3) * juliaconst elseif zangle <= unityroots[3] ; fourth sector #z = (#z + (0,1) + @barnconst4) * juliaconst else ; fifth sector #z = (#z + 1 + @barnconst5) * juliaconst endif ; zangle elseif @barnsleytype5 == "4" if zangle <= unityroots[0] && zangle > rotation ; #z is in first sector #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (conj(#z) - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third sector #z = (#z + (1,0) + @barnconst3) * juliaconst elseif zangle <= unityroots[3] ; fourth sector #z = (conj(#z) + (0,1) + @barnconst4) * juliaconst else ; fifth sector #z = (#z + (0,1) + @barnconst5) * juliaconst endif ; zangle elseif @barnsleytype5 == "5" if zangle <= unityroots[0] && zangle > rotation ; #z is in first sector #z = (#z - (0,1) + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (flip(#z) - (0,1) + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third sector #z = (#z + (1,0) + @barnconst3) * juliaconst elseif zangle <= unityroots[3] ; fourth sector #z = (flip(#z) + (0,1) + @barnconst4) * juliaconst else ; fifth sector #z = (#z + (0,1) + @barnconst5) * juliaconst endif ; zangle elseif @barnsleytype5 == "6" if zangle <= unityroots[0] && zangle > rotation ; #z is in first sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (conj(#z) - 1 + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third sector #z = (#z + (0,1) + @barnconst3) * juliaconst elseif zangle <= unityroots[3] ; fourth sector #z = (conj(#z) + 1 + @barnconst4) * juliaconst else ; fifth sector #z = (#z + 1 + @barnconst5) * juliaconst endif ; zangle elseif @barnsleytype5 == "7" if zangle <= unityroots[0] && zangle > rotation ; #z is in first sector #z = (#z - 1 + @barnconst1) * juliaconst elseif zangle <= unityroots[1] ; second sector #z = (flip(#z) - 1 + @barnconst2) * juliaconst elseif zangle <= unityroots[2] ; third sector #z = (#z + (0,1) + @barnconst3) * juliaconst elseif zangle <= unityroots[3] ; fourth sector #z = (flip(#z) + 1 + @barnconst4) * juliaconst else ; fifth sector #z = (#z + 1 + @barnconst5) * juliaconst endif ; zangle endif ; @barnsleytype5 endif ; @numberofroots if @bailtest == "mod" dontbail = (|#z| <= @bailout) elseif @bailtest == "real" dontbail = (sqr(real(#z)) <= @bailout) elseif @bailtest == "imag" dontbail = (sqr(imag(#z)) <= @bailout) elseif @bailtest == "and" dontbail = (sqr(real(#z)) <= @bailout && sqr(imag(#z)) <= @bailout) elseif @bailtest == "or" dontbail = (sqr(real(#z)) <= @bailout || sqr(imag(#z)) <= @bailout) elseif @bailtest == "eor" if sqr(real(#z)) <= @bailout dontbail = (sqr(imag(#z)) > @bailout) else dontbail = (sqr(imag(#z)) <= @bailout) endif ; sqr() elseif @bailtest == "manh" dontbail = (sqr(abs(real(#z)) + abs(imag(#z))) <= @bailout) elseif @bailtest == "manr" dontbail = (sqr(real(#z) + imag(#z)) <= @bailout) elseif @bailtest == "real 2" dontbail = (abs(real(#z)) <= @bailout) elseif @bailtest == "imag 2" dontbail = (abs(imag(#z)) <= @bailout) elseif @bailtest == "sum" dontbail = (abs(real(#z) + imag(#z)) <= @bailout) elseif @bailtest == "sum 2" dontbail = (abs(real(#z)) + abs(imag(#z)) <= @bailout) elseif @bailtest == "product" dontbail = (abs(real(#z) * imag(#z)) <= @bailout) elseif @bailtest == "difference" dontbail = (abs(real(#z)) - abs(imag(#z)) <= @bailout) elseif @bailtest == "difference 2" dontbail = (abs(real(#z) - imag(#z)) <= @bailout) elseif @bailtest == "difference 3" dontbail = (abs(imag(#z)) - abs(real(#z)) <= @bailout) elseif @bailtest == "quotient" dontbail = (abs(real(#z)) / abs(imag(#z)) <= @bailout) elseif @bailtest == "quotient 2" dontbail = (abs(imag(#z)) / abs(real(#z)) <= @bailout) endif ; @bailtest bailout: dontbail default: title = "Barnsley - Sectors" center = (0,0) maxiter = 500 method = multipass periodicity = 0 magn = 0.75 param numberofroots caption = "Number of Roots" default = 3 min = 2 max = 5 hint = "This parameter determines the number of roots of unity to use \ in order to divide the complex plane into sectors (2-5)." endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.99 max = 359.99 hint = "Number of degrees (0-359) that the sectoral divisions should be rotated \ from their default, roots of unity, positions." endparam param barnsleytype2 caption = "Barnsley Type" enum = "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" \ "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" hint = "This setting determines which set of equations is used." visible = @numberofroots == 2 endparam param barnsleymult caption = "Barnsley Multiplier" default = (2,0) hint = "This parameter is used as the multiplier of #z in some of the Barnsley equations." visible = @barnsleytype2 == "18" endparam ;param zpower ; caption = "Z Power" ; default = (3,0) ; hint = "This parameter is the exponent used by some of the Barnsley equations." ; visible = FALSE ;endparam param barnsleytype3 caption = "Barnsley Type" enum = "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" \ "17" "18" "19" "20" hint = "This setting determines which set of equations is used." visible = @numberofroots == 3 endparam param barnsleytype4 caption = "Barnsley Type" enum = "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" hint = "This setting determines which set of equations is used." visible = @numberofroots == 4 endparam param barnsleytype5 caption = "Barnsley Type" enum = "1" "2" "3" "4" "5" "6" "7" hint = "This setting determines which set of equations is used." visible = @numberofroots == 5 endparam param barnconst1 caption = "1st Barnsley Constant" default = (0,0) hint = "This parameter modifies the 1st Barnsley equation." endparam param barnconst2 caption = "2nd Barnsley Constant" default = (0,0) hint = "This parameter modifies the 2nd Barnsley equation." endparam param barnconst3 caption = "3rd Barnsley Constant" default = (0,0) hint = "This parameter modifies the 3rd Barnsley equation." visible = @numberofroots > 2 endparam param barnconst4 caption = "4th Barnsley Constant" default = (0,0) hint = "This parameter modifies the 4th Barnsley equation." visible = @numberofroots > 3 endparam param barnconst5 caption = "5th Barnsley Constant" default = (0,0) hint = "This parameter modifies the 5th Barnsley equation." visible = @numberofroots > 4 endparam param bailtest caption = "Bailout Test" enum = "mod" "real" "imag" "and" "or" "eor" "manh" "manr" "real 2" "imag 2" \ "sum" "sum 2" "product" "difference" "difference 2" "difference 3" \ "quotient" "quotient 2" default = 0 endparam param bailout caption = "Bailout Value" default = 4.0 min = 0.001 endparam param jconstant caption = "Seed/Perturbation" default = (0,0) endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-UnityRootBarnsley" numberofroots = numberofroots rotate = rotate barnsleytype2 = barnsleytype2 barnsleytype3 = barnsleytype3 barnsleytype4 = barnsleytype4 barnsleytype5 = barnsleytype5 barnconst1 = barnconst1 barnconst2 = barnconst2 barnconst3 = barnconst3 barnconst4 = barnconst4 barnconst5 = barnconst5 barnsleymult = barnsleymult bailtest = bailtest bailout = bailout zpower = zpower jconstant = #pixel mandy = julia julia = mandy } jam-FunctionBarnsley { ; jam 12/21/2018 ; Based on variations of the traditional Barnsley formulas. ; Some ideas from Michèle Dessureault, Ed Algra, Sam Monnier, and many others. ; The various Barnsley equations are executed based on the value of a function \ ; of the current #z value. global: float halfpi = #pi/2 init: complex juliaconst = (0,0) bool dontbail = TRUE float testvalue = float barnsleyvalue = 0.0 float equation1 = float equation2 = 0.0 ; for heatmap option complex currentz = (0,0) if @mandy #z = #pixel, juliaconst = #pixel else ; Julia #z = #pixel, juliaconst = @jconstant endif loop: if @heatmap #z = currentz ; restore proper z value endif ; @heatmap if @functionmode == "cabs" testvalue = |#z| elseif @functionmode == "real" testvalue = abs(real(#z)) elseif @functionmode == "imag" testvalue = abs(imag(#z)) elseif @functionmode == "real 2" testvalue = real(#z) elseif @functionmode == "imag 2" testvalue = imag(#z) elseif @functionmode == "sum" testvalue = real(#z) + imag(#z) elseif @functionmode == "sum 2" testvalue = abs(real(#z)) + abs(imag(#z)) elseif @functionmode == "sum 3" testvalue = sqr(real(#z)) + sqr(imag(#z)) elseif @functionmode == "product" testvalue = real(#z) * imag(#z) elseif @functionmode == "product 2" testvalue = abs(real(#z)) * abs(imag(#z)) elseif @functionmode == "product 3" testvalue = sqr(real(#z) * imag(#z)) elseif @functionmode == "difference" testvalue = real(#z) - imag(#z) elseif @functionmode == "difference 2" testvalue = abs(real(#z) - imag(#z)) elseif @functionmode == "difference 3" testvalue = sqr(real(#z) - imag(#z)) endif ; @functionmode if @testfunction == "sin" ; sine function testvalue = sin(testvalue) elseif @testfunction == "cos" ; cosine testvalue = cos(testvalue) elseif @testfunction == "tan" ; tangent testvalue = tan(testvalue) elseif @testfunction == "cot" ; cotangent testvalue = cotan(testvalue) elseif @testfunction == "sec" ; secant testvalue = 1/cos(testvalue) elseif @testfunction == "csc" ; cosecant testvalue = 1/sin(testvalue) elseif @testfunction == "ver" ; versine testvalue = 1 - cos(testvalue) elseif @testfunction == "vcs" ; vercosine testvalue = 1 + cos(testvalue) elseif @testfunction == "cvs" ; coversine testvalue = 1 - sin(testvalue) elseif @testfunction == "cvc" ; covercosine testvalue = 1 + sin(testvalue) elseif @testfunction == "exs" ; exsecant testvalue = 1/cos(testvalue) - 1 elseif @testfunction == "exc" ; excosecant testvalue = 1/sin(testvalue) - 1 elseif @testfunction == "crd" ; chord testvalue = 2 * sin(testvalue/2) elseif @testfunction == "asin" ; arcsine testvalue = asin(testvalue - trunc(testvalue)) elseif @testfunction == "acos" ; arccosine testvalue = acos(testvalue - trunc(testvalue)) elseif @testfunction == "atan" ; arctangent testvalue = atan(testvalue) elseif @testfunction == "acot" ; arccotangent testvalue = halfpi - atan(testvalue) elseif @testfunction == "asec" ; arcsecant testvalue = acos(1/testvalue - trunc(1/testvalue)) elseif @testfunction == "acsc" ; arccosecant testvalue = asin(1/testvalue - trunc(1/testvalue)) elseif @testfunction == "aver" ; arcversine testvalue = acos(1 - testvalue - trunc(1-testvalue)) elseif @testfunction == "avcs" ; arcvercosine testvalue = acos(1 + testvalue - trunc(1+testvalue)) elseif @testfunction == "acvs" ; arccoversine testvalue = asin(1 - testvalue - trunc(1-testvalue)) elseif @testfunction == "acvc" ; arccovercosine testvalue = asin(1 + testvalue - trunc(1+testvalue)) elseif @testfunction == "aexs" ; arcexsecant testvalue = acos( (1/(testvalue+1)) - trunc( (1/(testvalue+1)) ) ) elseif @testfunction == "aexc" ; arcexcosecant testvalue = asin( (1/(testvalue+1)) - trunc( (1/(testvalue+1)) ) ) elseif @testfunction == "acrd" ; arcchord testvalue = 2 * asin( testvalue/2 - trunc(testvalue/2) ) elseif @testfunction == "exp" ; exponential testvalue = exp(testvalue) elseif @testfunction == "exp(-n)" ; negative exponential testvalue = exp(-testvalue) elseif @testfunction == "exp(1/n)" ; recip exponential testvalue = exp(1/testvalue) elseif @testfunction == "exp(-1/n)" ; neg recip exponential testvalue = exp(-1/testvalue) elseif @testfunction == "exp(n^2)" ; z^2 exponential testvalue = exp(sqr(testvalue)) elseif @testfunction == "exp(-n^2)" ; -z^2 exponential testvalue = exp(-sqr(testvalue)) elseif @testfunction == "exp(1/n^2)" ; recip z^2 exponential testvalue = exp(1/sqr(testvalue)) elseif @testfunction == "exp(-1/n^2)" ; -recip z^2 exponential testvalue = exp(-1/sqr(testvalue)) elseif @testfunction == "sinh" ; hyperbolic sine testvalue = sinh(testvalue) elseif @testfunction == "asinh" ; inverse hyperbolic sine testvalue = asinh(testvalue) elseif @testfunction == "cosh" ; hyperbolic cosine testvalue = cosh(testvalue) elseif @testfunction == "acosh" ; inverse hyperbolic cosine testvalue = acosh(testvalue) elseif @testfunction == "tanh" ; hyperbolic tangent testvalue = tanh(testvalue) elseif @testfunction == "atanh" ; inverse hyperbolic tangent testvalue = atanh(testvalue) elseif @testfunction == "cotanh" ; hyperbolic cotangent testvalue = cotanh(testvalue) elseif @testfunction == "sqr" ; square testvalue = sqr(testvalue) elseif @testfunction == "sqrt" ; square root testvalue = sqrt(testvalue) elseif @testfunction == "power" ; power testvalue = testvalue^@testpower elseif @testfunction == "log" ; logarithm testvalue = log(testvalue) elseif @testfunction == "log(-n)" ; testvalue = log(-testvalue) elseif @testfunction == "log(1/n)" ; testvalue = log(1/testvalue) elseif @testfunction == "log(-1/n)" ; testvalue = log(-1/testvalue) elseif @testfunction == "1/n" ; reciprocal testvalue = 1/testvalue elseif @testfunction == "absolute value" ; absolute value testvalue = abs(testvalue) elseif @testfunction == "ceiling" ; ceiling testvalue = ceil(testvalue) elseif @testfunction == "floor" ; floor testvalue = floor(testvalue) elseif @testfunction == "truncation" ; truncation testvalue = trunc(testvalue) elseif @testfunction == "rounding" ; rounding testvalue = round(testvalue) elseif @testfunction == "asin 2" ; arcsine testvalue = asin(testvalue) elseif @testfunction == "acos 2" ; arccosine testvalue = acos(testvalue) elseif @testfunction == "atan 2" ; arctangent testvalue = atan2(testvalue) elseif @testfunction == "acot 2" ; arccotangent testvalue = halfpi - atan2(testvalue) elseif @testfunction == "asec 2" ; arcsecant testvalue = acos(1/testvalue) elseif @testfunction == "acsc 2" ; arccosecant testvalue = asin(1/testvalue) elseif @testfunction == "aver 2" ; arcversine testvalue = acos(1 - testvalue) elseif @testfunction == "avcs 2" ; arcvercosine testvalue = acos(1 + testvalue) elseif @testfunction == "acvs 2" ; arccoversine testvalue = asin(1 - testvalue) elseif @testfunction == "acvc 2" ; arccovercosine testvalue = asin(1 + testvalue) elseif @testfunction == "aexs 2" ; arcexsecant testvalue = acos( (1/(testvalue+1))) elseif @testfunction == "aexc 2" ; arcexcosecant testvalue = asin( (1/(testvalue+1))) elseif @testfunction == "acrd 2" ; arcchord testvalue = 2 * asin( testvalue/2 ) elseif @testfunction == "log(n^2)" ; testvalue = log(sqr(testvalue)) elseif @testfunction == "log(-n^2)" ; testvalue = log(-sqr(testvalue)) elseif @testfunction == "log(1/n^2)" ; testvalue = log(1/sqr(testvalue)) elseif @testfunction == "log(-1/n^2)" ; testvalue = log(-1/sqr(testvalue)) elseif @testfunction == "log log" ; testvalue = log( log(testvalue) ) elseif @testfunction == "exp(exp)" ; testvalue = exp( exp(testvalue) ) elseif @testfunction == "n^n" ; testvalue = testvalue^testvalue elseif @testfunction == "n^n^n" ; testvalue = testvalue^(testvalue^testvalue) elseif @testfunction == "constant^n" ; testvalue = @testbase^testvalue elseif @testfunction == "constant^n^n" ; testvalue = @testbase^(testvalue^testvalue) endif ; @testfunction testvalue = testvalue + @testadjustment if @barnsleymode == "cabs" barnsleyvalue = |#z| elseif @barnsleymode == "real" barnsleyvalue = abs(real(#z)) elseif @barnsleymode == "imag" barnsleyvalue = abs(imag(#z)) elseif @barnsleymode == "real 2" barnsleyvalue = real(#z) elseif @barnsleymode == "imag 2" barnsleyvalue = imag(#z) elseif @barnsleymode == "sum" barnsleyvalue = real(#z) + imag(#z) elseif @barnsleymode == "sum 2" barnsleyvalue = abs(real(#z)) + abs(imag(#z)) elseif @barnsleymode == "sum 3" barnsleyvalue = sqr(real(#z)) + sqr(imag(#z)) elseif @barnsleymode == "product" barnsleyvalue = real(#z) * imag(#z) elseif @barnsleymode == "product 2" barnsleyvalue = abs(real(#z)) * abs(imag(#z)) elseif @barnsleymode == "product 3" barnsleyvalue = sqr(real(#z) * imag(#z)) elseif @barnsleymode == "difference" barnsleyvalue = real(#z) - imag(#z) elseif @barnsleymode == "difference 2" barnsleyvalue = abs(real(#z) - imag(#z)) elseif @barnsleymode == "difference 3" barnsleyvalue = sqr(real(#z) - imag(#z)) elseif @barnsleymode == "test constant" barnsleyvalue = @barntestconst endif ; @barnsleymode if @barnsleytype == "1" if barnsleyvalue <= testvalue #z = (#z - flip(1)+ @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (#z + flip(1) + @barnconst2) * juliaconst equation2 = equation2 + 1 endif ; barnsleyvalue elseif @barnsleytype == "2" if barnsleyvalue <= testvalue #z = (#z - 1 + @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (#z + 1 + @barnconst2) * juliaconst equation2 = equation2 + 1 endif elseif @barnsleytype == "3" if barnsleyvalue <= testvalue #z = #z * juliaconst - 1 + @barnconst1 equation1 = equation1 + 1 else #z = #z * juliaconst + 1 + @barnconst2 equation2 = equation2 + 1 endif elseif @barnsleytype == "4" if barnsleyvalue <= testvalue #z = #z * juliaconst - (0,1) + @barnconst1 equation1 = equation1 + 1 else #z = #z * juliaconst + (0,1) + @barnconst2 equation2 = equation2 + 1 endif elseif @barnsleytype == "5" if barnsleyvalue <= testvalue #z = (sqr(#z) - (0,1) + @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (sqr(#z) + (0,1) + @barnconst2) * juliaconst equation2 = equation2 + 1 endif elseif @barnsleytype == "6" if barnsleyvalue <= testvalue #z = (sqr(#z) - 1 + @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (sqr(#z) + 1 + @barnconst2) * juliaconst equation2 = equation2 + 1 endif elseif @barnsleytype == "7" if barnsleyvalue <= testvalue #z = sqr(#z) * juliaconst - (0,1) + @barnconst1 equation1 = equation1 + 1 else #z = sqr(#z) * juliaconst + (0,1) + @barnconst2 equation2 = equation2 + 1 endif elseif @barnsleytype == "8" if barnsleyvalue <= testvalue #z = sqr(#z) * juliaconst - 1 + @barnconst1 equation1 = equation1 + 1 else #z = sqr(#z) * juliaconst + 1 + @barnconst2 equation2 = equation2 + 1 endif endif ; @barnsleytype if @bailtest == "mod" dontbail = (|#z| <= @bailout) elseif @bailtest == "real" dontbail = (sqr(real(#z)) <= @bailout) elseif @bailtest == "imag" dontbail = (sqr(imag(#z)) <= @bailout) elseif @bailtest == "and" dontbail = (sqr(real(#z)) <= @bailout && sqr(imag(#z)) <= @bailout) elseif @bailtest == "or" dontbail = (sqr(real(#z)) <= @bailout || sqr(imag(#z)) <= @bailout) elseif @bailtest == "eor" if sqr(real(#z)) <= @bailout dontbail = (sqr(imag(#z)) > @bailout) else dontbail = (sqr(imag(#z)) <= @bailout) endif ; sqr() elseif @bailtest == "manh" dontbail = (sqr(abs(real(#z)) + abs(imag(#z))) <= @bailout) elseif @bailtest == "manr" dontbail = (sqr(real(#z) + imag(#z)) <= @bailout) elseif @bailtest == "real 2" dontbail = (abs(real(#z)) <= @bailout) elseif @bailtest == "imag 2" dontbail = (abs(imag(#z)) <= @bailout) elseif @bailtest == "sum" dontbail = (abs(real(#z) + imag(#z)) <= @bailout) elseif @bailtest == "sum 2" dontbail = (abs(real(#z)) + abs(imag(#z)) <= @bailout) elseif @bailtest == "product" dontbail = (abs(real(#z) * imag(#z)) <= @bailout) elseif @bailtest == "difference" dontbail = (abs(real(#z)) - abs(imag(#z)) <= @bailout) elseif @bailtest == "difference 2" dontbail = (abs(real(#z) - imag(#z)) <= @bailout) elseif @bailtest == "difference 3" dontbail = (abs(imag(#z)) - abs(real(#z)) <= @bailout) elseif @bailtest == "quotient" dontbail = (abs(real(#z)) / abs(imag(#z)) <= @bailout) elseif @bailtest == "quotient 2" dontbail = (abs(imag(#z)) / abs(real(#z)) <= @bailout) endif ; @bailtest if @heatmap ; encode the eq1/eq2 ration in #z currentz = #z #z = equation1 + flip(equation2) endif ; @heatmap bailout: dontbail default: title = "Barnsley - Functions" center = (0,0) maxiter = 500 method = multipass periodicity = 0 magn = 0.75 param functionmode caption = "Function Mode" enum = "cabs" "real" "imag" "real 2" "imag 2" "sum" "sum 2" "sum 3" \ "product" "product 2" "product 3" "difference" "difference 2" "difference 3" default = 0 hint = "This setting determines the input argument to the test function." endparam param testfunction caption = "Test Function" enum = "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-n)" "exp(1/n)" \ "exp(-1/n)" "exp(n^2)" "exp(-n^2)" "exp(1/n^2)" "exp(-1/n^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-n)" "log(1/n)" "log(-1/n)" "1/n" "absolute value" \ "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(n^2)" "log(-n^2)" "log(1/n^2)" "log(-1/n^2)" "log log" \ "exp(exp)" "n^n" "n^n^n" "constant^n" "constant^n^n" default = 0 hint = "This setting selects which function is applied in the Barnsley comparison." endparam param testpower caption = "Test Exponent" default = 3.0 hint = "If the 'Test Function' is set to 'power', then this is the \ exponent that is used." visible = (@testfunction == "power") endparam param testbase caption = "Test Base" default = 4.0 hint = "If the 'Test Function' is set to 'constant^n' or 'constant^n^n', \ then this is the constant that is used." visible = ((@testfunction == "constant^n") || (@testfunction == "constant^n^n")) endparam param testadjustment caption = "Test Adjustment" default = 0.0 hint = "This value is added to the result of the Test Function." endparam param barnsleymode caption = "Barnsley Mode" enum = "cabs" "real" "imag" "real 2" "imag 2" "sum" "sum 2" "sum 3" \ "product" "product 2" "product 3" "difference" "difference 2" "difference 3" \ "test constant" default = 1 hint = "This setting determines what is compared to the test function." endparam param barntestconst caption = "Barnsley Test Constant" default = 0.3 hint = "If parameter 'Barnsley Mode' is set to 'test constant', \ then this is the constant used to test the 'Function Mode'/ \ 'Test Function' result. If the function result <= the 'test constant' \ value, Barnley equation 1 is executed; otherwise, equation 2 is \ executed." visible = @barnsleymode == "test constant" endparam param barnsleytype caption = "Barnsley Type" enum = "1" "2" "3" "4" "5" "6" "7" "8" hint = "This setting determines which set of equations is used." endparam param barnconst1 caption = "1st Barnsley Constant" default = (0,0) hint = "This parameter modifies the 1st Barnsley equation." endparam param barnconst2 caption = "2nd Barnsley Constant" default = (0,0) hint = "This parameter modifies the 2nd Barnsley equation." endparam param bailtest caption = "Bailout Test" enum = "mod" "real" "imag" "and" "or" "eor" "manh" "manr" "real 2" "imag 2" \ "sum" "sum 2" "product" "difference" "difference 2" "difference 3" \ "quotient" "quotient 2" default = 0 endparam param bailout caption = "Bailout Value" default = 4.0 min = 0.001 endparam param heatmap caption = "Heat Map?" default = FALSE hint = "If enabled, #z encodes the ratio of the number of times that Barnsley equation \ #1 is used to that of Barnsley equation #2, i.e., real(#z) = number \ of uses of equation 1, and imag(#z) = number of uses of equation 2. \ This value can be used with the 'Heat Map' coloring in jam2.ucl \ to determine how often each Barnsley equation is chosen." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-FunctionBarnsley" functionmode = functionmode testfunction = testfunction testpower = testpower testbase = testbase testadjustment = testadjustment barnsleymode = barnsleymode barntestconst = barntestconst barnsleytype = barnsleytype barnconst1 = barnconst1 barnconst2 = barnconst2 bailtest = bailtest bailout = bailout jconstant = #pixel mandy = julia julia = mandy } jam-3functionsV2 { ; jam 181229 ; 2 or 3 different Mandelbrot/Julia style formulas are executed ; and combined in a user-specified manner, either each iteration ; or every N iterations. init: complex jc = (0,0) int iterations = 0 complex zblend = (0,0) complex zextra = complex ztemp = (0,0) ; temp/spare scratch variable complex zf1 = complex zf2 = complex zf3 = (0,0) bool bail = FALSE if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif ; Pixel/constant initialization section if @pixelformula != 0 if @pixelformula == 1 jc = jc * jc elseif @pixelformula == 2 jc = jc * jc * jc elseif @pixelformula == 3 zextra = jc * jc jc = zextra * zextra elseif @pixelformula == 4 jc = jc ^ @ppower elseif @pixelformula == 5 jc = 1/jc elseif @pixelformula == 6 jc = sqrt(jc) elseif @pixelformula == 7 jc = 1 / ( jc * jc ) elseif @pixelformula == 8 jc = log(jc) elseif @pixelformula == 9 jc = exp( jc) elseif @pixelformula == 10 jc = jc^jc elseif @pixelformula == 11 jc = sin( jc ) elseif @pixelformula == 12 jc = cos( jc ) elseif @pixelformula == 13 jc = tan( jc ) elseif @pixelformula == 14 jc = asin( jc ) elseif @pixelformula == 15 jc = acos( jc ) elseif @pixelformula == 16 jc = atan( jc ) elseif @pixelformula == 17 jc = sinh( jc ) elseif @pixelformula == 18 jc = cosh( jc ) elseif @pixelformula == 19 jc = tanh( jc ) elseif @pixelformula == 20 jc = asinh( jc ) elseif @pixelformula == 21 jc = acosh( jc ) elseif @pixelformula == 22 jc = atanh( jc ) elseif @pixelformula == 23 jc = log( 1/jc ) elseif @pixelformula == 24 jc = log( log( jc )) elseif @pixelformula == 25 jc = exp( -jc ) elseif @pixelformula == 26 jc = exp( 1/jc ) elseif @pixelformula == 27 jc = jc^(-jc) elseif @pixelformula == 28 zextra = sin( jc ) jc = zextra * zextra elseif @pixelformula == 29 zextra = cos( jc ) jc = zextra * zextra elseif @pixelformula == 30 zextra = tan( jc ) jc = zextra * zextra elseif @pixelformula == 31 jc = cotan( jc ) elseif @pixelformula == 32 jc = 1/cos( jc ) elseif @pixelformula == 33 jc = 1/sin( jc ) elseif @pixelformula == 34 zextra = cotan( jc ) jc = zextra * zextra elseif @pixelformula == 35 zextra = 1/cos( jc ) jc = zextra * zextra elseif @pixelformula == 36 zextra = 1/sin( jc ) jc = zextra * zextra elseif @pixelformula == 37 zextra = jc^(jc) jc = jc^zextra elseif @pixelformula == 38 zextra = jc^(jc) jc = 1/( jc^zextra ) elseif @pixelformula == 39 jc = log(-jc) elseif @pixelformula == 40 jc = 1/log( jc ) elseif @pixelformula == 41 jc = jc * log( jc ) elseif @pixelformula == 42 jc = sin( jc ) / jc elseif @pixelformula == 43 jc = cos( jc ) / jc elseif @pixelformula == 44 jc = sin( jc ) * cos( jc ) elseif @pixelformula == 45 jc = sin( jc^2 ) elseif @pixelformula == 46 jc = exp( -1/jc ) elseif @pixelformula == 47 jc = jc * exp( jc ) elseif @pixelformula == 48 jc = jc * exp( -jc ) elseif @pixelformula == 49 jc = jc * exp( 1/jc ) elseif @pixelformula == 50 jc = jc * exp( -1/jc ) elseif @pixelformula == 51 jc = jc * jc * jc elseif @pixelformula == 52 jc = 1 / ( jc * jc * jc ) elseif @pixelformula == 53 jc = atan( 1 / jc ) elseif @pixelformula == 54 jc = acos( 1 / jc ) elseif @pixelformula == 55 jc = asin( 1 / jc ) elseif @pixelformula == 56 jc = tan( jc ) / jc elseif @pixelformula == 57 jc = cotan( jc ) / jc elseif @pixelformula == 58 jc = 1 / ( jc * cos( jc )) elseif @pixelformula == 59 jc = 1 / ( jc * sin( jc )) elseif @pixelformula == 60 jc = jc * sin( jc ) elseif @pixelformula == 61 jc = jc * cos( jc ) elseif @pixelformula == 62 jc = jc * tan( jc ) elseif @pixelformula == 63 jc = jc * cotan( jc ) elseif @pixelformula == 64 jc = jc/cos( jc ) elseif @pixelformula == 65 jc = jc/sin( jc ) elseif @pixelformula == 66 jc = sin( 1/jc ) elseif @pixelformula == 67 jc = cos( 1/jc ) elseif @pixelformula == 68 jc = tan( 1/jc ) elseif @pixelformula == 69 jc = cotan( 1/jc ) elseif @pixelformula == 70 jc = 1/cos( 1/jc ) elseif @pixelformula == 71 jc = 1/sin( 1/jc ) elseif @pixelformula == 72 jc = cotanh( jc ) elseif @pixelformula == 73 jc = 1/cosh( jc ) elseif @pixelformula == 74 jc = 1/sinh( jc ) elseif @pixelformula == 75 jc = atanh( 1/jc ) elseif @pixelformula == 76 jc = acosh( 1/jc ) elseif @pixelformula == 77 jc = asinh( 1/jc ) elseif @pixelformula == 78 jc = @coeffpa * jc^@exponentpa + @coeffpb * jc^@exponentpb + \ @coeffpc * jc^@exponentpc elseif @pixelformula == 79 zextra = sinh(#z) jc = zextra * zextra elseif @pixelformula == 80 zextra = cosh( jc ) jc = zextra * zextra elseif @pixelformula == 81 zextra = tanh(jc) jc = zextra * zextra elseif @pixelformula == 82 zextra = cotanh( jc ) jc = zextra * zextra elseif @pixelformula == 83 zextra = (1,0)/cosh(jc) jc = zextra * zextra elseif @pixelformula == 84 zextra = (1,0) / sinh( jc ) jc = zextra * zextra elseif @pixelformula == 85 jc = sinh(1/jc) elseif @pixelformula == 86 jc = cosh(1/jc) elseif @pixelformula == 87 jc = tanh(1/jc) elseif @pixelformula == 88 jc = cotanh(1/jc) elseif @pixelformula == 89 jc = (1,0)/cosh(1/jc) elseif @pixelformula == 90 jc = (1,0)/sinh(1/jc) elseif @pixelformula == 91 jc = sin( jc ) * tan(jc) elseif @pixelformula == 92 jc = sinh(jc) * tanh(jc) elseif @pixelformula == 93 jc = sinh(jc) * cosh(jc) elseif @pixelformula == 94 ztemp = sinh(jc), zextra = cosh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 95 ztemp = sin(jc), zextra = cos(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 96 zextra = 1/jc jc = sin(zextra)*cos(zextra) elseif @pixelformula == 97 zextra = sin( 1/jc ) jc = zextra*zextra elseif @pixelformula == 98 jc = sin(jc) * cos(1/jc) elseif @pixelformula == 99 jc = sin(jc) * sin(1/jc) elseif @pixelformula == 100 zextra = log(jc) jc = zextra*zextra elseif @pixelformula == 101 jc = sin(jc) * sin(2*jc) elseif @pixelformula == 102 jc = exp(2*jc) elseif @pixelformula == 103 jc = exp(-2*jc) elseif @pixelformula == 104 zextra = 1/jc jc = sinh(zextra)*cosh(zextra) elseif @pixelformula == 105 zextra = sinh( 1/jc ) jc = zextra*zextra elseif @pixelformula == 106 jc = sinh(jc) * cosh(1/jc) elseif @pixelformula == 107 jc = sinh(jc) * sinh(1/jc) elseif @pixelformula == 108 jc = sin(jc) * sinh(jc) elseif @pixelformula == 109 jc = sin(jc) * cosh(jc) elseif @pixelformula == 110 zextra = sin(jc), ztemp = sinh(jc) jc = ztemp*ztemp*zextra*zextra elseif @pixelformula == 111 jc = sin(jc)*exp(jc) elseif @pixelformula == 112 jc = cos(jc)*exp(jc) elseif @pixelformula == 113 jc = sinh(jc)*exp(jc) elseif @pixelformula == 114 jc = cosh(jc)*exp(jc) elseif @pixelformula == 115 jc = sin(jc)*log(jc) elseif @pixelformula == 116 jc = cos(jc)*log(jc) elseif @pixelformula == 117 jc = sinh(jc)*log(jc) else ; @pixelformula == 118 jc = cosh(jc)*log(jc) endif ; @pixelformula = 1 endif ; @pixelformula != 0 loop: if @pmode != 0 z = z + jc endif ; pmode zblend = z iterations = iterations + 1 if @formula1 == "z^2" zf1 = sqr(z) elseif @formula1 == "z^3" zf1 = z * sqr(z) elseif @formula1 == "z^4" zf1 = sqr(sqr(z)) elseif @formula1 == "z^power" zf1 = z ^ @power1 elseif @formula1 == "1/z" zf1 = 1/z elseif @formula1 == "sqrt" zf1 = sqrt(z) elseif @formula1 == "1/z^2" zf1 = 1 / (sqr(z)) elseif @formula1 == "log" zf1 = log(@premult1a*z) elseif @formula1 == "e^z" zf1 = exp(@premult1a*z) elseif @formula1 == "z^z" zf1 = z^(@premult1a*z) elseif @formula1 == "sin" zf1 = sin(@premult1a*z ) elseif @formula1 == "cos" zf1 = cos(@premult1a*z ) elseif @formula1 == "tan" zf1 = tan(@premult1a*z ) elseif @formula1 == "asin" zf1 = asin(@premult1a*z ) elseif @formula1 == "acos" zf1 = acos( @premult1a*z ) elseif @formula1 == "atan" zf1 = atan( @premult1a*z ) elseif @formula1 == "sinh" zf1 = sinh( @premult1a*z ) elseif @formula1 == "cosh" zf1 = cosh( @premult1a*z ) elseif @formula1 == "tanh" zf1 = tanh( @premult1a*z ) elseif @formula1 == "asinh" zf1 = asinh( @premult1a*z ) elseif @formula1 == "acosh" zf1 = acosh( @premult1a*z ) elseif @formula1 == "atanh" zf1 = atanh( @premult1a*z ) elseif @formula1 == "log(1/z)" zf1 = log( 1/(@premult1a*z) ) elseif @formula1 == "log(log)" zf1 = log(@premult1b* log( @premult1a*z )) elseif @formula1 == "e^-z" zf1 = exp( -z ) elseif @formula1 == "e^(1/z)" zf1 = exp( @premult1a/z ) elseif @formula1 == "z^-z" zf1 = z^(-@premult1a*z) elseif @formula1 == "sin^2" zextra = sin( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "cos^2" zextra = cos( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "tan^2" zextra = tan( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "cot" zf1 = cotan( @premult1a*z ) elseif @formula1 == "sec" zf1 = 1/cos( @premult1a*z ) elseif @formula1 == "csc" zf1 = 1/sin( @premult1a*z ) elseif @formula1 == "cot^2" zextra = cotan( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "sec^2" zextra = 1/cos( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "csc^2" zextra = 1/sin( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "z^z^z" zextra = z^(@premult1a*z) zf1 = z^zextra elseif @formula1 == "1/z^z^z" zextra = z^(@premult1a*z) zf1 = 1/( z^zextra ) elseif @formula1 == "log(-z)" zf1 = log(-@premult1a*z) elseif @formula1 == "1/log" zf1 = 1/log( @premult1a*z ) elseif @formula1 == "zlog" zf1 = z * log( @premult1a*z ) elseif @formula1 == "sin(z)/z" zf1 = sin( @premult1a*z ) / z elseif @formula1 == "cos(z)/z" zf1 = cos( @premult1a*z ) / z elseif @formula1 == "sin*cos" zf1 = sin( @premult1a*z ) * cos( @premult1b*z ) elseif @formula1 == "sin(z^2)" zf1 = sin( @premult1a*z^2 ) elseif @formula1 == "e^(-1/z)" zf1 = exp( -@premult1a/z ) elseif @formula1 == "ze^z" zf1 = z * exp( @premult1a*z ) elseif @formula1 == "ze^-z" zf1 = z * exp( -z ) elseif @formula1 == "ze^(1/z)" zf1 = z * exp( @premult1a/z ) elseif @formula1 == "ze^(-1/z)" zf1 = z * exp( -1/z ) elseif @formula1 == "1/z^3" zf1 = 1 / ( z * sqr(z) ) elseif @formula1 == "acot" zf1 = atan( 1 / @premult1a*z ) elseif @formula1 == "asec" zf1 = acos( 1 / @premult1a*z ) elseif @formula1 == "acsc" zf1 = asin( 1 / @premult1a*z ) elseif @formula1 == "tan(z)/z" zf1 = tan( @premult1a*z ) / z elseif @formula1 == "cot(z)/z" zf1 = cotan( @premult1a*z ) / z elseif @formula1 == "sec(z)/z" zf1 = 1 / ( z * cos( @premult1a*z )) elseif @formula1 == "csc(z)/z" zf1 = 1 / ( z * sin( @premult1a*z )) elseif @formula1 == "zsin" zf1 = z * sin( @premult1a*z ) elseif @formula1 == "zcos" zf1 = z * cos( @premult1a*z ) elseif @formula1 == "ztan" zf1 = z * tan( @premult1a*z ) elseif @formula1 == "zcot" zf1 = z * cotan( @premult1a*z ) elseif @formula1 == "zsec" zf1 = z/cos( @premult1a*z ) elseif @formula1 == "zcsc" zf1 = z/sin( @premult1a*z ) elseif @formula1 == "sin(1/z)" zf1 = sin( @premult1a/z ) elseif @formula1 == "cos(1/z)" zf1 = cos( @premult1a/z ) elseif @formula1 == "tan(1/z)" zf1 = tan( @premult1a/z ) elseif @formula1 == "cot(1/z)" zf1 = cotan( @premult1a/z ) elseif @formula1 == "sec(1/z)" zf1 = 1/cos( @premult1a/z ) elseif @formula1 == "csc(1/z)" zf1 = 1/sin( @premult1a/z ) elseif @formula1 == "cotanh" zf1 = cotanh( @premult1a*z ) elseif @formula1 == "sech" zf1 = 1/cosh( @premult1a*z ) elseif @formula1 == "cosech" zf1 = 1/sinh( @premult1a*z ) elseif @formula1 == "acoth" zf1 = atanh( 1/(@premult1a*z) ) elseif @formula1 == "asech" zf1 = acosh( 1/(@premult1a*z) ) elseif @formula1 == "acosech" zf1 = asinh( 1/(@premult1a*z) ) elseif @formula1 == "3-term polynomial" zf1 = @coeff1a * z^@exponent1a + @coeff1b * z^@exponent1b + \ @coeff1c * z^@exponent1c elseif @formula1 == "sinh^2" zextra = sinh(@premult1a*z) zf1 = zextra * zextra elseif @formula1 == "cosh^2" zextra = cosh( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "tanh^2" zextra = tanh(@premult1a*z) zf1 = zextra * zextra elseif @formula1 == "cotanh^2" zextra = cotanh( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "sech^2" zextra = (1,0)/cosh(@premult1a*z) zf1 = zextra * zextra elseif @formula1 == "cosech^2" zextra = (1,0) / sinh( @premult1a*z ) zf1 = zextra * zextra elseif @formula1 == "sinh(1/z)" zf1 = sinh(@premult1a/z) elseif @formula1 == "cosh(1/z)" zf1 = cosh(@premult1a/z) elseif @formula1 == "tanh(1/z)" zf1 = tanh(@premult1a/z) elseif @formula1 == "cotanh(1/z)" zf1 = cotanh(@premult1a/z) elseif @formula1 == "sech(1/z)" zf1 = (1,0)/cosh(@premult1a/z) elseif @formula1 == "cosech(1/z)" zf1 = (1,0)/sinh(@premult1a/z) elseif @formula1 == "sin*tan" zf1 = sin( @premult1a*z ) * tan(@premult1b*z) elseif @formula1 == "sinh*tanh" zf1 = sinh(@premult1a*z) * tanh(@premult1b*z) elseif @formula1 == "sinh*cosh" zf1 = sinh(@premult1a*z) * cosh(@premult1b*z) elseif @formula1 == "sinh^2*cosh^2" ztemp = sinh(@premult1a*z), zextra = cosh(@premult1b*z) zf1 = ztemp*ztemp*zextra*zextra elseif @formula1 == "sin^2*cos^2" ztemp = sin(@premult1a*z), zextra = cos(@premult1b*z) zf1 = ztemp*ztemp*zextra*zextra elseif @formula1 == "sin(1/z)*cos(1/z)" zextra = 1/(@premult1a*z), ztemp = 1/(@premult1b*z) zf1 = sin(zextra)*cos(ztemp) elseif @formula1 == "sin(1/z)^2" zextra = sin( @premult1a/z ) zf1 = zextra*zextra elseif @formula1 == "sin(z)*cos(1/z)" zf1 = sin(@premult1a*z) * cos(@premult1b/z) elseif @formula1 == "sin(z)*sin(1/z)" zf1 = sin(@premult1a*z) * sin(@premult1b/z) elseif @formula1 == "log^2" zextra = log(@premult1a*z) zf1 = zextra*zextra elseif @formula1 == "sin(mz)*sin(nz)" zf1 = sin(@premult1a*z) * sin(@premult1b*z) elseif @formula1 == "sinh(1/z)*cosh(1/z)" zextra = @premult1a/z, ztemp = @premult1b/z zf1 = sinh(zextra)*cosh(ztemp) elseif @formula1 == "sinh(1/z)^2" zextra = sinh( @premult1a/z ) zf1 = zextra*zextra elseif @formula1 == "sinh*cosh(1/z)" zf1 = sinh(@premult1a*z) * cosh(@premult1b/z) elseif @formula1 == "sinh*sinh(1/z)" zf1 = sinh(@premult1a*z) * sinh(@premult1b/z) elseif @formula1 == "sin*sinh" zf1 = sin(@premult1a*z) * sinh(@premult1b*z) elseif @formula1 == "sin*cosh" zf1 = sin(@premult1a*z) * cosh(@premult1b*z) elseif @formula1 == "sin^2*sinh^2" zextra = sin(@premult1a*z), ztemp = sinh(@premult1b*z) zf1 = ztemp*ztemp*zextra*zextra elseif @formula1 == "sin*e^z" zf1 = sin(@premult1a*z)*exp(@premult1b*z) elseif @formula1 == "cos*e^z" zf1 = cos(@premult1a*z)*exp(@premult1b*z) elseif @formula1 == "sinh*e^z" zf1 = sinh(@premult1a*z)*exp(@premult1b*z) elseif @formula1 == "cosh*e^z" zf1 = cosh(@premult1a*z)*exp(@premult1b*z) elseif @formula1 == "sin*log" zf1 = sin(@premult1a*z)*log(@premult1b*z) elseif @formula1 == "cos*log" zf1 = cos(@premult1a*z)*log(@premult1b*z) elseif @formula1 == "sinh*log" zf1 = sinh(@premult1a*z)*log(@premult1b*z) elseif @formula1 == "cosh*log" zf1 = cosh(@premult1a*z)*log(@premult1b*z) elseif @formula1 == "e^(z^2)" zf1 = exp(@premult1a*z*z) elseif @formula1 == "e^(-(z^2))" zf1 = exp(-(z*z)) elseif @formula1 == "e^(1/z^2)" zf1 = exp(@premult1a/(z*z)) elseif @formula1 == "e^(-1/z^2)" zf1 = exp(-1/(z*z)) elseif @formula1 == "ver" ; versine zf1 = 1 - cos(@premult1a*z) elseif @formula1 == "vcs" ; vercosine zf1 = 1 + cos(@premult1a*z) elseif @formula1 == "cvs" ; coversine zf1 = 1 - sin(@premult1a*z) elseif @formula1 == "cvc" ; covercosine zf1 = 1 + sin(@premult1a*z) elseif @formula1 == "exs" ; exsecant zf1 = 1/cos(@premult1a*z) - 1 elseif @formula1 == "exc" ; excosecant zf1 = 1/sin(@premult1a*z) - 1 elseif @formula1 == "crd" ; chord zf1 = 2 * sin(@premult1a*z/2) elseif @formula1 == "aver" ; arcversine zf1 = acos(1 - @premult1a*z) elseif @formula1 == "avcs" ; arcvercosine zf1 = acos(1 + @premult1a*z) elseif @formula1 == "acvs" ; arccoversine zf1 = asin(1 - @premult1a*z) elseif @formula1 == "acvc" ; arccovercosine zf1 = asin(1 + @premult1a*z) elseif @formula1 == "aexs" ; arcexsecant zf1 = acos( (1/(@premult1a*(z+1)))) elseif @formula1 == "aexc" ; arcexcosecant zf1 = asin( (1/(@premult1a*(z+1)))) elseif @formula1 == "acrd" ; arcchord zf1 = 2 * asin( @premult1a*z/2 ) elseif @formula1 == "abs" zf1 = abs( @premult1a*z ) elseif @formula1 == "conj" zf1 = conj( @premult1a*z ) elseif @formula1 == "flip" zf1 = flip( @premult1a*z ) elseif @formula1 == "ceiling" zf1 = ceil( @premult1a*z ) elseif @formula1 == "floor" zf1 = floor( @premult1a*z ) elseif @formula1 == "truncation" zf1 = trunc( @premult1a*z ) elseif @formula1 == "round" zf1 = round( @premult1a*z ) elseif @formula1 == "atan2" zf1 = atan2( @premult1a*z ) elseif @formula1 == "e^e^z" zf1 = exp(@premult1b*exp( @premult1a*z )) elseif @formula1 == "constant^z" zf1 = @base1^( @premult1a*z ) elseif @formula1 == "constant^z^z" zf1 = @base1^(@premult1b*z^( @premult1a*z )) elseif @formula1 == "real" zf1 = real(z) + flip(0) elseif @formula1 == "imag" zf1 = (0,0) + flip(imag(z)) elseif @formula1 == "conj(flip)" zf1 = conj(@premult1b*flip( @premult1a*z )) elseif @formula1 == "flip(conj)" zf1 = flip(@premult1b* conj(@premult1a*z )) elseif @formula1 == "z" zf1 = @premult1a*z endif ; @formula1 zf1 = @funcmult1 * zf1 if iterations % @frequency == 0 ; execute other formulas and combine zf1 = @weight1*zf1 if ( @combo == 3 ) || ( @combo == 9 ) z = zf1 endif ; @combo if @formula2 == "z^2" zf2 = sqr(z) elseif @formula2 == "z^3" zf2 = z * sqr(z) elseif @formula2 == "z^4" zf2 = sqr(sqr(z)) elseif @formula2 == "z^power" zf2 = z ^ @power2 elseif @formula2 == "1/z" zf2 = 1/z elseif @formula2 == "sqrt" zf2 = sqrt(z) elseif @formula2 == "1/z^2" zf2 = 1 / (sqr(z)) elseif @formula2 == "log" zf2 = log(@premult2a*z) elseif @formula2 == "e^z" zf2 = exp(@premult2a*z) elseif @formula2 == "z^z" zf2 = z^(@premult2a*z) elseif @formula2 == "sin" zf2 = sin(@premult2a*z ) elseif @formula2 == "cos" zf2 = cos(@premult2a*z ) elseif @formula2 == "tan" zf2 = tan(@premult2a*z ) elseif @formula2 == "asin" zf2 = asin(@premult2a*z ) elseif @formula2 == "acos" zf2 = acos( @premult2a*z ) elseif @formula2 == "atan" zf2 = atan( @premult2a*z ) elseif @formula2 == "sinh" zf2 = sinh( @premult2a*z ) elseif @formula2 == "cosh" zf2 = cosh( @premult2a*z ) elseif @formula2 == "tanh" zf2 = tanh( @premult2a*z ) elseif @formula2 == "asinh" zf2 = asinh( @premult2a*z ) elseif @formula2 == "acosh" zf2 = acosh( @premult2a*z ) elseif @formula2 == "atanh" zf2 = atanh( @premult2a*z ) elseif @formula2 == "log(1/z)" zf2 = log( 1/(@premult2a*z) ) elseif @formula2 == "log(log)" zf2 = log(@premult2b* log( @premult2a*z )) elseif @formula2 == "e^-z" zf2 = exp( -z ) elseif @formula2 == "e^(1/z)" zf2 = exp( @premult2a/z ) elseif @formula2 == "z^-z" zf2 = z^(-@premult2a*z) elseif @formula2 == "sin^2" zextra = sin( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "cos^2" zextra = cos( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "tan^2" zextra = tan( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "cot" zf2 = cotan( @premult2a*z ) elseif @formula2 == "sec" zf2 = 1/cos( @premult2a*z ) elseif @formula2 == "csc" zf2 = 1/sin( @premult2a*z ) elseif @formula2 == "cot^2" zextra = cotan( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "sec^2" zextra = 1/cos( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "csc^2" zextra = 1/sin( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "z^z^z" zextra = z^(@premult2a*z) zf2 = z^zextra elseif @formula2 == "1/z^z^z" zextra = z^(@premult2a*z) zf2 = 1/( z^zextra ) elseif @formula2 == "log(-z)" zf2 = log(-@premult2a*z) elseif @formula2 == "1/log" zf2 = 1/log( @premult2a*z ) elseif @formula2 == "zlog" zf2 = z * log( @premult2a*z ) elseif @formula2 == "sin(z)/z" zf2 = sin( @premult2a*z ) / z elseif @formula2 == "cos(z)/z" zf2 = cos( @premult2a*z ) / z elseif @formula2 == "sin*cos" zf2 = sin( @premult2a*z ) * cos( @premult2b*z ) elseif @formula2 == "sin(z^2)" zf2 = sin( @premult2a*z^2 ) elseif @formula2 == "e^(-1/z)" zf2 = exp( -@premult2a/z ) elseif @formula2 == "ze^z" zf2 = z * exp( @premult2a*z ) elseif @formula2 == "ze^-z" zf2 = z * exp( -z ) elseif @formula2 == "ze^(1/z)" zf2 = z * exp( @premult2a/z ) elseif @formula2 == "ze^(-1/z)" zf2 = z * exp( -1/z ) elseif @formula2 == "1/z^3" zf2 = 1 / ( z * sqr(z) ) elseif @formula2 == "acot" zf2 = atan( 1 / @premult2a*z ) elseif @formula2 == "asec" zf2 = acos( 1 / @premult2a*z ) elseif @formula2 == "acsc" zf2 = asin( 1 / @premult2a*z ) elseif @formula2 == "tan(z)/z" zf2 = tan( @premult2a*z ) / z elseif @formula2 == "cot(z)/z" zf2 = cotan( @premult2a*z ) / z elseif @formula2 == "sec(z)/z" zf2 = 1 / ( z * cos( @premult2a*z )) elseif @formula2 == "csc(z)/z" zf2 = 1 / ( z * sin( @premult2a*z )) elseif @formula2 == "zsin" zf2 = z * sin( @premult2a*z ) elseif @formula2 == "zcos" zf2 = z * cos( @premult2a*z ) elseif @formula2 == "ztan" zf2 = z * tan( @premult2a*z ) elseif @formula2 == "zcot" zf2 = z * cotan( @premult2a*z ) elseif @formula2 == "zsec" zf2 = z/cos( @premult2a*z ) elseif @formula2 == "zcsc" zf2 = z/sin( @premult2a*z ) elseif @formula2 == "sin(1/z)" zf2 = sin( @premult2a/z ) elseif @formula2 == "cos(1/z)" zf2 = cos( @premult2a/z ) elseif @formula2 == "tan(1/z)" zf2 = tan( @premult2a/z ) elseif @formula2 == "cot(1/z)" zf2 = cotan( @premult2a/z ) elseif @formula2 == "sec(1/z)" zf2 = 1/cos( @premult2a/z ) elseif @formula2 == "csc(1/z)" zf2 = 1/sin( @premult2a/z ) elseif @formula2 == "cotanh" zf2 = cotanh( @premult2a*z ) elseif @formula2 == "sech" zf2 = 1/cosh( @premult2a*z ) elseif @formula2 == "cosech" zf2 = 1/sinh( @premult2a*z ) elseif @formula2 == "acoth" zf2 = atanh( 1/(@premult2a*z) ) elseif @formula2 == "asech" zf2 = acosh( 1/(@premult2a*z) ) elseif @formula2 == "acosech" zf2 = asinh( 1/(@premult2a*z) ) elseif @formula2 == "3-term polynomial" zf2 = @coeff2a * z^@exponent2a + @coeff2b * z^@exponent2b + \ @coeff2c * z^@exponent2c elseif @formula2 == "sinh^2" zextra = sinh(@premult2a*z) zf2 = zextra * zextra elseif @formula2 == "cosh^2" zextra = cosh( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "tanh^2" zextra = tanh(@premult2a*z) zf2 = zextra * zextra elseif @formula2 == "cotanh^2" zextra = cotanh( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "sech^2" zextra = (1,0)/cosh(@premult2a*z) zf2 = zextra * zextra elseif @formula2 == "cosech^2" zextra = (1,0) / sinh( @premult2a*z ) zf2 = zextra * zextra elseif @formula2 == "sinh(1/z)" zf2 = sinh(@premult2a/z) elseif @formula2 == "cosh(1/z)" zf2 = cosh(@premult2a/z) elseif @formula2 == "tanh(1/z)" zf2 = tanh(@premult2a/z) elseif @formula2 == "cotanh(1/z)" zf2 = cotanh(@premult2a/z) elseif @formula2 == "sech(1/z)" zf2 = (1,0)/cosh(@premult2a/z) elseif @formula2 == "cosech(1/z)" zf2 = (1,0)/sinh(@premult2a/z) elseif @formula2 == "sin*tan" zf2 = sin( @premult2a*z ) * tan(@premult2b*z) elseif @formula2 == "sinh*tanh" zf2 = sinh(@premult2a*z) * tanh(@premult2b*z) elseif @formula2 == "sinh*cosh" zf2 = sinh(@premult2a*z) * cosh(@premult2b*z) elseif @formula2 == "sinh^2*cosh^2" ztemp = sinh(@premult2a*z), zextra = cosh(@premult2b*z) zf2 = ztemp*ztemp*zextra*zextra elseif @formula2 == "sin^2*cos^2" ztemp = sin(@premult2a*z), zextra = cos(@premult2b*z) zf2 = ztemp*ztemp*zextra*zextra elseif @formula2 == "sin(1/z)*cos(1/z)" zextra = 1/(@premult2a*z), ztemp = 1/(@premult2b*z) zf2 = sin(zextra)*cos(ztemp) elseif @formula2 == "sin(1/z)^2" zextra = sin( @premult2a/z ) zf2 = zextra*zextra elseif @formula2 == "sin(z)*cos(1/z)" zf2 = sin(@premult2a*z) * cos(@premult2b/z) elseif @formula2 == "sin(z)*sin(1/z)" zf2 = sin(@premult2a*z) * sin(@premult2b/z) elseif @formula2 == "log^2" zextra = log(@premult2a*z) zf2 = zextra*zextra elseif @formula2 == "sin(mz)*sin(nz)" zf2 = sin(@premult2a*z) * sin(@premult2b*z) elseif @formula2 == "sinh(1/z)*cosh(1/z)" zextra = @premult2a/z, ztemp = @premult2b/z zf2 = sinh(zextra)*cosh(ztemp) elseif @formula2 == "sinh(1/z)^2" zextra = sinh( @premult2a/z ) zf2 = zextra*zextra elseif @formula2 == "sinh*cosh(1/z)" zf2 = sinh(@premult2a*z) * cosh(@premult2b/z) elseif @formula2 == "sinh*sinh(1/z)" zf2 = sinh(@premult2a*z) * sinh(@premult2b/z) elseif @formula2 == "sin*sinh" zf2 = sin(@premult2a*z) * sinh(@premult2b*z) elseif @formula2 == "sin*cosh" zf2 = sin(@premult2a*z) * cosh(@premult2b*z) elseif @formula2 == "sin^2*sinh^2" zextra = sin(@premult2a*z), ztemp = sinh(@premult2b*z) zf2 = ztemp*ztemp*zextra*zextra elseif @formula2 == "sin*e^z" zf2 = sin(@premult2a*z)*exp(@premult2b*z) elseif @formula2 == "cos*e^z" zf2 = cos(@premult2a*z)*exp(@premult2b*z) elseif @formula2 == "sinh*e^z" zf2 = sinh(@premult2a*z)*exp(@premult2b*z) elseif @formula2 == "cosh*e^z" zf2 = cosh(@premult2a*z)*exp(@premult2b*z) elseif @formula2 == "sin*log" zf2 = sin(@premult2a*z)*log(@premult2b*z) elseif @formula2 == "cos*log" zf2 = cos(@premult2a*z)*log(@premult2b*z) elseif @formula2 == "sinh*log" zf2 = sinh(@premult2a*z)*log(@premult2b*z) elseif @formula2 == "cosh*log" zf2 = cosh(@premult2a*z)*log(@premult2b*z) elseif @formula2 == "e^(z^2)" zf2 = exp(@premult2a*z*z) elseif @formula2 == "e^(-(z^2))" zf2 = exp(-(z*z)) elseif @formula2 == "e^(1/z^2)" zf2 = exp(@premult2a/(z*z)) elseif @formula2 == "e^(-1/z^2)" zf2 = exp(-1/(z*z)) elseif @formula2 == "ver" ; versine zf2 = 1 - cos(@premult2a*z) elseif @formula2 == "vcs" ; vercosine zf2 = 1 + cos(@premult2a*z) elseif @formula2 == "cvs" ; coversine zf2 = 1 - sin(@premult2a*z) elseif @formula2 == "cvc" ; covercosine zf2 = 1 + sin(@premult2a*z) elseif @formula2 == "exs" ; exsecant zf2 = 1/cos(@premult2a*z) - 1 elseif @formula2 == "exc" ; excosecant zf2 = 1/sin(@premult2a*z) - 1 elseif @formula2 == "crd" ; chord zf2 = 2 * sin(@premult2a*z/2) elseif @formula2 == "aver" ; arcversine zf2 = acos(1 - @premult2a*z) elseif @formula2 == "avcs" ; arcvercosine zf2 = acos(1 + @premult2a*z) elseif @formula2 == "acvs" ; arccoversine zf2 = asin(1 - @premult2a*z) elseif @formula2 == "acvc" ; arccovercosine zf2 = asin(1 + @premult2a*z) elseif @formula2 == "aexs" ; arcexsecant zf2 = acos( (1/(@premult2a*(z+1)))) elseif @formula2 == "aexc" ; arcexcosecant zf2 = asin( (1/(@premult2a*(z+1)))) elseif @formula2 == "acrd" ; arcchord zf2 = 2 * asin( @premult2a*z/2 ) elseif @formula2 == "abs" zf2 = abs( @premult2a*z ) elseif @formula2 == "conj" zf2 = conj( @premult2a*z ) elseif @formula2 == "flip" zf2 = flip( @premult2a*z ) elseif @formula2 == "ceiling" zf2 = ceil( @premult2a*z ) elseif @formula2 == "floor" zf2 = floor( @premult2a*z ) elseif @formula2 == "truncation" zf2 = trunc( @premult2a*z ) elseif @formula2 == "round" zf2 = round( @premult2a*z ) elseif @formula2 == "atan2" zf2 = atan2( @premult2a*z ) elseif @formula2 == "e^e^z" zf2 = exp(@premult2b*exp( @premult2a*z )) elseif @formula2 == "constant^z" zf2 = @base2^( @premult2a*z ) elseif @formula2 == "constant^z^z" zf2 = @base2^(@premult2b*z^( @premult2a*z )) elseif @formula2 == "real" zf2 = real(z) + flip(0) elseif @formula2 == "imag" zf2 = (0,0) + flip(imag(z)) elseif @formula2 == "conj(flip)" zf2 = conj(@premult2b*flip( @premult2a*z )) elseif @formula2 == "flip(conj)" zf2 = flip(@premult2b* conj(@premult2a*z )) elseif @formula2 == "z" zf2 = @premult2a*z endif ; @formula2 zf2 = @weight2 * @funcmult2 * zf2 if @combo > 5 ; also need func 3 for these combinations if @combo == 9 z = zf2 elseif @combo == 17 z = zf1 + zf2 elseif @combo == 18 z = zf1 * zf2 elseif @combo == 19 z = zf1 / zf2 elseif @combo == 20 z = zf1 ^ zf2 elseif @combo == 21 z = log(zf1)/log(zf2) endif; @combo if @formula3 == "z^2" zf3 = sqr(z) elseif @formula3 == "z^3" zf3 = z * sqr(z) elseif @formula3 == "z^4" zf3 = sqr(sqr(z)) elseif @formula3 == "z^power" zf3 = z ^ @power3 elseif @formula3 == "1/z" zf3 = 1/z elseif @formula3 == "sqrt" zf3 = sqrt(z) elseif @formula3 == "1/z^2" zf3 = 1 / (sqr(z)) elseif @formula3 == "log" zf3 = log(@premult3a*z) elseif @formula3 == "e^z" zf3 = exp(@premult3a*z) elseif @formula3 == "z^z" zf3 = z^(@premult3a*z) elseif @formula3 == "sin" zf3 = sin(@premult3a*z ) elseif @formula3 == "cos" zf3 = cos(@premult3a*z ) elseif @formula3 == "tan" zf3 = tan(@premult3a*z ) elseif @formula3 == "asin" zf3 = asin(@premult3a*z ) elseif @formula3 == "acos" zf3 = acos( @premult3a*z ) elseif @formula3 == "atan" zf3 = atan( @premult3a*z ) elseif @formula3 == "sinh" zf3 = sinh( @premult3a*z ) elseif @formula3 == "cosh" zf3 = cosh( @premult3a*z ) elseif @formula3 == "tanh" zf3 = tanh( @premult3a*z ) elseif @formula3 == "asinh" zf3 = asinh( @premult3a*z ) elseif @formula3 == "acosh" zf3 = acosh( @premult3a*z ) elseif @formula3 == "atanh" zf3 = atanh( @premult3a*z ) elseif @formula3 == "log(1/z)" zf3 = log( 1/(@premult3a*z) ) elseif @formula3 == "log(log)" zf3 = log(@premult3b* log( @premult3a*z )) elseif @formula3 == "e^-z" zf3 = exp( -z ) elseif @formula3 == "e^(1/z)" zf3 = exp( @premult3a/z ) elseif @formula3 == "z^-z" zf3 = z^(-@premult3a*z) elseif @formula3 == "sin^2" zextra = sin( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "cos^2" zextra = cos( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "tan^2" zextra = tan( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "cot" zf3 = cotan( @premult3a*z ) elseif @formula3 == "sec" zf3 = 1/cos( @premult3a*z ) elseif @formula3 == "csc" zf3 = 1/sin( @premult3a*z ) elseif @formula3 == "cot^2" zextra = cotan( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "sec^2" zextra = 1/cos( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "csc^2" zextra = 1/sin( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "z^z^z" zextra = z^(@premult3a*z) zf3 = z^zextra elseif @formula3 == "1/z^z^z" zextra = z^(@premult3a*z) zf3 = 1/( z^zextra ) elseif @formula3 == "log(-z)" zf3 = log(-@premult3a*z) elseif @formula3 == "1/log" zf3 = 1/log( @premult3a*z ) elseif @formula3 == "zlog" zf3 = z * log( @premult3a*z ) elseif @formula3 == "sin(z)/z" zf3 = sin( @premult3a*z ) / z elseif @formula3 == "cos(z)/z" zf3 = cos( @premult3a*z ) / z elseif @formula3 == "sin*cos" zf3 = sin( @premult3a*z ) * cos( @premult3b*z ) elseif @formula3 == "sin(z^2)" zf3 = sin( @premult3a*z^2 ) elseif @formula3 == "e^(-1/z)" zf3 = exp( -@premult3a/z ) elseif @formula3 == "ze^z" zf3 = z * exp( @premult3a*z ) elseif @formula3 == "ze^-z" zf3 = z * exp( -z ) elseif @formula3 == "ze^(1/z)" zf3 = z * exp( @premult3a/z ) elseif @formula3 == "ze^(-1/z)" zf3 = z * exp( -1/z ) elseif @formula3 == "1/z^3" zf3 = 1 / ( z * sqr(z) ) elseif @formula3 == "acot" zf3 = atan( 1 / @premult3a*z ) elseif @formula3 == "asec" zf3 = acos( 1 / @premult3a*z ) elseif @formula3 == "acsc" zf3 = asin( 1 / @premult3a*z ) elseif @formula3 == "tan(z)/z" zf3 = tan( @premult3a*z ) / z elseif @formula3 == "cot(z)/z" zf3 = cotan( @premult3a*z ) / z elseif @formula3 == "sec(z)/z" zf3 = 1 / ( z * cos( @premult3a*z )) elseif @formula3 == "csc(z)/z" zf3 = 1 / ( z * sin( @premult3a*z )) elseif @formula3 == "zsin" zf3 = z * sin( @premult3a*z ) elseif @formula3 == "zcos" zf3 = z * cos( @premult3a*z ) elseif @formula3 == "ztan" zf3 = z * tan( @premult3a*z ) elseif @formula3 == "zcot" zf3 = z * cotan( @premult3a*z ) elseif @formula3 == "zsec" zf3 = z/cos( @premult3a*z ) elseif @formula3 == "zcsc" zf3 = z/sin( @premult3a*z ) elseif @formula3 == "sin(1/z)" zf3 = sin( @premult3a/z ) elseif @formula3 == "cos(1/z)" zf3 = cos( @premult3a/z ) elseif @formula3 == "tan(1/z)" zf3 = tan( @premult3a/z ) elseif @formula3 == "cot(1/z)" zf3 = cotan( @premult3a/z ) elseif @formula3 == "sec(1/z)" zf3 = 1/cos( @premult3a/z ) elseif @formula3 == "csc(1/z)" zf3 = 1/sin( @premult3a/z ) elseif @formula3 == "cotanh" zf3 = cotanh( @premult3a*z ) elseif @formula3 == "sech" zf3 = 1/cosh( @premult3a*z ) elseif @formula3 == "cosech" zf3 = 1/sinh( @premult3a*z ) elseif @formula3 == "acoth" zf3 = atanh( 1/(@premult3a*z) ) elseif @formula3 == "asech" zf3 = acosh( 1/(@premult3a*z) ) elseif @formula3 == "acosech" zf3 = asinh( 1/(@premult3a*z) ) elseif @formula3 == "3-term polynomial" zf3 = @coeff3a * z^@exponent3a + @coeff3b * z^@exponent3b + \ @coeff3c * z^@exponent3c elseif @formula3 == "sinh^2" zextra = sinh(@premult3a*z) zf3 = zextra * zextra elseif @formula3 == "cosh^2" zextra = cosh( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "tanh^2" zextra = tanh(@premult3a*z) zf3 = zextra * zextra elseif @formula3 == "cotanh^2" zextra = cotanh( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "sech^2" zextra = (1,0)/cosh(@premult3a*z) zf3 = zextra * zextra elseif @formula3 == "cosech^2" zextra = (1,0) / sinh( @premult3a*z ) zf3 = zextra * zextra elseif @formula3 == "sinh(1/z)" zf3 = sinh(@premult3a/z) elseif @formula3 == "cosh(1/z)" zf3 = cosh(@premult3a/z) elseif @formula3 == "tanh(1/z)" zf3 = tanh(@premult3a/z) elseif @formula3 == "cotanh(1/z)" zf3 = cotanh(@premult3a/z) elseif @formula3 == "sech(1/z)" zf3 = (1,0)/cosh(@premult3a/z) elseif @formula3 == "cosech(1/z)" zf3 = (1,0)/sinh(@premult3a/z) elseif @formula3 == "sin*tan" zf3 = sin( @premult3a*z ) * tan(@premult3b*z) elseif @formula3 == "sinh*tanh" zf3 = sinh(@premult3a*z) * tanh(@premult3b*z) elseif @formula3 == "sinh*cosh" zf3 = sinh(@premult3a*z) * cosh(@premult3b*z) elseif @formula3 == "sinh^2*cosh^2" ztemp = sinh(@premult3a*z), zextra = cosh(@premult3b*z) zf3 = ztemp*ztemp*zextra*zextra elseif @formula3 == "sin^2*cos^2" ztemp = sin(@premult3a*z), zextra = cos(@premult3b*z) zf3 = ztemp*ztemp*zextra*zextra elseif @formula3 == "sin(1/z)*cos(1/z)" zextra = 1/(@premult3a*z), ztemp = 1/(@premult3b*z) zf3 = sin(zextra)*cos(ztemp) elseif @formula3 == "sin(1/z)^2" zextra = sin( @premult3a/z ) zf3 = zextra*zextra elseif @formula3 == "sin(z)*cos(1/z)" zf3 = sin(@premult3a*z) * cos(@premult3b/z) elseif @formula3 == "sin(z)*sin(1/z)" zf3 = sin(@premult3a*z) * sin(@premult3b/z) elseif @formula3 == "log^2" zextra = log(@premult3a*z) zf3 = zextra*zextra elseif @formula3 == "sin(mz)*sin(nz)" zf3 = sin(@premult3a*z) * sin(@premult3b*z) elseif @formula3 == "sinh(1/z)*cosh(1/z)" zextra = @premult3a/z, ztemp = @premult3b/z zf3 = sinh(zextra)*cosh(ztemp) elseif @formula3 == "sinh(1/z)^2" zextra = sinh( @premult3a/z ) zf3 = zextra*zextra elseif @formula3 == "sinh*cosh(1/z)" zf3 = sinh(@premult3a*z) * cosh(@premult3b/z) elseif @formula3 == "sinh*sinh(1/z)" zf3 = sinh(@premult3a*z) * sinh(@premult3b/z) elseif @formula3 == "sin*sinh" zf3 = sin(@premult3a*z) * sinh(@premult3b*z) elseif @formula3 == "sin*cosh" zf3 = sin(@premult3a*z) * cosh(@premult3b*z) elseif @formula3 == "sin^2*sinh^2" zextra = sin(@premult3a*z), ztemp = sinh(@premult3b*z) zf3 = ztemp*ztemp*zextra*zextra elseif @formula3 == "sin*e^z" zf3 = sin(@premult3a*z)*exp(@premult3b*z) elseif @formula3 == "cos*e^z" zf3 = cos(@premult3a*z)*exp(@premult3b*z) elseif @formula3 == "sinh*e^z" zf3 = sinh(@premult3a*z)*exp(@premult3b*z) elseif @formula3 == "cosh*e^z" zf3 = cosh(@premult3a*z)*exp(@premult3b*z) elseif @formula3 == "sin*log" zf3 = sin(@premult3a*z)*log(@premult3b*z) elseif @formula3 == "cos*log" zf3 = cos(@premult3a*z)*log(@premult3b*z) elseif @formula3 == "sinh*log" zf3 = sinh(@premult3a*z)*log(@premult3b*z) elseif @formula3 == "cosh*log" zf3 = cosh(@premult3a*z)*log(@premult3b*z) elseif @formula3 == "e^(z^2)" zf3 = exp(@premult3a*z*z) elseif @formula3 == "e^(-(z^2))" zf3 = exp(-(z*z)) elseif @formula3 == "e^(1/z^2)" zf3 = exp(@premult3a/(z*z)) elseif @formula3 == "e^(-1/z^2)" zf3 = exp(-1/(z*z)) elseif @formula3 == "ver" ; versine zf3 = 1 - cos(@premult3a*z) elseif @formula3 == "vcs" ; vercosine zf3 = 1 + cos(@premult3a*z) elseif @formula3 == "cvs" ; coversine zf3 = 1 - sin(@premult3a*z) elseif @formula3 == "cvc" ; covercosine zf3 = 1 + sin(@premult3a*z) elseif @formula3 == "exs" ; exsecant zf3 = 1/cos(@premult3a*z) - 1 elseif @formula3 == "exc" ; excosecant zf3 = 1/sin(@premult3a*z) - 1 elseif @formula3 == "crd" ; chord zf3 = 2 * sin(@premult3a*z/2) elseif @formula3 == "aver" ; arcversine zf3 = acos(1 - @premult3a*z) elseif @formula3 == "avcs" ; arcvercosine zf3 = acos(1 + @premult3a*z) elseif @formula3 == "acvs" ; arccoversine zf3 = asin(1 - @premult3a*z) elseif @formula3 == "acvc" ; arccovercosine zf3 = asin(1 + @premult3a*z) elseif @formula3 == "aexs" ; arcexsecant zf3 = acos( (1/(@premult3a*(z+1)))) elseif @formula3 == "aexc" ; arcexcosecant zf3 = asin( (1/(@premult3a*(z+1)))) elseif @formula3 == "acrd" ; arcchord zf3 = 2 * asin( @premult3a*z/2 ) elseif @formula3 == "abs" zf3 = abs( @premult3a*z ) elseif @formula3 == "conj" zf3 = conj( @premult3a*z ) elseif @formula3 == "flip" zf3 = flip( @premult3a*z ) elseif @formula3 == "ceiling" zf3 = ceil( @premult3a*z ) elseif @formula3 == "floor" zf3 = floor( @premult3a*z ) elseif @formula3 == "truncation" zf3 = trunc( @premult3a*z ) elseif @formula3 == "round" zf3 = round( @premult3a*z ) elseif @formula3 == "atan2" zf3 = atan2( @premult3a*z ) elseif @formula3 == "e^e^z" zf3 = exp(@premult3b*exp( @premult3a*z )) elseif @formula3 == "constant^z" zf3 = @base3^( @premult3a*z ) elseif @formula3 == "constant^z^z" zf3 = @base3^(@premult3b*z^( @premult3a*z )) elseif @formula3 == "real" zf3 = real(z) + flip(0) elseif @formula3 == "imag" zf3 = (0,0) + flip(imag(z)) elseif @formula3 == "conj(flip)" zf3 = conj(@premult3b*flip( @premult3a*z )) elseif @formula3 == "flip(conj)" zf3 = flip(@premult3b* conj(@premult3a*z )) elseif @formula3 == "z" zf3 = @premult3a*z endif ; @formula3 zf3 = @weight3 * @funcmult3 * zf3 endif ; @combo if @combo == 0 z = zf1 + zf2 elseif @combo == 1 z = zf1 * zf2 elseif @combo == 2 z = zf1 / zf2 elseif @combo == 3 z = zf2 elseif @combo == 4 z = zf1 ^ zf2 elseif @combo == 5 z = log(zf1)/log(zf2) elseif @combo == 6 z = zf1 + zf2 + zf3 elseif @combo == 7 z = zf1 * zf2 * zf3 elseif @combo == 8 z = zf1 ^ ( zf2 ^ zf3 ) elseif @combo == 9 z = zf3 elseif @combo == 10 z = log(log(zf1)/log(zf2))/log(zf3) elseif @combo == 11 z = zf1 * ( zf2 + zf3 ) elseif @combo == 12 z = zf1 + ( zf2 * zf3 ) elseif @combo == 13 z = zf1 + ( zf2 / zf3 ) elseif @combo == 14 z = ( zf1 + zf2 ) / zf3 elseif @combo == 15 z = zf1 / ( zf2 + zf3 ) elseif @combo == 16 z = ( zf1 * zf2 ) / zf3 elseif @combo == 17 z = zf3 elseif @combo == 18 z = zf3 elseif @combo == 19 z = zf3 elseif @combo == 20 z = zf3 elseif @combo == 21 z = zf3 elseif @combo == 22 z = zf1 + ( zf2 ^ zf3 ) elseif @combo == 23 z = zf1 * ( zf2 ^ zf3 ) elseif @combo == 24 z = zf1 / ( zf2 ^ zf3 ) elseif @combo == 25 z = ( zf1 ^ zf2 ) / zf3 elseif @combo == 26 z = zf3 + (log(zf1)/log(zf2)) elseif @combo == 27 z = zf3 * (log(zf1)/log(zf2)) elseif @combo == 28 z = zf3 / (log(zf1)/log(zf2)) elseif @combo == 29 z = (log(zf1)/log(zf2)) / zf3 else ; @combo == 30 z = zf3 ^ (log(zf1)/log(zf2)) endif ; @combo else z = zf1 endif ; iterations if @blend z = @weightzfn * z + @weightzpwr * zblend^@zpower endif ; @blend if @pmode != 1 z = z + jc endif ; pmode if @biomorph if @biomorphtype == "real + imag" bail = (abs(real(z)) < @biomorphtest) || (abs(imag(z)) < @biomorphtest) elseif @biomorphtype == "real + imag + cabs" bail = (abs(real(z)) < @biomorphtest) || (abs(imag(z)) < @biomorphtest) || (cabs(z) < sqr(@biomorphtest)) elseif @biomorphtype == "real" bail = abs(real(z)) < @biomorphtest elseif @biomorphtype == "imag" bail = abs(imag(z)) < @biomorphtest elseif @biomorphtype == "cabs" bail = cabs(z) < sqr(@biomorphtest) endif ; @biomorphtype else bail = |z| < @bail endif ; @biomorph bailout: bail default: title = "oz3 Functions Mk II" center = (0,0) maxiter = 250 method = multipass periodicity = 0 magn = 0.75 param frequency caption = "Cycle Length" default = 1 min = 1 hint = "This is the frequency that Formulas G and H are executed (Formula \ F is executed every iteration). If 'Cycle length' = 1, then Formulas \ G and H are also executed every iter, else every N iters" endparam param combo caption = "Func Combo" enum = "f[z]+g[z]" "f[z]*g[z]" "f/g" "g[f[z]]" "f^g" "logg[f[z]]" \ "f[z]+g[z]+h[z]" "f*g*h" "f^(g^h)" "h[g[f[z]]]" "logh[logg[f[z]]]" \ "f*(g+h)" "f+(g*h)" "f+(g/h)" "(f+g)/h" "f/(g+h)" "(f*g)/h" \ "h[f[z]+g[z]]" "h[f*g]" "h[f/g]" "h[f^g]" "h[logg[f]]" "f+(g^h)" \ "f*(g^h)" "f/(g^h)" "(f^g)/h" "h+logg[f]" "h*logg[f]" "h/logg[f]" \ "logg[f]/h" "h^(logg[f])" default = 0 min = 0 hint = "Selects the number of functions and how they will be \ combined. 'Formula H' is unused in the 2-function options. 'logg(f)' \ means the logarithm of f to the base g; similarly for the other log \ options" endparam param formula1 caption = "Formula F" enum = "z^2" "z^3" "z^4" "z^power" "1/z" "sqrt" "1/z^2" "log" "e^z" "z^z" \ "sin" "cos" "tan" "asin" "acos" "atan" "sinh" "cosh" "tanh" \ "asinh" "acosh" "atanh" "log(1/z)" "log(log)" "e^-z" \ "e^(1/z)" "z^-z" "sin^2" "cos^2" "tan^2" "cot" "sec" \ "csc" "cot^2" "sec^2" "csc^2" "z^z^z" "1/z^z^z" "log(-z)" \ "1/log" "zlog" "sin(z)/z" "cos(z)/z" "sin*cos" "sin(z^2)" \ "e^(-1/z)" "ze^z" "ze^-z" "ze^(1/z)" "ze^(-1/z)" "1/z^3" \ "acot" "asec" "acsc" "tan(z)/z" "cot(z)/z" "sec(z)/z" \ "csc(z)/z" "zsin" "zcos" "ztan" "zcot" "zsec" "zcsc" \ "sin(1/z)" "cos(1/z)" "tan(1/z)" "cot(1/z)" "sec(1/z)" "csc(1/z)" \ "cotanh" "sech" "cosech" "acoth" "asech" "acosech" \ "3-term polynomial" "sinh^2" "cosh^2" "tanh^2" "cotanh^2" \ "sech^2" "cosech^2" "sinh(1/z)" "cosh(1/z)" "tanh(1/z)" \ "cotanh(1/z)" "sech(1/z)" "cosech(1/z)" "sin*tan" "sinh*tanh" \ "sinh*cosh" "sinh^2*cosh^2" "sin^2*cos^2" \ "sin(1/z)*cos(1/z)" "sin(1/z)^2" "sin(z)*cos(1/z)" "sin(z)*sin(1/z)" \ "log^2" "sin(mz)*sin(nz)" "sinh(1/z)*cosh(1/z)" \ "sinh(1/z)^2" "sinh*cosh(1/z)" "sinh*sinh(1/z)" "sin*sinh" \ "sin*cosh" "sin^2*sinh^2" "sin*e^z" "cos*e^z" \ "sinh*e^z" "cosh*e^z" "sin*log" "cos*log" "sinh*log" \ "cosh*log" "e^(z^2)" "e^(-(z^2))" "e^(1/z^2)" "e^(-1/z^2)" "ver" \ "vcs" "cvs" "cvc" "exs" "exc" "crd" "aver" "avcs" "acvs" "acvc" "aexs" \ "aexc" "acrd" "abs" "conj" "flip" \ "ceiling" "floor" "truncation" "round" "atan2" "e^e^z" \ "constant^z" "constant^z^z" "real" "imag" "conj(flip)" "flip(conj)" "z" default = 0 hint = "Default formula, executed each iteration. For 'z^power', set \ parameter 'Power F'. For '3-term polynomial' set \ 6 params 'Coefficient' & 'Exponent' FA, FB, and FC" endparam param premult1a caption = "Premultiplier F1" default = (1,0) hint = "This constant is multiplied by z before its use as the \ argument of some of the functions (e.g., sin(n*z))." visible = @weight1 != 0.0 endparam param premult1b caption = "Premultiplier F2" default = (1,0) hint = "This constant is multiplied by z before its use as the \ argument of some of the two-function options (e.g. sin(n*z)*cos(m*z))." visible = @weight1 != 0.0 endparam param base1 caption = "Base Constant F" default = (2,0) hint = "If function f is set to 'constant^z' or 'constant^z^z', \ then this parameter sets the constant" visible = (@formula1 == "constant^z") || (@formula1 == "constant^z^z") endparam param funcmult1 caption = "Postmultiplier F" default = (1,0) hint = "This parameter is multiplied by the output of function f \ before combining with functions g and h" endparam param power1 caption = "Power F" default = (5,0) hint = "This is the power used for the first formula series if parameter \ 'Formula F' is set to 'z^power'" visible = @formula1 == "z^power" endparam param coeff1a caption = "Coefficient FA" default = (1,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the coefficient \ of the 1st term" visible = @formula1 == "3-term polynomial" endparam param exponent1a caption = "Exponent FA" default = (6,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the exponent \ of the 1st term" visible = @formula1 == "3-term polynomial" endparam param coeff1b caption = "Coefficient FB" default = (-1,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" visible = @formula1 == "3-term polynomial" endparam param exponent1b caption = "Exponent FB" default = (4,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the exponent \ of the 2nd term" visible = @formula1 == "3-term polynomial" endparam param coeff1c caption = "Coefficient FC" default = (1,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" visible = @formula1 == "3-term polynomial" endparam param exponent1c caption = "Exponent FC" default = (2,0) hint = "If 'Formula F' is set to '3-term polynomial', this is the exponent \ of the 3rd term" visible = @formula1 == "3-term polynomial" endparam param formula2 caption = "Formula G" enum = "z^2" "z^3" "z^4" "z^power" "1/z" "sqrt" "1/z^2" "log" "e^z" "z^z" \ "sin" "cos" "tan" "asin" "acos" "atan" "sinh" "cosh" "tanh" \ "asinh" "acosh" "atanh" "log(1/z)" "log(log)" "e^-z" \ "e^(1/z)" "z^-z" "sin^2" "cos^2" "tan^2" "cot" "sec" \ "csc" "cot^2" "sec^2" "csc^2" "z^z^z" "1/z^z^z" "log(-z)" \ "1/log" "zlog" "sin(z)/z" "cos(z)/z" "sin*cos" "sin(z^2)" \ "e^(-1/z)" "ze^z" "ze^-z" "ze^(1/z)" "ze^(-1/z)" "1/z^3" \ "acot" "asec" "acsc" "tan(z)/z" "cot(z)/z" "sec(z)/z" \ "csc(z)/z" "zsin" "zcos" "ztan" "zcot" "zsec" "zcsc" \ "sin(1/z)" "cos(1/z)" "tan(1/z)" "cot(1/z)" "sec(1/z)" "csc(1/z)" \ "cotanh" "sech" "cosech" "acoth" "asech" "acosech" \ "3-term polynomial" "sinh^2" "cosh^2" "tanh^2" "cotanh^2" \ "sech^2" "cosech^2" "sinh(1/z)" "cosh(1/z)" "tanh(1/z)" \ "cotanh(1/z)" "sech(1/z)" "cosech(1/z)" "sin*tan" "sinh*tanh" \ "sinh*cosh" "sinh^2*cosh^2" "sin^2*cos^2" \ "sin(1/z)*cos(1/z)" "sin(1/z)^2" "sin(z)*cos(1/z)" "sin(z)*sin(1/z)" \ "log^2" "sin(mz)*sin(nz)" "sinh(1/z)*cosh(1/z)" \ "sinh(1/z)^2" "sinh*cosh(1/z)" "sinh*sinh(1/z)" "sin*sinh" \ "sin*cosh" "sin^2*sinh^2" "sin*e^z" "cos*e^z" \ "sinh*e^z" "cosh*e^z" "sin*log" "cos*log" "sinh*log" \ "cosh*log" "e^(z^2)" "e^(-(z^2))" "e^(1/z^2)" "e^(-1/z^2)" "ver" \ "vcs" "cvs" "cvc" "exs" "exc" "crd" "aver" "avcs" "acvs" "acvc" "aexs" \ "aexc" "acrd" "abs" "conj" "flip" \ "ceiling" "floor" "truncation" "round" "atan2" "e^e^z" \ "constant^z" "constant^z^z" "real" "imag" "conj(flip)" "flip(conj)" "z" default = 1 hint = "Formula g, executed every N iterations, where N is set \ by param 'Cycle Length'. For 'z^power', set param 'Power G'. For \ '3-term polynomial' set 6 params 'Coefficient' & 'Exponent' GA, GB, \ and GC" endparam param premult2a caption = "Premultiplier G1" default = (1,0) hint = "This constant is multiplied by z before its use as the \ argument of some of the functions (e.g., sin(n*z))." visible = @weight2 != 0.0 endparam param premult2b caption = "Premultiplier G2" default = (1,0) hint = "This constant is multiplied by z before its use as the \ argument of some of the two-function options (e.g. sin(n*z)*cos(m*z))." visible = @weight2 != 0.0 endparam param base2 caption = "Base Constant G" default = (2,0) hint = "If function g is set to 'constant^z' or 'constant^z^z', \ then this parameter sets the constant" visible = (@formula2 == "constant^z") || (@formula2 == "constant^z^z") endparam param funcmult2 caption = "Postmultiplier G" default = (1,0) hint = "This parameter is multiplied by the output of function g \ before combining with functions f and h" endparam param power2 caption = "Power G" default = (6,0) hint = "This is the power used for the second formula series if parameter \ 'Formula G' is set to 'z^power'" visible = @formula2 == "z^power" endparam param coeff2a caption = "Coefficient GA" default = (1,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the coefficient \ of the 1st term" visible = @formula2 == "3-term polynomial" endparam param exponent2a caption = "Exponent GA" default = (6,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the exponent \ of the 1st term" visible = @formula2 == "3-term polynomial" endparam param coeff2b caption = "Coefficient GB" default = (-1,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" visible = @formula2 == "3-term polynomial" endparam param exponent2b caption = "Exponent GB" default = (4,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the exponent \ of the 2nd term" visible = @formula2 == "3-term polynomial" endparam param coeff2c caption = "Coefficient GC" default = (1,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" visible = @formula2 == "3-term polynomial" endparam param exponent2c caption = "Exponent GC" default = (2,0) hint = "If 'Formula G' is set to '3-term polynomial', this is the exponent \ of the 3rd term" visible = @formula2 == "3-term polynomial" endparam param coeff3a caption = "Coefficient HA" default = (1,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the coefficient \ of the 1st term" visible = @formula3 == "3-term polynomial" endparam param exponent3a caption = "Exponent HA" default = (6,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the exponent \ of the 1st term" visible = @formula3 == "3-term polynomial" endparam param coeff3b caption = "Coefficient HB" default = (-1,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" visible = @formula3 == "3-term polynomial" endparam param exponent3b caption = "Exponent HB" default = (4,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the exponent \ of the 2nd term" visible = @formula3 == "3-term polynomial" endparam param coeff3c caption = "Coefficient HC" default = (1,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" visible = @formula3 == "3-term polynomial" endparam param exponent3c caption = "Exponent HC" default = (2,0) hint = "If 'Formula H' is set to '3-term polynomial', this is the exponent \ of the 3rd term" visible = @formula3 == "3-term polynomial" endparam param formula3 caption = "Formula H" enum = "z^2" "z^3" "z^4" "z^power" "1/z" "sqrt" "1/z^2" "log" "e^z" "z^z" \ "sin" "cos" "tan" "asin" "acos" "atan" "sinh" "cosh" "tanh" \ "asinh" "acosh" "atanh" "log(1/z)" "log(log)" "e^-z" \ "e^(1/z)" "z^-z" "sin^2" "cos^2" "tan^2" "cot" "sec" \ "csc" "cot^2" "sec^2" "csc^2" "z^z^z" "1/z^z^z" "log(-z)" \ "1/log" "zlog" "sin(z)/z" "cos(z)/z" "sin*cos" "sin(z^2)" \ "e^(-1/z)" "ze^z" "ze^-z" "ze^(1/z)" "ze^(-1/z)" "1/z^3" \ "acot" "asec" "acsc" "tan(z)/z" "cot(z)/z" "sec(z)/z" \ "csc(z)/z" "zsin" "zcos" "ztan" "zcot" "zsec" "zcsc" \ "sin(1/z)" "cos(1/z)" "tan(1/z)" "cot(1/z)" "sec(1/z)" "csc(1/z)" \ "cotanh" "sech" "cosech" "acoth" "asech" "acosech" \ "3-term polynomial" "sinh^2" "cosh^2" "tanh^2" "cotanh^2" \ "sech^2" "cosech^2" "sinh(1/z)" "cosh(1/z)" "tanh(1/z)" \ "cotanh(1/z)" "sech(1/z)" "cosech(1/z)" "sin*tan" "sinh*tanh" \ "sinh*cosh" "sinh^2*cosh^2" "sin^2*cos^2" \ "sin(1/z)*cos(1/z)" "sin(1/z)^2" "sin(z)*cos(1/z)" "sin(z)*sin(1/z)" \ "log^2" "sin(mz)*sin(nz)" "sinh(1/z)*cosh(1/z)" \ "sinh(1/z)^2" "sinh*cosh(1/z)" "sinh*sinh(1/z)" "sin*sinh" \ "sin*cosh" "sin^2*sinh^2" "sin*e^z" "cos*e^z" \ "sinh*e^z" "cosh*e^z" "sin*log" "cos*log" "sinh*log" \ "cosh*log" "e^(z^2)" "e^(-(z^2))" "e^(1/z^2)" "e^(-1/z^2)" "ver" \ "vcs" "cvs" "cvc" "exs" "exc" "crd" "aver" "avcs" "acvs" "acvc" "aexs" \ "aexc" "acrd" "abs" "conj" "flip" \ "ceiling" "floor" "truncation" "round" "atan2" "e^e^z" \ "constant^z" "constant^z^z" "real" "imag" "conj(flip)" "flip(conj)" "z" default = 2 hint = "Formula h, executed every N iterations if param 'Func Combo' \ requires func h. N is set by param 'Cycle Length'. For 'z^power', \ set param 'Power H'. For '3-term polynomial' set 6 params 'Coefficient' \ & 'Exponent' HA, HB, and HC" endparam param premult3a caption = "Premultiplier H1" default = (1,0) hint = "This constant is multiplied by z before its use as the \ argument of some of the functions (e.g., sin(n*z))." visible = @weight3 != 0.0 endparam param premult3b caption = "Premultiplier H2" default = (1,0) hint = "This constant is multiplied by z before its use as the \ argument of some of the two-function options (e.g. sin(n*z)*cos(m*z))." visible = @weight3 != 0.0 endparam param base3 caption = "Base Constant H" default = (2,0) hint = "If function h is set to 'constant^z' or 'constant^z^z', \ then this parameter sets the constant" visible = (@formula3 == "constant^z") || (@formula3 == "constant^z^z") endparam param funcmult3 caption = "Postmultiplier H" default = (1,0) hint = "This parameter is multiplied by the output of function h \ before combining with functions f and g" endparam param power3 caption = "Power H" default = (6,0) hint = "This is the power used for the third formula series if parameter \ 'Formula H' is set to 'z^power'" visible = @formula3 == "z^power" endparam param weight1 caption = "Formula F Weight" default = 1.0 hint = "This is the relative proportion of Formula F that is combined with \ the other formulas every N iterations" endparam param weight2 caption = "Formula G Weight" default = 1.0 hint = "This is the relative proportion of Formula G that is combined with \ the other formulas every N iterations" endparam param weight3 caption = "Formula H Weight" default = 1.0 hint = "This is the relative proportion of Formula H that is combined with \ the other formulas every N iterations" endparam param blend caption = "Blend Z^Power?" default = FALSE hint = "If enabled, the iterated function can be blended into a normal \ z^power Mandelbrot function; set parameter 'Z Power' to fix exponent, \ and 'Z Weight' and 'Function Weight' to fix blend proportions" endparam param weightzfn caption = "Function Weight" default = -0.1 hint = "If 'Blend Z^Power' is enabled, then this is the fraction of the \ function that is blended in with the normal z^power Mandelbrot" visible = @blend == TRUE endparam param weightzpwr caption = "Z^Power Weight" default = 1.0 hint = "If 'Blend Z^Power' is enabled, then this is the fraction of the \ normal z^power Mandelbrot that is blended in with the function" visible = @blend == TRUE endparam param zpower caption = "Z Power" default = (2,0) hint = "If 'Blend Z^Power' is enabled, then this is the exponent for the \ normal z^power Mandelbrot" visible = @blend == TRUE endparam param pixelformula caption = "Pixel Formula" enum = "p" "p^2" "p^3" "p^4" "p^power" "1/p" "sqrt(p)" "1/p^2" "log(p)" "e^p" "p^p" \ "sin(p)" "cos(p)" \ "tan(p)" "asin(p)" "acos(p)" "atan(p)" "sinh(p)" "cosh(p)" "tanh(p)" \ "asinh(p)" "acosh(p)" "atanh(p)" "log(1/p)" "log(log(p))" "e^-p" \ "e^(1/p)" "p^-p" "sin(p)^2" "cos(p)^2" "tan(p)^2" "cot(p)" "sec(p)" \ "csc(p)" "cot(p)^2" "sec(p)^2" "csc(p)^2" "p^p^p" "1/p^p^p" "log(-p)" \ "1/log(p)" "plog(p)" "sin(p)/p" "cos(p)/p" "sin(p)*cos(p)" "sin(p^2)" \ "e^(-1/p)" "pe^p" "pe^-p" "pe^(1/p)" "pe^(-1/p)" "p^3" "1/p^3" \ "acot(p)" "asec(p)" "acsc(p)" "tan(p)/p" "cot(p)/p" "sec(p)/p" \ "csc(p)/p" "psin(p)" "pcos(p)" "ptan(p)" "pcot(p)" "psec(p)" "pcsc(p)" \ "sin(1/p)" "cos(1/p)" "tan(1/p)" "cot(1/p)" "sec(1/p)" "csc(1/p)" \ "cotanh(p)" "sech(p)" "cosech(p)" "acoth(p)" "asech(p)" "acosech(p)" \ "3-term polynomial" "sinh(p)^2" "cosh(p)^2" "tanh(p)^2" "cotanh(p)^2" \ "sech(p)^2" "cosech(p)^2" "sinh(1/p)" "cosh(1/p)" "tanh(1/p)" \ "cotanh(1/p)" "sech(1/p)" "cosech(1/p)" "sin(p)tan(p)" "sinh(p)tanh(p)" \ "sinh(p)cosh(p)" "sinh(p)^2*cosh(p)^2" "sin(p)^2*cos(p)^2" \ "sin(1/p)*cos(1/p)" "sin(1/p)^2" "sin(p)cos(1/p)" "sin(p)sin(1/p)" \ "log(p)^2" "sin(p)sin(2p)" "e^2p" "e^-2p" "sinh(1/p)cosh(1/p)" \ "sinh(1/p)^2" "sinh(p)cosh(1/p)" "sinh(p)sinh(1/p)" "sin(p)sinh(p)" \ "sin(p)cosh(p)" "sin(p)^2*sinh(p)^2" "sin(p)e^p" "cos(p)e^p" \ "sinh(p)e^p" "cosh(p)e^p" "sin(p)log(p)" "cos(p)log(p)" "sinh(p)log(p)" \ "cosh(p)log(p)" default = 0 hint = "Pixel value (Mand) or seed (Julia) can be initialized \ before iterating. For 'p^power', set parameter 'Pixel Power'; \ for '3-term polynomial', set 'Coeff Pa', 'Exponent Pa', 'Coeff Pb', \ 'Exponent Pb', 'Coeff Pc', 'Exponent Pc'. 'p' results in normal \ initialization" endparam param ppower caption = "Pixel Power" default = (5,0) hint = "This is the power used if parameter \ 'Pixel Formula' is set to 'p^power'" visible = @pixelformula == "p^power" endparam param coeffpa caption = "Coeff Pa" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 1st term" visible = @pixelformula == "3-term polynomial" endparam param exponentpa caption = "Exponent Pa" default = (6,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 1st term" visible = @pixelformula == "3-term polynomial" endparam param coeffpb caption = "Coeff Pb" default = (-1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 2nd term" visible = @pixelformula == "3-term polynomial" endparam param exponentpb caption = "Exponent Pb" default = (4,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 2nd term" visible = @pixelformula == "3-term polynomial" endparam param coeffpc caption = "Coeff Pc" default = (1,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the coefficient \ of the 3rd term" visible = @pixelformula == "3-term polynomial" endparam param exponentpc caption = "Exponent Pc" default = (2,0) hint = "If 'Pixel Formula' is set to '3-term polynomial', this is the power \ of the 3rd term" visible = @pixelformula == "3-term polynomial" endparam param pmode caption = "Pixel Mode" default = 0 enum = "Post-add" "Pre-add" "Both" hint = "'Post-add' -- formula is executed, then pixel/constant is added to result; \ 'Pre-add' -- pixel is added to z, then formula executed; 'Both' -- pixel added, \ formula executed, then pixel added again to result" endparam param jconstant caption = "Julia Constant" default = (0,0) hint = "Iteration constant" endparam param bail caption = "Bailout Value" default = 64.0 hint = "Value needed to 'escape' to infinity" visible = !@biomorph endparam param biomorph caption = "Biomorph Bailout?" default = FALSE hint = "Enabling this setting changes the bailout condition to match \ Pickover's 'biomorph' definition. For coloring, consider using \ 'Biomorph' in the public folder 'jam2.ucl'." endparam param biomorphtest caption = "Biomorph Bailout Test" default = 10.0 hint = "The bailout value for the 'Biomorph' test." visible = @biomorph endparam param biomorphtype caption = "Biomorph Type" enum = "real" "imag" "real + imag" "real + imag + cabs" "cabs" default = 3 hint = "This determines the bailout condition for the Biomorph." visible = @biomorph endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-3functionsV2" jconstant = #pixel frequency = frequency combo = combo formula1 = formula1 formula2 = formula2 formula3 = formula3 power1 = power1 power2 = power2 power3 = power3 premult1a = premult1a premult1b = premult1b premult2a = premult2a premult2b = premult2b premult3a = premult3a premult3b = premult3b funcmult1 = funcmult1 funcmult2 = funcmult2 funcmult3 = funcmult3 base1 = base1 base2 = base2 base3 = base3 weight1 = weight1 weight2 = weight2 weight3 = weight3 coeff1a = coeff1a exponent1a = exponent1a coeff1b = coeff1b exponent1b = exponent1b coeff1c = coeff1c exponent1c = exponent1c coeff2a = coeff2a exponent2a = exponent2a coeff2b = coeff2b exponent2b = exponent2b coeff2c = coeff2c exponent2c = exponent2c coeff3a = coeff3a exponent3a = exponent3a coeff3b = coeff3b exponent3b = exponent3b coeff3c = coeff3c exponent3c = exponent3c blend = blend weightzfn = weightzfn weightzpwr = weightzpwr zpower = zpower pixelformula = pixelformula ppower = ppower coeffpa = coeffpa exponentpa = exponentpa coeffpb = coeffpb exponentpb = exponentpb coeffpc = coeffpc exponentpc = exponentpc pmode = pmode bail = bail biomorph = biomorph biomorphtest = biomorphtest biomorphtype = biomorphtype mandy = julia julia = mandy } comment { This file contains streamlined formulas for series representations of various hypergeometric functions, pFq(a1,...,am; b1,...,bn; z). The functions included are 1F1, 1F2, 2F1, 2F2, 2F3, 3F0, 3F1, 3F2, 3F3. Originally written by Joe Maddry beginning on 02 Jan 2022. } jam-hypergeometric-1F1 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 1F1(a; b; z), the confluent hypergeometric functions of the first kind, ; ; 1F1(a; b; z) = Sum[ ( a(n) / b(n) ) * (z^n)/n! ], n = 0 -> infinity, or ; ; ___ ; 1F1(a; b; z) = \ [ (a)n/(b)n * z^n / n!] , where (a)n and (b)n are ; /__ ; n ; ; rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float b1denom[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 b1denom[0] = 1.0 b1denom[1] = @b1 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = a1numer[gindex] * factorial[gindex] / b1denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 1F1(a; b; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 1F1(a; b; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a" default = 1.0 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function 1F1(a; b; z)." endparam param b1 caption = "Fn Constant b" default = 2.0 hint = "This value is the denominator parameter 'b' in the series \ representation of the hypergeometric function 1F1(a; b; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 1F1(a; b; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-1F1" a1 = a1 b1 = b1 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-1F2 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 1F2(a; b1, b2; z): ; ; 1F2(a; b1, b2; z) = Sum[ ( a(n) / (b1(n)*b2(n)) ) * (z^n)/n! ], n = 0 -> ; infinity, or, ; ; ___ ; 1F2(a; b1, b2; z) = \ [ (a)n/((b1)n * (b2)n) * z^n / n!] , where (a)n and ; /__ ; n ; ; the (bi)ns are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float b1denom[@terms] float b2denom[@terms] float denom[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 b1denom[0] = 1.0 b1denom[1] = @b1 b2denom[0] = 1.0 b2denom[1] = @b2 denom[0] = 1.0 denom[1] = @b1 * @b2 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) b2denom[gindex] = b2denom[itemp] * (@b2 + itemp) denom[gindex] = b1denom[gindex] * b2denom[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = a1numer[gindex] * factorial[gindex] / denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 1F2(a; b1, b2; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 1F2(a; b1, b2; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a" default = -0.5 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function 1F2(a; b1, b2; z)." endparam param b1 caption = "Fn Constant b1" default = 0.25 hint = "This value is the denominator parameter 'b1' in the series \ representation of the hypergeometric function 1F2(a; b1, b2; z)." endparam param b2 caption = "Fn Constant b2" default = 1.0 hint = "This value is the denominator parameter 'b2' in the series \ representation of the hypergeometric function 1F2(a; b1, b2; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 1F2(a; b1, b2; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-1F2" a1 = a1 b1 = b1 b2 = b2 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-2F1 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 2F1(a1, a2; b; z), ; ; 2F1(a1, a2; b; z) = Sum[ ( a1(n)*a2(n) / b(n) ) * (z^n)/n! ], n = 0 -> infinity, or ; ; ___ ; 2F1(a1, a2; b; z) = \ [ (a1)n(a2)n/(b)n * z^n / n!] , where ; /__ ; n ; ; the (ai)ns and (b)n are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float a2numer[@terms] float b1denom[@terms] float numer[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 a2numer[0] = 1.0 a2numer[1] = @a2 b1denom[0] = 1.0 b1denom[1] = @b1 numer[0] = 1.0 numer[1] = @a1 * @a2 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) a2numer[gindex] = a2numer[itemp] * (@a2 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) numer[gindex] = a1numer[gindex] * a2numer[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = numer[gindex] * factorial[gindex] / b1denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 2F1(a1, a2; b; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 2F1(a1, a2; b; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a1" default = -0.5 hint = "This value is the numerator parameter 'a1' in the series \ representation of the hypergeometric function 2F1(a1, a2; b; z)." endparam param a2 caption = "Fn Constant a2" default = 0.75 hint = "This value is the numerator parameter 'a2' in the series \ representation of the hypergeometric function 2F1(a1, a2; b; z)." endparam param b1 caption = "Fn Constant b" default = 2.0 hint = "This value is the denominator parameter 'b' in the series \ representation of the hypergeometric function 2F1(a1, a2; b; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 2F1(a1, a2; b; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-2F1" a1 = a1 a2 = a2 b1 = b1 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-2F2 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 2F2(a1, a2; b1, b2; z): ; ; 2F2(a1, a2; b1, b2; z) = Sum[ ( a1(n)*a2(n) / (b1(n)*b2(n)) ) * (z^n)/n! ], ; n = 0 -> infinity, or, ; ; ___ ; 2F2(a1, a2; b1, b2; z) = \ [ (a1)n * (a2)n / ((b1)n * (b2)n) * z^n / n!], ; /__ ; n ; ; where the (ai)n and (bi)n are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float a2numer[@terms] float b1denom[@terms] float b2denom[@terms] float numer[@terms] float denom[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 a2numer[0] = 1.0 a2numer[1] = @a2 b1denom[0] = 1.0 b1denom[1] = @b1 b2denom[0] = 1.0 b2denom[1] = @b2 numer[0] = 1.0 numer[1] = @a1 * @a2 denom[0] = 1.0 denom[1] = @b1 * @b2 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) a2numer[gindex] = a2numer[itemp] * (@a2 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) b2denom[gindex] = b2denom[itemp] * (@b2 + itemp) numer[gindex] = a1numer[gindex] * a2numer[gindex] denom[gindex] = b1denom[gindex] * b2denom[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = numer[gindex] * factorial[gindex] / denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 2F2(a1, a2; b1, b2; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 2F2(a1, a2; b1, b2; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a1" default = -0.5 hint = "This value is the numerator parameter 'a1' in the series \ representation of the hypergeometric function \ 2F2(a1, a2; b1, b2; z)." endparam param a2 caption = "Fn Constant a2" default = -0.333333333333333333333333333333 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function \ 2F2(a1, a2; b1, b2; z)." endparam param b1 caption = "Fn Constant b1" default = 0.25 hint = "This value is the denominator parameter 'b1' in the series \ representation of the hypergeometric function \ 2F2(a1, a2; b1, b2; z)." endparam param b2 caption = "Fn Constant b2" default = 2.0 hint = "This value is the denominator parameter 'b2' in the series \ representation of the hypergeometric function \ 2F2(a1, a2; b1, b2; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 2F2(a1, a2; b1, b2; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-2F2" a1 = a1 a2 = a2 b1 = b1 b2 = b2 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-2F3 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 2F3(a1, a2; b1, b2, b3; z): ; ; 2F3(a1, a2; b1, b2; z) = Sum[ ( a1(n)*a2(n) /( b1(n)*b2(n)*b3(n) ) * (z^n)/n!) ], ; n = 0 -> infinity, or, ; ; ___ ; 2F3(a1, a2; b1, b2; z) = \ [ (a1)n * (a2)n / ((b1)n * (b2)n * b3(n)) * z^n / n!], ; /__ ; n ; ; where the (ai)n and (bi)n are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float a2numer[@terms] float b1denom[@terms] float b2denom[@terms] float b3denom[@terms] float numer[@terms] float denom[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 a2numer[0] = 1.0 a2numer[1] = @a2 b1denom[0] = 1.0 b1denom[1] = @b1 b2denom[0] = 1.0 b2denom[1] = @b2 b3denom[0] = 1.0 b3denom[1] = @b3 numer[0] = 1.0 numer[1] = @a1 * @a2 denom[0] = 1.0 denom[1] = @b1 * @b2 * @b3 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) a2numer[gindex] = a2numer[itemp] * (@a2 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) b2denom[gindex] = b2denom[itemp] * (@b2 + itemp) b3denom[gindex] = b3denom[itemp] * (@b3 + itemp) numer[gindex] = a1numer[gindex] * a2numer[gindex] denom[gindex] = b1denom[gindex] * b2denom[gindex] * b3denom[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = numer[gindex] * factorial[gindex] / denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 2F3(a1, a2; b1, b2, b3; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 2F3(a1, a2; b1, b2, b3; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a1" default = -0.25 hint = "This value is the numerator parameter 'a1' in the series \ representation of the hypergeometric function \ 2F3(a1, a2; b1, b2, b3; z)." endparam param a2 caption = "Fn Constant a2" default = 0.375 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function \ 2F3(a1, a2; b1, b2, b3; z)." endparam param b1 caption = "Fn Constant b1" default = 0.2 hint = "This value is the denominator parameter 'b1' in the series \ representation of the hypergeometric function \ 2F3(a1, a2; b1, b2, b3; z)." endparam param b2 caption = "Fn Constant b2" default = 1.0 hint = "This value is the denominator parameter 'b2' in the series \ representation of the hypergeometric function \ 2F3(a1, a2; b1, b2, b3; z)." endparam param b3 caption = "Fn Constant b3" default = 1.6 hint = "This value is the denominator parameter 'b3' in the series \ representation of the hypergeometric function \ 2F3(a1, a2; b1, b2, b3; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 2F3(a1, a2; b1, b2, b3; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-2F3" a1 = a1 a2 = a2 b1 = b1 b2 = b2 b3 = b3 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-3F0 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 3F0(a1, a2, a3; ; z), ; ; 3F0(a1, a2, a3; ; z) = Sum[ ( a1(n)*a2(n)*a3(n) ) * (z^n)/n! ], n = 0 -> infinity, or ; ; ___ ; 3F0(a1, a2, a3; ; z) = \ [ (a1)n(a2)n(a3)n * z^n / n!] , where ; /__ ; n ; ; the (ai)ns are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float a2numer[@terms] float a3numer[@terms] float numer[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 a2numer[0] = 1.0 a2numer[1] = @a2 a3numer[0] = 1.0 a3numer[1] = @a3 numer[0] = 1.0 numer[1] = @a1 * @a2 * @a3 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) a2numer[gindex] = a2numer[itemp] * (@a2 + itemp) a3numer[gindex] = a3numer[itemp] * (@a3 + itemp) numer[gindex] = a1numer[gindex] * a2numer[gindex] * a3numer[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = numer[gindex] * factorial[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 3F0(a1, a2, a3; ; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 3F0(a1, a2, a3; ; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a1" default = -1.5 hint = "This value is the numerator parameter 'a1' in the series \ representation of the hypergeometric function 3F0(a1, a2, a3; ; z)." endparam param a2 caption = "Fn Constant a2" default = -0.75 hint = "This value is the numerator parameter 'a2' in the series \ representation of the hypergeometric function 3F0(a1, a2, a3; ; z)." endparam param a3 caption = "Fn Constant a3" default = 0.25 hint = "This value is the numerator parameter 'a2' in the series \ representation of the hypergeometric function 3F0(a1, a2, a3; ; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 3F0(a1, a2, a3; ; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-3F0" a1 = a1 a2 = a2 a3 = a3 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-3F1 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 3F1(a1, a2, a3; b; z), ; ; 3F1(a1, a2, a3; b; z) = Sum[ ( a1(n)*a2(n)*a3(n) / b(n) ) * (z^n)/n! ], n = 0 -> ; infinity, or, ; ; ___ ; 2F1(a1, a2, a3; b; z) = \ [ (a1)n(a2)n(a3)n/(b)n * z^n / n!] , where ; /__ ; n ; ; the (ai)ns and (b)n are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float a2numer[@terms] float a3numer[@terms] float b1denom[@terms] float numer[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 a2numer[0] = 1.0 a2numer[1] = @a2 a3numer[0] = 1.0 a3numer[1] = @a3 b1denom[0] = 1.0 b1denom[1] = @b1 numer[0] = 1.0 numer[1] = @a1 * @a2 * @a3 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) a2numer[gindex] = a2numer[itemp] * (@a2 + itemp) a3numer[gindex] = a3numer[itemp] * (@a3 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) numer[gindex] = a1numer[gindex] * a2numer[gindex] * a3numer[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = numer[gindex] * factorial[gindex] / b1denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 3F1(a1, a2, a3; b; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 3F1(a1, a2, a3; b; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a1" default = -0.5 hint = "This value is the numerator parameter 'a1' in the series \ representation of the hypergeometric function 3F1(a1, a2, a3; b; z)." endparam param a2 caption = "Fn Constant a2" default = 0.25 hint = "This value is the numerator parameter 'a2' in the series \ representation of the hypergeometric function 3F1(a1, a2, a3; b; z)." endparam param a3 caption = "Fn Constant a3" default = 0.75 hint = "This value is the numerator parameter 'a2' in the series \ representation of the hypergeometric function 3F1(a1, a2, a3; b; z)." endparam param b1 caption = "Fn Constant b" default = 0.66666666666666666666667 hint = "This value is the denominator parameter 'b' in the series \ representation of the hypergeometric function 3F1(a1, a2, a3; b; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 3F1(a1, a2, a3; b; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-3F1" a1 = a1 a2 = a2 a3 = a3 b1 = b1 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-3F2 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 3F2(a1, a2, a3; b1, b2; z): ; ; 3F2(a1, a2, a3; b1, b2; z) = Sum[ ( a1(n)*a2(n)*a3(n) / (b1(n)*b2(n)) ) * (z^n)/n! ], ; n = 0 -> infinity, or, ; ; ___ ; 3F2(a1, a2, a3; b1, b2; z) = \ [ (a1)n * (a2)n * (a3)n / ((b1)n * (b2)n) * z^n / n!], ; /__ ; n ; ; where the (ai)n and (bi)n are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float a2numer[@terms] float a3numer[@terms] float b1denom[@terms] float b2denom[@terms] float numer[@terms] float denom[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 a2numer[0] = 1.0 a2numer[1] = @a2 a3numer[0] = 1.0 a3numer[1] = @a3 b1denom[0] = 1.0 b1denom[1] = @b1 b2denom[0] = 1.0 b2denom[1] = @b2 numer[0] = 1.0 numer[1] = @a1 * @a2 * @a3 denom[0] = 1.0 denom[1] = @b1 * @b2 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) a2numer[gindex] = a2numer[itemp] * (@a2 + itemp) a3numer[gindex] = a3numer[itemp] * (@a3 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) b2denom[gindex] = b2denom[itemp] * (@b2 + itemp) numer[gindex] = a1numer[gindex] * a2numer[gindex] * a3numer[gindex] denom[gindex] = b1denom[gindex] * b2denom[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = numer[gindex] * factorial[gindex] / denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 3F2(a1, a2, a3; b1, b2; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 3F2(a1, a2, a3; b1, b2; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a1" default = -1.25 hint = "This value is the numerator parameter 'a1' in the series \ representation of the hypergeometric function \ 3F2(a1, a2, a3; b1, b2; z)." endparam param a2 caption = "Fn Constant a2" default = -0.333333333333333333333333333333 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function \ 3F2(a1, a2, a3; b1, b2; z)." endparam param a3 caption = "Fn Constant a3" default = 0.25 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function \ 3F2(a1, a2, a3; b1, b2; z)." endparam param b1 caption = "Fn Constant b1" default = -0.5 hint = "This value is the denominator parameter 'b1' in the series \ representation of the hypergeometric function \ 3F2(a1, a2, a3; b1, b2; z)." endparam param b2 caption = "Fn Constant b2" default = 1.0 hint = "This value is the denominator parameter 'b2' in the series \ representation of the hypergeometric function \ 3F2(a1, a2, a3; b1, b2; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 3F2(a1, a2, a3; b1, b2; z). \ The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-3F2" a1 = a1 a2 = a2 a3 = a3 b1 = b1 b2 = b2 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-hypergeometric-3F3 { ; jam 220102 ; This formula implements an optimized version of the generalized hypergeometric ; function 3F3(a1, a2, a3; b1, b2, b3; z): ; ; 3F3(a1, a2, a3; b1, b2, b3; z) = Sum[ ( a1(n)*a2(n)*a3(n) / (b1(n)*b2(n)*b3(n)) ) * ; (z^n)/n! ], ; n = 0 -> infinity, or, ; ; ___ ; 3F3(a1, a2, a3; b1, b2, b3; z) = \ [ (a1)n * (a2)n * (a3)n / ((b1)n * (b2)n * ; /__ ; n ; ; (b3)n) * z^n / n!], ; ; where the (ai)n and (bi)n are rising Pochhammer symbols. global: ; Declare arrays for various coefficient components float a1numer[@terms] float a2numer[@terms] float a3numer[@terms] float b1denom[@terms] float b2denom[@terms] float b3denom[@terms] float numer[@terms] float denom[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable ; Initialize the factorial array --- factorial[n] = 1/n! factorial[0] = 1.0 factorial[1] = 1.0 gindex = 2 while gindex < @terms factorial[gindex] = factorial[gindex - 1] / gindex gindex = gindex + 1 endwhile ; gindex ; Initialize the numerator and denominator arrays a1numer[0] = 1.0 a1numer[1] = @a1 a2numer[0] = 1.0 a2numer[1] = @a2 a3numer[0] = 1.0 a3numer[1] = @a3 b1denom[0] = 1.0 b1denom[1] = @b1 b2denom[0] = 1.0 b2denom[1] = @b2 b3denom[0] = 1.0 b3denom[1] = @b3 numer[0] = 1.0 numer[1] = @a1 * @a2 * @a3 denom[0] = 1.0 denom[1] = @b1 * @b2 * @b3 gindex = 2 while gindex < @terms itemp = gindex - 1 a1numer[gindex] = a1numer[itemp] * (@a1 + itemp) a2numer[gindex] = a2numer[itemp] * (@a2 + itemp) a3numer[gindex] = a3numer[itemp] * (@a3 + itemp) b1denom[gindex] = b1denom[itemp] * (@b1 + itemp) b2denom[gindex] = b2denom[itemp] * (@b2 + itemp) b3denom[gindex] = b3denom[itemp] * (@b3 + itemp) numer[gindex] = a1numer[gindex] * a2numer[gindex] * a3numer[gindex] denom[gindex] = b1denom[gindex] * b2denom[gindex] * b3denom[gindex] gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 while gindex < @terms coefficient[gindex] = numer[gindex] * factorial[gindex] / denom[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z zpower[1] = #z lindex = 2 while lindex < @terms zpower[lindex] = zpower[lindex - 1] * #z lindex = lindex + 1 endwhile ; lindex ; Calculate the new value of #z as z(n+1) = 3F3(a1, a2, a3; b1, b2, b3; z(n)) + jc lindex = 0 #z = (0,0) while lindex < @terms #z = #z + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = #z + jc bailout: |#z| < @bail default: title = "pFq 3F3(a1, a2, a3; b1, b2, b3; z)" maxiter = 2000 periodicity = 0 method = multipass center = (0,0) magn = 0.1 angle = 0.0 param a1 caption = "Fn Constant a1" default = -2.5 hint = "This value is the numerator parameter 'a1' in the series \ representation of the hypergeometric function \ 3F3(a1, a2, a3; b1, b2, b3; z)." endparam param a2 caption = "Fn Constant a2" default = -0.333333333333333333333333333333 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function \ 3F3(a1, a2, a3; b1, b2, b3; z)." endparam param a3 caption = "Fn Constant a3" default = 0.5 hint = "This value is the numerator parameter 'a' in the series \ representation of the hypergeometric function \ 3F3(a1, a2, a3; b1, b2, b3; z)." endparam param b1 caption = "Fn Constant b1" default = -0.25 hint = "This value is the denominator parameter 'b1' in the series \ representation of the hypergeometric function \ 3F3(a1, a2, a3; b1, b2, b3; z)." endparam param b2 caption = "Fn Constant b2" default = 0.25 hint = "This value is the denominator parameter 'b2' in the series \ representation of the hypergeometric function \ 3F3(a1, a2, a3; b1, b2, b3; z)." endparam param b3 caption = "Fn Constant b3" default = 3.0 hint = "This value is the denominator parameter 'b2' in the series \ representation of the hypergeometric function \ 3F3(a1, a2, a3; b1, b2, b3; z)." endparam param terms caption = "Number of Terms" default = 6 min = 2 max = 24 hint = "This value is the number of terms to compute in the series \ representation of the hypergeometric function 3F3(a1, a2, a3; b1, b2, b3; \ z). The default is six terms; the range is 2-24." endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-hypergeometric-3F3" a1 = a1 a2 = a2 a3 = a3 b1 = b1 b2 = b2 b3 = b3 terms = terms bail = bail jconstant = #pixel mandy = julia julia = mandy } comment { This file contains streamlined formulas for functions represented by factorial series, including double factorials, triple factorials, etc. Originally written by Joe Maddry beginning on 03 Jan 2022. } jam-04factorial { ; jam 220104 ; This formula implements a streamlined version of the generalized order-4 multifactorial ; functions f(#z) as found in the earlier formula, 'Factorial Fun'. The order-4, or ; quadruple, factorial, n!!!! or n!4, is defined as n * (n-4) * ... * (4, 3, 2, or 1, ; depending on n). ; ; f(z) = Sum[ c(n) * z^(an + b) / (an + b)!4 ], n = 0 -> infinity, or, ; ; ___ ; f(z) = \ [ c(n) * z^(an+b) / (an+b)!4] , where the coefficient (c)n may ; /__ ; n ; ; or may not alternate in sign, and the parameters a and b, as well as the ; number of terms in the series, are user specified. For example, if a=1, b=0, ; the function evaluates to the series representation of the exponential function; ; a=2, b=0 is the cosine function, if the term signs alternate; a=2, b=1 represents ; the sine function; etc. ; For purposes of this formula, negative multifactorials are all assigned the value of 1. global: ; Declare arrays for various coefficient components float exponent[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable float ftemp = 0.0 ; float scratch variable int multiplier = int addend = 0 int factorialorder = 4 ; Test that the addend is < the multiplier multiplier = @amultiplier addend = @baddend if addend >= multiplier addend = 0 ; reset an incorrect addend to zero endif ; addend ; Initialize the factorial and exponent arrays gindex = 0 while gindex < @terms itemp = gindex * multiplier + addend exponent[gindex] = itemp if itemp <= 1 ; define negative factorials = 1 factorial[gindex] = 1.0 else ; calculate the appropriate positive factorial ftemp = 1.0 while itemp > 1 ftemp = ftemp * itemp itemp = itemp - factorialorder endwhile ; itemp factorial[gindex] = ftemp endif ; item gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 ftemp = 1.0 while gindex < @terms if @alternate ; alternate coefficient signs if @negate ; opposite the usual alternation pattern if gindex % 2 == 0 ftemp = -1.0 else ftemp = 1.0 endif ; gindex else ; alternation not reversed if gindex % 2 == 1 ftemp = -1.0 else ftemp = 1.0 endif ; gindex endif ; @reverse endif ; @alternate coefficient[gindex] = ftemp / factorial[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) complex ztemp = (0,0) float tempexp = 0.0 int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z, and the new #z value as z(n+1) = f(z(n)) + jc zpower[1] = #z lindex = 2 ztemp = coefficient[0] + coefficient[1] * #z while lindex < @terms tempexp = exponent[lindex] zpower[lindex] = #z^tempexp ztemp = ztemp + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = ztemp + jc bailout: |#z| < @bail default: title = "Factorial Series 04" maxiter = 1000 periodicity = 0 method = multipass center = (0,0) magn = 0.2 angle = 0.0 heading caption = "Order-4 Multifactorial Series" text = "This formula is identical to 'Factorial Series' except that the series \ is evaluated using quadruple, rather than regular, factorials." endheading param amultiplier caption = "Fn Constant a" default = 1 min = 1 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the multiplier, a, in that expression. \ (a >= 1)" endparam param baddend caption = "Fn Constant b" default = 0 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the addend, b, in that expression. \ (b < a)" endparam param terms caption = "Number of Terms" default = 8 min = 2 max = 24 hint = "This value is the number of terms to compute in the factorial series. \ The default is eight terms; the range is 2-24." endparam param alternate caption = "Alternate Signs?" default = FALSE hint = "If enabled, then the signs of the terms in the series alternate between \ positive and negative." endparam param negate caption = "Reverse Signs?" default = FALSE hint = "If enabled, then the pattern of sign alternations is reversed." visible = @alternate endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-04factorial" amultiplier = amultiplier baddend = baddend terms = terms alternate = alternate negate = negate bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-03factorial { ; jam 220104 ; This formula implements a streamlined version of the generalized triple factorial ; functions f(#z) as found in the earlier formula, 'Factorial Fun'. The ; triple factorial, n!!! or n!3, is defined as n * (n-3) * ... * (3, 2, or 1, ; depending on n). ; ; f(z) = Sum[ c(n) * z^(an + b) / (an + b)!!! ], n = 0 -> infinity, or, ; ; ___ ; f(z) = \ [ c(n) * z^(an+b) / (an+b)!!!] , where the coefficient (c)n may ; /__ ; n ; ; or may not alternate in sign, and the parameters a and b, as well as the ; number of terms in the series, are user specified. For example, if a=1, b=0, ; the function evaluates to the series representation of the exponential function; ; a=2, b=0 is the cosine function, if the term signs alternate; a=2, b=1 represents ; the sine function; etc. ; For purposes of this formula, negative factorials are all assigned the value of 1. global: ; Declare arrays for various coefficient components float exponent[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable float ftemp = 0.0 ; float scratch variable int multiplier = int addend = 0 ; Test that the addend is < the multiplier multiplier = @amultiplier addend = @baddend if addend >= multiplier addend = 0 ; reset an incorrect addend to zero endif ; addend ; Initialize the factorial and exponent arrays gindex = 0 while gindex < @terms itemp = gindex * multiplier + addend exponent[gindex] = itemp if itemp <= 1 ; define negative factorials = 1 factorial[gindex] = 1.0 else ; calculate the appropriate positive factorial ftemp = 1.0 while itemp > 1 ftemp = ftemp * itemp itemp = itemp - 3 endwhile ; itemp factorial[gindex] = ftemp endif ; itemp gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 ftemp = 1.0 while gindex < @terms if @alternate ; alternate coefficient signs if @negate ; opposite the usual alternation pattern if gindex % 2 == 0 ftemp = -1.0 else ftemp = 1.0 endif ; gindex else ; alternation not reversed if gindex % 2 == 1 ftemp = -1.0 else ftemp = 1.0 endif ; gindex endif ; @reverse endif ; @alternate coefficient[gindex] = ftemp / factorial[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) complex ztemp = (0,0) float tempexp = 0.0 int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z, and the new #z value as z(n+1) = f(z(n)) + jc zpower[1] = #z lindex = 2 ztemp = coefficient[0] + coefficient[1] * #z while lindex < @terms tempexp = exponent[lindex] zpower[lindex] = #z^tempexp ztemp = ztemp + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = ztemp + jc bailout: |#z| < @bail default: title = "Factorial Series 03" maxiter = 1000 periodicity = 0 method = multipass center = (0,0) magn = 0.2 angle = 0.0 heading caption = "Triple Factorial Series" text = "This formula is identical to 'Factorial Series' except that the series \ is evaluated using triple, rather than regular, factorials." endheading param amultiplier caption = "Fn Constant a" default = 1 min = 1 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the multiplier, a, in that expression. \ (a >= 1)" endparam param baddend caption = "Fn Constant b" default = 0 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the addend, b, in that expression. \ (b < a)" endparam param terms caption = "Number of Terms" default = 8 min = 2 max = 24 hint = "This value is the number of terms to compute in the factorial series. \ The default is eight terms; the range is 2-24." endparam param alternate caption = "Alternate Signs?" default = FALSE hint = "If enabled, then the signs of the terms in the series alternate between \ positive and negative." endparam param negate caption = "Reverse Signs?" default = FALSE hint = "If enabled, then the pattern of sign alternations is reversed." visible = @alternate endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-03factorial" amultiplier = amultiplier baddend = baddend terms = terms alternate = alternate negate = negate bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-factorial { ; jam 220103 ; This formula implements a streamlined version of the generalized factorial ; functions f(#z) as found in the earlier formula, 'Factorial Fun'. ; ; f(z) = Sum[ c(n) * z^(an + b) / (an + b)! ], n = 0 -> infinity, or, ; ; ___ ; f(z) = \ [ c(n) * z^(an+b) / (an+b)!] , where the coefficient (c)n may ; /__ ; n ; ; or may not alternate in sign, and the parameters a and b, as well as the ; number of terms in the series, are user specified. For example, if a=1, b=0, ; the function evaluates to the series representation of the exponential function; ; a=2, b=0 is the cosine function, if the term signs alternate; a=2, b=1 represents ; the sine function; etc. ; For purposes of this formula, negative factorials are all assigned the value of 1. global: ; Declare arrays for various coefficient components float exponent[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable float ftemp = 0.0 ; float scratch variable int multiplier = int addend = 0 ; Test that the addend is < the multiplier multiplier = @amultiplier addend = @baddend if addend >= multiplier addend = 0 ; reset an incorrect addend to zero endif ; addend ; Initialize the factorial and exponent arrays gindex = 0 while gindex < @terms itemp = gindex * multiplier + addend exponent[gindex] = itemp if itemp <= 1 ; define negative factorials = 1 factorial[gindex] = 1.0 else ; calculate the appropriate positive factorial ftemp = 1.0 while itemp > 1 ftemp = ftemp * itemp itemp = itemp - 1 endwhile ; itemp factorial[gindex] = ftemp endif ; itemp gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 ftemp = 1.0 while gindex < @terms if @alternate ; alternate coefficient signs if @negate ; opposite the usual alternation pattern if gindex % 2 == 0 ftemp = -1.0 else ftemp = 1.0 endif ; gindex else ; alternation not reversed if gindex % 2 == 1 ftemp = -1.0 else ftemp = 1.0 endif ; gindex endif ; @reverse endif ; @alternate coefficient[gindex] = ftemp / factorial[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) complex ztemp = (0,0) float tempexp = 0.0 int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z, and the new #z value as z(n+1) = f(z(n)) + jc zpower[1] = #z lindex = 2 ztemp = coefficient[0] + coefficient[1] * #z while lindex < @terms tempexp = exponent[lindex] zpower[lindex] = #z^tempexp ztemp = ztemp + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = ztemp + jc bailout: |#z| < @bail default: title = "Factorial Series" maxiter = 1000 periodicity = 0 method = multipass center = (0,0) magn = 0.2 angle = 0.0 param amultiplier caption = "Fn Constant a" default = 1 min = 1 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the multiplier, a, in that expression. \ (a >= 1)" endparam param baddend caption = "Fn Constant b" default = 0 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the addend, b, in that expression. \ (b < a)" endparam param terms caption = "Number of Terms" default = 8 min = 2 max = 24 hint = "This value is the number of terms to compute in the factorial series. \ The default is eight terms; the range is 2-24." endparam param alternate caption = "Alternate Signs?" default = FALSE hint = "If enabled, then the signs of the terms in the series alternate between \ positive and negative." endparam param negate caption = "Reverse Signs?" default = FALSE hint = "If enabled, then the pattern of sign alternations is reversed." visible = @alternate endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-factorial" amultiplier = amultiplier baddend = baddend terms = terms alternate = alternate negate = negate bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-02factorial { ; jam 220104 ; This formula implements a streamlined version of the generalized double factorial ; functions f(#z) as found in the earlier formula, 'Factorial Fun'. The ; double factorial, n!!, is defined as n * (n-2) * ... * (2, if n is even, or 1, if n is odd). ; ; f(z) = Sum[ c(n) * z^(an + b) / (an + b)!! ], n = 0 -> infinity, or, ; ; ___ ; f(z) = \ [ c(n) * z^(an+b) / (an+b)!!] , where the coefficient (c)n may ; /__ ; n ; ; or may not alternate in sign, and the parameters a and b, as well as the ; number of terms in the series, are user specified. For example, if a=1, b=0, ; the function evaluates to the series representation of the exponential function; ; a=2, b=0 is the cosine function, if the term signs alternate; a=2, b=1 represents ; the sine function; etc. ; For purposes of this formula, negative factorials are all assigned the value of 1. global: ; Declare arrays for various coefficient components float exponent[@terms] float factorial[@terms] ; will actually hold the reciprocal factorials float coefficient[@terms] ; the overall coefficient for each term ; Some useful variables for the global calculations int gindex = 0 ; loop index int itemp = 0 ; integer scratch variable float ftemp = 0.0 ; float scratch variable int multiplier = int addend = 0 ; Test that the addend is < the multiplier multiplier = @amultiplier addend = @baddend if addend >= multiplier addend = 0 ; reset an incorrect addend to zero endif ; addend ; Initialize the factorial and exponent arrays gindex = 0 while gindex < @terms itemp = gindex * multiplier + addend exponent[gindex] = itemp if itemp <= 1 ; define negative factorials = 1 factorial[gindex] = 1.0 else ; calculate the appropriate positive factorial ftemp = 1.0 while itemp > 1 ftemp = ftemp * itemp itemp = itemp - 2 endwhile ; itemp factorial[gindex] = ftemp endif ; itemp gindex = gindex + 1 endwhile ; gindex ; Initialize the coefficient array gindex = 0 ftemp = 1.0 while gindex < @terms if @alternate ; alternate coefficient signs if @negate ; opposite the usual alternation pattern if gindex % 2 == 0 ftemp = -1.0 else ftemp = 1.0 endif ; gindex else ; alternation not reversed if gindex % 2 == 1 ftemp = -1.0 else ftemp = 1.0 endif ; gindex endif ; @reverse endif ; @alternate coefficient[gindex] = ftemp / factorial[gindex] gindex = gindex + 1 endwhile ; gindex init: complex jc = (0,0) if @mandy #z = #pixel, jc = #pixel else ; Julia #z = #pixel, jc = @jconstant endif complex zpower[@terms] ; the variouis powers of #z needed for the series zpower[0] = (1,0) complex ztemp = (0,0) float tempexp = 0.0 int lindex = 0 ; iteration loop index loop: ; Compute the powers of the current #z, and the new #z value as z(n+1) = f(z(n)) + jc zpower[1] = #z lindex = 2 ztemp = coefficient[0] + coefficient[1] * #z while lindex < @terms tempexp = exponent[lindex] zpower[lindex] = #z^tempexp ztemp = ztemp + coefficient[lindex] * zpower[lindex] lindex = lindex + 1 endwhile ; lindex #z = ztemp + jc bailout: |#z| < @bail default: title = "Factorial Series 02" maxiter = 1000 periodicity = 0 method = multipass center = (0,0) magn = 0.2 angle = 0.0 heading caption = "Double Factorial Series" text = "This formula is identical to 'Factorial Series' except that the series \ is evaluated using double, rather than regular, factorials." endheading param amultiplier caption = "Fn Constant a" default = 1 min = 1 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the multiplier, a, in that expression. \ (a >= 1)" endparam param baddend caption = "Fn Constant b" default = 0 hint = "For each term in the series, n = 0, 1,..., i, the exponent \ of #z and the factorial denominator are defined by the expression \ a*n + b; this parameter is the addend, b, in that expression. \ (b < a)" endparam param terms caption = "Number of Terms" default = 8 min = 2 max = 24 hint = "This value is the number of terms to compute in the factorial series. \ The default is eight terms; the range is 2-24." endparam param alternate caption = "Alternate Signs?" default = FALSE hint = "If enabled, then the signs of the terms in the series alternate between \ positive and negative." endparam param negate caption = "Reverse Signs?" default = FALSE hint = "If enabled, then the pattern of sign alternations is reversed." visible = @alternate endparam param bail caption = "Bailout Value" default = 1e6 hint = "Value needed to 'escape' to infinity." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) hint = "This is the seed constant for Julia-type fractals, or the initial \ perturbation for Mandelbrot-types." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching." visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching." visible = FALSE endparam switch: type = "jam-02factorial" amultiplier = amultiplier baddend = baddend terms = terms alternate = alternate negate = negate bail = bail jconstant = #pixel mandy = julia julia = mandy } jam-OrbitTrapBarnsley { ; jam 12/22/2018 ; Based on variations of the traditional Barnsley formulas. ; Some ideas from Michèle Dessureault, Ed Algra, Sam Monnier, and many others. ; The various Barnsley equations are executed based on the distance #z and a point \ ; on an orbit trap selected by the current #z value. ; January 2022 --- Major additions of new trap types, shapes, etc., plus bug fixes. global: ; Common constants float twopi = 2.0 * #pi float halfpi = #pi/2 float degconversion = twopi/360 float onehalf = 1.0/2 float onethird = 1.0/3 float onefourth = 1.0/4 int numbervertices = 0 ; change to accomodate trap shape int cursality ; number of disjoint pieces for traps 1 & 2 -- change to accomodte trap shape int cincrement ; cursality increments float scratchfloat = 0.0 float scratchfloat2 = float scratchfloat3 = float scratchfloat4 = 0.0 int scratchint = int scratchint2 = 0 int glindex = 0 ; for loops in the global section int glindex2 = 0 ; global outer loop index int glindex3 = 0 ; extra index int maxvertices = 402 ; maximum number of vertices for the trap complex vertex[402] ; maximum number of vertices for the trap float xcoord[402] ; x-coordinates of vertices float ycoord[402] ; y-coordinates vertices int traparray ; the selected trap shape float trapscales = @nscale1 ; variables specific for some of the 'lines & points' trap shapes int unityroots ; for 'roots of unity' option bool singleroot ; flag for 'roots of unity' option int whichroot ; for 'roots of unity' option int collinearspots ; for 'collinear spots' option int squaresize ; for 'square array' option int triarraysize ; for 'triangular array' and some other array options int spiralsize ; for the 'polygonal spiral' options float shrink2 = onehalf, float shrink3 = onethird float ellipseH ; for 'superellipse' option float ellipseW float ellipseX float hypotroA ; for 'hypotrochoid' and 'epitrochoid' options float hypotroB float hypotroH int granularity = 100 ; for smoother curves int granularity2= 101 float lissajdomain = 0.0 ; for 'lissajous 3' option int numbercircles ; for 'nested circles', 'osculant circles' options int dotnum ; for the 'dotted star' options int raynum int dashnum ; for the 'dashed star' options float cycloidamp float cycloidconst float cycloidlength float moritzamp float moritzfreqN float moritzfreqD float moritzconst ; variables specific for some of the 'polar functions' trap shapes bool polarimplicit ; flag for marking some polar curves as defined implicitly rather than radially int rosepetals ; for the polar rose shape float folium ; folium shaping parameters float foliumperturb float cardioid ; cardioid shaping parameters float cardioidperturb float cissoidDioA ; cissoid of Diocles float cissoidDioB float cochleoid ; cochleoid float conchoidA ; various conchoid shaping parameters float conchoidB float conchoidC float cubicpA ; cubical parabola shaping parameters float cubicpB float cubicpC float majaxis float minaxis float epower float tanfreq float fosinfreq float focosfreq float sinfreq2 float hyperbolic float kampfreq float kamppower float nodalfreq float lemfreq float lempower float limfreq float limamp float limoffset float litpower float logspiA float logspiB float parafreq float paraamp float paraoffset float paraspi float paraspioffset float semicubtanfreq float semicubcosfreq float semicubpower float archspioffset float strophcosfreqA float strophcosfreqB float polarfreqA float polarampA float trefoilcosamp float trefoilsinamp float trefoilcossym float trefoilsinsym float trefoilconst float trilimA float trilimB float trilimamp float trilimfreq float folioidamp float folioidfreqN float folioidfreqD float folioidconstA float folioidconstB ; variables specific for the 'parametric functions' shapes int hyponumer ; hypocycloid shaping parameters int hypodenom ; hypocycloid shaping parameters float companC1 float companC2 float companfreq float cycampA float cycampB float cycxscale float cycyoffset float cycsinfreq float cyccosfreq float cycangle float epicycAN float epicycAD float epicycB float epicycC float nephconstA float nephconstB float nephsinfreq float nephcosfreq float parafreqA float parafreqB float paraconstA float paraconstB float wavysinfreq float wavysinamp float wavyradius float paraxaxis float parayaxis float epiradiusA float epiradiusB float epiradiusC ; variables specific for the 'cartesian' trap shapes float cartxcoeff float cartycoeff float cartconst float cartconstB float cartconstC float cartexexp float carteyexp float coniceccent float conchmod ; shaping variables for 'lines & points' traps if @traptype == "lines & points" lissajdomain = #pi * @lissadomain unityroots = @unityroot1 singleroot = @singleroot1 whichroot = @whichroot1 - 1 ; indices should run from 0-(#roots-1) collinearspots = @collinearspot1 squaresize = @squarespot1 triarraysize = @triarray1 spiralsize = @spiralorder1 ellipseH = @ellipseheight1 ellipseW = @ellipsewidth1 ellipseX = @ellipseexponent1 hypotroA = @hypotrochA1 hypotroB = @hypotrochB1 hypotroH = @hypotrochH1 numbercircles = @circlenum1 raynum = @raynumber dotnum = @dotnumber dashnum = @dashnumber cycloidamp = @cycloidamp1 cycloidconst = @cycloidconst1 cycloidlength = @cycloidlength1 moritzamp = @moritzamp1 moritzfreqN = @moritzfreqN1 moritzfreqD = @moritzfreqD1 moritzconst = @moritzconst1 endif ; @traptype ; shaping variables for 'polar functions' traps if @traptype == "polar functions" if @polarmode1 == "normal" polarimplicit = FALSE ; radial function, not implicit curve else ; polar implicit function polarimplicit = TRUE trapscales = recip(trapscales) endif ; @polarmode1 rosepetals = @rose1 folium = @folium1 foliumperturb = @foliumperturb1 cardioid = @cardioid1 cardioidperturb = @cardioidperturb1 cissoidDioA = @cissoidDioA1 cissoidDioB = @cissoidDioB1 cochleoid = @cochleoid1 conchoidA = @conchoidA1 conchoidB = @conchoidB1 conchoidC = @conchoidC1 conchoidA = @conchoidA1 conchoidB = @conchoidB1 conchoidC = @conchoidC1 cubicpA = @cubicpA1 cubicpB = @cubicpB1 cubicpC = @cubicpC1 majaxis = @majaxis1 minaxis = @minaxis1 epower = @epower1 tanfreq = @tanfreq1 fosinfreq = @fosinfreq1 focosfreq = @focosfreq1 sinfreq2 = @sinfreq21 hyperbolic = @hyperbolic1 kampfreq = @kampfreq1 kamppower = @kamppower1 nodalfreq = @nodalfreq1 lemfreq = @lemfreq1 lempower = @lempower1 limfreq = @limfreq1 limamp = @limamp1 limoffset = @limoffset1 litpower = @litpower1 logspiA = @logspiA1 logspiB = 0.2 * @logspiB1 parafreq = @parafreq1 paraamp = @paraamp1 paraoffset = @paraoffset1 paraspi = @paraspi1 paraspioffset = @paraspioffset1 semicubtanfreq = @semicubtanfreq1 semicubcosfreq = @semicubcosfreq1 semicubpower = @semicubpower1 archspioffset = 3.0 * @archspioffset1 strophcosfreqA = @strophcosfreqA1 strophcosfreqB = @strophcosfreqB1 polarfreqA = @polarfreqA1 polarampA = @polarampA1 trefoilcosamp = @trefoilcosamp1 trefoilsinamp = @trefoilsinamp1 trefoilcossym = @trefoilcossymmetry1 trefoilsinsym = @trefoilsinsymmetry1 trefoilconst = @trefoilconstant1 trilimA = @trilimA1 trilimB = @trilimB1 trilimamp = @trilimamp1 trilimfreq = @trilimfreq1 folioidamp = @folioidamp1 folioidfreqN = @folioidfreqN1 folioidfreqD = @folioidfreqD1 folioidconstA = @folioidconstA1 folioidconstB = @folioidconstB1 endif ; @traptype ; shaping variables for 'parametric functions' traps if @traptype == "parametric functions" hyponumer = @hyponumerator1 hypodenom = @hypodenom1 companC1 = @companC11 companC2 = @companC21 companfreq = @companfreq1 cycampA = @cycampA1 cycampB = @cycampB1 cycxscale = @cycxscale1 cycyoffset = @cycyoffset1 cycsinfreq = @cycsinfreq1 cyccosfreq = @cyccosfreq1 cycangle = @cycangle1 epicycAN = @epicycAN1 epicycAD = @epicycAD1 epicycB = @epicycB1 epicycC= @epicycC1 nephsinfreq = @nephsinfreq1 nephcosfreq = @nephcosfreq1 nephconstA = @nephconstA1 nephconstB = @nephconstB1 parafreqA = @parafreqA1 parafreqB = @parafreqB1 paraconstA = @paraconstA1 paraconstB = @paraconstB1 wavysinfreq = @wavysinfreq1 wavysinamp = @wavysinamp1 wavyradius = @wavyradius1 paraxaxis = @paraxaxis1 parayaxis = @parayaxis1 epiradiusA = @epiradiusA1 epiradiusB = @epiradiusB1 epiradiusC = @epiradiusC1 endif ; @traptype if @traptype == "cartesian" trapscales = 1/trapscales cartxcoeff = @cartxcoeff1 cartycoeff = @cartycoeff1 cartconst = @cartconstant1 cartconstB = @cartconstantB1 cartconstC = @cartconstantC1 cartexexp = @cartexexp1 carteyexp = @carteyexp1 coniceccent = @coniceccent1 conchmod = @conchmod1 endif ; @traptype if @traptype == "lines & points" if @trapshape == "line" traparray = 0 elseif @trapshape == "triangle" traparray = 1 elseif @trapshape == "isosceles" traparray = 2 elseif @trapshape == "3-asterisk" traparray = 3 elseif @trapshape == "3-star" traparray = 4 elseif @trapshape == "polytriangle" traparray = 5 elseif @trapshape == "trigram" traparray = 6 elseif @trapshape == "nested triangles" traparray = 7 elseif @trapshape == "nested triangle 2" traparray = 8 elseif @trapshape == "twisted triangles" traparray = 9 elseif @trapshape == "twisted triangle 2" traparray = 10 elseif @trapshape == "square" traparray = 11 elseif @trapshape == "square 2" traparray = 12 elseif @trapshape == "rhombus" traparray = 13 elseif @trapshape == "kite" traparray = 14 elseif @trapshape == "dart" traparray = 15 elseif @trapshape == "rectangle" traparray = 214 elseif @trapshape == "4-asterisk" traparray = 16 elseif @trapshape == "4-star" traparray = 17 elseif @trapshape == "flat 4-star" traparray = 18 elseif @trapshape == "bowtie" traparray = 19 elseif @trapshape == "windowpane" traparray = 20 elseif @trapshape == "tetragram" traparray = 21 elseif @trapshape == "nested squares" traparray = 22 elseif @trapshape == "nested square 2" traparray = 23 elseif @trapshape == "twisted squares" traparray = 24 elseif @trapshape == "twisted square 2" traparray = 25 elseif @trapshape == "windmill" traparray = 26 elseif @trapshape == "windmill 2" traparray = 27 elseif @trapshape == "pentagon" traparray = 28 elseif @trapshape == "pentagon 2" traparray = 29 elseif @trapshape == "pentagram" traparray = 30 elseif @trapshape == "pentagram 2" traparray = 31 elseif @trapshape == "pentagram 3" traparray = 32 elseif @trapshape == "pentagram 4" traparray = 33 elseif @trapshape == "5-asterisk" traparray = 34 elseif @trapshape == "5-star" traparray = 35 elseif @trapshape == "nested pentagons" traparray = 36 elseif @trapshape == "nested pentagon 2" traparray = 37 elseif @trapshape == "twisted pentagons" traparray = 38 elseif @trapshape == "twisted pentagon 2" traparray = 39 elseif @trapshape == "hexagon" traparray = 40 elseif @trapshape == "hexagon 2" traparray = 41 elseif @trapshape == "hexagram" traparray = 42 elseif @trapshape == "hexagram 2" traparray = 43 elseif @trapshape == "hexagram 3" traparray = 44 elseif @trapshape == "hexagram 4" traparray = 45 elseif @trapshape == "hexagram 5" traparray = 46 elseif @trapshape == "hexagram 6" traparray = 47 elseif @trapshape == "hexagram 7" traparray = 48 elseif @trapshape == "6-asterisk" traparray = 49 elseif @trapshape == "6-star" traparray = 50 elseif @trapshape == "nested hexagons" traparray = 51 elseif @trapshape == "nested hexagon 2" traparray = 52 elseif @trapshape == "twisted hexagons" traparray = 53 elseif @trapshape == "twisted hexagon 2" traparray = 54 elseif @trapshape == "hand" traparray = 55 elseif @trapshape == "zigzag-3" traparray = 56 elseif @trapshape == "zigzag-4" traparray = 57 elseif @trapshape == "zigzag-5" traparray = 58 elseif @trapshape == "zigzag-6" traparray = 59 elseif @trapshape == "zigzag-7" traparray = 60 elseif @trapshape == "sawtooth-1" traparray = 61 elseif @trapshape == "sawtooth-2" traparray = 62 elseif @trapshape == "sawtooth-3" traparray = 63 elseif @trapshape == "sawtooth-4" traparray = 64 elseif @trapshape == "5-star 2" traparray = 65 elseif @trapshape == "3-star 2" traparray = 66 elseif @trapshape == "tetragram 2" traparray = 67 elseif @trapshape == "pentagram 5" traparray = 68 elseif @trapshape == "4-star 2" traparray = 69 elseif @trapshape == "5-star 3" traparray = 70 elseif @trapshape == "6-star 2" traparray = 71 elseif @trapshape == "6-star 3" traparray = 72 elseif @trapshape == "square-1" traparray = 73 elseif @trapshape == "square-2" traparray = 74 elseif @trapshape == "square-3" traparray = 75 elseif @trapshape == "square-4" traparray = 76 elseif @trapshape == "heptagon" traparray = 77 elseif @trapshape == "heptagon 2" traparray = 78 elseif @trapshape == "heptagram" traparray = 79 elseif @trapshape == "heptagram 2" traparray = 80 elseif @trapshape == "heptagram 3" traparray = 81 elseif @trapshape == "heptagram 4" traparray = 82 elseif @trapshape == "heptagram 5" traparray = 83 elseif @trapshape == "heptagram 6" traparray = 84 elseif @trapshape == "heptagram 7" traparray = 85 elseif @trapshape == "7-asterisk" traparray = 86 elseif @trapshape == "7-star" traparray = 87 elseif @trapshape == "7-star 2" traparray = 88 elseif @trapshape == "nested heptagons" traparray = 89 elseif @trapshape == "nested heptagon 2" traparray = 90 elseif @trapshape == "twisted heptagons" traparray = 91 elseif @trapshape == "twisted heptagon 2" traparray = 92 elseif @trapshape == "peano curve" traparray = 93 elseif @trapshape == "octagon" traparray = 94 elseif @trapshape == "octagon 2" traparray = 95 elseif @trapshape == "octagram" traparray = 96 elseif @trapshape == "octagram 2" traparray = 97 elseif @trapshape == "octagram 3" traparray = 98 elseif @trapshape == "octagram 4" traparray = 99 elseif @trapshape == "octagram 5" traparray = 100 elseif @trapshape == "octagram 6" traparray = 101 elseif @trapshape == "octagram 7" traparray = 102 elseif @trapshape == "8-asterisk" traparray = 103 elseif @trapshape == "8-star" traparray = 104 elseif @trapshape == "8-star 2" traparray = 105 elseif @trapshape == "octagram 8" traparray = 106 elseif @trapshape == "octagram 9" traparray = 107 elseif @trapshape == "octagram 10" traparray = 108 elseif @trapshape == "roots of unity" traparray = 109 elseif @trapshape == "7-star 3" traparray = 110 elseif @trapshape == "lissajous 1" traparray = 111 elseif @trapshape == "nonagon" traparray = 112 elseif @trapshape == "nonagram" traparray = 113 elseif @trapshape == "nonagram 2" traparray = 114 elseif @trapshape == "nonagram 3" traparray = 115 elseif @trapshape == "nonagram 4" traparray = 116 elseif @trapshape == "nonagram 5" traparray = 117 elseif @trapshape == "nonagram 6" traparray = 118 elseif @trapshape == "9-star" traparray = 119 elseif @trapshape == "9-asterisk" traparray = 120 elseif @trapshape == "9-star 2" traparray = 121 elseif @trapshape == "9-star 3" traparray = 122 elseif @trapshape == "decagon" traparray = 123 elseif @trapshape == "10-asterisk" traparray = 124 elseif @trapshape == "decagram" traparray = 125 elseif @trapshape == "decagram 2" traparray = 126 elseif @trapshape == "decagram 3" traparray = 127 elseif @trapshape == "decagram 4" traparray = 128 elseif @trapshape == "10-star" traparray = 129 elseif @trapshape == "10-star 2" traparray = 130 elseif @trapshape == "10-star 3" traparray = 131 elseif @trapshape == "decagram 5" traparray = 132 elseif @trapshape == "lissajous 2" traparray = 133 elseif @trapshape == "collinear spots" traparray = 134 elseif @trapshape == "square array" traparray = 135 elseif @trapshape == "triangular array" traparray = 136 elseif @trapshape == "triangular spiral" traparray = 137 elseif @trapshape == "square spiral" traparray = 138 elseif @trapshape == "pentagonal array" traparray = 139 elseif @trapshape == "hexagonal array" traparray = 140 elseif @trapshape == "pentagonal spiral" traparray = 141 elseif @trapshape == "hexagonal spiral" traparray = 142 elseif @trapshape == "octagonal spiral" traparray = 143 elseif @trapshape == "superellipse" traparray = 144 elseif @trapshape == "hypotrochoid" traparray = 145 elseif @trapshape == "epitrochoid" traparray = 146 elseif @trapshape == "lissajous 3" traparray = 147 elseif @trapshape == "honeycomb" traparray = 148 elseif @trapshape == "nested circles" traparray = 149 elseif @trapshape == "osculant circles" traparray = 150 elseif @trapshape == "nonagram 7" traparray = 151 elseif @trapshape == "more polygons" if @morepolygons1 == "11-gon" traparray = 152 elseif @morepolygons1 == "11-gram 1" traparray = 153 elseif @morepolygons1 == "11-gram 2" traparray = 154 elseif @morepolygons1 == "11-gram 3" traparray = 155 elseif @morepolygons1 == "11-gram 4" traparray = 156 elseif @morepolygons1 == "11-star" traparray = 163 elseif @morepolygons1 == "11-star 2" traparray = 165 elseif @morepolygons1 == "11-asterisk" traparray = 164 elseif @morepolygons1 == "12-gon" traparray = 157 elseif @morepolygons1 == "12-gram 1" traparray = 158 elseif @morepolygons1 == "12-gram 2" traparray = 159 elseif @morepolygons1 == "12-gram 3" traparray = 160 elseif @morepolygons1 == "12-gram 4" traparray = 161 elseif @morepolygons1 == "12-gram 5" traparray = 162 elseif @morepolygons1 == "12-star" traparray = 166 elseif @morepolygons1 == "12-star 2" traparray = 167 elseif @morepolygons1 == "12-asterisk" traparray = 168 elseif @morepolygons1 == "13-gon" traparray = 189 elseif @morepolygons1 == "14-gon" traparray = 190 elseif @morepolygons1 == "15-gon" traparray = 191 elseif @morepolygons1 == "16-gon" traparray = 192 elseif @morepolygons1 == "13-asterisk" traparray = 193 elseif @morepolygons1 == "14-asterisk" traparray = 194 elseif @morepolygons1 == "15-asterisk" traparray = 195 elseif @morepolygons1 == "16-asterisk" traparray = 196 elseif @morepolygons1 == "13-star" traparray = 197 elseif @morepolygons1 == "14-star" traparray = 198 elseif @morepolygons1 == "15-star" traparray = 199 elseif @morepolygons1 == "16-star" traparray = 200 elseif @morepolygons1 == "11-rhombstar" traparray = 208 elseif @morepolygons1 == "12-rhombstar" traparray = 209 elseif @morepolygons1 == "13-rhombstar" traparray = 210 elseif @morepolygons1 == "14-rhombstar" traparray = 211 elseif @morepolygons1 == "15-rhombstar" traparray = 212 elseif @morepolygons1 == "16-rhombstar" traparray = 213 endif ; @morepolygons1 elseif @trapshape == "more spirolaterals" if @morespirolaterals1 == "1,1,1,2,3;1/2" traparray = 169 elseif @morespirolaterals1 == "1,1,2,1,3;1/2" traparray = 170 elseif @morespirolaterals1 == "1,1,2,2,4;1/2" traparray = 171 elseif @morespirolaterals1 == "1,1,4,5,4;1/2" traparray = 172 elseif @morespirolaterals1 == "1,2,2,2,5;1/2" traparray = 173 elseif @morespirolaterals1 == "1,2,5,3,5;1/2" traparray = 174 elseif @morespirolaterals1 == "2,2,1,4,3;1/2" traparray = 175 elseif @morespirolaterals1 == "2,2,4,4,3;1/2" traparray = 176 elseif @morespirolaterals1 == "2,3,5,3,2;1/2" traparray = 177 elseif @morespirolaterals1 == "1,6,6,6;1/4,1/4,-5/6" traparray = 178 elseif @morespirolaterals1 == "1,6,6,2;3/4,-1/4,-1/6" traparray = 179 elseif @morespirolaterals1 == "1,2,1,3;-4/5" traparray = 180 elseif @morespirolaterals1 == "1,2,1,3;-4/5,-4/5,0" traparray = 181 elseif @morespirolaterals1 == "1,2,1,3;-4/5,-1/5,-4/5" traparray = 182 elseif @morespirolaterals1 == "1,3;1/5,3/5,-1/5" traparray = 183 elseif @morespirolaterals1 == "1,2,3,3,2,1;5/6,1/6,1/6" traparray = 184 elseif @morespirolaterals1 == "1,1,3,1;-5/6,-1/6,3/7" traparray = 185 elseif @morespirolaterals1 == "1,1,3,1;-1/6,1/6,-3/7" traparray = 186 elseif @morespirolaterals1 == "1,1,3,1;5/6,1/6,4/7" traparray = 187 elseif @morespirolaterals1 == "1,3,1,4,2;-1/2,1/6" traparray = 188 endif ; @morespirolaterals1 elseif @trapshape == "3-rhombstar" traparray = 201 elseif @trapshape == "5-rhombstar" traparray = 202 elseif @trapshape == "6-rhombstar" traparray = 203 elseif @trapshape == "7-rhombstar" traparray = 204 elseif @trapshape == "8-rhombstar" traparray = 205 elseif @trapshape == "9-rhombstar" traparray = 206 elseif @trapshape == "10-rhombstar" traparray = 207 elseif @trapshape == "dotted star" traparray = 215 elseif @trapshape == "dashed star" traparray = 216 elseif @trapshape == "more curves" if @morecurves1 == "rhodonea" traparray = 217 elseif @morecurves1 == "cycloid" traparray = 218 elseif @morecurves1 == "parabolic lissajous" traparray = 219 elseif @morecurves1 == "polar lissajous" traparray = 220 elseif @morecurves1 == "Moritz cyclic harmonic" traparray = 221 elseif @morecurves1 == "elliptic lissajous" traparray = 222 elseif @morecurves1 == "bipolar lissajous" traparray = 223 endif ; @morecurves endif ; @trapshape elseif @traptype == "polar functions" if @polarshape1 == "rose" traparray = 0 elseif @polarshape1 == "folium" traparray = 1 elseif @polarshape1 == "cardioid" traparray = 2 elseif @polarshape1 == "circle" traparray = 3 elseif @polarshape1 == "cissoid of Diocles" traparray = 4 elseif @polarshape1 == "cochleoid" traparray = 5 elseif @polarshape1 == "conchoid of De Sluze" traparray = 7 elseif @polarshape1 == "conchoid of Nicomedes" traparray = 8 elseif @polarshape1 == "cubical parabola" traparray = 9 elseif @polarshape1 == "ellipse" traparray = 10 elseif @polarshape1 == "folium of Descartes" traparray = 11 elseif @polarshape1 == "hyperbolic spiral" traparray = 12 elseif @polarshape1 == "kampyle of Eudoxus" traparray = 13 elseif @polarshape1 == "kappa" traparray = 14 elseif @polarshape1 == "lemniscate of Bernoulli" traparray = 15 elseif @polarshape1 == "limacon of Pascal" traparray = 16 elseif @polarshape1 == "lituus" traparray = 17 elseif @polarshape1 == "logarithmic spiral" traparray = 18 elseif @polarshape1 == "parabola" traparray = 19 elseif @polarshape1 == "parabolic spiral" traparray = 20 elseif @polarshape1 == "semicubical parabola" traparray = 21 elseif @polarshape1 == "spiral of Archimedes" traparray = 22 elseif @polarshape1 == "strophoid" traparray = 23 elseif @polarshape1 == "Cayley's sextic" traparray = 24 elseif @polarshape1 == "trisectrix limacon" traparray = 25 elseif @polarshape1 == "trefoil of Habenicht" traparray = 27 elseif @polarshape1 == "Cayley's sextic 2" traparray = 28 elseif @polarshape1 == "lituus 2" traparray = 29 litpower = recip(litpower) elseif @polarshape1 == "hippopede" traparray = 30 elseif @polarshape1 == "folioid" traparray = 31 endif ; @polarshape1 elseif @traptype == "parametric functions" if @parashape1 == "hypocycloid" traparray = 0 elseif @parashape1 == "companion of cycloid" traparray = 1 elseif @parashape1 == "cycloid" traparray = 2 elseif @parashape1 == "cycloid variant" traparray = 3 elseif @parashape1 == "epicycloid" traparray = 4 elseif @parashape1 == "nephroid" traparray = 5 elseif @parashape1 == "hyperbola" traparray = 6 elseif @parashape1 == "tractrix" traparray = 7 elseif @parashape1 == "wavy circle" traparray = 8 elseif @parashape1 == "ellipse" traparray = 9 elseif @parashape1 == "serpentine" traparray = 10 elseif @parashape1 == "witch of Agnesi" traparray = 11 elseif @parashape1 == "Abdank quadratrix" traparray = 12 elseif @parashape1 == "cornoid" traparray = 13 elseif @parashape1 == "epicycloid 2" traparray = 14 elseif @parashape1 == "epitrochoid" traparray = 15 endif ; @parashape1 elseif @traptype == "cartesian" if @xyshape1 == "ampersand" traparray = 0 elseif @xyshape1 == "Alain's curve" traparray = 1 elseif @xyshape1 == "arcs of Samothrace" traparray = 2 elseif @xyshape1 == "astroid" traparray = 3 elseif @xyshape1 == "atriphthaloid" traparray = 4 elseif @xyshape1 == "bean curve 1" traparray = 5 elseif @xyshape1 == "bean curve 2" traparray = 6 elseif @xyshape1 == "beetle curve" traparray = 7 elseif @xyshape1 == "bicorn" traparray = 8 elseif @xyshape1 == "bicuspid" traparray = 9 elseif @xyshape1 == "biquartic of Sacre" traparray = 10 elseif @xyshape1 == "cubic egg" traparray = 11 elseif @xyshape1 == "Bolza curve" traparray = 12 elseif @xyshape1 == "bow curve" traparray = 13 elseif @xyshape1 == "bullet nose curve" traparray = 14 elseif @xyshape1 == "butterfly sextic" traparray = 15 elseif @xyshape1 == "butterfly 2" traparray = 16 elseif @xyshape1 == "cardioid" traparray = 17 elseif @xyshape1 == "Cartesian oval" traparray = 18 elseif @xyshape1 == "Cassini oval" traparray = 19 elseif @xyshape1 == "catenary" traparray = 20 elseif @xyshape1 == "Cayley's sextic" traparray = 21 elseif @xyshape1 == "Ceva's trisectrix" traparray = 22 elseif @xyshape1 == "Chasles cubic" traparray = 23 elseif @xyshape1 == "circle" traparray = 24 elseif @xyshape1 == "circular cubic" traparray = 25 elseif @xyshape1 == "cissoid of Diocles" traparray = 26 elseif @xyshape1 == "clinoid" traparray = 27 elseif @xyshape1 == "cochleoid" traparray = 28 elseif @xyshape1 == "conchoid of circle" traparray = 29 elseif @xyshape1 == "conchoid of Nicomedes" traparray = 30 elseif @xyshape1 == "conchoid of de Sluze" traparray = 31 elseif @xyshape1 == "cornoid" traparray = 32 elseif @xyshape1 == "cross curve" traparray = 33 elseif @xyshape1 == "cubic of Apollonius" traparray = 34 elseif @xyshape1 == "cranoid" traparray = 35 elseif @xyshape1 == "Jerabek curve" traparray = 36 elseif @xyshape1 == "Rosillo curve" traparray = 37 elseif @xyshape1 == "deltoid" traparray = 38 elseif @xyshape1 == "devil's curve" traparray = 39 elseif @xyshape1 == "dipole curve" traparray = 40 elseif @xyshape1 == "double egg" traparray = 41 elseif @xyshape1 == "double folium" traparray = 42 elseif @xyshape1 == "double U curve" traparray = 43 elseif @xyshape1 == "dumbbell curve" traparray = 44 elseif @xyshape1 == "cubic duplicatrix" traparray = 45 elseif @xyshape1 == "Durer's conchoid" traparray = 46 elseif @xyshape1 == "Sillke's egg of Columbus" traparray = 47 elseif @xyshape1 == "Granville's egg" traparray = 48 elseif @xyshape1 == "Kepler's egg" traparray = 49 elseif @xyshape1 == "eight curve" traparray = 50 elseif @xyshape1 == "ellipse" traparray = 51 elseif @xyshape1 == "superellipse" traparray = 52 elseif @xyshape1 == "fish quartic" traparray = 53 elseif @xyshape1 == "conic focal conchoid" traparray = 54 elseif @xyshape1 == "folium 1" traparray = 55 elseif @xyshape1 == "folium 2" traparray = 56 elseif @xyshape1 == "folium of Descartes" traparray = 57 elseif @xyshape1 == "Durer's folium" traparray = 58 elseif @xyshape1 == "Gaussian curve" traparray = 59 elseif @xyshape1 == "Beutel heart" traparray = 60 elseif @xyshape1 == "Proclus hippopede" traparray = 61 elseif @xyshape1 == "Hoerl curve" traparray = 62 elseif @xyshape1 == "Humbert cubic" traparray = 63 elseif @xyshape1 == "hyperbola" traparray = 64 elseif @xyshape1 == "hyperbola 2" traparray = 65 elseif @xyshape1 == "illumination curve" traparray = 66 elseif @xyshape1 == "kampyle of Eudoxus" traparray = 67 elseif @xyshape1 == "kappa curve" traparray = 68 elseif @xyshape1 == "Kiepert's curve" traparray = 69 elseif @xyshape1 == "kieroid" traparray = 70 elseif @xyshape1 == "kiss curve" traparray = 71 elseif @xyshape1 == "Klein quartic" traparray = 72 elseif @xyshape1 == "Kulp quartic" traparray = 73 elseif @xyshape1 == "limacon of Pascal" traparray = 74 elseif @xyshape1 == "links curve" traparray = 75 elseif @xyshape1 == "Lissajous sextic" traparray = 76 elseif @xyshape1 == "Lissajous quartic" traparray = 77 elseif @xyshape1 == "logistic curve" traparray = 78 elseif @xyshape1 == "Maltese cross" traparray = 79 elseif @xyshape1 == "semicubical parabola" traparray = 80 elseif @xyshape1 == "diverging parabola" traparray = 81 elseif @xyshape1 == "nephroid" traparray = 82 elseif @xyshape1 == "Freeth's nephroid" traparray = 83 elseif @xyshape1 == "nodal curve" traparray = 84 elseif @xyshape1 == "strophoid" traparray = 85 elseif @xyshape1 == "ophiuride" traparray = 86 elseif @xyshape1 == "parabola" traparray = 87 elseif @xyshape1 == "parabola 2" traparray = 88 elseif @xyshape1 == "parabolic trifolium" traparray = 89 elseif @xyshape1 == "piriform" traparray = 90 elseif @xyshape1 == "pearls of de Sluze" traparray = 91 elseif @xyshape1 == "pursuit curve" traparray = 92 elseif @xyshape1 == "quadratrix" traparray = 93 elseif @xyshape1 == "quadrafolium" traparray = 94 elseif @xyshape1 == "trifolium" traparray = 95 elseif @xyshape1 == "right strophoid" traparray = 96 elseif @xyshape1 == "scarabaeus" traparray = 97 elseif @xyshape1 == "scyphoid" traparray = 98 elseif @xyshape1 == "anguinea" traparray = 99 elseif @xyshape1 == "damped sine" traparray = 100 elseif @xyshape1 == "catastrophic sine" traparray = 101 elseif @xyshape1 == "plane spiric" traparray = 102 elseif @xyshape1 == "spiric of Perseus" traparray = 103 elseif @xyshape1 == "svastika" traparray = 104 elseif @xyshape1 == "syntractrix" traparray = 105 elseif @xyshape1 == "tetracuspid" traparray = 106 elseif @xyshape1 == "siluroid" traparray = 107 elseif @xyshape1 == "trisectrix of Longchamps" traparray = 108 elseif @xyshape1 == "trident" traparray = 109 elseif @xyshape1 == "trisectrix of Delanges" traparray = 110 elseif @xyshape1 == "trisectrix of Maclaurin" traparray = 111 elseif @xyshape1 == "Trott curve" traparray = 112 elseif @xyshape1 == "Tschirnhausen's cubic" traparray = 113 elseif @xyshape1 == "visiera" traparray = 114 elseif @xyshape1 == "resonance curve" traparray = 115 elseif @xyshape1 == "Watt's curve" traparray = 116 elseif @xyshape1 == "witch of Agnesi" traparray = 117 endif ; @xyshape1 endif ; @traptype if @traptype == 0 ; "lines & points" if traparray == 0 ; "line" cursality = 1 numbervertices = 2 ; not a closed curve cincrement = 2 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.5,-0.5) vertex[1] = @nscale1 * (0.5,0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 1 ; "triangle" cursality = 1 numbervertices = 4 ; n + cursality for a closed curve cincrement = 4 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,1) vertex[1] = @nscale1 * (-scratchfloat + flip(-0.5)) vertex[2] = @nscale1 * (scratchfloat + flip(-0.5)) vertex[3] = @nscale1 * (0,1) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 2 ; "isosceles" cursality = 1 numbervertices = 4 ; n + cursality for a closed curve cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @isocwidth * @nscale1 * (0.35,-1) vertex[1] = @isocheight * @nscale1 * (1,0) vertex[2] = @isocwidth * @nscale1 * (-0.35,-1) vertex[3] = @isocwidth * @nscale1 * (0.35,-1) if @fixisosceles vertex[1] = flip(vertex[1]) endif ; @fixisosceles glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 3 ; "3-asterisk" cursality = 3 numbervertices = 6 ; n + cursality for a closed curve cincrement = 2 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @leafAlength * @nscale1 * (0,1) vertex[2] = @nscale1 * (0,0) vertex[3] = @leafBlength * @nscale1 * (-scratchfloat + flip(-0.5)) vertex[4] = @nscale1 * (0,0) vertex[5] = @leafClength * @nscale1 * (scratchfloat + flip(-0.5)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 4 ; "3-star" cursality = 1 numbervertices = 7 ; n + cursality for a closed curve cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.33333333,0) vertex[1] = @starspikiness * @nscale1 * (0.75,1.29904) vertex[2] = @nscale1 * (-0.16666667,0.288675) vertex[3] = @starspikiness * @nscale1 * (-1.5,0) vertex[4] = @nscale1 * (-0.16666667,-0.288675) vertex[5] = @starspikiness * @nscale1 * (0.75,-1.29904) vertex[6] = @nscale1 * (0.33333333,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 66 ; "3-star 2" cursality = 1 numbervertices = 7 ; n + cursality for a closed curve cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.289778, 0.0776457) vertex[2] = @nscale1 * (-0.5,0.866025) vertex[3] = @nscale1 * (-0.212132, 0.212132) vertex[4] = @nscale1 * (-0.5, -0.866025) vertex[5] = @nscale1 * (-0.0776457, -0.289778) vertex[6] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 5 ; "polytriangle" cursality = 2 numbervertices = 8 ; n + cursality for a closed curve cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5, 0) vertex[1] = @nscale1 * (-0.25, 0.433013) vertex[2] = @nscale1 * (-0.25, -0.433013) vertex[3] = @nscale1 * (0.5,0) vertex[4] = @nscale1 * (0.5, 0.866025) vertex[5] = @nscale1 * (-1,0) vertex[6] = @nscale1 * (0.5, -0.866025) vertex[7] = @nscale1 * (0.5, 0.866025) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 6 ; "trigram" cursality = 1 numbervertices = 7 ; n + cursality for a closed curve cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.7, 0) vertex[1] = @nscale1 * (-0.34368,-1.55104) vertex[2] = @nscale1 * (-0.35,0.69282) vertex[3] = @nscale1 * (1.34718,0.435366) vertex[4] = @nscale1 * (-0.35,-0.69282) vertex[5] = @nscale1 * (-1.0035,1.11567) vertex[6] = @nscale1 * (0.7,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 7 ; "nested triangles" cursality = 2 numbervertices = 8 ; n + cursality for closed curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.625, 1.08253) vertex[1] = @nscale1 * (-1.25, 0) vertex[2] = @nscale1 * (0.625, -1.08253) vertex[3] = @nscale1 * (0.625,1.08253) vertex[4] = @innerscale * @nscale1 * (0.1875,0.324755) vertex[5] = @innerscale * @nscale1 * (-0.375,0) vertex[6] = @innerscale * @nscale1 * (0.1875,-0.324755) vertex[7] = @innerscale * @nscale1 * (0.1875,0.324755) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 8 ; "nested triangle 2" cursality = 2 numbervertices = 8 ; n + cursality for closed curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.625, 1.08253) vertex[1] = @nscale1 * (-1.25, 0) vertex[2] = @nscale1 * (0.625, -1.08253) vertex[3] = @nscale1 * (0.625,1.08253) vertex[4] = @innerscale * @nscale1 * (-0.118125,-0.24356625) vertex[5] = @innerscale * @nscale1 * (0.28125,0) vertex[6] = @innerscale * @nscale1 * (-0.118125,0.24356625) vertex[7] = @innerscale * @nscale1 * (-0.118125,-0.24356625) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 9 ; "twisted triangles" cursality = 4 numbervertices = 16 ; n + cursality for closed curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.5,0.866025) vertex[2] = @nscale1 * (-0.5,-0.866025) vertex[3] = @nscale1 * (1,0) vertex[4] = @nscale1 * (-0.113341,0.642788) vertex[5] = @nscale1 * (-0.5,-0.41955) vertex[6] = @nscale1 * (0.613341,-0.223238) vertex[7] = @nscale1 * (-0.113341,0.642788) vertex[8] = @nscale1 * (-0.40033,-0.145708) vertex[9] = @nscale1 * (0.326352,-0.273842) vertex[10] = @nscale1 * (0.073978,0.41955) vertex[11] = @nscale1 * (-0.40033,-0.145708) vertex[12] = @nscale1 * (0.139033,-0.240812) vertex[13] = @nscale1 * (0.139033,0.240812) vertex[14] = @nscale1 * (-0.278066,0) vertex[15] = @nscale1 * (0.139033,-0.240812) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 10 ; "twisted triangle 2" cursality = 3 numbervertices = 12 ; n + cursality for closed curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.5,0.866025) vertex[2] = @nscale1 * (-0.5,-0.866025) vertex[3] = @nscale1 * (1,0) vertex[4] = @nscale1 * (-0.0646021,0.614648) vertex[5] = @nscale1 * (-0.5,-0.363271) vertex[6] = @nscale1 * (0.564602,-0.251377) vertex[7] = @nscale1 * (-0.0646021,0.614648) vertex[8] = @nscale1 * (-0.373619,-0.0794152) vertex[9] = @nscale1 * (0.255585,-0.283856) vertex[10] = @nscale1 * (0.118034,0.363271) vertex[11] = @nscale1 * (-0.373619,-0.0794152) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 11 ; "square" cursality = 1 numbervertices = 5 ; n + cursality cincrement = 5 ; numbervertices/cursality vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0,1) vertex[2] = @nscale1 * (-1,0) vertex[3] = @nscale1 * (0,-1) vertex[4] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 12 ; "square 2" cursality = 6 numbervertices = 12 cincrement = 2 ; numbervertices/cursality vertex[0] = @nscale1 * (0.5,0.5) vertex[1] = @nscale1 * (-0.5,0.5) vertex[2] = @nscale1 * (-0.5,0.5) vertex[3] = @nscale1 * (-0.5,-0.5) vertex[4] = @nscale1 * (-0.5,-0.5) vertex[5] = @nscale1 * (0.5,-0.5) vertex[6] = @nscale1 * (0.5,-0.5) vertex[7] = @nscale1 * (0.5,0.5) vertex[8] = @nscale1 * (0.5,0.5) vertex[9] = @nscale1 * (-0.5,-0.5) vertex[10] = @nscale1 * (-0.5,0.5) vertex[11] = @nscale1 * (0.5,-0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 13 ; "rhombus" cursality = 1 numbervertices = 5 ; n + cursality cincrement = 5 ; numbervertices/cursality vertex[0] = @rhombheight * @nscale1 * (-1.5,0) vertex[1] = @rhombwidth * @nscale1 * (0,0.5) vertex[2] = @rhombheight * @nscale1 * (1.5,0) vertex[3] = @rhombwidth * @nscale1 * (0,-0.5) vertex[4] = @rhombheight * @nscale1 * (-1.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 14 ; "kite" cursality = 1 numbervertices = 5 ; n + cursality cincrement = 5 ; numbervertices/cursality vertex[0] = @kiteheight * @nscale1 * (0,1.25) vertex[1] = @kitewidth * @nscale1 * (-0.5,0.75) vertex[2] = @kiteheight * @nscale1 * (0,-1.25) vertex[3] = @kitewidth * @nscale1 * (0.5,0.75) vertex[4] = @kiteheight * @nscale1 * (0,1.25) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 15 ; "dart" cursality = 1 numbervertices = 5 ; n + cursality cincrement = 5 ; numbervertices/cursality vertex[0] = @dartheight * @nscale1 * (0,0.5) vertex[1] = @dartwidth * @nscale1 * (-0.5,1) vertex[2] = @dartheight * @nscale1 * (0,-1) vertex[3] = @dartwidth * @nscale1 * (0.5,1) vertex[4] = @dartheight * @nscale1 * (0,0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 214 ; "rectangle" cursality = 1 numbervertices = 5 ; n + cursality cincrement = 5 ; numbervertices/cursality scratchfloat = @rectlength * 0.5 ; x-coordinate of rectangle vertex scratchfloat2 = @rectwidth * 0.5 ; y-coordinate vertex[0] = @nscale1 * (scratchfloat + flip(scratchfloat2)) vertex[1] = @nscale1 * (-scratchfloat + flip(scratchfloat2)) vertex[2] = @nscale1 * (-scratchfloat + flip(-scratchfloat2)) vertex[3] = @nscale1 * (scratchfloat + flip(-scratchfloat2)) vertex[4] = @nscale1 * (scratchfloat + flip(scratchfloat2)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 16 ; "4-asterisk" cursality = 4 numbervertices = 8 ; n + cursality cincrement = 2 ; numbervertices/cursality vertex[0] = @nscale1 * (0,0) vertex[1] = @leafAlength * @nscale1 * (1,0) vertex[2] = @nscale1 * (0,0) vertex[3] = @leafBlength * @nscale1 * (0,1) vertex[4] = @nscale1 * (0,0) vertex[5] = @leafClength * @nscale1 * (-1,0) vertex[6] = @nscale1 * (0,0) vertex[7] = @leafDlength * @nscale1 * (0,-1) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 17 ; "4-star" cursality = 1 numbervertices = 9 ; n + cursality cincrement = 9 ; numbervertices/cursality vertex[0] = @nscale1 * (0.5,0) vertex[1] = @starspikiness * @nscale1 * (1.06066, 1.06066) vertex[2] = @nscale1 * (0, 0.5) vertex[3] = @starspikiness * @nscale1 * (-1.06066, 1.06066) vertex[4] = @nscale1 * (-0.5, 0) vertex[5] = @starspikiness * @nscale1 * (-1.06066, -1.06066) vertex[6] = @nscale1 * (0, -0.5) vertex[7] = @starspikiness * @nscale1 * (1.06066, -1.06066) vertex[8] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 18 ; "flat 4-star" cursality = 1 numbervertices = 9 ; n + cursality cincrement = 9 ; numbervertices/cursality vertex[0] = @flat4height * @nscale1 * (0.5,0) vertex[1] = @flat4width * @nscale1 * (1.06066, 0.53033) vertex[2] = @flat4height * @nscale1 * (0, 0.25) vertex[3] = @flat4width * @nscale1 * (-1.06066, 0.53033) vertex[4] = @flat4height * @nscale1 * (-0.5, 0) vertex[5] = @flat4width * @nscale1 * (-1.06066, -0.53033) vertex[6] = @flat4height * @nscale1 * (0, -0.25) vertex[7] = @flat4width * @nscale1 * (1.06066, -0.53033) vertex[8] = @flat4height * @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 69 ; "4-star 2" cursality = 1 numbervertices = 9 ; n + cursality cincrement = 9 ; numbervertices/cursality vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.289778, 0.0776457) vertex[2] = @nscale1 * (0, 1) vertex[3] = @nscale1 * (-0.0776457, 0.289778) vertex[4] = @nscale1 * (-1, 0) vertex[5] = @nscale1 * (-0.289778, -0.0776457) vertex[6] = @nscale1 * (0, -1) vertex[7] = @nscale1 * (0.0776457, -0.289778) vertex[8] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 19 ; "bowtie" cursality = 1 numbervertices = 5 ; n + cursality cincrement = 5 ; numbervertices/cursality vertex[0] = @nscale1 * (0.5,0.5) vertex[1] = @nscale1 * (-0.5,-0.5) vertex[2] = @nscale1 * (-0.5,0.5) vertex[3] = @nscale1 * (0.5,-0.5) vertex[4] = @nscale1 * (0.5,0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 20 ; "windowpane" cursality = 6 numbervertices = 12 ; open figures (line segments) cincrement = 2 ; numbervertices/cursality vertex[0] = @nscale1 * (0.5,0.5) vertex[1] = @nscale1 * (-0.5,0.5) vertex[2] = @nscale1 * (0.5,0) vertex[3] = @nscale1 * (-0.5,0) vertex[4] = @nscale1 * (0.5,-0.5) vertex[5] = @nscale1 * (-0.5,-0.5) vertex[6] = @nscale1 * (0.5,0.5) vertex[7] = @nscale1 * (0.5,-0.5) vertex[8] = @nscale1 * (0,0.5) vertex[9] = @nscale1 * (0,-0.5) vertex[10] = @nscale1 * (-0.5,0.5) vertex[11] = @nscale1 * (-0.5,-0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 21 ; "tetragram" cursality = 1 numbervertices = 9 ; n + cursality for a closed curve cincrement = 9 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.7, 0) vertex[1] = @nscale1 * (0.573427,-1.27718) vertex[2] = @nscale1 * (0,0.7) vertex[3] = @nscale1 * (-1.27718,-0.573427) vertex[4] = @nscale1 * (0.7,0) vertex[5] = @nscale1 * (-0.573427,1.27718) vertex[6] = @nscale1 * (0,-0.7) vertex[7] = @nscale1 * (1.27718,0.573427) vertex[8] = @nscale1 * (-0.7, 0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 67 ; "tetragram 2" cursality = 2 numbervertices = 10 ; n + cursality for a closed curve cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.207912, -0.978148) vertex[2] = @nscale1 * (-0.978148, -0.207912) vertex[3] = @nscale1 * (0.207912, 0.978148) vertex[4] = @nscale1 * (0.978148, 0.207912) vertex[5] = @nscale1 * (-0.207912, 0.978148) vertex[6] = @nscale1 * (0.978148, -0.207912) vertex[7] = @nscale1 * (0.207912, -0.978148) vertex[8] = @nscale1 * (-0.978148, 0.207912) vertex[9] = @nscale1 * (-0.207912, 0.978148) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 22 ; "nested squares" cursality = 2 numbervertices = 10 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1.2, 0) vertex[1] = @nscale1 * (0,1.2) vertex[2] = @nscale1 * (-1.2,0) vertex[3] = @nscale1 * (0,-1.2) vertex[4] = @nscale1 * (1.2,0) vertex[5] = @innerscale * @nscale1 * (0.75,0) vertex[6] = @innerscale * @nscale1 * (0,0.75) vertex[7] = @innerscale * @nscale1 * (-0.75,0) vertex[8] = @innerscale * @nscale1 * (0,-0.75) vertex[9] = @innerscale * @nscale1 * (0.75,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 23 ; "nested square 2" cursality = 2 numbervertices = 10 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1.2, 0) vertex[1] = @nscale1 * (0,1.2) vertex[2] = @nscale1 * (-1.2,0) vertex[3] = @nscale1 * (0,-1.2) vertex[4] = @nscale1 * (1.2,0) vertex[5] = @innerscale * @nscale1 * (0.35,0.35) vertex[6] = @innerscale * @nscale1 * (-0.35,0.35) vertex[7] = @innerscale * @nscale1 * (-0.35,-0.35) vertex[8] = @innerscale * @nscale1 * (0.35,-0.35) vertex[9] = @innerscale * @nscale1 * (0.35,0.35) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 24 ; "twisted squares" cursality = 3 numbervertices = 15 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0,1) vertex[2] = @nscale1 * (-1,0) vertex[3] = @nscale1 * (0,-1) vertex[4] = @nscale1 * (1,0) vertex[5] = @nscale1 * (0.266846,0.733154) vertex[6] = @nscale1 * (-0.733154,0.266846) vertex[7] = @nscale1 * (-0.266846,-0.733154) vertex[8] = @nscale1 * (0.733154,-0.266846) vertex[9] = @nscale1 * (0.266846,0.733154) vertex[10] = @nscale1 * (-0.466308,0.391279) vertex[11] = @nscale1 * (-0.391279,-0.466308) vertex[12] = @nscale1 * (0.466308,-0.391279) vertex[13] = @nscale1 * (0.391279,0.466308) vertex[14] = @nscale1 * (-0.466308,0.391279) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 25 ; "twisted square 2" cursality = 4 numbervertices = 20 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0,1) vertex[2] = @nscale1 * (-1,0) vertex[3] = @nscale1 * (0,-1) vertex[4] = @nscale1 * (1,0) vertex[5] = @nscale1 * (0.366025,0.633975) vertex[6] = @nscale1 * (-0.633975,0.366025) vertex[7] = @nscale1 * (-0.366025,-0.633975) vertex[8] = @nscale1 * (0.633975,-0.366025) vertex[9] = @nscale1 * (0.366025,0.633975) vertex[10] = @nscale1 * (-0.267949,0.464102) vertex[11] = @nscale1 * (-0.464102,-0.267949) vertex[12] = @nscale1 * (0.267949,-0.464102) vertex[13] = @nscale1 * (0.464102,0.267949) vertex[14] = @nscale1 * (-0.267949,0.464102) vertex[15] = @nscale1 * (-0.392305, 0) vertex[16] = @nscale1 * (0,-0.392305) vertex[17] = @nscale1 * (0.392305,0) vertex[18] = @nscale1 * (0,0.392305) vertex[19] = @nscale1 * (-0.392305,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 26 ; "windmill" cursality = 2 numbervertices = 10 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.965926, 0.258819) vertex[1] = @nscale1 * (-0.965926, 0.258819) vertex[2] = @nscale1 * (-0.965926, -0.258819) vertex[3] = @nscale1 * (0.965926, -0.258819) vertex[4] = @nscale1 * (0.965926, 0.258819) vertex[5] = @nscale1 * ((@windwidth * -0.258819) + flip(@windheight * 0.965926)) vertex[6] = @nscale1 * ((@windwidth * -0.258819) + flip(@windheight * -0.965926)) vertex[7] = @nscale1 * ((@windwidth * 0.258819) + flip(@windheight * -0.965926)) vertex[8] = @nscale1 * ((@windwidth * 0.258819) + flip(@windheight * 0.965926)) vertex[9] = @nscale1 * ((@windwidth * -0.258819) + flip(@windheight * 0.965926)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 27 ; "windmill 2" cursality = 2 numbervertices = 10 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.965926, 0.258819) vertex[1] = @nscale1 * (-0.965926, -0.258819) vertex[2] = @nscale1 * (-0.965926, 0.258819) vertex[3] = @nscale1 * (0.965926, -0.258819) vertex[4] = @nscale1 * (0.965926, 0.258819) vertex[5] = @nscale1 * ((@windwidth * -0.258819) + flip(@windheight * 0.965926)) vertex[6] = @nscale1 * ((@windwidth * 0.258819) + flip(@windheight * -0.965926)) vertex[7] = @nscale1 * ((@windwidth * -0.258819) + flip(@windheight * -0.965926)) vertex[8] = @nscale1 * ((@windwidth * 0.258819) + flip(@windheight * 0.965926)) vertex[9] = @nscale1 * ((@windwidth * -0.258819) + flip(@windheight * 0.965926)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 28 ; "pentagon" cursality = 1 numbervertices = 6 ; n + cursality cincrement = 6 ; numbervertices/cursality scratchfloat = 0.951056516295153572 scratchfloat2 = -0.809016994374947424 scratchfloat3 = 0.587785252292473129 scratchfloat4 = 0.309016994374947424 vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (scratchfloat4 + flip(scratchfloat)) vertex[2] = @nscale1 * (scratchfloat2 + flip(scratchfloat3)) vertex[3] = @nscale1 * (scratchfloat2 + flip(-scratchfloat3)) vertex[4] = @nscale1 * (scratchfloat4 + flip(-scratchfloat)) vertex[5] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 29 ; "pentagon 2" cursality = 5 numbervertices = 15 ; open pieces cincrement = 3 ; numbervertices/cursality scratchfloat = 0.951056516295153572 scratchfloat2 = -0.809016994374947424 scratchfloat3 = 0.587785252292473129 scratchfloat4 = 0.309016994374947424 vertex[0] = @nscale1 * (0,0) vertex[1] = @nscale1 * (1,0) vertex[2] = @nscale1 * (scratchfloat4 + flip(scratchfloat)) vertex[3] = @nscale1 * (0,0) vertex[4] = @nscale1 * (scratchfloat4 + flip(scratchfloat)) vertex[5] = @nscale1 * (scratchfloat2 + flip(scratchfloat3)) vertex[6] = @nscale1 * (0,0) vertex[7] = @nscale1 * (scratchfloat2 + flip(scratchfloat3)) vertex[8] = @nscale1 * (scratchfloat2 + flip(-scratchfloat3)) vertex[9] = @nscale1 * (0,0) vertex[10] = @nscale1 * (scratchfloat2 + flip(-scratchfloat3)) vertex[11] = @nscale1 * (scratchfloat4 + flip(-scratchfloat)) vertex[12] = @nscale1 * (0,0) vertex[13] = @nscale1 * (scratchfloat4 + flip(-scratchfloat)) vertex[14] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 30 ; "pentagram" cursality = 1 numbervertices = 6 cincrement = 6 ; numbervertices/cursality scratchfloat = 0.951056516295153572 scratchfloat2 = -0.809016994374947424 scratchfloat3 = 0.587785252292473129 scratchfloat4 = 0.309016994374947424 vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (scratchfloat2 + flip(scratchfloat3)) vertex[2] = @nscale1 * (scratchfloat4 + flip(-scratchfloat)) vertex[3] = @nscale1 * (scratchfloat4 + flip(scratchfloat)) vertex[4] = @nscale1 * (scratchfloat2 + flip(-scratchfloat3)) vertex[5] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 31 ; "pentagram 2" cursality = 1 numbervertices = 11 ; 10 + cursality for closed figure cincrement = 11 ; numbervertices/cursality vertex[0] = @nscale1 * (-0.48541,0.352671) vertex[1] = @nscale1 * (-0.488084,-1.09625) vertex[2] = @nscale1 * (0.18541,0.570634) vertex[3] = @nscale1 * (-1.19343,0.125434) vertex[4] = @nscale1 * (0.6,0) vertex[5] = @nscale1 * (-0.249494,1.17378) vertex[6] = @nscale1 * (0.18541,-0.570634) vertex[7] = @nscale1 * (1.03923,0.6) vertex[8] = @nscale1 * (-0.48541,-0.352671) vertex[9] = @nscale1 * (0.891774,-0.802957) vertex[10] = @nscale1 * (-0.48541,0.352671) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 32 ; "pentagram 3" cursality = 1 numbervertices = 11 ; 10 + cursality for closed figure cincrement = 11 ; numbervertices/cursality vertex[0] = @nscale1 * (0.965926, 0.258819) vertex[1] = @nscale1 * (-0.62932, 0.777146) vertex[2] = @nscale1 * (-0.93358, 0.358368) vertex[3] = @nscale1 * (0.052336, -0.99863) vertex[4] = @nscale1 * (0.544639, -0.838671) vertex[5] = @nscale1 * (0.544639, 0.838671) vertex[6] = @nscale1 * (0.052336, 0.99863) vertex[7] = @nscale1 * (-0.93358, -0.358368) vertex[8] = @nscale1 * (-0.62932, -0.777146) vertex[9] = @nscale1 * (0.965926, -0.258819) vertex[10] = @nscale1 * (0.965926, 0.258819) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 33 ; "pentagram 4" cursality = 1 numbervertices = 11 ; 10 + cursality for closed figure cincrement = 11 ; numbervertices/cursality vertex[0] = @nscale1 * (0.965926, 0.258819) vertex[1] = @nscale1 * (-0.93358, -0.358368) vertex[2] = @nscale1 * (-0.93358, 0.358368) vertex[3] = @nscale1 * (0.965926, -0.258819) vertex[4] = @nscale1 * (0.544639, -0.838671) vertex[5] = @nscale1 * (-0.62932, 0.777146) vertex[6] = @nscale1 * (0.052336, 0.99863) vertex[7] = @nscale1 * (0.052336, -0.99863) vertex[8] = @nscale1 * (-0.62932, -0.777146) vertex[9] = @nscale1 * (0.544639, 0.838671) vertex[10] = @nscale1 * (0.965926, 0.258819) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 68 ; "pentagram 5" cursality = 1 numbervertices = 11 ; 10 + cursality for closed figure cincrement = 11 ; numbervertices/cursality vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.913545, -0.406737) vertex[2] = @nscale1 * (-0.913545, 0.406737) vertex[3] = @nscale1 * (0.978148, -0.207912) vertex[4] = @nscale1 * (0.5, -0.866025) vertex[5] = @nscale1 * (-0.669131, 0.743145) vertex[6] = @nscale1 * (0.104528, 0.994522) vertex[7] = @nscale1 * (0.104528, -0.994522) vertex[8] = @nscale1 * (-0.669131, -0.743145) vertex[9] = @nscale1 * (0.5, 0.866025) vertex[10] = @nscale1 * (0.978148, 0.207912) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 34 ; "5-asterisk" cursality = 5 numbervertices = 10 ; n + cursality cincrement = 2 ; numbervertices/cursality scratchfloat = 0.951056 ;516295153572 scratchfloat2 = -0.809016 ;994374947424 scratchfloat3 = 0.587785 ;252292473129 scratchfloat4 = 0.309016 ;994374947424 vertex[0] = @nscale1 * (0,0) vertex[1] = @leafAlength * @nscale1 * (1,0) vertex[2] = @nscale1 * (0,0) vertex[3] = @leafBlength * @nscale1 * (scratchfloat4 + flip(scratchfloat)) vertex[4] = @nscale1 * (0,0) vertex[5] = @leafClength * @nscale1 * (scratchfloat2 + flip(scratchfloat3)) vertex[6] = @nscale1 * (0,0) vertex[7] = @leafDlength * @nscale1 * (scratchfloat2 + flip(-scratchfloat3)) vertex[8] = @nscale1 * (0,0) vertex[9] = @leafElength * @nscale1 * (scratchfloat4 + flip(-scratchfloat)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 35 ; "5-star" cursality = 1 numbervertices = 11 ; n + cursality cincrement = 11 ; numbervertices/cursality vertex[0] = @nscale1 * (0.625,0) vertex[1] = @starspikiness * @nscale1 * (1.01127,0.734732) vertex[2] = @nscale1 * (0.193136,0.59441) vertex[3] = @starspikiness * @nscale1 * (-0.386271,1.18882) vertex[4] = @nscale1 * (-0.505636,0.367366) vertex[5] = @starspikiness * @nscale1 * (-1.25,0) vertex[6] = @nscale1 * (-0.505636,-0.367366) vertex[7] = @starspikiness * @nscale1 * (-0.386271,-1.18882) vertex[8] = @nscale1 * (0.193136,-0.59441) vertex[9] = @starspikiness * @nscale1 * (1.01127,-0.734732) vertex[10] = @nscale1 * (0.625,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 65 ; "5-star 2" cursality = 1 numbervertices = 11 ; n + cursality cincrement = 11 ; numbervertices/cursality vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5, 0) vertex[2] = @nscale1 * (0.309017, 0.951057) vertex[3] = @nscale1 * (0.154508, 0.475528) vertex[4] = @nscale1 * (-0.809017, 0.587785) vertex[5] = @nscale1 * (-0.404508, 0.293893) vertex[6] = @nscale1 * (-0.809017, -0.587785) vertex[7] = @nscale1 * (-0.404508, -0.293893) vertex[8] = @nscale1 * (0.309017, -0.951057) vertex[9] = @nscale1 * (0.154508, -0.475528) vertex[10] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 70 ; "5-star 3" cursality = 1 numbervertices = 11 ; n + cursality cincrement = 11 ; numbervertices/cursality vertex[0] = @nscale1 * (0.866025, 0.5) vertex[1] = @nscale1 * (0.433013, -0.25) vertex[2] = @nscale1 * (-0.207912, 0.978148) vertex[3] = @nscale1 * (0.371572, 0.334565) vertex[4] = @nscale1 * (-0.994522, 0.104528) vertex[5] = @nscale1 * (-0.203368, 0.456773) vertex[6] = @nscale1 * (-0.406737, -0.913545) vertex[7] = @nscale1 * (-0.497261, -0.0522642) vertex[8] = @nscale1 * (0.743145, -0.669131) vertex[9] = @nscale1 * (-0.103956, -0.489074) vertex[10] = @nscale1 * (0.866025, 0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 36 ; "nested pentagons" cursality = 2 numbervertices = 12 ; 10 + cursality cincrement = 6 ; numbervertices/cursality vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.309017,0.951057) vertex[2] = @nscale1 * (-0.809017,0.587785) vertex[3] = @nscale1 * (-0.809017,-0.587785) vertex[4] = @nscale1 * (0.309017,-0.951057) vertex[5] = @nscale1 * (1,0) vertex[6] = @innerscale * @nscale1 * (0.4,0) vertex[7] = @innerscale * @nscale1 * (0.123607,0.380423) vertex[8] = @innerscale * @nscale1 * (-0.323607,0.235114) vertex[9] = @innerscale * @nscale1 * (-0.323607,-0.235114) vertex[10] = @innerscale * @nscale1 * (0.123607,-0.380423) vertex[11] = @innerscale * @nscale1 * (0.4,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 37 ; "nested pentagon 2" cursality = 2 numbervertices = 12 ; 10 + cursality cincrement = 6 ; numbervertices/cursality vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.309017,0.951057) vertex[2] = @nscale1 * (-0.809017,0.587785) vertex[3] = @nscale1 * (-0.809017,-0.587785) vertex[4] = @nscale1 * (0.309017,-0.951057) vertex[5] = @nscale1 * (1,0) vertex[6] = @innerscale * @nscale1 * (0.323607,0.235114) vertex[7] = @innerscale * @nscale1 * (-0.123607,0.380423) vertex[8] = @innerscale * @nscale1 * (-0.4,0) vertex[9] = @innerscale * @nscale1 * (-0.123607,-0.380423) vertex[10] = @innerscale * @nscale1 * (0.323607,-0.235114) vertex[11] = @innerscale * @nscale1 * (0.323607,0.235114) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 38 ; "twisted pentagons" cursality = 3 numbervertices = 18 ; n + cursality for closed curves cincrement = 6 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0.309017,0.951057) vertex[2] = @nscale1 * (-0.809017,0.587785) vertex[3] = @nscale1 * (-0.809017,-0.587785) vertex[4] = @nscale1 * (0.309017,-0.951057) vertex[5] = @nscale1 * (1,0) vertex[6] = @nscale1 * (0.553432,0.614648) vertex[7] = @nscale1 * (-0.413545,0.716282) vertex[8] = @nscale1 * (-0.809017,-0.171962) vertex[9] = @nscale1 * (-0.0864545,-0.82256) vertex[10] = @nscale1 * (0.755585,-0.336408) vertex[11] = @nscale1 * (0.553432,0.614648) vertex[12] = @nscale1 * (-0.0715058,0.680332) vertex[13] = @nscale1 * (-0.669131,0.142228) vertex[14] = @nscale1 * (-0.34204,-0.59243) vertex[15] = @nscale1 * (0.457738,-0.50837) vertex[16] = @nscale1 * (0.624938,0.27824) vertex[17] = @nscale1 * (-0.0715058,0.680332) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 39 ; "twisted pentagon 2" cursality = 4 numbervertices = 24 ; n + cursality for closed curves cincrement = 6 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0.309017,0.951057) vertex[2] = @nscale1 * (-0.809017,0.587785) vertex[3] = @nscale1 * (-0.809017,-0.587785) vertex[4] = @nscale1 * (0.309017,-0.951057) vertex[5] = @nscale1 * (1,0) vertex[6] = @nscale1 * (0.553432,0.614648) vertex[7] = @nscale1 * (-0.413545,0.716282) vertex[8] = @nscale1 * (-0.809017,-0.171962) vertex[9] = @nscale1 * (-0.0864545,-0.82256) vertex[10] = @nscale1 * (0.755585,-0.336408) vertex[11] = @nscale1 * (0.553432,0.614648) vertex[12] = @nscale1 * (-0.0715058,0.680332) vertex[13] = @nscale1 * (-0.669131,0.142228) vertex[14] = @nscale1 * (-0.34204,-0.59243) vertex[15] = @nscale1 * (0.457738,-0.50837) vertex[16] = @nscale1 * (0.624938,0.27824) vertex[17] = @nscale1 * (-0.0715058,0.680332) vertex[18] = @nscale1 * (-0.457738,0.332566) vertex[19] = @nscale1 * (-0.457738,-0.332566) vertex[20] = @nscale1 * (0.174841,-0.538104) vertex[21] = @nscale1 * (0.565796,0) vertex[22] = @nscale1 * (0.174841,0.538104) vertex[23] = @nscale1 * (-0.457738,0.332566) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 40 ; "hexagon" cursality = 1 numbervertices = 7 ; n + cursality for closed curves cincrement = 7 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,1) vertex[1] = @nscale1 * (-scratchfloat + flip(0.5)) vertex[2] = @nscale1 * (-scratchfloat + flip(-0.5)) vertex[3] = @nscale1 * (0,-1) vertex[4] = @nscale1 * (scratchfloat + flip(-0.5)) vertex[5] = @nscale1 * (scratchfloat + flip(0.5)) vertex[6] = @nscale1 * (0,1) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 41 ; "hexagon 2" cursality = 6 numbervertices = 18 ; open curves cincrement = 3 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @nscale1 * (0,1) vertex[2] = @nscale1 * (-scratchfloat + flip(0.5)) vertex[3] = @nscale1 * (0,0) vertex[4] = @nscale1 * (-scratchfloat + flip(0.5)) vertex[5] = @nscale1 * (-scratchfloat + flip(-0.5)) vertex[6] = @nscale1 * (0,0) vertex[7] = @nscale1 * (-scratchfloat + flip(-0.5)) vertex[8] = @nscale1 * (0,-1) vertex[9] = @nscale1 * (0,0) vertex[10] = @nscale1 * (0,-1) vertex[11] = @nscale1 * (scratchfloat + flip(-0.5)) vertex[12] = @nscale1 * (0,0) vertex[13] = @nscale1 * (scratchfloat + flip(-0.5)) vertex[14] = @nscale1 * (scratchfloat + flip(0.5)) vertex[15] = @nscale1 * (0,0) vertex[16] = @nscale1 * (scratchfloat + flip(0.5)) vertex[17] = @nscale1 * (0,1) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 42 ; "hexagram" cursality = 2 numbervertices = 8 ; n + cursality for closed curves cincrement = 4 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,1) vertex[1] = @nscale1 * (-scratchfloat + flip(-0.5)) vertex[2] = @nscale1 * (scratchfloat + flip(-0.5)) vertex[3] = @nscale1 * (0,1) vertex[4] = @nscale1 * (-scratchfloat + flip(0.5)) vertex[5] = @nscale1 * (0,-1) vertex[6] = @nscale1 * (scratchfloat + flip(0.5)) vertex[7] = @nscale1 * (-scratchfloat + flip(0.5)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 43 ; "hexagram 2" cursality = 1 numbervertices = 7 ; n + cursality for closed curves cincrement = 7 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,1) vertex[1] = @nscale1 * (-scratchfloat + flip(-0.5)) vertex[2] = @nscale1 * (scratchfloat + flip(0.5)) vertex[3] = @nscale1 * (0,-1) vertex[4] = @nscale1 * (-scratchfloat + flip(0.5)) vertex[5] = @nscale1 * (scratchfloat + flip(-0.5)) vertex[6] = @nscale1 * (0,1) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 44 ; "hexagram 3" cursality = 1 numbervertices = 13 ; 10 + cursality for closed figure cincrement = 13 ; numbervertices/cursality vertex[0] = @nscale1 * (-0.3,0.519615) vertex[1] = @nscale1 * (-0.879474,-0.475947) vertex[2] = @nscale1 * (0.3,0.519615) vertex[3] = @nscale1 * (-0.851919,0.523673) vertex[4] = @nscale1 * (0.6,0) vertex[5] = @nscale1 * (0.0275543,0.99962) vertex[6] = @nscale1 * (0.3,-0.519615) vertex[7] = @nscale1 * (0.879474,0.475947) vertex[8] = @nscale1 * (-0.3,-0.519615) vertex[9] = @nscale1 * (0.851919,-0.523673) vertex[10] = @nscale1 * (-0.6,0) vertex[11] = @nscale1 * (-0.0275543,-0.99962) vertex[12] = @nscale1 * (-0.3,0.519615) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 45 ; "hexagram 4" cursality = 2 numbervertices = 14 ; 12 + cursality for closed figures cincrement = 7 ; numbervertices/cursality vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.309017, 0.951057) vertex[2] = @nscale1 * (-0.669131, 0.743145) vertex[3] = @nscale1 * (-0.669131, -0.743145) vertex[4] = @nscale1 * (-0.309017, -0.951057) vertex[5] = @nscale1 * (0.978148, -0.207912) vertex[6] = @nscale1 * (0.978148, 0.207912) vertex[7] = @nscale1 * (0.309017, 0.951057) vertex[8] = @nscale1 * (-0.978148, 0.207912) vertex[9] = @nscale1 * (-0.978148, -0.207912) vertex[10] = @nscale1 * (0.309017, -0.951057) vertex[11] = @nscale1 * (0.669131, -0.743145) vertex[12] = @nscale1 * (0.669131, 0.743145) vertex[13] = @nscale1 * (0.309017, 0.951057) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 46 ; "hexagram 5" cursality = 3 numbervertices = 15 ; 12 + cursality for closed figures cincrement = 5 ; numbervertices/cursality vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.978148, 0.207912) vertex[2] = @nscale1 * (-0.978148, -0.207912) vertex[3] = @nscale1 * (0.978148, -0.207912) vertex[4] = @nscale1 * (0.978148, 0.207912) vertex[5] = @nscale1 * (0.309017, 0.951057) vertex[6] = @nscale1 * (-0.669131, -0.743145) vertex[7] = @nscale1 * (-0.309017, -0.951057) vertex[8] = @nscale1 * (0.669131, 0.743145) vertex[9] = @nscale1 * (0.309017, 0.951057) vertex[10] = @nscale1 * (-0.669131, 0.743145) vertex[11] = @nscale1 * (0.309017, -0.951057) vertex[12] = @nscale1 * (0.669131, -0.743145) vertex[13] = @nscale1 * (-0.309017, 0.951057) vertex[14] = @nscale1 * (-0.669131, 0.743145) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 47 ; "hexagram 6" cursality = 3 numbervertices = 15 ; 12 + cursality for closed figures cincrement = 5 ; numbervertices/cursality vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.978148, -0.207912) vertex[2] = @nscale1 * (-0.978148, 0.207912) vertex[3] = @nscale1 * (0.978148, -0.207912) vertex[4] = @nscale1 * (0.978148, 0.207912) vertex[5] = @nscale1 * (0.309017, 0.951057) vertex[6] = @nscale1 * (-0.309017, -0.951057) vertex[7] = @nscale1 * (-0.669131, -0.743145) vertex[8] = @nscale1 * (0.669131, 0.743145) vertex[9] = @nscale1 * (0.309017, 0.951057) vertex[10] = @nscale1 * (-0.669131, 0.743145) vertex[11] = @nscale1 * (0.669131, -0.743145) vertex[12] = @nscale1 * (0.309017, -0.951057) vertex[13] = @nscale1 * (-0.309017, 0.951057) vertex[14] = @nscale1 * (-0.669131, 0.743145) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 48 ; "hexagram 7" cursality = 2 numbervertices = 14 ; 12 + cursality for closed figures cincrement = 7 ; numbervertices/cursality vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.978148, 0.207912) vertex[2] = @nscale1 * (-0.669131, 0.743145) vertex[3] = @nscale1 * (0.309017, -0.951057) vertex[4] = @nscale1 * (-0.309017, -0.951057) vertex[5] = @nscale1 * (0.669131, 0.743145) vertex[6] = @nscale1 * (0.978148, 0.207912) vertex[7] = @nscale1 * (0.309017, 0.951057) vertex[8] = @nscale1 * (-0.669131, -0.743145) vertex[9] = @nscale1 * (-0.978148, -0.207912) vertex[10] = @nscale1 * (0.978148, -0.207912) vertex[11] = @nscale1 * (0.669131, -0.743145) vertex[12] = @nscale1 * (-0.309017, 0.951057) vertex[13] = @nscale1 * (0.309017, 0.951057) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 49 ; "6-asterisk" cursality = 6 numbervertices = 12 ; n + cursality for closed curves cincrement = 2 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @leafAlength * @nscale1 * (0,1) vertex[2] = @nscale1 * (0,0) vertex[3] = @leafBlength * @nscale1 * (-scratchfloat + flip(0.5)) vertex[4] = @nscale1 * (0,0) vertex[5] = @leafClength * @nscale1 * (-scratchfloat + flip(-0.5)) vertex[6] = @nscale1 * (0,0) vertex[7] = @leafDlength * @nscale1 * (0,-1) vertex[8] = @nscale1 * (0,0) vertex[9] = @leafElength * @nscale1 * (scratchfloat + flip(-0.5)) vertex[10] = @nscale1 * (0,0) vertex[11] = @leafFlength * @nscale1 * (scratchfloat + flip(0.5)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 50 ; "6-star" cursality = 1 numbervertices = 13 ; n + cursality for closed curves cincrement = 13 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.7,0) vertex[1] = @starspikiness * @nscale1 * (1.08253,0.625) vertex[2] = @nscale1 * (0.35,0.606218) vertex[3] = @starspikiness * @nscale1 * (0,1.25) vertex[4] = @nscale1 * (-0.35,0.606218) vertex[5] = @starspikiness * @nscale1 * (-1.08253,0.625) vertex[6] = @nscale1 * (-0.7,0) vertex[7] = @starspikiness * @nscale1 * (-1.08253,-0.625) vertex[8] = @nscale1 * (-0.35,-0.606218) vertex[9] = @starspikiness * @nscale1 * (0,-1.125) vertex[10] = @nscale1 * (0.35,-0.606218) vertex[11] = @starspikiness * @nscale1 * (1.08253,-0.625) vertex[12] = @nscale1 * (0.7,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 71 ; "6-star 2" cursality = 1 numbervertices = 13 ; n + cursality for closed curves cincrement = 13 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5,0) vertex[2] = @nscale1 * (0.5, 0.866025) vertex[3] = @nscale1 * (0.25, 0.433013) vertex[4] = @nscale1 * (-0.5, 0.866025) vertex[5] = @nscale1 * (-0.25, 0.433013) vertex[6] = @nscale1 * (-1,0) vertex[7] = @nscale1 * (-0.5,0) vertex[8] = @nscale1 * (-0.5, -0.866025) vertex[9] = @nscale1 * (-0.25, -0.433013) vertex[10] = @nscale1 * (0.5, -0.866025) vertex[11] = @nscale1 * (0.25, -0.433013) vertex[12] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 72 ; "6-star 3" cursality = 1 numbervertices = 13 ; n + cursality for closed curves cincrement = 13 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.720775, 0.347107) vertex[1] = @nscale1 * (0.450484, -0.216942) vertex[2] = @nscale1 * (0.0597841, 0.797763) vertex[3] = @nscale1 * (0.413119, 0.28166) vertex[4] = @nscale1 * (-0.660991, 0.450656) vertex[5] = @nscale1 * (-0.037365, 0.498602) vertex[6] = @nscale1 * (-0.720775, -0.347107) vertex[7] = @nscale1 * (-0.450484, 0.216942) vertex[8] = @nscale1 * (-0.0597841, -0.797763) vertex[9] = @nscale1 * (-0.413119, -0.28166) vertex[10] = @nscale1 * (0.660991, -0.450656) vertex[11] = @nscale1 * (0.037365, -0.498602) vertex[12] = @nscale1 * (0.720775, 0.347107) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 51 ; "nested hexagons" cursality = 2 numbervertices = 14 ; 10 + cursality cincrement = 7 ; numbervertices/cursality vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5,0.866025) vertex[2] = @nscale1 * (-0.5,0.866025) vertex[3] = @nscale1 * (-1,0) vertex[4] = @nscale1 * (-0.5,-0.866025) vertex[5] = @nscale1 * (0.5,-0.866025) vertex[6] = @nscale1 * (1,0) vertex[7] = @innerscale * @nscale1 * (0.4,0) vertex[8] = @innerscale * @nscale1 * (0.2,0.34641) vertex[9] = @innerscale * @nscale1 * (-0.2,0.34641) vertex[10] = @innerscale * @nscale1 * (-0.4,0) vertex[11] = @innerscale * @nscale1 * (-0.2,-0.34641) vertex[12] = @nscale1 * (0.2,-0.34641) vertex[13] = @innerscale * @nscale1 * (0.4,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 52 ; "nested hexagon 2" cursality = 2 numbervertices = 14 ; 10 + cursality cincrement = 7 ; numbervertices/cursality vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5,0.866025) vertex[2] = @nscale1 * (-0.5,0.866025) vertex[3] = @nscale1 * (-1,0) vertex[4] = @nscale1 * (-0.5,-0.866025) vertex[5] = @nscale1 * (0.5,-0.866025) vertex[6] = @nscale1 * (1,0) vertex[7] = @innerscale * @nscale1 * (0.34641,0.2) vertex[8] = @innerscale * @nscale1 * (0,0.4) vertex[9] = @innerscale * @nscale1 * (-0.34641,0.2) vertex[10] = @innerscale * @nscale1 * (-0.34641,-0.2) vertex[11] = @innerscale * @nscale1 * (0,-0.4) vertex[12] = @nscale1 * (0.34641,-0.2) vertex[13] = @innerscale * @nscale1 * (0.34641,0.2) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 53 ; "twisted hexagons" cursality = 3 numbervertices = 21 ; n + cursality for closed curves cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0.5,0.866025) vertex[2] = @nscale1 * (-0.5,0.866025) vertex[3] = @nscale1 * (-1,0) vertex[4] = @nscale1 * (-0.5,-0.866025) vertex[5] = @nscale1 * (0.5,-0.866025) vertex[6] = @nscale1 * (1,0) vertex[7] = @nscale1 * (0.704489,0.511841) vertex[8] = @nscale1 * (-0.0910229,0.866025) vertex[9] = @nscale1 * (-0.795511,0.354185) vertex[10] = @nscale1 * (-0.704489,-0.511841) vertex[11] = @nscale1 * (0.0910229,-0.866025) vertex[12] = @nscale1 * (0.795511,-0.354185) vertex[13] = @nscale1 * (0.704489,0.511841) vertex[14] = @nscale1 * (0.234323,0.721172) vertex[15] = @nscale1 * (-0.507392,0.563516) vertex[16] = @nscale1 * (-0.741715,-0.157656) vertex[17] = @nscale1 * (-0.234323,-0.721172) vertex[18] = @nscale1 * (0.507392,-0.563516) vertex[19] = @nscale1 * (0.741715,0.157656) vertex[20] = @nscale1 * (0.234323,0.721172) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 54 ; "twisted hexagon 2" cursality = 4 numbervertices = 28 ; n + cursality for closed curves cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0.5,0.866025) vertex[2] = @nscale1 * (-0.5,0.866025) vertex[3] = @nscale1 * (-1,0) vertex[4] = @nscale1 * (-0.5,-0.866025) vertex[5] = @nscale1 * (0.5,-0.866025) vertex[6] = @nscale1 * (1,0) vertex[7] = @nscale1 * (0.673648, 0.565258) vertex[8] = @nscale1 * (-0.152704, 0.866025) vertex[9] = @nscale1 * (-0.826352, 0.300767) vertex[10] = @nscale1 * (-0.673648, -0.565258) vertex[11] = @nscale1 * (0.152704, -0.866025) vertex[12] = @nscale1 * (0.826352, -0.300767) vertex[13] = @nscale1 * (0.673648, 0.565258) vertex[14] = @nscale1 * (0.134285, 0.76157) vertex[15] = @nscale1 * (-0.592396, 0.497079) vertex[16] = @nscale1 * (-0.726682, -0.26449) vertex[17] = @nscale1 * (-0.134285, -0.76157) vertex[18] = @nscale1 * (0.592396, -0.497079) vertex[19] = @nscale1 * (0.726682, 0.26449) vertex[20] = @nscale1 * (0.134285, 0.76157) vertex[21] = @nscale1 * (-0.340022, 0.588936) vertex[22] = @nscale1 * (-0.680045, 0) vertex[23] = @nscale1 * (-0.340022, -0.588936) vertex[24] = @nscale1 * (0.340022, -0.588936) vertex[25] = @nscale1 * (0.680045, 0) vertex[26] = @nscale1 * (0.340022, 0.588936) vertex[27] = @nscale1 * (-0.340022, 0.588936) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 77 ; "heptagon" cursality = 1 numbervertices = 8 ; n + cursality for closed curves cincrement = 8 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.62349, 0.781831) vertex[2] = @nscale1 * (-0.222521, 0.974928) vertex[3] = @nscale1 * (-0.900969, 0.433884) vertex[4] = @nscale1 * (-0.900969, -0.433884) vertex[5] = @nscale1 * (-0.222521, -0.974928) vertex[6] = @nscale1 * (0.62349, -0.781831) vertex[7] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 78 ; "heptagon 2" cursality = 7 numbervertices = 21 ; open curves cincrement = 3 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @nscale1 * (1,0) vertex[2] = @nscale1 * (0.62349, 0.781831) vertex[3] = @nscale1 * (0,0) vertex[4] = @nscale1 * (0.62349, 0.781831) vertex[5] = @nscale1 * (-0.222521, 0.974928) vertex[6] = @nscale1 * (0,0) vertex[7] = @nscale1 * (-0.222521, 0.974928) vertex[8] = @nscale1 * (-0.900969, 0.433884) vertex[9] = @nscale1 * (0,0) vertex[10] = @nscale1 * (-0.900969, 0.433884) vertex[11] = @nscale1 * (-0.900969, -0.433884) vertex[12] = @nscale1 * (0,0) vertex[13] = @nscale1 * (-0.900969, -0.433884) vertex[14] = @nscale1 * (-0.222521, -0.974928) vertex[15] = @nscale1 * (0,0) vertex[16] = @nscale1 * (-0.222521, -0.974928) vertex[17] = @nscale1 * (0.62349, -0.781831) vertex[18] = @nscale1 * (0,0) vertex[19] = @nscale1 * (0.62349, -0.781831) vertex[20] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 79 ; "heptagram" cursality = 1 numbervertices = 8 ; n + cursality for closed curves cincrement = 8 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.222521, 0.974928) vertex[2] = @nscale1 * (-0.900969, -0.433884) vertex[3] = @nscale1 * (0.62349, -0.781831) vertex[4] = @nscale1 * (0.62349, 0.781831) vertex[5] = @nscale1 * (-0.900969, 0.433884) vertex[6] = @nscale1 * (-0.222521, -0.974928) vertex[7] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 80 ; "heptagram 2" cursality = 1 numbervertices = 8 ; n + cursality for closed curves cincrement = 8 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.900969, 0.433884) vertex[2] = @nscale1 * (0.62349, -0.781831) vertex[3] = @nscale1 * (-0.222521, 0.974928) vertex[4] = @nscale1 * (-0.222521, -0.974928) vertex[5] = @nscale1 * (0.62349, 0.781831) vertex[6] = @nscale1 * (-0.900969, -0.433884) vertex[7] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 81 ; "heptagram 3" cursality = 1 numbervertices = 15 ; n + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.133513, 0.584957) vertex[1] = @nscale1 * (-0.995974, -0.0896393) vertex[2] = @nscale1 * (0.374094, 0.469099) vertex[3] = @nscale1 * (-0.691063, 0.722795) vertex[4] = @nscale1 * (0.6, 0) vertex[5] = @nscale1 * (0.134233, 0.99095) vertex[6] = @nscale1 * (0.374094, -0.469099) vertex[7] = @nscale1 * (0.858449, 0.512899) vertex[8] = @nscale1 * (-0.133513, -0.584957) vertex[9] = @nscale1 * (0.936235, -0.351375) vertex[10] = @nscale1 * (-0.540581, -0.26033) vertex[11] = @nscale1 * (0.309017, -0.951057) vertex[12] = @nscale1 * (-0.540581, 0.26033) vertex[13] = @nscale1 * (-0.550897, -0.834573) vertex[14] = @nscale1 * (-0.133513, 0.584957) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 82 ; "heptagram 4" cursality = 1 numbervertices = 15 ; n + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.0149594, 0.999888) vertex[2] = @nscale1 * (-0.420357, 0.907359) vertex[3] = @nscale1 * (-0.97149, -0.23708) vertex[4] = @nscale1 * (-0.791071, -0.611724) vertex[5] = @nscale1 * (0.447313, -0.894377) vertex[6] = @nscale1 * (0.772417, -0.635116) vertex[7] = @nscale1 * (0.772417, 0.635116) vertex[8] = @nscale1 * (0.447313, 0.894377) vertex[9] = @nscale1 * (-0.791071, 0.611724) vertex[10] = @nscale1 * (-0.97149, 0.23708) vertex[11] = @nscale1 * (-0.420357, -0.907359) vertex[12] = @nscale1 * (-0.0149594, -0.999888) vertex[13] = @nscale1 * (0.978148, -0.207912) vertex[14] = @nscale1 * (0.978148, 0.207912) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 83 ; "heptagram 5" cursality = 1 numbervertices = 15 ; n + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.791071, 0.611724) vertex[2] = @nscale1 * (-0.97149, 0.23708) vertex[3] = @nscale1 * (0.447313, -0.894377) vertex[4] = @nscale1 * (0.772417, -0.635116) vertex[5] = @nscale1 * (-0.0149594, 0.999888) vertex[6] = @nscale1 * (-0.420357, 0.907359) vertex[7] = @nscale1 * (-0.420357, -0.907359) vertex[8] = @nscale1 * (-0.0149594, -0.999888) vertex[9] = @nscale1 * (0.772417, 0.635116) vertex[10] = @nscale1 * (0.447313, 0.894377) vertex[11] = @nscale1 * (-0.97149, -0.23708) vertex[12] = @nscale1 * (-0.791071, -0.611724) vertex[13] = @nscale1 * (0.978148, -0.207912) vertex[14] = @nscale1 * (0.978148, 0.207912) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 84 ; "heptagram 6" cursality = 1 numbervertices = 15 ; n + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.791071, 0.611724) vertex[2] = @nscale1 * (-0.420357, 0.907359) vertex[3] = @nscale1 * (-0.420357, -0.907359) vertex[4] = @nscale1 * (-0.791071, -0.611724) vertex[5] = @nscale1 * (0.978148, -0.207912) vertex[6] = @nscale1 * (0.772417, -0.635116) vertex[7] = @nscale1 * (-0.0149594, 0.999888) vertex[8] = @nscale1 * (0.447313, 0.894377) vertex[9] = @nscale1 * (-0.97149, -0.23708) vertex[10] = @nscale1 * (-0.97149, 0.23708) vertex[11] = @nscale1 * (0.447313, -0.894377) vertex[12] = @nscale1 * (-0.0149594, -0.999888) vertex[13] = @nscale1 * (0.772417, 0.635116) vertex[14] = @nscale1 * (0.978148, 0.207912) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 85 ; "heptagram 7" cursality = 1 numbervertices = 15 ; n + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.97149, -0.23708) vertex[2] = @nscale1 * (-0.97149, 0.23708) vertex[3] = @nscale1 * (0.978148, -0.207912) vertex[4] = @nscale1 * (0.772417, -0.635116) vertex[5] = @nscale1 * (-0.791071, 0.611724) vertex[6] = @nscale1 * (-0.420357, 0.907359) vertex[7] = @nscale1 * (0.447313, -0.894377) vertex[8] = @nscale1 * (-0.0149594, -0.999888) vertex[9] = @nscale1 * (-0.0149594, 0.999888) vertex[10] = @nscale1 * (0.447313, 0.894377) vertex[11] = @nscale1 * (-0.420357, -0.907359) vertex[12] = @nscale1 * (-0.791071, -0.611724) vertex[13] = @nscale1 * (0.772417, 0.635116) vertex[14] = @nscale1 * (0.978148, 0.207912) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 86 ; "7-asterisk" cursality = 7 numbervertices = 14 ; n for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @leafAlength * @nscale1 * (1,0) vertex[2] = @nscale1 * (0,0) vertex[3] = @leafBlength * @nscale1 * (0.62349, 0.781831) vertex[4] = @nscale1 * (0,0) vertex[5] = @leafClength * @nscale1 * (-0.222521, 0.974928) vertex[6] = @nscale1 * (0,0) vertex[7] = @leafDlength * @nscale1 * (-0.900969, 0.433884) vertex[8] = @nscale1 * (0,0) vertex[9] = @leafElength * @nscale1 * (-0.900969, -0.433884) vertex[10] = @nscale1 * (0,0) vertex[11] = @leafFlength * @nscale1 * (-0.222521, -0.974928) vertex[12] = @nscale1 * (0,0) vertex[13] = @leafGlength * @nscale1 * (0.62349, -0.781831) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 87 ; "7-star" cursality = 1 numbervertices = 15 ; n + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @starspikiness * @nscale1 * (0.900969, 0.433884) vertex[2] = @nscale1 * (0.311745, 0.390916) vertex[3] = @starspikiness * @nscale1 * (0.222521, 0.974928) vertex[4] = @nscale1 * (-0.11126, 0.487464) vertex[5] = @starspikiness * @nscale1 * (-0.62349, 0.781831) vertex[6] = @nscale1 * (-0.450484, 0.216942) vertex[7] = @starspikiness * @nscale1 * (-1,0) vertex[8] = @nscale1 * (-0.450484, -0.216942) vertex[9] = @starspikiness * @nscale1 * (-0.62349, -0.781831) vertex[10] = @nscale1 * (-0.11126, -0.487464) vertex[11] = @starspikiness * @nscale1 * (0.222521, -0.974928) vertex[12] = @nscale1 * (0.311745, -0.390916) vertex[13] = @starspikiness * @nscale1 * (0.900969, -0.433884) vertex[14] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 88 ; "7-star 2" cursality = 1 numbervertices = 15 ; n + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5,0) vertex[2] = @nscale1 * (0.62349, 0.781831) vertex[3] = @nscale1 * (0.311745, 0.390916) vertex[4] = @nscale1 * (-0.222521, 0.974928) vertex[5] = @nscale1 * (-0.11126, 0.487464) vertex[6] = @nscale1 * (-0.900969, 0.433884) vertex[7] = @nscale1 * (-0.450484, 0.216942) vertex[8] = @nscale1 * (-0.900969, -0.433884) vertex[9] = @nscale1 * (-0.450484, -0.216942) vertex[10] = @nscale1 * (-0.222521, -0.974928) vertex[11] = @nscale1 * (-0.11126, -0.487464) vertex[12] = @nscale1 * (0.62349, -0.781831) vertex[13] = @nscale1 * (0.311745, -0.390916) vertex[14] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 110 ; "7-star 3" cursality = 1 numbervertices = 22 ; n + cursality for closed curves cincrement = 22 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.675727, 0.325413) vertex[2] = @nscale1 * (0.205644, 0.455753) vertex[3] = @nscale1 * (-0.222521, 0.974928) vertex[4] = @nscale1 * (-0.467617, 0.586374) vertex[5] = @nscale1 * (-0.490086, 0.0990731) vertex[6] = @nscale1 * (-0.900969, -0.433884) vertex[7] = @nscale1 * (-0.467617, -0.586374) vertex[8] = @nscale1 * (0.0124653, -0.499845) vertex[9] = @nscale1 * (0.62349, -0.781831) vertex[10] = @nscale1 * (0.675727, -0.325413) vertex[11] = @nscale1 * (0.484539, 0.123379) vertex[12] = @nscale1 * (0.62349, 0.781831) vertex[13] = @nscale1 * (0.166891, 0.731196) vertex[14] = @nscale1 * (-0.228105, 0.444936) vertex[15] = @nscale1 * (-0.900969, 0.433884) vertex[16] = @nscale1 * (-0.75, 0) vertex[17] = @nscale1 * (-0.383022, -0.321394) vertex[18] = @nscale1 * (-0.222521, -0.974928) vertex[19] = @nscale1 * (0.166891, -0.731196) vertex[20] = @nscale1 * (0.398566, -0.301902) vertex[21] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 89 ; "nested heptagons" cursality = 2 numbervertices = 16 ; n + cursality for closed curves cincrement = 8 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.62349, 0.781831) vertex[2] = @nscale1 * (-0.222521, 0.974928) vertex[3] = @nscale1 * (-0.900969, 0.433884) vertex[4] = @nscale1 * (-0.900969, -0.433884) vertex[5] = @nscale1 * (-0.222521, -0.974928) vertex[6] = @nscale1 * (0.62349, -0.781831) vertex[7] = @nscale1 * (1,0) vertex[8] = @innerscale * @nscale1 * (0.5,0) vertex[9] = @innerscale * @nscale1 * (0.311745, 0.390916) vertex[10] = @innerscale * @nscale1 * (-0.11126, 0.487464) vertex[11] = @innerscale * @nscale1 * (-0.450484, 0.216942) vertex[12] = @innerscale * @nscale1 * (-0.450484, -0.216942) vertex[13] = @innerscale * @nscale1 * (-0.11126, -0.487464) vertex[14] = @innerscale * @nscale1 * (0.311745, -0.390916) vertex[15] = @innerscale * @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 90 ; "nested heptagon 2" cursality = 2 numbervertices = 16 ; n + cursality for closed curves cincrement = 8 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.900969, 0.433884) vertex[1] = @nscale1 * (0.222521, 0.974928) vertex[2] = @nscale1 * (-0.62349, 0.781831) vertex[3] = @nscale1 * (-1,0) vertex[4] = @nscale1 * (-0.62349, -0.781831) vertex[5] = @nscale1 * (0.222521, -0.974928) vertex[6] = @nscale1 * (0.900969, -0.433884) vertex[7] = @nscale1 * (0.900969, 0.433884) vertex[8] = @innerscale * @nscale1 * (0.5,0) vertex[9] = @innerscale * @nscale1 * (0.311745, 0.390916) vertex[10] = @innerscale * @nscale1 * (-0.11126, 0.487464) vertex[11] = @innerscale * @nscale1 * (-0.450484, 0.216942) vertex[12] = @innerscale * @nscale1 * (-0.450484, -0.216942) vertex[13] = @innerscale * @nscale1 * (-0.11126, -0.487464) vertex[14] = @innerscale * @nscale1 * (0.311745, -0.390916) vertex[15] = @innerscale * @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 91 ; "twisted heptagons" cursality = 3 numbervertices = 24 ; n + cursality for closed curves cincrement = 8 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0.62349, 0.781831) vertex[2] = @nscale1 * (-0.222521, 0.974928) vertex[3] = @nscale1 * (-0.900969, 0.433884) vertex[4] = @nscale1 * (-0.900969, -0.433884) vertex[5] = @nscale1 * (-0.222521, -0.974928) vertex[6] = @nscale1 * (0.62349, -0.781831) vertex[7] = @nscale1 * (1,0) vertex[8] = @nscale1 * (0.887876, 0.232828) vertex[9] = @nscale1 * (0.371549, 0.839335) vertex[10] = @nscale1 * (-0.424562, 0.813806) vertex[11] = @nscale1 * (-0.900969, 0.175464) vertex[12] = @nscale1 * (-0.698928, -0.595006) vertex[13] = @nscale1 * (0.02942, -0.917424) vertex[14] = @nscale1 * (0.735614, -0.549003) vertex[15] = @nscale1 * (0.887876, 0.232828) vertex[16] = @nscale1 * (0.734114, 0.413445) vertex[17] = @nscale1 * (0.134468, 0.831733) vertex[18] = @nscale1 * (-0.566435, 0.623708) vertex[19] = @nscale1 * (-0.840801, -0.0539812) vertex[20] = @nscale1 * (-0.482027, -0.691022) vertex[21] = @nscale1 * (0.239724, -0.807709) vertex[22] = @nscale1 * (0.780957, -0.316175) vertex[23] = @nscale1 * (0.734114, 0.413445) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 92 ; "twisted heptagon 2" cursality = 5 numbervertices = 40 ; n + cursality for closed curves cincrement = 8 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1, 0) vertex[1] = @nscale1 * (0.62349, 0.781831) vertex[2] = @nscale1 * (-0.222521, 0.974928) vertex[3] = @nscale1 * (-0.900969, 0.433884) vertex[4] = @nscale1 * (-0.900969, -0.433884) vertex[5] = @nscale1 * (-0.222521, -0.974928) vertex[6] = @nscale1 * (0.62349, -0.781831) vertex[7] = @nscale1 * (1,0) vertex[8] = @nscale1 * (0.761342, 0.495579) vertex[9] = @nscale1 * (0.0872299, 0.904229) vertex[10] = @nscale1 * (-0.652568, 0.631977) vertex[11] = @nscale1 * (-0.900969, -0.116167) vertex[12] = @nscale1 * (-0.470922, -0.776835) vertex[13] = @nscale1 * (0.313739, -0.85253) vertex[14] = @nscale1 * (0.862148, -0.286253) vertex[15] = @nscale1 * (0.761342, 0.495579) vertex[16] = @nscale1 * (0.334043, 0.75461) vertex[17] = @nscale1 * (-0.381705, 0.731657) vertex[18] = @nscale1 * (-0.810022, 0.157752) vertex[19] = @nscale1 * (-0.628375, -0.534944) vertex[20] = @nscale1 * (0.0264502, -0.824816) vertex[21] = @nscale1 * (0.661358, -0.493585) vertex[22] = @nscale1 * (0.79825, 0.209326) vertex[23] = @nscale1 * (0.334043, 0.75461) vertex[24] = @nscale1 * (-0.119647, 0.740061) vertex[25] = @nscale1 * (-0.653202, 0.367876) vertex[26] = @nscale1 * (-0.694882, -0.281326) vertex[27] = @nscale1 * (-0.213302, -0.718685) vertex[28] = @nscale1 * (0.428899, -0.614859) vertex[29] = @nscale1 * (0.74813, -0.0480315) vertex[30] = @nscale1 * (0.504004, 0.554964) vertex[31] = @nscale1 * (-0.119647, 0.740061) vertex[32] = @nscale1 * (-0.457851, 0.504145) vertex[33] = @nscale1 * (-0.679621, -0.0436331) vertex[34] = @nscale1 * (-0.389623, -0.558554) vertex[35] = @nscale1 * (0.193769, -0.652873) vertex[36] = @nscale1 * (0.631249, -0.255565) vertex[37] = @nscale1 * (0.593386, 0.334189) vertex[38] = @nscale1 * (0.108691, 0.672291) vertex[39] = @nscale1 * (-0.457851, 0.504145) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 55 ; "hand" cursality = 5 numbervertices = 10 ; n + cursality for closed curves cincrement = 2 ; numbervertices/cursality scratchfloat = sqrt(3)/2 ; for some vertext coordinates ; initialize arrays vertex[0] = @nscale1 * (0,1) vertex[1] = @finger1length * @nscale1 * (-scratchfloat + flip(0.5)) vertex[2] = @nscale1 * (0,1) vertex[3] = @finger2length * @nscale1 * (-scratchfloat + flip(-0.5)) vertex[4] = @nscale1 * (0,1) vertex[5] = @finger3length * @nscale1 * (0,-1) vertex[6] = @nscale1 * (0,1) vertex[7] = @finger4length * @nscale1 * (scratchfloat + flip(-0.5)) vertex[8] = @nscale1 * (0,1) vertex[9] = @finger5length * @nscale1 * (scratchfloat + flip(0.5)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 111 ; "lissajous 1" cursality = 1 numbervertices = 77 ; n + cursality for closed curves cincrement = 77 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchfloat = 0.0 scratchfloat2 = (3 * twopi + 0.2)/numbervertices while glindex < numbervertices xcoord[glindex] = @nscale1 * sin(0.66667 * scratchfloat) ycoord[glindex] = @nscale1 * sin(scratchfloat) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) scratchfloat = scratchfloat + scratchfloat2 glindex = glindex + 1 endwhile ; glindex elseif traparray == 133 ; "lissajous 2" cursality = 1 numbervertices = 77 ; n + cursality for closed curves cincrement = 77 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchfloat = 0.0 scratchfloat2 = (4 * twopi + 0.2)/numbervertices while glindex < numbervertices xcoord[glindex] = @nscale1 * sin(0.75 * scratchfloat) ycoord[glindex] = @nscale1 * sin(scratchfloat) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) scratchfloat = scratchfloat + scratchfloat2 glindex = glindex + 1 endwhile ; glindex elseif traparray == 147 ; "lissajous 3" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; n + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays scratchfloat = lissajdomain/granularity2 ; angular domain increment glindex = 0 while glindex < granularity xcoord[glindex] = @nscale1 * (@lissaamp1 * cos(@lissafreq1*glindex*scratchfloat - @lissaphase1)) ycoord[glindex] = @nscale1 * (@lissaamp2 * cos(@lissafreq2*glindex*scratchfloat - @lissaphase2)) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[glindex] = xcoord[0] ; close the curve ycoord[glindex] = ycoord[0] vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) if @lissaopen ; do not connect the first and last points of the curve numbervertices = numbervertices - 1 cincrement = cincrement - 1 endif ; lissaopen elseif traparray == 56 ; "zigzag-3" cursality = 1 numbervertices = 3 ; n for open curves cincrement = 3 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.8,-0.4) vertex[1] = @nscale1 * (0,0.4) vertex[2] = @nscale1 * (0.8,-0.4) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 57 ; "zigzag-4" cursality = 1 numbervertices = 4 ; n for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.9,-0.3) vertex[1] = @nscale1 * (-0.3,0.3) vertex[2] = @nscale1 * (0.3,-0.3) vertex[3] = @nscale1 * (0.9,0.3) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 58 ; "zigzag-5" cursality = 1 numbervertices = 5 ; n for open curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.8,0.2) vertex[1] = @nscale1 * (-0.4,-0.2) vertex[2] = @nscale1 * (0,0.2) vertex[3] = @nscale1 * (0.4,-0.2) vertex[4] = @nscale1 * (0.8,0.2) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 59 ; "zigzag-6" cursality = 1 numbervertices = 6 ; n for open curves cincrement = 6 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-1,0.2) vertex[1] = @nscale1 * (-0.6,-0.2) vertex[2] = @nscale1 * (-0.2,0.2) vertex[3] = @nscale1 * (0.2,-0.2) vertex[4] = @nscale1 * (0.6,0.2) vertex[5] = @nscale1 * (1,-0.2) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 60 ; "zigzag-7" cursality = 1 numbervertices = 7 ; n for open curves cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.6,-0.1) vertex[1] = @nscale1 * (-0.4,0.1) vertex[2] = @nscale1 * (-0.2,-0.1) vertex[3] = @nscale1 * (0,0.1) vertex[4] = @nscale1 * (0.2,-0.1) vertex[5] = @nscale1 * (0.4,0.1) vertex[6] = @nscale1 * (0.6,-0.1) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 61 ; "sawtooth-1" cursality = 1 numbervertices = 3 ; n for open curves cincrement = 3 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.1,-0.3) vertex[1] = @nscale1 * (0.1 + flip(@sawheight * 0.3)) vertex[2] = @nscale1 * (0.1,-0.3) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 62 ; "sawtooth-2" cursality = 1 numbervertices = 5 ; n for open curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.2,-0.3) vertex[1] = @sawheight * @nscale1 * (0,0.3) vertex[2] = @nscale1 * (0,-0.3) vertex[3] = @nscale1 * (0.2 + flip(@sawheight * 0.3)) vertex[4] = @nscale1 * (0.2,-0.3) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 63 ; "sawtooth-3" cursality = 1 numbervertices = 7 ; n for open curves cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.3,-0.3) vertex[1] = @nscale1 * (-0.1 + flip(@sawheight * 0.3)) vertex[2] = @nscale1 * (-0.1,-0.3) vertex[3] = @nscale1 * (0.1 + flip(@sawheight * 0.3)) vertex[4] = @nscale1 * (0.1,-0.3) vertex[5] = @nscale1 * (0.3 + flip(@sawheight * 0.3)) vertex[6] = @nscale1 * (0.3,-0.3) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 64 ; "sawtooth-4" cursality = 1 numbervertices = 9 ; n for open curves cincrement = 9 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.4,-0.3) vertex[1] = @nscale1 * (-0.2 + flip(@sawheight * 0.3)) vertex[2] = @nscale1 * (-0.2,-0.3) vertex[3] = @sawheight * @nscale1 * (0,0.3) vertex[4] = @nscale1 * (0,-0.3) vertex[5] = @nscale1 * (0.2 + flip(@sawheight * 0.3)) vertex[6] = @nscale1 * (0.2,-0.3) vertex[7] = @nscale1 * (0.4 + flip(@sawheight * 0.3)) vertex[8] = @nscale1 * (0.4,-0.3) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 73 ; "square-1" cursality = 1 numbervertices = 6 ; n for open curves cincrement = 6 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * ((@sqrwidth * -0.8) + flip(@sqrheight * -0.4)) vertex[1] = @nscale1 * ((@sqrwidth * -0.4) + flip(@sqrheight * -0.4)) vertex[2] = @nscale1 * ((@sqrwidth * -0.4) + flip(@sqrheight * 0.4)) vertex[3] = @nscale1 * ((@sqrwidth * 0.4) + flip(@sqrheight * 0.4)) vertex[4] = @nscale1 * ((@sqrwidth * 0.4) + flip(@sqrheight * -0.4)) vertex[5] = @nscale1 * ((@sqrwidth * 0.8) + flip(@sqrheight * -0.4)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 74 ; "square-2" cursality = 1 numbervertices = 10 ; n for open curves cincrement = 10 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * ((@sqrwidth * -0.8) + flip(@sqrheight * -0.2)) vertex[1] = @nscale1 * ((@sqrwidth * -0.6) + flip(@sqrheight * -0.2)) vertex[2] = @nscale1 * ((@sqrwidth * -0.6) + flip(@sqrheight * 0.2)) vertex[3] = @nscale1 * ((@sqrwidth * -0.2) + flip(@sqrheight * 0.2)) vertex[4] = @nscale1 * ((@sqrwidth * -0.2) + flip(@sqrheight * -0.2)) vertex[5] = @nscale1 * ((@sqrwidth * 0.2) + flip(@sqrheight * -0.2)) vertex[6] = @nscale1 * ((@sqrwidth * 0.2) + flip(@sqrheight * 0.2)) vertex[7] = @nscale1 * ((@sqrwidth * 0.6) + flip(@sqrheight * 0.2)) vertex[8] = @nscale1 * ((@sqrwidth * 0.6) + flip(@sqrheight * -0.2)) vertex[9] = @nscale1 * ((@sqrwidth * 0.8) + flip(@sqrheight * -0.2)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 75 ; "square-3" cursality = 1 numbervertices = 14 ; n for open curves cincrement = 14 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * ((@sqrwidth * -1.2) + flip(@sqrheight * -0.2)) vertex[1] = @nscale1 * ((@sqrwidth * -1) + flip(@sqrheight * -0.2)) vertex[2] = @nscale1 * ((@sqrwidth * -1) + flip(@sqrheight * 0.2)) vertex[3] = @nscale1 * ((@sqrwidth * -0.6) + flip(@sqrheight * 0.2)) vertex[4] = @nscale1 * ((@sqrwidth * -0.6) + flip(@sqrheight * -0.2)) vertex[5] = @nscale1 * ((@sqrwidth * -0.2) + flip(@sqrheight * -0.2)) vertex[6] = @nscale1 * ((@sqrwidth * -0.2) + flip(@sqrheight * 0.2)) vertex[7] = @nscale1 * ((@sqrwidth * 0.2) + flip(@sqrheight * 0.2)) vertex[8] = @nscale1 * ((@sqrwidth * 0.2) + flip(@sqrheight * -0.2)) vertex[9] = @nscale1 * ((@sqrwidth * 0.6) + flip(@sqrheight * -0.2)) vertex[10] = @nscale1 * ((@sqrwidth * 0.6) + flip(@sqrheight * 0.2)) vertex[11] = @nscale1 * ((@sqrwidth * 1) + flip(@sqrheight * 0.2)) vertex[12] = @nscale1 * ((@sqrwidth * 1) + flip(@sqrheight * -0.2)) vertex[13] = @nscale1 * ((@sqrwidth * 1.2) + flip(@sqrheight * -0.2)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 76 ; "square-4" cursality = 1 numbervertices = 18 ; n for open curves cincrement = 18 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * ((@sqrwidth * -1.6) + flip(@sqrheight * -0.2)) vertex[1] = @nscale1 * ((@sqrwidth * -1.4) + flip(@sqrheight * -0.2)) vertex[2] = @nscale1 * ((@sqrwidth * -1.4) + flip(@sqrheight * 0.2)) vertex[3] = @nscale1 * ((@sqrwidth * -1) + flip(@sqrheight * 0.2)) vertex[4] = @nscale1 * ((@sqrwidth * -1) + flip(@sqrheight * -0.2)) vertex[5] = @nscale1 * ((@sqrwidth * -0.6) + flip(@sqrheight * -0.2)) vertex[6] = @nscale1 * ((@sqrwidth * -0.6) + flip(@sqrheight * 0.2)) vertex[7] = @nscale1 * ((@sqrwidth * -0.2) + flip(@sqrheight * 0.2)) vertex[8] = @nscale1 * ((@sqrwidth * -0.2) + flip(@sqrheight * -0.2)) vertex[9] = @nscale1 * ((@sqrwidth * 0.2) + flip(@sqrheight * -0.2)) vertex[10] = @nscale1 * ((@sqrwidth * 0.2) + flip(@sqrheight * 0.2)) vertex[11] = @nscale1 * ((@sqrwidth * 0.6) + flip(@sqrheight * 0.2)) vertex[12] = @nscale1 * ((@sqrwidth * 0.6) + flip(@sqrheight * -0.2)) vertex[13] = @nscale1 * ((@sqrwidth * 1) + flip(@sqrheight * -0.2)) vertex[14] = @nscale1 * ((@sqrwidth * 1) + flip(@sqrheight * 0.2)) vertex[15] = @nscale1 * ((@sqrwidth * 1.4) + flip(@sqrheight * 0.2)) vertex[16] = @nscale1 * ((@sqrwidth * 1.4) + flip(@sqrheight * -0.2)) vertex[17] = @nscale1 * ((@sqrwidth * 1.6) + flip(@sqrheight * -0.2)) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 93 ; "peano curve" cursality = 1 numbervertices = 42 ; n for open curves cincrement = 42 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.6, -0.6) vertex[1] = @nscale1 * (-0.3,-0.6) vertex[2] = @nscale1 * (-0.3,-0.45) vertex[3] = @nscale1 * (-0.6,-0.45) vertex[4] = @nscale1 * (-0.6,-0.3) vertex[5] = @nscale1 * (0.15,-0.3) vertex[6] = @nscale1 * (0.15,-0.45) vertex[7] = @nscale1 * (-0.15,-0.45) vertex[8] = @nscale1 * (-0.15,-0.6) vertex[9] = @nscale1 * (0.6,-0.6) vertex[10] = @nscale1 * (0.6,-0.45) vertex[11] = @nscale1 * (0.3,-0.45) vertex[12] = @nscale1 * (0.3,-0.3) vertex[13] = @nscale1 * (0.6,-0.3) vertex[14] = @nscale1 * (0.6,-0.15) vertex[15] = @nscale1 * (0.3,-0.15) vertex[16] = @nscale1 * (0.3,0) vertex[17] = @nscale1 * (0.6,0) vertex[18] = @nscale1 * (0.6,0.15) vertex[19] = @nscale1 * (-0.15,0.15) vertex[20] = @nscale1 * (-0.15,0) vertex[21] = @nscale1 * (0.15,0) vertex[22] = @nscale1 * (0.15,-0.15) vertex[23] = @nscale1 * (-0.6,-0.15) vertex[24] = @nscale1 * (-0.6,0) vertex[25] = @nscale1 * (-0.3,0) vertex[26] = @nscale1 * (-0.3,0.15) vertex[27] = @nscale1 * (-0.6,0.15) vertex[28] = @nscale1 * (-0.6,0.3) vertex[29] = @nscale1 * (-0.3,0.3) vertex[30] = @nscale1 * (-0.3,0.45) vertex[31] = @nscale1 * (-0.6,0.45) vertex[32] = @nscale1 * (-0.6,0.6) vertex[33] = @nscale1 * (0.15,0.6) vertex[34] = @nscale1 * (0.15,0.45) vertex[35] = @nscale1 * (-0.15,0.45) vertex[36] = @nscale1 * (-0.15,0.3) vertex[37] = @nscale1 * (0.6,0.3) vertex[38] = @nscale1 * (0.6,0.45) vertex[39] = @nscale1 * (0.3,0.45) vertex[40] = @nscale1 * (0.3,0.6) vertex[41] = @nscale1 * (0.6,0.6) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 94 ; "octagon" cursality = 1 numbervertices = 9 ; n + cursality for closed curves cincrement = 9 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.707107, 0.707107) vertex[2] = @nscale1 * (0,1) vertex[3] = @nscale1 * (-0.707107, 0.707107) vertex[4] = @nscale1 * (-1,0) vertex[5] = @nscale1 * (-0.707107, -0.707107) vertex[6] = @nscale1 * (0,-1) vertex[7] = @nscale1 * (0.707107, -0.707107) vertex[8] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 95 ; "octagon 2" cursality = 8 numbervertices = 24 ; open curves cincrement = 3 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @nscale1 * (1,0) vertex[2] = @nscale1 * (0.707107, 0.707107) vertex[3] = @nscale1 * (0,0) vertex[4] = @nscale1 * (0.707107, 0.707107) vertex[5] = @nscale1 * (0,1) vertex[6] = @nscale1 * (0,0) vertex[7] = @nscale1 * (0,1) vertex[8] = @nscale1 * (-0.707107, 0.707107) vertex[9] = @nscale1 * (0,0) vertex[10] = @nscale1 * (-0.707107, 0.707107) vertex[11] = @nscale1 * (-1,0) vertex[12] = @nscale1 * (0,0) vertex[13] = @nscale1 * (-1,0) vertex[14] = @nscale1 * (-0.707107, -0.707107) vertex[15] = @nscale1 * (0,0) vertex[16] = @nscale1 * (-0.707107, -0.707107) vertex[17] = @nscale1 * (0,-1) vertex[18] = @nscale1 * (0,0) vertex[19] = @nscale1 * (0,-1) vertex[20] = @nscale1 * (0.707107, -0.707107) vertex[21] = @nscale1 * (0,0) vertex[22] = @nscale1 * (0.707107, -0.707107) vertex[23] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 96 ; "octagram" cursality = 2 numbervertices = 10 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0,1) vertex[2] = @nscale1 * (-1,0) vertex[3] = @nscale1 * (0,-1) vertex[4] = @nscale1 * (1,0) vertex[5] = @nscale1 * (0.707107, 0.707107) vertex[6] = @nscale1 * (-0.707107, 0.707107) vertex[7] = @nscale1 * (-0.707107, -0.707107) vertex[8] = @nscale1 * (0.707107, -0.707107) vertex[9] = @nscale1 * (0.707107, 0.707107) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 97 ; "octagram 2" cursality = 1 numbervertices = 9 ; n + cursality for closed curves cincrement = 9 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.707107, 0.707107) vertex[2] = @nscale1 * (0,-1) vertex[3] = @nscale1 * (0.707107, 0.707107) vertex[4] = @nscale1 * (-1,0) vertex[5] = @nscale1 * (0.707107, -0.707107) vertex[6] = @nscale1 * (0,1) vertex[7] = @nscale1 * (-0.707107, -0.707107) vertex[8] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 98 ; "octagram 3" cursality = 1 numbervertices = 17 ; n + cursality for closed curves cincrement = 17 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.424264, -0.424264) vertex[1] = @nscale1 * (0.834573, 0.550897) vertex[2] = @nscale1 * (0,-0.6) vertex[3] = @nscale1 * (0.979675, -0.200589) vertex[4] = @nscale1 * (-0.424264, -0.424264) vertex[5] = @nscale1 * (0.550897, -0.834573) vertex[6] = @nscale1 * (-0.6,0) vertex[7] = @nscale1 * (-0.200589, -0.979675) vertex[8] = @nscale1 * (-0.424264, 0.424264) vertex[9] = @nscale1 * (-0.834573, -0.550897) vertex[10] = @nscale1 * (0,0.6) vertex[11] = @nscale1 * (-0.979675, 0.200589) vertex[12] = @nscale1 * (0.424264, 0.424264) vertex[13] = @nscale1 * (-0.550897, 0.834573) vertex[14] = @nscale1 * (0.6,0) vertex[15] = @nscale1 * (0.200589, 0.979675) vertex[16] = @nscale1 * (0.424264, -0.424264) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 99 ; "octagram 4" cursality = 2 numbervertices = 18 ; n + cursality for closed curves cincrement = 9 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (0.207912, 0.978148) vertex[2] = @nscale1 * (-0.207912, 0.978148) vertex[3] = @nscale1 * (-0.978148, 0.207912) vertex[4] = @nscale1 * (-0.978148, -0.207912) vertex[5] = @nscale1 * (-0.207912, -0.978148) vertex[6] = @nscale1 * (0.207912, -0.978148) vertex[7] = @nscale1 * (0.978148, -0.207912) vertex[8] = @nscale1 * (0.978148, 0.207912) vertex[9] = @nscale1 * (0.544639, 0.838671) vertex[10] = @nscale1 * (-0.544639, 0.838671) vertex[11] = @nscale1 * (-0.838671, 0.544639) vertex[12] = @nscale1 * (-0.838671, -0.544639) vertex[13] = @nscale1 * (-0.544639, -0.838671) vertex[14] = @nscale1 * (0.544639, -0.838671) vertex[15] = @nscale1 * (0.838671, -0.544639) vertex[16] = @nscale1 * (0.838671, 0.544639) vertex[17] = @nscale1 * (0.544639, 0.838671) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 100 ; "octagram 5" cursality = 1 numbervertices = 17 ; n + cursality for closed curves cincrement = 17 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.544639, 0.838671) vertex[2] = @nscale1 * (-0.838671, 0.544639) vertex[3] = @nscale1 * (-0.207912, -0.978148) vertex[4] = @nscale1 * (0.207912, -0.978148) vertex[5] = @nscale1 * (0.838671, 0.544639) vertex[6] = @nscale1 * (0.544639, 0.838671) vertex[7] = @nscale1 * (-0.978148, 0.207912) vertex[8] = @nscale1 * (-0.978148, -0.207912) vertex[9] = @nscale1 * (0.544639, -0.838671) vertex[10] = @nscale1 * (0.838671, -0.544639) vertex[11] = @nscale1 * (0.207912, 0.978148) vertex[12] = @nscale1 * (-0.207912, 0.978148) vertex[13] = @nscale1 * (-0.838671, -0.544639) vertex[14] = @nscale1 * (-0.544639, -0.838671) vertex[15] = @nscale1 * (0.978148, -0.207912) vertex[16] = @nscale1 * (0.978148, 0.207912) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 101 ; "octagram 6" cursality = 2 numbervertices = 18 ; n + cursality for closed curves cincrement = 9 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.987688, 0.156434) vertex[1] = @nscale1 * (-0.587785, 0.809017) vertex[2] = @nscale1 * (-0.156434, 0.987688) vertex[3] = @nscale1 * (-0.809017, -0.587785) vertex[4] = @nscale1 * (-0.987688, -0.156434) vertex[5] = @nscale1 * (0.587785, -0.809017) vertex[6] = @nscale1 * (0.156434, -0.987688) vertex[7] = @nscale1 * (0.809017, 0.587785) vertex[8] = @nscale1 * (0.987688, 0.156434) vertex[9] = @nscale1 * (0.587785, 0.809017) vertex[10] = @nscale1 * (-0.987688, 0.156434) vertex[11] = @nscale1 * (-0.809017, 0.587785) vertex[12] = @nscale1 * (-0.156434, -0.987688) vertex[13] = @nscale1 * (-0.587785, -0.809017) vertex[14] = @nscale1 * (0.987688, -0.156434) vertex[15] = @nscale1 * (0.809017, -0.587785) vertex[16] = @nscale1 * (0.156434, 0.987688) vertex[17] = @nscale1 * (0.587785, 0.809017) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 102 ; "octagram 7" cursality = 1 numbervertices = 17 ; n + cursality for closed curves cincrement = 17 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.978148, 0.207912) vertex[1] = @nscale1 * (-0.978148, 0.207912) vertex[2] = @nscale1 * (-0.838671, 0.544639) vertex[3] = @nscale1 * (0.544639, -0.838671) vertex[4] = @nscale1 * (0.207912, -0.978148) vertex[5] = @nscale1 * (0.207912, 0.978148) vertex[6] = @nscale1 * (0.544639, 0.838671) vertex[7] = @nscale1 * (-0.838671, -0.544639) vertex[8] = @nscale1 * (-0.978148, -0.207912) vertex[9] = @nscale1 * (0.978148, -0.207912) vertex[10] = @nscale1 * (0.838671, -0.544639) vertex[11] = @nscale1 * (-0.544639, 0.838671) vertex[12] = @nscale1 * (-0.207912, 0.978148) vertex[13] = @nscale1 * (-0.207912, -0.978148) vertex[14] = @nscale1 * (-0.544639, -0.838671) vertex[15] = @nscale1 * (0.838671, 0.544639) vertex[16] = @nscale1 * (0.978148, 0.207912) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 103 ; "8-asterisk" cursality = 8 numbervertices = 16 ; n for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @leafAlength * @nscale1 * (1,0) vertex[2] = @nscale1 * (0,0) vertex[3] = @leafBlength * @nscale1 * (0.707107, 0.707107) vertex[4] = @nscale1 * (0,0) vertex[5] = @leafClength * @nscale1 * (0,1) vertex[6] = @nscale1 * (0,0) vertex[7] = @leafDlength * @nscale1 * (-0.707107, 0.707107) vertex[8] = @nscale1 * (0,0) vertex[9] = @leafElength * @nscale1 * (-1,0) vertex[10] = @nscale1 * (0,0) vertex[11] = @leafFlength * @nscale1 * (-0.707107, -0.707107) vertex[12] = @nscale1 * (0,0) vertex[13] = @leafGlength * @nscale1 * (0,-1) vertex[14] = @nscale1 * (0,0) vertex[15] = @leafHlength * @nscale1 * (0.707107, -0.707107) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 104 ; "8-star" cursality = 1 numbervertices = 17 ; n + cursality for closed curves cincrement = 17 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @starspikiness * @nscale1 * (0.92388, 0.382683) vertex[2] = @nscale1 * (0.353553, 0.353553) vertex[3] = @starspikiness * @nscale1 * (0.382683, 0.92388) vertex[4] = @nscale1 * (0,0.5) vertex[5] = @starspikiness * @nscale1 * (-0.382683, 0.92388) vertex[6] = @nscale1 * (-0.353553, 0.353553) vertex[7] = @starspikiness * @nscale1 * (-0.92388, 0.382683) vertex[8] = @nscale1 * (-0.5,0) vertex[9] = @starspikiness * @nscale1 * (-0.92388, -0.382683) vertex[10] = @nscale1 * (-0.353553, -0.353553) vertex[11] = @starspikiness * @nscale1 * (-0.382683, -0.92388) vertex[12] = @nscale1 * (0,-0.5) vertex[13] = @starspikiness * @nscale1 * (0.382683, -0.92388) vertex[14] = @nscale1 * (0.353553, -0.353553) vertex[15] = @starspikiness * @nscale1 * (0.92388, -0.382683) vertex[16] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 105 ; "8-star 2" cursality = 1 numbervertices = 17 ; n + cursality for closed curves cincrement = 17 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5,0) vertex[2] = @nscale1 * (0.707107, 0.707107) vertex[3] = @nscale1 * (0.353553, 0.353553) vertex[4] = @nscale1 * (0,1) vertex[5] = @nscale1 * (0,0.5) vertex[6] = @nscale1 * (-0.707107, 0.707107) vertex[7] = @nscale1 * (-0.353553, 0.353553) vertex[8] = @nscale1 * (-1,0) vertex[9] = @nscale1 * (-0.5,0) vertex[10] = @nscale1 * (-0.707107, -0.707107) vertex[11] = @nscale1 * (-0.353553, -0.353553) vertex[12] = @nscale1 * (0,-1) vertex[13] = @nscale1 * (0,-0.5) vertex[14] = @nscale1 * (0.707107, -0.707107) vertex[15] = @nscale1 * (0.353553, -0.353553) vertex[16] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 106 ; "octagram 8" cursality = 1 numbervertices = 9 ; n + cursality for closed curves cincrement = 9 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.707107, 0.707107) vertex[1] = @nscale1 * (-0.6667, 0) vertex[2] = @nscale1 * (0.707107, -0.707107) vertex[3] = @nscale1 * (0, 0.6667) vertex[4] = @nscale1 * (-0.707107, -0.707107) vertex[5] = @nscale1 * (0.6667, 0) vertex[6] = @nscale1 * (-0.707107, 0.707107) vertex[7] = @nscale1 * (0, -0.6667) vertex[8] = @nscale1 * (0.707107, 0.707107) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 107 ; "octagram 9" cursality = 4 numbervertices = 20 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.987688, 0.156434) vertex[1] = @nscale1 * (0.809017, 0.587785) vertex[2] = @nscale1 * (-0.809017, -0.587785) vertex[3] = @nscale1 * (-0.987688, -0.156434) vertex[4] = @nscale1 * (0.987688, 0.156434) vertex[5] = @nscale1 * (0.587785, 0.809017) vertex[6] = @nscale1 * (0.156434, 0.987688) vertex[7] = @nscale1 * (-0.156434, -0.987688) vertex[8] = @nscale1 * (-0.587785, -0.809017) vertex[9] = @nscale1 * (0.587785, 0.809017) vertex[10] = @nscale1 * (-0.156434, 0.987688) vertex[11] = @nscale1 * (-0.587785, 0.809017) vertex[12] = @nscale1 * (0.587785, -0.809017) vertex[13] = @nscale1 * (0.156434, -0.987688) vertex[14] = @nscale1 * (-0.156434, 0.987688) vertex[15] = @nscale1 * (-0.809017, 0.587785) vertex[16] = @nscale1 * (-0.987688, 0.156434) vertex[17] = @nscale1 * (0.987688, -0.156434) vertex[18] = @nscale1 * (0.809017, -0.587785) vertex[19] = @nscale1 * (-0.809017, 0.587785) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 108 ; "octagram 10" cursality = 4 numbervertices = 20 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.987688, 0.156434) vertex[1] = @nscale1 * (-0.809017, -0.587785) vertex[2] = @nscale1 * (-0.987688, -0.156434) vertex[3] = @nscale1 * (0.809017, 0.587785) vertex[4] = @nscale1 * (0.987688, 0.156434) vertex[5] = @nscale1 * (0.587785, 0.809017) vertex[6] = @nscale1 * (-0.156434, -0.987688) vertex[7] = @nscale1 * (-0.587785, -0.809017) vertex[8] = @nscale1 * (0.156434, 0.987688) vertex[9] = @nscale1 * (0.587785, 0.809017) vertex[10] = @nscale1 * (-0.156434, 0.987688) vertex[11] = @nscale1 * (0.587785, -0.809017) vertex[12] = @nscale1 * (0.156434, -0.987688) vertex[13] = @nscale1 * (-0.587785, 0.809017) vertex[14] = @nscale1 * (-0.156434, 0.987688) vertex[15] = @nscale1 * (-0.809017, 0.587785) vertex[16] = @nscale1 * (0.987688, -0.156434) vertex[17] = @nscale1 * (0.809017, -0.587785) vertex[18] = @nscale1 * (-0.987688, 0.156434) vertex[19] = @nscale1 * (-0.809017, 0.587785) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 109 ; "roots of unity" if @fixtrapbug singleroot = @singleroot1 unityroots = @unityroot1 whichroot = @whichroot1 if whichroot < 1 whichroot = 1 elseif whichroot > unityroots whichroot = unityroots endif ; whichroot endif ; @fixtrapbug if !singleroot ; plot all the roots cursality = unityroots numbervertices = unityroots ; single points, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / unityroots) ycoord[glindex] = @nscale1 * sin(glindex * twopi / unityroots) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex else ; plot only a single root cursality = 1 numbervertices = 1 ; single point, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(whichroot * twopi / unityroots) ycoord[glindex] = @nscale1 * sin(whichroot * twopi / unityroots) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex endif ; !singleroot[] elseif traparray == 112 ; "nonagon" cursality = 1 numbervertices = 10 ; vertices + cursality for closed curves cincrement = 10 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 9) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 9) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 113 ; "nonagram" cursality = 1 numbervertices = 10 ; vertices + cursality for closed curves cincrement = 10 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(2 * glindex * twopi / 9) ycoord[glindex] = @nscale1 * sin(2 * glindex * twopi / 9) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 114 ; "nonagram 2" cursality = 3 numbervertices = 12 ; n + cursality for closed curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.5, 0.866025) vertex[2] = @nscale1 * (-0.5, -0.866025) vertex[3] = @nscale1 * (1,0) vertex[4] = @nscale1 * (0.766044, 0.642788) vertex[5] = @nscale1 * (-0.939693, 0.34202) vertex[6] = @nscale1 * (0.173648, -0.984808) vertex[7] = @nscale1 * (0.766044, 0.642788) vertex[8] = @nscale1 * (0.173648, 0.984808) vertex[9] = @nscale1 * (-0.939693, -0.34202) vertex[10] = @nscale1 * (0.766044, -0.642788) vertex[11] = @nscale1 * (0.173648, 0.984808) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 115 ; "nonagram 3" cursality = 1 numbervertices = 10 ; vertices + cursality for closed curves cincrement = 10 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(4 * glindex * twopi / 9) ycoord[glindex] = @nscale1 * sin(4 * glindex * twopi / 9) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 116 ; "nonagram 4" cursality = 1 numbervertices = 19 ; n + cursality for closed curves cincrement = 19 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.459627, -0.385673) vertex[1] = @nscale1 * (0.815028, 0.579421) vertex[2] = @nscale1 * (0.104189, -0.590885) vertex[3] = @nscale1 * (0.996793, -0.0800278) vertex[4] = @nscale1 * (-0.3, -0.519615) vertex[5] = @nscale1 * (0.712147, -0.702031) vertex[6] = @nscale1 * (-0.563816, -0.205212) vertex[7] = @nscale1 * (0.0942792, -0.995546) vertex[8] = @nscale1 * (-0.563816, 0.205212) vertex[9] = @nscale1 * (-0.567702, -0.823234) vertex[10] = @nscale1 * (-0.3, 0.519615) vertex[11] = @nscale1 * (-0.96405, -0.265722) vertex[12] = @nscale1 * (0.104189, 0.590885) vertex[13] = @nscale1 * (-0.909308, 0.416125) vertex[14] = @nscale1 * (0.459627, 0.385673) vertex[15] = @nscale1 * (-0.42909, 0.903262) vertex[16] = @nscale1 * (0.6, 0) vertex[17] = @nscale1 * (0.251903, 0.967752) vertex[18] = @nscale1 * (0.459627, -0.385673) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 117 ; "nonagram 5" cursality = 1 numbervertices = 19 ; n + cursality for closed curves cincrement = 19 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.992115, 0.125333) vertex[1] = @nscale1 * (-0.889416, 0.457098) vertex[2] = @nscale1 * (0.0488498, 0.998806) vertex[3] = @nscale1 * (-0.604599, -0.79653) vertex[4] = @nscale1 * (-0.975149, 0.221548) vertex[5] = @nscale1 * (0.679441, -0.73373) vertex[6] = @nscale1 * (-0.387516, -0.921863) vertex[7] = @nscale1 * (0.840567, 0.541708) vertex[8] = @nscale1 * (0.840567, -0.541708) vertex[9] = @nscale1 * (-0.387516, 0.921863) vertex[10] = @nscale1 * (0.679441, 0.73373) vertex[11] = @nscale1 * (-0.975149, -0.221548) vertex[12] = @nscale1 * (-0.604599, 0.79653) vertex[13] = @nscale1 * (0.0488498, -0.998806) vertex[14] = @nscale1 * (-0.889416, -0.457098) vertex[15] = @nscale1 * (0.992115, -0.125333) vertex[16] = @nscale1 * (0.295708, -0.955278) vertex[17] = @nscale1 * (0.295708, 0.955278) vertex[18] = @nscale1 * (0.992115, 0.125333) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 118 ; "nonagram 6" cursality = 1 numbervertices = 19 ; n + cursality for closed curves cincrement = 19 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.939693, 0.34202) vertex[1] = @nscale1 * (-0.766044, 0.642788) vertex[2] = @nscale1 * (-0.173648, 0.984808) vertex[3] = @nscale1 * (-0.766044, -0.642788) vertex[4] = @nscale1 * (-1,0) vertex[5] = @nscale1 * (0.5, -0.866025) vertex[6] = @nscale1 * (-0.173648, -0.984808) vertex[7] = @nscale1 * (0.939693, 0.34202) vertex[8] = @nscale1 * (0.939693, -0.34202) vertex[9] = @nscale1 * (-0.173648, 0.984808) vertex[10] = @nscale1 * (0.5, 0.866025) vertex[11] = @nscale1 * (-1,0) vertex[12] = @nscale1 * (-0.766044, 0.642788) vertex[13] = @nscale1 * (-0.173648, -0.984808) vertex[14] = @nscale1 * (-0.766044, -0.642788) vertex[15] = @nscale1 * (0.939693, -0.34202) vertex[16] = @nscale1 * (0.5, -0.866025) vertex[17] = @nscale1 * (0.5, 0.866025) vertex[18] = @nscale1 * (0.939693, 0.34202) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 151 ; "nonagram 7" cursality = 1 numbervertices = 10 ; n + cursality for closed curves cincrement = 10 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.704769, 0.256515) vertex[2] = @nscale1 * (0.383022, -0.321394) vertex[3] = @nscale1 * (-0.5, 0.866025) vertex[4] = @nscale1 * (0.130236, -0.738606) vertex[5] = @nscale1 * (0.0868241, 0.492404) vertex[6] = @nscale1 * (-0.5, -0.866025) vertex[7] = @nscale1 * (0.574533, 0.482091) vertex[8] = @nscale1 * (-0.469846, -0.17101) vertex[9] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 119 ; "9-star" cursality = 1 numbervertices = 19 ; n + cursality for closed curves cincrement = 19 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @starspikiness * @nscale1 * (0.939693, 0.34202) vertex[2] = @nscale1 * (0.383022, 0.321394) vertex[3] = @starspikiness * @nscale1 * (0.5, 0.866025) vertex[4] = @nscale1 * (0.0868241, 0.492404) vertex[5] = @starspikiness * @nscale1 * (-0.173648, 0.984808) vertex[6] = @nscale1 * (-0.25, 0.433013) vertex[7] = @starspikiness * @nscale1 * (-0.766044, 0.642788) vertex[8] = @nscale1 * (-0.469846, 0.17101) vertex[9] = @starspikiness * @nscale1 * (-1,0) vertex[10] = @nscale1 * (-0.469846, -0.17101) vertex[11] = @starspikiness * @nscale1 * (-0.766044, -0.642788) vertex[12] = @nscale1 * (-0.25, -0.433013) vertex[13] = @starspikiness * @nscale1 * (-0.173648, -0.984808) vertex[14] = @nscale1 * (0.0868241, -0.492404) vertex[15] = @starspikiness * @nscale1 * (0.5, -0.866025) vertex[16] = @nscale1 * (0.383022, -0.321394) vertex[17] = @starspikiness * @nscale1 * (0.939693, -0.34202) vertex[18] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 120 ; "9-asterisk" cursality = 9 numbervertices = 18 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 9) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 9) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) vertex[3] = @leafBlength * vertex[3] xcoord[3] = real(vertex[3]) ycoord[3] = imag(vertex[3]) vertex[5] = @leafClength * vertex[5] xcoord[5] = real(vertex[5]) ycoord[5] = imag(vertex[5]) vertex[7] = @leafDlength * vertex[7] xcoord[7] = real(vertex[7]) ycoord[7] = imag(vertex[7]) vertex[9] = @leafElength * vertex[9] xcoord[9] = real(vertex[9]) ycoord[9] = imag(vertex[9]) vertex[11] = @leafFlength * vertex[11] xcoord[11] = real(vertex[11]) ycoord[11] = imag(vertex[11]) vertex[13] = @leafGlength * vertex[13] xcoord[13] = real(vertex[13]) ycoord[13] = imag(vertex[13]) vertex[15] = @leafHlength * vertex[15] xcoord[15] = real(vertex[15]) ycoord[15] = imag(vertex[15]) vertex[17] = @leafIlength * vertex[17] xcoord[17] = real(vertex[17]) ycoord[17] = imag(vertex[17]) elseif traparray == 121 ; "9-star 2" cursality = 1 numbervertices = 19 ; n + cursality for closed curves cincrement = 19 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.965926, 0.258819) vertex[1] = @nscale1 * (-0.996195, -0.0871557) vertex[2] = @nscale1 * (-0.996195, 0.0871557) vertex[3] = @nscale1 * (0.965926, -0.258819) vertex[4] = @nscale1 * (0.906308, -0.422618) vertex[5] = @nscale1 * (-0.819152, 0.573576) vertex[6] = @nscale1 * (-0.707107, 0.707107) vertex[7] = @nscale1 * (0.573576, -0.819152) vertex[8] = @nscale1 * (0.422618, -0.906308) vertex[9] = @nscale1 * (-0.258819, 0.965926) vertex[10] = @nscale1 * (-0.0871557, 0.996195) vertex[11] = @nscale1 * (-0.0871557, -0.996195) vertex[12] = @nscale1 * (-0.258819, -0.965926) vertex[13] = @nscale1 * (0.422618, 0.906308) vertex[14] = @nscale1 * (0.573576, 0.819152) vertex[15] = @nscale1 * (-0.707107, -0.707107) vertex[16] = @nscale1 * (-0.819152, -0.573576) vertex[17] = @nscale1 * (0.906308, 0.422618) vertex[18] = @nscale1 * (0.965926, 0.258819) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 122 ; "9-star 3" cursality = 1 numbervertices = 19 ; n + cursality for closed curves cincrement = 19 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (01,0) vertex[1] = @nscale1 * (0.5,0) vertex[2] = @nscale1 * (0.766044, 0.642788) vertex[3] = @nscale1 * (0.383022, 0.321394) vertex[4] = @nscale1 * (0.173648, 0.984808) vertex[5] = @nscale1 * (0.0868241, 0.492404) vertex[6] = @nscale1 * (-0.5, 0.866025) vertex[7] = @nscale1 * (-0.25, 0.433013) vertex[8] = @nscale1 * (-0.939693, 0.34202) vertex[9] = @nscale1 * (-0.469846, 0.17101) vertex[10] = @nscale1 * (-0.939693, -0.34202) vertex[11] = @nscale1 * (-0.469846, -0.17101) vertex[12] = @nscale1 * (-0.5, -0.866025) vertex[13] = @nscale1 * (-0.25, -0.433013) vertex[14] = @nscale1 * (0.173648, -0.984808) vertex[15] = @nscale1 * (0.0868241, -0.492404) vertex[16] = @nscale1 * (0.766044, -0.642788) vertex[17] = @nscale1 * (0.383022, -0.321394) vertex[18] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 123 ; "decagon" cursality = 1 numbervertices = 11 ; vertices + cursality for closed curves cincrement = 11 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 10) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 10) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 124 ; "10-asterisk" cursality = 10 numbervertices = 20 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 10) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 10) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) vertex[3] = @leafBlength * vertex[3] xcoord[3] = real(vertex[3]) ycoord[3] = imag(vertex[3]) vertex[5] = @leafClength * vertex[5] xcoord[5] = real(vertex[5]) ycoord[5] = imag(vertex[5]) vertex[7] = @leafDlength * vertex[7] xcoord[7] = real(vertex[7]) ycoord[7] = imag(vertex[7]) vertex[9] = @leafElength * vertex[9] xcoord[9] = real(vertex[9]) ycoord[9] = imag(vertex[9]) vertex[11] = @leafFlength * vertex[11] xcoord[11] = real(vertex[11]) ycoord[11] = imag(vertex[11]) vertex[13] = @leafGlength * vertex[13] xcoord[13] = real(vertex[13]) ycoord[13] = imag(vertex[13]) vertex[15] = @leafHlength * vertex[15] xcoord[15] = real(vertex[15]) ycoord[15] = imag(vertex[15]) vertex[17] = @leafIlength * vertex[17] xcoord[17] = real(vertex[17]) ycoord[17] = imag(vertex[17]) vertex[19] = @leafJlength * vertex[19] xcoord[19] = real(vertex[19]) ycoord[19] = imag(vertex[19]) elseif traparray == 125 ; "decagram" cursality = 2 numbervertices = 12 ; n + cursality for closed curves cincrement = 6 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.309017, 0.951057) vertex[2] = @nscale1 * (-0.809017, 0.587785) vertex[3] = @nscale1 * (-0.809017, -0.587785) vertex[4] = @nscale1 * (0.309017, -0.951057) vertex[5] = @nscale1 * (1,0) vertex[6] = @nscale1 * (0.809017, 0.587785) vertex[7] = @nscale1 * (-0.309017, 0.951057) vertex[8] = @nscale1 * (-1,0) vertex[9] = @nscale1 * (-0.309017, -0.951057) vertex[10] = @nscale1 * (0.809017, -0.587785) vertex[11] = @nscale1 * (0.809017, 0.587785) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 126 ; "decagram 2" cursality = 1 numbervertices = 11 ; vertices + cursality for closed curves cincrement = 11 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(3 * glindex * twopi / 10) ycoord[glindex] = @nscale1 * sin(3 * glindex * twopi / 10) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 127 ; "decagram 3" cursality = 2 numbervertices = 12 ; n + cursality for closed curves cincrement = 6 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.809017, 0.587785) vertex[2] = @nscale1 * (0.309017, -0.951057) vertex[3] = @nscale1 * (0.309017, 0.951057) vertex[4] = @nscale1 * (-0.809017, -0.587785) vertex[5] = @nscale1 * (1,0) vertex[6] = @nscale1 * (0.809017, 0.587785) vertex[7] = @nscale1 * (-1,0) vertex[8] = @nscale1 * (0.809017, -0.587785) vertex[9] = @nscale1 * (-0.309017, 0.951057) vertex[10] = @nscale1 * (-0.309017, -0.951057) vertex[11] = @nscale1 * (0.809017, 0.587785) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 128 ; "decagram 4" cursality = 1 numbervertices = 11 ; n + cursality for closed curves cincrement = 11 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.809017, 0.587785) vertex[1] = @nscale1 * (-0.647214, 0.470228) vertex[2] = @nscale1 * (-0.309017, -0.951057) vertex[3] = @nscale1 * (0.8,0) vertex[4] = @nscale1 * (-0.309017, 0.951057) vertex[5] = @nscale1 * (-0.647214, -0.470228) vertex[6] = @nscale1 * (0.809017, -0.587785) vertex[7] = @nscale1 * (0.247214, 0.760845) vertex[8] = @nscale1 * (-1,0) vertex[9] = @nscale1 * (0.247214, -0.760845) vertex[10] = @nscale1 * (0.809017, 0.587785) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 129 ; "10-star" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @starspikiness * @nscale1 * (0.951057, 0.309017) vertex[2] = @nscale1 * (0.404508, 0.293893) vertex[3] = @starspikiness * @nscale1 * (0.587785, 0.809017) vertex[4] = @nscale1 * (0.154508, 0.475528) vertex[5] = @starspikiness * @nscale1 * (0,1) vertex[6] = @nscale1 * (-0.154508, 0.475528) vertex[7] = @starspikiness * @nscale1 * (-0.587785, 0.809017) vertex[8] = @nscale1 * (-0.404508, 0.293893) vertex[9] = @starspikiness * @nscale1 * (-0.951057, 0.309017) vertex[10] = @nscale1 * (-0.5,0) vertex[11] = @starspikiness * @nscale1 * (-0.951057, -0.309017) vertex[12] = @nscale1 * (-0.404508, -0.293893) vertex[13] = @starspikiness * @nscale1 * (-0.587785, -0.809017) vertex[14] = @nscale1 * (-0.154508, -0.475528) vertex[15] = @starspikiness * @nscale1 * (0,-1) vertex[16] = @nscale1 * (0.154508, -0.475528) vertex[17] = @starspikiness * @nscale1 * (0.587785, -0.809017) vertex[18] = @nscale1 * (0.404508, -0.293893) vertex[19] = @starspikiness * @nscale1 * (0.951057, -0.309017) vertex[20] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 130 ; "10-star 2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5,0) vertex[2] = @nscale1 * (0.809017, 0.587785) vertex[3] = @nscale1 * (0.404508, 0.293893) vertex[4] = @nscale1 * (0.309017, 0.951057) vertex[5] = @nscale1 * (0.154508, 0.475528) vertex[6] = @nscale1 * (-0.309017, 0.951057) vertex[7] = @nscale1 * (-0.154508, 0.475528) vertex[8] = @nscale1 * (-0.809017, 0.587785) vertex[9] = @nscale1 * (-0.404508, 0.293893) vertex[10] = @nscale1 * (-1,0) vertex[11] = @nscale1 * (-0.5,0) vertex[12] = @nscale1 * (-0.809017, -0.587785) vertex[13] = @nscale1 * (-0.404508, -0.293893) vertex[14] = @nscale1 * (-0.309017, -0.951057) vertex[15] = @nscale1 * (-0.154508, -0.475528) vertex[16] = @nscale1 * (0.309017, -0.951057) vertex[17] = @nscale1 * (0.154508, -0.475528) vertex[18] = @nscale1 * (0.809017, -0.587785) vertex[19] = @nscale1 * (0.404508, -0.293893) vertex[20] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 131 ; "10-star 3" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.707107, 0.707107) vertex[1] = @nscale1 * (0.494975, -0.494975) vertex[2] = @nscale1 * (0.156434, 0.987688) vertex[3] = @nscale1 * (0.691382, -0.109504) vertex[4] = @nscale1 * (-0.45399, 0.891007) vertex[5] = @nscale1 * (0.623705, 0.317793) vertex[6] = @nscale1 * (-0.891007, 0.45399) vertex[7] = @nscale1 * (0.317793, 0.623705) vertex[8] = @nscale1 * (-0.987688, -0.156434) vertex[9] = @nscale1 * (-0.109504, 0.691382) vertex[10] = @nscale1 * (-0.707107, -0.707107) vertex[11] = @nscale1 * (-0.494975, 0.494975) vertex[12] = @nscale1 * (-0.156434, -0.987688) vertex[13] = @nscale1 * (-0.691382, 0.109504) vertex[14] = @nscale1 * (0.45399, -0.891007) vertex[15] = @nscale1 * (-0.623705, -0.317793) vertex[16] = @nscale1 * (0.891007, -0.45399) vertex[17] = @nscale1 * (-0.317793, -0.623705) vertex[18] = @nscale1 * (0.987688, 0.156434) vertex[19] = @nscale1 * (0.109504, -0.691382) vertex[20] = @nscale1 * (0.707107, 0.707107) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 132 ; "decagram 5" cursality = 2 numbervertices = 22 ; n + cursality for closed curves cincrement = 11 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.987688, 0.156434) vertex[1] = @nscale1 * (-0.156434, 0.987688) vertex[2] = @nscale1 * (0.156434, 0.987688) vertex[3] = @nscale1 * (-0.987688, 0.156434) vertex[4] = @nscale1 * (-0.891007, 0.45399) vertex[5] = @nscale1 * (-0.45399, -0.891007) vertex[6] = @nscale1 * (-0.707107, -0.707107) vertex[7] = @nscale1 * (0.707107, -0.707107) vertex[8] = @nscale1 * (0.45399, -0.891007) vertex[9] = @nscale1 * (0.891007, 0.45399) vertex[10] = @nscale1 * (0.987688, 0.156434) vertex[11] = @nscale1 * (0.707107, 0.707107) vertex[12] = @nscale1 * (-0.707107, 0.707107) vertex[13] = @nscale1 * (-0.45399, 0.891007) vertex[14] = @nscale1 * (-0.891007, -0.45399) vertex[15] = @nscale1 * (-0.987688, -0.156434) vertex[16] = @nscale1 * (0.156434, -0.987688) vertex[17] = @nscale1 * (-0.156434, -0.987688) vertex[18] = @nscale1 * (0.987688, -0.156434) vertex[19] = @nscale1 * (0.891007, -0.45399) vertex[20] = @nscale1 * (0.45399, 0.891007) vertex[21] = @nscale1 * (0.707107, 0.707107) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 134 ; "collinear spots" if @fixtrapbug collinearspots = @collinearspot1 endif ; @fixtrapbug cursality = collinearspots numbervertices = collinearspots ; single points, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays glindex = 0 if numbervertices == 1 xcoord[glindex] = 0.0 ycoord[glindex] = 0.0 vertex[glindex] = (0,0) glindex = glindex + 1 else scratchfloat = @nscale1/(numbervertices - 1) xcoord[glindex] = -0.5 * @nscale1 ycoord[glindex] = 0.0 vertex[glindex] = (-0.5,0) * @nscale1 glindex = glindex + 1 while glindex < numbervertices xcoord[glindex] = xcoord[glindex - 1] + scratchfloat ycoord[glindex] = 0.0 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex endif ; numbervertices elseif traparray == 135 ; "square array" squaresize = @squarespot1 cursality = sqr(squaresize) numbervertices = cursality ; single points, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays scratchfloat = (1.5 * @nscale1)/(squaresize - 1) ; distance between adjacent points scratchfloat2 = @nscale1 * -0.75 ; starting x-coordinate (upper left of array) scratchfloat3 = @nscale1 * 0.75 ; starting y-coordinate (upper left of array) scratchint = 0 ; index for calculation of y-coordinate glindex = 0 while glindex <= numbervertices glindex3 = 0 while glindex3 < squaresize scratchint2 = glindex + glindex3 xcoord[scratchint2] = scratchfloat2 + scratchfloat * glindex3 ycoord[scratchint2] = scratchfloat3 - scratchfloat * scratchint vertex[scratchint2] = xcoord[scratchint2] + flip(ycoord[scratchint2]) glindex3 = glindex3 + 1 endwhile ; glindex3 glindex = glindex + squaresize scratchint = scratchint + 1 endwhile ; glindex elseif traparray == 136 ; "triangular array" if @fixtrapbug triarraysize = @triarray1 endif ; @fixtrapbug cursality = round(3*triarraysize*(triarraysize-1)/2 + 1) ; centered triangular numbers numbervertices = cursality ; single points, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @nscale1 * (0.333333, 0) vertex[2] = @nscale1 * (-0.166667, 0.288675) vertex[3] = @nscale1 * (-0.166667, -0.288675) vertex[4] = @nscale1 * (0.666667, 0) vertex[5] = @nscale1 * (0.166667, 0.288675) vertex[6] = @nscale1 * (-0.333333, 0.57735) vertex[7] = @nscale1 * (-0.333333, 0) vertex[8] = @nscale1 * (-0.333333, -0.57735) vertex[9] = @nscale1 * (0.166667, -0.288675) vertex[10] = @nscale1 * (1,0) vertex[11] = @nscale1 * (0.5, 0.288675) vertex[12] = @nscale1 * (0., 0.57735) vertex[13] = @nscale1 * (-0.5, 0.866025) vertex[14] = @nscale1 * (-0.5, 0.288675) vertex[15] = @nscale1 * (-0.5, -0.288675) vertex[16] = @nscale1 * (-0.5, -0.866025) vertex[17] = @nscale1 * (0., -0.57735) vertex[18] = @nscale1 * (0.5, -0.288675) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 137 ; "triangular spiral" if @fixtrapbug spiralsize = @spiralorder1 endif ; @fixtrapbug cursality = 1 if spiralsize == 1 numbervertices = 4 cincrement = 4 ; numbervertices/cursality elseif spiralsize == 2 numbervertices = 7 cincrement = 7 elseif spiralsize == 3 numbervertices = 10 cincrement = 10 elseif spiralsize == 4 numbervertices = 13 cincrement = 13 endif ; spiralsize[] ; initialize arrays vertex[0] = shrink2 * @nscale1 * (0.3,0) vertex[1] = shrink2 * @nscale1 * (-0.2, 0.34641) vertex[2] = shrink2 * @nscale1 * (-0.3, -0.519615) vertex[3] = shrink2 * @nscale1 * (0.8,0) vertex[4] = shrink2 * @nscale1 * (-0.5, 0.866025) vertex[5] = shrink2 * @nscale1 * (-0.6, -1.03923) vertex[6] = shrink2 * @nscale1 * (1.4,0) vertex[7] = shrink2 * @nscale1 * (-0.8, 1.38564) vertex[8] = shrink2 * @nscale1 * (-0.9, -1.55885) vertex[9] = shrink2 * @nscale1 * (2,0) vertex[10] = shrink2 * @nscale1 * (-1.1, 1.90526) vertex[11] = shrink2 * @nscale1 * (-1.2, -2.07846) vertex[12] = shrink2 * @nscale1 * (2.6,0) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 138 ; "square spiral" if @fixtrapbug spiralsize = @spiralorder1 endif ; @fixtrapbug cursality = 1 if spiralsize == 1 numbervertices = 5 cincrement = 5 ; numbervertices/cursality elseif spiralsize == 2 numbervertices = 9 cincrement = 9 elseif spiralsize == 3 numbervertices = 13 cincrement = 13 elseif spiralsize == 4 numbervertices = 17 cincrement = 17 endif ; spiralsize[] ; initialize arrays vertex[0] = shrink2 * @nscale1 * (0.3,0) vertex[1] = shrink2 * @nscale1 * (0,0.4) vertex[2] = shrink2 * @nscale1 * (-0.6,0) vertex[3] = shrink2 * @nscale1 * (0,-0.8) vertex[4] = shrink2 * @nscale1 * (1,0) vertex[5] = shrink2 * @nscale1 * (0,1.2) vertex[6] = shrink2 * @nscale1 * (-1.4,0) vertex[7] = shrink2 * @nscale1 * (0,-1.6) vertex[8] = shrink2 * @nscale1 * (1.8,0) vertex[9] = shrink2 * @nscale1 * (0,2) vertex[10] = shrink2 * @nscale1 * (-2.2,0) vertex[11] = shrink2 * @nscale1 * (0,-2.4) vertex[12] = shrink2 * @nscale1 * (2.6,0) vertex[13] = shrink2 * @nscale1 * (0,2.8) vertex[14] = shrink2 * @nscale1 * (-3,0) vertex[15] = shrink2 * @nscale1 * (0,-3.2) vertex[16] = shrink2 * @nscale1 * (3.4,0) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 139 ; "pentagonal array" if @fixtrapbug triarraysize = @triarray1 endif ; @fixtrapbug scratchint = triarraysize - 1 cursality = round((5*sqr(scratchint)+(5*scratchint)+2)/2) ; centered pentagonal numbers numbervertices = cursality ; single points, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @nscale1 * (0.333333, 0) vertex[2] = @nscale1 * (0.103006, 0.317019) vertex[3] = @nscale1 * (-0.269672, 0.195928) vertex[4] = @nscale1 * (-0.269672, -0.195928) vertex[5] = @nscale1 * (0.103006, -0.317019) vertex[6] = @nscale1 * (0.666667, 0) vertex[7] = @nscale1 * (0.436339, 0.317019) vertex[8] = @nscale1 * (0.206011, 0.634038) vertex[9] = @nscale1 * (-0.166667, 0.512947) vertex[10] = @nscale1 * (-0.539345, 0.391857) vertex[11] = @nscale1 * (-0.539345, 0) vertex[12] = @nscale1 * (-0.539345, -0.391857) vertex[13] = @nscale1 * (-0.166667, -0.512947) vertex[14] = @nscale1 * (0.206011, -0.634038) vertex[15] = @nscale1 * (0.436339, -0.317019) vertex[16] = @nscale1 * (1,0) vertex[17] = @nscale1 * (0.769672, 0.317019) vertex[18] = @nscale1 * (0.539345, 0.634038) vertex[19] = @nscale1 * (0.309017, 0.951057) vertex[20] = @nscale1 * (-0.063661, 0.829966) vertex[21] = @nscale1 * (-0.436339, 0.708876) vertex[22] = @nscale1 * (-0.809017, 0.587785) vertex[23] = @nscale1 * (-0.809017, 0.195928) vertex[24] = @nscale1 * (-0.809017, -0.195928) vertex[25] = @nscale1 * (-0.809017, -0.587785) vertex[26] = @nscale1 * (-0.436339, -0.708876) vertex[27] = @nscale1 * (-0.063661, -0.829966) vertex[28] = @nscale1 * (0.309017, -0.951057) vertex[29] = @nscale1 * (0.539345, -0.634038) vertex[30] = @nscale1 * (0.769672, -0.317019) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 140 ; "hexagonal array" if @fixtrapbug triarraysize = @triarray1 endif ; @fixtrapbug cursality = round(3*(triarraysize-1)*(triarraysize)+1) ; centered hexagonal numbers numbervertices = cursality ; single points, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0,0) vertex[1] = @nscale1 * (0.333333, 0) vertex[2] = @nscale1 * (0.166667, 0.288675) vertex[3] = @nscale1 * (-0.166667, 0.288675) vertex[4] = @nscale1 * (-0.333333, 0) vertex[5] = @nscale1 * (-0.166667, -0.288675) vertex[6] = @nscale1 * (0.166667, -0.288675) vertex[7] = @nscale1 * (0.666667, 0) vertex[8] = @nscale1 * (0.5, 0.288675) vertex[9] = @nscale1 * (0.333333, 0.57735) vertex[10] = @nscale1 * (0., 0.57735) vertex[11] = @nscale1 * (-0.333333, 0.57735) vertex[12] = @nscale1 * (-0.5, 0.288675) vertex[13] = @nscale1 * (-0.666667, 0) vertex[14] = @nscale1 * (-0.5, -0.288675) vertex[15] = @nscale1 * (-0.333333, -0.57735) vertex[16] = @nscale1 * (0., -0.57735) vertex[17] = @nscale1 * (0.333333, -0.57735) vertex[18] = @nscale1 * (0.5, -0.288675) vertex[19] = @nscale1 * (1,0) vertex[20] = @nscale1 * (0.833333, 0.288675) vertex[21] = @nscale1 * (0.666667, 0.57735) vertex[22] = @nscale1 * (0.5, 0.866025) vertex[23] = @nscale1 * (0.166667, 0.866025) vertex[24] = @nscale1 * (-0.5, 0.866025) vertex[25] = @nscale1 * (-0.666667, 0.57735) vertex[26] = @nscale1 * (-0.833333, 0.288675) vertex[27] = @nscale1 * (-1,0) vertex[28] = @nscale1 * (-0.833333, -0.288675) vertex[29] = @nscale1 * (-0.166667, 0.866025) vertex[30] = @nscale1 * (-0.666667, -0.57735) vertex[31] = @nscale1 * (-0.5, -0.866025) vertex[32] = @nscale1 * (-0.166667, -0.866025) vertex[33] = @nscale1 * (0.166667, -0.866025) vertex[34] = @nscale1 * (0.5, -0.866025) vertex[35] = @nscale1 * (0.666667, -0.57735) vertex[36] = @nscale1 * (0.833333, -0.288675) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 141 ; "pentagonal spiral" if @fixtrapbug spiralsize = @spiralorder1 endif ; @fixtrapbug cursality = 1 if spiralsize == 1 numbervertices = 6 cincrement = 6 ; numbervertices/cursality elseif spiralsize == 2 numbervertices = 11 cincrement = 11 elseif spiralsize == 3 numbervertices = 16 cincrement = 16 elseif spiralsize == 4 numbervertices = 21 cincrement = 21 endif ; spiralsize[] ; initialize arrays vertex[0] = shrink3 * @nscale1 * (0.3,0) vertex[1] = shrink3 * @nscale1 * (0.123607, 0.380423) vertex[2] = shrink3 * @nscale1 * (-0.48541, 0.352671) vertex[3] = shrink3 * @nscale1 * (-0.647214, -0.470228) vertex[4] = shrink3 * @nscale1 * (0.309017, -0.951057) vertex[5] = shrink3 * @nscale1 * (1.2,0) vertex[6] = shrink3 * @nscale1 * (0.432624, 1.33148) vertex[7] = shrink3 * @nscale1 * (-1.29443, 0.940456) vertex[8] = shrink3 * @nscale1 * (-1.45623, -1.05801) vertex[9] = shrink3 * @nscale1 * (0.618034, -1.90211) vertex[10] = shrink3 * @nscale1 * (2.2,0) vertex[11] = shrink3 * @nscale1 * (0.741641, 2.28254) vertex[12] = shrink3 * @nscale1 * (-2.10344, 1.52824) vertex[13] = shrink3 * @nscale1 * (-2.26525, -1.6458) vertex[14] = shrink3 * @nscale1 * (0.927051, -2.85317) vertex[15] = shrink3 * @nscale1 * (3.2,0) vertex[16] = shrink3 * @nscale1 * (1.05066, 3.23359) vertex[17] = shrink3 * @nscale1 * (-2.91246, 2.11603) vertex[18] = shrink3 * @nscale1 * (-3.07426, -2.23358) vertex[19] = shrink3 * @nscale1 * (1.23607, -3.80423) vertex[20] = shrink3 * @nscale1 * (4.2,0) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 142 ; "hexagonal spiral" if @fixtrapbug spiralsize = @spiralorder1 endif ; @fixtrapbug cursality = 1 if spiralsize == 1 numbervertices = 7 cincrement = 7 ; numbervertices/cursality elseif spiralsize == 2 numbervertices = 13 cincrement = 13 elseif spiralsize == 3 numbervertices = 19 cincrement = 19 elseif spiralsize == 4 numbervertices = 25 cincrement = 25 endif ; spiralsize[] ; initialize arrays vertex[0] = shrink3 * @nscale1 * (0.3,0) vertex[1] = shrink3 * @nscale1 * (0.2, 0.34641) vertex[2] = shrink3 * @nscale1 * (-0.3, 0.519615) vertex[3] = shrink3 * @nscale1 * (-0.8, 0) vertex[4] = shrink3 * @nscale1 * (-0.5, -0.866025) vertex[5] = shrink3 * @nscale1 * (0.6, -1.03923) vertex[6] = shrink3 * @nscale1 * (1.4,0) vertex[7] = shrink3 * @nscale1 * (0.8, 1.38564) vertex[8] = shrink3 * @nscale1 * (-0.9, 1.55885) vertex[9] = shrink3 * @nscale1 * (-2,0) vertex[10] = shrink3 * @nscale1 * (-1.1, -1.90526) vertex[11] = shrink3 * @nscale1 * (1.2, -2.07846) vertex[12] = shrink3 * @nscale1 * (2.6,0) vertex[13] = shrink3 * @nscale1 * (1.4, 2.42487) vertex[14] = shrink3 * @nscale1 * (-1.5, 2.59808) vertex[15] = shrink3 * @nscale1 * (-3.2,0) vertex[16] = shrink3 * @nscale1 * (-1.7, -2.94449) vertex[17] = shrink3 * @nscale1 * (1.8, -3.11769) vertex[18] = shrink3 * @nscale1 * (3.8,0) vertex[19] = shrink3 * @nscale1 * (2, 3.4641) vertex[20] = shrink3 * @nscale1 * (-2.1, 3.63731) vertex[21] = shrink3 * @nscale1 * (-4.4,0) vertex[22] = shrink3 * @nscale1 * (-2.3, -3.98372) vertex[23] = shrink3 * @nscale1 * (2.4, -4.15692) vertex[24] = shrink3 * @nscale1 * (5,0) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 143 ; "octagonal spiral" if @fixtrapbug spiralsize = @spiralorder1 endif ; @fixtrapbug cursality = 1 if spiralsize == 1 numbervertices = 9 cincrement = 9 ; numbervertices/cursality elseif spiralsize == 2 numbervertices = 17 cincrement = 17 elseif spiralsize == 3 numbervertices = 25 cincrement = 25 elseif spiralsize == 4 numbervertices = 33 cincrement = 33 endif ; spiralsize[] ; initialize arrays vertex[0] = shrink3 * @nscale1 * (0.3,0) vertex[1] = shrink3 * @nscale1 * (0.282843, 0.282843) vertex[2] = shrink3 * @nscale1 * (0,0.6) vertex[3] = shrink3 * @nscale1 * (-0.565685, 0.565685) vertex[4] = shrink3 * @nscale1 * (-1,0) vertex[5] = shrink3 * @nscale1 * (-0.848528, -0.848528) vertex[6] = shrink3 * @nscale1 * (0,-1.4) vertex[7] = shrink3 * @nscale1 * (1.13137, -1.13137) vertex[8] = shrink3 * @nscale1 * (1.8,0) vertex[9] = shrink3 * @nscale1 * (1.41421, 1.41421) vertex[10] = shrink3 * @nscale1 * (0,2.2) vertex[11] = shrink3 * @nscale1 * (-1.69706, 1.69706) vertex[12] = shrink3 * @nscale1 * (-2.6,0) vertex[13] = shrink3 * @nscale1 * (-1.9799, -1.9799) vertex[14] = shrink3 * @nscale1 * (0,-3) vertex[15] = shrink3 * @nscale1 * (2.26274, -2.26274) vertex[16] = shrink3 * @nscale1 * (3.4,0) vertex[17] = shrink3 * @nscale1 * (2.54558, 2.54558) vertex[18] = shrink3 * @nscale1 * (0,3.8) vertex[19] = shrink3 * @nscale1 * (-2.82843, 2.82843) vertex[20] = shrink3 * @nscale1 * (-4.2,0) vertex[21] = shrink3 * @nscale1 * (-3.11127, -3.11127) vertex[22] = shrink3 * @nscale1 * (0,-4.6) vertex[23] = shrink3 * @nscale1 * (3.39411, -3.39411) vertex[24] = shrink3 * @nscale1 * (5,0) vertex[25] = shrink3 * @nscale1 * (3.67696, 3.67696) vertex[26] = shrink3 * @nscale1 * (0,5.4) vertex[27] = shrink3 * @nscale1 * (-3.9598, 3.9598) vertex[28] = shrink3 * @nscale1 * (-5.8,0) vertex[29] = shrink3 * @nscale1 * (-4.24264, -4.24264) vertex[30] = shrink3 * @nscale1 * (0,-6.2) vertex[31] = shrink3 * @nscale1 * (4.52548, -4.52548) vertex[32] = shrink3 * @nscale1 * (6.6,0) glindex = 0 while glindex <= numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 144 ; "superellipse" if @fixtrapbug ellipseX = @ellipseexponent1 ellipseH = @ellipseheight1 ellipseW = @ellipsewidth1 endif ; @fixtrapbug if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain cursality = 1 numbervertices = granularity ; open curve as plotted cincrement = granularity ; numbervertices/cursality scratchfloat = 2/ellipseX scratchint = round(granularity/2) scratchint2 = round(granularity/4) ; initialize arrays glindex = 0 while glindex < scratchint2 xcoord[glindex] = @nscale1 * ellipseH * (cos(glindex * halfpi/scratchint2)^scratchfloat) ycoord[glindex] = @nscale1 * ellipseW * (sin(glindex * halfpi /scratchint2)^scratchfloat) glindex = glindex + 1 endwhile ; glindex glindex = 0 while glindex < scratchint2 xcoord[glindex + scratchint2] = -xcoord[scratchint2-1-glindex] ycoord[glindex + scratchint2] = ycoord[scratchint2-1-glindex] glindex = glindex + 1 endwhile ; glindex glindex = 0 while glindex < scratchint xcoord[glindex + scratchint] = xcoord[scratchint-1-glindex] ycoord[glindex + 36] = -ycoord[scratchint-1-glindex] glindex = glindex + 1 endwhile ; glindex glindex = 0 while glindex < granularity vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 145 ; "hypotrochoid" if @fixtrapbug hypotroA = @hypotrochA1 hypotroB = @hypotrochB1 hypotroH = @hypotrochH1 endif ; @fixtrapbug if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; vertices + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchfloat = hypotroA - hypotroB scratchfloat2 = scratchfloat/hypotroB scratchfloat3 = twopi/granularity while glindex < granularity2 xcoord[glindex] = @nscale1 * (scratchfloat * cos(glindex * scratchfloat3) + hypotroH * cos(scratchfloat2 * glindex * scratchfloat3)) ycoord[glindex] = @nscale1 * (scratchfloat * sin(glindex * scratchfloat3) - hypotroH * sin(scratchfloat2 * glindex * scratchfloat3)) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[granularity2] = xcoord[0] ycoord[granularity2] = ycoord[0] vertex[granularity2] = xcoord[granularity2] + flip(ycoord[granularity2]) elseif traparray == 146 ; "epitrochoid" if @fixtrapbug hypotroA = @hypotrochA1 hypotroB = @hypotrochB1 hypotroH = @hypotrochH1 endif ; @fixtrapbug if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; vertices + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchfloat = hypotroA + hypotroB scratchfloat2 = scratchfloat/hypotroB scratchfloat3 = twopi/granularity while glindex < granularity2 xcoord[glindex] = @nscale1 * (scratchfloat * cos(glindex * scratchfloat3) - hypotroH * cos(scratchfloat2 * glindex * scratchfloat3)) ycoord[glindex] = @nscale1 * (scratchfloat * sin(glindex * scratchfloat3) - hypotroH * sin(scratchfloat2 * glindex * scratchfloat3)) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[granularity2] = xcoord[0] ycoord[granularity2] = ycoord[0] vertex[granularity2] = xcoord[granularity2] + flip(ycoord[granularity2]) elseif traparray == 148 ; "honeycomb" cursality = 6 numbervertices = 36 ; n for open curves cincrement = 6 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @nscale1 * (0.25, 0.433013) vertex[2] = @nscale1 * (0.5, 0.866026) vertex[3] = @nscale1 * (1., 0.866026) vertex[4] = @nscale1 * (1.25, 0.433013) vertex[5] = @nscale1 * (1,0) vertex[6] = @nscale1 * (0.25, 0.433013) vertex[7] = @nscale1 * (-0.25, 0.433013) vertex[8] = @nscale1 * (-0.5, 0.866026) vertex[9] = @nscale1 * (-0.25, 1.29904) vertex[10] = @nscale1 * (0.25, 1.29904) vertex[11] = @nscale1 * (0.5, 0.866026) vertex[12] = @nscale1 * (-0.25, 0.433013) vertex[13] = @nscale1 * (-0.5,0) vertex[14] = @nscale1 * (-1,0) vertex[15] = @nscale1 * (-1.25, 0.433013) vertex[16] = @nscale1 * (-1., 0.866026) vertex[17] = @nscale1 * (-0.5, 0.866026) vertex[18] = @nscale1 * (-0.5,0) vertex[19] = @nscale1 * (-0.25, -0.433013) vertex[20] = @nscale1 * (-0.5, -0.866026) vertex[21] = @nscale1 * (-1., -0.866026) vertex[22] = @nscale1 * (-1.25, -0.433013) vertex[23] = @nscale1 * (-1,0) vertex[24] = @nscale1 * (-0.25, -0.433013) vertex[25] = @nscale1 * (0.25, -0.433013) vertex[26] = @nscale1 * (0.5, -0.866026) vertex[27] = @nscale1 * (0.25, -1.29904) vertex[28] = @nscale1 * (-0.25, -1.29904) vertex[29] = @nscale1 * (-0.5, -0.866026) vertex[30] = @nscale1 * (0.25, -0.433013) vertex[31] = @nscale1 * (0.5,0) vertex[32] = @nscale1 * (1,0) vertex[33] = @nscale1 * (1.25, -0.433013) vertex[34] = @nscale1 * (1., -0.866026) vertex[35] = @nscale1 * (0.5, -0.866026) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 149 ; "nested circles" if @fixtrapbug numbercircles = @circlenum1 endif ; @fixtrapbug glindex3 = 0 if numbercircles == 2 cursality = 2 numbervertices = 120 cincrement = 60 ; numbervertices/cursality scratchfloat = twopi/59 ; angle increment, cincrement - 1 to close curve ; initialize arrays while glindex3 < 2 ; cursality scratchfloat2 = (glindex3+1)/2 * @nscale1 ; fixes radius of the various circles glindex = 0 while glindex < 60 ; cincrement scratchint = glindex3*60 + glindex ; saves a bit of redundant calculation xcoord[scratchint] = scratchfloat2 * cos(scratchfloat*glindex) ycoord[scratchint] = scratchfloat2 * sin(scratchfloat*glindex) vertex[scratchint] = xcoord[scratchint] + flip(ycoord[scratchint]) glindex = glindex + 1 endwhile ; glindex glindex3 = glindex3 + 1 endwhile ; glindex3 elseif numbercircles == 3 cursality = 3 numbervertices = 150 cincrement = 50 ; numbervertices/cursality scratchfloat = twopi/49 ; angle increment ; initialize arrays while glindex3 < 3 scratchfloat2 = (glindex3+1)/3 * @nscale1 ; fixes radius of the various circles glindex = 0 while glindex < 50 scratchint = glindex3*50 + glindex xcoord[scratchint] = scratchfloat2 * cos(scratchfloat*glindex) ycoord[scratchint] = scratchfloat2 * sin(scratchfloat*glindex) vertex[scratchint] = xcoord[scratchint] + flip(ycoord[scratchint]) glindex = glindex + 1 endwhile ; glindex glindex3 = glindex3 + 1 endwhile ; glindex3 elseif numbercircles == 4 cursality = 4 numbervertices = 200 cincrement = 50 ; numbervertices/cursality scratchfloat = twopi/49 ; angle increment ; initialize arrays while glindex3 < 4 scratchfloat2 = (glindex3+1)/4 * @nscale1 ; fixes radius of the various circles glindex = 0 while glindex < 50 scratchint = glindex3*50 + glindex xcoord[scratchint] = scratchfloat2 * cos(scratchfloat*glindex) ycoord[scratchint] = scratchfloat2 * sin(scratchfloat*glindex) vertex[scratchint] = xcoord[scratchint] + flip(ycoord[scratchint]) glindex = glindex + 1 endwhile ; glindex glindex3 = glindex3 + 1 endwhile ; glindex3 endif ; numbercircles[] elseif traparray == 150 ; "osculant circles" if @fixtrapbug numbercircles = @circlenum1 endif ; @fixtrapbug glindex3 = 0 if numbercircles == 2 cursality = 2 numbervertices = 120 cincrement = 60 ; numbervertices/cursality scratchfloat = twopi/59 ; angle increment, cincrement - 1 to close curve ; initialize arrays while glindex3 < 2 ; cursality scratchfloat2 = (glindex3+1)/2 * @nscale1 ; fixes radius of the various circles scratchfloat3 = @nscale1 - scratchfloat2 ; distance to translate current circle to touch largest circle glindex = 0 while glindex < 60 ; cincrement scratchint = glindex3*60 + glindex ; saves a bit of redundant calculation xcoord[scratchint] = scratchfloat2 * cos(scratchfloat*glindex) + scratchfloat3 ycoord[scratchint] = scratchfloat2 * sin(scratchfloat*glindex) vertex[scratchint] = xcoord[scratchint] + flip(ycoord[scratchint]) glindex = glindex + 1 endwhile ; glindex glindex3 = glindex3 + 1 endwhile ; glindex3 elseif numbercircles == 3 cursality = 3 numbervertices = 150 cincrement = 50 ; numbervertices/cursality scratchfloat = twopi/49 ; angle increment ; initialize arrays while glindex3 < 3 scratchfloat2 = (glindex3+1)/3 * @nscale1 ; fixes radius of the various circles scratchfloat3 = @nscale1 - scratchfloat2 ; distance to translate current circle to touch largest circle glindex = 0 while glindex < 50 scratchint = glindex3*50 + glindex xcoord[scratchint] = scratchfloat2 * cos(scratchfloat*glindex) + scratchfloat3 ycoord[scratchint] = scratchfloat2 * sin(scratchfloat*glindex) vertex[scratchint] = xcoord[scratchint] + flip(ycoord[scratchint]) glindex = glindex + 1 endwhile ; glindex glindex3 = glindex3 + 1 endwhile ; glindex3 elseif numbercircles == 4 cursality = 4 numbervertices = 200 cincrement = 50 ; numbervertices/cursality scratchfloat = twopi/49 ; angle increment ; initialize arrays while glindex3 < 4 scratchfloat2 = (glindex3+1)/4 * @nscale1 ; fixes radius of the various circles scratchfloat3 = @nscale1 - scratchfloat2 ; distance to translate current circle to touch largest circle glindex = 0 while glindex < 50 scratchint = glindex3*50 + glindex xcoord[scratchint] = scratchfloat2 * cos(scratchfloat*glindex) + scratchfloat3 ycoord[scratchint] = scratchfloat2 * sin(scratchfloat*glindex) vertex[scratchint] = xcoord[scratchint] + flip(ycoord[scratchint]) glindex = glindex + 1 endwhile ; glindex glindex3 = glindex3 + 1 endwhile ; glindex3 endif ; numbercircles[] elseif traparray == 152 ; "11-gon" cursality = 1 numbervertices = 12 ; vertices + cursality for closed curves cincrement = 12 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 11) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 11) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 157 ; "12-gon" cursality = 1 numbervertices = 13 ; vertices + cursality for closed curves cincrement = 13 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 12) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 12) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 153 ; "11-gram 1" cursality = 1 numbervertices = 12 ; n + cursality for closed curves cincrement = 12 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.415415, 0.909632) vertex[2] = @nscale1 * (-0.654861, 0.75575) vertex[3] = @nscale1 * (-0.959493, -0.281733) vertex[4] = @nscale1 * (-0.142315, -0.989821) vertex[5] = @nscale1 * (0.841254, -0.540641) vertex[6] = @nscale1 * (0.841254, 0.540641) vertex[7] = @nscale1 * (-0.142315, 0.989821) vertex[8] = @nscale1 * (-0.959493, 0.281733) vertex[9] = @nscale1 * (-0.654861, -0.75575) vertex[10] = @nscale1 * (0.415415, -0.909632) vertex[11] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 154 ; "11-gram 2" cursality = 1 numbervertices = 12 ; n + cursality for closed curves cincrement = 12 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.142315, 0.989821) vertex[2] = @nscale1 * (-0.959493, -0.281733) vertex[3] = @nscale1 * (0.415415, -0.909632) vertex[4] = @nscale1 * (0.841254, 0.540641) vertex[5] = @nscale1 * (-0.654861, 0.75575) vertex[6] = @nscale1 * (-0.654861, -0.75575) vertex[7] = @nscale1 * (0.841254, -0.540641) vertex[8] = @nscale1 * (0.415415, 0.909632) vertex[9] = @nscale1 * (-0.959493, 0.281733) vertex[10] = @nscale1 * (-0.142315, -0.989821) vertex[11] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 155 ; "11-gram 3" cursality = 1 numbervertices = 12 ; n + cursality for closed curves cincrement = 12 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.654861, 0.75575) vertex[2] = @nscale1 * (-0.142315, -0.989821) vertex[3] = @nscale1 * (0.841254, 0.540641) vertex[4] = @nscale1 * (-0.959493, 0.281733) vertex[5] = @nscale1 * (0.415415, -0.909632) vertex[6] = @nscale1 * (0.415415, 0.909632) vertex[7] = @nscale1 * (-0.959493, -0.281733) vertex[8] = @nscale1 * (0.841254, -0.540641) vertex[9] = @nscale1 * (-0.142315, 0.989821) vertex[10] = @nscale1 * (-0.654861, -0.75575) vertex[11] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 156 ; "11-gram 4" cursality = 1 numbervertices = 12 ; n + cursality for closed curves cincrement = 12 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.959493, 0.281733) vertex[2] = @nscale1 * (0.841254, -0.540641) vertex[3] = @nscale1 * (-0.654861, 0.75575) vertex[4] = @nscale1 * (0.415415, -0.909632) vertex[5] = @nscale1 * (-0.142315, 0.989821) vertex[6] = @nscale1 * (-0.142315, -0.989821) vertex[7] = @nscale1 * (0.415415, 0.909632) vertex[8] = @nscale1 * (-0.654861, -0.75575) vertex[9] = @nscale1 * (0.841254, 0.540641) vertex[10] = @nscale1 * (-0.959493, -0.281733) vertex[11] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 158 ; "12-gram 1" cursality = 2 numbervertices = 14 ; n + cursality for closed curves cincrement = 7 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0.5, 0.866025) vertex[2] = @nscale1 * (-0.5, 0.866025) vertex[3] = @nscale1 * (-1,0) vertex[4] = @nscale1 * (-0.5, -0.866025) vertex[5] = @nscale1 * (0.5, -0.866025) vertex[6] = @nscale1 * (1,0) vertex[7] = @nscale1 * (0.866025, 0.5) vertex[8] = @nscale1 * (0,1) vertex[9] = @nscale1 * (-0.866025, 0.5) vertex[10] = @nscale1 * (-0.866025, -0.5) vertex[11] = @nscale1 * (0,-1) vertex[12] = @nscale1 * (0.866025, -0.5) vertex[13] = @nscale1 * (0.866025, 0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 159 ; "12-gram 2" cursality = 3 numbervertices = 15 ; n + cursality for closed curves cincrement = 5 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (0,1) vertex[2] = @nscale1 * (-1,0) vertex[3] = @nscale1 * (0,-1) vertex[4] = @nscale1 * (1,0) vertex[5] = @nscale1 * (0.866025, 0.5) vertex[6] = @nscale1 * (-0.5, 0.866025) vertex[7] = @nscale1 * (-0.866025, -0.5) vertex[8] = @nscale1 * (0.5, -0.866025) vertex[9] = @nscale1 * (0.866025, 0.5) vertex[10] = @nscale1 * (0.5, 0.866025) vertex[11] = @nscale1 * (-0.866025, 0.5) vertex[12] = @nscale1 * (-0.5, -0.866025) vertex[13] = @nscale1 * (0.866025, -0.5) vertex[14] = @nscale1 * (0.5, 0.866025) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 160 ; "12-gram 3" cursality = 4 numbervertices = 16 ; n + cursality for closed curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.5, 0.866025) vertex[2] = @nscale1 * (-0.5, -0.866025) vertex[3] = @nscale1 * (1,0) vertex[4] = @nscale1 * (0.866025, 0.5) vertex[5] = @nscale1 * (-0.866025, 0.5) vertex[6] = @nscale1 * (0,-1) vertex[7] = @nscale1 * (0.866025, 0.5) vertex[8] = @nscale1 * (0.5, 0.866025) vertex[9] = @nscale1 * (-1,0) vertex[10] = @nscale1 * (0.5, -0.866025) vertex[11] = @nscale1 * (0.5, 0.866025) vertex[12] = @nscale1 * (0,1) vertex[13] = @nscale1 * (-0.866025, -0.5) vertex[14] = @nscale1 * (0.866025, -0.5) vertex[15] = @nscale1 * (0,1) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 161 ; "12-gram 4" cursality = 1 numbervertices = 13 ; n + cursality for closed curves cincrement = 13 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (1,0) vertex[1] = @nscale1 * (-0.866025, 0.5) vertex[2] = @nscale1 * (0.5, -0.866025) vertex[3] = @nscale1 * (0,1) vertex[4] = @nscale1 * (-0.5, -0.866025) vertex[5] = @nscale1 * (0.866025, 0.5) vertex[6] = @nscale1 * (-1,0) vertex[7] = @nscale1 * (0.866025, -0.5) vertex[8] = @nscale1 * (-0.5, 0.866025) vertex[9] = @nscale1 * (0,-1) vertex[10] = @nscale1 * (0.5, 0.866025) vertex[11] = @nscale1 * (-0.866025, -0.5) vertex[12] = @nscale1 * (1,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 162 ; "12-gram 5" cursality = 1 numbervertices = 13 ; n + cursality for closed curves cincrement = 13 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.866025, 0.5) vertex[1] = @nscale1 * (-0.375, -0.649519) vertex[2] = @nscale1 * (0,1) vertex[3] = @nscale1 * (0.375, -0.649519) vertex[4] = @nscale1 * (-0.866025, 0.5) vertex[5] = @nscale1 * (0.75,0) vertex[6] = @nscale1 * (-0.866025, -0.5) vertex[7] = @nscale1 * (0.375, 0.649519) vertex[8] = @nscale1 * (0,-1) vertex[9] = @nscale1 * (-0.375, 0.649519) vertex[10] = @nscale1 * (0.866025, -0.5) vertex[11] = @nscale1 * (-0.75,0) vertex[12] = @nscale1 * (0.866025, 0.5) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 163 ; "11-star" cursality = 1 numbervertices = 23 ; n + cursality for closed curves cincrement = 23 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @starspikiness * @nscale1 * (0.959493, 0.281733) vertex[2] = @nscale1 * (0.420627, 0.27032) vertex[3] = @starspikiness * @nscale1 * (0.654861, 0.75575) vertex[4] = @nscale1 * (0.207708, 0.454816) vertex[5] = @starspikiness * @nscale1 * (0.142315, 0.989821) vertex[6] = @nscale1 * (-0.0711574, 0.494911) vertex[7] = @starspikiness * @nscale1 * (-0.415415, 0.909632) vertex[8] = @nscale1 * (-0.32743, 0.377875) vertex[9] = @starspikiness * @nscale1 * (-0.841254, 0.540641) vertex[10] = @nscale1 * (-0.479746, 0.140866) vertex[11] = @starspikiness * @nscale1 * (-1,0) vertex[12] = @nscale1 * (-0.479746, -0.140866) vertex[13] = @starspikiness * @nscale1 * (-0.841254, -0.540641) vertex[14] = @nscale1 * (-0.32743, -0.377875) vertex[15] = @starspikiness * @nscale1 * (-0.415415, -0.909632) vertex[16] = @nscale1 * (-0.0711574, -0.494911) vertex[17] = @starspikiness * @nscale1 * (0.142315, -0.989821) vertex[18] = @nscale1 * (0.207708, -0.454816) vertex[19] = @starspikiness * @nscale1 * (0.654861, -0.75575) vertex[20] = @nscale1 * (0.420627, -0.27032) vertex[21] = @starspikiness * @nscale1 * (0.959493, -0.281733) vertex[22] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 165 ; "11-star 2" cursality = 1 numbervertices = 23 ; n + cursality for closed curves cincrement = 23 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @nscale1 * (1,0) vertex[2] = @nscale1 * (0.420627, 0.27032) vertex[3] = @nscale1 * (0.841254, 0.540641) vertex[4] = @nscale1 * (0.207708, 0.454816) vertex[5] = @nscale1 * (0.415415, 0.909632) vertex[6] = @nscale1 * (-0.0711574, 0.494911) vertex[7] = @nscale1 * (-0.142315, 0.989821) vertex[8] = @nscale1 * (-0.32743, 0.377875) vertex[9] = @nscale1 * (-0.654861, 0.75575) vertex[10] = @nscale1 * (-0.479746, 0.140866) vertex[11] = @nscale1 * (-0.959493, 0.281733) vertex[12] = @nscale1 * (-0.479746, -0.140866) vertex[13] = @nscale1 * (-0.959493, -0.281733) vertex[14] = @nscale1 * (-0.32743, -0.377875) vertex[15] = @nscale1 * (-0.654861, -0.75575) vertex[16] = @nscale1 * (-0.0711574, -0.494911) vertex[17] = @nscale1 * (-0.142315, -0.989821) vertex[18] = @nscale1 * (0.207708, -0.454816) vertex[19] = @nscale1 * (0.415415, -0.909632) vertex[20] = @nscale1 * (0.420627, -0.27032) vertex[21] = @nscale1 * (0.841254, -0.540641) vertex[22] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 164 ; "11-asterisk" cursality = 11 numbervertices = 22 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 11) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 11) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) vertex[3] = @leafBlength * vertex[3] xcoord[3] = real(vertex[3]) ycoord[3] = imag(vertex[3]) vertex[5] = @leafClength * vertex[5] xcoord[5] = real(vertex[5]) ycoord[5] = imag(vertex[5]) vertex[7] = @leafDlength * vertex[7] xcoord[7] = real(vertex[7]) ycoord[7] = imag(vertex[7]) vertex[9] = @leafElength * vertex[9] xcoord[9] = real(vertex[9]) ycoord[9] = imag(vertex[9]) vertex[11] = @leafFlength * vertex[11] xcoord[11] = real(vertex[11]) ycoord[11] = imag(vertex[11]) vertex[13] = @leafGlength * vertex[13] xcoord[13] = real(vertex[13]) ycoord[13] = imag(vertex[13]) vertex[15] = @leafHlength * vertex[15] xcoord[15] = real(vertex[15]) ycoord[15] = imag(vertex[15]) vertex[17] = @leafIlength * vertex[17] xcoord[17] = real(vertex[17]) ycoord[17] = imag(vertex[17]) vertex[19] = @leafJlength * vertex[19] xcoord[19] = real(vertex[19]) ycoord[19] = imag(vertex[19]) vertex[21] = @leafKlength * vertex[21] xcoord[21] = real(vertex[21]) ycoord[21] = imag(vertex[21]) elseif traparray == 166 ; "12-star" cursality = 1 numbervertices = 25 ; n + cursality for closed curves cincrement = 25 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @starspikiness * @nscale1 * (0.965926, 0.258819) vertex[2] = @nscale1 * (0.433013, 0.25) vertex[3] = @starspikiness * @nscale1 * (0.707107, 0.707107) vertex[4] = @nscale1 * (0.25, 0.433013) vertex[5] = @starspikiness * @nscale1 * (0.258819, 0.965926) vertex[6] = @nscale1 * (0,0.5) vertex[7] = @starspikiness * @nscale1 * (-0.258819, 0.965926) vertex[8] = @nscale1 * (-0.25, 0.433013) vertex[9] = @starspikiness * @nscale1 * (-0.707107, 0.707107) vertex[10] = @nscale1 * (-0.433013, 0.25) vertex[11] = @starspikiness * @nscale1 * (-0.965926, 0.258819) vertex[12] = @nscale1 * (-0.5, 0) vertex[13] = @starspikiness * @nscale1 * (-0.965926, -0.258819) vertex[14] = @nscale1 * (-0.433013, -0.25) vertex[15] = @starspikiness * @nscale1 * (-0.707107, -0.707107) vertex[16] = @nscale1 * (-0.25, -0.433013) vertex[17] = @starspikiness * @nscale1 * (-0.258819, -0.965926) vertex[18] = @nscale1 * (0,-0.5) vertex[19] = @starspikiness * @nscale1 * (0.258819, -0.965926) vertex[20] = @nscale1 * (0.25, -0.433013) vertex[21] = @starspikiness * @nscale1 * (0.707107, -0.707107) vertex[22] = @nscale1 * (0.433013, -0.25) vertex[23] = @starspikiness * @nscale1 * (0.965926, -0.258819) vertex[24] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 167 ; "12-star 2" cursality = 1 numbervertices = 25 ; n + cursality for closed curves cincrement = 25 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5,0) vertex[1] = @nscale1 * (1,0) vertex[2] = @nscale1 * (0.433013, 0.25) vertex[3] = @nscale1 * (0.866025, 0.5) vertex[4] = @nscale1 * (0.25, 0.433013) vertex[5] = @nscale1 * (0.5, 0.866025) vertex[6] = @nscale1 * (0,0.5) vertex[7] = @nscale1 * (0,1) vertex[8] = @nscale1 * (-0.25, 0.433013) vertex[9] = @nscale1 * (-0.5, 0.866025) vertex[10] = @nscale1 * (-0.433013, 0.25) vertex[11] = @nscale1 * (-0.866025, 0.5) vertex[12] = @nscale1 * (-0.5,0) vertex[13] = @nscale1 * (-1,0) vertex[14] = @nscale1 * (-0.433013, -0.25) vertex[15] = @nscale1 * (-0.866025, -0.5) vertex[16] = @nscale1 * (-0.25, -0.433013) vertex[17] = @nscale1 * (-0.5, -0.866025) vertex[18] = @nscale1 * (0,-0.5) vertex[19] = @nscale1 * (0,-1) vertex[20] = @nscale1 * (0.25, -0.433013) vertex[21] = @nscale1 * (0.5, -0.866025) vertex[22] = @nscale1 * (0.433013, -0.25) vertex[23] = @nscale1 * (0.866025, -0.5) vertex[24] = @nscale1 * (0.5,0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 168 ; "12-asterisk" cursality = 12 numbervertices = 24 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 12) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 12) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) vertex[3] = @leafBlength * vertex[3] xcoord[3] = real(vertex[3]) ycoord[3] = imag(vertex[3]) vertex[5] = @leafClength * vertex[5] xcoord[5] = real(vertex[5]) ycoord[5] = imag(vertex[5]) vertex[7] = @leafDlength * vertex[7] xcoord[7] = real(vertex[7]) ycoord[7] = imag(vertex[7]) vertex[9] = @leafElength * vertex[9] xcoord[9] = real(vertex[9]) ycoord[9] = imag(vertex[9]) vertex[11] = @leafFlength * vertex[11] xcoord[11] = real(vertex[11]) ycoord[11] = imag(vertex[11]) vertex[13] = @leafGlength * vertex[13] xcoord[13] = real(vertex[13]) ycoord[13] = imag(vertex[13]) vertex[15] = @leafHlength * vertex[15] xcoord[15] = real(vertex[15]) ycoord[15] = imag(vertex[15]) vertex[17] = @leafIlength * vertex[17] xcoord[17] = real(vertex[17]) ycoord[17] = imag(vertex[17]) vertex[19] = @leafJlength * vertex[19] xcoord[19] = real(vertex[19]) ycoord[19] = imag(vertex[19]) vertex[21] = @leafKlength * vertex[21] xcoord[21] = real(vertex[21]) ycoord[21] = imag(vertex[21]) vertex[23] = @leafLlength * vertex[23] xcoord[23] = real(vertex[23]) ycoord[23] = imag(vertex[23]) elseif traparray == 169 ; "1,1,1,2,3;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.5, -0.25) vertex[1] = @nscale1 * (-0.25, -0.25) vertex[2] = @nscale1 * (-0.25, 0) vertex[3] = @nscale1 * (-0.5, 0) vertex[4] = @nscale1 * (-0.5, -0.5) vertex[5] = @nscale1 * (0.25, -0.5) vertex[6] = @nscale1 * (0.25, -0.25) vertex[7] = @nscale1 * (0., -0.25) vertex[8] = @nscale1 * (0., -0.5) vertex[9] = @nscale1 * (0.5, -0.5) vertex[10] = @nscale1 * (0.5, 0.25) vertex[11] = @nscale1 * (0.25, 0.25) vertex[12] = @nscale1 * (0.25, 0) vertex[13] = @nscale1 * (0.5, 0) vertex[14] = @nscale1 * (0.5, 0.5) vertex[15] = @nscale1 * (-0.25, 0.5) vertex[16] = @nscale1 * (-0.25, 0.25) vertex[17] = @nscale1 * (0., 0.25) vertex[18] = @nscale1 * (0., 0.5) vertex[19] = @nscale1 * (-0.5, 0.5) vertex[20] = @nscale1 * (-0.5, -0.25) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 170 ; "1,1,2,1,3;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.25, -0.25) vertex[1] = @nscale1 * (0., -0.25) vertex[2] = @nscale1 * (0, 0) vertex[3] = @nscale1 * (-0.5, 0) vertex[4] = @nscale1 * (-0.5, -0.25) vertex[5] = @nscale1 * (0.25, -0.25) vertex[6] = @nscale1 * (0.25, 0) vertex[7] = @nscale1 * (0,0) vertex[8] = @nscale1 * (0, -0.5) vertex[9] = @nscale1 * (0.25, -0.5) vertex[10] = @nscale1 * (0.25, 0.25) vertex[11] = @nscale1 * (0., 0.25) vertex[12] = @nscale1 * (0, 0) vertex[13] = @nscale1 * (0.5, 0) vertex[14] = @nscale1 * (0.5, 0.25) vertex[15] = @nscale1 * (-0.25, 0.25) vertex[16] = @nscale1 * (-0.25, 0) vertex[17] = @nscale1 * (0., 0) vertex[18] = @nscale1 * (0., 0.5) vertex[19] = @nscale1 * (-0.25, 0.5) vertex[20] = @nscale1 * (-0.25, -0.25) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 171 ; "1,1,2,2,4;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.333333, -0.166667) vertex[1] = @nscale1 * (-0.166667, -0.166667) vertex[2] = @nscale1 * (-0.166667, 0) vertex[3] = @nscale1 * (-0.5, 0) vertex[4] = @nscale1 * (-0.5, -0.333333) vertex[5] = @nscale1 * (0.166667, -0.333333) vertex[6] = @nscale1 * (0.166667, -0.166667) vertex[7] = @nscale1 * (0., -0.166667) vertex[8] = @nscale1 * (0., -0.5) vertex[9] = @nscale1 * (0.333333, -0.5) vertex[10] = @nscale1 * (0.333333, 0.166667) vertex[11] = @nscale1 * (0.166667, 0.166667) vertex[12] = @nscale1 * (0.166667, 0) vertex[13] = @nscale1 * (0.5, 0) vertex[14] = @nscale1 * (0.5, 0.333333) vertex[15] = @nscale1 * (-0.166667, 0.333333) vertex[16] = @nscale1 * (-0.166667, 0.166667) vertex[17] = @nscale1 * (0., 0.166667) vertex[18] = @nscale1 * (0., 0.5) vertex[19] = @nscale1 * (-0.333333, 0.5) vertex[20] = @nscale1 * (-0.333333, -0.166667) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 172 ; "1,1,4,5,4;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.227273, 0.136364) vertex[1] = @nscale1 * (-0.136364, 0.136364) vertex[2] = @nscale1 * (-0.136364, 0.227273) vertex[3] = @nscale1 * (-0.5, 0.227273) vertex[4] = @nscale1 * (-0.5, -0.227273) vertex[5] = @nscale1 * (-0.136364, -0.227273) vertex[6] = @nscale1 * (-0.136364, -0.136364) vertex[7] = @nscale1 * (-0.227273, -0.136364) vertex[8] = @nscale1 * (-0.227273, -0.5) vertex[9] = @nscale1 * (0.227273, -0.5) vertex[10] = @nscale1 * (0.227273, -0.136364) vertex[11] = @nscale1 * (0.136364, -0.136364) vertex[12] = @nscale1 * (0.136364, -0.227273) vertex[13] = @nscale1 * (0.5, -0.227273) vertex[14] = @nscale1 * (0.5, 0.227273) vertex[15] = @nscale1 * (0.136364, 0.227273) vertex[16] = @nscale1 * (0.136364, 0.136364) vertex[17] = @nscale1 * (0.227273, 0.136364) vertex[18] = @nscale1 * (0.227273, 0.5) vertex[19] = @nscale1 * (-0.227273, 0.5) vertex[20] = @nscale1 * (-0.227273, 0.136364) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 173 ; "1,2,2,2,5;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.333333, -0.333333) vertex[1] = @nscale1 * (-0.166667, -0.333333) vertex[2] = @nscale1 * (-0.166667, 0) vertex[3] = @nscale1 * (-0.5, 0) vertex[4] = @nscale1 * (-0.5, -0.333333) vertex[5] = @nscale1 * (0.333333, -0.333333) vertex[6] = @nscale1 * (0.333333, -0.166667) vertex[7] = @nscale1 * (0., -0.166667) vertex[8] = @nscale1 * (0., -0.5) vertex[9] = @nscale1 * (0.333333, -0.5) vertex[10] = @nscale1 * (0.333333, 0.333333) vertex[11] = @nscale1 * (0.166667, 0.333333) vertex[12] = @nscale1 * (0.166667, 0) vertex[13] = @nscale1 * (0.5, 0) vertex[14] = @nscale1 * (0.5, 0.333333) vertex[15] = @nscale1 * (-0.333333, 0.333333) vertex[16] = @nscale1 * (-0.333333, 0.166667) vertex[17] = @nscale1 * (0., 0.166667) vertex[18] = @nscale1 * (0., 0.5) vertex[19] = @nscale1 * (-0.333333, 0.5) vertex[20] = @nscale1 * (-0.333333, -0.333333) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 174 ; "1,2,5,3,5;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.1,0) vertex[1] = @nscale1 * (0,0) vertex[2] = @nscale1 * (0,0.2) vertex[3] = @nscale1 * (-0.5, 0.2) vertex[4] = @nscale1 * (-0.5, -0.1) vertex[5] = @nscale1 * (0., -0.1) vertex[6] = @nscale1 * (0,0) vertex[7] = @nscale1 * (-0.2, 0) vertex[8] = @nscale1 * (-0.2, -0.5) vertex[9] = @nscale1 * (0.1, -0.5) vertex[10] = @nscale1 * (0.1, 0) vertex[11] = @nscale1 * (0,0) vertex[12] = @nscale1 * (0., -0.2) vertex[13] = @nscale1 * (0.5, -0.2) vertex[14] = @nscale1 * (0.5, 0.1) vertex[15] = @nscale1 * (0., 0.1) vertex[16] = @nscale1 * (0,0) vertex[17] = @nscale1 * (0.2, 0) vertex[18] = @nscale1 * (0.2, 0.5) vertex[19] = @nscale1 * (-0.1, 0.5) vertex[20] = @nscale1 * (-0.1, 0) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 175 ; "2,2,1,4,3;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0., -0.166667) vertex[1] = @nscale1 * (0.333333, -0.166667) vertex[2] = @nscale1 * (0.333333, 0.166667) vertex[3] = @nscale1 * (0.166667, 0.166667) vertex[4] = @nscale1 * (0.166667, -0.5) vertex[5] = @nscale1 * (0.666667, -0.5) vertex[6] = @nscale1 * (0.666667, -0.166667) vertex[7] = @nscale1 * (0.333333, -0.166667) vertex[8] = @nscale1 * (0.333333, -0.333333) vertex[9] = @nscale1 * (1., -0.333333) vertex[10] = @nscale1 * (1., 0.166667) vertex[11] = @nscale1 * (0.666667, 0.166667) vertex[12] = @nscale1 * (0.666667, -0.166667) vertex[13] = @nscale1 * (0.833333, -0.166667) vertex[14] = @nscale1 * (0.833333, 0.5) vertex[15] = @nscale1 * (0.333333, 0.5) vertex[16] = @nscale1 * (0.333333, 0.166667) vertex[17] = @nscale1 * (0.666667, 0.166667) vertex[18] = @nscale1 * (0.666667, 0.333333) vertex[19] = @nscale1 * (0., 0.333333) vertex[20] = @nscale1 * (0., -0.166667) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 176 ; "2,2,4,4,3;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.214286, 0.0714286) vertex[1] = @nscale1 * (0.0714286, 0.0714286) vertex[2] = @nscale1 * (0.0714286, 0.357143) vertex[3] = @nscale1 * (-0.5, 0.357143) vertex[4] = @nscale1 * (-0.5, -0.214286) vertex[5] = @nscale1 * (-0.0714286, -0.214286) vertex[6] = @nscale1 * (-0.0714286, 0.0714286) vertex[7] = @nscale1 * (-0.357143, 0.0714286) vertex[8] = @nscale1 * (-0.357143, -0.5) vertex[9] = @nscale1 * (0.214286, -0.5) vertex[10] = @nscale1 * (0.214286, -0.0714286) vertex[11] = @nscale1 * (-0.0714286, -0.0714286) vertex[12] = @nscale1 * (-0.0714286, -0.357143) vertex[13] = @nscale1 * (0.5, -0.357143) vertex[14] = @nscale1 * (0.5, 0.214286) vertex[15] = @nscale1 * (0.0714286, 0.214286) vertex[16] = @nscale1 * (0.0714286, -0.0714286) vertex[17] = @nscale1 * (0.357143, -0.0714286) vertex[18] = @nscale1 * (0.357143, 0.5) vertex[19] = @nscale1 * (-0.214286, 0.5) vertex[20] = @nscale1 * (-0.214286, 0.0714286) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 177 ; "2,3,5,3,2;1/2" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.5, -0.357143) vertex[1] = @nscale1 * (0.785714, -0.357143) vertex[2] = @nscale1 * (0.785714, 0.0714286) vertex[3] = @nscale1 * (0.0714286, 0.0714286) vertex[4] = @nscale1 * (0.0714286, -0.357143) vertex[5] = @nscale1 * (0.357143, -0.357143) vertex[6] = @nscale1 * (0.357143, -0.0714286) vertex[7] = @nscale1 * (-0.0714286, -0.0714286) vertex[8] = @nscale1 * (-0.0714286, -0.785714) vertex[9] = @nscale1 * (0.357143, -0.785714) vertex[10] = @nscale1 * (0.357143, -0.5) vertex[11] = @nscale1 * (0.0714286, -0.5) vertex[12] = @nscale1 * (0.0714286, -0.928571) vertex[13] = @nscale1 * (0.785714, -0.928571) vertex[14] = @nscale1 * (0.785714, -0.5) vertex[15] = @nscale1 * (0.5, -0.5) vertex[16] = @nscale1 * (0.5, -0.785714) vertex[17] = @nscale1 * (0.928571, -0.785714) vertex[18] = @nscale1 * (0.928571, -0.0714286) vertex[19] = @nscale1 * (0.5, -0.0714286) vertex[20] = @nscale1 * (0.5, -0.357143) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 178 ; "1,6,6,6;1/4,1/4,-5/6" cursality = 1 numbervertices = 37 ; n + cursality for closed curves cincrement = 37 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.166667, 0.2) vertex[1] = @nscale1 * (-0.133333, 0.2) vertex[2] = @nscale1 * (0.00808802, 0.341421) vertex[3] = @nscale1 * (0.00808802, 0.541421) vertex[4] = @nscale1 * (0.108088, 0.368216) vertex[5] = @nscale1 * (0.140286, 0.359589) vertex[6] = @nscale1 * (0.313491, 0.459589) vertex[7] = @nscale1 * (0.213491, 0.286384) vertex[8] = @nscale1 * (0.265254, 0.0931987) vertex[9] = @nscale1 * (0.294122, 0.0765321) vertex[10] = @nscale1 * (0.094122, 0.0765321) vertex[11] = @nscale1 * (-0.0472994, -0.0648893) vertex[12] = @nscale1 * (-0.0472994, -0.264889) vertex[13] = @nscale1 * (-0.0639661, -0.236022) vertex[14] = @nscale1 * (-0.257151, -0.184258) vertex[15] = @nscale1 * (-0.430356, -0.284258) vertex[16] = @nscale1 * (-0.330356, -0.111053) vertex[17] = @nscale1 * (-0.338984, -0.0788554) vertex[18] = @nscale1 * (-0.512189, 0.0211446) vertex[19] = @nscale1 * (-0.312189, 0.0211446) vertex[20] = @nscale1 * (-0.170767, 0.162566) vertex[21] = @nscale1 * (-0.170767, 0.195899) vertex[22] = @nscale1 * (-0.0707673, 0.0226942) vertex[23] = @nscale1 * (0.122418, -0.0290696) vertex[24] = @nscale1 * (0.295623, 0.0709304) vertex[25] = @nscale1 * (0.278956, 0.0420629) vertex[26] = @nscale1 * (0.33072, -0.151122) vertex[27] = @nscale1 * (0.503925, -0.251122) vertex[28] = @nscale1 * (0.303925, -0.251122) vertex[29] = @nscale1 * (0.280355, -0.274692) vertex[30] = @nscale1 * (0.280355, -0.474692) vertex[31] = @nscale1 * (0.180355, -0.301487) vertex[32] = @nscale1 * (-0.0128303, -0.249724) vertex[33] = @nscale1 * (-0.0416978, -0.26639) vertex[34] = @nscale1 * (0.0583022, -0.0931852) vertex[35] = @nscale1 * (0.00653841, 0.1) vertex[36] = @nscale1 * (-0.166667, 0.2) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 179 ; "1,6,6,1;3/4,-1/4,-1/6" cursality = 1 numbervertices = 37 ; n + cursality for closed curves cincrement = 37 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.235294, -0.470588) vertex[1] = @nscale1 * (-0.176471, -0.470588) vertex[2] = @nscale1 * (-0.426038, -0.221021) vertex[3] = @nscale1 * (-0.426038, 0.13192) vertex[4] = @nscale1 * (-0.484861, 0.0300347) vertex[5] = @nscale1 * (-0.428042, 0.0452593) vertex[6] = @nscale1 * (-0.122386, -0.131211) vertex[7] = @nscale1 * (-0.298857, 0.174445) vertex[8] = @nscale1 * (-0.329306, 0.0608065) vertex[9] = @nscale1 * (-0.380249, 0.0313947) vertex[10] = @nscale1 * (-0.0273074, 0.0313947) vertex[11] = @nscale1 * (-0.276875, 0.280962) vertex[12] = @nscale1 * (-0.276875, 0.398609) vertex[13] = @nscale1 * (-0.306286, 0.347666) vertex[14] = @nscale1 * (0.0346287, 0.439014) vertex[15] = @nscale1 * (0.340285, 0.262543) vertex[16] = @nscale1 * (0.281461, 0.364429) vertex[17] = @nscale1 * (0.266237, 0.30761) vertex[18] = @nscale1 * (-0.0394195, 0.131139) vertex[19] = @nscale1 * (0.313522, 0.131139) vertex[20] = @nscale1 * (0.230333, 0.214328) vertex[21] = @nscale1 * (0.230333, 0.273152) vertex[22] = @nscale1 * (0.0538621, -0.0325044) vertex[23] = @nscale1 * (0.394777, 0.0588435) vertex[24] = @nscale1 * (0.496662, 0.0000199788) vertex[25] = @nscale1 * (0.467251, 0.0509626) vertex[26] = @nscale1 * (0.375903, -0.289952) vertex[27] = @nscale1 * (0.0702468, -0.466423) vertex[28] = @nscale1 * (0.187894, -0.466423) vertex[29] = @nscale1 * (0.146299, -0.424828) vertex[30] = @nscale1 * (0.146299, -0.0718872) vertex[31] = @nscale1 * (-0.0301713, -0.377543) vertex[32] = @nscale1 * (0.083467, -0.347094) vertex[33] = @nscale1 * (0.13441, -0.376506) vertex[34] = @nscale1 * (-0.0420609, -0.0708497) vertex[35] = @nscale1 * (-0.133409, -0.411765) vertex[36] = @nscale1 * (-0.235294, -0.470588) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 180 ; "1,2,1,3;-4/5" cursality = 1 numbervertices = 21 ; n + cursality for closed curves cincrement = 21 ; numbervertices/cursality scratchfloat = 1/3 ; initialize arrays vertex[0] = @nscale1 * (-0.8, 1.5) * scratchfloat vertex[1] = @nscale1 * (0.2, 1.5) * scratchfloat vertex[2] = @nscale1 * (-1.41803, 0.324429) * scratchfloat vertex[3] = @nscale1 * (-1.10902, 1.27549) * scratchfloat vertex[4] = @nscale1 * (-0.181966, -1.57768) * scratchfloat vertex[5] = @nscale1 * (-0.990983, -0.989898) * scratchfloat vertex[6] = @nscale1 * (1.00902, -0.989898) * scratchfloat vertex[7] = @nscale1 * (0.2, -1.57768) * scratchfloat vertex[8] = @nscale1 * (1.12705, 1.27549) * scratchfloat vertex[9] = @nscale1 * (1.43607, 0.324429) * scratchfloat vertex[10] = @nscale1 * (-0.181966, 1.5) * scratchfloat vertex[11] = @nscale1 * (0.818034, 1.5) * scratchfloat vertex[12] = @nscale1 * (-1.60902, -0.263356) * scratchfloat vertex[13] = @nscale1 * (-1.3, 0.687701) * scratchfloat vertex[14] = @nscale1 * (-0.681966, -1.21441) * scratchfloat vertex[15] = @nscale1 * (-1.49098, -0.626627) * scratchfloat vertex[16] = @nscale1 * (1.50902, -0.626627) * scratchfloat vertex[17] = @nscale1 * (0.7, -1.21441) * scratchfloat vertex[18] = @nscale1 * (1.31803, 0.687701) * scratchfloat vertex[19] = @nscale1 * (1.62705, -0.263356) * scratchfloat vertex[20] = @nscale1 * (-0.8, 1.5) * scratchfloat glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 181 ; "1,2,1,3;-4/5,-4/5,0" cursality = 1 numbervertices = 61 ; n + cursality for closed curves cincrement = 61 ; numbervertices/cursality scratchfloat = 1/6 ; initialize arrays vertex[0] = @nscale1 * (0.0, 0.1) * scratchfloat vertex[1] = @nscale1 * (1, 0.1) * scratchfloat vertex[2] = @nscale1 * (-0.618034, -1.07557) * scratchfloat vertex[3] = @nscale1 * (-0.309017, -0.124514) * scratchfloat vertex[4] = @nscale1 * (0.618034, 2.72866) * scratchfloat vertex[5] = @nscale1 * (0.927051, 1.7776) * scratchfloat vertex[6] = @nscale1 * (-0.690983, 2.95317) * scratchfloat vertex[7] = @nscale1 * (-1.5, 3.54095) * scratchfloat vertex[8] = @nscale1 * (1.5, 3.54095) * scratchfloat vertex[9] = @nscale1 * (0.690983, 2.95317) * scratchfloat vertex[10] = @nscale1 * (-0.927051, 1.7776) * scratchfloat vertex[11] = @nscale1 * (-0.618034, 2.72866) * scratchfloat vertex[12] = @nscale1 * (0.309017, -0.124514) * scratchfloat vertex[13] = @nscale1 * (0.618034, -1.07557) * scratchfloat vertex[14] = @nscale1 * (-1., 0.1) * scratchfloat vertex[15] = @nscale1 * (0., 0.1) * scratchfloat vertex[16] = @nscale1 * (3., 0.1) * scratchfloat vertex[17] = @nscale1 * (2.19098, -0.487785) * scratchfloat vertex[18] = @nscale1 * (2.80902, 1.41433) * scratchfloat vertex[19] = @nscale1 * (3.11803, 2.36538) * scratchfloat vertex[20] = @nscale1 * (4.04508, -0.487785) * scratchfloat vertex[21] = @nscale1 * (3.23607, 0.1) * scratchfloat vertex[22] = @nscale1 * (1.61803, 1.27557) * scratchfloat vertex[23] = @nscale1 * (2.61803, 1.27557) * scratchfloat vertex[24] = @nscale1 * (0.190983, -0.487785) * scratchfloat vertex[25] = @nscale1 * (-0.618034, -1.07557) * scratchfloat vertex[26] = @nscale1 * (0., 0.826543) * scratchfloat vertex[27] = @nscale1 * (0.309017, -0.124514) * scratchfloat vertex[28] = @nscale1 * (1.23607, -2.97768) * scratchfloat vertex[29] = @nscale1 * (0.427051, -2.3899) * scratchfloat vertex[30] = @nscale1 * (2.42705, -2.3899) * scratchfloat vertex[31] = @nscale1 * (3.42705, -2.3899) * scratchfloat vertex[32] = @nscale1 * (1., -4.15325) * scratchfloat vertex[33] = @nscale1 * (1.30902, -3.2022) * scratchfloat vertex[34] = @nscale1 * (1.92705, -1.30008) * scratchfloat vertex[35] = @nscale1 * (2.23607, -2.25114) * scratchfloat vertex[36] = @nscale1 * (-0.190983, -0.487785) * scratchfloat vertex[37] = @nscale1 * (-1., 0.1) * scratchfloat vertex[38] = @nscale1 * (1., 0.1) * scratchfloat vertex[39] = @nscale1 * (0.190983, -0.487785) * scratchfloat vertex[40] = @nscale1 * (-2.23607, -2.25114) * scratchfloat vertex[41] = @nscale1 * (-1.92705, -1.30008) * scratchfloat vertex[42] = @nscale1 * (-1.30902, -3.2022) * scratchfloat vertex[43] = @nscale1 * (-1., -4.15325) * scratchfloat vertex[44] = @nscale1 * (-3.42705, -2.3899) * scratchfloat vertex[45] = @nscale1 * (-2.42705, -2.3899) * scratchfloat vertex[46] = @nscale1 * (-0.427051, -2.3899) * scratchfloat vertex[47] = @nscale1 * (-1.23607, -2.97768) * scratchfloat vertex[48] = @nscale1 * (-0.309017, -0.124514) * scratchfloat vertex[49] = @nscale1 * (0, 0.826543) * scratchfloat vertex[50] = @nscale1 * (0.618034, -1.07557) * scratchfloat vertex[51] = @nscale1 * (-0.190983, -0.487785) * scratchfloat vertex[52] = @nscale1 * (-2.61803, 1.27557) * scratchfloat vertex[53] = @nscale1 * (-1.61803, 1.27557) * scratchfloat vertex[54] = @nscale1 * (-3.23607, 0.1) * scratchfloat vertex[55] = @nscale1 * (-4.04508, -0.487785) * scratchfloat vertex[56] = @nscale1 * (-3.11803, 2.36538) * scratchfloat vertex[57] = @nscale1 * (-2.80902, 1.41433) * scratchfloat vertex[58] = @nscale1 * (-2.19098, -0.487785) * scratchfloat vertex[59] = @nscale1 * (-3., 0.1) * scratchfloat vertex[60] = @nscale1 * (0,0.1) * scratchfloat glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 182 ; "1,2,1,3;-4/5,-1/5,-4/5" cursality = 1 numbervertices = 61 ; n + cursality for closed curves cincrement = 61 ; numbervertices/cursality scratchfloat = 0.2 ; initialize arrays vertex[0] = @nscale1 * (-1.5, 2.6) * scratchfloat vertex[1] = @nscale1 * (-0.5, 2.6) * scratchfloat vertex[2] = @nscale1 * (-2.11803, 1.42443) * scratchfloat vertex[3] = @nscale1 * (-3.11803, 1.42443) * scratchfloat vertex[4] = @nscale1 * (-0.690983, 3.18779) * scratchfloat vertex[5] = @nscale1 * (-1., 2.23673) * scratchfloat vertex[6] = @nscale1 * (-2.61803, 1.06116) * scratchfloat vertex[7] = @nscale1 * (-2.30902, 2.01221) * scratchfloat vertex[8] = @nscale1 * (-1.38197, -0.840955) * scratchfloat vertex[9] = @nscale1 * (-1.69098, -1.79201) * scratchfloat vertex[10] = @nscale1 * (-2.30902, 0.110102) * scratchfloat vertex[11] = @nscale1 * (-1.5, -0.477684) * scratchfloat vertex[12] = @nscale1 * (-0.572949, -3.33085) * scratchfloat vertex[13] = @nscale1 * (-1.38197, -2.74307) * scratchfloat vertex[14] = @nscale1 * (0.618034, -2.74307) * scratchfloat vertex[15] = @nscale1 * (1.42705, -3.33085) * scratchfloat vertex[16] = @nscale1 * (-1.57295, -3.33085) * scratchfloat vertex[17] = @nscale1 * (-0.763932, -2.74307) * scratchfloat vertex[18] = @nscale1 * (1.23607, -2.74307) * scratchfloat vertex[19] = @nscale1 * (0.427051, -3.33085) * scratchfloat vertex[20] = @nscale1 * (1.3541, -0.477684) * scratchfloat vertex[21] = @nscale1 * (2.16312, 0.110102) * scratchfloat vertex[22] = @nscale1 * (1.54508, -1.79201) * scratchfloat vertex[23] = @nscale1 * (1.23607, -0.840955) * scratchfloat vertex[24] = @nscale1 * (2.16312, 2.01221) * scratchfloat vertex[25] = @nscale1 * (2.47214, 1.06116) * scratchfloat vertex[26] = @nscale1 * (0.854102, 2.23673) * scratchfloat vertex[27] = @nscale1 * (0.545085, 3.18779) * scratchfloat vertex[28] = @nscale1 * (2.97214, 1.42443) * scratchfloat vertex[29] = @nscale1 * (1.97214, 1.42443) * scratchfloat vertex[30] = @nscale1 * (0.354102, 2.6) * scratchfloat vertex[31] = @nscale1 * (1.3541, 2.6) * scratchfloat vertex[32] = @nscale1 * (-1.07295, 0.836644) * scratchfloat vertex[33] = @nscale1 * (-2.07295, 0.836644) * scratchfloat vertex[34] = @nscale1 * (-0.454915, 2.01221) * scratchfloat vertex[35] = @nscale1 * (-0.763932, 1.06116) * scratchfloat vertex[36] = @nscale1 * (-3.19098, -0.702198) * scratchfloat vertex[37] = @nscale1 * (-2.88197, 0.248859) * scratchfloat vertex[38] = @nscale1 * (-2.26393, -1.65325) * scratchfloat vertex[39] = @nscale1 * (-2.57295, -2.60431) * scratchfloat vertex[40] = @nscale1 * (-3.5, 0.248859) * scratchfloat vertex[41] = @nscale1 * (-2.69098, -0.338926) * scratchfloat vertex[42] = @nscale1 * (-2.07295, -2.24104) * scratchfloat vertex[43] = @nscale1 * (-2.88197, -1.65325) * scratchfloat vertex[44] = @nscale1 * (0.118034, -1.65325) * scratchfloat vertex[45] = @nscale1 * (0.927051, -2.24104) * scratchfloat vertex[46] = @nscale1 * (-1.07295, -2.24104) * scratchfloat vertex[47] = @nscale1 * (-0.263932, -1.65325) * scratchfloat vertex[48] = @nscale1 * (2.73607, -1.65325) * scratchfloat vertex[49] = @nscale1 * (1.92705, -2.24104) * scratchfloat vertex[50] = @nscale1 * (2.54508, -0.338926) * scratchfloat vertex[51] = @nscale1 * (3.3541, 0.248859) * scratchfloat vertex[52] = @nscale1 * (2.42705, -2.60431) * scratchfloat vertex[53] = @nscale1 * (2.11803, -1.65325) * scratchfloat vertex[54] = @nscale1 * (2.73607, 0.248859) * scratchfloat vertex[55] = @nscale1 * (3.04508, -0.702198) * scratchfloat vertex[56] = @nscale1 * (0.618034, 1.06116) * scratchfloat vertex[57] = @nscale1 * (0.309017, 2.01221) * scratchfloat vertex[58] = @nscale1 * (1.92705, 0.836644) * scratchfloat vertex[59] = @nscale1 * (0.927051, 0.836644) * scratchfloat vertex[60] = @nscale1 * (-1.5, 2.6) * scratchfloat glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 183 ; "1,3;1/5,3/5,-1/5" cursality = 1 numbervertices = 31 ; n + cursality for closed curves cincrement = 31 ; numbervertices/cursality scratchfloat = 0.2 ; initialize arrays vertex[0] = @nscale1 * (-0.5, -1.75) * scratchfloat vertex[1] = @nscale1 * (0.5, -1.75) * scratchfloat vertex[2] = @nscale1 * (2.92705, 0.0133558) * scratchfloat vertex[3] = @nscale1 * (2.11803, 0.601141) * scratchfloat vertex[4] = @nscale1 * (1.19098, 3.45431) * scratchfloat vertex[5] = @nscale1 * (0.381966, 4.0421) * scratchfloat vertex[6] = @nscale1 * (-0.545085, 1.18893) * scratchfloat vertex[7] = @nscale1 * (-1.3541, 0.601141) * scratchfloat vertex[8] = @nscale1 * (-2.28115, -2.25203) * scratchfloat vertex[9] = @nscale1 * (-1.28115, -2.25203) * scratchfloat vertex[10] = @nscale1 * (1.1459, -4.01538) * scratchfloat vertex[11] = @nscale1 * (2.1459, -4.01538) * scratchfloat vertex[12] = @nscale1 * (1.21885, -1.16221) * scratchfloat vertex[13] = @nscale1 * (1.52786, -0.211158) * scratchfloat vertex[14] = @nscale1 * (0.600813, 2.64201) * scratchfloat vertex[15] = @nscale1 * (-0.208204, 2.05423) * scratchfloat vertex[16] = @nscale1 * (-3.2082, 2.05423) * scratchfloat vertex[17] = @nscale1 * (-4.01722, 1.46644) * scratchfloat vertex[18] = @nscale1 * (-1.59017, -0.296915) * scratchfloat vertex[19] = @nscale1 * (-1.28115, -1.24797) * scratchfloat vertex[20] = @nscale1 * (1.1459, -3.01133) * scratchfloat vertex[21] = @nscale1 * (1.45492, -2.06027) * scratchfloat vertex[22] = @nscale1 * (3.88197, -0.296915) * scratchfloat vertex[23] = @nscale1 * (4.19098, 0.654142) * scratchfloat vertex[24] = @nscale1 * (1.19098, 0.654142) * scratchfloat vertex[25] = @nscale1 * (0.381966, 1.24193) * scratchfloat vertex[26] = @nscale1 * (-2.61803, 1.24193) * scratchfloat vertex[27] = @nscale1 * (-2.30902, 0.29087) * scratchfloat vertex[28] = @nscale1 * (-3.23607, -2.5623) * scratchfloat vertex[29] = @nscale1 * (-2.92705, -3.51336) * scratchfloat vertex[30] = @nscale1 * (-0.5, -1.75) * scratchfloat glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 184 ; "1,2,3,3,2,1;5/6,1/6,1/6" cursality = 1 numbervertices = 37 ; n + cursality for closed curves cincrement = 37 ; numbervertices/cursality ; initialize arrays scratchfloat = 2/3 vertex[0] = @nscale1 * (0.333333, 0.638889) * scratchfloat vertex[1] = @nscale1 * (0.555556, 0.638889) * scratchfloat vertex[2] = @nscale1 * (0.170655, 0.861111) * scratchfloat vertex[3] = @nscale1 * (-0.496011, 0.861111) * scratchfloat vertex[4] = @nscale1 * (-1.07336, 0.527778) * scratchfloat vertex[5] = @nscale1 * (-0.628917, 0.527778) * scratchfloat vertex[6] = @nscale1 * (-0.436467, 0.638889) * scratchfloat vertex[7] = @nscale1 * (-0.325356, 0.831339) * scratchfloat vertex[8] = @nscale1 * (-0.710256, 0.609117) * scratchfloat vertex[9] = @nscale1 * (-1.04359, 0.0317665) * scratchfloat vertex[10] = @nscale1 * (-1.04359, -0.6349) * scratchfloat vertex[11] = @nscale1 * (-0.821367, -0.25) * scratchfloat vertex[12] = @nscale1 * (-0.821367, -0.0277778) * scratchfloat vertex[13] = @nscale1 * (-0.932478, 0.164672) * scratchfloat vertex[14] = @nscale1 * (-0.932478, -0.279772) * scratchfloat vertex[15] = @nscale1 * (-0.599145, -0.857122) * scratchfloat vertex[16] = @nscale1 * (-0.0217947, -1.19046) * scratchfloat vertex[17] = @nscale1 * (-0.244017, -0.805556) * scratchfloat vertex[18] = @nscale1 * (-0.436467, -0.694444) * scratchfloat vertex[19] = @nscale1 * (-0.658689, -0.694444) * scratchfloat vertex[20] = @nscale1 * (-0.273789, -0.916667) * scratchfloat vertex[21] = @nscale1 * (0.392878, -0.916667) * scratchfloat vertex[22] = @nscale1 * (0.970228, -0.583333) * scratchfloat vertex[23] = @nscale1 * (0.525783, -0.583333) * scratchfloat vertex[24] = @nscale1 * (0.333333, -0.694444) * scratchfloat vertex[25] = @nscale1 * (0.222222, -0.886895) * scratchfloat vertex[26] = @nscale1 * (0.607122, -0.664672) * scratchfloat vertex[27] = @nscale1 * (0.940456, -0.087322) * scratchfloat vertex[28] = @nscale1 * (0.940456, 0.579345) * scratchfloat vertex[29] = @nscale1 * (0.718234, 0.194444) * scratchfloat vertex[30] = @nscale1 * (0.718234, -0.0277778) * scratchfloat vertex[31] = @nscale1 * (0.829345, -0.220228) * scratchfloat vertex[32] = @nscale1 * (0.829345, 0.224217) * scratchfloat vertex[33] = @nscale1 * (0.496011, 0.801567) * scratchfloat vertex[34] = @nscale1 * (-0.081339, 1.1349) * scratchfloat vertex[35] = @nscale1 * (0.140883, 0.75) * scratchfloat vertex[36] = @nscale1 * (0.333333, 0.638889) * scratchfloat glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 185 ; "1,1,3,1;-5/6,-1/6,3/7" cursality = 1 numbervertices = 85 ; n + cursality for closed curves cincrement = 85 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.625, -0.625) vertex[1] = @nscale1 * (0.791667, -0.625) vertex[2] = @nscale1 * (0.647329, -0.708333) vertex[3] = @nscale1 * (0.147329, -0.708333) vertex[4] = @nscale1 * (0.110242, -0.870821) vertex[5] = @nscale1 * (0.0611164, -0.711559) vertex[6] = @nscale1 * (0.0982032, -0.549071) vertex[7] = @nscale1 * (-0.352281, -0.332129) vertex[8] = @nscale1 * (-0.186081, -0.319674) vertex[9] = @nscale1 * (-0.0359191, -0.391988) vertex[10] = @nscale1 * (0.0679959, -0.261683) vertex[11] = @nscale1 * (-0.00652525, -0.756098) vertex[12] = @nscale1 * (-0.11044, -0.886404) vertex[13] = @nscale1 * (-0.00652525, -1.01671) vertex[14] = @nscale1 * (-0.161671, -0.955819) vertex[15] = @nscale1 * (-0.473416, -0.564903) vertex[16] = @nscale1 * (-0.623577, -0.637217) vertex[17] = @nscale1 * (-0.529691, -0.499511) vertex[18] = @nscale1 * (-0.379529, -0.427197) vertex[19] = @nscale1 * (-0.49079, 0.0602674) vertex[20] = @nscale1 * (-0.377427, -0.0619079) vertex[21] = @nscale1 * (-0.340341, -0.224396) vertex[22] = @nscale1 * (-0.173674, -0.224396) vertex[23] = @nscale1 * (-0.606687, -0.474396) vertex[24] = @nscale1 * (-0.773353, -0.474396) vertex[25] = @nscale1 * (-0.81044, -0.636884) vertex[26] = @nscale1 * (-0.859566, -0.477622) vertex[27] = @nscale1 * (-0.748306, 0.00984221) vertex[28] = @nscale1 * (-0.898467, 0.0821562) vertex[29] = @nscale1 * (-0.732266, 0.0946112) vertex[30] = @nscale1 * (-0.582105, 0.0222972) vertex[31] = @nscale1 * (-0.27036, 0.413213) vertex[32] = @nscale1 * (-0.2952, 0.248408) vertex[33] = @nscale1 * (-0.399115, 0.118103) vertex[34] = @nscale1 * (-0.2952, -0.0122027) vertex[35] = @nscale1 * (-0.760637, 0.170468) vertex[36] = @nscale1 * (-0.864552, 0.300773) vertex[37] = @nscale1 * (-1.01471, 0.228459) vertex[38] = @nscale1 * (-0.920827, 0.366166) vertex[39] = @nscale1 * (-0.470343, 0.583107) vertex[40] = @nscale1 * (-0.507429, 0.745595) vertex[41] = @nscale1 * (-0.394067, 0.62342) vertex[42] = @nscale1 * (-0.35698, 0.460932) vertex[43] = @nscale1 * (0.14302, 0.460932) vertex[44] = @nscale1 * (-0.00131804, 0.377599) vertex[45] = @nscale1 * (-0.167985, 0.377599) vertex[46] = @nscale1 * (-0.205072, 0.215111) vertex[47] = @nscale1 * (-0.352449, 0.692897) vertex[48] = @nscale1 * (-0.315362, 0.855385) vertex[49] = @nscale1 * (-0.465524, 0.927699) vertex[50] = @nscale1 * (-0.299323, 0.940154) vertex[51] = @nscale1 * (0.151161, 0.723212) vertex[52] = @nscale1 * (0.255076, 0.853518) vertex[53] = @nscale1 * (0.230236, 0.688712) vertex[54] = @nscale1 * (0.126321, 0.558407) vertex[55] = @nscale1 * (0.438066, 0.167491) vertex[56] = @nscale1 * (0.28292, 0.228382) vertex[57] = @nscale1 * (0.179005, 0.358687) vertex[58] = @nscale1 * (0.0288437, 0.286373) vertex[59] = @nscale1 * (0.310504, 0.699492) vertex[60] = @nscale1 * (0.460665, 0.771806) vertex[61] = @nscale1 * (0.423578, 0.934294) vertex[62] = @nscale1 * (0.536941, 0.812119) vertex[63] = @nscale1 * (0.648201, 0.324655) vertex[64] = @nscale1 * (0.814868, 0.324655) vertex[65] = @nscale1 * (0.67053, 0.241322) vertex[66] = @nscale1 * (0.503863, 0.241322) vertex[67] = @nscale1 * (0.392603, -0.246142) vertex[68] = @nscale1 * (0.343477, -0.0868802) vertex[69] = @nscale1 * (0.380564, 0.0756078) vertex[70] = @nscale1 * (0.230402, 0.147922) vertex[71] = @nscale1 * (0.729004, 0.185287) vertex[72] = @nscale1 * (0.879166, 0.112973) vertex[73] = @nscale1 * (0.983081, 0.243278) vertex[74] = @nscale1 * (0.95824, 0.078473) vertex[75] = @nscale1 * (0.646496, -0.312443) vertex[76] = @nscale1 * (0.750411, -0.442748) vertex[77] = @nscale1 * (0.595265, -0.381858) vertex[78] = @nscale1 * (0.49135, -0.251553) vertex[79] = @nscale1 * (0.0408655, -0.468494) vertex[80] = @nscale1 * (0.134752, -0.330788) vertex[81] = @nscale1 * (0.284914, -0.258474) vertex[82] = @nscale1 * (0.247827, -0.0959861) vertex[83] = @nscale1 * (0.587913, -0.462512) vertex[84] = @nscale1 * (0.625, -0.625) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 186 ; "1,1,3,1;-1/6,1/6,-3/7" cursality = 1 numbervertices = 85 ; n + cursality for closed curves cincrement = 85 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0., 0.183333) vertex[1] = @nscale1 * (0.133333, 0.183333) vertex[2] = @nscale1 * (0.248803, 0.116667) vertex[3] = @nscale1 * (0.648803, 0.116667) vertex[4] = @nscale1 * (0.678473, -0.0133237) vertex[5] = @nscale1 * (0.639172, -0.140733) vertex[6] = @nscale1 * (0.668842, -0.270724) vertex[7] = @nscale1 * (0.308454, -0.444277) vertex[8] = @nscale1 * (0.175494, -0.434313) vertex[9] = @nscale1 * (0.0553644, -0.492164) vertex[10] = @nscale1 * (-0.0277676, -0.38792) vertex[11] = @nscale1 * (-0.0873845, 0.00761206) vertex[12] = @nscale1 * (-0.170516, 0.111856) vertex[13] = @nscale1 * (-0.0873845, 0.2161) vertex[14] = @nscale1 * (0.036732, 0.264813) vertex[15] = @nscale1 * (0.286128, 0.577545) vertex[16] = @nscale1 * (0.406257, 0.519694) vertex[17] = @nscale1 * (0.481366, 0.409529) vertex[18] = @nscale1 * (0.601496, 0.351678) vertex[19] = @nscale1 * (0.512487, -0.0382935) vertex[20] = @nscale1 * (0.421798, -0.136034) vertex[21] = @nscale1 * (0.392128, -0.266024) vertex[22] = @nscale1 * (0.258795, -0.266024) vertex[23] = @nscale1 * (-0.0876154, -0.0660241) vertex[24] = @nscale1 * (-0.220949, -0.0660241) vertex[25] = @nscale1 * (-0.250618, 0.0639663) vertex[26] = @nscale1 * (-0.211318, 0.191376) vertex[27] = @nscale1 * (-0.300326, 0.581347) vertex[28] = @nscale1 * (-0.180197, 0.639198) vertex[29] = @nscale1 * (-0.0472362, 0.629234) vertex[30] = @nscale1 * (0.072893, 0.687085) vertex[31] = @nscale1 * (0.322289, 0.374353) vertex[32] = @nscale1 * (0.342161, 0.242509) vertex[33] = @nscale1 * (0.425293, 0.138265) vertex[34] = @nscale1 * (0.342161, 0.0340204) vertex[35] = @nscale1 * (-0.0301883, -0.112116) vertex[36] = @nscale1 * (-0.11332, -0.21636) vertex[37] = @nscale1 * (-0.233449, -0.158509) vertex[38] = @nscale1 * (-0.308559, -0.0483439) vertex[39] = @nscale1 * (-0.668946, 0.12521) vertex[40] = @nscale1 * (-0.639277, 0.2552) vertex[41] = @nscale1 * (-0.548587, 0.35294) vertex[42] = @nscale1 * (-0.518918, 0.482931) vertex[43] = @nscale1 * (-0.118918, 0.482931) vertex[44] = @nscale1 * (-0.00344766, 0.416264) vertex[45] = @nscale1 * (0.129886, 0.416264) vertex[46] = @nscale1 * (0.159555, 0.286274) vertex[47] = @nscale1 * (0.0416531, -0.0959556) vertex[48] = @nscale1 * (0.0713225, -0.225946) vertex[49] = @nscale1 * (-0.0488067, -0.283797) vertex[50] = @nscale1 * (-0.181767, -0.273833) vertex[51] = @nscale1 * (-0.542155, -0.447387) vertex[52] = @nscale1 * (-0.625287, -0.343142) vertex[53] = @nscale1 * (-0.645159, -0.211298) vertex[54] = @nscale1 * (-0.728291, -0.107054) vertex[55] = @nscale1 * (-0.478895, 0.205678) vertex[56] = @nscale1 * (-0.354779, 0.254391) vertex[57] = @nscale1 * (-0.271647, 0.358635) vertex[58] = @nscale1 * (-0.151517, 0.300784) vertex[59] = @nscale1 * (0.0738106, -0.0297118) vertex[60] = @nscale1 * (0.19394, -0.087563) vertex[61] = @nscale1 * (0.16427, -0.217553) vertex[62] = @nscale1 * (0.0735807, -0.315294) vertex[63] = @nscale1 * (-0.0154277, -0.705265) vertex[64] = @nscale1 * (-0.148761, -0.705265) vertex[65] = @nscale1 * (-0.264231, -0.638598) vertex[66] = @nscale1 * (-0.397564, -0.638598) vertex[67] = @nscale1 * (-0.486573, -0.248627) vertex[68] = @nscale1 * (-0.447272, -0.121217) vertex[69] = @nscale1 * (-0.476942, 0.00877312) vertex[70] = @nscale1 * (-0.356812, 0.0666243) vertex[71] = @nscale1 * (0.0420691, 0.0367322) vertex[72] = @nscale1 * (0.162198, 0.0945834) vertex[73] = @nscale1 * (0.24533, -0.00966079) vertex[74] = @nscale1 * (0.265203, -0.141505) vertex[75] = @nscale1 * (0.514599, -0.454237) vertex[76] = @nscale1 * (0.431467, -0.558482) vertex[77] = @nscale1 * (0.30735, -0.607194) vertex[78] = @nscale1 * (0.224218, -0.711438) vertex[79] = @nscale1 * (-0.136169, -0.537885) vertex[80] = @nscale1 * (-0.211279, -0.427719) vertex[81] = @nscale1 * (-0.331408, -0.369868) vertex[82] = @nscale1 * (-0.301739, -0.239878) vertex[83] = @nscale1 * (-0.0296695, 0.0533429) vertex[84] = @nscale1 * (0., 0.183333) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 187 ; "1,1,3,1;5/6,1/6,4/7" cursality = 1 numbervertices = 85 ; n + cursality for closed curves cincrement = 85 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (-0.15625, 0.46875) vertex[1] = @nscale1 * (-0.03125, 0.46875) vertex[2] = @nscale1 * (-0.139503, 0.53125) vertex[3] = @nscale1 * (-0.514503, 0.53125) vertex[4] = @nscale1 * (-0.486688, 0.409384) vertex[5] = @nscale1 * (-0.449844, 0.528831) vertex[6] = @nscale1 * (-0.477659, 0.650697) vertex[7] = @nscale1 * (-0.815522, 0.48799) vertex[8] = @nscale1 * (-0.690872, 0.478649) vertex[9] = @nscale1 * (-0.578251, 0.532884) vertex[10] = @nscale1 * (-0.656187, 0.630613) vertex[11] = @nscale1 * (-0.600296, 0.259802) vertex[12] = @nscale1 * (-0.52236, 0.162073) vertex[13] = @nscale1 * (-0.444423, 0.259802) vertex[14] = @nscale1 * (-0.560783, 0.214134) vertex[15] = @nscale1 * (-0.794591, -0.0790527) vertex[16] = @nscale1 * (-0.68197, -0.133288) vertex[17] = @nscale1 * (-0.752385, -0.0300083) vertex[18] = @nscale1 * (-0.865006, 0.0242272) vertex[19] = @nscale1 * (-0.948452, -0.341371) vertex[20] = @nscale1 * (-0.86343, -0.249739) vertex[21] = @nscale1 * (-0.835615, -0.127873) vertex[22] = @nscale1 * (-0.960615, -0.127873) vertex[23] = @nscale1 * (-0.635855, -0.315373) vertex[24] = @nscale1 * (-0.510855, -0.315373) vertex[25] = @nscale1 * (-0.538671, -0.193507) vertex[26] = @nscale1 * (-0.575515, -0.312954) vertex[27] = @nscale1 * (-0.49207, -0.678552) vertex[28] = @nscale1 * (-0.379449, -0.624316) vertex[29] = @nscale1 * (-0.504099, -0.614975) vertex[30] = @nscale1 * (-0.61672, -0.669211) vertex[31] = @nscale1 * (-0.382911, -0.962397) vertex[32] = @nscale1 * (-0.401542, -0.838794) vertex[33] = @nscale1 * (-0.479478, -0.741065) vertex[34] = @nscale1 * (-0.557414, -0.838794) vertex[35] = @nscale1 * (-0.208337, -0.701791) vertex[36] = @nscale1 * (-0.1304, -0.604062) vertex[37] = @nscale1 * (-0.243021, -0.549826) vertex[38] = @nscale1 * (-0.172606, -0.653106) vertex[39] = @nscale1 * (0.165257, -0.815813) vertex[40] = @nscale1 * (0.193072, -0.693947) vertex[41] = @nscale1 * (0.10805, -0.785578) vertex[42] = @nscale1 * (0.0802354, -0.907444) vertex[43] = @nscale1 * (0.455235, -0.907444) vertex[44] = @nscale1 * (0.346982, -0.844944) vertex[45] = @nscale1 * (0.221982, -0.844944) vertex[46] = @nscale1 * (0.249797, -0.96681) vertex[47] = @nscale1 * (0.36033, -0.60847) vertex[48] = @nscale1 * (0.332515, -0.486604) vertex[49] = @nscale1 * (0.219894, -0.54084) vertex[50] = @nscale1 * (0.344545, -0.550181) vertex[51] = @nscale1 * (0.682408, -0.387475) vertex[52] = @nscale1 * (0.604472, -0.289746) vertex[53] = @nscale1 * (0.623102, -0.413349) vertex[54] = @nscale1 * (0.701038, -0.511078) vertex[55] = @nscale1 * (0.934847, -0.217892) vertex[56] = @nscale1 * (0.818488, -0.263559) vertex[57] = @nscale1 * (0.740552, -0.361288) vertex[58] = @nscale1 * (0.853173, -0.415524) vertex[59] = @nscale1 * (0.641928, -0.105684) vertex[60] = @nscale1 * (0.529307, -0.0514486) vertex[61] = @nscale1 * (0.501491, -0.173315) vertex[62] = @nscale1 * (0.586513, -0.0816831) vertex[63] = @nscale1 * (0.669958, 0.283915) vertex[64] = @nscale1 * (0.544958, 0.283915) vertex[65] = @nscale1 * (0.653212, 0.221415) vertex[66] = @nscale1 * (0.778212, 0.221415) vertex[67] = @nscale1 * (0.694766, 0.587013) vertex[68] = @nscale1 * (0.657922, 0.467566) vertex[69] = @nscale1 * (0.685737, 0.3457) vertex[70] = @nscale1 * (0.798358, 0.399936) vertex[71] = @nscale1 * (0.424407, 0.427959) vertex[72] = @nscale1 * (0.311786, 0.373724) vertex[73] = @nscale1 * (0.389722, 0.275995) vertex[74] = @nscale1 * (0.371091, 0.399599) vertex[75] = @nscale1 * (0.137283, 0.692786) vertex[76] = @nscale1 * (0.0593465, 0.595057) vertex[77] = @nscale1 * (0.175706, 0.640724) vertex[78] = @nscale1 * (0.253642, 0.738453) vertex[79] = @nscale1 * (-0.0842213, 0.90116) vertex[80] = @nscale1 * (-0.0138063, 0.79788) vertex[81] = @nscale1 * (0.0988148, 0.743644) vertex[82] = @nscale1 * (0.12663, 0.86551) vertex[83] = @nscale1 * (-0.128435, 0.590616) vertex[84] = @nscale1 * (-0.15625, 0.46875) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 188 ; "1,3,1,4,2;-1/2,1/6" cursality = 1 numbervertices = 73 ; n + cursality for closed curves cincrement = 73 ; numbervertices/cursality ; initialize arrays vertex[0] = @nscale1 * (0.290323, 0.870968) vertex[1] = @nscale1 * (0.419355, 0.870968) vertex[2] = @nscale1 * (0.419355, 0.483871) vertex[3] = @nscale1 * (0.483871, 0.372126) vertex[4] = @nscale1 * (0.0368901, 0.114061) vertex[5] = @nscale1 * (-0.0921421, -0.109429) vertex[6] = @nscale1 * (-0.203887, -0.0449131) vertex[7] = @nscale1 * (-0.590984, -0.0449131) vertex[8] = @nscale1 * (-0.590984, 0.0841192) vertex[9] = @nscale1 * (-0.849049, 0.5311) vertex[10] = @nscale1 * (-0.625558, 0.660132) vertex[11] = @nscale1 * (-0.561042, 0.771878) vertex[12] = @nscale1 * (-0.225806, 0.578329) vertex[13] = @nscale1 * (-0.0967742, 0.578329) vertex[14] = @nscale1 * (-0.0967742, 0.0622001) vertex[15] = @nscale1 * (0.0322581, -0.16129) vertex[16] = @nscale1 * (-0.0794871, -0.225806) vertex[17] = @nscale1 * (-0.273036, -0.561042) vertex[18] = @nscale1 * (-0.384781, -0.496526) vertex[19] = @nscale1 * (-0.90091, -0.496526) vertex[20] = @nscale1 * (-0.90091, -0.238461) vertex[21] = @nscale1 * (-0.965426, -0.126716) vertex[22] = @nscale1 * (-0.63019, 0.0668322) vertex[23] = @nscale1 * (-0.565674, 0.178577) vertex[24] = @nscale1 * (-0.118693, -0.0794871) vertex[25] = @nscale1 * (0.139371, -0.0794871) vertex[26] = @nscale1 * (0.139371, -0.208519) vertex[27] = @nscale1 * (0.33292, -0.543755) vertex[28] = @nscale1 * (0.221174, -0.608271) vertex[29] = @nscale1 * (-0.0368901, -1.05525) vertex[30] = @nscale1 * (-0.260381, -0.92622) vertex[31] = @nscale1 * (-0.389413, -0.92622) vertex[32] = @nscale1 * (-0.389413, -0.539123) vertex[33] = @nscale1 * (-0.453929, -0.427378) vertex[34] = @nscale1 * (-0.00694807, -0.169313) vertex[35] = @nscale1 * (0.122084, 0.0541772) vertex[36] = @nscale1 * (0.233829, -0.010339) vertex[37] = @nscale1 * (0.620926, -0.010339) vertex[38] = @nscale1 * (0.620926, -0.139371) vertex[39] = @nscale1 * (0.878991, -0.586352) vertex[40] = @nscale1 * (0.6555, -0.715384) vertex[41] = @nscale1 * (0.590984, -0.82713) vertex[42] = @nscale1 * (0.255748, -0.633581) vertex[43] = @nscale1 * (0.126716, -0.633581) vertex[44] = @nscale1 * (0.126716, -0.117452) vertex[45] = @nscale1 * (-0.00231602, 0.106038) vertex[46] = @nscale1 * (0.109429, 0.170554) vertex[47] = @nscale1 * (0.302978, 0.50579) vertex[48] = @nscale1 * (0.414723, 0.441274) vertex[49] = @nscale1 * (0.930852, 0.441274) vertex[50] = @nscale1 * (0.930852, 0.183209) vertex[51] = @nscale1 * (0.995368, 0.0714642) vertex[52] = @nscale1 * (0.660132, -0.122084) vertex[53] = @nscale1 * (0.595616, -0.233829) vertex[54] = @nscale1 * (0.148635, 0.0242351) vertex[55] = @nscale1 * (-0.109429, 0.0242351) vertex[56] = @nscale1 * (-0.109429, 0.153267) vertex[57] = @nscale1 * (-0.302978, 0.488503) vertex[58] = @nscale1 * (-0.191232, 0.553019) vertex[59] = @nscale1 * (0.0668322, 1.) vertex[60] = @nscale1 * (0.290323, 0.870968) vertex[61] = @nscale1 * (0.419355, 0.870968) vertex[62] = @nscale1 * (0.419355, 0.483871) vertex[63] = @nscale1 * (0.483871, 0.372126) vertex[64] = @nscale1 * (0.0368901, 0.114061) vertex[65] = @nscale1 * (-0.0921421, -0.109429) vertex[66] = @nscale1 * (-0.203887, -0.0449131) vertex[67] = @nscale1 * (-0.590984, -0.0449131) vertex[68] = @nscale1 * (-0.590984, 0.0841192) vertex[69] = @nscale1 * (-0.849049, 0.5311) vertex[70] = @nscale1 * (-0.625558, 0.660132) vertex[71] = @nscale1 * (-0.561042, 0.771878) vertex[72] = @nscale1 * (-0.225806, 0.578329) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 189 ; "13-gon" cursality = 1 numbervertices = 14 ; vertices + cursality for closed curves cincrement = 14 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 13) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 13) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 190 ; "14-gon" cursality = 1 numbervertices = 15 ; vertices + cursality for closed curves cincrement = 15 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 14) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 14) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 191 ; "15-gon" cursality = 1 numbervertices = 16 ; vertices + cursality for closed curves cincrement = 16 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 15) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 15) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 192 ; "16-gon" cursality = 1 numbervertices = 17 ; vertices + cursality for closed curves cincrement = 17 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices xcoord[glindex] = @nscale1 * cos(glindex * twopi / 16) ycoord[glindex] = @nscale1 * sin(glindex * twopi / 16) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 193 ; "13-asterisk" cursality = 13 numbervertices = 26 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 13) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 13) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) elseif traparray == 194 ; "14-asterisk" cursality = 14 numbervertices = 28 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 14) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 14) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) elseif traparray == 195 ; "15-asterisk" cursality = 15 numbervertices = 30 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 15) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 15) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) elseif traparray == 196 ; "16-asterisk" cursality = 16 numbervertices = 32 ; vertices only for open curves cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 while glindex < numbervertices vertex[glindex] = (0,0) xcoord[glindex + 1] = @nscale1 * cos(glindex * #pi / 16) ycoord[glindex + 1] = @nscale1 * sin(glindex * #pi / 16) glindex = glindex + 1 vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex vertex[1] = @leafAlength * vertex[1] xcoord[1] = real(vertex[1]) ycoord[1] = imag(vertex[1]) elseif traparray == 197 ; "13-star" cursality = 1 numbervertices = 27 ; n + cursality for closed curves cincrement = 27 ; numbervertices/cursality ; initialize arrays vertex[ 0] = @nscale1 * (0.5, 0.) vertex[ 1] = @starspikiness * @nscale1 * (0.970942, 0.239316) vertex[ 2] = @nscale1 * (0.442728, 0.232362) vertex[ 3] = @starspikiness * @nscale1 * (0.748511, 0.663123) vertex[ 4] = @nscale1 * (0.284032, 0.411492) vertex[ 5] = @starspikiness * @nscale1 * (0.354605, 0.935016) vertex[ 6] = @nscale1 * (0.0602683, 0.496354) vertex[ 7] = @starspikiness * @nscale1 * (-0.120537, 0.992709) vertex[ 8] = @nscale1 * (-0.177302, 0.467508) vertex[ 9] = @starspikiness * @nscale1 * (-0.568065, 0.822984) vertex[ 10] = @nscale1 * (-0.374255, 0.331561) vertex[ 11] = @starspikiness * @nscale1 * (-0.885456, 0.464723) vertex[ 12] = @nscale1 * (-0.485471, 0.119658) vertex[ 13] = @starspikiness * @nscale1 * (-1., 0.) vertex[ 14] = @nscale1 * (-0.485471, -0.119658) vertex[ 15] = @starspikiness * @nscale1 * (-0.885456, -0.464723) vertex[ 16] = @nscale1 * (-0.374255, -0.331561) vertex[ 17] = @starspikiness * @nscale1 * (-0.568065, -0.822984) vertex[ 18] = @nscale1 * (-0.177302, -0.467508) vertex[ 19] = @starspikiness * @nscale1 * (-0.120537, -0.992709) vertex[ 20] = @nscale1 * (0.0602683, -0.496354) vertex[ 21] = @starspikiness * @nscale1 * (0.354605, -0.935016) vertex[ 22] = @nscale1 * (0.284032, -0.411492) vertex[ 23] = @starspikiness * @nscale1 * (0.748511, -0.663123) vertex[ 24] = @nscale1 * (0.442728, -0.232362) vertex[ 25] = @starspikiness * @nscale1 * (0.970942, -0.239316) vertex[ 26] = @nscale1 * (0.5, 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 198 ; "14-star" cursality = 1 numbervertices = 29 ; n + cursality for closed curves cincrement = 29 ; numbervertices/cursality ; initialize arrays vertex[ 0] = @nscale1 * (0.5, 0.) vertex[ 1] = @starspikiness * @nscale1 * (0.974928, 0.222521) vertex[ 2] = @nscale1 * (0.450484, 0.216942) vertex[ 3] = @starspikiness * @nscale1 * (0.781831, 0.62349) vertex[ 4] = @nscale1 * (0.311745, 0.390916) vertex[ 5] = @starspikiness * @nscale1 * (0.433884, 0.900969) vertex[ 6] = @nscale1 * (0.11126, 0.487464) vertex[ 7] = @starspikiness * @nscale1 * (0., 1.) vertex[ 8] = @nscale1 * (-0.11126, 0.487464) vertex[ 9] = @starspikiness * @nscale1 * (-0.433884, 0.900969) vertex[ 10] = @nscale1 * (-0.311745, 0.390916) vertex[ 11] = @starspikiness * @nscale1 * (-0.781831, 0.62349) vertex[ 12] = @nscale1 * (-0.450484, 0.216942) vertex[ 13] = @starspikiness * @nscale1 * (-0.974928, 0.222521) vertex[ 14] = @nscale1 * (-0.5, 0.) vertex[ 15] = @starspikiness * @nscale1 * (-0.974928, -0.222521) vertex[ 16] = @nscale1 * (-0.450484, -0.216942) vertex[ 17] = @starspikiness * @nscale1 * (-0.781831, -0.62349) vertex[ 18] = @nscale1 * (-0.311745, -0.390916) vertex[ 19] = @starspikiness * @nscale1 * (-0.433884, -0.900969) vertex[ 20] = @nscale1 * (-0.11126, -0.487464) vertex[ 21] = @starspikiness * @nscale1 * (0., -1.) vertex[ 22] = @nscale1 * (0.11126, -0.487464) vertex[ 23] = @starspikiness * @nscale1 * (0.433884, -0.900969) vertex[ 24] = @nscale1 * (0.311745, -0.390916) vertex[ 25] = @starspikiness * @nscale1 * (0.781831, -0.62349) vertex[ 26] = @nscale1 * (0.450484, -0.216942) vertex[ 27] = @starspikiness * @nscale1 * (0.974928, -0.222521) vertex[ 28] = @nscale1 * (0.5, 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 199 ; "15-star" cursality = 1 numbervertices = 31 ; n + cursality for closed curves cincrement = 31 ; numbervertices/cursality ; initialize arrays vertex[ 0] = @nscale1 * (0.5, 0.) vertex[ 1] = @starspikiness * @nscale1 * (0.978148, 0.207912) vertex[ 2] = @nscale1 * (0.456773, 0.203368) vertex[ 3] = @starspikiness * @nscale1 * (0.809017, 0.587785) vertex[ 4] = @nscale1 * (0.334565, 0.371572) vertex[ 5] = @starspikiness * @nscale1 * (0.5, 0.866025) vertex[ 6] = @nscale1 * (0.154508, 0.475528) vertex[ 7] = @starspikiness * @nscale1 * (0.104528, 0.994522) vertex[ 8] = @nscale1 * (-0.0522642, 0.497261) vertex[ 9] = @starspikiness * @nscale1 * (-0.309017, 0.951057) vertex[ 10] = @nscale1 * (-0.25, 0.433013) vertex[ 11] = @starspikiness * @nscale1 * (-0.669131, 0.743145) vertex[ 12] = @nscale1 * (-0.404508, 0.293893) vertex[ 13] = @starspikiness * @nscale1 * (-0.913545, 0.406737) vertex[ 14] = @nscale1 * (-0.489074, 0.103956) vertex[ 15] = @starspikiness * @nscale1 * (-1., 0.) vertex[ 16] = @nscale1 * (-0.489074, -0.103956) vertex[ 17] = @starspikiness * @nscale1 * (-0.913545, -0.406737) vertex[ 18] = @nscale1 * (-0.404508, -0.293893) vertex[ 19] = @starspikiness * @nscale1 * (-0.669131, -0.743145) vertex[ 20] = @nscale1 * (-0.25, -0.433013) vertex[ 21] = @starspikiness * @nscale1 * (-0.309017, -0.951057) vertex[ 22] = @nscale1 * (-0.0522642, -0.497261) vertex[ 23] = @starspikiness * @nscale1 * (0.104528, -0.994522) vertex[ 24] = @nscale1 * (0.154508, -0.475528) vertex[ 25] = @starspikiness * @nscale1 * (0.5, -0.866025) vertex[ 26] = @nscale1 * (0.334565, -0.371572) vertex[ 27] = @starspikiness * @nscale1 * (0.809017, -0.587785) vertex[ 28] = @nscale1 * (0.456773, -0.203368) vertex[ 29] = @starspikiness * @nscale1 * (0.978148, -0.207912) vertex[ 30] = @nscale1 * (0.5, 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 200 ; "16-star" cursality = 1 numbervertices = 33 ; n + cursality for closed curves cincrement = 33 ; numbervertices/cursality ; initialize arrays vertex[ 0] = @nscale1 * (0.5, 0.) vertex[ 1] = @starspikiness * @nscale1 * (0.980785, 0.19509) vertex[ 2] = @nscale1 * (0.46194, 0.191342) vertex[ 3] = @starspikiness * @nscale1 * (0.83147, 0.55557) vertex[ 4] = @nscale1 * (0.353553, 0.353553) vertex[ 5] = @starspikiness * @nscale1 * (0.55557, 0.83147) vertex[ 6] = @nscale1 * (0.191342, 0.46194) vertex[ 7] = @starspikiness * @nscale1 * (0.19509, 0.980785) vertex[ 8] = @nscale1 * (0., 0.5) vertex[ 9] = @starspikiness * @nscale1 * (-0.19509, 0.980785) vertex[ 10] = @nscale1 * (-0.191342, 0.46194) vertex[ 11] = @starspikiness * @nscale1 * (-0.55557, 0.83147) vertex[ 12] = @nscale1 * (-0.353553, 0.353553) vertex[ 13] = @starspikiness * @nscale1 * (-0.83147, 0.55557) vertex[ 14] = @nscale1 * (-0.46194, 0.191342) vertex[ 15] = @starspikiness * @nscale1 * (-0.980785, 0.19509) vertex[ 16] = @nscale1 * (-0.5, 0.) vertex[ 17] = @starspikiness * @nscale1 * (-0.980785, -0.19509) vertex[ 18] = @nscale1 * (-0.46194, -0.191342) vertex[ 19] = @starspikiness * @nscale1 * (-0.83147, -0.55557) vertex[ 20] = @nscale1 * (-0.353553, -0.353553) vertex[ 21] = @starspikiness * @nscale1 * (-0.55557, -0.83147) vertex[ 22] = @nscale1 * (-0.191342, -0.46194) vertex[ 23] = @starspikiness * @nscale1 * (-0.19509, -0.980785) vertex[ 24] = @nscale1 * (0., -0.5) vertex[ 25] = @starspikiness * @nscale1 * (0.19509, -0.980785) vertex[ 26] = @nscale1 * (0.191342, -0.46194) vertex[ 27] = @starspikiness * @nscale1 * (0.55557, -0.83147) vertex[ 28] = @nscale1 * (0.353553, -0.353553) vertex[ 29] = @starspikiness * @nscale1 * (0.83147, -0.55557) vertex[ 30] = @nscale1 * (0.46194, -0.191342) vertex[ 31] = @starspikiness * @nscale1 * (0.980785, -0.19509) vertex[ 32] = @nscale1 * (0.5, 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 201 ; "3-rhombstar" cursality = 3 numbervertices = 12 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.75 * @nscale1 * (1., 0.) vertex[ 1] = 0.75 * @nscale1 * (0.5, 0.866025) vertex[ 2] = 0.75 * @nscale1 * (-0.5, 0.866025) vertex[ 3] = 0.75 * @nscale1 * (0., 0.) vertex[ 4] = 0.75 * @nscale1 * (-0.5, -0.866025) vertex[ 5] = 0.75 * @nscale1 * (0.5, -0.866025) vertex[ 6] = 0.75 * @nscale1 * (1., 0.) vertex[ 7] = 0.75 * @nscale1 * (0., 0.) vertex[ 8] = 0.75 * @nscale1 * (-0.5, 0.866025) vertex[ 9] = 0.75 * @nscale1 * (-1., 0.) vertex[ 10] =0.75 * @nscale1 * (-0.5, -0.866025) vertex[ 11] = 0.75 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 202 ; "5-rhombstar" cursality = 5 numbervertices = 20 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.5 * @nscale1 * (1.15, 0.) vertex[ 1] = 0.5 * @nscale1 * (1.45902, 0.951057) vertex[ 2] = 0.5 * @nscale1 * (0.459017, 0.951057) vertex[ 3] = 0.5 * @nscale1 * (0.15, 0.) vertex[ 4] = 0.5 * @nscale1 * (0.459017, -0.951057) vertex[ 5] = 0.5 * @nscale1 * (1.45902, -0.951057) vertex[ 6] = 0.5 * @nscale1 * (1.15, 0.) vertex[ 7] = 0.5 * @nscale1 * (0.15, 0.) vertex[ 8] = 0.5 * @nscale1 * (-0.659017, -0.587785) vertex[ 9] = 0.5 * @nscale1 * (-0.35, -1.53884) vertex[ 10] = 0.5 * @nscale1 * (0.459017, -0.951057) vertex[ 11] = 0.5 * @nscale1 * (0.15, 0.) vertex[ 12] = 0.5 * @nscale1 * (-0.659017, 0.587785) vertex[ 13] = 0.5 * @nscale1 * (-1.46803, 0.) vertex[ 14] = 0.5 * @nscale1 * (-0.659017, -0.587785) vertex[ 15] = 0.5 * @nscale1 * (0.15, 0.) vertex[ 16] = 0.5 * @nscale1 * (0.459017, 0.951057) vertex[ 17] = 0.5 * @nscale1 * (-0.35, 1.53884) vertex[ 18] = 0.5 * @nscale1 * (-0.659017, 0.587785) vertex[ 19] = 0.5 * @nscale1 * (0.15, 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 203 ; "6-rhombstar" cursality = 6 numbervertices = 24 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.5 * @nscale1 * (1., 0.) vertex[ 1] = 0.5 * @nscale1 * (1.5, 0.866025) vertex[ 2] = 0.5 * @nscale1 * (0.5, 0.866025) vertex[ 3] = 0.5 * @nscale1 * (0., 0.) vertex[ 4] = 0.5 * @nscale1 * (0.5, -0.866025) vertex[ 5] = 0.5 * @nscale1 * (1.5, -0.866025) vertex[ 6] = 0.5 * @nscale1 * (1., 0.) vertex[ 7] = 0.5 * @nscale1 * (0., 0.) vertex[ 8] = 0.5 * @nscale1 * (-0.5, -0.866025) vertex[ 9] = 0.5 * @nscale1 * (0., -1.73205) vertex[ 10] = 0.5 * @nscale1 * (0.5, -0.866025) vertex[ 11] = 0.5 * @nscale1 * (0., 0.) vertex[ 12] = 0.5 * @nscale1 * (-1., 0.) vertex[ 13] = 0.5 * @nscale1 * (-1.5, -0.866025) vertex[ 14] = 0.5 * @nscale1 * (-0.5, -0.866025) vertex[ 15] = 0.5 * @nscale1 * (0., 0.) vertex[ 16] = 0.5 * @nscale1 * (-0.5, 0.866025) vertex[ 17] = 0.5 * @nscale1 * (-1.5, 0.866025) vertex[ 18] = 0.5 * @nscale1 * (-1., 0.) vertex[ 19] = 0.5 * @nscale1 * (0., 0.) vertex[ 20] = 0.5 * @nscale1 * (0.5, 0.866025) vertex[ 21] = 0.5 * @nscale1 * (0., 1.73205) vertex[ 22] = 0.5 * @nscale1 * (-0.5, 0.866025) vertex[ 23] = 0.5 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 204 ; "7-rhombstar" cursality = 7 numbervertices = 28 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.5 * @nscale1 * (1., 0.) vertex[ 1] = 0.5 * @nscale1 * (1.62349, 0.781831) vertex[ 2] = 0.5 * @nscale1 * (0.62349, 0.781831) vertex[ 3] = 0.5 * @nscale1 * (0., 0.) vertex[ 4] = 0.5 * @nscale1 * (0.62349, -0.781831) vertex[ 5] = 0.5 * @nscale1 * (1.62349, -0.781831) vertex[ 6] = 0.5 * @nscale1 * (1., 0.) vertex[ 7] = 0.5 * @nscale1 * (0., 0.) vertex[ 8] = 0.5 * @nscale1 * (-0.222521, -0.974928) vertex[ 9] = 0.5 * @nscale1 * (0.400969, -1.75676) vertex[ 10] = 0.5 * @nscale1 * (0.62349, -0.781831) vertex[ 11] = 0.5 * @nscale1 * (0., 0.) vertex[ 12] = 0.5 * @nscale1 * (-0.900969, -0.433884) vertex[ 13] = 0.5 * @nscale1 * (-1.12349, -1.40881) vertex[ 14] = 0.5 * @nscale1 * (-0.222521, -0.974928) vertex[ 15] = 0.5 * @nscale1 * (0., 0.) vertex[ 16] = 0.5 * @nscale1 * (-0.900969, 0.433884) vertex[ 17] = 0.5 * @nscale1 * (-1.80194, 0.) vertex[ 18] = 0.5 * @nscale1 * (-0.900969, -0.433884) vertex[ 19] = 0.5 * @nscale1 * (0., 0.) vertex[ 20] = 0.5 * @nscale1 * (-0.222521, 0.974928) vertex[ 21] = 0.5 * @nscale1 * (-1.12349, 1.40881) vertex[ 22] = 0.5 * @nscale1 * (-0.900969, 0.433884) vertex[ 23] = 0.5 * @nscale1 * (0., 0.) vertex[ 24] = 0.5 * @nscale1 * (0.62349, 0.781831) vertex[ 25] = 0.5 * @nscale1 * (0.400969, 1.75676) vertex[ 26] = 0.5 * @nscale1 * (-0.222521, 0.974928) vertex[ 27] = 0.5 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 205 ; "8-rhombstar" cursality = 8 numbervertices = 32 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.5 * @nscale1 * (1., 0.) vertex[ 1] = 0.5 * @nscale1 * (1.70711, 0.707107) vertex[ 2] = 0.5 * @nscale1 * (0.707107, 0.707107) vertex[ 3] = 0.5 * @nscale1 * (0., 0.) vertex[ 4] = 0.5 * @nscale1 * (0.707107, -0.707107) vertex[ 5] = 0.5 * @nscale1 * (1.70711, -0.707107) vertex[ 6] = 0.5 * @nscale1 * (1., 0.) vertex[ 7] = 0.5 * @nscale1 * (0., 0.) vertex[ 8] = 0.5 * @nscale1 * (0., -1.) vertex[ 9] = 0.5 * @nscale1 * (0.707107, -1.70711) vertex[ 10] = 0.5 * @nscale1 * (0.707107, -0.707107) vertex[ 11] = 0.5 * @nscale1 * (0., 0.) vertex[ 12] = 0.5 * @nscale1 * (-0.707107, -0.707107) vertex[ 13] = 0.5 * @nscale1 * (-0.707107, -1.70711) vertex[ 14] = 0.5 * @nscale1 * (0., -1.) vertex[ 15] = 0.5 * @nscale1 * (0., 0.) vertex[ 16] = 0.5 * @nscale1 * (-1., 0.) vertex[ 17] = 0.5 * @nscale1 * (-1.70711, -0.707107) vertex[ 18] = 0.5 * @nscale1 * (-0.707107, -0.707107) vertex[ 19] = 0.5 * @nscale1 * (0., 0.) vertex[ 20] = 0.5 * @nscale1 * (-0.707107, 0.707107) vertex[ 21] = 0.5 * @nscale1 * (-1.70711, 0.707107) vertex[ 22] = 0.5 * @nscale1 * (-1., 0.) vertex[ 23] = 0.5 * @nscale1 * (0., 0.) vertex[ 24] = 0.5 * @nscale1 * (0., 1.) vertex[ 25] = 0.5 * @nscale1 * (-0.707107, 1.70711) vertex[ 26] = 0.5 * @nscale1 * (-0.707107, 0.707107) vertex[ 27] = 0.5 * @nscale1 * (0., 0.) vertex[ 28] = 0.5 * @nscale1 * (0.707107, 0.707107) vertex[ 29] = 0.5 * @nscale1 * (0.707107, 1.70711) vertex[ 30] = 0.5 * @nscale1 * (0., 1.) vertex[ 31] = 0.5 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 206 ; "9-rhombstar" cursality = 9 numbervertices = 36 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.76604, 0.642788) vertex[ 2] = 0.4 * @nscale1 * (0.766044, 0.642788) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.766044, -0.642788) vertex[ 5] = 0.4 * @nscale1 * (1.76604, -0.642788) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.173648, -0.984808) vertex[ 9] = 0.4 * @nscale1 * (0.939693, -1.6276) vertex[ 10] = 0.4 * @nscale1 * (0.766044, -0.642788) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (-0.5, -0.866025) vertex[ 13] = 0.4 * @nscale1 * (-0.326352, -1.85083) vertex[ 14] = 0.4 * @nscale1 * (0.173648, -0.984808) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (-0.939693, -0.34202) vertex[ 17] = 0.4 * @nscale1 * (-1.43969, -1.20805) vertex[ 18] = 0.4 * @nscale1 * (-0.5, -0.866025) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-0.939693, 0.34202) vertex[ 21] = 0.4 * @nscale1 * (-1.87939, 0.) vertex[ 22] = 0.4 * @nscale1 * (-0.939693, -0.34202) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-0.5, 0.866025) vertex[ 25] = 0.4 * @nscale1 * (-1.43969, 1.20805) vertex[ 26] = 0.4 * @nscale1 * (-0.939693, 0.34202) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (0.173648, 0.984808) vertex[ 29] = 0.4 * @nscale1 * (-0.326352, 1.85083) vertex[ 30] = 0.4 * @nscale1 * (-0.5, 0.866025) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (0.766044, 0.642788) vertex[ 33] = 0.4 * @nscale1 * (0.939693, 1.6276) vertex[ 34] = 0.4 * @nscale1 * (0.173648, 0.984808) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 207 ; "10-rhombstar" cursality = 10 numbervertices = 40 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.80902, 0.587785) vertex[ 2] = 0.4 * @nscale1 * (0.809017, 0.587785) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.809017, -0.587785) vertex[ 5] = 0.4 * @nscale1 * (1.80902, -0.587785) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.309017, -0.951057) vertex[ 9] = 0.4 * @nscale1 * (1.11803, -1.53884) vertex[ 10] = 0.4 * @nscale1 * (0.809017, -0.587785) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (-0.309017, -0.951057) vertex[ 13] = 0.4 * @nscale1 * (0., -1.90211) vertex[ 14] = 0.4 * @nscale1 * (0.309017, -0.951057) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (-0.809017, -0.587785) vertex[ 17] = 0.4 * @nscale1 * (-1.11803, -1.53884) vertex[ 18] = 0.4 * @nscale1 * (-0.309017, -0.951057) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-1., 0.) vertex[ 21] = 0.4 * @nscale1 * (-1.80902, -0.587785) vertex[ 22] = 0.4 * @nscale1 * (-0.809017, -0.587785) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-0.809017, 0.587785) vertex[ 25] = 0.4 * @nscale1 * (-1.80902, 0.587785) vertex[ 26] = 0.4 * @nscale1 * (-1., 0.) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (-0.309017, 0.951057) vertex[ 29] = 0.4 * @nscale1 * (-1.11803, 1.53884) vertex[ 30] = 0.4 * @nscale1 * (-0.809017, 0.587785) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (0.309017, 0.951057) vertex[ 33] = 0.4 * @nscale1 * (0., 1.90211) vertex[ 34] = 0.4 * @nscale1 * (-0.309017, 0.951057) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) vertex[ 36] = 0.4 * @nscale1 * (0.809017, 0.587785) vertex[ 37] = 0.4 * @nscale1 * (1.11803, 1.53884) vertex[ 38] = 0.4 * @nscale1 * (0.309017, 0.951057) vertex[ 39] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 208 ; "11-rhombstar" cursality = 11 numbervertices = 44 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.84125, 0.540641) vertex[ 2] = 0.4 * @nscale1 * (0.841254, 0.540641) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.841254, -0.540641) vertex[ 5] = 0.4 * @nscale1 * (1.84125, -0.540641) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.415415, -0.909632) vertex[ 9] = 0.4 * @nscale1 * (1.25667, -1.45027) vertex[ 10] = 0.4 * @nscale1 * (0.841254, -0.540641) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (-0.142315, -0.989821) vertex[ 13] = 0.4 * @nscale1 * (0.2731, -1.89945) vertex[ 14] = 0.4 * @nscale1 * (0.415415, -0.909632) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (-0.654861, -0.75575) vertex[ 17] = 0.4 * @nscale1 * (-0.797176, -1.74557) vertex[ 18] = 0.4 * @nscale1 * (-0.142315, -0.989821) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-0.959493, -0.281733) vertex[ 21] = 0.4 * @nscale1 * (-1.61435, -1.03748) vertex[ 22] = 0.4 * @nscale1 * (-0.654861, -0.75575) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-0.959493, 0.281733) vertex[ 25] = 0.4 * @nscale1 * (-1.91899, 0.) vertex[ 26] = 0.4 * @nscale1 * (-0.959493, -0.281733) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (-0.654861, 0.75575) vertex[ 29] = 0.4 * @nscale1 * (-1.61435, 1.03748) vertex[ 30] = 0.4 * @nscale1 * (-0.959493, 0.281733) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (-0.142315, 0.989821) vertex[ 33] = 0.4 * @nscale1 * (-0.797176, 1.74557) vertex[ 34] = 0.4 * @nscale1 * (-0.654861, 0.75575) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) vertex[ 36] = 0.4 * @nscale1 * (0.415415, 0.909632) vertex[ 37] = 0.4 * @nscale1 * (0.2731, 1.89945) vertex[ 38] = 0.4 * @nscale1 * (-0.142315, 0.989821) vertex[ 39] = 0.4 * @nscale1 * (0., 0.) vertex[ 40] = 0.4 * @nscale1 * (0.841254, 0.540641) vertex[ 41] = 0.4 * @nscale1 * (1.25667, 1.45027) vertex[ 42] = 0.4 * @nscale1 * (0.415415, 0.909632) vertex[ 43] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 209 ; "12-rhombstar" cursality = 12 numbervertices = 48 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.86603, 0.5) vertex[ 2] = 0.4 * @nscale1 * (0.866025, 0.5) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.866025, -0.5) vertex[ 5] = 0.4 * @nscale1 * (1.86603, -0.5) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.5, -0.866025) vertex[ 9] = 0.4 * @nscale1 * (1.36603, -1.36603) vertex[ 10] = 0.4 * @nscale1 * (0.866025, -0.5) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (0., -1.) vertex[ 13] = 0.4 * @nscale1 * (0.5, -1.86603) vertex[ 14] = 0.4 * @nscale1 * (0.5, -0.866025) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (-0.5, -0.866025) vertex[ 17] = 0.4 * @nscale1 * (-0.5, -1.86603) vertex[ 18] = 0.4 * @nscale1 * (0., -1.) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-0.866025, -0.5) vertex[ 21] = 0.4 * @nscale1 * (-1.36603, -1.36603) vertex[ 22] = 0.4 * @nscale1 * (-0.5, -0.866025) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-1., 0.) vertex[ 25] = 0.4 * @nscale1 * (-1.86603, -0.5) vertex[ 26] = 0.4 * @nscale1 * (-0.866025, -0.5) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (-0.866025, 0.5) vertex[ 29] = 0.4 * @nscale1 * (-1.86603, 0.5) vertex[ 30] = 0.4 * @nscale1 * (-1., 0.) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (-0.5, 0.866025) vertex[ 33] = 0.4 * @nscale1 * (-1.36603, 1.36603) vertex[ 34] = 0.4 * @nscale1 * (-0.866025, 0.5) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) vertex[ 36] = 0.4 * @nscale1 * (0., 1.) vertex[ 37] = 0.4 * @nscale1 * (-0.5, 1.86603) vertex[ 38] = 0.4 * @nscale1 * (-0.5, 0.866025) vertex[ 39] = 0.4 * @nscale1 * (0., 0.) vertex[ 40] = 0.4 * @nscale1 * (0.5, 0.866025) vertex[ 41] = 0.4 * @nscale1 * (0.5, 1.86603) vertex[ 42] = 0.4 * @nscale1 * (0., 1.) vertex[ 43] = 0.4 * @nscale1 * (0., 0.) vertex[ 44] = 0.4 * @nscale1 * (0.866025, 0.5) vertex[ 45] = 0.4 * @nscale1 * (1.36603, 1.36603) vertex[ 46] = 0.4 * @nscale1 * (0.5, 0.866025) vertex[ 47] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 210 ; "13-rhombstar" cursality = 13 numbervertices = 52 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.88546, 0.464723) vertex[ 2] = 0.4 * @nscale1 * (0.885456, 0.464723) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.885456, -0.464723) vertex[ 5] = 0.4 * @nscale1 * (1.88546, -0.464723) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.568065, -0.822984) vertex[ 9] = 0.4 * @nscale1 * (1.45352, -1.28771) vertex[ 10] = 0.4 * @nscale1 * (0.885456, -0.464723) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (0.120537, -0.992709) vertex[ 13] = 0.4 * @nscale1 * (0.688601, -1.81569) vertex[ 14] = 0.4 * @nscale1 * (0.568065, -0.822984) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (-0.354605, -0.935016) vertex[ 17] = 0.4 * @nscale1 * (-0.234068, -1.92773) vertex[ 18] = 0.4 * @nscale1 * (0.120537, -0.992709) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-0.748511, -0.663123) vertex[ 21] = 0.4 * @nscale1 * (-1.10312, -1.59814) vertex[ 22] = 0.4 * @nscale1 * (-0.354605, -0.935016) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-0.970942, -0.239316) vertex[ 25] = 0.4 * @nscale1 * (-1.71945, -0.902438) vertex[ 26] = 0.4 * @nscale1 * (-0.748511, -0.663123) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (-0.970942, 0.239316) vertex[ 29] = 0.4 * @nscale1 * (-1.94188, 0.) vertex[ 30] = 0.4 * @nscale1 * (-0.970942, -0.239316) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (-0.748511, 0.663123) vertex[ 33] = 0.4 * @nscale1 * (-1.71945, 0.902438) vertex[ 34] = 0.4 * @nscale1 * (-0.970942, 0.239316) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) vertex[ 36] = 0.4 * @nscale1 * (-0.354605, 0.935016) vertex[ 37] = 0.4 * @nscale1 * (-1.10312, 1.59814) vertex[ 38] = 0.4 * @nscale1 * (-0.748511, 0.663123) vertex[ 39] = 0.4 * @nscale1 * (0., 0.) vertex[ 40] = 0.4 * @nscale1 * (0.120537, 0.992709) vertex[ 41] = 0.4 * @nscale1 * (-0.234068, 1.92773) vertex[ 42] = 0.4 * @nscale1 * (-0.354605, 0.935016) vertex[ 43] = 0.4 * @nscale1 * (0., 0.) vertex[ 44] = 0.4 * @nscale1 * (0.568065, 0.822984) vertex[ 45] = 0.4 * @nscale1 * (0.688601, 1.81569) vertex[ 46] = 0.4 * @nscale1 * (0.120537, 0.992709) vertex[ 47] = 0.4 * @nscale1 * (0., 0.) vertex[ 48] = 0.4 * @nscale1 * (0.885456, 0.464723) vertex[ 49] = 0.4 * @nscale1 * (1.45352, 1.28771) vertex[ 50] = 0.4 * @nscale1 * (0.568065, 0.822984) vertex[ 51] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 211 ; "14-rhombstar" cursality = 14 numbervertices = 56 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.90097, 0.433884) vertex[ 2] = 0.4 * @nscale1 * (0.900969, 0.433884) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.900969, -0.433884) vertex[ 5] = 0.4 * @nscale1 * (1.90097, -0.433884) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.62349, -0.781831) vertex[ 9] = 0.4 * @nscale1 * (1.52446, -1.21572) vertex[ 10] = 0.4 * @nscale1 * (0.900969, -0.433884) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (0.222521, -0.974928) vertex[ 13] = 0.4 * @nscale1 * (0.846011, -1.75676) vertex[ 14] = 0.4 * @nscale1 * (0.62349, -0.781831) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (-0.222521, -0.974928) vertex[ 17] = 0.4 * @nscale1 * (0., -1.94986) vertex[ 18] = 0.4 * @nscale1 * (0.222521, -0.974928) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-0.62349, -0.781831) vertex[ 21] = 0.4 * @nscale1 * (-0.846011, -1.75676) vertex[ 22] = 0.4 * @nscale1 * (-0.222521, -0.974928) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-0.900969, -0.433884) vertex[ 25] = 0.4 * @nscale1 * (-1.52446, -1.21572) vertex[ 26] = 0.4 * @nscale1 * (-0.62349, -0.781831) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (-1., 0.) vertex[ 29] = 0.4 * @nscale1 * (-1.90097, -0.433884) vertex[ 30] = 0.4 * @nscale1 * (-0.900969, -0.433884) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (-0.900969, 0.433884) vertex[ 33] = 0.4 * @nscale1 * (-1.90097, 0.433884) vertex[ 34] = 0.4 * @nscale1 * (-1., 0.) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) vertex[ 36] = 0.4 * @nscale1 * (-0.62349, 0.781831) vertex[ 37] = 0.4 * @nscale1 * (-1.52446, 1.21572) vertex[ 38] = 0.4 * @nscale1 * (-0.900969, 0.433884) vertex[ 39] = 0.4 * @nscale1 * (0., 0.) vertex[ 40] = 0.4 * @nscale1 * (-0.222521, 0.974928) vertex[ 41] = 0.4 * @nscale1 * (-0.846011, 1.75676) vertex[ 42] = 0.4 * @nscale1 * (-0.62349, 0.781831) vertex[ 43] = 0.4 * @nscale1 * (0., 0.) vertex[ 44] = 0.4 * @nscale1 * (0.222521, 0.974928) vertex[ 45] = 0.4 * @nscale1 * (0., 1.94986) vertex[ 46] = 0.4 * @nscale1 * (-0.222521, 0.974928) vertex[ 47] = 0.4 * @nscale1 * (0., 0.) vertex[ 48] = 0.4 * @nscale1 * (0.62349, 0.781831) vertex[ 49] = 0.4 * @nscale1 * (0.846011, 1.75676) vertex[ 50] = 0.4 * @nscale1 * (0.222521, 0.974928) vertex[ 51] = 0.4 * @nscale1 * (0., 0.) vertex[ 52] = 0.4 * @nscale1 * (0.900969, 0.433884) vertex[ 53] = 0.4 * @nscale1 * (1.52446, 1.21572) vertex[ 54] = 0.4 * @nscale1 * (0.62349, 0.781831) vertex[ 55] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 212 ; "15-rhombstar" cursality = 15 numbervertices = 60 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.91355, 0.406737) vertex[ 2] = 0.4 * @nscale1 * (0.913545, 0.406737) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.913545, -0.406737) vertex[ 5] = 0.4 * @nscale1 * (1.91355, -0.406737) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.669131, -0.743145) vertex[ 9] = 0.4 * @nscale1 * (1.58268, -1.14988) vertex[ 10] = 0.4 * @nscale1 * (0.913545, -0.406737) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (0.309017, -0.951057) vertex[ 13] = 0.4 * @nscale1 * (0.978148, -1.6942) vertex[ 14] = 0.4 * @nscale1 * (0.669131, -0.743145) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (-0.104528, -0.994522) vertex[ 17] = 0.4 * @nscale1 * (0.204489, -1.94558) vertex[ 18] = 0.4 * @nscale1 * (0.309017, -0.951057) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-0.5, -0.866025) vertex[ 21] = 0.4 * @nscale1 * (-0.604528, -1.86055) vertex[ 22] = 0.4 * @nscale1 * (-0.104528, -0.994522) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-0.809017, -0.587785) vertex[ 25] = 0.4 * @nscale1 * (-1.30902, -1.45381) vertex[ 26] = 0.4 * @nscale1 * (-0.5, -0.866025) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (-0.978148, -0.207912) vertex[ 29] = 0.4 * @nscale1 * (-1.78716, -0.795697) vertex[ 30] = 0.4 * @nscale1 * (-0.809017, -0.587785) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (-0.978148, 0.207912) vertex[ 33] = 0.4 * @nscale1 * (-1.9563, 0.) vertex[ 34] = 0.4 * @nscale1 * (-0.978148, -0.207912) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) vertex[ 36] = 0.4 * @nscale1 * (-0.809017, 0.587785) vertex[ 37] = 0.4 * @nscale1 * (-1.78716, 0.795697) vertex[ 38] = 0.4 * @nscale1 * (-0.978148, 0.207912) vertex[ 39] = 0.4 * @nscale1 * (0., 0.) vertex[ 40] = 0.4 * @nscale1 * (-0.5, 0.866025) vertex[ 41] = 0.4 * @nscale1 * (-1.30902, 1.45381) vertex[ 42] = 0.4 * @nscale1 * (-0.809017, 0.587785) vertex[ 43] = 0.4 * @nscale1 * (0., 0.) vertex[ 44] = 0.4 * @nscale1 * (-0.104528, 0.994522) vertex[ 45] = 0.4 * @nscale1 * (-0.604528, 1.86055) vertex[ 46] = 0.4 * @nscale1 * (-0.5, 0.866025) vertex[ 47] = 0.4 * @nscale1 * (0., 0.) vertex[ 48] = 0.4 * @nscale1 * (0.309017, 0.951057) vertex[ 49] = 0.4 * @nscale1 * (0.204489, 1.94558) vertex[ 50] = 0.4 * @nscale1 * (-0.104528, 0.994522) vertex[ 51] = 0.4 * @nscale1 * (0., 0.) vertex[ 52] = 0.4 * @nscale1 * (0.669131, 0.743145) vertex[ 53] = 0.4 * @nscale1 * (0.978148, 1.6942) vertex[ 54] = 0.4 * @nscale1 * (0.309017, 0.951057) vertex[ 55] = 0.4 * @nscale1 * (0., 0.) vertex[ 56] = 0.4 * @nscale1 * (0.913545, 0.406737) vertex[ 57] = 0.4 * @nscale1 * (1.58268, 1.14988) vertex[ 58] = 0.4 * @nscale1 * (0.669131, 0.743145) vertex[ 59] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 213 ; "16-rhombstar" cursality = 16 numbervertices = 64 ; vertices only for open curves cincrement = 4 ; numbervertices/cursality ; initialize arrays vertex[ 0] = 0.4 * @nscale1 * (1., 0.) vertex[ 1] = 0.4 * @nscale1 * (1.92388, 0.382683) vertex[ 2] = 0.4 * @nscale1 * (0.92388, 0.382683) vertex[ 3] = 0.4 * @nscale1 * (0., 0.) vertex[ 4] = 0.4 * @nscale1 * (0.92388, -0.382683) vertex[ 5] = 0.4 * @nscale1 * (1.92388, -0.382683) vertex[ 6] = 0.4 * @nscale1 * (1., 0.) vertex[ 7] = 0.4 * @nscale1 * (0., 0.) vertex[ 8] = 0.4 * @nscale1 * (0.707107, -0.707107) vertex[ 9] = 0.4 * @nscale1 * (1.63099, -1.08979) vertex[ 10] = 0.4 * @nscale1 * (0.92388, -0.382683) vertex[ 11] = 0.4 * @nscale1 * (0., 0.) vertex[ 12] = 0.4 * @nscale1 * (0.382683, -0.92388) vertex[ 13] = 0.4 * @nscale1 * (1.08979, -1.63099) vertex[ 14] = 0.4 * @nscale1 * (0.707107, -0.707107) vertex[ 15] = 0.4 * @nscale1 * (0., 0.) vertex[ 16] = 0.4 * @nscale1 * (0., -1.) vertex[ 17] = 0.4 * @nscale1 * (0.382683, -1.92388) vertex[ 18] = 0.4 * @nscale1 * (0.382683, -0.92388) vertex[ 19] = 0.4 * @nscale1 * (0., 0.) vertex[ 20] = 0.4 * @nscale1 * (-0.382683, -0.92388) vertex[ 21] = 0.4 * @nscale1 * (-0.382683, -1.92388) vertex[ 22] = 0.4 * @nscale1 * (0., -1.) vertex[ 23] = 0.4 * @nscale1 * (0., 0.) vertex[ 24] = 0.4 * @nscale1 * (-0.707107, -0.707107) vertex[ 25] = 0.4 * @nscale1 * (-1.08979, -1.63099) vertex[ 26] = 0.4 * @nscale1 * (-0.382683, -0.92388) vertex[ 27] = 0.4 * @nscale1 * (0., 0.) vertex[ 28] = 0.4 * @nscale1 * (-0.92388, -0.382683) vertex[ 29] = 0.4 * @nscale1 * (-1.63099, -1.08979) vertex[ 30] = 0.4 * @nscale1 * (-0.707107, -0.707107) vertex[ 31] = 0.4 * @nscale1 * (0., 0.) vertex[ 32] = 0.4 * @nscale1 * (-1., 0.) vertex[ 33] = 0.4 * @nscale1 * (-1.92388, -0.382683) vertex[ 34] = 0.4 * @nscale1 * (-0.92388, -0.382683) vertex[ 35] = 0.4 * @nscale1 * (0., 0.) vertex[ 36] = 0.4 * @nscale1 * (-0.92388, 0.382683) vertex[ 37] = 0.4 * @nscale1 * (-1.92388, 0.382683) vertex[ 38] = 0.4 * @nscale1 * (-1., 0.) vertex[ 39] = 0.4 * @nscale1 * (0., 0.) vertex[ 40] = 0.4 * @nscale1 * (-0.707107, 0.707107) vertex[ 41] = 0.4 * @nscale1 * (-1.63099, 1.08979) vertex[ 42] = 0.4 * @nscale1 * (-0.92388, 0.382683) vertex[ 43] = 0.4 * @nscale1 * (0., 0.) vertex[ 44] = 0.4 * @nscale1 * (-0.382683, 0.92388) vertex[ 45] = 0.4 * @nscale1 * (-1.08979, 1.63099) vertex[ 46] = 0.4 * @nscale1 * (-0.707107, 0.707107) vertex[ 47] = 0.4 * @nscale1 * (0., 0.) vertex[ 48] = 0.4 * @nscale1 * (0., 1.) vertex[ 49] = 0.4 * @nscale1 * (-0.382683, 1.92388) vertex[ 50] = 0.4 * @nscale1 * (-0.382683, 0.92388) vertex[ 51] = 0.4 * @nscale1 * (0., 0.) vertex[ 52] = 0.4 * @nscale1 * (0.382683, 0.92388) vertex[ 53] = 0.4 * @nscale1 * (0.382683, 1.92388) vertex[ 54] = 0.4 * @nscale1 * (0., 1.) vertex[ 55] = 0.4 * @nscale1 * (0., 0.) vertex[ 56] = 0.4 * @nscale1 * (0.707107, 0.707107) vertex[ 57] = 0.4 * @nscale1 * (1.08979, 1.63099) vertex[ 58] = 0.4 * @nscale1 * (0.382683, 0.92388) vertex[ 59] = 0.4 * @nscale1 * (0., 0.) vertex[ 60] = 0.4 * @nscale1 * (0.92388, 0.382683) vertex[ 61] = 0.4 * @nscale1 * (1.63099, 1.08979) vertex[ 62] = 0.4 * @nscale1 * (0.707107, 0.707107) vertex[ 63] = 0.4 * @nscale1 * (0., 0.) glindex = 0 while glindex < numbervertices xcoord[glindex] = real(vertex[glindex]) ycoord[glindex] = imag(vertex[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 215 ; "dotted star" cursality = raynum * dotnum numbervertices = cursality ; single points, not line segments cincrement = 1 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchfloat = @nscale1 / (dotnum - 1) ; spacing between dots in each ray scratchint = 0 ; current ray number while glindex < numbervertices glindex3 = 0 while glindex3 < dotnum xcoord[glindex + glindex3] = glindex3 * scratchfloat * \ cos(scratchint * twopi / raynum) ycoord[glindex + glindex3] = glindex3 * scratchfloat * \ sin(scratchint * twopi / raynum) vertex[glindex + glindex3] = xcoord[glindex + \ glindex3] + flip(ycoord[glindex + glindex3]) glindex3 = glindex3 + 1 endwhile ; glindex3 scratchint = scratchint + 1 ; next ray glindex = glindex + dotnum endwhile ; glindex elseif traparray == 216 ; "dashed star" cursality = raynum * dashnum numbervertices = 2 * cursality ; line segments cincrement = 2 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchint = 2 * dashnum ; number of dots per ray scratchfloat2 = @nscale1 / (scratchint - 1) ; spacing between dots in each ray scratchint2 = 0 ; current ray number while glindex < numbervertices glindex3 = 0 while glindex3 < scratchint xcoord[glindex + glindex3] = glindex3 * scratchfloat2 * \ cos(scratchint2 * twopi / raynum) ycoord[glindex + glindex3] = glindex3 * scratchfloat2 * \ sin(scratchint2 * twopi / raynum) vertex[glindex + glindex3] = xcoord[glindex + \ glindex3] + flip(ycoord[glindex + glindex3]) glindex3 = glindex3 + 1 endwhile ; glindex3 scratchint2 = scratchint2 + 1 ; next ray glindex = glindex + scratchint endwhile ; glindex elseif traparray == 217 ; "rhodonea" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; vertices + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchfloat = hypotroA / hypotroB scratchfloat2 = twopi/granularity scratchfloat3 = scratchfloat2 * hypotroB while glindex < granularity2 scratchfloat4 = sin(scratchfloat * glindex * scratchfloat3) ; radius xcoord[glindex] = @nscale1 * scratchfloat4 * cos(glindex * scratchfloat3) ycoord[glindex] = @nscale1 * scratchfloat4 * sin(glindex * scratchfloat3) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[granularity2] = xcoord[0] ycoord[granularity2] = ycoord[0] vertex[granularity2] = xcoord[granularity2] + flip(ycoord[granularity2]) elseif traparray == 218 ; "cycloid" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain cursality = 1 numbervertices = granularity ; vertices only for open curves cincrement = granularity ; numbervertices/cursality scratchfloat = twopi * cycloidlength / granularity scratchfloat3 = twopi * cycloidlength /2 ; recenter the resulting cycloid on its midpoint ; initialize arrays glindex = 0 while glindex < granularity scratchfloat2 = scratchfloat * glindex - scratchfloat3 xcoord[glindex] = @nscale1 * \ (scratchfloat2 - cycloidamp * sin(scratchfloat2)) ycoord[glindex] = @nscale1 * \ (cycloidconst - cycloidamp * cos(scratchfloat2)) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex elseif traparray == 219 ; "parabolic lissajous" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; n + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays scratchfloat = lissajdomain/granularity2 ; angular domain increment glindex = 0 while glindex < granularity scratchfloat2 = @lissaamp1 * cos(@lissafreq1*glindex*scratchfloat - \ @lissaphase1) scratchfloat3 = @lissaamp2 * cos(@lissafreq2*glindex*scratchfloat - \ @lissaphase2) xcoord[glindex] = @nscale1 * scratchfloat2 * \ scratchfloat3 ycoord[glindex] = @nscale1 * 0.5 * \ (sqr(scratchfloat3) - sqr(scratchfloat2)) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[glindex] = xcoord[0] ; close the curve ycoord[glindex] = ycoord[0] vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) if @lissaopen ; do not connect the first and last points of the curve numbervertices = numbervertices - 1 cincrement = cincrement - 1 endif ; lissaopen elseif traparray == 220 ; "polar lissajous" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; n + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays scratchfloat = lissajdomain/granularity2 ; angular domain increment glindex = 0 while glindex < granularity scratchfloat2 = @lissaamp1 * cos(@lissafreq1*glindex*scratchfloat - \ @lissaphase1) ; r scratchfloat3 = @lissaamp2 * cos(@lissafreq2*glindex*scratchfloat - \ @lissaphase2) ; theta xcoord[glindex] = @nscale1 * scratchfloat2 * \ cos(scratchfloat3) ycoord[glindex] = @nscale1 * scratchfloat2 * \ sin(scratchfloat3) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[glindex] = xcoord[0] ; close the curve ycoord[glindex] = ycoord[0] vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) if @lissaopen ; do not connect the first and last points of the curve numbervertices = numbervertices - 1 cincrement = cincrement - 1 endif ; lissaopen elseif traparray == 221 ; "Moritz cyclic harmonic" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 ; for closing the curve cursality = 1 numbervertices = granularity2 ; vertices + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays glindex = 0 scratchfloat = moritzfreqD * twopi / (granularity + 1) ; angular increment scratchfloat2 = moritzfreqN / moritzfreqD ; cosine frequency while glindex < granularity scratchfloat3 = glindex * scratchfloat * scratchfloat2 ; current angle for Moritz curve scratchfloat4 = moritzconst + moritzamp * cos(scratchfloat3) ; r xcoord[glindex] = @nscale1 * scratchfloat4 * cos(glindex * scratchfloat) ycoord[glindex] = @nscale1 * scratchfloat4 * sin(glindex * scratchfloat) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[glindex] = xcoord[0] ycoord[glindex] = ycoord[0] vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) elseif traparray == 222 ; "elliptic lissajous" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; n + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays scratchfloat = lissajdomain/granularity2 ; angular domain increment glindex = 0 while glindex < granularity scratchfloat2 = abs(@lissaamp1 * cos(@lissafreq1*glindex*scratchfloat - \ @lissaphase1)) ; mu scratchfloat3 = @lissaamp2 * (#pi * (cos(@lissafreq2*glindex*scratchfloat - \ @lissaphase2))) + #pi ; nu xcoord[glindex] = @nscale1 * cosh(scratchfloat2) \ * cos(scratchfloat3) ycoord[glindex] = @nscale1 * sinh(scratchfloat2) \ * sin(scratchfloat3) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[glindex] = xcoord[0] ; close the curve ycoord[glindex] = ycoord[0] vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) if @lissaopen ; do not connect the first and last points of the curve numbervertices = numbervertices - 1 cincrement = cincrement - 1 endif ; lissaopen elseif traparray == 223 ; "bipolar lissajous" if @grain == "36" granularity = 36 elseif @grain == "72" granularity = 72 elseif @grain == "100" granularity = 100 elseif @grain == "200" granularity = 200 elseif @grain == "300" granularity = 300 else ; @grain == "400" granularity = 400 endif ; @grain granularity2 = granularity + 1 cursality = 1 numbervertices = granularity2 ; n + cursality for closed curves cincrement = granularity2 ; numbervertices/cursality ; initialize arrays scratchfloat = lissajdomain/granularity2 ; angular domain increment glindex = 0 while glindex < granularity scratchfloat2 = @lissaamp1 * cos(@lissafreq1*glindex*scratchfloat - \ @lissaphase1) ; tau scratchfloat3 = @lissaamp2 * #pi * cos(@lissafreq2*glindex*scratchfloat - \ @lissaphase2) ; sigma xcoord[glindex] = @nscale1 * sinh(scratchfloat2) \ / (cosh(scratchfloat2) - cos(scratchfloat3)) ycoord[glindex] = @nscale1 * sin(scratchfloat3) \ / (cosh(scratchfloat2) - cos(scratchfloat3)) vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) glindex = glindex + 1 endwhile ; glindex xcoord[glindex] = xcoord[0] ; close the curve ycoord[glindex] = ycoord[0] vertex[glindex] = xcoord[glindex] + flip(ycoord[glindex]) if @lissaopen ; do not connect the first and last points of the curve numbervertices = numbervertices - 1 cincrement = cincrement - 1 endif ; lissaopen endif ; traparray endif ; @traptype init: complex juliaconst = (0,0) bool dontbail = TRUE float testvalue = float barnsleyvalue = 0.0 complex ztemp = complex ztemp1 = complex ztemp2 = (0,0) complex tempc = (0,0) ; the trapped trap point complex traptemp = complex traptemp2 = (0,0) float tempangle = 0.0 ; angle of transformed, centered, etc., z float ftemp = float ftemp2 = float ftemp3 = float ftemp4 = 0.0 ; various uses; scratchpad variables float equation1 = float equation2 = 0.0 ; for heatmap option complex currentz = (0,0) if @mandy #z = #pixel, juliaconst = #pixel else ; Julia #z = #pixel, juliaconst = @jconstant endif complex testpt = complex minpt = complex maxpt = complex intersectpt = (0,0) float xtest = float ytest = 0.0 float tparam = 0.0 ; for parametric representation of line segments float disttemp = float distance = float seglength = 0.0 ; temp storage, length of current line segment float distmin = 1e20 ; initialize minimum distance to a high value int lindex = int lindex2 = 0 ; loop indices int cindex = 0 ; cursality index int maxlindex = int altindex = 0 float tempxx = float tempyy = float tempangleB = 0.0 complex result = (0,0) ; compatibility with older code float rotation = @rotate * degconversion if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation loop: if @heatmap #z = currentz ; restore proper z value endif ; @heatmap ztemp = #z ; save value for later ztemp1 = #z ; First, center #z on the trap center #z = #z - @center ; Compute rotated #z if rotation != 0.0 #z = #z * exp(flip(rotation)) endif ; rotation ; now, execute the trap to determine which value will be tested in the Barnsley test testpt = #z if @traptype == 0 ; "lines & points" xtest = real(testpt), ytest = imag(testpt) ; test #z against the various line segments defining the trap shape distmin = 1e20 cindex = 0 if cincrement != 1 ; test distance to each line segment while cindex < cursality lindex = cindex * cincrement, lindex2 = lindex + 1 maxlindex = (cindex + 1) * cincrement while lindex2 < maxlindex ; determine length of current line segment seglength = sqr(xcoord[lindex] - xcoord[lindex2]) + sqr(ycoord[lindex] - \ ycoord[lindex2]) ; now determine the parameter t for which the current #z is closest to ; the line containing the current line segment tparam = ((xtest - xcoord[lindex]) * (xcoord[lindex2] - xcoord[lindex]) + \ (ytest - ycoord[lindex]) * (ycoord[lindex2] - ycoord[lindex]))/seglength if tparam < 0.0 ; the intersect lies off the line segment, beyond the first vertex ; so return the distance to the first segment endpoint disttemp = sqr(xtest - xcoord[lindex]) + sqr(ytest - ycoord[lindex]) intersectpt = vertex[lindex] elseif tparam > 1.0 ; the intersect lies off the segment beyond the second vertex ; so return distance to the second segment endpoint disttemp = sqr(xtest - xcoord[lindex2]) + sqr(ytest - ycoord[lindex2]) intersectpt = vertex[lindex2] else ; #z lies on a line that intersects the current line segment perpendicularly ; to the closest point intersectpt = xcoord[lindex] + tparam * (xcoord[lindex2] - xcoord[lindex]) + \ flip(ycoord[lindex] + tparam * (ycoord[lindex2] - ycoord[lindex])) disttemp = sqr(xtest - real(intersectpt)) + sqr(ytest - imag(intersectpt)) endif ; tparam if disttemp < distmin distmin = disttemp minpt = intersectpt endif ; disttemp ; increment the loop indices lindex = lindex + 1 lindex2 = lindex2 + 1 endwhile ; lindex2 cindex = cindex + 1 endwhile ; cindex else ; cincrement = 1 --- return distance to individual points, not line segments while cindex < cursality disttemp = sqr(xtest - xcoord[cindex]) + sqr(ytest - ycoord[cindex]) intersectpt = vertex[cindex] if disttemp < distmin distmin = disttemp minpt = intersectpt endif ; disttemp ; increment the loop indices cindex = cindex + 1 endwhile ; cindex endif ; cincrement ; save the correct trap point tempxx = real(minpt) tempyy = imag(minpt) result = minpt elseif @traptype == 1 ; "polar functions" ; In 'polar functions', the variable ; tempxx is initially used to store the polar distance from #z, ; not the x-coordinate tempangleB = atan2(#z) if tempangleB < 0 tempangleB = tempangleB + twopi endif ; tempangleB disttemp = cabs(#z) distance = disttemp if !polarimplicit ; distance not determined implicitly if traparray == 0 ; "rose" tempxx = sin(rosepetals * tempangleB) elseif traparray == 1 ; "folium" tempxx = (sqr(sin(foliumperturb*tempangleB)) - \ folium) * cos(tempangleB) elseif traparray == 2 ; "cardioid" tempxx = cardioid + sin(cardioidperturb \ * tempangleB) elseif traparray == 3 ; "circle" tempxx = 1.0 elseif traparray == 4 ; "cissoid of Diocles" tempxx = sin(cissoidDioA*tempangleB) * \ tan(cissoidDioB*tempangleB) elseif traparray == 5 ; "cochleoid" tempxx = sin(cochleoid*tempangleB)/tempangleB elseif traparray == 7 ; "conchoid of De Sluze" tempxx = conchoidA*cos(conchoidB*tempangleB) + \ conchoidC/cos(conchoidB*tempangleB) elseif traparray == 8 ; "conchoid of Nicomedes" tempxx = conchoidA + \ conchoidC/cos(conchoidB*tempangleB) elseif traparray == 9 ; "cubical parabola" ftemp = cubicpC/cos(cubicpB*tempangleB) tempxx = sqrt(ftemp*ftemp*tan(cubicpA*tempangleB)) elseif traparray == 10 ; "ellipse" ftemp = abs(tan(tanfreq*tempangleB)) tempxx = majaxis*minaxis*sqrt(1+sqr(ftemp))/ \ (minaxis^epower + ((majaxis*ftemp)^epower))^ \ (1/epower) elseif traparray == 11 ; "folium of Descartes" ftemp = sin(fosinfreq*tempangleB) ftemp2 = cos(focosfreq*tempangleB) tempxx = sin(sinfreq2*tempangleB)/(ftemp*sqr(ftemp)+ftemp2*sqr(ftemp2)) elseif traparray == 12 ; "hyperbolic spiral" ftemp = cabs(ztemp) ; r ftemp2 = hyperbolic/ftemp ; angle ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral tempxx = 2.4 * cabs(ztemp - ztemp2) ; scaled distance between spiral pt and mod z elseif traparray == 13 ; "kampyle of Eudoxus" tempxx = 0.1/(cos(kampfreq*tempangleB)^kamppower) elseif traparray == 14 ; "kappa" tempxx = tan(nodalfreq*tempangleB) elseif traparray == 15 ; "lemniscate of Bernoulli" tempxx = cos(lemfreq*tempangleB)^lempower elseif traparray == 16 ; "limacon of Pascal" tempxx = limoffset + limamp*sin(limfreq*tempangleB) elseif traparray == 17 ; "lituus" tempxx = 1/(tempangleB^litpower) elseif traparray == 18 ; "logarithmic spiral" ftemp = cabs(ztemp) ; r of current modified z ftemp2 = (log(ftemp) - log(logspiA)) / logspiB ; angle of pt on spiral ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral tempxx = 2.4 * cabs(ztemp - ztemp2) ; scaled distance between spiral pt and mod z elseif traparray == 19 ; "parabola" tempxx = 0.25/(paraoffset - paraamp*cos(parafreq*tempangleB)) elseif traparray == 20 ; "parabolic spiral" ftemp = cabs(ztemp) ; r of current modified z ftemp2 = (ftemp * paraspioffset)^paraspi ; angle of pt on spiral ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral tempxx = 2.4 * cabs(ztemp - ztemp2) ; scaled distance between spiral pt and mod z elseif traparray == 21 ; "semicubical parabola" ftemp = tan(semicubtanfreq*tempangleB) tempxx = 0.25 * (ftemp^semicubpower)/cos(semicubcosfreq*tempangleB) elseif traparray == 22 ; "spiral of Archimedes" ftemp = cabs(ztemp) ; r of current modified z ftemp2 = ftemp * archspioffset ; angle of pt on spiral ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral tempxx = 2.4 * cabs(ztemp - ztemp2) ; scaled distance between spiral pt and mod z elseif traparray == 23 ; "strophoid" tempxx = 0.4 * cos(strophcosfreqA * tempangleB) / \ cos(strophcosfreqB * tempangleB) elseif traparray == 24 ; "Cayley's sextic" ftemp = cos(polarfreqA * tempangleB/3) tempxx = polarampA * ftemp * sqr(ftemp) elseif traparray == 25 ; "trisectrix limacon" tempxx = trilimA * (trilimB + trilimamp * cos(trilimfreq * \ tempangleB)) elseif traparray == 27 ; "trefoil of Habenicht" tempxx = trefoilconst + trefoilcosamp * \ cos(trefoilcossym * tempangleB) + \ trefoilsinamp * sqr(sin(trefoilsinsym * tempangleB)) elseif traparray == 28 ; "Cayley's sextic 2" ftemp = disttemp ; r if ftemp > 1.0 ftemp = 1 elseif ftemp < -1.0 ftemp = -1 endif; ftemp ftemp2 = 3 * polarfreqA * acos(ftemp^onethird) ; angle ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on curve tempxx = cabs(ztemp - ztemp2) ; scaled distance between curve pt and mod z elseif traparray == 29 ; "lituus 2" ftemp = disttemp ; r ftemp2 = 1 / (ftemp^litpower) ; angle ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on curve tempxx = cabs(ztemp - ztemp2) ; scaled distance between curve pt and mod z elseif traparray == 30 ; "hippopede" ftemp = 1 - polarampA * sqr(sin(polarfreqA * tempangleB)) if ftemp < 0 ftemp2 = -1 else ftemp2 = 1 endif ; ftemp tempxx = ftemp2 * sqrt(abs(1 - polarampA * sqr(sin(polarfreqA * \ tempangleB)))) elseif traparray == 31 ; "folioid" ftemp = folioidamp * cos(folioidfreqN * tempangleB / folioidfreqD) ftemp2 = 1 - sqr(folioidamp * sin(folioidfreqN * tempangleB / folioidfreqD)) if ftemp2 < 0 tempxx = 1e10 ; return a really big value else ftemp2 = sqrt(ftemp2) ftemp3 = ftemp + ftemp2 ; r1 ftemp4 = ftemp - ftemp2 ; r2 tempc = cos(folioidfreqD * tempangleB) + \ flip(sin(folioidfreqD * tempangleB)) traptemp = ftemp3 * ftemp ; first curve possibility traptemp2 = ftemp4 * ftemp ; second curve possibility -- which one is closest if cabs(ztemp - traptemp) < cabs(ztemp - traptemp2) tempxx = ftemp3 else tempxx = ftemp4 endif ; cabs() endif ; ftemp2 endif ; traparray tempxx = trapscales * tempxx distmin = tempxx result = tempxx * exp(flip(tempangleB)) tempxx = real(result) ; this now stores the proper x-coord of the trapped point tempyy = imag(result) ; the y-coordinate minpt = result else ; implicit polar function if traparray == 0 ; "rose" distance = disttemp - (sin(rosepetals * tempangleB)) elseif traparray == 1 ; "folium" distance = disttemp - ((sqr(sin(foliumperturb*tempangleB)) - \ folium) * cos(tempangleB)) elseif traparray == 2 ; "cardioid" distance = disttemp - (cardioid + sin(cardioidperturb \ * tempangleB)) elseif traparray == 3 ; "circle" distance = disttemp - 1.0 elseif traparray == 4 ; "cissoid of Diocles" distance = disttemp - (sin(cissoidDioA*tempangleB) * \ tan(cissoidDioB*tempangleB)) elseif traparray == 5 ; "cochleoid" distance = disttemp - (sin(cochleoid * tempangleB) / tempangleB) elseif traparray == 7 ; "conchoid of De Sluze" distance = disttemp - (conchoidA*cos(conchoidB*tempangleB) + \ conchoidC/cos(conchoidB*tempangleB)) elseif traparray == 8 ; "conchoid of Nicomedes" distance = disttemp - (conchoidA + \ conchoidC/cos(conchoidB*tempangleB)) elseif traparray == 9 ; "cubical parabola" ftemp = cubicpC/cos(cubicpB*tempangleB) distance = disttemp - (sqrt(ftemp*ftemp*tan(cubicpA*tempangleB))) elseif traparray == 10 ; "ellipse" ftemp = abs(tan(tanfreq*tempangleB)) distance = disttemp - (majaxis*minaxis*sqrt(1+sqr(ftemp))/ \ (minaxis^epower + ((majaxis*ftemp)^epower))^ \ (1/epower)) elseif traparray == 11 ; "folium of Descartes" ftemp = sin(fosinfreq*tempangleB) ftemp2 = cos(focosfreq*tempangleB) distance = disttemp - (sin(sinfreq2*tempangleB)/(ftemp*sqr(ftemp)+ftemp2*sqr(ftemp2))) elseif traparray == 12 ; "hyperbolic spiral" ftemp = cabs(ztemp) ; r ftemp2 = hyperbolic/ftemp ; angle ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral distance = disttemp - (2.4 * cabs(ztemp - ztemp2)) ; scaled distance between spiral pt and mod z elseif traparray == 13 ; "kampyle of Eudoxus" distance = disttemp - (0.1/(cos(kampfreq*tempangleB)^kamppower)) elseif traparray == 14 ; "kappa" distance = disttemp - (tan(nodalfreq*tempangleB)) elseif traparray == 15 ; "lemniscate of Bernoulli" distance = disttemp - (cos(lemfreq*tempangleB)^lempower) elseif traparray == 16 ; "limacon of Pascal" distance = disttemp - (limoffset + limamp*sin(limfreq*tempangleB)) elseif traparray == 17 ; "lituus" distance = disttemp - (1/(tempangleB^litpower)) elseif traparray == 18 ; "logarithmic spiral" ftemp = cabs(ztemp) ; r of current modified z ftemp2 = (log(ftemp) - log(logspiA)) / logspiB ; angle of pt on spiral ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral distance = disttemp - (2.4 * cabs(ztemp - ztemp2)) ; scaled distance between spiral pt and mod z elseif traparray == 19 ; "parabola" distance = disttemp - (0.25/(paraoffset - paraamp*cos(parafreq*tempangleB))) elseif traparray == 20 ; "parabolic spiral" ftemp = cabs(ztemp) ; r of current modified z ftemp2 = (ftemp * paraspioffset)^paraspi ; angle of pt on spiral ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral distance = disttemp - (2.4 * cabs(ztemp - ztemp2)) ; scaled distance between spiral pt and mod z elseif traparray == 21 ; "semicubical parabola" ftemp = tan(semicubtanfreq*tempangleB) distance = disttemp - (0.25 * (ftemp^semicubpower)/cos(semicubcosfreq*tempangleB)) elseif traparray == 22 ; "spiral of Archimedes" ftemp = cabs(ztemp) ; r of current modified z ftemp2 = ftemp * archspioffset ; angle of pt on spiral ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on spiral distance = disttemp - (2.4 * cabs(ztemp - ztemp2)) ; scaled distance between spiral pt and mod z elseif traparray == 23 ; "strophoid" distance = disttemp - (0.4 * cos(strophcosfreqA * tempangleB) / \ cos(strophcosfreqB * tempangleB)) elseif traparray == 24 ; "Cayley's sextic" ftemp = cos(polarfreqA * tempangleB/3) distance = disttemp - (polarampA * ftemp * sqr(ftemp)) elseif traparray == 25 ; "trisectrix limacon" distance = disttemp - (trilimA * (trilimB + trilimamp * \ cos(trilimfreq * tempangleB))) elseif traparray == 27 ; "trefoil of Habenicht" distance = disttemp - (trefoilconst + trefoilcosamp * \ cos(trefoilcossym * tempangleB) + \ trefoilsinamp * sqr(sin(trefoilsinsym * tempangleB))) elseif traparray == 28 ; "Cayley's sextic 2" ftemp = disttemp ; r if ftemp > 1.0 ftemp = 1 elseif ftemp < -1.0 ftemp = -1 endif; ftemp ftemp2 = 3 * polarfreqA * acos(ftemp^onethird) ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on curve distance = disttemp - cabs(ztemp - ztemp2) ; scaled distance between curve pt and mod z elseif traparray == 29 ; "lituus 2" ftemp = disttemp ; r ftemp2 = 1 / (ftemp^litpower) ; angle ztemp2 = ftemp * (cos(ftemp2) + flip(sin(ftemp2))) ; point on curve distance = disttemp - cabs(ztemp - ztemp2) ; scaled distance between curve pt and mod z elseif traparray == 30 ; "hippopede" distance = sqr(disttemp) - (1 - polarampA * sqr(sin(polarfreqA * \ tempangleB))) ; scaled distance between curve pt and mod z elseif traparray == 31 ; "folioid" distance = sqr(disttemp) + sqr(folioidconstB) - 2 * folioidconstB * \ disttemp * cos(folioidfreqN * tempangleB / folioidfreqD) \ - folioidconstA endif ; traparray ; if polarsmoothing ; ftemp = abs(distance)^polarsmoothmod ; else ; ftemp = sqrt(abs(distance)) ; endif ; polarsmoothing[] ; if abs(distance) == distance ; positive correction ; distcorrection = disttemp * trapscales + ftemp ; else ; negative correction ; distcorrection = disttemp * trapscales - ftemp ; endif ; abs() ; result = distcorrection * exp(flip(tempangleB)) result = distance * trapscales * exp(flip(tempangleB)) tempxx = real(result) tempyy = imag(result) minpt = result distmin = distance endif ; !polarimplicit[] elseif @traptype == 2 ; "parametric functions" tempangleB = atan2(#z) if tempangleB < 0 tempangleB = tempangleB + twopi endif ; tempangleB if traparray == 0 ; "hypocycloid" ftemp2 = hyponumer/hypodenom tempangleB = hypodenom * tempangleB ftemp = 1 - ftemp2 xtest = ftemp*cos(ftemp2*tempangleB) + ftemp2*cos(ftemp*tempangleB) ytest = ftemp*sin(ftemp2*tempangleB) - ftemp2*sin(ftemp*tempangleB) elseif traparray == 1 ; "companion of cycloid" ftemp = cycangle * tempangleB ; stretch out angle xtest = companC1 * ftemp ytest = companC2 - cos(companfreq * ftemp) ztemp = xtest + flip(ytest) ; the trap pt ftemp2 = cabs(ztemp) ; distance from origin to trap pt ztemp = ftemp2 * exp(1i * tempangleB) ; move trap pt to the same direction as initial (#z) pt xtest = real(ztemp) ; new x-coordinate after rotation ytest = imag(ztemp) ; new y-coordinate elseif traparray == 2 ; "cycloid" ftemp = cycangle * tempangleB ; stretch out angle xtest = cycxscale * ftemp - cycampA * sin(cycsinfreq \ * ftemp) ; x-coordinate of trap point ytest = cycyoffset - cycampB * cos(cyccosfreq * \ ftemp) ; y-coordinate of trap pt ztemp = xtest + flip(ytest) ; the trap pt ftemp2 = cabs(ztemp) ; distance from origin to trap pt ztemp = ftemp2 * exp(1i * tempangleB) ; move trap pt to the same direction as initial (#z) pt xtest = 0.2 * real(ztemp) ; new x-coordinate after rotation ytest = 0.2 * imag(ztemp) ; new y-coordinate elseif traparray == 3 ; "cycloid variant" ftemp = cycangle * tempangleB ; stretch out angle xtest = cycxscale * ftemp + cycampA * sin(cycsinfreq \ * ftemp) ; x-coordinate of trap point ytest = cycyoffset - cycampB * cos(cyccosfreq * \ ftemp) ; y-coordinate of trap pt ztemp = xtest + flip(ytest) ; the trap pt ftemp2 = cabs(ztemp) ; distance from origin to trap pt ztemp = ftemp2 * exp(1i * tempangleB) ; move trap pt to the same direction as initial (#z) pt xtest = 0.2 * real(ztemp) ; new x-coordinate after rotation ytest = 0.2 * imag(ztemp) ; new y-coordinate elseif traparray == 4 ; "epicycloid" ftemp3 = epicycAN / epicycAD tempangleB = epicycAD * tempangleB ftemp = ftemp3 + epicycC ftemp2 = ftemp3 * epicycB xtest = 0.16666666667 * (ftemp * cos(ftemp3 * tempangleB) - \ ftemp2 * cos(ftemp * tempangleB)) ytest = 0.16666666667 * (ftemp * sin(ftemp3 * tempangleB) - \ ftemp2 * sin(ftemp * tempangleB)) elseif traparray == 5 ; "nephroid" xtest = nephconstB * cos(tempangleB) - cos(nephcosfreq \ * tempangleB) ytest = nephconstA * sin(tempangleB) - sin(nephsinfreq \ * tempangleB) xtest = 0.2 * xtest ytest = 0.2 * ytest elseif traparray == 6 ; "hyperbola" xtest = paraconstA / cos(parafreqA * tempangleB) ytest = paraconstB * tan(parafreqB * tempangleB) elseif traparray == 7 ; "tractrix" xtest = paraconstA / cosh(parafreqA * tempangleB) ytest = tempangleB - paraconstB * tanh(parafreqB * tempangleB) elseif traparray == 8 ; "wavy circle" ftemp = wavyradius + wavysinamp * \ sin(wavysinfreq * tempangleB) xtest = ftemp * cos(tempangleB) ytest = ftemp * sin(tempangleB) elseif traparray == 9 ; "ellipse" xtest = paraxaxis * cos(tempangleB) ytest = parayaxis * sin(tempangleB) elseif traparray == 10 ; "serpentine" --- anguinea tempangleB = tempangleB - #pi ; -pi < angle < pi xtest = paraconstA * tan(onehalf * parafreqA * tempangleB) ytest = paraconstB * sin(parafreqB * tempangleB) elseif traparray == 11 ; "witch of Agnesi" tempangleB = onehalf * (tempangleB - #pi) ; -pi/2 < angle < pi/2 xtest = paraconstA * tan(parafreqA * tempangleB) ytest = paraconstB * sqr(cos(parafreqB * tempangleB)) elseif traparray == 12 ; "Abdank quadratrix" xtest = paraconstA * sin(parafreqA * tempangleB) ytest = onehalf * sqr(paraconstA) * (tempangleB + \ sin(parafreqA * tempangleB) * cos(parafreqB * tempangleB)) elseif traparray == 13 ; "cornoid" xtest = cos(2 * parafreqA * tempangleB) * cos(parafreqB * tempangleB) ytest = (2 + cos(2 * parafreqA * tempangleB)) * sin(parafreqB * tempangleB) elseif traparray == 14 ; "epicycloid 2" ftemp = epiradiusA / epiradiusB ; parameter "q" ftemp2 = ftemp + 1 ftemp = 1/ftemp xtest = ftemp * epiradiusA * (ftemp2 * cos(tempangleB) - \ cos(ftemp2 * tempangleB)) ytest = ftemp * epiradiusA * (ftemp2 * sin(tempangleB) - \ sin(ftemp2 * tempangleB)) elseif traparray == 15 ; "epitrochoid" ftemp = epiradiusA / epiradiusB ; parameter "q" ftemp2 = ftemp + 1 ftemp = 1/ftemp ftemp3 = epiradiusC / epiradiusB ; parameter "k" xtest = ftemp * epiradiusA * (ftemp2 * cos(tempangleB) - \ ftemp3 * cos(ftemp2 * tempangleB)) ytest = ftemp * epiradiusA * (ftemp2 * sin(tempangleB) - \ ftemp3 * sin(ftemp2 * tempangleB)) endif ; traparray result = trapscales * (xtest + flip(ytest)) tempxx = real(result) tempyy = imag(result) minpt = result distmin = sqrt(sqr(tempxx = real(#z)) + sqr(tempyy - imag(#z))) elseif @traptype == 3 ; "cartesian" ztemp = #z tempangleB = atan2(ztemp) if tempangleB < 0 tempangleB = tempangleB + twopi endif ; tempangleB ztemp = ztemp * trapscales xtest = real(ztemp) ytest = imag(ztemp) ftemp = sqr(xtest) ftemp2 = sqr(ytest) if traparray == 0 ; "ampersand" distance = (ftemp2 - ftemp) * (xtest - 1 ) * (2 * xtest - 3) \ - 4 * sqr((ftemp + ftemp2 - 2 * xtest)) elseif traparray == 1 ; "Alain's curve" distance = sqr(ftemp - ftemp2) - cartxcoeff * ftemp + \ cartycoeff * ftemp2 elseif traparray == 2 ; "arcs of Samothrace" distance = cartxcoeff * ftemp * sqr((3 * ftemp - \ ftemp2)) - cartycoeff * ftemp2 * (ftemp + ftemp2) elseif traparray == 3 ; "astroid" distance = cartxcoeff * ftemp^onethird + cartycoeff \ * ftemp2^onethird - cartconst elseif traparray == 4 ; "atriphthaloid" distance = sqr(ftemp) * (cartxcoeff * ftemp + cartycoeff * \ ftemp2) - sqr(cartconst * ftemp - cartconstB) elseif traparray == 5 ; "bean curve 1" distance = sqr(cartxcoeff * ftemp + cartycoeff * ftemp2) \ - cartconst * xtest * ftemp - cartconstB * \ ytest * ftemp2 elseif traparray == 6 ; "bean curve 2" distance = cartxcoeff * sqr(ftemp) + ftemp * ftemp2 + \ cartycoeff * sqr(ftemp2) - xtest * (cartconst * \ ftemp + cartconstB * ftemp2) elseif traparray == 7 ; "beetle curve" distance = (ftemp + ftemp2) * sqr(ftemp + ftemp2 - cartxcoeff * \ xtest - cartycoeff * ytest) - cartconst * ftemp \ * ftemp2 elseif traparray == 8 ; "bicorn" distance = cartycoeff * ftemp2 * (cartconst - \ cartxcoeff * ftemp) - sqr(ftemp + 2 * cartconstB * ytest - \ cartconst) elseif traparray == 9 ; "bicuspid" distance = sqr(cartycoeff * ftemp2 - cartconst) - \ (xtest + cartconst) * (cartconst - cartxcoeff \ * xtest)^3 elseif traparray == 10 ; "biquartic of Sacre" ftemp3 = sqr(ftemp) ; xtest^4 ftemp4 = sqr(ftemp2) ; ytest^4 distance = sqr(ftemp3) + 4 * ftemp*ftemp3*ytest + ytest*ftemp2*(ytest-1) \ + 3*ftemp3*ytest*(2*ytest-3) + 2*ftemp*ftemp2*(2*ytest+3) elseif traparray == 11 ; "cubic egg" distance = ftemp + ftemp2 / (1 + cartconst * xtest) - 1 elseif traparray == 12 ; "Bolza curve" distance = ftemp2 - xtest * sqr(ftemp) + xtest elseif traparray == 13 ; "bow curve" distance = sqr(ftemp) - ftemp * ytest + ytest * ftemp2 elseif traparray == 14 ; "bullet nose curve" distance = 1/ftemp - 1/ftemp2 - 1 elseif traparray == 15 ; "butterfly sextic" distance = sqr(ftemp * xtest) + sqr(ftemp2 * ytest) - ftemp elseif traparray == 16 ; "butterfly 2" distance = (ftemp + ftemp2) * sqr(ftemp) - sqr(ftemp - ftemp2) elseif traparray == 17 ; "cardioid" distance = sqr(ftemp + ftemp2 - 2 * cartconst * xtest) - \ sqr(cartconst) * (ftemp + ftemp2) elseif traparray == 18 ; "Cartesian oval" ftemp3 = cartconst - cartconstB ftemp4 = 2 * (cartconst + cartconstB) distance = sqr(ftemp3 * (ftemp + ftemp2 + 1) - ftemp4 * xtest) - \ ftemp4 * (ftemp + ftemp2 + 1) - 4 * ftemp3 * xtest + 1 elseif traparray == 19 ; "Cassini oval" distance = sqr(ftemp + ftemp2) + 2 * (ftemp - ftemp2) - cartconst elseif traparray == 20 ; "catenary" distance = ytest - cartconst * cosh(xtest / cartconstB) elseif traparray == 21 ; "Cayley's sextic" distance = 4 * (ftemp + ftemp2 - cartconst * xtest)^3 - 27 * \ sqr(cartconst*(ftemp + ftemp2)) elseif traparray == 22 ; "Ceva's trisectrix" distance = (ftemp + ftemp2)^3 - sqr((cartconst + 1) * ftemp - \ (cartconst - 1) * ftemp2) elseif traparray == 23 ; "Chasles cubic" distance = ytest - cartxcoeff * xtest * ftemp - cartycoeff * ftemp * ytest - \ cartconst * xtest * ftemp2 - cartconstB * ytest * ftemp2 elseif traparray == 24 ; "circle" distance = ftemp + ftemp2 - cartconst elseif traparray == 25 ; "circular cubic" distance = xtest * (ftemp + ftemp2) + cartxcoeff * ftemp + cartycoeff * ftemp2 \ + cartconst * xtest + cartconstB * ytest + cartconstC elseif traparray == 26 ; "cissoid of Diocles" distance = xtest * (ftemp + ftemp2) - cartconst * ftemp2 elseif traparray == 27 ; "clinoid" distance = ytest - cartconst * exp(cartxcoeff * xtest) \ - cartconstB * exp(-cartycoeff * xtest) elseif traparray == 28 ; "cochleoid" distance = cartconst * ytest / xtest - tan(cartconstB * ytest / \ (ftemp + ftemp2)) elseif traparray == 29 ; "conchoid of circle" distance = sqr(ftemp + ftemp2 + cartconst - cartconstB) * (ftemp2 \ + sqr(xtest + cartconstC)) - 4 * cartconst * sqr(xtest * (xtest + \ cartconstC) + ftemp2) elseif traparray == 30 ; "conchoid of Nicomedes" distance = sqr(xtest - cartconst) * (ftemp + ftemp2) - cartconstB * ftemp elseif traparray == 31 ; "conchoid of de Sluze" distance = cartconst * (xtest + cartconstB) * (ftemp + ftemp2) - \ cartconstC * ftemp elseif traparray == 32 ; "cornoid" ftemp3 = sqr(ftemp) ftemp4 = sqr(ftemp2) distance = ftemp * ftemp3 + ftemp2 * ftemp4 + 3 * (ftemp3 * ftemp2 + ftemp * ftemp4 \ + ftemp3) - 5 * ftemp4 + 8 * ftemp2 - 4 elseif traparray == 33 ; "cross curve" distance = cartxcoeff * (ftemp - cartycoeff * (ftemp / ftemp2)) - 1 elseif traparray == 34 ; "cubic of Apollonius" distance = (xtest - cartconst) * (ftemp + ftemp2) + cartconstB * \ xtest + cartconstC * ytest elseif traparray == 35 ; "cranoid" distance = sqr(ftemp + ftemp2) - 2 * ftemp2 * (xtest + ytest) + cartconst * \ (cartconstB -1) * ftemp + (1 - cartconst) * ftemp elseif traparray == 36 ; "Jerabek curve" distance = (ftemp + ftemp2) * sqr(xtest - cartconst) - cartconstB * \ sqr(ftemp + ftemp2 - cartconst * xtest) elseif traparray == 37 ; "Rosillo curve" distance = ftemp2 * sqr(cartconst - xtest) - sqr(cartconstB - xtest) \ * (cartconstC - ftemp) elseif traparray == 38 ; "deltoid" distance = sqr(ftemp + ftemp2) + 8 * cartconst * xtest * (ftemp - 3 * \ ftemp2) + 18 * sqr(cartconst) * (ftemp + ftemp2) - 27 * \ sqr(sqr(cartconst)) elseif traparray == 39 ; "devil's curve" distance = cartycoeff * sqr(ftemp2) - ftemp2 - cartxcoeff * \ sqr(ftemp) + cartconst * ftemp elseif traparray == 40 ; "dipole curve" ftemp3 = ftemp + ftemp2 distance = cartconst * sqr(ftemp3) * ftemp3 - cartxcoeff * ftemp elseif traparray == 41 ; "double egg" ftemp3 = ftemp + ftemp2 distance = cartconst * sqr(ftemp3) * ftemp3 - sqr((cartconstB \ + 1) * ftemp - (cartconst - 1) * ftemp2) elseif traparray == 42 ; "double folium" distance = cartconst * (ftemp + ftemp2) - (cartxcoeff * xtest + \ cartycoeff * ytest) * ftemp elseif traparray == 43 ; "double U curve" distance = ftemp2 * (cartconst - cartxcoeff * ftemp) - \ sqr(cartconst) elseif traparray == 44 ; "dumbbell curve" ftemp3 = sqr(ftemp) distance = cartycoeff * ftemp2 - ftemp3 + cartxcoeff * ftemp * ftemp3 elseif traparray == 45 ; "cubic duplicatrix" distance = cartycoeff * ftemp2 - cartxcoeff * ftemp * \ (xtest + cartconst) elseif traparray == 46 ; "Durer's conchoid" distance = sqr(cartxcoeff * ftemp + xtest * ytest + xtest - \ cartconst) - (cartconst - ftemp) * sqr(xtest - ytest + \ cartconstB) elseif traparray == 47 ; "Sillke's egg of Columbus" distance = cartxcoeff * sqr(ftemp2) + 10 * ftemp2 * ftemp + 5 * \ cartxcoeff * sqr(ftemp) - ytest elseif traparray == 48 ; "Granville's egg" distance = cartconstC * ftemp * ftemp2 - (xtest - cartconstB) * \ (cartconst - xtest) elseif traparray == 49 ; "Kepler's egg" distance = sqr(cartxcoeff * ftemp + cartycoeff * ftemp2) - \ cartconst * ftemp * xtest elseif traparray == 50 ; "eight curve" distance = sqr(ftemp) - cartconst * (cartxcoeff * ftemp - \ cartycoeff * ftemp2) elseif traparray == 51 ; "ellipse" distance = ftemp + cartconst * ftemp2 - 1 elseif traparray == 52 ; "superellipse" distance = cartxcoeff * abs(xtest)^cartexexp + \ cartycoeff * abs(ytest)^carteyexp - 1 elseif traparray == 53 ; "fish quartic" distance = cartconst * sqr(2 * ftemp + ftemp2) - 2 * xtest * sqrt(2.0) \ * (2 * ftemp - 3 * ftemp2) + 2 * cartconstB *(ftemp2 - ftemp) elseif traparray == 54 ; "conic focal conchoid" ftemp3 = ftemp + ftemp2 distance = sqr(ftemp3 - conchmod * coniceccent * \ xtest) - ftemp3 * sqr(coniceccent * xtest - conchmod - 1) elseif traparray == 55 ; "folium 1" distance = sqr(ftemp + ftemp2) + cartxcoeff * xtest * ftemp - \ (1 - cartxcoeff) * xtest * ftemp2 elseif traparray == 56 ; "folium 2" distance = sqr(ftemp + ftemp2) - cartxcoeff * xtest * \ (ftemp - ftemp2) elseif traparray == 57 ; "folium of Descartes" distance = xtest * ftemp + ytest * ftemp2 - cartconst * xtest * ytest elseif traparray == 58 ; "Durer's folium" distance = (ftemp + ftemp2) * sqr(cartconst * (ftemp + ftemp2) - \ cartconstB) - ftemp elseif traparray == 59 ; "Gaussian curve" distance = ytest - cartconst * exp(-sqr(xtest)) elseif traparray == 60 ; "Beutel heart" ftemp3 = ftemp + ftemp2 - 1 distance = cartconst * ftemp3 * sqr(ftemp3) - cartconstB * \ ftemp * ftemp2 elseif traparray == 61 ; "Proclus hippopede" distance = cartconst * sqr(ftemp + ftemp2) - cartxcoeff * \ ftemp - cartycoeff * ftemp2 elseif traparray == 62 ; "Hoerl curve" distance = ytest - cartxcoeff * xtest^cartconst * exp( \ cartconstB * xtest) elseif traparray == 63 ; "Humbert cubic" distance = cartxcoeff * xtest * ftemp - 3 * cartycoeff * \ xtest * ftemp2 - cartconst elseif traparray == 64 ; "hyperbola" distance = cartxcoeff * xtest^(2 * cartconst) - \ cartycoeff * ytest^(2 * cartconstB) - cartconstC elseif traparray == 65 ; "hyperbola 2" distance = xtest * ytest - cartconst elseif traparray == 66 ; "illumination curve" ftemp3 = ftemp + 1 distance = ftemp2 * ftemp3 * sqr(ftemp3) - cartconst elseif traparray == 67 ; "kampyle of Eudoxus" distance = cartycoeff * ftemp2 - sqr(ftemp) + cartxcoeff * ftemp elseif traparray == 68 ; "kappa curve" distance = cartycoeff * (ftemp + ftemp2) * ftemp2 - cartxcoeff \ * ftemp elseif traparray == 69 ; "Kiepert's curve" ftemp3 = cartconst - cartxcoeff * ftemp distance = cartycoeff * ftemp2 - ftemp3 * sqr(ftemp3) elseif traparray == 70 ; "kieroid" distance = ftemp2 * sqr(xtest - cartconst) + ftemp * sqr(xtest - \ cartconstB) - cartconstC * ftemp elseif traparray == 71 ; "kiss curve" ftemp3 = cartconst - ftemp distance = cartycoeff * ftemp2 - ftemp3 * sqr(ftemp3) elseif traparray == 72 ; "Klein quartic" ftemp3 = sqrt(3) distance = sqr(ftemp + ftemp2 - 0.5 * cartconst * sqr(cartconstB)) - \ 0.25 * cartconstC * cartconstB * (ytest - cartconstB + \ ftemp3 * xtest) * (ytest - cartconstB - ftemp3 * xtest) * \ (2 * ytest + cartconstB) elseif traparray == 73 ; "Kulp quartic" distance = ftemp2 * (cartconst + ftemp) - cartconstB elseif traparray == 74 ; "limacon of Pascal" distance = sqr(ftemp + ftemp2 - cartconst * ytest) - ftemp - ftemp2 elseif traparray == 75 ; "links curve" distance = cartconst * sqr(cartxcoeff * ftemp + cartycoeff * ftemp2) - \ 4 * cartconstB * ftemp * (cartconstC * 2 - xtest) elseif traparray == 76 ; "Lissajous sextic" distance = ftemp * sqr(4 * ftemp - 3 * cartconst) + 4 * cartconst * ftemp2 * \ (ftemp2 - cartconst) elseif traparray == 77 ; "Lissajous quartic" distance = 2 * cartconst * sqr(2 * ftemp - sqr(cartconstB)) - cartconstB * \ (2 * ytest - sqr(cartconstB)) * (ytest + cartconstB) elseif traparray == 78 ; "logistic curve" distance = cartycoeff * ytest - recip(cartconst + cartconstB * \ exp(cartxcoeff * xtest)) elseif traparray == 79 ; "Maltese cross" ftemp3 = ftemp + ftemp2 distance = cartconst * ftemp3 * sqr(ftemp3) - cartconstB * ftemp * (ftemp + \ 20 * cartconstC * ftemp2) + 8 * cartconstB * ftemp2 * (ftemp2 + 2 * \ cartconstB) elseif traparray == 80 ; "semicubical parabola" distance = cartycoeff * ftemp2 - cartxcoeff * xtest * ftemp elseif traparray == 81 ; "diverging parabola" distance = cartycoeff * ftemp2 - cartxcoeff * xtest * (ftemp + cartconst) elseif traparray == 82 ; "nephroid" ftemp3 = ftemp + ftemp2 - 4 * cartconst distance = ftemp3 * sqr(ftemp3) - 108 * cartconstB * ftemp2 elseif traparray == 83 ; "Freeth's nephroid" distance = (ftemp + ftemp2) * sqr(ftemp + ftemp2 - sqr(cartconst)) - 4 * sqr(cartconst) \ * sqr(ftemp + ftemp2 - cartconst) elseif traparray == 84 ; "nodal curve" distance = cartconst * ftemp * ftemp2 * (cartxcoeff * ftemp + cartycoeff * \ ftemp2) - sqr(cartconstB * ftemp - cartconstC * ftemp2) elseif traparray == 85 ; "strophoid" distance = cartconst * xtest * (cartxcoeff * ftemp + cartycoeff * ftemp2) \ + cartconstB * (cos(cartconstB * (cartxcoeff * ftemp - cartycoeff * \ ftemp2)) + 2 * sin(cartconstB * xtest * ytest)) elseif traparray == 86 ; "ophiuride" distance = cartxcoeff * xtest * ftemp + xtest * ftemp2 - cartycoeff * ftemp2 + \ cartconst * xtest * ytest elseif traparray == 87 ; "parabola" distance = cartycoeff * ytest - cartxcoeff * ftemp elseif traparray == 88 ; "parabola 2" distance = cartycoeff * ytest - cartxcoeff * ftemp + cartconst elseif traparray == 89 ; "parabolic trifolium" distance = ftemp * (cartxcoeff * ftemp + cartycoeff * ftemp2) - cartconst \ * ytest * (cartxcoeff * ftemp - cartycoeff * ftemp2) elseif traparray == 90 ; "piriform" distance = cartycoeff * ftemp2 - cartxcoeff * xtest * ftemp * \ (cartconst - xtest) elseif traparray == 91 ; "pearls of de Sluze" distance = cartycoeff * ytest^cartconst - cartxcoeff * \ xtest^cartconstB * (1 - xtest)^cartconstC elseif traparray == 92 ; "pursuit curve" distance = cartycoeff * ytest - xtest^(cartconstB + cartconst) / \ (cartconstB + cartconst) + xtest^(2 * cartconstC - cartconst) \ / (2 * cartconstC - cartconst) elseif traparray == 93 ; "quadratrix" distance = cartycoeff * ytest - cartxcoeff * xtest / (cartconst * \ tan(cartconstB * xtest)) elseif traparray == 94 ; "quadrifolium" ftemp3 = ftemp + ftemp2 distance = cartconst * ftemp3 * sqr(ftemp3) - cartconstB * ftemp * ftemp2 elseif traparray == 95 ; "trifolium" distance = cartconst * sqr(ftemp + ftemp2) - cartconstB * xtest * (ftemp - \ cartconstC * 3 * ftemp2) elseif traparray == 96 ; "right strophoid" distance = cartycoeff * ftemp2 - cartxcoeff * ftemp * ((cartconst + \ xtest)/(cartconstB - xtest)) elseif traparray == 97 ; "scarabaeus" ftemp3 = ftemp + ftemp2 distance = cartconst * ftemp3 * (ftemp3 + cartconstB * xtest) - \ cartconstC * (ftemp - ftemp2) elseif traparray == 98 ; "scyphoid" distance = cartxcoeff * sqr(ftemp) - cartycoeff * sqr(ftemp2) - \ cartconst * xtest * ftemp2 elseif traparray == 99 ; "anguinea" distance = cartycoeff * ytest - cartconstB * cartconst * xtest / \ (ftemp + sqr(cartconst)) elseif traparray == 100 ; "damped sine" distance = cartycoeff * ytest - cartconst * sin(cartconstB * xtest) / \ (cartxcoeff * xtest) elseif traparray == 101 ; "catastrophic sine" distance = cartycoeff * ytest - (cartconst * xtest + cartconstB) * \ cartconstC * sin(cartxcoeff * xtest) elseif traparray == 102 ; "plane spiric" distance = cartconst * sqr(ftemp + ftemp2) + cartxcoeff * ftemp + cartycoeff * \ ftemp2 + cartconstB * xtest + cartconstC elseif traparray == 103 ; "spiric of Perseus" distance = sqr(ftemp + ftemp2 - cartconst + cartconstB) - 4 * cartconstC \ * (ftemp + cartconstB) elseif traparray == 104 ; "svastika" distance = 2 * cartconst * xtest * ytest - cartxcoeff * sqr(ftemp) + \ cartycoeff * sqr(ftemp2) elseif traparray == 105 ; "syntractrix" ftemp3 = sqr(cartconst) ftemp4 = sqrt(ftemp3 - ftemp2) distance = cartxcoeff * xtest + ftemp4 - cartconstB * log((cartconst + \ ftemp4) / (cartycoeff * ytest)) elseif traparray == 106 ; "tetracuspid" distance = cartxcoeff * ftemp + cartycoeff * ftemp2 - cartconst + \ 27 * cartconstB * ftemp * ftemp2 elseif traparray == 107 ; "siluroid" distance = cartconst * sqr(ftemp + ftemp2) - cartxcoeff * xtest * (ftemp - ftemp2) elseif traparray == 108 ; "trisectrix of Longchamps" distance = cartconst * xtest * (ftemp - 3 * ftemp2) - cartxcoeff * ftemp - \ cartycoeff * ftemp2 elseif traparray == 109 ; "trident" distance = cartycoeff * ytest - cartxcoeff * ftemp - cartconst / xtest elseif traparray == 110 ; "trisectrix of Delanges" ftemp3 = ftemp + ftemp2 distance = cartconstB * sqr(ftemp3 - cartconst) - ftemp * ftemp3 elseif traparray == 111 ; "trisectrix of Maclaurin" distance = cartxcoeff * xtest * ftemp + cartconst * xtest * ftemp2 - \ 3 * cartconstB * ftemp - cartycoeff * ftemp2 elseif traparray == 112 ; "Trott curve" distance = 144 * cartconst * (sqr(ftemp) + sqr(ftemp2)) - 225 * cartconstB * \ (ftemp + ftemp2) + 350 * cartconstC * ftemp * ftemp2 + 81 * cartxcoeff elseif traparray == 113 ; "Tschirnhausen's cubic" distance = cartycoeff * ftemp2 - cartxcoeff * ftemp * (cartconst * \ xtest + cartconstB) elseif traparray == 114 ; "visiera" distance = cartxcoeff * xtest * (ftemp + ftemp2) - cartconst * (ftemp + 2 * \ cartycoeff * ftemp2) elseif traparray == 115 ; "resonance curve" distance = cartycoeff * ytest - (cartconst / (cartconstB + \ cartxcoeff * ftemp)) elseif traparray == 116 ; "Watt's curve" ftemp3 = ftemp + ftemp2 ftemp4 = sqr(ftemp3) distance = ftemp3 * ftemp4 - 2 * cartconst * ftemp4 + cartconstB * \ (xtest + 4 * ftemp2) * ftemp3 - cartconstC * ftemp2 elseif traparray == 117 ; "witch of Agnesi" distance = cartxcoeff * ftemp * ytest - sqr(cartconst) * \ (cartconst - cartycoeff) endif ; traparray ; if cartsmooth[oindex] < 0.99 || cartsmooth[oindex] > 1.01 ; distance = distance^cartsmooth[oindex] ; endif ; cartsmooth[] distmin = cabs(ztemp) + distance result = distmin * exp(flip(tempangleB)) tempxx = real(result) tempyy = imag(result) minpt = result endif ; @traptype if @trapmode == "distance" testvalue = distmin elseif @trapmode == "cabs" testvalue = |minpt| elseif @trapmode == "real" testvalue = abs(real(minpt)) elseif @trapmode == "imag" testvalue = abs(imag(minpt)) elseif @trapmode == "real 2" testvalue = real(minpt) elseif @trapmode == "imag 2" testvalue = imag(minpt) elseif @trapmode == "sum" testvalue = real(minpt) + imag(minpt) elseif @trapmode == "sum 2" testvalue = abs(real(minpt)) + abs(imag(minpt)) elseif @trapmode == "sum 3" testvalue = sqr(real(minpt)) + sqr(imag(minpt)) elseif @trapmode == "product" testvalue = real(minpt) * imag(minpt) elseif @trapmode == "product 2" testvalue = abs(real(minpt)) * abs(imag(minpt)) elseif @trapmode == "product 3" testvalue = sqr(real(minpt) * imag(minpt)) elseif @trapmode == "difference" testvalue = real(minpt) - imag(minpt) elseif @trapmode == "difference 2" testvalue = abs(real(minpt) - imag(minpt)) elseif @trapmode == "difference 3" testvalue = sqr(real(minpt) - imag(minpt)) endif ; @trapmode ; apply an optional function if @testfunction != "none" if @testfunction == "sin" ; sine function testvalue = sin(testvalue) elseif @testfunction == "cos" ; cosine testvalue = cos(testvalue) elseif @testfunction == "tan" ; tangent testvalue = tan(testvalue) elseif @testfunction == "cot" ; cotangent testvalue = cotan(testvalue) elseif @testfunction == "sec" ; secant testvalue = 1/cos(testvalue) elseif @testfunction == "csc" ; cosecant testvalue = 1/sin(testvalue) elseif @testfunction == "ver" ; versine testvalue = 1 - cos(testvalue) elseif @testfunction == "vcs" ; vercosine testvalue = 1 + cos(testvalue) elseif @testfunction == "cvs" ; coversine testvalue = 1 - sin(testvalue) elseif @testfunction == "cvc" ; covercosine testvalue = 1 + sin(testvalue) elseif @testfunction == "exs" ; exsecant testvalue = 1/cos(testvalue) - 1 elseif @testfunction == "exc" ; excosecant testvalue = 1/sin(testvalue) - 1 elseif @testfunction == "crd" ; chord testvalue = 2 * sin(testvalue/2) elseif @testfunction == "asin" ; arcsine testvalue = asin(testvalue - trunc(testvalue)) elseif @testfunction == "acos" ; arccosine testvalue = acos(testvalue - trunc(testvalue)) elseif @testfunction == "atan" ; arctangent testvalue = atan(testvalue) elseif @testfunction == "acot" ; arccotangent testvalue = halfpi - atan(testvalue) elseif @testfunction == "asec" ; arcsecant testvalue = acos(1/testvalue - trunc(1/testvalue)) elseif @testfunction == "acsc" ; arccosecant testvalue = asin(1/testvalue - trunc(1/testvalue)) elseif @testfunction == "aver" ; arcversine testvalue = acos(1 - testvalue - trunc(1-testvalue)) elseif @testfunction == "avcs" ; arcvercosine testvalue = acos(1 + testvalue - trunc(1+testvalue)) elseif @testfunction == "acvs" ; arccoversine testvalue = asin(1 - testvalue - trunc(1-testvalue)) elseif @testfunction == "acvc" ; arccovercosine testvalue = asin(1 + testvalue - trunc(1+testvalue)) elseif @testfunction == "aexs" ; arcexsecant testvalue = acos( (1/(testvalue+1)) - trunc( (1/(testvalue+1)) ) ) elseif @testfunction == "aexc" ; arcexcosecant testvalue = asin( (1/(testvalue+1)) - trunc( (1/(testvalue+1)) ) ) elseif @testfunction == "acrd" ; arcchord testvalue = 2 * asin( testvalue/2 - trunc(testvalue/2) ) elseif @testfunction == "exp" ; exponential testvalue = exp(testvalue) elseif @testfunction == "exp(-n)" ; negative exponential testvalue = exp(-testvalue) elseif @testfunction == "exp(1/n)" ; recip exponential testvalue = exp(1/testvalue) elseif @testfunction == "exp(-1/n)" ; neg recip exponential testvalue = exp(-1/testvalue) elseif @testfunction == "exp(n^2)" ; z^2 exponential testvalue = exp(sqr(testvalue)) elseif @testfunction == "exp(-n^2)" ; -z^2 exponential testvalue = exp(-sqr(testvalue)) elseif @testfunction == "exp(1/n^2)" ; recip z^2 exponential testvalue = exp(1/sqr(testvalue)) elseif @testfunction == "exp(-1/n^2)" ; -recip z^2 exponential testvalue = exp(-1/sqr(testvalue)) elseif @testfunction == "sinh" ; hyperbolic sine testvalue = sinh(testvalue) elseif @testfunction == "asinh" ; inverse hyperbolic sine testvalue = asinh(testvalue) elseif @testfunction == "cosh" ; hyperbolic cosine testvalue = cosh(testvalue) elseif @testfunction == "acosh" ; inverse hyperbolic cosine testvalue = acosh(testvalue) elseif @testfunction == "tanh" ; hyperbolic tangent testvalue = tanh(testvalue) elseif @testfunction == "atanh" ; inverse hyperbolic tangent testvalue = atanh(testvalue) elseif @testfunction == "cotanh" ; hyperbolic cotangent testvalue = cotanh(testvalue) elseif @testfunction == "sqr" ; square testvalue = sqr(testvalue) elseif @testfunction == "sqrt" ; square root testvalue = sqrt(testvalue) elseif @testfunction == "power" ; power testvalue = testvalue^@testpower elseif @testfunction == "log" ; logarithm testvalue = log(testvalue) elseif @testfunction == "log(-n)" ; testvalue = log(-testvalue) elseif @testfunction == "log(1/n)" ; testvalue = log(1/testvalue) elseif @testfunction == "log(-1/n)" ; testvalue = log(-1/testvalue) elseif @testfunction == "1/n" ; reciprocal testvalue = 1/testvalue elseif @testfunction == "absolute value" ; absolute value testvalue = abs(testvalue) elseif @testfunction == "ceiling" ; ceiling testvalue = ceil(testvalue) elseif @testfunction == "floor" ; floor testvalue = floor(testvalue) elseif @testfunction == "truncation" ; truncation testvalue = trunc(testvalue) elseif @testfunction == "rounding" ; rounding testvalue = round(testvalue) elseif @testfunction == "asin 2" ; arcsine testvalue = asin(testvalue) elseif @testfunction == "acos 2" ; arccosine testvalue = acos(testvalue) elseif @testfunction == "atan 2" ; arctangent testvalue = atan2(testvalue) elseif @testfunction == "acot 2" ; arccotangent testvalue = halfpi - atan2(testvalue) elseif @testfunction == "asec 2" ; arcsecant testvalue = acos(1/testvalue) elseif @testfunction == "acsc 2" ; arccosecant testvalue = asin(1/testvalue) elseif @testfunction == "aver 2" ; arcversine testvalue = acos(1 - testvalue) elseif @testfunction == "avcs 2" ; arcvercosine testvalue = acos(1 + testvalue) elseif @testfunction == "acvs 2" ; arccoversine testvalue = asin(1 - testvalue) elseif @testfunction == "acvc 2" ; arccovercosine testvalue = asin(1 + testvalue) elseif @testfunction == "aexs 2" ; arcexsecant testvalue = acos( (1/(testvalue+1))) elseif @testfunction == "aexc 2" ; arcexcosecant testvalue = asin( (1/(testvalue+1))) elseif @testfunction == "acrd 2" ; arcchord testvalue = 2 * asin( testvalue/2 ) elseif @testfunction == "log(n^2)" ; testvalue = log(sqr(testvalue)) elseif @testfunction == "log(-n^2)" ; testvalue = log(-sqr(testvalue)) elseif @testfunction == "log(1/n^2)" ; testvalue = log(1/sqr(testvalue)) elseif @testfunction == "log(-1/n^2)" ; testvalue = log(-1/sqr(testvalue)) elseif @testfunction == "log log" ; testvalue = log( log(testvalue) ) elseif @testfunction == "exp(exp)" ; testvalue = exp( exp(testvalue) ) elseif @testfunction == "n^n" ; testvalue = testvalue^testvalue elseif @testfunction == "n^n^n" ; testvalue = testvalue^(testvalue^testvalue) elseif @testfunction == "constant^n" ; testvalue = @testbase^testvalue elseif @testfunction == "constant^n^n" ; testvalue = @testbase^(testvalue^testvalue) endif ; @testfunction endif ; @testfunction testvalue = testvalue + @testadjustment if @fixbug #z = ztemp endif ; @fixbug if @barnsleymode == "cabs" barnsleyvalue = |#z| elseif @barnsleymode == "real" barnsleyvalue = abs(real(#z)) elseif @barnsleymode == "imag" barnsleyvalue = abs(imag(#z)) elseif @barnsleymode == "real 2" barnsleyvalue = real(#z) elseif @barnsleymode == "imag 2" barnsleyvalue = imag(#z) elseif @barnsleymode == "sum" barnsleyvalue = real(#z) + imag(#z) elseif @barnsleymode == "sum 2" barnsleyvalue = abs(real(#z)) + abs(imag(#z)) elseif @barnsleymode == "sum 3" barnsleyvalue = sqr(real(#z)) + sqr(imag(#z)) elseif @barnsleymode == "product" barnsleyvalue = real(#z) * imag(#z) elseif @barnsleymode == "product 2" barnsleyvalue = abs(real(#z)) * abs(imag(#z)) elseif @barnsleymode == "product 3" barnsleyvalue = sqr(real(#z) * imag(#z)) elseif @barnsleymode == "difference" barnsleyvalue = real(#z) - imag(#z) elseif @barnsleymode == "difference 2" barnsleyvalue = abs(real(#z) - imag(#z)) elseif @barnsleymode == "difference 3" barnsleyvalue = sqr(real(#z) - imag(#z)) elseif @barnsleymode == "test constant" barnsleyvalue = @barntestconst endif ; @barnsleymode if @barnsleytype == "1" if barnsleyvalue <= testvalue #z = (#z - flip(1)+ @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (#z + flip(1) + @barnconst2) * juliaconst equation2 = equation2 + 1 endif ; barnsleyvalue elseif @barnsleytype == "2" if barnsleyvalue <= testvalue #z = (#z - 1 + @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (#z + 1 + @barnconst2) * juliaconst equation2 = equation2 + 1 endif elseif @barnsleytype == "3" if barnsleyvalue <= testvalue #z = #z * juliaconst - 1 + @barnconst1 equation1 = equation1 + 1 else #z = #z * juliaconst + 1 + @barnconst2 equation2 = equation2 + 1 endif elseif @barnsleytype == "4" if barnsleyvalue <= testvalue #z = #z * juliaconst - (0,1) + @barnconst1 equation1 = equation1 + 1 else #z = #z * juliaconst + (0,1) + @barnconst2 equation2 = equation2 + 1 endif elseif @barnsleytype == "5" if barnsleyvalue <= testvalue #z = (sqr(#z) - (0,1) + @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (sqr(#z) + (0,1) + @barnconst2) * juliaconst equation2 = equation2 + 1 endif elseif @barnsleytype == "6" if barnsleyvalue <= testvalue #z = (sqr(#z) - 1 + @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (sqr(#z) + 1 + @barnconst2) * juliaconst equation2 = equation2 + 1 endif elseif @barnsleytype == "7" if barnsleyvalue <= testvalue #z = sqr(#z) * juliaconst - (0,1) + @barnconst1 equation1 = equation1 + 1 else #z = sqr(#z) * juliaconst + (0,1) + @barnconst2 equation2 = equation2 + 1 endif elseif @barnsleytype == "8" if barnsleyvalue <= testvalue #z = sqr(#z) * juliaconst - 1 + @barnconst1 equation1 = equation1 + 1 else #z = sqr(#z) * juliaconst + 1 + @barnconst2 equation2 = equation2 + 1 endif elseif @barnsleytype == "9" if barnsleyvalue <= testvalue #z = (sqr(#z) + #z + @barnconst1) * juliaconst - 1 equation1 = equation1 + 1 else #z = (sqr(#z) - #z + @barnconst2) * juliaconst + 1 equation2 = equation2 + 1 endif elseif @barnsleytype == "10" if barnsleyvalue <= testvalue #z = (sqr(#z) + 2 * #z + @barnconst1) * juliaconst equation1 = equation1 + 1 else #z = (sqr(#z) - 2 * #z + @barnconst2) * juliaconst equation2 = equation2 + 1 endif elseif @barnsleytype == "11" if barnsleyvalue <= testvalue #z = ( (#z - 1) * log(#z) + @barnconst1) * juliaconst else #z = ( (#z + 1) * log(#z) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype == "12" if barnsleyvalue <= testvalue #z = ( (#z - (0,1)) * log(#z) + @barnconst1) * juliaconst else #z = ( (#z + (0,1)) * log(#z) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype == "13" if barnsleyvalue <= testvalue #z = ( #z * log(#z-1) + @barnconst1) * juliaconst else #z = ( #z * log(#z+1) + @barnconst2) * juliaconst endif ; zangle elseif @barnsleytype == "14" if barnsleyvalue <= testvalue #z = ( #z * log(#z-(0,1)) + @barnconst1) * juliaconst else #z = ( #z * log(#z+(0,1)) + @barnconst2) * juliaconst endif ; zangle endif ; @barnsleytype if @bailtest == "mod" dontbail = (|#z| <= @bailout) elseif @bailtest == "real" dontbail = (sqr(real(#z)) <= @bailout) elseif @bailtest == "imag" dontbail = (sqr(imag(#z)) <= @bailout) elseif @bailtest == "and" dontbail = (sqr(real(#z)) <= @bailout && sqr(imag(#z)) <= @bailout) elseif @bailtest == "or" dontbail = (sqr(real(#z)) <= @bailout || sqr(imag(#z)) <= @bailout) elseif @bailtest == "eor" if sqr(real(#z)) <= @bailout dontbail = (sqr(imag(#z)) > @bailout) else dontbail = (sqr(imag(#z)) <= @bailout) endif ; sqr() elseif @bailtest == "manh" dontbail = (sqr(abs(real(#z)) + abs(imag(#z))) <= @bailout) elseif @bailtest == "manr" dontbail = (sqr(real(#z) + imag(#z)) <= @bailout) elseif @bailtest == "real 2" dontbail = (abs(real(#z)) <= @bailout) elseif @bailtest == "imag 2" dontbail = (abs(imag(#z)) <= @bailout) elseif @bailtest == "sum" dontbail = (abs(real(#z) + imag(#z)) <= @bailout) elseif @bailtest == "sum 2" dontbail = (abs(real(#z)) + abs(imag(#z)) <= @bailout) elseif @bailtest == "product" dontbail = (abs(real(#z) * imag(#z)) <= @bailout) elseif @bailtest == "difference" dontbail = (abs(real(#z)) - abs(imag(#z)) <= @bailout) elseif @bailtest == "difference 2" dontbail = (abs(real(#z) - imag(#z)) <= @bailout) elseif @bailtest == "difference 3" dontbail = (abs(imag(#z)) - abs(real(#z)) <= @bailout) elseif @bailtest == "quotient" dontbail = (abs(real(#z)) / abs(imag(#z)) <= @bailout) elseif @bailtest == "quotient 2" dontbail = (abs(imag(#z)) / abs(real(#z)) <= @bailout) endif ; @bailtest if @heatmap ; encode the eq1/eq2 ration in #z currentz = #z #z = equation1 + flip(equation2) endif ; @heatmap bailout: dontbail default: title = "Barnsley - Orbit Traps" center = (0,0) maxiter = 500 method = multipass periodicity = 0 magn = 0.75 param trapmode caption = "Trap Mode" enum = "distance" "cabs" "real" "imag" "real 2" "imag 2" "sum" "sum 2" "sum 3" \ "product" "product 2" "product 3" "difference" "difference 2" "difference 3" default = 0 hint = "This setting determines how the trapped point is used in the Barnsley \ comparison. With the default settings, 'Trap Mode' = 'distance' and \ parameter 'Barnsley Mode' = 'test constant', then if the distance between #z \ and the trap point <= the value of 'test constant', Barnsley equation 1 is \ executed; otherwise, equation 2 is executed." endparam param traptype caption = "Trap Type" enum = "lines & points" "polar functions" "parametric functions" "cartesian" default = 0 hint = "This setting determines the method used for the 'Trap Shape'." endparam param trapshape caption = "Trap Shape" enum = "line" "triangle" "isosceles" "3-asterisk" "3-star" "3-star 2" \ "polytriangle" "trigram" "nested triangles" "nested triangle 2" \ "twisted triangles" "twisted triangle 2" "3-rhombstar" \ "square" "square 2" "rhombus" "kite" "dart" "rectangle" "4-asterisk" \ "4-star" "flat 4-star" "4-star 2" "bowtie" "windowpane" "tetragram" "tetragram 2" \ "nested squares" "nested square 2" "twisted squares" \ "twisted square 2" "windmill" "windmill 2" \ "pentagon" "pentagon 2" "pentagram" "pentagram 2" "pentagram 3" \ "pentagram 4" "pentagram 5" "5-asterisk" "5-star" "5-star 2" "5-star 3" "nested pentagons" \ "nested pentagon 2" "twisted pentagons" "twisted pentagon 2" "5-rhombstar" \ "hexagon" "hexagon 2" "hexagram" "hexagram 2" "hexagram 3" \ "hexagram 4" "hexagram 5" "hexagram 6" "hexagram 7" "honeycomb" \ "6-asterisk" "6-star" "6-star 2" "6-star 3" "nested hexagons" "nested hexagon 2" \ "twisted hexagons" "twisted hexagon 2" "6-rhombstar" \ "zigzag-3" "zigzag-4" "zigzag-5" "zigzag-6" "zigzag-7" \ "sawtooth-1" "sawtooth-2" "sawtooth-3" "sawtooth-4" \ "square-1" "square-2" "square-3" "square-4" "peano curve" "roots of unity" \ "hand" "lissajous 1" "lissajous 2" "lissajous 3" "superellipse" "hypotrochoid" "epitrochoid" \ "collinear spots" "triangular array" "square array" "pentagonal array" "hexagonal array" \ "triangular spiral" "square spiral" "pentagonal spiral" "hexagonal spiral" "octagonal spiral" \ "nested circles" "osculant circles" "dotted star" "dashed star" \ "heptagon" "heptagon 2" "heptagram" "heptagram 2" "heptagram 3" "heptagram 4" \ "heptagram 5" "heptagram 6" "heptagram 7" "7-asterisk" "7-star" "7-star 2" "7-star 3" \ "nested heptagons" "nested heptagon 2" "twisted heptagons" "twisted heptagon 2" "7-rhombstar" \ "octagon" "octagon 2" "octagram" "octagram 2" "octagram 3" \ "octagram 4" "octagram 5" "octagram 6" "octagram 7" "octagram 8" \ "octagram 9" "octagram 10" "8-asterisk" "8-star" "8-star 2" "8-rhombstar" \ "nonagon" "nonagram" "nonagram 2" "nonagram 3" "nonagram 4" "nonagram 5" \ "nonagram 6" "nonagram 7" "9-asterisk" "9-star" "9-star 2" "9-star 3" "9-rhombstar" \ "decagon" "decagram" "decagram 2" "decagram 3" "decagram 4" "decagram 5" "10-asterisk" "10-star" \ "10-star 2" "10-star 3" "10-rhombstar" "more polygons" "more spirolaterals" "more curves" default = 0 hint = "This parameter determines what geometrical figure to use \ as a trap." visible = @traptype == "lines & points" endparam param morepolygons1 caption = "Polygon Shape" enum = "11-gon" "11-gram 1" "11-gram 2" "11-gram 3" "11-gram 4" "11-star" \ "11-star 2" "11-rhombstar" "11-asterisk" \ "12-gon" "12-gram 1" "12-gram 2" "12-gram 3" "12-gram 4" "12-gram 5" "12-star" \ "12-star 2" "12-rhombstar" "12-asterisk" \ "13-gon" "13-star" "13-rhombstar" "13-asterisk" "14-gon" "14-star" "14-rhombstar" "14-asterisk" \ "15-gon" "15-star" "15-rhombstar" "15-asterisk" \ "16-gon" "16-star" "16-rhombstar" "16-asterisk" default = 0 hint = "If 'Trap Shape' is set to 'more polygons', this parameter determines which \ polygon shape to use as a trap." visible = @trapshape == "more polygons" && (@traptype == "lines & points") endparam param morespirolaterals1 caption = "Spirolateral Shape" enum = "1,1,1,2,3;1/2" "1,6,6,6;1/4,1/4,-5/6" "1,1,2,1,3;1/2" "1,1,2,2,4;1/2" "1,1,4,5,4;1/2" "1,2,2,2,5;1/2" \ "1,2,5,3,5;1/2" "2,2,1,4,3;1/2" "2,2,4,4,3;1/2" "2,3,5,3,2;1/2" \ "1,6,6,2;3/4,-1/4,-1/6" "1,2,1,3;-4/5" "1,2,1,3;-4/5,-4/5,0" "1,2,1,3;-4/5,-1/5,-4/5" "1,3;1/5,3/5,-1/5" \ "1,2,3,3,2,1;5/6,1/6,1/6" "1,1,3,1;-5/6,-1/6,3/7" "1,1,3,1;-1/6,1/6,-3/7" "1,1,3,1;5/6,1/6,4/7" \ "1,3,1,4,2;-1/2,1/6" default = 0 hint = "If 'Trap Shape' is set to 'more spirolaterals', this parameter determines which \ shape to use as a trap. Some of these settings will require reducing the trap size parameter." visible = @trapshape == "more spirolaterals" && (@traptype == "lines & points") endparam param morecurves1 caption = "Curve Shape" enum = "cycloid" "bipolar lissajous" "elliptic lissajous" "parabolic lissajous" "polar lissajous" \ "Moritz cyclic harmonic" "rhodonea" default = 0 hint = "If 'Trap Shape' is set to 'more curves', this parameter determines which \ curve to use as a trap." visible = @trapshape == "more curves" && @traptype == "lines & points" endparam param polarshape1 caption = "Trap Shape" enum = "cardioid" "circle" "Cayley's sextic" "Cayley's sextic 2" "cissoid of Diocles" "cochleoid" \ "conchoid of De Sluze" "conchoid of Nicomedes" "cubical parabola" \ "ellipse" "folioid" "folium" "folium of Descartes" "hippopede" "hyperbolic spiral" \ "kampyle of Eudoxus" "kappa" "lemniscate of Bernoulli" \ "limacon of Pascal" "lituus" "lituus 2" "logarithmic spiral""parabola" \ "parabolic spiral" "rose" "semicubical parabola" "spiral of Archimedes" \ "strophoid" "trefoil of Habenicht" "trisectrix limacon" default = 0 hint = "If 'Trap Type' is set to 'polar functions', then this setting determines \ the function to use." visible = @traptype == "polar functions" endparam param polarmode1 caption = "Function 1 Mode" enum = "normal" "implicit" default = 0 hint = "If 'Trap Type' is set to 'polar functions', this setting determines \ how the function is used. This option primarily affects the way the coloring \ is applied." visible = @traptype == "polar functions" endparam param parashape1 caption = "Trap Shape" enum = "hypocycloid" "Abdank quadratrix" "companion of cycloid" "cornoid" "cycloid" \ "cycloid variant" "ellipse" "epicycloid" "epicycloid 2" "epitrochoid" \ "hyperbola" "nephroid" \ "serpentine" "tractrix" "wavy circle" "witch of Agnesi" default = 0 hint = "If 'Trap Type' is set to 'parametric functions', then this setting \ determines the function to use." visible = @traptype == "parametric functions" endparam param xyshape1 caption = "Trap Shape" enum = "ampersand" "Alain's curve" "anguinea" "arcs of Samothrace" "astroid" \ "atriphthaloid" "bean curve 1" "bean curve 2" "beetle curve" "Beutel heart" \ "bicorn" "bicuspid" "biquartic of Sacre" "Bolza curve" "bow curve" \ "bullet nose curve" "butterfly sextic" "butterfly 2" "cardioid" "Cartesian oval" \ "Cassini oval" "catastrophic sine" "catenary" "Cayley's sextic" "Ceva's trisectrix" \ "Chasles cubic" "circle" \ "circular cubic" "cissoid of Diocles" "clinoid" "cochleoid" "conchoid of circle" \ "conchoid of Nicomedes" "conchoid of de Sluze" "conic focal conchoid" \ "cornoid" "cranoid" "cross curve" \ "cubic duplicatrix" "cubic egg" "cubic of Apollonius" "damped sine" "deltoid" "devil's curve" \ "dipole curve" "diverging parabola" "double egg" \ "double folium" "double U curve" "dumbbell curve" "Durer's conchoid" "Durer's folium" \ "eight curve" "ellipse" "fish quartic" "folium 1" "folium 2" "folium of Descartes" \ "Freeth's nephroid" \ "Gaussian curve" "Granville's egg" "Hoerl curve" "Humbert cubic" "hyperbola" "hyperbola 2" \ "illumination curve" "Jerabek curve" "kampyle of Eudoxus" "kappa curve" "Kepler's egg" \ "Kiepert's curve" "kieroid" "kiss curve" "Klein quartic" "Kulp quartic" "limacon of Pascal" \ "links curve" "Lissajous quartic" "Lissajous sextic" "logistic curve" "Maltese cross" \ "nephroid" "nodal curve" "ophiuride" "parabola" "parabola 2" "parabolic trifolium" \ "pearls of de Sluze" "piriform" "plane spiric" "Proclus hippopede" "pursuit curve" \ "quadrafolium" "quadratrix" "resonance curve" \ "right strophoid" "Rosillo curve" "scarabaeus" "scyphoid" "semicubical parabola" \ "Sillke's egg of Columbus" "siluroid" "spiric of Perseus" "strophoid" \ "superellipse" "svastika" "syntractrix" "tetracuspid" "trident" "trifolium" "trisectrix of Delanges" \ "trisectrix of Longchamps" "trisectrix of Maclaurin" "Trott curve" "Tschirnhausen's cubic" \ "visiera" "Watt's curve" "witch of Agnesi" default = 0 hint = "If 'Trap 1 Type' is set to 'cartesian', then this setting determines \ the function to use." visible = @traptype == "cartesian" endparam param fixtrapbug caption = "Fix Trap Bug?" default = TRUE hint = "If enabled, an error in an early version of this formula that affected the rendering of \ some of the trap shapes will be corrected. Disable to recover the original version." visible = ((@trapshape == "square array") || (@trapshape == "roots of unity") || (@trapshape == \ "superellipse") || (@trapshape == "hypotrochoid") || (@trapshape == "epitrochoid") || \ (@trapshape == "collinear spots") || (@trapshape == "triangular array") || (@trapshape == \ "pentagonal array") || (@trapshape == "hexagonal array") || (@trapshape == "triangular spiral") \ || (@trapshape == "square spiral") || (@trapshape == "pentagonal spiral") || (@trapshape == \ "hexagonal spiral") || (@trapshape == "octagonal spiral") || (@trapshape == "nested circles") || \ (@trapshape == "osculant circles")) && @traptype == "lines & points" endparam param nscale1 caption = "Trap Scale" default = 1.5 hint = "This parameter fixes the overall size of the trap shape." endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.98 max = 359.98 hint = "Number of degrees (0-359) that the trap should be rotated from its default position" endparam param center caption = "Center" default = (0,0) hint = "Enter coordinates of trap center" endparam param isocheight caption = "Isosceles Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'isosceles', then this setting \ determines the height of the isosceles triangle." visible = @trapshape == "isosceles" && (@traptype == "lines & points") endparam param isocwidth caption = "Isosceles Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'isosceles', then this setting \ determines the width of the isosceles triangle base." visible = @trapshape == "isosceles" && (@traptype == "lines & points") endparam param fixisosceles caption = "Fix Isosceles Bug?" default = FALSE hint = "If enabled and 'Trap Shape' is set to 'isosceles', then this \ setting corrects a bug in the scaling of the isosceles triangle." visible = @trapshape == "isosceles" && (@traptype == "lines & points") endparam param leafAlength caption = "Leaf 1 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '3-asterisk', '4-asterisk', etc., \ then this setting adjusts the length of the 1st leaflet." visible = ((@trapshape == "3-asterisk") || (@trapshape == "4-asterisk") || \ (@trapshape == "5-asterisk") || (@trapshape == "6-asterisk") || (@trapshape == "7-asterisk") || \ (@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafBlength caption = "Leaf 2 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '3-asterisk', '4-asterisk', etc., \ then this setting adjusts the length of the 2nd leaflet." visible = ((@trapshape == "3-asterisk") || (@trapshape == "4-asterisk") || \ (@trapshape == "5-asterisk") || (@trapshape == "6-asterisk") || (@trapshape == "7-asterisk") || \ (@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafClength caption = "Leaf 3 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '3-asterisk', '4-asterisk', etc., \ then this setting adjusts the length of the 3rd leaflet." visible = ((@trapshape == "3-asterisk") || (@trapshape == "4-asterisk") || \ (@trapshape == "5-asterisk") || (@trapshape == "6-asterisk") || (@trapshape == "7-asterisk") || \ (@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafDlength caption = "Leaf 4 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '4-asterisk', '5-asterisk', etc., \ then this setting adjusts the length of the 4th leaflet." visible = ((@trapshape == "4-asterisk") || \ (@trapshape == "5-asterisk") || (@trapshape == "6-asterisk") || (@trapshape == "7-asterisk") || \ (@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafElength caption = "Leaf 5 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '5-asterisk', '6-asterisk', etc., \ then this setting adjusts the length of the 5th leaflet." visible = ((@trapshape == "5-asterisk") || (@trapshape == "6-asterisk") || (@trapshape == "7-asterisk") || \ (@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafFlength caption = "Leaf 6 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '6-asterisk', '7-asterisk', etc., \ then this setting adjusts the length of the 6th leaflet." visible = ((@trapshape == "6-asterisk") || (@trapshape == "7-asterisk") || \ (@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafGlength caption = "Leaf 7 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '7-asterisk', etc., \ then this setting adjusts the length of the 7th leaflet." visible = ((@trapshape == "7-asterisk") || \ (@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafHlength caption = "Leaf 8 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '8-asterisk', etc., \ then this setting adjusts the length of the 8th leaflet." visible = ((@trapshape == "8-asterisk")|| (@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafIlength caption = "Leaf 9 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '9-asterisk', etc., \ then this setting adjusts the length of the 9th leaflet." visible = ((@trapshape == "9-asterisk") || (@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafJlength caption = "Leaf 10 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to '10-asterisk', etc., \ then this setting adjusts the length of the 10th leaflet." visible = ((@trapshape == "10-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafKlength caption = "Leaf 11 Length" default = 1.0 hint = "If the trap shape is set to '11-asterisk', etc., \ then this setting adjusts the length of the 11th leaflet." visible = ((@trapshape == "more polygons" && @morepolygons1 == "11-asterisk") || \ (@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param leafLlength caption = "Leaf 12 Length" default = 1.0 hint = "If the trap shape is set to '12-asterisk', \ then this setting adjusts the length of the 12th leaflet." visible = ((@trapshape == "more polygons" && @morepolygons1 == "12-asterisk")) && (@traptype == "lines & points") endparam param starspikiness caption = "Star Spikiness" default = 0.75 hint = "If parameter 'Trap Shape' is set to '3-star', '4-star', etc., \ then this setting determines the length of the star points." visible = ((@trapshape == "3-star") || (@trapshape == "4-star") || \ (@trapshape == "5-star") || (@trapshape == "6-star") || (@trapshape == "7-star") || (@trapshape == "8-star") \ || (@trapshape == "9-star") || (@trapshape == "10-star") || (@trapshape == "more polygons" && @morepolygons1 == "11-star") \ || (@trapshape == "more polygons" && @morepolygons1 == "12-star")) && (@traptype == "lines & points") endparam param innerscale caption = "Inner Scale" default = 1.0 hint = "If parameter 'Trap Shape' is set to one of the 'nested' options, \ then this setting adjusts the size of the inner polygon." visible = ((@trapshape == "nested triangles") || (@trapshape == "nested \ triangle 2") || (@trapshape == "nested squares") || (@trapshape == \ "nested square 2") || (@trapshape == "nested pentagons") || \ (@trapshape == "nested pentagon 2") || (@trapshape == "nested \ hexagons") || (@trapshape == "nested heptagons") || (@trapshape == "nested heptagon 2") || \ (@trapshape == "nested hexagon 2")) && (@traptype == "lines & points") endparam param rhombheight caption = "Rhombus Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'rhombus', then this setting \ determines its relative height." visible =(@trapshape == "rhombus") && (@traptype == "lines & points") endparam param rhombwidth caption = "Rhombus Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'rhombus', then this setting \ determines its relative height." visible = (@trapshape == "rhombus") && (@traptype == "lines & points") endparam param kiteheight caption = "Kite Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'kite', then this setting \ determines its relative height." visible = (@trapshape == "kite") && (@traptype == "lines & points") endparam param kitewidth caption = "Kite Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'kite', then this setting \ determines its relative height." visible = (@trapshape == "kite") && (@traptype == "lines & points") endparam param dartheight caption = "Dart Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'dart', then this setting \ determines its relative height." visible = (@trapshape == "dart") && (@traptype == "lines & points") endparam param dartwidth caption = "Dart Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'dart', then this setting \ determines its relative height." visible = (@trapshape == "dart") && (@traptype == "lines & points") endparam param rectlength caption = "Rectangle Length" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'rectangle', then this setting \ determines its relative length." visible = @trapshape == "rectangle" && (@traptype == "lines & points") endparam param rectwidth caption = "Rectangle Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'rectangle', then this setting \ determines its relative width." visible = @trapshape == "rectangle" && (@traptype == "lines & points") endparam param flat4height caption = "Flat Star Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'flat 4-star', then this setting \ determines its relative height." visible = (@trapshape == "flat 4-star") && (@traptype == "lines & points") endparam param flat4width caption = "Flat Star Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'flat 4-star', then this setting \ determines its relative height." visible = (@trapshape == "flat 4-star") && (@traptype == "lines & points") endparam param finger1length caption = "Finger 1 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'hand', \ then this setting adjusts the length of the 1st finger." visible = (@trapshape == "hand") && (@traptype == "lines & points") endparam param finger2length caption = "Finger 2 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'hand', \ then this setting adjusts the length of the 2nd finger." visible = (@trapshape == "hand" ) && (@traptype == "lines & points") endparam param finger3length caption = "Finger 3 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'hand', \ then this setting adjusts the length of the 3rd finger." visible = (@trapshape == "hand") && (@traptype == "lines & points") endparam param finger4length caption = "Finger 4 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'hand', \ then this setting adjusts the length of the 4th finger." visible = (@trapshape == "hand") && (@traptype == "lines & points") endparam param finger5length caption = "Finger 5 Length" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'hand', \ then this setting adjusts the length of the 5th finger." visible = (@trapshape == "hand") && (@traptype == "lines & points") endparam param sawheight caption = "Sawtooth Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to a 'sawtooth' option, \ then this setting adjusts the relative height of the wave." visible = ((@trapshape == "sawtooth-1") || (@trapshape == "sawtooth-2") \ || (@trapshape == "sawtooth-3") || (@trapshape == "sawtooth-4")) && (@traptype == "lines & points") endparam param windheight caption = "Windblade Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'Windmill', then this setting \ adjusts the height of one of the windmill blades." visible = ((@trapshape == "windmill") || (@trapshape == "windmill 2")) && (@traptype == "lines & points") endparam param windwidth caption = "Windblade Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'Windmill', then this setting \ adjusts the width of one of the windmill blades." visible = ((@trapshape == "windmill") || (@trapshape == "windmill 2")) && (@traptype == "lines & points") endparam param sqrheight caption = "Squarewave Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'square-1' etc, then this setting \ adjusts the height of the square wave." visible = ((@trapshape == "square-1") || (@trapshape == "square-2") || (@trapshape == "square-3") \ || (@trapshape == "square-4")) && (@traptype == "lines & points") endparam param sqrwidth caption = "Squarewave Width" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'square-1' etc, then this setting \ adjusts the width of the square wave." visible = ((@trapshape == "square-1") || (@trapshape == "square-2") || \ (@trapshape == "square-3") || (@trapshape == "square-4")) && (@traptype == "lines & points") endparam param unityroot1 caption = "How Many Roots?" default = 5 min = 1 max = 16 hint = "If parameter 'Trap Shape' is set to 'roots of unity', \ then this setting determines which set of roots to use (1-16)." visible = @trapshape == "roots of unity" && (@traptype == "lines & points") endparam param singleroot1 caption = "Single Root?" default = FALSE hint = "If parameter 'Trap Shape' is set to 'roots of unity', \ enabling this setting allows the use of just one of the roots \ as the trap, instead of using the entire set of roots." visible = @trapshape == "roots of unity" && (@traptype == "lines & points") endparam param whichroot1 caption = "Which Root?" default = 1 min = 1 max = 16 hint = "If parameter 'Trap Shape' is set to 'roots of unity' and \ 'Single Root' is enabled, then this setting determines which root to use \ (1-up to the max set by param 'How Many Roots')." visible = (@trapshape == "roots of unity" && @singleroot1) && (@traptype == "lines & points") endparam param collinearspot1 caption = "How Many Spots?" default = 4 min = 1 max = 16 hint = "If parameter 'Trap Shape' is set to 'collinear spots', \ then this setting determines the number of points to use (1-16)." visible = @trapshape == "collinear spots" && (@traptype == "lines & points") endparam param squarespot1 caption = "Array Size?" default = 4 min = 2 max = 6 hint = "If parameter 'Trap Shape' is set to 'square array', \ then this setting determines the array size (2-6)." visible = @trapshape == "square array" && (@traptype == "lines & points") endparam param triarray1 caption = "Array Order?" default = 2 min = 2 max = 4 hint = "If parameter 'Trap Shape' is set to 'triangular array', pentagonal array' etc. \ then this setting determines the array size (2-4)." visible = (@trapshape == "triangular array" || @trapshape == "pentagonal array" || \ @trapshape == "hexagonal array") && (@traptype == "lines & points") endparam param raynumber caption = "Number of Rays?" default = 3 min = 3 max = 16 hint = "If parameter 'Trap Shape' is set to 'dotted star' or 'dashed star' \ then this setting determines the number of star 'points' (3-16)." visible = (@traptype == "lines & points" && ((@trapshape == "dashed star" \ || @trapshape == "dotted star"))) endparam param dotnumber caption = "Number of Dots?" default = 3 min = 2 max = 5 hint = "If parameter 'Trap Shape' is set to 'dotted star' \ then this setting determines the number of dots in each star ray (2-5)." visible = @traptype == "lines & points" && @trapshape == "dotted star" endparam param dashnumber caption = "Number of Dashes?" default = 2 min = 2 max = 4 hint = "If parameter 'Trap Shape' is set to 'dashed star' \ then this setting determines the number of dashes in each star ray (2-4)." visible = @traptype == "lines & points" && @trapshape == "dashed star" endparam param spiralorder1 caption = "Spiral Order?" default = 2 min = 1 max = 4 hint = "If parameter 'Trap Shape' is set to 'triangular spiral', 'square spiral', etc. \ then this setting determines the number of spiral windings (1-4)." visible = (@trapshape == "triangular spiral" || @trapshape == "square spiral" || \ @trapshape == "pentagonal spiral" || @trapshape == "hexagonal spiral" || \ @trapshape == "octagonal spiral") && (@traptype == "lines & points") endparam param ellipseexponent1 caption = "SE1 Exponent" default = 2.5 hint = "If parameter 'Trap Shape' is set to 'superellipse', then this parameter \ determines the exponent used for the trap." visible = (@trapshape == "superellipse") && (@traptype == "lines & points") endparam param ellipseheight1 caption = "SE1 Height" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'superellipse', then this setting \ adjusts the height of the trap." visible = (@trapshape == "superellipse") && (@traptype == "lines & points") endparam param ellipsewidth1 caption = "SE1 Width" default = 0.6 hint = "If parameter 'Trap Shape' is set to 'superellipse', then this setting \ adjusts the width of the trap." visible = (@trapshape == "superellipse") && (@traptype == "lines & points") endparam param hypotrochA1 caption = "Hypotro1 RadA" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'hypotrochoid' or 'epitrochoid', then this parameter \ is the radius of the fixed circle." visible = ((@trapshape == "hypotrochoid") || (@trapshape == "epitrochoid")) && (@traptype == "lines & points") endparam param hypotrochB1 caption = "Hypotro1 RadB" default = 0.25 hint = "If parameter 'Trap Shape' is set to 'hypotrochoid' or 'epitrochoid', then this parameter \ is the radius of the rolling circle. Try RadA/RadB a rational number." visible = ((@trapshape == "hypotrochoid") || (@trapshape == "epitrochoid")) && (@traptype == "lines & points") endparam param hypotrochH1 caption = "Hypotro1 DistH" default = 1.25 hint = "If parameter 'Trap Shape' is set to 'hypotrochoid' or 'epitrochoid', then this parameter \ is the distance of the point from the rolling circle center." visible = ((@trapshape == "hypotrochoid") || (@trapshape == "epitrochoid")) && (@traptype == "lines & points") endparam param cycloidamp1 caption = "Cycloid 1 Amplitude" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cycloid', then this parameter \ fixes the amplitude." visible = (@traptype == "lines & points" && \ ((@trapshape == "more curves" && @morecurves1 == "cycloid"))) && (@traptype == "lines & points") endparam param cycloidconst1 caption = "Cycloid 1 Constant" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cycloid', then this parameter \ distorts the shape." visible = (@traptype == "lines & points" && \ ((@trapshape == "more curves" && @morecurves1 == "cycloid"))) && (@traptype == "lines & points") endparam param cycloidlength1 caption = "Cycloid 1 Length" default = 2.0 min = 0.5 max = 6 hint = "If parameter 'Trap Shape' is set to 'cycloid', then this parameter \ sets the number of cycles plotted, in units of 2 pi." visible = (@traptype == "lines & points" && \ ((@trapshape == "more curves" && @morecurves1 == "cycloid"))) && (@traptype == "lines & points") endparam param grain caption = "Curve Granularity" enum = "36" "72" "100" "200" "300" "400" default = 1 hint = "Increasing this number results in smoother curves, but slower execution." visible = ((@traptype == "lines & points" && ( \ @trapshape == "hypotrochoid" || @trapshape == "epitrochoid" || \ @trapshape == "superellipse" || @trapshape == "lissajous 3" || \ (@trapshape == "more curves" && \ (@morecurves1 == "rhodonea" || @morecurves1 == "cycloid" || \ @morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "Moritz cyclic harmonic" || @morecurves1 == "elliptic lissajous" || \ @morecurves1 == "bipolar lissajous"))))) endparam param lissaamp1 caption = "Lissa1 Amplitude" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then this parameter \ is the amplitude of the first cosine function." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param lissafreq1 caption = "Lissa1 Frequency" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then this parameter \ is the frequency of the first cosine function." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param lissaphase1 caption = "Lissa1 Phase" default = 0.0 hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then this parameter \ is the phase of the first cosine function." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param lissaamp2 caption = "Lissa2 Amplitude" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then this parameter \ is the amplitude of the first cosine function." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param lissafreq2 caption = "Lissa2 Frequency" default = 4.0 hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then this parameter \ is the frequency of the first cosine function." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param lissaphase2 caption = "Lissa2 Phase" default = 0.52359877559829887307710723054658 ; pi/6 hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then this parameter \ is the phase of the first cosine function." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param lissadomain caption = "Lissa Domain" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then this parameter \ is the domain of the cosine functions, in multiples of pi." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param lissaopen caption = "Open Lissajous?" default = FALSE hint = "If parameter 'Trap Shape' is set to 'lissajous 3', then enabling this parameter \ leaves the ends of the lissajous curve unconnected." visible = (@trapshape == "lissajous 3")|| \ (@trapshape == "more curves" && \ (@morecurves1 == "parabolic lissajous" || @morecurves1 == "polar lissajous" || \ @morecurves1 == "elliptic lissajous" || @morecurves1 == "bipolar lissajous")) && (@traptype == "lines & points") endparam param moritzamp1 caption = "Moritz 1 Amplitude" default = 0.75 hint = "If parameter 'Trap Shape' is set to 'Moritz cyclic harmonic', \ then this parameter is the amplitude of the cosine function." visible = (@traptype == "lines & points" && (@trapshape == "more curves" \ && @morecurves1 == "Moritz cyclic harmonic")) && (@traptype == "lines & points") endparam param moritzfreqN1 caption = "Moritz 1 Numerator" default = 3.0 hint = "If parameter 'Trap Shape' is set to 'Moritz cyclic harmonic', \ then this parameter is the numerator of the frequency of the cosine function." visible = (@traptype == "lines & points" && (@trapshape == "more curves" \ && @morecurves1 == "Moritz cyclic harmonic")) && (@traptype == "lines & points") endparam param moritzfreqD1 caption = "Moritz 1 Denominator" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'Moritz cyclic harmonic', \ then this parameter is the denominator of the frequency of the cosine function." visible = (@traptype == "lines & points" && (@trapshape == "more curves" \ && @morecurves1 == "Moritz cyclic harmonic")) && (@traptype == "lines & points") endparam param moritzconst1 caption = "Moritz 1 Constant" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'Moritz cyclic harmonic', \ then this parameter functions as an additional shape modulator." visible = (@traptype == "lines & points" && (@trapshape == "more curves" \ && @morecurves1 == "Moritz cyclic harmonic")) && (@traptype == "lines & points") endparam param circlenum1 caption = "Circle #" default = 2 min = 2 max = 4 hint = "If 'Trap Shape' is set to 'nested circles' or 'osculant circles', then this setting fixes the number of circles (2-4)." visible = ((@trapshape == "nested circles") || (@trapshape == "osculant circles")) && (@traptype == "lines & points") endparam param rose1 caption = "Rose Petals" default = 3 min = 2 hint = "If parameter 'Trap Shape' is set to 'rose', then this setting \ determines the number of petals." visible = @traptype == "polar functions" && @polarshape1 == "rose" endparam param folium1 caption = "Folium Shaper" default = 0.5 hint = "If parameter 'Trap Shape' is set to 'folium', then this setting \ determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "folium") endparam param foliumperturb1 caption = "Folium Perturb" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'folium', then this setting \ determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "folium") endparam param cardioid1 caption = "Cardioid Shaper" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cardioid', then this setting \ determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "cardioid") endparam param cardioidperturb1 caption = "Cardioid Perturb" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cardioid', then this setting \ determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "cardioid") endparam param cissoidDioA1 caption = "Cissoid Sine Freq" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cissoid of Diocles', then this setting \ determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "cissoid of Diocles") endparam param cissoidDioB1 caption = "Cissoid Tangent Freq" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cissoid of Diocles', then this setting \ determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "cissoid of Diocles") endparam param cochleoid1 caption = "Cochleoid Sine Freq" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cochleoid', then this setting \ determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "cochleoid") endparam param conchoidA1 caption = "Conchoid Constant" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'conchoid of Nicomedes' or 'conchoid of De Sluze', \ then this setting determines the particular shape." visible = (@traptype == "polar functions") && (@polarshape1 == "conchoid of Nicomedes" || \ @polarshape1 == "conchoid of De Sluze") endparam param conchoidB1 caption = "Conchoid Cos Freq" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'conchoid of Nicomedes' or 'conchoid of De Sluze', \ then this setting determines the cosine function." visible = (@traptype == "polar functions") && (@polarshape1 == "conchoid of Nicomedes" || \ @polarshape1 == "conchoid of De Sluze") endparam param conchoidC1 caption = "Conchoid Numerator" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'conchoid of Nicomedes' or 'conchoid of De Sluze', \ then this setting is the numerator of the cosine term." visible = (@traptype == "polar functions") && (@polarshape1 == "conchoid of Nicomedes" || \ @polarshape1 == "conchoid of De Sluze") endparam param cubicpA1 caption = "Cubic Tan Freq" default = 0.1 hint = "If parameter 'Trap Shape' is set to 'cubical parabola', \ then this setting is the frequency of the tangent term." visible = (@traptype == "polar functions") && (@polarshape1 == "cubical parabola") endparam param cubicpB1 caption = "Cubic Cos Freq" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cubical parabola', \ then this setting is the frequency of the cosine term." visible = (@traptype == "polar functions") && (@polarshape1 == "cubical parabola") endparam param cubicpC1 caption = "Cubic Numerator" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'cubical parabola', \ then this constant is the numerator of the cosine term." visible = (@traptype == "polar functions") && (@polarshape1 == "cubical parabola") endparam param majaxis1 caption = "Major Axis" default = 1.5 hint = "If parameter 'Trap Shape' is set to 'ellipse', \ then this setting is the length of the major axis." visible = (@traptype == "polar functions") && (@polarshape1 == "ellipse") endparam param minaxis1 caption = "Minor Axis" default = 0.9 hint = "If parameter 'Trap Shape' is set to 'ellipse', \ then this setting is the length of the minor axis." visible = (@traptype == "polar functions") && (@polarshape1 == "ellipse") endparam param epower1 caption = "Ellipse Exponent" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'ellipse', \ then this setting is the exponent. Ellipse = 2, superellipse > 2, \ subellipse 1< exp <2, astroid < 1." visible = (@traptype == "polar functions") && (@polarshape1 == "ellipse") endparam param tanfreq1 caption = "Tangent Freq" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'ellipse', \ then this setting is the frequency of the tangent term. \ Try integers for star-like shapes." visible = (@traptype == "polar functions") && (@polarshape1 == "ellipse") endparam param fosinfreq1 caption = "Sine 1 Freq 1" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'folium of Descartes', \ then this setting is the frequency of the sine term." visible = (@traptype == "polar functions") && (@polarshape1 == "folium of Descartes") endparam param focosfreq1 caption = "Cos 1 Freq" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'folium of Descartes', \ then this setting is the frequency of the cosine term." visible = (@traptype == "polar functions") && (@polarshape1 == "folium of Descartes") endparam param sinfreq21 caption = "Sine 1 Freq 2" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'folium of Descartes', \ then this setting modulates the frequency of the numerator sine term." visible = (@traptype == "polar functions") && (@polarshape1 == "folium of Descartes") endparam param hyperbolic1 caption = "Hyperbolic Spiral Adjustment" default = 1.0 hint = "If 'Trap Shape' is set to 'hyperbolic spiral', then this parameter modifies \ the curve shape." visible = (@traptype == "polar functions") && (@polarshape1 == "hyperbolic spiral") endparam param kampfreq1 caption = "Kampyle Frequency" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'kampyle of Eudoxus', \ then this setting modulates the cosine term." visible = (@traptype == "polar functions") && (@polarshape1 == "kampyle of Eudoxus") endparam param kamppower1 caption = "Kampyle Power" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'kampyle of Eudoxus', \ then this setting is the exponent of the cosine term." visible = (@traptype == "polar functions") && (@polarshape1 == "kampyle of Eudoxus") endparam param nodalfreq1 caption = "Tangent Frequency" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'kappa', \ then this setting modulates the frequency of the nodal curve. \ 1.0 corresponds to the kappa curve." visible = (@traptype == "polar functions") && (@polarshape1 == "kappa") endparam param lemfreq1 caption = "Cosine Frequency" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'lemniscate of Bernoulli', \ then this setting modulates the cosine term. 2.0 corresponds to the lemniscate." visible = (@traptype == "polar functions") && (@polarshape1 == "lemniscate of Bernoulli") endparam param lempower1 caption = "Lemniscate Power" default = 0.5 hint = "If parameter 'Trap Shape' is set to 'lemniscate of Bernoulli', \ then this setting is the exponent of the cosine term. 0.5 corresponds to the lemniscate." visible = (@traptype == "polar functions") && (@polarshape1 == "lemniscate of Bernoulli") endparam param limfreq1 caption = "Sine Frequency" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'limacon of Pascal', \ then this setting modulates the sine term. 1.0 corresponds to the limacon." visible = (@traptype == "polar functions") && (@polarshape1 == "limacon of Pascal") endparam param limamp1 caption = "Sine Amplitude" default = 0.6666666666666667 hint = "If parameter 'Trap Shape' is set to 'limacon of Pascal', \ then this setting is the amplitude of the sine term. 2/3 corresponds to the limacon." visible = (@traptype == "polar functions") && (@polarshape1 == "limacon of Pascal") endparam param limoffset1 caption = "Limacon Offset" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'limacon of Pascal', \ then this setting is the offset of the sine term. 1.0 corresponds to the limacon." visible = (@traptype == "polar functions") && (@polarshape1 == "limacon of Pascal") endparam param litpower1 caption = "Lituus Power" default = 0.5 hint = "If parameter 'Trap Shape' is set to 'lituus', \ then this setting is the exponent that is used. 0.5 corresponds to the lituus." visible = (@traptype == "polar functions") && (@polarshape1 == "lituus" || @polarshape1 == "lituus 2") endparam param logspiA1 caption = "Log Spiral Adjustment" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'logarithmic spiral', \ then this setting adjusts the winding." visible = (@traptype == "polar functions") && (@polarshape1 == "logarithmic spiral") endparam param logspiB1 caption = "Log Spiral Winding" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'logarithmic spiral', \ then this setting adjusts the tightness of the winding. Smaller numbers \ result in a tighter spiral." visible = (@traptype == "polar functions") && (@polarshape1 == "logarithmic spiral") endparam param parafreq1 caption = "Cos Frequency" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'parabola', \ then this setting modulates the cosine term. 1.0 corresponds to the parabola." visible = (@traptype == "polar functions") && (@polarshape1 == "parabola") endparam param paraamp1 caption = "Cos Amplitude" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'parabola', \ then this setting is the amplitude of the cosine term. 1.0 corresponds to the parabola. \ 0.0 = circle, 0-1 = ellipse, 2 = hyperbola." visible = (@traptype == "polar functions") && (@polarshape1 == "parabola") endparam param paraoffset1 caption = "Parabola Offset" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'parabola', \ then this setting is the offset of the cosine term. 1.0 corresponds to the parabola." visible = (@traptype == "polar functions") && (@polarshape1 == "parabola") endparam param paraspi1 caption = "Parabolic Spiral Power" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'parabolic spiral', \ then this setting is the exponent. 2.0 corresponds to the parabolic spiral." visible = (@traptype == "polar functions") && (@polarshape1 == "parabolic spiral") endparam param paraspioffset1 caption = "Parabolic Spiral Coefficient" default = 8.0 hint = "If parameter 'Trap Shape' is set to 'parabolic spiral', \ then this setting afjusts the spiral tightness." visible = (@traptype == "polar functions") && (@polarshape1 == "parabolic spiral") endparam param semicubtanfreq1 caption = "Semicubic Tan Frequency" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'semicubical parabola', \ then this setting is the frequency of the tangent term. 1.0 corresponds to the \ semicubic parabola." visible = (@traptype == "polar functions") && (@polarshape1 == "semicubical parabola") endparam param semicubcosfreq1 caption = "Semicubic Cos Frequency" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'semicubical parabola', \ then this setting is the frequency of the cosine term. 1.0 corresponds to the \ semicubic parabola." visible = (@traptype == "polar functions") && (@polarshape1 == "semicubical parabola") endparam param semicubpower1 caption = "Semicubic Power" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'semicubical parabola', \ then this setting is the exponent of the tangent term. 2.0 corresponds to the \ semicubic parabola." visible = (@traptype == "polar functions") && (@polarshape1 == "semicubical parabola") endparam param archspioffset1 caption = "Archimedes Spiral Adjustment" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'spiral of Archimedes', \ then this setting affects the tightness of the winding." visible = (@traptype == "polar functions") && (@polarshape1 == "spiral of Archimedes") endparam param strophcosfreqA1 caption = "Strophoid 1st Cos Frequency" default = 2.0 hint = "If parameter 'Trap Shape' is set to 'strophoid', \ then this setting is the frequency of the 1st (numerator) cosine term. \ 2.0 corresponds to the strophoid." visible = (@traptype == "polar functions") && (@polarshape1 == "strophoid") endparam param strophcosfreqB1 caption = "Strophoid 2nd Cos Frequency" default = 1.0 hint = "If parameter 'Trap Shape' is set to 'strophoid', \ then this setting is the frequency of the 2nd (denominator) cosine term. \ 1.0 corresponds to the strophoid." visible = (@traptype == "polar functions") && (@polarshape1 == "strophoid") endparam param polarfreqA1 caption = "Polar Frequency A" default = 1.0 hint = "If 'Trap Type' is set to 'polar functions', some of the curves use this \ parameter as the frequency." visible = @traptype == "polar functions" && \ (@polarshape1 == "Cayley's sextic" || @polarshape1 == "Cayley's sextic 2" || \ @polarshape1 == "hippopede") endparam param polarampA1 caption = "Polar Amplitude A" default = 1.0 hint = "If 'Trap Type' is set to 'polar functions', some of the curves use this \ parameter as the amplitude." visible = @traptype == "polar functions" && \ (@polarshape1 == "Cayley's sextic" || \ @polarshape1 == "hippopede") endparam param trefoilcosamp1 caption = "Trefoil Cos Amplitude" default = 1.0 hint = "If 'Trap Type' is set to 'trefoil of Habenicht', this \ parameter sets the amplitude of the cosine term." visible = @traptype == "polar functions" && \ (@polarshape1 == "trefoil of Habenicht") endparam param trefoilsinamp1 caption = "Trefoil Sine Amplitude" default = 1.0 hint = "If 'Trap Type' is set to 'trefoil of Habenicht', this \ parameter sets the amplitude of the cosine term." visible = @traptype == "polar functions" && \ (@polarshape1 == "trefoil of Habenicht") endparam param trefoilcossymmetry1 caption = "Trefoil Cos Symmetry" default = 3.0 hint = "If 'Trap Type' is set to 'trefoil of Habenicht', this \ parameter sets the symmetry of the cosine term." visible = @traptype == "polar functions" && \ (@polarshape1 == "trefoil of Habenicht") endparam param trefoilsinsymmetry1 caption = "Trefoil Sine Symmetry" default = 3.0 hint = "If 'Trap Type' is set to 'trefoil of Habenicht', this \ parameter sets the symmetry of the sine term." visible = @traptype == "polar functions" && \ (@polarshape1 == "trefoil of Habenicht") endparam param trefoilconstant1 caption = "Trefoil Constant" default = 1.0 hint = "If 'Trap Type' is set to 'trefoil of Habenicht', this \ parameter affects the scale of the curve." visible = @traptype == "polar functions" && \ (@polarshape1 == "trefoil of Habenicht") endparam param trilimA1 caption = "Trisectrix Multiplier" default = 2.0 hint = "If 'Trap Type' is set to 'trisectrix limacon', this factor scales the entire equation." visible = @traptype == "polar functions" && @polarshape1 == "trisectrix limacon" endparam param trilimB1 caption = "Trisectrix Constant" default = 1.0 hint = "If 'Trap Type' is set to 'trisectrix limacon', this value is added to the cosine term." visible = @traptype == "polar functions" && @polarshape1 == "trisectrix limacon" endparam param trilimamp1 caption = "Trisectrix Amplitude" default = 2.0 hint = "If 'Trap Type' is set to 'trisectrix limacon', this value is the cosine amplitude." visible = @traptype == "polar functions" && @polarshape1 == "trisectrix limacon" endparam param trilimfreq1 caption = "Trisectrix Frequency" default = 1.0 hint = "If 'Trap Type' is set to 'trisectrix limacon', this value is the cosine frequency." visible = @traptype == "polar functions" && @polarshape1 == "trisectrix limacon" endparam param folioidamp1 caption = "Folioid Amplitude" default = 2.2 hint = "If 'Trap Type' is set to 'polar functions' and 'Trap Shape' \ is 'folioid', then this parameter fixes the amplitude of the cosine term." visible = (@traptype == "polar functions" && @polarshape1 == "folioid" \ && @polarmode1 == "normal") endparam param folioidfreqN1 caption = "Folioid Numerator" default = 3.0 hint = "If 'Trap Type' is set to 'polar functions' and 'Trap Shape' \ is 'folioid', then this parameter fixes the numerator of the frequency of the cosine term." visible = (@traptype == "polar functions" && @polarshape1 == "folioid") endparam param folioidfreqD1 caption = "Folioid Denominator" default = 1.0 hint = "If 'Trap Type' is set to 'polar functions' and 'Trap Shape' \ is 'folioid', then this parameter fixes the denominator of the frequency of the cosine term." visible = (@traptype == "polar functions" && @polarshape1 == "folioid") endparam param folioidconstA1 caption = "Folioid Const A" default = 1.5 hint = "If 'Trap Type' is set to 'polar functions' and 'Trap Shape' \ is 'folioid', then this parameter is the first of two shaping terms." visible = (@traptype == "polar functions" && @polarshape1 == "folioid" \ && @polarmode1 == "implicit") endparam param folioidconstB1 caption = "Folioid Const B" default = 1.5 hint = "If 'Trap Type' is set to 'polar functions' and 'Trap Shape' \ is 'folioid', then this parameter is the second of two shaping terms." visible = (@traptype == "polar functions" && @polarshape1 == "folioid" \ && @polarmode1 == "implicit") endparam param hyponumerator1 caption = "Hypocycloid Numerator" default = 1 hint = "If 'Trap Shape' is set to 'hypocycloid', then this setting \ determines the numerator of the shaping parameter. In conjunction with \ parameter 'Hypocycloid 1 Denominator', try simple fractions." visible = @traptype == "parametric functions" && \ @parashape1 == "hypocycloid" endparam param hypodenom1 caption = "Hypocycloid Denominator" default = 3 hint = "If 'Trap Shape' is set to 'hypocycloid', then this setting \ determines the denominator of the shaping parameter. In conjunction with \ parameter 'Hypocycloid 1 Numerator', try simple fractions." visible = @traptype == "parametric functions" && \ @parashape1 == "hypocycloid" endparam param companC11 caption = "Companion X-scale" default = 1.0 hint = "If 'Trap Shape' is set to 'companion of cycloid', then this setting \ sets the scale of the x-coordinate." visible = @traptype == "parametric functions" && \ @parashape1 == "companion of cycloid" endparam param companC21 caption = "Companion Y-offset" default = 1.0 hint = "If 'Trap Shape' is set to 'companion of cycloid', then this setting \ sets the offset of the y-coordinate." visible = @traptype == "parametric functions" && \ @parashape1 == "companion of cycloid" endparam param companfreq1 caption = "Companion Frequency" default = 1.0 hint = "If 'Trap Shape' is set to 'companion of cycloid', then this setting \ is the frequency of the y-coordinate cosine." visible = @traptype == "parametric functions" && \ @parashape1 == "companion of cycloid" endparam param cycampA1 caption = "Cycloid Sine Amplitude" default = 1.0 hint = "If 'Trap Shape' is set to 'cycloid', then this setting \ is the amplitude of the x-coordinate sine function. Ordinary cycloid: a = 1, \ prolate cycloid: a > 1, curtate cycloid: a < 1." visible = @traptype == "parametric functions" && \ ((@parashape1 == "cycloid") || (@parashape1 == "cycloid variant")) endparam param cycampB1 caption = "Cycloid Cos Amplitude" default = 1.0 hint = "If 'Trap Shape' is set to 'cycloid', then this setting \ is the amplitude of the y-coordinate cosine function." visible = @traptype == "parametric functions" && \ ((@parashape1 == "cycloid") || (@parashape1 == "cycloid variant")) endparam param cycxscale1 caption = "Cycloid X-scale" default = 1.0 hint = "If 'Trap Shape' is set to 'cycloid', then this setting \ is the coefficient of the x-coordinate angular term." visible = @traptype == "parametric functions" && \ ((@parashape1 == "cycloid") || (@parashape1 == "cycloid variant")) endparam param cycyoffset1 caption = "Cycloid Y-offset" default = 1.0 hint = "If 'Trap Shape' is set to 'cycloid', then this setting \ is the constant term of the y-coordinate." visible = @traptype == "parametric functions" && \ ((@parashape1 == "cycloid") || (@parashape1 == "cycloid variant")) endparam param cycsinfreq1 caption = "Cycloid Sine Freq" default = 1.0 hint = "If 'Trap Shape' is set to 'cycloid', then this setting \ is the frequency of the x-coordinate sine function." visible = @traptype == "parametric functions" && \ ((@parashape1 == "cycloid") || (@parashape1 == "cycloid variant")) endparam param cyccosfreq1 caption = "Cycloid Cos Freq" default = 1.0 hint = "If 'Trap Shape' is set to 'cycloid', then this setting \ is the frequency of the y-coordinate cosine function." visible = @traptype == "parametric functions" && \ ((@parashape1 == "cycloid") || (@parashape1 == "cycloid variant")) endparam param cycangle1 caption = "Angle Coefficient" default = 4.0 hint = "For some of the curves, this setting \ stretches the angle to provide more waviness." visible = @traptype == "parametric functions" && \ ((@parashape1 == "cycloid") || (@parashape1 == "cycloid variant")) endparam param epicycAN1 caption = "Epicycloid A Numerator" default = 1.0 hint = "If 'Trap Shape' is set to 'epicycloid', then this setting \ affects the amplitudes and frequencies of the trig functions." visible = @traptype == "parametric functions" && \ @parashape1 == "epicycloid" endparam param epicycAD1 caption = "Epicycloid A Denominator" default = 4.0 hint = "If 'Trap Shape' is set to 'epicycloid', then this setting \ affects the amplitudes and frequencies of the trig functions." visible = @traptype == "parametric functions" && \ @parashape1 == "epicycloid" endparam param epicycB1 caption = "Epicycloid B" default = 5.0 hint = "If 'Trap Shape' is set to 'epicycloid', then this setting \ affects the amplitudes of two of the trig functions." visible = @traptype == "parametric functions" && \ @parashape1 == "epicycloid" endparam param epicycC1 caption = "Epicycloid C" default = 1.0 hint = "If 'Trap Shape' is set to 'epicycloid', then this setting \ adjusts the amplitudes and frequencies of the trig functions." visible = @traptype == "parametric functions" && \ @parashape1 == "epicycloid" endparam param nephsinfreq1 caption = "Nephroid Sine Frequency" default = 3.0 hint = "If 'Trap Shape' is set to 'nephroid', then this setting \ adjusts the frequency of the sine function." visible = @traptype == "parametric functions" && \ @parashape1 == "nephroid" endparam param nephcosfreq1 caption = "Nephroid Cos Frequency" default = 3.0 hint = "If 'Trap Shape' is set to 'nephroid', then this setting \ adjusts the frequency of the cosine function." visible = @traptype == "parametric functions" && \ @parashape1 == "nephroid" endparam param nephconstA1 caption = "Nephroid Constant 1" default = 3.0 hint = "If 'Trap Shape' is set to 'nephroid', then this setting \ adjusts the amplitude of the sine function." visible = @traptype == "parametric functions" && \ @parashape1 == "nephroid" endparam param nephconstB1 caption = "Nephroid Constant 2" default = 3.0 hint = "If 'Trap Shape' is set to 'nephroid', then this setting \ adjusts the amplitude of the cosine function." visible = @traptype == "parametric functions" && \ @parashape1 == "nephroid" endparam param parafreqA1 caption = "Parametric Frequency 1" default = 1.0 hint = "For some of the parametric functions, this term adjusts the frequency \ of one of the trig functions." visible = @traptype == "parametric functions" && \ (@parashape1 == "hyperbola" || @parashape1 == "tractrix" || \ @parashape1 == "serpentine" || @parashape1 == "witch of Agnesi" || \ @parashape1 == "Abdank quadratrix" || @parashape1 == "cornoid") endparam param parafreqB1 caption = "Parametric Frequency 2" default = 1.0 hint = "For some of the parametric functions, this term adjusts the frequency \ of one of the trig functions." visible = @traptype == "parametric functions" && \ (@parashape1 == "hyperbola" || @parashape1 == "tractrix" || \ @parashape1 == "serpentine" || @parashape1 == "witch of Agnesi" || \ @parashape1 == "Abdank quadratrix" || @parashape1 == "cornoid") endparam param paraconstA1 caption = "Parametric Constant 1" default = 1.0 hint = "For some of the parametric functions, this term modulates the shape \ or amplitude of one of the trig functions." visible = @traptype == "parametric functions" && \ (@parashape1 == "hyperbola" || @parashape1 == "tractrix" || \ @parashape1 == "serpentine" || @parashape1 == "witch of Agnesi" || \ @parashape1 == "Abdank quadratrix") endparam param paraconstB1 caption = "Parametric Constant 2" default = 1.0 hint = "For some of the parametric functions, this term modulates the shape \ or amplitude of one of the trig functions." visible = @traptype == "parametric functions" && \ (@parashape1 == "hyperbola" || @parashape1 == "tractrix" || \ @parashape1 == "serpentine" || @parashape1 == "witch of Agnesi") endparam param wavysinfreq1 caption = "Wave Frequency 1" default = 20.0 hint = "If 'Trap Type' is 'parametric functions' and 'Trap Shape' is set to \ 'wavy circle', this term adjusts the frequency of the waviness." visible = @traptype == "parametric functions" && \ @parashape1 == "wavy circle" endparam param wavysinamp1 caption = "Wave Amplitude 1" default = 0.1 hint = "If 'Trap Type' is 'parametric functions' and 'Trap Shape' is set to \ 'wavy circle', this term adjusts the size of the waves." visible = @traptype == "parametric functions" && \ @parashape1 == "wavy circle" endparam param wavyradius1 caption = "Circle Radius 1" default = 1.0 hint = "If 'Trap Type' is 'parametric functions' and 'Trap Shape' is set to \ 'wavy circle', this term adjusts the size of the circle." visible = @traptype == "parametric functions" && \ @parashape1 == "wavy circle" endparam param paraxaxis1 caption = "Ellipse X-axis" default = 1.0 hint = "The parameter sets the semimajor axis of the ellipse." visible = @traptype == "parametric functions" && \ @parashape1 == "ellipse" endparam param parayaxis1 caption = "Ellipse Y-axis" default = 0.5 hint = "The parameter sets the semiminor axis of the ellipse." visible = @traptype == "parametric functions" && \ @parashape1 == "ellipse" endparam param epiradiusA1 caption = "Base Circle Radius" default = 1.0 hint = "The parameter sets the radius of the base circle defining the epicycloid \ or epitrochoid." visible = @traptype == "parametric functions" && \ (@parashape1 == "epicycloid 2" || @parashape1 == "epitrochoid") endparam param epiradiusB1 caption = "Rolling Circle Radius" default = 0.33333333333333333333 hint = "The parameter sets the radius of the rolling circle defining the epicycloid \ or epitrochoid." visible = @traptype == "parametric functions" && \ (@parashape1 == "epicycloid 2" || @parashape1 == "epitrochoid") endparam param epiradiusC1 caption = "Rolling Point Distance" default = 0.66666666666666666667 hint = "The parameter sets the distance of the moving point from the center of \ the rolling circle defining the epitrochoid." visible = @traptype == "parametric functions" && \ (@parashape1 == "epitrochoid") endparam param cartxcoeff1 caption = "X-coefficient" default = 1.0 hint = "If 'Trap Type' is 'cartesian', then this shaping parameter \ modifies the x-variable." visible = @traptype == "cartesian" && \ (@xyshape1 == "Alain's curve" || @xyshape1 == "arcs of Samothrace" || \ @xyshape1 == "astroid" || @xyshape1 == "atriphthaloid" || \ @xyshape1 == "bean curve 1" || @xyshape1 == "bean curve 2" || @xyshape1 \ == "beetle curve" || @xyshape1 == "bicorn" || @xyshape1 == "bicuspid" || @xyshape1 == "Chasles cubic" \ || @xyshape1 == "circular cubic" || @xyshape1 == "clinoid" || @xyshape1 == "cross curve" \ || @xyshape1 == "devil's curve" || @xyshape1 == "dipole curve" || @xyshape1 == "double folium" \ || @xyshape1 == "double U curve" || @xyshape1 == "dumbbell curve" || @xyshape1 == "Durer's conchoid"\ || @xyshape1 == "cubic duplicatrix" || @xyshape1 == "Sillke's egg of Columbus" \ || @xyshape1 == "Kepler's egg" || @xyshape1 == "eight curve" || @xyshape1 == "hyperbola" || \ @xyshape1 == "superellipse" || @xyshape1 == "folium 1" || @xyshape1 == "folium 2" \ || @xyshape1 == "Proclus hippopede" || @xyshape1 == "Hoerl curve" || @xyshape1 == "Humbert cubic" \ || @xyshape1 == "kampyle of Eudoxus" || @xyshape1 == "kappa curve" || @xyshape1 == "Kiepert's curve" \ || @xyshape1 == "links curve" || @xyshape1 == "logistic curve" || @xyshape1 == "semicubical parabola" \ || @xyshape1 == "diverging parabola" || @xyshape1 == "nodal curve" || @xyshape1 == "strophoid" \ || @xyshape1 == "ophiuride" || @xyshape1 == "parabola" || @xyshape1 == "parabola 2" \ || @xyshape1 == "parabolic trifolium" || @xyshape1 == "piriform" || @xyshape1 == "pearls of de Sluze" \ || @xyshape1 == "quadratrix" || @xyshape1 == "right strophoid" || @xyshape1 == "scyphoid" \ || @xyshape1 == "damped sine" || @xyshape1 == "catastrophic sine" || @xyshape1 == "plane spiric" \ || @xyshape1 == "svastika" || @xyshape1 == "syntractrix" || @xyshape1 == "tetracuspid" || \ @xyshape1 == "siluroid" \ || @xyshape1 == "trisectrix of Longchamps" || @xyshape1 == "trident" || @xyshape1 == "trisectrix of Maclaurin" \ || @xyshape1 == "Trott curve" \ || @xyshape1 == "Tschirnhausen's cubic" || @xyshape1 == "visiera" || @xyshape1 == "resonance curve" \ || @xyshape1 == "witch of Agnesi") endparam param cartycoeff1 caption = "Y-coefficient" default = 1.0 hint = "If 'Trap Type' is 'cartesian', then this shaping parameter \ modifies the y-variable." visible = @traptype == "cartesian" && \ (@xyshape1 == "Alain's curve" || @xyshape1 == "arcs of Samothrace" || \ @xyshape1 == "astroid" || @xyshape1 == "atriphthaloid" || \ @xyshape1 == "bean curve 1" || @xyshape1 == "bean curve 2" || @xyshape1 \ == "beetle curve" || @xyshape1 == "bicorn" || @xyshape1 == "bicuspid" || @xyshape1 == "Chasles cubic" \ || @xyshape1 == "circular cubic" || @xyshape1 == "clinoid" || @xyshape1 == "cross curve" \ || @xyshape1 == "devil's curve" || @xyshape1 == "double folium" || @xyshape1 == "dumbbell curve" \ || @xyshape1 == "cubic duplicatrix" || @xyshape1 == "Sillke's egg of Columbus" \ || @xyshape1 == "Kepler's egg" || @xyshape1 == "eight curve" || \ @xyshape1 == "superellipse" || @xyshape1 == "Humbert cubic" || @xyshape1 == "hyperbola" \ || @xyshape1 == "Proclus hippopede" || @xyshape1 == "kappa curve" \ || @xyshape1 == "kampyle of Eudoxus" || @xyshape1 == "Kiepert's curve" || @xyshape1 == "kiss curve" \ || @xyshape1 == "links curve" || @xyshape1 == "logistic curve" || @xyshape1 == "semicubical parabola" \ || @xyshape1 == "diverging parabola" || @xyshape1 == "nodal curve" || @xyshape1 == "strophoid" \ || @xyshape1 == "ophiuride" || @xyshape1 == "parabola" || @xyshape1 == "parabola 2" \ || @xyshape1 == "parabolic trifolium" || @xyshape1 == "piriform" || @xyshape1 == "pearls of de Sluze" \ || @xyshape1 == "quadratrix" || @xyshape1 == "pursuit curve" || @xyshape1 == "right strophoid" \ || @xyshape1 == "scyphoid" || @xyshape1 == "anguinea" || @xyshape1 == "damped sine" \ || @xyshape1 == "catastrophic sine" || @xyshape1 == "plane spiric" || @xyshape1 == "svastika" \ || @xyshape1 == "syntractrix" || @xyshape1 == "tetracuspid" || @xyshape1 == \ "trisectrix of Longchamps" || @xyshape1 == "trident" || @xyshape1 == "trisectrix of Maclaurin" \ || @xyshape1 == "Tschirnhausen's cubic" || @xyshape1 == "visiera" || @xyshape1 == "resonance curve" \ || @xyshape1 == "witch of Agnesi") endparam param cartconstant1 caption = "Constant Term" default = 1.0 hint = "If 'Trap Type' is 'cartesian', then this shaping parameter \ modifies some of the curve equations." visible = @traptype == "cartesian" && \ (@xyshape1 == "astroid" || @xyshape1 == "atriphthaloid" || \ @xyshape1 == "bean curve 1" || @xyshape1 == "bean curve 2" || @xyshape1 \ == "beetle curve" || @xyshape1 == "bicorn" || @xyshape1 == "bicuspid" \ || @xyshape1 == "cubic egg" || @xyshape1 == "cardioid" || @xyshape1 == "Cartesian oval" \ || @xyshape1 == "Cassini oval"|| @xyshape1 == "catenary"|| @xyshape1 == \ "Cayley's sextic"|| @xyshape1 == "Ceva's trisectrix" || @xyshape1 == "Chasles cubic" \ || @xyshape1 == "circle" || @xyshape1 == "cissoid of Diocles" \ || @xyshape1 == "circular cubic" || @xyshape1 == "clinoid" || @xyshape1 == "cochleoid" \ || @xyshape1 == "conchoid of circle" || @xyshape1 == "conchoid of Nicomedes" \ || @xyshape1 == "conchoid of de Sluze" || @xyshape1 == "cubic of Apollonius" \ || @xyshape1 == "cranoid" || @xyshape1 == "Jerabek curve" || \ @xyshape1 == "Rosillo curve" || @xyshape1 == "deltoid" || @xyshape1 == "Humbert cubic" \ || @xyshape1 == "devil's curve" || @xyshape1 == "dipole curve" || @xyshape1 == "double egg" \ || @xyshape1 == "double folium" || @xyshape1 == "double U curve" || @xyshape1 == "cubic duplicatrix" \ || @xyshape1 == "Durer's conchoid" || @xyshape1 == "Granville's egg" || @xyshape1 == "hyperbola 2" \ || @xyshape1 == "Kepler's egg" || @xyshape1 == "eight curve" || @xyshape1 == \ "ellipse" || @xyshape1 == "fish quartic" || @xyshape1 == "folium of Descartes" || \ @xyshape1 == "Durer's folium" || @xyshape1 == "Gaussian curve" || @xyshape1 == "Beutel heart" \ || @xyshape1 == "Proclus hippopede" || @xyshape1 == "Hoerl curve" || @xyshape1 == "hyperbola" \ || @xyshape1 == "illumination curve" || @xyshape1 == "Kiepert's curve" || @xyshape1 == "kieroid" \ || @xyshape1 == "kiss curve" || @xyshape1 == "Klein quartic" || @xyshape1 == "Kulp quartic" \ || @xyshape1 == "limacon of Pascal" || @xyshape1 == "links curve" || @xyshape1 == "logistic curve" \ || @xyshape1 == "Lissajous sextic" || @xyshape1 == "Lissajous quartic" || @xyshape1 == "Maltese cross" \ || @xyshape1 == "diverging parabola" || @xyshape1 == "nephroid" || @xyshape1 == "Freeth's nephroid" \ || @xyshape1 == "nodal curve" || @xyshape1 == "strophoid" \ || @xyshape1 == "ophiuride" || @xyshape1 == "parabola 2" \ || @xyshape1 == "parabolic trifolium" || @xyshape1 == "piriform" || @xyshape1 == "pearls of de Sluze" \ || @xyshape1 == "quadratrix" || @xyshape1 == "pursuit curve" || @xyshape1 == "quadrafolium" \ || @xyshape1 == "trifolium" || @xyshape1 == "right strophoid" || @xyshape1 == "scarabaeus" \ || @xyshape1 == "scyphoid" || @xyshape1 == "anguinea" || @xyshape1 == "damped sine" \ || @xyshape1 == "catastrophic sine" || @xyshape1 == "plane spiric" || @xyshape1 == "spiric of Perseus" \ || @xyshape1 == "svastika" || @xyshape1 == "syntractrix" || @xyshape1 == "tetracuspid" || \ @xyshape1 == "siluroid" \ || @xyshape1 == "trisectrix of Longchamps" || @xyshape1 == "trident" || @xyshape1 == "trisectrix of Maclaurin" \ || @xyshape1 == "Trott curve" \ || @xyshape1 == "Tschirnhausen's cubic" || @xyshape1 == "visiera" || @xyshape1 == "resonance curve" \ || @xyshape1 == "witch of Agnesi" || @xyshape1 == "trisectrix of Delanges" || @xyshape1 == "Watt's curve") endparam param cartconstantB1 caption = "Constant B Term" default = 1.0 hint = "If 'Trap Type' is 'cartesian', then this 2nd shaping parameter \ modifies some of the curve equations." visible = @traptype == "cartesian" && \ (@xyshape1 == "atriphthaloid" || @xyshape1 == "bean curve 1" \ || @xyshape1 == "bean curve 2" || @xyshape1 == "bicorn" || @xyshape1 == \ "Cartesian oval" || @xyshape1 == "catenary" || @xyshape1 == "Chasles cubic" \ || @xyshape1 == "circular cubic" || @xyshape1 == "clinoid" || @xyshape1 == "cochleoid" \ || @xyshape1 == "conchoid of circle" || @xyshape1 == "conchoid of Nicomedes" \ || @xyshape1 == "conchoid of de Sluze" || @xyshape1 == "cubic of Apollonius" \ || @xyshape1 == "cranoid" || @xyshape1 == "Jerabek curve" || @xyshape1 == "Rosillo curve" \ || @xyshape1 == "double egg" || @xyshape1 == "Durer's conchoid" \ || @xyshape1 == "Granville's egg" || @xyshape1 == "fish quartic" || @xyshape1 == "Hoerl curve" \ || @xyshape1 == "Durer's folium" || @xyshape1 == "Beutel heart" || @xyshape1 == "hyperbola" \ || @xyshape1 == "kieroid" || @xyshape1 == "Klein quartic" || @xyshape1 == "Kulp quartic" || \ @xyshape1 == "links curve" || @xyshape1 == "logistic curve" || @xyshape1 == "Maltese cross" \ || @xyshape1 == "Lissajous quartic" || @xyshape1 == "nephroid" \ || @xyshape1 == "nodal curve" || @xyshape1 == "strophoid" \ || @xyshape1 == "pearls of de Sluze" \ || @xyshape1 == "quadratrix" || @xyshape1 == "pursuit curve" || @xyshape1 == "quadrafolium" \ || @xyshape1 == "trifolium" || @xyshape1 == "right strophoid" || @xyshape1 == "scarabaeus" \ || @xyshape1 == "anguinea" || @xyshape1 == "damped sine" \ || @xyshape1 == "catastrophic sine" || @xyshape1 == "plane spiric" || @xyshape1 == "spiric of Perseus" \ || @xyshape1 == "syntractrix" || @xyshape1 == "tetracuspid" || @xyshape1 == "trisectrix of Maclaurin" \ || @xyshape1 == "Trott curve" \ || @xyshape1 == "Tschirnhausen's cubic" || @xyshape1 == "resonance curve" \ || @xyshape1 == "trisectrix of Delanges" || @xyshape1 == "Watt's curve") endparam param cartconstantC1 caption = "Constant C Term" default = 1.0 hint = "If 'Trap Type' is 'cartesian', then this 3rd shaping parameter \ modifies some of the curve equations." visible = @traptype == "cartesian" && \ (@xyshape1 == "circular cubic" \ || @xyshape1 == "conchoid of circle" || @xyshape1 == "conchoid of de Sluze" \ || @xyshape1 == "cubic of Apollonius" || @xyshape1 == "Rosillo curve" \ || @xyshape1 == "Granville's egg" || @xyshape1 == "kieroid" || @xyshape1 == "Klein quartic" \ || @xyshape1 == "links curve" || @xyshape1 == "Maltese cross" \ || @xyshape1 == "Lissajous quartic" || @xyshape1 == "nephroid" \ || @xyshape1 == "nodal curve" || @xyshape1 == "pearls of de Sluze" \ || @xyshape1 == "pursuit curve" || @xyshape1 == "trifolium" || @xyshape1 == "scarabaeus" \ || @xyshape1 == "catastrophic sine" || @xyshape1 == "plane spiric" || @xyshape1 == "spiric of Perseus" \ || @xyshape1 == "Trott curve" || @xyshape1 == "Watt's curve") endparam param cartexexp1 caption = "Ellipse X-exponent" default = 2.5 hint = "If 'Trap Shape' is set to 'superellipse', this parameter determines the \ exponent used for the x-coordinate." visible = @traptype == "cartesian" && @xyshape1 == \ "superellipse" endparam param carteyexp1 caption = "Ellipse Y-exponent" default = 2.5 hint = "If 'Trap Shape' is set to 'superellipse', this parameter determines the \ exponent used for the y-coordinate." visible = @traptype == "cartesian" && @xyshape1 == \ "superellipse" endparam param coniceccent1 caption = "Conic Eccentricity" default = 1.5 hint = "If 'Trap Shape' is set to 'conic focal conchoid', this parameter determines the \ eccentricity of the conic curve. circle, e = 0; ellipse, 01." visible = @traptype == "cartesian" && @xyshape1 == \ "conic focal conchoid" endparam param conchmod1 caption = "Conchoid Modulus" default = 1.5 hint = "If 'Trap Shape' is set to 'conic focal conchoid', this parameter determines the \ modulus of the conchoid." visible = @traptype == "cartesian" && @xyshape1 == \ "conic focal conchoid" endparam param testfunction caption = "Z Function" enum = "none" "sin" "cos" "tan" "cot" "sec" "csc" "ver" "vcs" "cvs" "cvc" \ "exs" "exc" "crd" "asin" "acos" "atan" "acot" "asec" "acsc" "aver" \ "avcs" "acvs" "acvc" "aexs" "aexc" "acrd" "exp" "exp(-n)" "exp(1/n)" \ "exp(-1/n)" "exp(n^2)" "exp(-n^2)" "exp(1/n^2)" "exp(-1/n^2)" "sinh" \ "asinh" "cosh" "acosh" "tanh" "atanh" "cotanh" "sqr" "sqrt" "power" \ "log" "log(-n)" "log(1/n)" "log(-1/n)" "1/n" "absolute value" \ "ceiling" "floor" "truncation" "rounding" "asin 2" "acos 2" "atan 2" "aexs 2" \ "acot 2" "asec 2" "acsc 2" "aver 2" "avcs 2" "acvs 2" "acvc 2" "aexc 2" "acrd 2" \ "log(n^2)" "log(-n^2)" "log(1/n^2)" "log(-1/n^2)" "log log" \ "exp(exp)" "n^n" "n^n^n" "constant^n" "constant^n^n" default = 0 hint = "This setting enables an optional function to be applied before \ the Barnsley comparison." endparam param functionmode caption = "Function Mode" enum = "cabs" "real" "imag" "real 2" "imag 2" "sum" "sum 2" "sum 3" \ "product" "product 2" "product 3" "difference" "difference 2" \ "difference 3" default = 0 hint = "This setting makes no contribution to this formula, but was \ inadvertently introduced into early versions, so it is retained \ for compatibility, but now hidden.." visible = FALSE endparam param testpower caption = "Function Exponent" default = 3.0 hint = "If the 'Test Function' is set to 'power', then this is the \ exponent that is used." visible = (@testfunction == "power") endparam param testbase caption = "Function Base" default = 4.0 hint = "If the 'Test Function' is set to 'constant^n' or 'constant^n^n', \ then this is the constant that is used." visible = ((@testfunction == "constant^n") || (@testfunction == "constant^n^n")) endparam param testadjustment caption = "Z Adjustment" default = 0.0 hint = "This value is added to the #z before the Barnsley test." endparam param barnsleymode caption = "Barnsley Mode" enum = "cabs" "real" "imag" "real 2" "imag 2" "sum" "sum 2" "sum 3" \ "product" "product 2" "product 3" "difference" "difference 2" \ "difference 3" "test constant" default = 14 hint = "This setting determines what is compared to the trapped point \ or its test function. If 'test constant' is selected, then the \ orbit trap 'Trap Mode' value is compared directly to the 'Barnsley \ Test Constant' value rather than to #z itself." endparam param barntestconst caption = "Barnsley Test Constant" default = 0.3 hint = "If parameter 'Barnsley Mode' is set to 'test constant', \ then this is the constant used to test the trapped point \ 'Trap Mode'." visible = @barnsleymode == "test constant" endparam param barnsleytype caption = "Barnsley Type" enum = "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" hint = "This setting determines which set of equations is used." endparam param barnconst1 caption = "1st Barnsley Constant" default = (0,0) hint = "This parameter modifies the 1st Barnsley equation." endparam param barnconst2 caption = "2nd Barnsley Constant" default = (0,0) hint = "This parameter modifies the 2nd Barnsley equation." endparam param bailtest caption = "Bailout Test" enum = "mod" "real" "imag" "and" "or" "eor" "manh" "manr" "real 2" "imag 2" \ "sum" "sum 2" "product" "difference" "difference 2" "difference 3" \ "quotient" "quotient 2" default = 0 endparam param bailout caption = "Bailout Value" default = 4.0 min = 0.001 endparam param heatmap caption = "Heat Map?" default = FALSE hint = "If enabled, #z encodes the ratio of the number of times that Barnsley equation \ #1 is used to that of Barnsley equation #2, i.e., real(#z) = number \ of uses of equation 1, and imag(#z) = number of uses of equation 2. \ This value can be used with the 'Heat Map' coloring in jam2.ucl \ to determine how often each Barnsley equation is chosen." endparam param jconstant caption = "Seed/Perturbation" default = (0,0) endparam param fixbug caption = "Fix Barnsley Bug?" default = TRUE hint = "Enabling this setting fixes an error in the barnsley routine." endparam param mandy caption = "Mandelbrot flag" default = TRUE hint = "Works in combination with the Julia flag for switching" visible = FALSE endparam param julia caption = "Julia flag" default = FALSE hint = "Works in combination with the Mandelbrot flag for switching" visible = FALSE endparam switch: type = "jam-OrbitTrapBarnsley" trapmode = trapmode traptype = traptype trapshape = trapshape morepolygons1 = morepolygons1 morespirolaterals1 = morespirolaterals1 morecurves1 = morecurves1 polarshape1 = polarshape1 polarmode1 = polarmode1 parashape1 = parashape1 xyshape1 = xyshape1 fixtrapbug = fixtrapbug nscale1 = nscale1 rotate = rotate center = center isocheight = isocheight isocwidth = isocwidth fixisosceles = fixisosceles leafAlength = leafAlength leafBlength = leafBlength leafClength = leafClength leafDlength = leafDlength leafElength = leafElength leafFlength = leafFlength leafGlength = leafGlength leafHlength = leafHlength leafIlength = leafIlength leafJlength = leafJlength leafKlength = leafKlength leafLlength = leafLlength starspikiness = starspikiness innerscale = innerscale rhombheight = rhombheight rhombwidth = rhombwidth kiteheight = kiteheight kitewidth = kitewidth dartheight = dartheight dartwidth = dartwidth rectlength = rectlength rectwidth = rectwidth flat4height = flat4height flat4width = flat4width finger1length = finger1length finger2length = finger2length finger3length = finger3length finger4length = finger4length finger5length = finger5length sawheight = sawheight windheight = windheight windwidth = windwidth sqrheight = sqrheight sqrwidth = sqrwidth unityroot1 = unityroot1 singleroot1 = singleroot1 whichroot1 = whichroot1 collinearspot1 = collinearspot1 squarespot1 = squarespot1 triarray1 = triarray1 raynumber = raynumber dotnumber = dotnumber dashnumber = dashnumber spiralorder1 = spiralorder1 ellipseexponent1 = ellipseexponent1 ellipseheight1 = ellipseheight1 ellipsewidth1 = ellipsewidth1 hypotrochA1 = hypotrochA1 hypotrochB1 = hypotrochB1 hypotrochH1 = hypotrochH1 cycloidamp1 = cycloidamp1 cycloidconst1 = cycloidconst1 cycloidlength1 = cycloidlength1 grain = grain lissaamp1 = lissaamp1 lissafreq1 = lissafreq1 lissaphase1 = lissaphase1 lissaamp2 = lissaamp2 lissafreq2 = lissafreq2 lissaphase2 = lissaphase2 lissadomain = lissadomain lissaopen = lissaopen moritzamp1 = moritzamp1 moritzfreqN1 = moritzfreqN1 moritzfreqD1 = moritzfreqD1 moritzconst1 = moritzconst1 circlenum1 = circlenum1 rose1 = rose1 folium1 = folium1 foliumperturb1 = foliumperturb1 cardioid1 = cardioid1 cardioidperturb1 = cardioidperturb1 cissoidDioA1 = cissoidDioA1 cissoidDioB1 = cissoidDioB1 cochleoid1 = cochleoid1 conchoidA1 = conchoidA1 conchoidB1 = conchoidB1 conchoidC1 = conchoidC1 cubicpA1 = cubicpA1 cubicpB1 = cubicpB1 cubicpC1 = cubicpC1 majaxis1 = majaxis1 minaxis1 = minaxis1 epower1 = epower1 tanfreq1 = tanfreq1 fosinfreq1 = fosinfreq1 focosfreq1 = focosfreq1 sinfreq21 = sinfreq21 hyperbolic1 = hyperbolic1 kampfreq1 = kampfreq1 kamppower1 = kamppower1 nodalfreq1 = nodalfreq1 lemfreq1 = lemfreq1 lempower1 = lempower1 limfreq1 = limfreq1 limamp1 = limamp1 limoffset1 = limoffset1 litpower1 = litpower1 logspiA1 = logspiA1 logspiB1 = logspiB1 parafreq1 = parafreq1 paraamp1 = paraamp1 paraoffset1 = paraoffset1 paraspi1 = paraspi1 paraspioffset1 = paraspioffset1 semicubtanfreq1 = semicubtanfreq1 semicubcosfreq1 = semicubcosfreq1 semicubpower1 = semicubpower1 archspioffset1 = archspioffset1 strophcosfreqA1 = strophcosfreqA1 strophcosfreqB1 = strophcosfreqB1 polarfreqA1 = polarfreqA1 polarampA1 = polarampA1 trefoilcosamp1 = trefoilcosamp1 trefoilsinamp1 = trefoilsinamp1 trefoilcossymmetry1 = trefoilcossymmetry1 trefoilsinsymmetry1 = trefoilsinsymmetry1 trefoilconstant1 = trefoilconstant1 trilimA1 = trilimA1 trilimB1 = trilimB1 trilimamp1 = trilimamp1 trilimfreq1 = trilimfreq1 folioidamp1 = folioidamp1 folioidfreqN1 = folioidfreqN1 folioidfreqD1 = folioidfreqD1 folioidconstA1 = folioidconstA1 folioidconstB1 = folioidconstB1 hyponumerator1 = hyponumerator1 hypodenom1 = hypodenom1 companC11 = companC11 companC21 = companC21 companfreq1 = companfreq1 cycampV1 = cycampA1 cycampB1 = cycampB1 cycxscale1 = cycxscale1 cycyoffset1 = cycyoffset1 cycsinfreq1 = cycsinfreq1 cyccosfreq1 = cyccosfreq1 cycangle1 = cycangle1 epicycAN1 = epicycAN1 epicycAD1 = epicycAD1 epicycB1 = epicycB1 epicycC1 = epicycC1 nephsinfreq1 = nephsinfreq1 nephcosfreq1 = nephcosfreq1 nephconstA1 = nephconstA1 nephconstB1 = nephconstB1 parafreqA1 = parafreqA1 parafreqB1 = parafreqB1 paraconstA1 = paraconstA1 paraconstB1 = paraconstB1 wavysinfreq1 = wavysinfreq1 wavysinamp1 = wavysinamp1 wavyradius1 = wavyradius1 paraxaxis1 = paraxaxis1 parayaxis1 = parayaxis1 epiradiusA1 = epiradiusA1 epiradiusB1 = epiradiusB1 epiradiusC1 = epiradiusC1 cartxcoeff1 = cartxcoeff1 cartycoeff1 = cartycoeff1 cartconstant1 = cartconstant1 cartconstantB1 = cartconstantB1 cartconstantC1 = cartconstantC1 cartexexp1 = cartexexp1 carteyexp1 = carteyexp1 coniceccent1 = coniceccent1 conchmod1 = conchmod1 testfunction = testfunction functionmode = functionmode testpower = testpower testbase = testbase testadjustment = testadjustment barnsleymode = barnsleymode barntestconst = barntestconst barnsleytype = barnsleytype barnconst1 = barnconst1 barnconst2 = barnconst2 bailtest = bailtest bailout = bailout ; heatmap = heatmap ; don't want heat map showing in the Julia version jconstant = #pixel fixbug = fixbug mandy = julia julia = mandy }