jam-TrigTraps { ; jam 010731. Major update 011113. ; _colorings based on trigonometric functions used as traps. ; Things that have big effects: Trap Function, Z Initialization, Flavor, ; Watch What, and Color By. init: float _colorindex = 0.0 complex ztemp = (0,0), complex ztrapped = (0,0), complex ztemptrapped = (0,0) complex ztemp2 = (0,0), complex z2trapped = (0,0), complex z2temptrapped = (0,0) float ztest = 0.0, float z2testtrapped = 0.0, float scratch = 0.0 int iter = 0, int itertrapped = 0, int iter2trapped = 0, int itercount = 0 int count = @iterations int threshcount = 0 float twopi = #pi * 2.0 float scale = @tscale, float rotation = @rotate * #pi / 180, complex center = @centr if rotation < 0 rotation = rotation + twopi endif ; rotation rotation = -rotation ; eliminates negation step during each fractal iteration if @towatch == 0 int watch = #maxiter else int watch = @skip + @towatch endif ; towatch complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex znewstyle = (0,0) float thresh = @threshold, float innerradius = thresh - @ringwidth if ( @whattotrap > 12 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap float _color = 0.0 float zangle = 0.0 ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, complex zinput = (0,0) complex zlast = (0,0), complex tlast = (1,0), float temp = 0.0, float sign = 0.0 float tempx = 0.0, float tempy = 0.0 if (( @whattotrap == 1 ) || ( @whattotrap == 4 ) || ( @whattotrap == 6 )) ; we will be trapping a maximum rather than a minimum float ztesttrapped = -1.0e20 elseif ( @whattotrap == 2 ) ; average float ztesttrapped = 0 ; this variable will store the running total for computing avg else ; minimum float ztesttrapped = 1.0e20 endif ; whattotrap if ( @pixelinit == 0 ) complex pix = #pixel elseif ( @pixelinit == 1 ) complex pix = 1/#pixel elseif ( @pixelinit == 2 ) complex pix = #pixel * #pixel elseif ( @pixelinit == 3 ) complex pix = 1 / ( #pixel * #pixel ) elseif ( @pixelinit == 4 ) complex pix = log(#pixel) elseif ( @pixelinit == 5 ) complex pix = exp( #pixel) elseif ( @pixelinit == 6 ) complex pix = #pixel^#pixel elseif ( @pixelinit == 7 ) complex pix = sin( #pixel ) elseif ( @pixelinit == 8 ) complex pix = cos( #pixel ) elseif ( @pixelinit == 9 ) complex pix = tan( #pixel ) elseif ( @pixelinit == 10 ) complex pix = asin( #pixel ) elseif ( @pixelinit == 11 ) complex pix = acos( #pixel ) elseif ( @pixelinit == 12 ) complex pix = atan( #pixel ) elseif ( @pixelinit == 13 ) complex pix = sinh( #pixel ) elseif ( @pixelinit == 14 ) complex pix = cosh( #pixel ) elseif ( @pixelinit == 15 ) complex pix = tanh( #pixel ) elseif ( @pixelinit == 16 ) complex pix = asinh( #pixel ) elseif ( @pixelinit == 17 ) complex pix = acosh( #pixel ) elseif ( @pixelinit == 18 ) complex pix = atanh( #pixel ) elseif ( @pixelinit == 19 ) complex pix = log( 1/#pixel ) elseif ( @pixelinit == 20 ) complex pix = log( log( #pixel )) elseif ( @pixelinit == 21 ) complex pix = exp( -#pixel ) elseif ( @pixelinit == 22 ) complex pix = exp( 1/#pixel ) elseif ( @pixelinit == 23 ) complex pix = #pixel^(-#pixel) elseif ( @pixelinit == 24 ) complex pix = sin( #pixel ) pix = pix * pix elseif ( @pixelinit == 25 ) complex pix = cos( #pixel ) pix = pix * pix elseif ( @pixelinit == 26 ) complex pix = tan( #pixel ) pix = pix * pix elseif ( @pixelinit == 27 ) complex pix = cotan( #pixel ) elseif ( @pixelinit == 28 ) complex pix = 1/cos( #pixel ) elseif ( @pixelinit == 29 ) complex pix = 1/sin( #pixel ) elseif ( @pixelinit == 30 ) complex pix = cotan( #pixel ) pix = pix * pix elseif ( @pixelinit == 31 ) complex pix = 1/cos( #pixel ) pix = pix * pix elseif ( @pixelinit == 32 ) complex pix = 1/sin( #pixel ) pix = pix * pix elseif ( @pixelinit == 33 ) complex pix = #pixel^(#pixel) pix = #pixel^pix elseif ( @pixelinit == 34 ) complex pix = #pixel^(#pixel) pix = 1/( #pixel^pix ) elseif ( @pixelinit == 35 ) complex pix = log(-#pixel) elseif ( @pixelinit == 36 ) complex pix = 1/log( #pixel ) elseif ( @pixelinit == 37 ) complex pix = #pixel * log( #pixel ) elseif ( @pixelinit == 38 ) complex pix = sin( #pixel ) / #pixel elseif ( @pixelinit == 39 ) complex pix = cos( #pixel ) / #pixel elseif ( @pixelinit == 40 ) complex pix = sin( #pixel ) * cos( #pixel ) elseif ( @pixelinit == 41 ) complex pix = sin( #pixel^2 ) elseif ( @pixelinit == 42 ) complex pix = exp( -1/#pixel ) elseif ( @pixelinit == 43 ) complex pix = #pixel * exp( #pixel ) elseif ( @pixelinit == 44 ) complex pix = #pixel * exp( -#pixel ) elseif ( @pixelinit == 45 ) complex pix = #pixel * exp( 1/#pixel ) elseif ( @pixelinit == 46 ) complex pix = #pixel * exp( -1/#pixel ) elseif ( @pixelinit == 47 ) complex pix = #pixel * #pixel * #pixel elseif ( @pixelinit == 48 ) complex pix = 1 / ( #pixel * #pixel * #pixel ) elseif ( @pixelinit == 49 ) complex pix = atan( 1 / #pixel ) elseif ( @pixelinit == 50 ) complex pix = acos( 1 / #pixel ) elseif ( @pixelinit == 51 ) complex pix = asin( 1 / #pixel ) elseif ( @pixelinit == 52 ) complex pix = tan( #pixel ) / #pixel elseif ( @pixelinit == 53 ) complex pix = cotan( #pixel ) / #pixel elseif ( @pixelinit == 54 ) complex pix = 1 / ( #pixel * cos( #pixel )) elseif ( @pixelinit == 55 ) complex pix = 1 / ( #pixel * sin( #pixel )) elseif ( @pixelinit == 56 ) complex pix = #pixel * sin( #pixel ) elseif ( @pixelinit == 57 ) complex pix = #pixel * cos( #pixel ) elseif ( @pixelinit == 58 ) complex pix = #pixel * tan( #pixel ) elseif ( @pixelinit == 59 ) complex pix = #pixel * cotan( #pixel ) elseif ( @pixelinit == 60 ) complex pix = #pixel /cos( #pixel ) elseif ( @pixelinit == 61 ) complex pix = #pixel /sin( #pixel ) elseif ( @pixelinit == 62 ) complex pix = sin( 1/#pixel ) elseif ( @pixelinit == 63 ) complex pix = cos( 1/#pixel ) elseif ( @pixelinit == 64 ) complex pix = tan( 1/#pixel ) elseif ( @pixelinit == 65 ) complex pix = cotan( 1/#pixel ) elseif ( @pixelinit == 66 ) complex pix = 1/cos( 1/#pixel ) elseif ( @pixelinit == 67 ) complex pix = 1/sin( 1/#pixel ) elseif ( @pixelinit == 68 ) complex pix = cotanh( #pixel ) elseif ( @pixelinit == 69 ) complex pix = 1/cosh( #pixel ) elseif ( @pixelinit == 70 ) complex pix = 1/sinh( #pixel ) elseif ( @pixelinit == 71 ) complex pix = atanh( 1/#pixel ) elseif ( @pixelinit == 72 ) complex pix = acosh( 1/#pixel ) elseif ( @pixelinit == 73 ) complex pix = asinh( 1/#pixel ) elseif @pixelinit == 74 complex pix = #pixel^@ppower elseif @pixelinit == 75 complex pix = sinh(#pixel) pix = pix * pix elseif @pixelinit == 76 complex pix = cosh( #pixel ) pix = pix * pix elseif @pixelinit == 77 complex pix = tanh(#pixel) pix = pix * pix elseif @pixelinit == 78 complex pix = cotanh( #pixel ) pix = pix * pix elseif @pixelinit == 79 complex pix = 1/cosh(#pixel) pix = pix * pix elseif @pixelinit == 80 complex pix = 1 / sinh( #pixel ) pix = pix * pix elseif @pixelinit == 81 complex pix = sinh(1/#pixel) elseif @pixelinit == 82 complex pix = cosh(1/#pixel) elseif @pixelinit == 83 complex pix = tanh(1/#pixel) elseif @pixelinit == 84 complex pix = cotanh(1/#pixel) elseif @pixelinit == 85 complex pix = 1/cosh(1/#pixel) elseif @pixelinit == 86 complex pix = 1/sinh(1/#pixel) elseif @pixelinit == 87 complex pix = sin( #pixel ) * tan(#pixel) elseif @pixelinit == 88 complex pix = sinh(#pixel) * tanh(#pixel) elseif @pixelinit == 89 complex pix = sinh(#pixel) * cosh(#pixel) elseif @pixelinit == 90 complex pix = sinh(#pixel), zscratch = cosh(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 91 complex pix = sin(#pixel), zscratch = cos(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 92 complex pix = 1/#pixel pix = sin(pix)*cos(pix) elseif @pixelinit == 93 complex pix = sin( 1/#pixel ) pix = pix*pix elseif @pixelinit == 94 complex pix = sin(#pixel) * cos(1/#pixel) elseif @pixelinit == 95 complex pix = sin(#pixel) * sin(1/#pixel) elseif @pixelinit == 96 complex pix = log(#pixel) pix = pix*pix elseif @pixelinit == 97 complex pix = sin(#pixel) * sin(2*#pixel) elseif @pixelinit == 98 complex pix = exp(2*#pixel) elseif @pixelinit == 99 complex pix = exp(-2*#pixel) elseif @pixelinit == 100 complex pix = 1/#pixel pix = sinh(pix)*cosh(pix) elseif @pixelinit == 101 complex pix = sinh( 1/#pixel ) pix = pix*pix elseif @pixelinit == 102 complex pix = sinh(#pixel) * cosh(1/#pixel) elseif @pixelinit == 103 complex pix = sinh(#pixel) * sinh(1/#pixel) elseif @pixelinit == 104 complex pix = sin(#pixel) * sinh(#pixel) elseif @pixelinit == 105 complex pix = sin(#pixel) * cosh(#pixel) elseif @pixelinit == 106 complex pix = sin(#pixel), zscratch = sinh(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 107 complex pix = sin(#pixel)*exp(#pixel) elseif @pixelinit == 108 complex pix = cos(#pixel)*exp(#pixel) elseif @pixelinit == 109 complex pix = sinh(#pixel)*exp(#pixel) elseif @pixelinit == 110 complex pix = cosh(#pixel)*exp(#pixel) elseif @pixelinit == 111 complex pix = sin(#pixel)*log(#pixel) elseif @pixelinit == 112 complex pix = cos(#pixel)*log(#pixel) elseif @pixelinit == 113 complex pix = sinh(#pixel)*log(#pixel) else ; @pixelinit == 114 complex pix = cosh(#pixel)*log(#pixel) endif ; pixelinit loop: iter = iter + 1 if ( iter > @skip ) && ( iter <= watch ) if ( @initialization == 0 ) ztemp = #z elseif ( @initialization == 1 ) ztemp = 1/#z elseif ( @initialization == 2 ) ztemp = #z * #z elseif ( @initialization == 3 ) ztemp = 1 / ( #z * #z ) elseif ( @initialization == 4 ) ztemp = log(#z) elseif ( @initialization == 5 ) ztemp = exp( #z) elseif ( @initialization == 6 ) ztemp = #z^#z elseif ( @initialization == 7 ) ztemp = sin( #z ) elseif ( @initialization == 8 ) ztemp = cos( #z ) elseif ( @initialization == 9 ) ztemp = tan( #z ) elseif ( @initialization == 10 ) ztemp = asin( #z ) elseif ( @initialization == 11 ) ztemp = acos( #z ) elseif ( @initialization == 12 ) ztemp = atan( #z ) elseif ( @initialization == 13 ) ztemp = sinh( #z ) elseif ( @initialization == 14 ) ztemp = cosh( #z ) elseif ( @initialization == 15 ) ztemp = tanh( #z ) elseif ( @initialization == 16 ) ztemp = asinh( #z ) elseif ( @initialization == 17 ) ztemp = acosh( #z ) elseif ( @initialization == 18 ) ztemp = atanh( #z ) elseif ( @initialization == 19 ) ztemp = log( 1/#z ) elseif ( @initialization == 20 ) ztemp = log( log( #z )) elseif ( @initialization == 21 ) ztemp = exp( -#z ) elseif ( @initialization == 22 ) ztemp = exp( 1/#z ) elseif ( @initialization == 23 ) ztemp = #z^(-#z) elseif ( @initialization == 24 ) ztemp = sin( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 25 ) ztemp = cos( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 26 ) ztemp = tan( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 27 ) ztemp = cotan( #z ) elseif ( @initialization == 28 ) ztemp = 1/cos( #z ) elseif ( @initialization == 29 ) ztemp = 1/sin( #z ) elseif ( @initialization == 30 ) ztemp = cotan( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 31 ) ztemp = 1/cos( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 32 ) ztemp = 1/sin( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 33 ) ztemp = #z^(#z) ztemp = #z^ztemp elseif ( @initialization == 34 ) ztemp = #z^(#z) ztemp = 1/( #z^ztemp ) elseif ( @initialization == 35 ) ztemp = log(-#z) elseif ( @initialization == 36 ) ztemp = 1/log( #z ) elseif ( @initialization == 37 ) ztemp = #z * log( #z ) elseif ( @initialization == 38 ) ztemp = sin( #z ) / #z elseif ( @initialization == 39 ) ztemp = cos( #z ) / #z elseif ( @initialization == 40 ) ztemp = sin( #z ) * cos( #z ) elseif ( @initialization == 41 ) ztemp = sin( #z^2 ) elseif ( @initialization == 42 ) ztemp = exp( -1/#z ) elseif ( @initialization == 43 ) ztemp = #z * exp( #z ) elseif ( @initialization == 44 ) ztemp = #z * exp( -#z ) elseif ( @initialization == 45 ) ztemp = #z * exp( 1/#z ) elseif ( @initialization == 46 ) ztemp = #z * exp( -1/#z ) elseif ( @initialization == 47 ) ztemp = #z * #z * #z elseif ( @initialization == 48 ) ztemp = 1 / ( #z * #z * #z ) elseif ( @initialization == 49 ) ztemp = atan( 1 / #z ) elseif ( @initialization == 50 ) ztemp = acos( 1 / #z ) elseif ( @initialization == 51 ) ztemp = asin( 1 / #z ) elseif ( @initialization == 52 ) ztemp = tan( #z ) / #z elseif ( @initialization == 53 ) ztemp = cotan( #z ) / #z elseif ( @initialization == 54 ) ztemp = 1 / ( #z * cos( #z )) elseif ( @initialization == 55 ) ztemp = 1 / ( #z * sin( #z )) elseif ( @initialization == 56 ) ztemp = #z * sin( #z ) elseif ( @initialization == 57 ) ztemp = #z * cos( #z ) elseif ( @initialization == 58 ) ztemp = #z * tan( #z ) elseif ( @initialization == 59 ) ztemp = #z * cotan( #z ) elseif ( @initialization == 60 ) ztemp = #z/cos( #z ) elseif ( @initialization == 61 ) ztemp = #z/sin( #z ) elseif ( @initialization == 62 ) ztemp = sin( 1/#z ) elseif ( @initialization == 63 ) ztemp = cos( 1/#z ) elseif ( @initialization == 64 ) ztemp = tan( 1/#z ) elseif ( @initialization == 65 ) ztemp = cotan( 1/#z ) elseif ( @initialization == 66 ) ztemp = 1/cos( 1/#z ) elseif ( @initialization == 67 ) ztemp = 1/sin( 1/#z ) elseif ( @initialization == 68 ) ztemp = cotanh( #z ) elseif ( @initialization == 69 ) ztemp = 1/cosh( #z ) elseif ( @initialization == 70 ) ztemp = 1/sinh( #z ) elseif ( @initialization == 71 ) ztemp = atanh( 1/#z ) elseif ( @initialization == 72 ) ztemp = acosh( 1/#z ) elseif ( @initialization == 73 ) ztemp = asinh( 1/#z ) elseif @initialization == 74 ztemp = #z^@zpower elseif @initialization == 75 ztemp = sinh(#z) ztemp = ztemp * ztemp elseif @initialization == 76 ztemp = cosh( #z ) ztemp = ztemp * ztemp elseif @initialization == 77 ztemp = tanh(#z) ztemp = ztemp * ztemp elseif @initialization == 78 ztemp = cotanh( #z ) ztemp = ztemp * ztemp elseif @initialization == 79 ztemp = 1/cosh(#z) ztemp = ztemp * ztemp elseif @initialization == 80 ztemp = 1 / sinh( #z ) ztemp = ztemp * ztemp elseif @initialization == 81 ztemp = sinh(1/#z) elseif @initialization == 82 ztemp = cosh(1/#z) elseif @initialization == 83 ztemp = tanh(1/#z) elseif @initialization == 84 ztemp = cotanh(1/#z) elseif @initialization == 85 ztemp = 1/cosh(1/#z) elseif @initialization == 86 ztemp = 1/sinh(1/#z) elseif @initialization == 87 ztemp = sin( #z ) * tan(#z) elseif @initialization == 88 ztemp = sinh(#z) * tanh(#z) elseif @initialization == 89 ztemp = sinh(#z) * cosh(#z) elseif @initialization == 90 ztemp = sinh(#z), zscratch = cosh(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 91 ztemp = sin(#z), zscratch = cos(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 92 ztemp = 1/#z ztemp = sin(ztemp)*cos(ztemp) elseif @initialization == 93 ztemp = sin( 1/#z ) ztemp = ztemp*ztemp elseif @initialization == 94 ztemp = sin(#z) * cos(1/#z) elseif @initialization == 95 ztemp = sin(#z) * sin(1/#z) elseif @initialization == 96 ztemp = log(#z) ztemp = ztemp*ztemp elseif @initialization == 97 ztemp = sin(#z) * sin(2*#z) elseif @initialization == 98 ztemp = exp(2*#z) elseif @initialization == 99 ztemp = exp(-2*#z) elseif @initialization == 100 ztemp = 1/#z ztemp = sinh(ztemp)*cosh(ztemp) elseif @initialization == 101 ztemp = sinh( 1/#z ) ztemp = ztemp*ztemp elseif @initialization == 102 ztemp = sinh(#z) * cosh(1/#z) elseif @initialization == 103 ztemp = sinh(#z) * sinh(1/#z) elseif @initialization == 104 ztemp = sin(#z) * sinh(#z) elseif @initialization == 105 ztemp = sin(#z) * cosh(#z) elseif @initialization == 106 ztemp = sin(#z), zscratch = sinh(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 107 ztemp = sin(#z)*exp(#z) elseif @initialization == 108 ztemp = cos(#z)*exp(#z) elseif @initialization == 109 ztemp = sinh(#z)*exp(#z) elseif @initialization == 110 ztemp = cosh(#z)*exp(#z) elseif @initialization == 111 ztemp = sin(#z)*log(#z) elseif @initialization == 112 ztemp = cos(#z)*log(#z) elseif @initialization == 113 ztemp = sinh(#z)*log(#z) else ; @initialization == 114 ztemp = cosh(#z)*log(#z) endif ; initialization if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip ztemp = flip(ztemp) elseif @trapvariant == 2 ; conjugate ztemp = conj(ztemp) elseif @trapvariant == 3 ; flip conjugate ztemp = flip(conj(ztemp)) elseif @trapvariant == 4 ; negate ztemp = -ztemp elseif @trapvariant == 5 ; negate flip ztemp = -flip(ztemp) elseif @trapvariant == 6 ; negate conjugate ztemp = -conj(ztemp) elseif @trapvariant == 7 ; negate flip conj = conj flip ztemp = -flip(conj(ztemp)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication ztemp = ztemp * @operatee elseif @operator == 2 ; addition ztemp = ztemp + @operatee elseif @operator == 3 ; subtraction ztemp = ztemp - @operatee elseif @operator == 4 ; division ztemp = ztemp / @operatee elseif @operator == 5 ; exponentiation ztemp = ztemp ^ @operatee elseif @operator == 6 ; subtraction2 ztemp = @operatee - ztemp elseif @operator == 7 ; division2 ztemp = @operatee / ztemp elseif @operator == 8 ; exponential2 ztemp = @operatee ^ ztemp elseif @operator == 9 ; logarithm ztemp = log(ztemp) / log(@operatee) elseif @operator == 10 ; logarithm2 ztemp = log(@operatee) / log(ztemp) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip ztemp = flip(ztemp) elseif @trapvariant == 2 ; conjugate ztemp = conj(ztemp) elseif @trapvariant == 3 ; flip conjugate ztemp = flip(conj(ztemp)) elseif @trapvariant == 4 ; negate ztemp = -ztemp elseif @trapvariant == 5 ; negate flip ztemp = -flip(ztemp) elseif @trapvariant == 6 ; negate conjugate ztemp = -conj(ztemp) elseif @trapvariant == 7 ; negate flip conj = conj flip ztemp = -flip(conj(ztemp)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; center, rotate, scale z ztemp = ztemp - center ztemp = ztemp * exp( flip( rotation )) ztemp = scale * ztemp if @history if @histype == 0 zold = ztemp - zold, ztemp = zold elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold, zold = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold, zold = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp zangle = atan2( ztemp ) if zangle < 0 zangle = zangle + twopi endif ; zangle if @newstyle znewstyle = ztemp else znewstyle = #z endif ; newstyle repeat ; count if ( @trig == 0 ) ; sin ztemp = @amplitude * sin( @frequency * ztemp + pix ) elseif ( @trig == 1 ) ; cos ztemp = @amplitude * cos( @frequency * ztemp + pix ) elseif ( @trig == 2 ) ; tan ztemp = @amplitude * tan( @frequency * ztemp + pix ) elseif ( @trig == 3 ) ; cot ztemp = @amplitude * cotan( @frequency * ztemp + pix ) elseif ( @trig == 4 ) ; sec ztemp = @amplitude / cos( @frequency * ztemp + pix ) elseif ( @trig == 5 ) ; csc ztemp = @amplitude / sin( @frequency * ztemp + pix ) elseif ( @trig == 6 ) ; sin2 ztemp = @amplitude * sin( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 7 ) ; cos2 ztemp = @amplitude * cos( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 8 ) ; tan2 ztemp = @amplitude * tan( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 9 ) ; cot2 ztemp = @amplitude * cotan( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 10 ) ; sec2 ztemp = @amplitude / cos( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 11 ) ; csc2 ztemp = @amplitude / sin( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 12 ) ; sinz/z ztemp = @amplitude * sin( @frequency * ztemp + pix ) / ztemp elseif ( @trig == 13 ) ; cosz/z ztemp = @amplitude * cos( @frequency * ztemp + pix ) / ztemp elseif ( @trig == 14 ) ; tanz/z ztemp = @amplitude * tan( @frequency * ztemp + pix ) / ztemp elseif ( @trig == 15 ) ; cotz/z ztemp = @amplitude * cotan( @frequency * ztemp + pix ) / ztemp elseif ( @trig == 16 ) ; secz/z ztemp = @amplitude / ( ztemp * cos( @frequency * ztemp + pix )) elseif ( @trig == 17 ) ; cscz/z ztemp = @amplitude / (ztemp * sin( @frequency * ztemp + pix )) elseif ( @trig == 18 ) ; zsinz ztemp = ztemp * @amplitude * sin( @frequency * ztemp + pix ) elseif ( @trig == 19 ) ; zcosz ztemp = ztemp * @amplitude * cos( @frequency * ztemp + pix ) elseif ( @trig == 20 ) ; ztanz ztemp = ztemp * @amplitude * tan( @frequency * ztemp + pix ) elseif ( @trig == 21 ) ; zcotz ztemp = ztemp * @amplitude * cotan( @frequency * ztemp + pix ) elseif ( @trig == 22 ) ; zsecz ztemp = ztemp * @amplitude / cos( @frequency * ztemp + pix ) elseif ( @trig == 23 ) ; zcscz ztemp = ztemp * @amplitude / sin( @frequency * ztemp + pix ) elseif ( @trig == 24 ) ; z2sinz ztemp = ztemp * ztemp * @amplitude * sin( @frequency * ztemp + pix ) elseif ( @trig == 25 ) ; z2cosz ztemp = ztemp * ztemp * @amplitude * cos( @frequency * ztemp + pix ) elseif ( @trig == 26 ) ; z2tanz ztemp = ztemp * ztemp * @amplitude * tan( @frequency * ztemp + pix ) elseif ( @trig == 27 ) ; sinz*cosz ztemp = @amplitude * @amplitude * sin( @frequency * ztemp + pix ) \ * cos( @frequency * ztemp + pix ) elseif ( @trig == 28 ) ; sin2cos2 ztemp2 = @amplitude * sin( @frequency * ztemp + pix ) ztemp2 = ztemp2 * ztemp2 ztemp = @amplitude * cos( @frequency * ztemp + pix ) ztemp = ztemp * ztemp * ztemp2 elseif ( @trig == 29 ) ; arcsin ztemp = @amplitude * asin( @frequency * ztemp + pix ) elseif ( @trig == 30 ) ; arccos ztemp = @amplitude * acos( @frequency * ztemp + pix ) elseif ( @trig == 31 ) ; arctan ztemp = @amplitude * atan( @frequency * ztemp + pix ) elseif ( @trig == 32 ) ; arccot ztemp = @amplitude * atan( 1/(@frequency * ztemp + pix )) elseif ( @trig == 33 ) ; arcsec ztemp = @amplitude * acos( 1/(@frequency * ztemp + pix )) elseif ( @trig == 34 ) ; arccsc ztemp = @amplitude * asin( 1/(@frequency * ztemp + pix )) elseif ( @trig == 35 ) ; arcsin2 ztemp = @amplitude * asin( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 36 ) ; arccos2 ztemp = @amplitude * acos( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 37 ) ; arctan2 ztemp = @amplitude * atan( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @trig == 38 ) ; arccot2 ztemp = @amplitude * atan( 1/(@frequency * ztemp + pix )) ztemp = ztemp * ztemp elseif ( @trig == 39 ) ; arcsec2 ztemp = @amplitude * acos( 1/(@frequency * ztemp + pix )) ztemp = ztemp * ztemp elseif ( @trig == 40 ) ; arccsc2 ztemp = @amplitude * asin( 1/(@frequency * ztemp + pix )) ztemp = ztemp * ztemp elseif ( @trig == 41 ) ; zarcsinz ztemp = ztemp * @amplitude * asin( @frequency * ztemp + pix ) elseif ( @trig == 42 ) ; zarccosz ztemp = ztemp * @amplitude * acos( @frequency * ztemp + pix ) elseif ( @trig == 43 ) ; zarctanz ztemp = ztemp * @amplitude * atan( @frequency * ztemp + pix ) elseif ( @trig == 44 ) ; zarccotz ztemp = ztemp * @amplitude * atan( 1/(@frequency * ztemp + pix )) elseif ( @trig == 45 ) ; zarcsecz ztemp = ztemp * @amplitude * acos( 1/(@frequency * ztemp + pix )) elseif ( @trig == 46 ) ; zarccscz ztemp = ztemp * @amplitude * asin( 1/(@frequency * ztemp + pix )) elseif ( @trig == 47 ) ; arcsinz/z ztemp = @amplitude * asin( @frequency * ztemp + pix ) / ztemp elseif ( @trig == 48 ) ; arccosz/z ztemp = @amplitude * acos( @frequency * ztemp + pix ) / ztemp elseif ( @trig == 49 ) ; arctanz/z ztemp = @amplitude * atan( @frequency * ztemp + pix ) / ztemp elseif ( @trig == 50 ) ; arccotz/z ztemp = @amplitude * atan( 1/(@frequency * ztemp + pix )) / ztemp elseif ( @trig == 51 ) ; arcsecz/z ztemp = @amplitude * acos( 1/(@frequency * ztemp + pix )) / ztemp else ; @trig == 52 ; arccscz/z ztemp = @amplitude * asin( 1/(@frequency * ztemp + pix )) / ztemp endif ; trig if @polar ztemp = cabs(ztemp) * exp( flip( zangle )) endif ; @polar if ( @trapmode == 0 ) ; transmogrified trap-modulated znewstyle ztest = cabs( ztemp ) elseif ( @trapmode == 1 ) ; distance between fractal and trap ztest = cabs( znewstyle - ztemp ) elseif ( @trapmode == 2 ) ; difference ztest = cabs( ztemp - znewstyle ) elseif ( @trapmode == 3 ) ; sum ztest = cabs( znewstyle + ztemp ) elseif ( @trapmode == 4 ) ; product ztest = cabs( znewstyle * ztemp ) elseif ( @trapmode == 5 ) ; quotient 1 ztest = cabs( znewstyle / ztemp ) elseif ( @trapmode == 6 ) ; quotient 2 ztest = cabs( ztemp / znewstyle ) elseif ( @trapmode == 7 ) ; power 1 ztest = cabs( znewstyle ^ ztemp ) elseif ( @trapmode == 8 ) ; power 2 ztest = cabs( ztemp ^ znewstyle ) elseif ( @trapmode == 9 ) ; arithmetic mean ztest = cabs( (znewstyle + ztemp)/2 ) elseif ( @trapmode == 10 ) ; geometric mean ztest = cabs( sqrt(znewstyle * ztemp) ) elseif ( @trapmode == 11 ) ; angle 1 ztest = #pi + atan2( ztemp ) elseif ( @trapmode == 12 ) ; angle 2 ztest = #pi + atan2( znewstyle - ztemp ) elseif ( @trapmode == 13 ) ; angle 3 ztest = #pi + atan2( znewstyle + ztemp ) elseif ( @trapmode == 14 ) ; angle 4 ztest = #pi + atan2( znewstyle * ztemp ) elseif ( @trapmode == 15 ) ; angle 5 ztest = #pi + atan2( znewstyle / ztemp ) elseif ( @trapmode == 16 ) ; angle 6 ztest = #pi + atan2( ztemp / znewstyle ) elseif ( @trapmode == 17 ) ; angle 7 ztest = #pi + atan2( znewstyle ^ ztemp ) elseif ( @trapmode == 18 ) ; angle 8 ztest = #pi + atan2( ztemp ^ znewstyle ) elseif ( @trapmode == 19 ) ; real 1 ztest = abs( real( ztemp )) elseif ( @trapmode == 20 ) ; real 2 ztest = abs( real( znewstyle - ztemp )) elseif ( @trapmode == 21 ) ; real 3 ztest = abs( real( znewstyle + ztemp )) elseif ( @trapmode == 22 ) ; real 4 ztest = abs( real( znewstyle * ztemp )) elseif ( @trapmode == 23 ) ; real 5 ztest = abs( real( znewstyle / ztemp )) elseif ( @trapmode == 24 ) ; real 6 ztest = abs( real( ztemp / znewstyle )) elseif ( @trapmode == 25 ) ; real 7 ztest = abs( real( znewstyle ^ ztemp )) elseif ( @trapmode == 26 ) ; real 8 ztest = abs( real( ztemp ^ znewstyle )) elseif ( @trapmode == 27 ) ; imag 1 ztest = abs( imag( ztemp )) elseif ( @trapmode == 28 ) ; imag 2 ztest = abs( imag( znewstyle - ztemp )) elseif ( @trapmode == 29 ) ; imag 3 ztest = abs( imag( znewstyle + ztemp )) elseif ( @trapmode == 30 ) ; imag 4 ztest = abs( imag( znewstyle * ztemp )) elseif ( @trapmode == 31 ) ; imag 5 ztest = abs( imag( znewstyle / ztemp )) elseif ( @trapmode == 32 ) ; imag 6 ztest = abs( imag( ztemp / znewstyle )) elseif ( @trapmode == 33 ) ; imag 7 ztest = abs( imag( znewstyle ^ ztemp )) else ; @trapmode == 34 --- imag 8 ztest = abs( imag( ztemp ^ znewstyle )) endif ; trapmode ; Save value for later turbulence tlast = ztest if ( @whattotrap == 0 ) ; minimum if ( ztest < ztesttrapped ) ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp itertrapped = iter endif ; ztest elseif ( @whattotrap == 1 ) ; maximum if ( ztest > ztesttrapped ) ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp itertrapped = iter endif ; ztest elseif ( @whattotrap == 2 ) ; average ztesttrapped = ztest + ztesttrapped itercount = itercount + 1 ztrapped = znewstyle ; this will not be an accurate mode ztemptrapped = ztemp ; this will not be an accurate mode itertrapped = iter ; this will not be an accurate mode elseif ( @whattotrap == 3 ) ; 2nd minimum if ( ztest < ztesttrapped ) ; found a new minimum z2testtrapped = ztesttrapped ; store 2nd minimum ztesttrapped = ztest ; and store new minimum z2trapped = ztrapped ztrapped = znewstyle z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 4 ) ; 2nd maximum if ( ztest > ztesttrapped ) z2testtrapped = ztesttrapped ztesttrapped = ztest z2trapped = ztrapped ztrapped = znewstyle z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 5 ) ; avg. of min & 2nd min values if ( ztest < ztesttrapped ) ; found a new minimum z2testtrapped = ztesttrapped ; store 2nd minimum ztesttrapped = ztest ; and store new minimum z2trapped = ztrapped ztrapped = znewstyle z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 6 ) ; avg. of max & 2nd max values if ( ztest > ztesttrapped ) ; found a new maximum z2testtrapped = ztesttrapped ; store 2nd maximum ztesttrapped = ztest ; and store new maximum z2trapped = ztrapped ztrapped = znewstyle z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 7 ) ; first trap iteration if ( itertrapped == 0 ) ; nothing trapped yet, so this must be the first itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; itertrapped elseif ( @whattotrap == 8 ) ; last trap iteration; store each one in turn itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ( @whattotrap == 9 ) ; first threshold if ( itertrapped == 0 ) ; only trapping the first iteration that crosses threshold if ( ztest < @threshold ) ; if so, trap it if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; itertrapped elseif ( @whattotrap == 10 ) ; last threshold --- just store them all if ( ztest < @threshold ) ; if so, trap it if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest elseif @whattotrap == 11 ; threshold count, but store last value if ( ztest < @threshold ) ; if so, trap it threshcount = threshcount + 1 if !@ringstyle itertrapped = threshcount * iter ztesttrapped = threshcount * ztest ztrapped = threshcount * znewstyle ztemptrapped = threshcount * ztemp elseif ztest > innerradius itertrapped = threshcount * iter ztesttrapped = threshcount * ztest ztrapped = threshcount * znewstyle ztemptrapped = threshcount * ztemp endif ; ringstyle endif ; ztest elseif ( @whattotrap == 12 ) ; 2nd to dip below threshold value if ( ztest < @threshold ) if ( itertrapped == 0 ) ; nothing trapped yet, set flag for next time itertrapped = -1 elseif itertrapped == -1 ; must be the 2nd threshold value if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; itertrapped endif ; test elseif ( @whattotrap == 13 ) ; 1st to exceed threshold limit if ( itertrapped == 0 ) ; nothing trapped yet if ( ztest > @threshold ) if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius for limits itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; itertrapped elseif ( @whattotrap == 14 ) ; 2nd to exceed threshold limit if ( ztest > @threshold ) if ( itertrapped == 0 ) ; nothing trapped yet, set flag for next time itertrapped = -1 elseif itertrapped == -1 ; must be the 2nd threshold value if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; itertrapped endif ; test elseif ( @whattotrap == 15 ) ; last to exceed threshold --- just store them all if ( ztest > @threshold ) if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius for limits itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; whattotrap count = count - 1 until ( count < 1 ) endif ; iter final: if ( itertrapped != 0 ) ; something has been trapped if ( @whattotrap == 2 ) ; calculate the average ztesttrapped = ztesttrapped / itercount elseif ( ( @whattotrap == 3 ) || ( @whattotrap == 4 ) ) ; we need to plot ; 2nd min/max, so switch ztesttrapped = z2testtrapped ztrapped = z2trapped ztemptrapped = z2temptrapped itertrapped = iter2trapped elseif ( ( @whattotrap == 5 ) || ( @whattotrap == 6 ) ) ; we need to average ztesttrapped = ( ztesttrapped + z2testtrapped ) / 2 ztrapped = ( ztrapped + z2trapped ) / 2 scratch = ( itertrapped + iter2trapped ) / 2.0 itertrapped = round( scratch ) endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; products ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; iteration _colorindex = @colorspread * itertrapped _color = _colorindex / #maxiter elseif ( @colorby == 1 ) ; magnitude _color = @colorspread * ztesttrapped elseif ( @colorby == 2 ) ; distance _color = @colorspread * cabs( ztrapped - ztemptrapped ) elseif ( @colorby == 3 ) ; angle _colorindex = atan2( ztrapped ) + #pi _color = @colorspread * _colorindex elseif ( @colorby == 4 ) ; modulated angle _color = @colorspread * ( #pi + atan2( ztemptrapped )) elseif ( @colorby == 5 ) ; angle of difference _color = @colorspread * ( #pi + atan2( ztrapped - ztemptrapped )) elseif ( @colorby == 6 ) ; zmag _color = @colorspread * cabs( ztrapped ) elseif ( @colorby == 7 ) ; modulated zmag _color = @colorspread * cabs( ztemptrapped ) endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else _color = ((_color + _coloradjust) + ( itertrapped % @ranges )) / @ranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else if ( @solid ) #solid = true else #index = 0.98 + _coloradjust endif ; solid endif ; itertrapped default: title = "Surreal" param trig caption = "Trap Function" enum = "sine" "cosine" "tangent" "cotangent" "secant" "cosecant" \ "sin^2" "cos^2" "tan^2" "cot^2" "sec^2" "csc^2" "sin(z)/z" \ "cos(z)/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)" "z^2 sin(z)" \ "z^2 cos(z)" "z^2 tan(z)" "sin(z)cos(z)" "sin^2(z)cos^2(z)" \ "arcsin" "arccos" "arctan" "arccot" "arcsec" "arccsc" "arcsin^2" \ "arccos^2" "arctan^2" "arccot^2" "arcsec^2" "arccsc^2" "zarcsin(z)" \ "zarccos(z)" "zarctan(z)" "zarccot(z)" "zarcsec(z)" "zarccsc(z)" \ "arcsin(z)/z" "arccos(z)/z" "arctan(z)/z" "arccot(z)/z" "arcsec(z)/z" \ "arccsc(z)/z" default = 0 hint = "Select primary trap function" endparam param trapmode caption = "Flavor" enum = "modulation" "distance" "difference" "sum" "product" "quotient 1" \ "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" "angle 1" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 1" "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 1" "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "The trap mode. The 'Watch What?' comparison is based on this mode" endparam param whattotrap caption = "Watch What?" enum = "minimum" "maximum" "average" "2nd minimum" "2nd maximum" \ "min2 avg" "max2 avg" "first" "last" "threshold" "last threshold" \ "threshold count" "2nd threshold" "1st limit" "2nd limit" "last limit" default = 0 hint = "What value should be examined for trapping? The 'Flavor' value is \ trapped using this criterion. If 'Watch What?' = [first] 'threshold', \ 'last threshold', or 'threshold count', parameter 'Threshold' may be adjusted" endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to input to the trap function loop" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" endparam param @colorby caption = "Color By?" enum = "iteration" "magnitude" "distance" "angle" "modulated angle" \ "difference angle" "z magnitude" "modulated magnitude" default = 0 hint = "Criterion for computing color index. For selections other than \ 'iteration', parameter 'Color Spread' may need to be drastically lowered!" endparam param @colorspread caption = "Color Spread" default = 6.0 hint = "This value can be used to expand/contract the range of colors. \ For 'Color By?' modes other than 'iteration', this value may need to \ be reduced significantly (~0.1-0.3 or so)." endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that the trap function should be rotated from \ its default position" endparam param centr caption = "Center" default = (0,0) hint = "Enter coordinates of trap function center/origin" endparam param tscale caption = "Scale" default = 1.0 min = 0.0 hint = "This parameter determines the size of the trap function" endparam param pixelinit caption = "Pixel Initialization" enum = "p" "1/p" "p^2" "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)" "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)" "p^power" \ "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 = "The trap loop utilizes this initialized pixel value; p = #pixel" endparam param ppower caption = "Pixel Power" default = (0,1) hint = "Pixel exponent if param 'Pixel Initialization' is set to 'p^power'" endparam param frequency caption = "Frequency" default = (-1,5) hint = "Sets the frequency of the trap function" endparam param amplitude caption = "Amplitude" default = (0.5,4) hint = "Sets the height of the trap function" endparam param threshold caption = "Threshold" default = 0.20 hint = "This parameter sets the maximum value that will be trapped if 'Watch What?' is set \ to 'threshold', and the minimum value that will be trapped if 'Watch What?' is set \ to 'limit'" endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Watch What' is set to one \ of the 'Threshold' or 'Limit' options, then Threshold becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Watch What' is set to a 'Threshold' \ or 'Limit' option, this parameter determines the width of the ring trap" endparam param iterations caption = "Trap Iterations" default = 1 min = 1 hint = "The number of times the trap function will loop for each fractal iteration" endparam param skip caption = "Iterations to Skip" default = 0 min = 0 hint = "The number of fractal iterations to skip before starting to trap z" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" endparam param newstyle caption = "New Style Trapping?" default = FALSE hint = "If enabled, compares trapped value with initialized z rather \ than #z" endparam param polar caption = "Polar Coordinates?" default = FALSE hint = "Alternative interpretation of trap value" endparam param solid caption = "Solid Background" default = false hint = "Sets non-trapped pixels to the inside solid color" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds distortion (fBm) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" endparam } jam-HypTraps { ; jam 010731 ; Colorings based on hyperbolic functions used as traps. ; Things that have big effects: Trap Function, Z Initialization, Flavor, ; Watch What, and Color By. init: float _colorindex = 0.0 complex ztemp = (0,0), complex ztrapped = (0,0), complex ztemptrapped = (0,0) complex ztemp2 = (0,0), complex z2trapped = (0,0), complex z2temptrapped = (0,0) float ztest = 0.0, float z2testtrapped = 0.0, float scratch = 0.0 int iter = 0, int itertrapped = 0, int iter2trapped = 0, int itercount = 0 int count = @iterations int threshcount = 0 float twopi = #pi * 2.0 float scale = @tscale, float rotation = @rotate * #pi / 180, complex center = @centr if rotation < 0 rotation = rotation + twopi endif ; rotation rotation = -rotation ; eliminates negation step during each fractal iteration if @towatch == 0 int watch = #maxiter else int watch = @skip + @towatch endif ; towatch complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex znewstyle = (0,0) float thresh = @threshold, float innerradius = thresh - @ringwidth if ( @whattotrap > 12 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap float _color = 0.0 float zangle = 0.0 ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, complex zinput = (0,0) complex zlast = (0,0), complex tlast = (1,0), float temp = 0.0, float sign = 0.0 float tempx = 0.0, float tempy = 0.0 if (( @whattotrap == 1 ) || ( @whattotrap == 4 ) || ( @whattotrap == 6 )) ; we will be trapping a maximum rather than a minimum float ztesttrapped = -1.0e20 elseif ( @whattotrap == 2 ) ; average float ztesttrapped = 0 ; this variable will store the running total for computing avg else ; minimum float ztesttrapped = 1.0e20 endif ; whattotrap if ( @pixelinit == 0 ) complex pix = #pixel elseif ( @pixelinit == 1 ) complex pix = 1/#pixel elseif ( @pixelinit == 2 ) complex pix = #pixel * #pixel elseif ( @pixelinit == 3 ) complex pix = 1 / ( #pixel * #pixel ) elseif ( @pixelinit == 4 ) complex pix = log(#pixel) elseif ( @pixelinit == 5 ) complex pix = exp( #pixel) elseif ( @pixelinit == 6 ) complex pix = #pixel^#pixel elseif ( @pixelinit == 7 ) complex pix = sin( #pixel ) elseif ( @pixelinit == 8 ) complex pix = cos( #pixel ) elseif ( @pixelinit == 9 ) complex pix = tan( #pixel ) elseif ( @pixelinit == 10 ) complex pix = asin( #pixel ) elseif ( @pixelinit == 11 ) complex pix = acos( #pixel ) elseif ( @pixelinit == 12 ) complex pix = atan( #pixel ) elseif ( @pixelinit == 13 ) complex pix = sinh( #pixel ) elseif ( @pixelinit == 14 ) complex pix = cosh( #pixel ) elseif ( @pixelinit == 15 ) complex pix = tanh( #pixel ) elseif ( @pixelinit == 16 ) complex pix = asinh( #pixel ) elseif ( @pixelinit == 17 ) complex pix = acosh( #pixel ) elseif ( @pixelinit == 18 ) complex pix = atanh( #pixel ) elseif ( @pixelinit == 19 ) complex pix = log( 1/#pixel ) elseif ( @pixelinit == 20 ) complex pix = log( log( #pixel )) elseif ( @pixelinit == 21 ) complex pix = exp( -#pixel ) elseif ( @pixelinit == 22 ) complex pix = exp( 1/#pixel ) elseif ( @pixelinit == 23 ) complex pix = #pixel^(-#pixel) elseif ( @pixelinit == 24 ) complex pix = sin( #pixel ) pix = pix * pix elseif ( @pixelinit == 25 ) complex pix = cos( #pixel ) pix = pix * pix elseif ( @pixelinit == 26 ) complex pix = tan( #pixel ) pix = pix * pix elseif ( @pixelinit == 27 ) complex pix = cotan( #pixel ) elseif ( @pixelinit == 28 ) complex pix = 1/cos( #pixel ) elseif ( @pixelinit == 29 ) complex pix = 1/sin( #pixel ) elseif ( @pixelinit == 30 ) complex pix = cotan( #pixel ) pix = pix * pix elseif ( @pixelinit == 31 ) complex pix = 1/cos( #pixel ) pix = pix * pix elseif ( @pixelinit == 32 ) complex pix = 1/sin( #pixel ) pix = pix * pix elseif ( @pixelinit == 33 ) complex pix = #pixel^(#pixel) pix = #pixel^pix elseif ( @pixelinit == 34 ) complex pix = #pixel^(#pixel) pix = 1/( #pixel^pix ) elseif ( @pixelinit == 35 ) complex pix = log(-#pixel) elseif ( @pixelinit == 36 ) complex pix = 1/log( #pixel ) elseif ( @pixelinit == 37 ) complex pix = #pixel * log( #pixel ) elseif ( @pixelinit == 38 ) complex pix = sin( #pixel ) / #pixel elseif ( @pixelinit == 39 ) complex pix = cos( #pixel ) / #pixel elseif ( @pixelinit == 40 ) complex pix = sin( #pixel ) * cos( #pixel ) elseif ( @pixelinit == 41 ) complex pix = sin( #pixel^2 ) elseif ( @pixelinit == 42 ) complex pix = exp( -1/#pixel ) elseif ( @pixelinit == 43 ) complex pix = #pixel * exp( #pixel ) elseif ( @pixelinit == 44 ) complex pix = #pixel * exp( -#pixel ) elseif ( @pixelinit == 45 ) complex pix = #pixel * exp( 1/#pixel ) elseif ( @pixelinit == 46 ) complex pix = #pixel * exp( -1/#pixel ) elseif ( @pixelinit == 47 ) complex pix = #pixel * #pixel * #pixel elseif ( @pixelinit == 48 ) complex pix = 1 / ( #pixel * #pixel * #pixel ) elseif ( @pixelinit == 49 ) complex pix = atan( 1 / #pixel ) elseif ( @pixelinit == 50 ) complex pix = acos( 1 / #pixel ) elseif ( @pixelinit == 51 ) complex pix = asin( 1 / #pixel ) elseif ( @pixelinit == 52 ) complex pix = tan( #pixel ) / #pixel elseif ( @pixelinit == 53 ) complex pix = cotan( #pixel ) / #pixel elseif ( @pixelinit == 54 ) complex pix = 1 / ( #pixel * cos( #pixel )) elseif ( @pixelinit == 55 ) complex pix = 1 / ( #pixel * sin( #pixel )) elseif ( @pixelinit == 56 ) complex pix = #pixel * sin( #pixel ) elseif ( @pixelinit == 57 ) complex pix = #pixel * cos( #pixel ) elseif ( @pixelinit == 58 ) complex pix = #pixel * tan( #pixel ) elseif ( @pixelinit == 59 ) complex pix = #pixel * cotan( #pixel ) elseif ( @pixelinit == 60 ) complex pix = #pixel /cos( #pixel ) elseif ( @pixelinit == 61 ) complex pix = #pixel /sin( #pixel ) elseif ( @pixelinit == 62 ) complex pix = sin( 1/#pixel ) elseif ( @pixelinit == 63 ) complex pix = cos( 1/#pixel ) elseif ( @pixelinit == 64 ) complex pix = tan( 1/#pixel ) elseif ( @pixelinit == 65 ) complex pix = cotan( 1/#pixel ) elseif ( @pixelinit == 66 ) complex pix = 1/cos( 1/#pixel ) elseif ( @pixelinit == 67 ) complex pix = 1/sin( 1/#pixel ) elseif ( @pixelinit == 68 ) complex pix = cotanh( #pixel ) elseif ( @pixelinit == 69 ) complex pix = 1/cosh( #pixel ) elseif ( @pixelinit == 70 ) complex pix = 1/sinh( #pixel ) elseif ( @pixelinit == 71 ) complex pix = atanh( 1/#pixel ) elseif ( @pixelinit == 72 ) complex pix = acosh( 1/#pixel ) elseif ( @pixelinit == 73 ) complex pix = asinh( 1/#pixel ) elseif @pixelinit == 74 complex pix = #pixel^@ppower elseif @pixelinit == 75 complex pix = sinh(#pixel) pix = pix * pix elseif @pixelinit == 76 complex pix = cosh( #pixel ) pix = pix * pix elseif @pixelinit == 77 complex pix = tanh(#pixel) pix = pix * pix elseif @pixelinit == 78 complex pix = cotanh( #pixel ) pix = pix * pix elseif @pixelinit == 79 complex pix = 1/cosh(#pixel) pix = pix * pix elseif @pixelinit == 80 complex pix = 1 / sinh( #pixel ) pix = pix * pix elseif @pixelinit == 81 complex pix = sinh(1/#pixel) elseif @pixelinit == 82 complex pix = cosh(1/#pixel) elseif @pixelinit == 83 complex pix = tanh(1/#pixel) elseif @pixelinit == 84 complex pix = cotanh(1/#pixel) elseif @pixelinit == 85 complex pix = 1/cosh(1/#pixel) elseif @pixelinit == 86 complex pix = 1/sinh(1/#pixel) elseif @pixelinit == 87 complex pix = sin( #pixel ) * tan(#pixel) elseif @pixelinit == 88 complex pix = sinh(#pixel) * tanh(#pixel) elseif @pixelinit == 89 complex pix = sinh(#pixel) * cosh(#pixel) elseif @pixelinit == 90 complex pix = sinh(#pixel), zscratch = cosh(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 91 complex pix = sin(#pixel), zscratch = cos(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 92 complex pix = 1/#pixel pix = sin(pix)*cos(pix) elseif @pixelinit == 93 complex pix = sin( 1/#pixel ) pix = pix*pix elseif @pixelinit == 94 complex pix = sin(#pixel) * cos(1/#pixel) elseif @pixelinit == 95 complex pix = sin(#pixel) * sin(1/#pixel) elseif @pixelinit == 96 complex pix = log(#pixel) pix = pix*pix elseif @pixelinit == 97 complex pix = sin(#pixel) * sin(2*#pixel) elseif @pixelinit == 98 complex pix = exp(2*#pixel) elseif @pixelinit == 99 complex pix = exp(-2*#pixel) elseif @pixelinit == 100 complex pix = 1/#pixel pix = sinh(pix)*cosh(pix) elseif @pixelinit == 101 complex pix = sinh( 1/#pixel ) pix = pix*pix elseif @pixelinit == 102 complex pix = sinh(#pixel) * cosh(1/#pixel) elseif @pixelinit == 103 complex pix = sinh(#pixel) * sinh(1/#pixel) elseif @pixelinit == 104 complex pix = sin(#pixel) * sinh(#pixel) elseif @pixelinit == 105 complex pix = sin(#pixel) * cosh(#pixel) elseif @pixelinit == 106 complex pix = sin(#pixel), zscratch = sinh(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 107 complex pix = sin(#pixel)*exp(#pixel) elseif @pixelinit == 108 complex pix = cos(#pixel)*exp(#pixel) elseif @pixelinit == 109 complex pix = sinh(#pixel)*exp(#pixel) elseif @pixelinit == 110 complex pix = cosh(#pixel)*exp(#pixel) elseif @pixelinit == 111 complex pix = sin(#pixel)*log(#pixel) elseif @pixelinit == 112 complex pix = cos(#pixel)*log(#pixel) elseif @pixelinit == 113 complex pix = sinh(#pixel)*log(#pixel) else ; @pixelinit == 114 complex pix = cosh(#pixel)*log(#pixel) endif ; pixelinit loop: iter = iter + 1 if ( iter > @skip ) && ( iter <= watch ) if ( @initialization == 0 ) ztemp = #z elseif ( @initialization == 1 ) ztemp = 1/#z elseif ( @initialization == 2 ) ztemp = #z * #z elseif ( @initialization == 3 ) ztemp = 1 / ( #z * #z ) elseif ( @initialization == 4 ) ztemp = log(#z) elseif ( @initialization == 5 ) ztemp = exp( #z) elseif ( @initialization == 6 ) ztemp = #z^#z elseif ( @initialization == 7 ) ztemp = sin( #z ) elseif ( @initialization == 8 ) ztemp = cos( #z ) elseif ( @initialization == 9 ) ztemp = tan( #z ) elseif ( @initialization == 10 ) ztemp = asin( #z ) elseif ( @initialization == 11 ) ztemp = acos( #z ) elseif ( @initialization == 12 ) ztemp = atan( #z ) elseif ( @initialization == 13 ) ztemp = sinh( #z ) elseif ( @initialization == 14 ) ztemp = cosh( #z ) elseif ( @initialization == 15 ) ztemp = tanh( #z ) elseif ( @initialization == 16 ) ztemp = asinh( #z ) elseif ( @initialization == 17 ) ztemp = acosh( #z ) elseif ( @initialization == 18 ) ztemp = atanh( #z ) elseif ( @initialization == 19 ) ztemp = log( 1/#z ) elseif ( @initialization == 20 ) ztemp = log( log( #z )) elseif ( @initialization == 21 ) ztemp = exp( -#z ) elseif ( @initialization == 22 ) ztemp = exp( 1/#z ) elseif ( @initialization == 23 ) ztemp = #z^(-#z) elseif ( @initialization == 24 ) ztemp = sin( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 25 ) ztemp = cos( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 26 ) ztemp = tan( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 27 ) ztemp = cotan( #z ) elseif ( @initialization == 28 ) ztemp = 1/cos( #z ) elseif ( @initialization == 29 ) ztemp = 1/sin( #z ) elseif ( @initialization == 30 ) ztemp = cotan( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 31 ) ztemp = 1/cos( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 32 ) ztemp = 1/sin( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 33 ) ztemp = #z^(#z) ztemp = #z^ztemp elseif ( @initialization == 34 ) ztemp = #z^(#z) ztemp = 1/( #z^ztemp ) elseif ( @initialization == 35 ) ztemp = log(-#z) elseif ( @initialization == 36 ) ztemp = 1/log( #z ) elseif ( @initialization == 37 ) ztemp = #z * log( #z ) elseif ( @initialization == 38 ) ztemp = sin( #z ) / #z elseif ( @initialization == 39 ) ztemp = cos( #z ) / #z elseif ( @initialization == 40 ) ztemp = sin( #z ) * cos( #z ) elseif ( @initialization == 41 ) ztemp = sin( #z^2 ) elseif ( @initialization == 42 ) ztemp = exp( -1/#z ) elseif ( @initialization == 43 ) ztemp = #z * exp( #z ) elseif ( @initialization == 44 ) ztemp = #z * exp( -#z ) elseif ( @initialization == 45 ) ztemp = #z * exp( 1/#z ) elseif ( @initialization == 46 ) ztemp = #z * exp( -1/#z ) elseif ( @initialization == 47 ) ztemp = #z * #z * #z elseif ( @initialization == 48 ) ztemp = 1 / ( #z * #z * #z ) elseif ( @initialization == 49 ) ztemp = atan( 1 / #z ) elseif ( @initialization == 50 ) ztemp = acos( 1 / #z ) elseif ( @initialization == 51 ) ztemp = asin( 1 / #z ) elseif ( @initialization == 52 ) ztemp = tan( #z ) / #z elseif ( @initialization == 53 ) ztemp = cotan( #z ) / #z elseif ( @initialization == 54 ) ztemp = 1 / ( #z * cos( #z )) elseif ( @initialization == 55 ) ztemp = 1 / ( #z * sin( #z )) elseif ( @initialization == 56 ) ztemp = #z * sin( #z ) elseif ( @initialization == 57 ) ztemp = #z * cos( #z ) elseif ( @initialization == 58 ) ztemp = #z * tan( #z ) elseif ( @initialization == 59 ) ztemp = #z * cotan( #z ) elseif ( @initialization == 60 ) ztemp = #z/cos( #z ) elseif ( @initialization == 61 ) ztemp = #z/sin( #z ) elseif ( @initialization == 62 ) ztemp = sin( 1/#z ) elseif ( @initialization == 63 ) ztemp = cos( 1/#z ) elseif ( @initialization == 64 ) ztemp = tan( 1/#z ) elseif ( @initialization == 65 ) ztemp = cotan( 1/#z ) elseif ( @initialization == 66 ) ztemp = 1/cos( 1/#z ) elseif ( @initialization == 67 ) ztemp = 1/sin( 1/#z ) elseif ( @initialization == 68 ) ztemp = cotanh( #z ) elseif ( @initialization == 69 ) ztemp = 1/cosh( #z ) elseif ( @initialization == 70 ) ztemp = 1/sinh( #z ) elseif ( @initialization == 71 ) ztemp = atanh( 1/#z ) elseif ( @initialization == 72 ) ztemp = acosh( 1/#z ) elseif ( @initialization == 73 ) ztemp = asinh( 1/#z ) elseif @initialization == 74 ztemp = #z^@zpower elseif @initialization == 75 ztemp = sinh(#z) ztemp = ztemp * ztemp elseif @initialization == 76 ztemp = cosh( #z ) ztemp = ztemp * ztemp elseif @initialization == 77 ztemp = tanh(#z) ztemp = ztemp * ztemp elseif @initialization == 78 ztemp = cotanh( #z ) ztemp = ztemp * ztemp elseif @initialization == 79 ztemp = 1/cosh(#z) ztemp = ztemp * ztemp elseif @initialization == 80 ztemp = 1 / sinh( #z ) ztemp = ztemp * ztemp elseif @initialization == 81 ztemp = sinh(1/#z) elseif @initialization == 82 ztemp = cosh(1/#z) elseif @initialization == 83 ztemp = tanh(1/#z) elseif @initialization == 84 ztemp = cotanh(1/#z) elseif @initialization == 85 ztemp = 1/cosh(1/#z) elseif @initialization == 86 ztemp = 1/sinh(1/#z) elseif @initialization == 87 ztemp = sin( #z ) * tan(#z) elseif @initialization == 88 ztemp = sinh(#z) * tanh(#z) elseif @initialization == 89 ztemp = sinh(#z) * cosh(#z) elseif @initialization == 90 ztemp = sinh(#z), zscratch = cosh(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 91 ztemp = sin(#z), zscratch = cos(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 92 ztemp = 1/#z ztemp = sin(ztemp)*cos(ztemp) elseif @initialization == 93 ztemp = sin( 1/#z ) ztemp = ztemp*ztemp elseif @initialization == 94 ztemp = sin(#z) * cos(1/#z) elseif @initialization == 95 ztemp = sin(#z) * sin(1/#z) elseif @initialization == 96 ztemp = log(#z) ztemp = ztemp*ztemp elseif @initialization == 97 ztemp = sin(#z) * sin(2*#z) elseif @initialization == 98 ztemp = exp(2*#z) elseif @initialization == 99 ztemp = exp(-2*#z) elseif @initialization == 100 ztemp = 1/#z ztemp = sinh(ztemp)*cosh(ztemp) elseif @initialization == 101 ztemp = sinh( 1/#z ) ztemp = ztemp*ztemp elseif @initialization == 102 ztemp = sinh(#z) * cosh(1/#z) elseif @initialization == 103 ztemp = sinh(#z) * sinh(1/#z) elseif @initialization == 104 ztemp = sin(#z) * sinh(#z) elseif @initialization == 105 ztemp = sin(#z) * cosh(#z) elseif @initialization == 106 ztemp = sin(#z), zscratch = sinh(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 107 ztemp = sin(#z)*exp(#z) elseif @initialization == 108 ztemp = cos(#z)*exp(#z) elseif @initialization == 109 ztemp = sinh(#z)*exp(#z) elseif @initialization == 110 ztemp = cosh(#z)*exp(#z) elseif @initialization == 111 ztemp = sin(#z)*log(#z) elseif @initialization == 112 ztemp = cos(#z)*log(#z) elseif @initialization == 113 ztemp = sinh(#z)*log(#z) else ; @initialization == 114 ztemp = cosh(#z)*log(#z) endif ; initialization if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip ztemp = flip(ztemp) elseif @trapvariant == 2 ; conjugate ztemp = conj(ztemp) elseif @trapvariant == 3 ; flip conjugate ztemp = flip(conj(ztemp)) elseif @trapvariant == 4 ; negate ztemp = -ztemp elseif @trapvariant == 5 ; negate flip ztemp = -flip(ztemp) elseif @trapvariant == 6 ; negate conjugate ztemp = -conj(ztemp) elseif @trapvariant == 7 ; negate flip conj = conj flip ztemp = -flip(conj(ztemp)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication ztemp = ztemp * @operatee elseif @operator == 2 ; addition ztemp = ztemp + @operatee elseif @operator == 3 ; subtraction ztemp = ztemp - @operatee elseif @operator == 4 ; division ztemp = ztemp / @operatee elseif @operator == 5 ; exponentiation ztemp = ztemp ^ @operatee elseif @operator == 6 ; subtraction2 ztemp = @operatee - ztemp elseif @operator == 7 ; division2 ztemp = @operatee / ztemp elseif @operator == 8 ; exponential2 ztemp = @operatee ^ ztemp elseif @operator == 9 ; logarithm ztemp = log(ztemp) / log(@operatee) elseif @operator == 10 ; logarithm2 ztemp = log(@operatee) / log(ztemp) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip ztemp = flip(ztemp) elseif @trapvariant == 2 ; conjugate ztemp = conj(ztemp) elseif @trapvariant == 3 ; flip conjugate ztemp = flip(conj(ztemp)) elseif @trapvariant == 4 ; negate ztemp = -ztemp elseif @trapvariant == 5 ; negate flip ztemp = -flip(ztemp) elseif @trapvariant == 6 ; negate conjugate ztemp = -conj(ztemp) elseif @trapvariant == 7 ; negate flip conj = conj flip ztemp = -flip(conj(ztemp)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; center, rotate, scale z ztemp = ztemp - center ztemp = ztemp * exp( flip( rotation )) ztemp = scale * ztemp if @history if @histype == 0 zold = ztemp - zold, ztemp = zold elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold, zold = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold, zold = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp zangle = atan2( ztemp ) if zangle < 0 zangle = zangle + twopi endif ; zangle if @newstyle znewstyle = ztemp else znewstyle = #z endif ; newstyle repeat ; count if ( @hyper == 0 ) ; sinh ztemp = @amplitude * sinh( @frequency * ztemp + pix ) elseif ( @hyper == 1 ) ; cosh ztemp = @amplitude * cosh( @frequency * ztemp + pix ) elseif ( @hyper == 2 ) ; tanh ztemp = @amplitude * tanh( @frequency * ztemp + pix ) elseif ( @hyper == 3 ) ; coth ztemp = @amplitude * cotanh( @frequency * ztemp + pix ) elseif ( @hyper == 4 ) ; sech ztemp = @amplitude / cosh( @frequency * ztemp + pix ) elseif ( @hyper == 5 ) ; csch ztemp = @amplitude / sinh( @frequency * ztemp + pix ) elseif ( @hyper == 6 ) ; sinh2 ztemp = @amplitude * sinh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 7 ) ; cosh2 ztemp = @amplitude * cosh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 8 ) ; tanh2 ztemp = @amplitude * tanh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 9 ) ; coth2 ztemp = @amplitude * cotanh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 10 ) ; sech2 ztemp = @amplitude / cosh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 11 ) ; csch2 ztemp = @amplitude / sinh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 12 ) ; sinhz/z ztemp = @amplitude * sinh( @frequency * ztemp + pix ) / ztemp elseif ( @hyper == 13 ) ; coshz/z ztemp = @amplitude * cosh( @frequency * ztemp + pix ) / ztemp elseif ( @hyper == 14 ) ; tanhz/z ztemp = @amplitude * tanh( @frequency * ztemp + pix ) / ztemp elseif ( @hyper == 15 ) ; cothz/z ztemp = @amplitude * cotanh( @frequency * ztemp + pix ) / ztemp elseif ( @hyper == 16 ) ; sechz/z ztemp = @amplitude / ( ztemp * cosh( @frequency * ztemp + pix )) elseif ( @hyper == 17 ) ; cschz/z ztemp = @amplitude / (ztemp * sinh( @frequency * ztemp + pix )) elseif ( @hyper == 18 ) ; zsinhz ztemp = ztemp * @amplitude * sinh( @frequency * ztemp + pix ) elseif ( @hyper == 19 ) ; zcoshz ztemp = ztemp * @amplitude * cosh( @frequency * ztemp + pix ) elseif ( @hyper == 20 ) ; ztanhz ztemp = ztemp * @amplitude * tanh( @frequency * ztemp + pix ) elseif ( @hyper == 21 ) ; zcothz ztemp = ztemp * @amplitude * cotanh( @frequency * ztemp + pix ) elseif ( @hyper == 22 ) ; zsechz ztemp = ztemp * @amplitude / cosh( @frequency * ztemp + pix ) elseif ( @hyper == 23 ) ; zcschz ztemp = ztemp * @amplitude / sinh( @frequency * ztemp + pix ) elseif ( @hyper == 24 ) ; z2sinhz ztemp = ztemp * ztemp * @amplitude * sinh( @frequency * ztemp + pix ) elseif ( @hyper == 25 ) ; z2coshz ztemp = ztemp * ztemp * @amplitude * cosh( @frequency * ztemp + pix ) elseif ( @hyper == 26 ) ; z2tanhz ztemp = ztemp * ztemp * @amplitude * tanh( @frequency * ztemp + pix ) elseif ( @hyper == 27 ) ; sinhz*coshz ztemp = @amplitude * @amplitude * sinh( @frequency * ztemp + pix ) \ * cosh( @frequency * ztemp + pix ) elseif ( @hyper == 28 ) ; sinh2cosh2 ztemp2 = @amplitude * sinh( @frequency * ztemp + pix ) ztemp2 = ztemp2 * ztemp2 ztemp = @amplitude * cosh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp * ztemp2 elseif ( @hyper == 29 ) ; arcsinh ztemp = @amplitude * asinh( @frequency * ztemp + pix ) elseif ( @hyper == 30 ) ; arccosh ztemp = @amplitude * acosh( @frequency * ztemp + pix ) elseif ( @hyper == 31 ) ; arctanh ztemp = @amplitude * atanh( @frequency * ztemp + pix ) elseif ( @hyper == 32 ) ; arccoth ztemp = @amplitude * atanh( 1/(@frequency * ztemp + pix )) elseif ( @hyper == 33 ) ; arcsech ztemp = @amplitude * acosh( 1/(@frequency * ztemp + pix )) elseif ( @hyper == 34 ) ; arccsch ztemp = @amplitude * asinh( 1/(@frequency * ztemp + pix )) elseif ( @hyper == 35 ) ; arcsinh2 ztemp = @amplitude * asinh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 36 ) ; arccosh2 ztemp = @amplitude * acosh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 37 ) ; arctanh2 ztemp = @amplitude * atanh( @frequency * ztemp + pix ) ztemp = ztemp * ztemp elseif ( @hyper == 38 ) ; arccoth2 ztemp = @amplitude * atanh( 1/(@frequency * ztemp + pix )) ztemp = ztemp * ztemp elseif ( @hyper == 39 ) ; arcsech2 ztemp = @amplitude * acosh( 1/(@frequency * ztemp + pix )) ztemp = ztemp * ztemp elseif ( @hyper == 40 ) ; arccsch2 ztemp = @amplitude * asinh( 1/(@frequency * ztemp + pix )) ztemp = ztemp * ztemp elseif ( @hyper == 41 ) ; zarcsinhz ztemp = ztemp * @amplitude * asinh( @frequency * ztemp + pix ) elseif ( @hyper == 42 ) ; zarccoshz ztemp = ztemp * @amplitude * acosh( @frequency * ztemp + pix ) elseif ( @hyper == 43 ) ; zarctanhz ztemp = ztemp * @amplitude * atanh( @frequency * ztemp + pix ) elseif ( @hyper == 44 ) ; zarccothz ztemp = ztemp * @amplitude * atanh( 1/(@frequency * ztemp + pix )) elseif ( @hyper == 45 ) ; zarcsechz ztemp = ztemp * @amplitude * acosh( 1/(@frequency * ztemp + pix )) elseif ( @hyper == 46 ) ; zarccschz ztemp = ztemp * @amplitude * asinh( 1/(@frequency * ztemp + pix )) elseif ( @hyper == 47 ) ; arcsinhz/z ztemp = @amplitude * asinh( @frequency * ztemp + pix ) / ztemp elseif ( @hyper == 48 ) ; arccoshz/z ztemp = @amplitude * acosh( @frequency * ztemp + pix ) / ztemp elseif ( @hyper == 49 ) ; arctanhz/z ztemp = @amplitude * atanh( @frequency * ztemp + pix ) / ztemp elseif ( @hyper == 50 ) ; arccothz/z ztemp = @amplitude * atanh( 1/(@frequency * ztemp + pix )) / ztemp elseif ( @hyper == 51 ) ; arcsechz/z ztemp = @amplitude * acosh( 1/(@frequency * ztemp + pix )) / ztemp else ; @hyper == 52 ; arccschz/z ztemp = @amplitude * asinh( 1/(@frequency * ztemp + pix )) / ztemp endif ; hyper if @polar ztemp = cabs(ztemp) * exp( flip( zangle )) endif ; @polar if ( @trapmode == 0 ) ; transmogrified trap-modulated #z ztest = cabs( ztemp ) elseif ( @trapmode == 1 ) ; distance between fractal and trap ztest = cabs( #z - ztemp ) elseif ( @trapmode == 2 ) ; difference ztest = cabs( ztemp - #z ) elseif ( @trapmode == 3 ) ; sum ztest = cabs( #z + ztemp ) elseif ( @trapmode == 4 ) ; product ztest = cabs( #z * ztemp ) elseif ( @trapmode == 5 ) ; quotient 1 ztest = cabs( #z / ztemp ) elseif ( @trapmode == 6 ) ; quotient 2 ztest = cabs( ztemp / #z ) elseif ( @trapmode == 7 ) ; power 1 ztest = cabs( #z ^ ztemp ) elseif ( @trapmode == 8 ) ; power 2 ztest = cabs( ztemp ^ #z ) elseif ( @trapmode == 9 ) ; arithmetic mean ztest = cabs( (#z + ztemp)/2 ) elseif ( @trapmode == 10 ) ; geometric mean ztest = cabs( sqrt(#z * ztemp) ) elseif ( @trapmode == 11 ) ; angle 1 ztest = #pi + atan2( ztemp ) elseif ( @trapmode == 12 ) ; angle 2 ztest = #pi + atan2( #z - ztemp ) elseif ( @trapmode == 13 ) ; angle 3 ztest = #pi + atan2( #z + ztemp ) elseif ( @trapmode == 14 ) ; angle 4 ztest = #pi + atan2( #z * ztemp ) elseif ( @trapmode == 15 ) ; angle 5 ztest = #pi + atan2( #z / ztemp ) elseif ( @trapmode == 16 ) ; angle 6 ztest = #pi + atan2( ztemp / #z ) elseif ( @trapmode == 17 ) ; angle 7 ztest = #pi + atan2( #z ^ ztemp ) elseif ( @trapmode == 18 ) ; angle 8 ztest = #pi + atan2( ztemp ^ #z ) elseif ( @trapmode == 19 ) ; real 1 ztest = abs( real( ztemp )) elseif ( @trapmode == 20 ) ; real 2 ztest = abs( real( #z - ztemp )) elseif ( @trapmode == 21 ) ; real 3 ztest = abs( real( #z + ztemp )) elseif ( @trapmode == 22 ) ; real 4 ztest = abs( real( #z * ztemp )) elseif ( @trapmode == 23 ) ; real 5 ztest = abs( real( #z / ztemp )) elseif ( @trapmode == 24 ) ; real 6 ztest = abs( real( ztemp / #z )) elseif ( @trapmode == 25 ) ; real 7 ztest = abs( real( #z ^ ztemp )) elseif ( @trapmode == 26 ) ; real 8 ztest = abs( real( ztemp ^ #z )) elseif ( @trapmode == 27 ) ; imag 1 ztest = abs( imag( ztemp )) elseif ( @trapmode == 28 ) ; imag 2 ztest = abs( imag( #z - ztemp )) elseif ( @trapmode == 29 ) ; imag 3 ztest = abs( imag( #z + ztemp )) elseif ( @trapmode == 30 ) ; imag 4 ztest = abs( imag( #z * ztemp )) elseif ( @trapmode == 31 ) ; imag 5 ztest = abs( imag( #z / ztemp )) elseif ( @trapmode == 32 ) ; imag 6 ztest = abs( imag( ztemp / #z )) elseif ( @trapmode == 33 ) ; imag 7 ztest = abs( imag( #z ^ ztemp )) else ; @trapmode == 34 --- imag 8 ztest = abs( imag( ztemp ^ #z )) endif ; trapmode ; Save value for later turbulence tlast = ztest if ( @whattotrap == 0 ) ; minimum if ( ztest < ztesttrapped ) ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp itertrapped = iter endif ; ztest elseif ( @whattotrap == 1 ) ; maximum if ( ztest > ztesttrapped ) ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp itertrapped = iter endif ; ztest elseif ( @whattotrap == 2 ) ; average ztesttrapped = ztest + ztesttrapped itercount = itercount + 1 ztrapped = #z ; this will not be an accurate mode ztemptrapped = ztemp ; this will not be an accurate mode itertrapped = iter ; this will not be an accurate mode elseif ( @whattotrap == 3 ) ; 2nd minimum if ( ztest < ztesttrapped ) ; found a new minimum z2testtrapped = ztesttrapped ; store 2nd minimum ztesttrapped = ztest ; and store new minimum z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 4 ) ; 2nd maximum if ( ztest > ztesttrapped ) z2testtrapped = ztesttrapped ztesttrapped = ztest z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 5 ) ; avg. of min & 2nd min values if ( ztest < ztesttrapped ) ; found a new minimum z2testtrapped = ztesttrapped ; store 2nd minimum ztesttrapped = ztest ; and store new minimum z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 6 ) ; avg. of max & 2nd max values if ( ztest > ztesttrapped ) ; found a new maximum z2testtrapped = ztesttrapped ; store 2nd maximum ztesttrapped = ztest ; and store new maximum z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 7 ) ; first trap iteration if ( itertrapped == 0 ) ; nothing trapped yet, so this must be the first itertrapped = iter ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp endif ; itertrapped elseif ( @whattotrap == 8 ) ; last trap iteration; store each one in turn itertrapped = iter ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp elseif ( @whattotrap == 9 ) ; first threshold if ( itertrapped == 0 ) ; only trapping the first iteration that crosses threshold if ( ztest < @threshold ) ; if so, trap it if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; itertrapped elseif ( @whattotrap == 10 ) ; last threshold --- just store them all if ( ztest < @threshold ) ; if so, trap it if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest elseif @whattotrap == 11 ; threshold count, but store last value if ( ztest < @threshold ) ; if so, trap it threshcount = threshcount + 1 if !@ringstyle itertrapped = threshcount * iter ztesttrapped = threshcount * ztest ztrapped = threshcount * znewstyle ztemptrapped = threshcount * ztemp elseif ztest > innerradius itertrapped = threshcount * iter ztesttrapped = threshcount * ztest ztrapped = threshcount * znewstyle ztemptrapped = threshcount * ztemp endif ; ringstyle endif ; ztest elseif ( @whattotrap == 12 ) ; 2nd to dip below threshold value if ( ztest < @threshold ) if ( itertrapped == 0 ) ; nothing trapped yet, set flag for next time itertrapped = -1 elseif itertrapped == -1 ; must be the 2nd threshold value if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; itertrapped endif ; test elseif ( @whattotrap == 13 ) ; 1st to exceed threshold limit if ( itertrapped == 0 ) ; nothing trapped yet if ( ztest > @threshold ) if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius for limits itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; itertrapped elseif ( @whattotrap == 14 ) ; 2nd to exceed threshold limit if ( ztest > @threshold ) if ( itertrapped == 0 ) ; nothing trapped yet, set flag for next time itertrapped = -1 elseif itertrapped == -1 ; must be the 2nd threshold value if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; itertrapped endif ; test elseif ( @whattotrap == 15 ) ; last to exceed threshold --- just store them all if ( ztest > @threshold ) if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius for limits itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; whattotrap count = count - 1 until ( count < 1 ) endif ; iter final: if ( itertrapped != 0 ) ; something has been trapped if ( @whattotrap == 2 ) ; calculate the average ztesttrapped = ztesttrapped / itercount elseif ( ( @whattotrap == 3 ) || ( @whattotrap == 4 ) ) ; we need to plot ; 2nd min/max, so switch ztesttrapped = z2testtrapped ztrapped = z2trapped ztemptrapped = z2temptrapped itertrapped = iter2trapped elseif ( ( @whattotrap == 5 ) || ( @whattotrap == 6 ) ) ; we need to average ztesttrapped = ( ztesttrapped + z2testtrapped ) / 2 ztrapped = ( ztrapped + z2trapped ) / 2 scratch = ( itertrapped + iter2trapped ) / 2.0 itertrapped = round( scratch ) endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; product1 ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; iteration _colorindex = @colorspread * itertrapped _color = _colorindex / #maxiter elseif ( @colorby == 1 ) ; test magnitude _color = @colorspread * ztesttrapped elseif ( @colorby == 2 ) ; distance _color = @colorspread * cabs( ztrapped - ztemptrapped ) elseif ( @colorby == 3 ) ; angle _colorindex = atan2( ztrapped ) + #pi _color = @colorspread * _colorindex elseif ( @colorby == 4 ) ; modulated angle _color = @colorspread * ( #pi + atan2( ztemptrapped )) elseif ( @colorby == 5 ) ; angle of difference _color = @colorspread * ( #pi + atan2( ztrapped - ztemptrapped )) elseif ( @colorby == 6 ) ; zmag _color = @colorspread * cabs( ztrapped ) elseif ( @colorby == 7 ) ; modulated zmag _color = @colorspread * cabs( ztemptrapped ) endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else _color = ((_color + _coloradjust) + ( itertrapped % @ranges )) / @ranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else if ( @solid ) #solid = true else #index = 0.98 + _coloradjust endif ; solid endif ; itertrapped default: title = "Hip" param hyper caption = "Trap Function" enum = "sinh" "cosh" "tanh" "cotanh" "sech" "cosech" \ "sinh^2" "cosh^2" "tanh^2" "cotanh^2" "sech^2" "cosech^2" "sinh(z)/z" \ "cosh(z)/z" "tanh(z)/z" "coth(z)/z" "sech(z)/z" "csch(z)/z" \ "zsinh(z)" "zcosh(z)" "ztanh(z)" "zcoth(z)" "zsech(z)" "zcsch(z)" \ "z^2 sinh(z)" "z^2 cosh(z)" "z^2 tanh(z)" "sinh(z)cosh(z)" \ "sinh^2(z)cosh^2(z)" "arcsinh" "arccosh" "arctanh" "arccoth" "arcsech" \ "arccsch" "arcsinh^2" "arccosh^2" "arctanh^2" "arccoth^2" "arcsech^2" \ "arccsch^2" "zarcsinh(z)" "zarccosh(z)" "zarctanh(z)" "zarccoth(z)" \ "zarcsech(z)" "zarccsch(z)" "arcsinh(z)/z" "arccosh(z)/z" \ "arctanh(z)/z" "arccoth(z)/z" "arcsech(z)/z" "arccsch(z)/z" default = 0 hint = "Select primary trap function" endparam param trapmode caption = "Flavor" enum = "modulation" "distance" "difference" "sum" "product" "quotient 1" \ "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" "angle 1" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 1" "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 1" "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "The trap mode. The 'Watch What?' comparison is based on this mode" endparam param whattotrap caption = "Watch What?" enum = "minimum" "maximum" "average" "2nd minimum" "2nd maximum" \ "min2 avg" "max2 avg" "first" "last" "threshold" "last threshold" \ "threshold count" "2nd threshold" "1st limit" "2nd limit" "last limit" default = 0 hint = "What value should be examined for trapping? The 'Flavor' value is \ trapped using this criterion. If 'Watch What?' = [first] 'threshold', \ 'last threshold', or 'threshold count', parameter 'Threshold' may be adjusted" endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to input to the trap function loop" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" endparam param @colorby caption = "Color By" enum = "iteration" "magnitude" "distance" "angle" "modulated angle" \ "difference angle" "z magnitude" "modulated magnitude" default = 0 hint = "Criterion for computing color index. For selections other than 'iteration', parameter 'Color Spread' may need to be drastically lowered!" endparam param @colorspread caption = "Color Spread" default = 6.0 hint = "This value can be used to expand/contract the range of colors. For 'Color By?' modes other than 'iteration', this value may need to be reduced significantly (~0.1-0.3 or so)." endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that the trap function should be rotated from \ its default position" endparam param centr caption = "Center" default = (0,0) hint = "Enter coordinates of trap function center/origin" endparam param tscale caption = "Scale" default = 1.0 min = 0.0 hint = "This parameter determines the size of the trap function" endparam param pixelinit caption = "Pixel Initialization" enum = "p" "1/p" "p^2" "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)" "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)" "p^power" \ "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 = "The trap loop utilizes this initialized pixel value; p = #pixel" endparam param ppower caption = "Pixel Power" default = (0,1) hint = "Pixel exponent if param 'Pixel Initialization' is set to 'p^power'" endparam param frequency caption = "Frequency" default = (-1,5) hint = "Sets the frequency of the trap function" endparam param amplitude caption = "Amplitude" default = (0.5,4) hint = "Sets the height of the trap function" endparam param threshold caption = "Threshold" default = 0.20 hint = "This parameter sets the maximum value that will be trapped if 'Watch What?' is set \ to 'threshold', and the minimum value that will be trapped if 'Watch What?' is set \ to 'limit'" endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Watch What' is set to one \ of the 'Threshold' or 'Limit' options, then Threshold becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Watch What' is set to a 'Threshold' \ or 'Limit' option, this parameter determines the width of the ring trap" endparam param iterations caption = "Trap Iterations" default = 1 min = 1 hint = "The number of times the trap function will loop for each fractal iteration" endparam param skip caption = "Iterations to Skip" default = 0 min = 0 hint = "The number of fractal iterations to skip before starting to trap z" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" endparam param newstyle caption = "New Style Trapping?" default = FALSE hint = "If enabled, compares trapped value with initialized z rather \ than #z" endparam param polar caption = "Polar Coordinates?" default = FALSE hint = "Alternative interpretation of trap value" endparam param solid caption = "Solid Background" default = false hint = "Sets non-trapped pixels to the inside solid color" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds distortion (fBm) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" endparam } jam-Bubbles7 { ; jam 010726 ; ; Based loosely on Mark Townsends's implementation of ; Paul W. Carlson's MandelBubs1 fomula. This one's not ; so special, but was a great learning exercise! ; Many thanks to all the great formula-writers out there! init: float _colorindex = 0.0, float tempindex = 0.0 float trappedreal = 1.0e20, float trappedimag = 1.0e20 float testreal = 0.0, float testimag = 0.0 float indexfactorr = 191.0/@radiusreal float indexfactori = 63.0/@radiusimag int iter = 0 int trappediterr = 0, int trappediteri = 0 float twopi = 6.28318530717958647692528676655901 loop: iter = iter + 1 testreal = abs(real(#z)), testimag = abs(imag(#z)) if ( testreal < trappedreal ) trappedreal = testreal trappediterr = iter endif ; testreal if ( testimag < trappedimag ) trappedimag = testimag trappediteri = iter endif ; testimag final: if ( trappedreal < @radiusreal ) tempindex = @realscale * indexfactorr * trappediterr endif ; trappedreal if ( trappedimag < @radiusimag ) _colorindex = @imagscale * indexfactori * trappediteri endif ; trappedimag if ( ( trappediterr == 0 ) && ( trappediteri == 0 ) ) if ( @solid ) #solid = true else _colorindex = 255.0 endif ; solid endif ; trappediterr _colorindex = twopi * (((_colorindex + tempindex + 1.0) % 256) / 256.0) #index = abs(real( @ctransform( _colorindex ) ) ) ; if ( _colorindex > 1 ) ; _colorindex = 1 ; elseif ( _colorindex < 0 ) ; _colorindex = 0 ; endif ; _colorindex ; #index = _colorindex default: title = "Bubbles7" param radiusreal caption = "Real Radius" default = 0.15 hint = "Sets the bubble radius in the x-direction" endparam param radiusimag caption = "Imaginary Radius" default = 0.25 hint = "Sets the bubble radius in the y-direction" endparam param realscale caption = "Real Density" default = 1.0 hint = "Can be used to expand the range of colors; use if image is too monotone" endparam param imagscale caption = "Imaginary Density" default = 1.0 hint = "Can be used to expand the range of colors; use if image is too monotone" endparam param solid caption = "Solid Background" default = false hint = "Sets non-trapped pixels to the inside solid color" endparam func ctransform caption = "Color Transform" default = ident() hint = "This function is applied to the color index at the end" endfunc } jam-ExpTraps { ; jam 010809 ; Colorings based on exponential/logarithmic functions used as traps. ; Things that have big effects: Trap Function, Z Initialization, Flavor, ; Watch What, and Color By. init: float _colorindex = 0.0 complex ztemp = (0,0), complex ztrapped = (0,0), complex ztemptrapped = (0,0) complex z2trapped = (0,0), complex z2temptrapped = (0,0) float ztest = 0.0, float z2testtrapped = 0.0, float scratch = 0.0 int iter = 0, int itertrapped = 0, int iter2trapped = 0, int itercount = 0 int count = @iterations int threshcount = 0 float twopi = #pi * 2.0 float scale = @tscale, float rotation = @rotate * #pi / 180, complex center = @centr if rotation < 0 rotation = rotation + twopi endif ; rotation rotation = -rotation ; eliminates negation step during each fractal iteration if @towatch == 0 int watch = #maxiter else int watch = @skip + @towatch endif ; towatch complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex znewstyle = (0,0) float thresh = @threshold, float innerradius = thresh - @ringwidth if ( @whattotrap > 12 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap float _color = 0.0 float zangle = 0.0 ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, complex zinput = (0,0) complex zlast = (0,0), complex tlast = (1,0), float temp = 0.0, float sign = 0.0 float tempx = 0.0, float tempy = 0.0 if (( @whattotrap == 1 ) || ( @whattotrap == 4 ) || ( @whattotrap == 6 )) ; we will be trapping a maximum rather than a minimum float ztesttrapped = -1.0e20 elseif ( @whattotrap == 2 ) ; average float ztesttrapped = 0 ; this variable will store the running total for computing avg else ; minimum float ztesttrapped = 1.0e20 endif ; whattotrap if ( @pixelinit == 0 ) complex pix = #pixel elseif ( @pixelinit == 1 ) complex pix = 1/#pixel elseif ( @pixelinit == 2 ) complex pix = #pixel * #pixel elseif ( @pixelinit == 3 ) complex pix = 1 / ( #pixel * #pixel ) elseif ( @pixelinit == 4 ) complex pix = log(#pixel) elseif ( @pixelinit == 5 ) complex pix = exp( #pixel) elseif ( @pixelinit == 6 ) complex pix = #pixel^#pixel elseif ( @pixelinit == 7 ) complex pix = sin( #pixel ) elseif ( @pixelinit == 8 ) complex pix = cos( #pixel ) elseif ( @pixelinit == 9 ) complex pix = tan( #pixel ) elseif ( @pixelinit == 10 ) complex pix = asin( #pixel ) elseif ( @pixelinit == 11 ) complex pix = acos( #pixel ) elseif ( @pixelinit == 12 ) complex pix = atan( #pixel ) elseif ( @pixelinit == 13 ) complex pix = sinh( #pixel ) elseif ( @pixelinit == 14 ) complex pix = cosh( #pixel ) elseif ( @pixelinit == 15 ) complex pix = tanh( #pixel ) elseif ( @pixelinit == 16 ) complex pix = asinh( #pixel ) elseif ( @pixelinit == 17 ) complex pix = acosh( #pixel ) elseif ( @pixelinit == 18 ) complex pix = atanh( #pixel ) elseif ( @pixelinit == 19 ) complex pix = log( 1/#pixel ) elseif ( @pixelinit == 20 ) complex pix = log( log( #pixel )) elseif ( @pixelinit == 21 ) complex pix = exp( -#pixel ) elseif ( @pixelinit == 22 ) complex pix = exp( 1/#pixel ) elseif ( @pixelinit == 23 ) complex pix = #pixel^(-#pixel) elseif ( @pixelinit == 24 ) complex pix = sin( #pixel ) pix = pix * pix elseif ( @pixelinit == 25 ) complex pix = cos( #pixel ) pix = pix * pix elseif ( @pixelinit == 26 ) complex pix = tan( #pixel ) pix = pix * pix elseif ( @pixelinit == 27 ) complex pix = cotan( #pixel ) elseif ( @pixelinit == 28 ) complex pix = 1/cos( #pixel ) elseif ( @pixelinit == 29 ) complex pix = 1/sin( #pixel ) elseif ( @pixelinit == 30 ) complex pix = cotan( #pixel ) pix = pix * pix elseif ( @pixelinit == 31 ) complex pix = 1/cos( #pixel ) pix = pix * pix elseif ( @pixelinit == 32 ) complex pix = 1/sin( #pixel ) pix = pix * pix elseif ( @pixelinit == 33 ) complex pix = #pixel^(#pixel) pix = #pixel^pix elseif ( @pixelinit == 34 ) complex pix = #pixel^(#pixel) pix = 1/( #pixel^pix ) elseif ( @pixelinit == 35 ) complex pix = log(-#pixel) elseif ( @pixelinit == 36 ) complex pix = 1/log( #pixel ) elseif ( @pixelinit == 37 ) complex pix = #pixel * log( #pixel ) elseif ( @pixelinit == 38 ) complex pix = sin( #pixel ) / #pixel elseif ( @pixelinit == 39 ) complex pix = cos( #pixel ) / #pixel elseif ( @pixelinit == 40 ) complex pix = sin( #pixel ) * cos( #pixel ) elseif ( @pixelinit == 41 ) complex pix = sin( #pixel^2 ) elseif ( @pixelinit == 42 ) complex pix = exp( -1/#pixel ) elseif ( @pixelinit == 43 ) complex pix = #pixel * exp( #pixel ) elseif ( @pixelinit == 44 ) complex pix = #pixel * exp( -#pixel ) elseif ( @pixelinit == 45 ) complex pix = #pixel * exp( 1/#pixel ) elseif ( @pixelinit == 46 ) complex pix = #pixel * exp( -1/#pixel ) elseif ( @pixelinit == 47 ) complex pix = #pixel * #pixel * #pixel elseif ( @pixelinit == 48 ) complex pix = 1 / ( #pixel * #pixel * #pixel ) elseif ( @pixelinit == 49 ) complex pix = atan( 1 / #pixel ) elseif ( @pixelinit == 50 ) complex pix = acos( 1 / #pixel ) elseif ( @pixelinit == 51 ) complex pix = asin( 1 / #pixel ) elseif ( @pixelinit == 52 ) complex pix = tan( #pixel ) / #pixel elseif ( @pixelinit == 53 ) complex pix = cotan( #pixel ) / #pixel elseif ( @pixelinit == 54 ) complex pix = 1 / ( #pixel * cos( #pixel )) elseif ( @pixelinit == 55 ) complex pix = 1 / ( #pixel * sin( #pixel )) elseif ( @pixelinit == 56 ) complex pix = #pixel * sin( #pixel ) elseif ( @pixelinit == 57 ) complex pix = #pixel * cos( #pixel ) elseif ( @pixelinit == 58 ) complex pix = #pixel * tan( #pixel ) elseif ( @pixelinit == 59 ) complex pix = #pixel * cotan( #pixel ) elseif ( @pixelinit == 60 ) complex pix = #pixel /cos( #pixel ) elseif ( @pixelinit == 61 ) complex pix = #pixel /sin( #pixel ) elseif ( @pixelinit == 62 ) complex pix = sin( 1/#pixel ) elseif ( @pixelinit == 63 ) complex pix = cos( 1/#pixel ) elseif ( @pixelinit == 64 ) complex pix = tan( 1/#pixel ) elseif ( @pixelinit == 65 ) complex pix = cotan( 1/#pixel ) elseif ( @pixelinit == 66 ) complex pix = 1/cos( 1/#pixel ) elseif ( @pixelinit == 67 ) complex pix = 1/sin( 1/#pixel ) elseif ( @pixelinit == 68 ) complex pix = cotanh( #pixel ) elseif ( @pixelinit == 69 ) complex pix = 1/cosh( #pixel ) elseif ( @pixelinit == 70 ) complex pix = 1/sinh( #pixel ) elseif ( @pixelinit == 71 ) complex pix = atanh( 1/#pixel ) elseif ( @pixelinit == 72 ) complex pix = acosh( 1/#pixel ) elseif ( @pixelinit == 73 ) complex pix = asinh( 1/#pixel ) elseif @pixelinit == 74 complex pix = #pixel^@ppower elseif @pixelinit == 75 complex pix = sinh(#pixel) pix = pix * pix elseif @pixelinit == 76 complex pix = cosh( #pixel ) pix = pix * pix elseif @pixelinit == 77 complex pix = tanh(#pixel) pix = pix * pix elseif @pixelinit == 78 complex pix = cotanh( #pixel ) pix = pix * pix elseif @pixelinit == 79 complex pix = 1/cosh(#pixel) pix = pix * pix elseif @pixelinit == 80 complex pix = 1 / sinh( #pixel ) pix = pix * pix elseif @pixelinit == 81 complex pix = sinh(1/#pixel) elseif @pixelinit == 82 complex pix = cosh(1/#pixel) elseif @pixelinit == 83 complex pix = tanh(1/#pixel) elseif @pixelinit == 84 complex pix = cotanh(1/#pixel) elseif @pixelinit == 85 complex pix = 1/cosh(1/#pixel) elseif @pixelinit == 86 complex pix = 1/sinh(1/#pixel) elseif @pixelinit == 87 complex pix = sin( #pixel ) * tan(#pixel) elseif @pixelinit == 88 complex pix = sinh(#pixel) * tanh(#pixel) elseif @pixelinit == 89 complex pix = sinh(#pixel) * cosh(#pixel) elseif @pixelinit == 90 complex pix = sinh(#pixel), zscratch = cosh(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 91 complex pix = sin(#pixel), zscratch = cos(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 92 complex pix = 1/#pixel pix = sin(pix)*cos(pix) elseif @pixelinit == 93 complex pix = sin( 1/#pixel ) pix = pix*pix elseif @pixelinit == 94 complex pix = sin(#pixel) * cos(1/#pixel) elseif @pixelinit == 95 complex pix = sin(#pixel) * sin(1/#pixel) elseif @pixelinit == 96 complex pix = log(#pixel) pix = pix*pix elseif @pixelinit == 97 complex pix = sin(#pixel) * sin(2*#pixel) elseif @pixelinit == 98 complex pix = exp(2*#pixel) elseif @pixelinit == 99 complex pix = exp(-2*#pixel) elseif @pixelinit == 100 complex pix = 1/#pixel pix = sinh(pix)*cosh(pix) elseif @pixelinit == 101 complex pix = sinh( 1/#pixel ) pix = pix*pix elseif @pixelinit == 102 complex pix = sinh(#pixel) * cosh(1/#pixel) elseif @pixelinit == 103 complex pix = sinh(#pixel) * sinh(1/#pixel) elseif @pixelinit == 104 complex pix = sin(#pixel) * sinh(#pixel) elseif @pixelinit == 105 complex pix = sin(#pixel) * cosh(#pixel) elseif @pixelinit == 106 complex pix = sin(#pixel), zscratch = sinh(#pixel) pix = pix*pix*zscratch*zscratch elseif @pixelinit == 107 complex pix = sin(#pixel)*exp(#pixel) elseif @pixelinit == 108 complex pix = cos(#pixel)*exp(#pixel) elseif @pixelinit == 109 complex pix = sinh(#pixel)*exp(#pixel) elseif @pixelinit == 110 complex pix = cosh(#pixel)*exp(#pixel) elseif @pixelinit == 111 complex pix = sin(#pixel)*log(#pixel) elseif @pixelinit == 112 complex pix = cos(#pixel)*log(#pixel) elseif @pixelinit == 113 complex pix = sinh(#pixel)*log(#pixel) else ; @pixelinit == 114 complex pix = cosh(#pixel)*log(#pixel) endif ; pixelinit loop: iter = iter + 1 if ( iter > @skip ) && ( iter <= watch ) if ( @initialization == 0 ) ztemp = #z elseif ( @initialization == 1 ) ztemp = 1/#z elseif ( @initialization == 2 ) ztemp = #z * #z elseif ( @initialization == 3 ) ztemp = 1 / ( #z * #z ) elseif ( @initialization == 4 ) ztemp = log(#z) elseif ( @initialization == 5 ) ztemp = exp( #z) elseif ( @initialization == 6 ) ztemp = #z^#z elseif ( @initialization == 7 ) ztemp = sin( #z ) elseif ( @initialization == 8 ) ztemp = cos( #z ) elseif ( @initialization == 9 ) ztemp = tan( #z ) elseif ( @initialization == 10 ) ztemp = asin( #z ) elseif ( @initialization == 11 ) ztemp = acos( #z ) elseif ( @initialization == 12 ) ztemp = atan( #z ) elseif ( @initialization == 13 ) ztemp = sinh( #z ) elseif ( @initialization == 14 ) ztemp = cosh( #z ) elseif ( @initialization == 15 ) ztemp = tanh( #z ) elseif ( @initialization == 16 ) ztemp = asinh( #z ) elseif ( @initialization == 17 ) ztemp = acosh( #z ) elseif ( @initialization == 18 ) ztemp = atanh( #z ) elseif ( @initialization == 19 ) ztemp = log( 1/#z ) elseif ( @initialization == 20 ) ztemp = log( log( #z )) elseif ( @initialization == 21 ) ztemp = exp( -#z ) elseif ( @initialization == 22 ) ztemp = exp( 1/#z ) elseif ( @initialization == 23 ) ztemp = #z^(-#z) elseif ( @initialization == 24 ) ztemp = sin( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 25 ) ztemp = cos( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 26 ) ztemp = tan( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 27 ) ztemp = cotan( #z ) elseif ( @initialization == 28 ) ztemp = 1/cos( #z ) elseif ( @initialization == 29 ) ztemp = 1/sin( #z ) elseif ( @initialization == 30 ) ztemp = cotan( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 31 ) ztemp = 1/cos( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 32 ) ztemp = 1/sin( #z ) ztemp = ztemp * ztemp elseif ( @initialization == 33 ) ztemp = #z^(#z) ztemp = #z^ztemp elseif ( @initialization == 34 ) ztemp = #z^(#z) ztemp = 1/( #z^ztemp ) elseif ( @initialization == 35 ) ztemp = log(-#z) elseif ( @initialization == 36 ) ztemp = 1/log( #z ) elseif ( @initialization == 37 ) ztemp = #z * log( #z ) elseif ( @initialization == 38 ) ztemp = sin( #z ) / #z elseif ( @initialization == 39 ) ztemp = cos( #z ) / #z elseif ( @initialization == 40 ) ztemp = sin( #z ) * cos( #z ) elseif ( @initialization == 41 ) ztemp = sin( #z^2 ) elseif ( @initialization == 42 ) ztemp = exp( -1/#z ) elseif ( @initialization == 43 ) ztemp = #z * exp( #z ) elseif ( @initialization == 44 ) ztemp = #z * exp( -#z ) elseif ( @initialization == 45 ) ztemp = #z * exp( 1/#z ) elseif ( @initialization == 46 ) ztemp = #z * exp( -1/#z ) elseif ( @initialization == 47 ) ztemp = #z * #z * #z elseif ( @initialization == 48 ) ztemp = 1 / ( #z * #z * #z ) elseif ( @initialization == 49 ) ztemp = atan( 1 / #z ) elseif ( @initialization == 50 ) ztemp = acos( 1 / #z ) elseif ( @initialization == 51 ) ztemp = asin( 1 / #z ) elseif ( @initialization == 52 ) ztemp = tan( #z ) / #z elseif ( @initialization == 53 ) ztemp = cotan( #z ) / #z elseif ( @initialization == 54 ) ztemp = 1 / ( #z * cos( #z )) elseif ( @initialization == 55 ) ztemp = 1 / ( #z * sin( #z )) elseif ( @initialization == 56 ) ztemp = #z * sin( #z ) elseif ( @initialization == 57 ) ztemp = #z * cos( #z ) elseif ( @initialization == 58 ) ztemp = #z * tan( #z ) elseif ( @initialization == 59 ) ztemp = #z * cotan( #z ) elseif ( @initialization == 60 ) ztemp = #z/cos( #z ) elseif ( @initialization == 61 ) ztemp = #z/sin( #z ) elseif ( @initialization == 62 ) ztemp = sin( 1/#z ) elseif ( @initialization == 63 ) ztemp = cos( 1/#z ) elseif ( @initialization == 64 ) ztemp = tan( 1/#z ) elseif ( @initialization == 65 ) ztemp = cotan( 1/#z ) elseif ( @initialization == 66 ) ztemp = 1/cos( 1/#z ) elseif ( @initialization == 67 ) ztemp = 1/sin( 1/#z ) elseif ( @initialization == 68 ) ztemp = cotanh( #z ) elseif ( @initialization == 69 ) ztemp = 1/cosh( #z ) elseif ( @initialization == 70 ) ztemp = 1/sinh( #z ) elseif ( @initialization == 71 ) ztemp = atanh( 1/#z ) elseif ( @initialization == 72 ) ztemp = acosh( 1/#z ) elseif ( @initialization == 73 ) ztemp = asinh( 1/#z ) elseif @initialization == 74 ztemp = #z^@zpower elseif @initialization == 75 ztemp = sinh(#z) ztemp = ztemp * ztemp elseif @initialization == 76 ztemp = cosh( #z ) ztemp = ztemp * ztemp elseif @initialization == 77 ztemp = tanh(#z) ztemp = ztemp * ztemp elseif @initialization == 78 ztemp = cotanh( #z ) ztemp = ztemp * ztemp elseif @initialization == 79 ztemp = 1/cosh(#z) ztemp = ztemp * ztemp elseif @initialization == 80 ztemp = 1 / sinh( #z ) ztemp = ztemp * ztemp elseif @initialization == 81 ztemp = sinh(1/#z) elseif @initialization == 82 ztemp = cosh(1/#z) elseif @initialization == 83 ztemp = tanh(1/#z) elseif @initialization == 84 ztemp = cotanh(1/#z) elseif @initialization == 85 ztemp = 1/cosh(1/#z) elseif @initialization == 86 ztemp = 1/sinh(1/#z) elseif @initialization == 87 ztemp = sin( #z ) * tan(#z) elseif @initialization == 88 ztemp = sinh(#z) * tanh(#z) elseif @initialization == 89 ztemp = sinh(#z) * cosh(#z) elseif @initialization == 90 ztemp = sinh(#z), zscratch = cosh(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 91 ztemp = sin(#z), zscratch = cos(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 92 ztemp = 1/#z ztemp = sin(ztemp)*cos(ztemp) elseif @initialization == 93 ztemp = sin( 1/#z ) ztemp = ztemp*ztemp elseif @initialization == 94 ztemp = sin(#z) * cos(1/#z) elseif @initialization == 95 ztemp = sin(#z) * sin(1/#z) elseif @initialization == 96 ztemp = log(#z) ztemp = ztemp*ztemp elseif @initialization == 97 ztemp = sin(#z) * sin(2*#z) elseif @initialization == 98 ztemp = exp(2*#z) elseif @initialization == 99 ztemp = exp(-2*#z) elseif @initialization == 100 ztemp = 1/#z ztemp = sinh(ztemp)*cosh(ztemp) elseif @initialization == 101 ztemp = sinh( 1/#z ) ztemp = ztemp*ztemp elseif @initialization == 102 ztemp = sinh(#z) * cosh(1/#z) elseif @initialization == 103 ztemp = sinh(#z) * sinh(1/#z) elseif @initialization == 104 ztemp = sin(#z) * sinh(#z) elseif @initialization == 105 ztemp = sin(#z) * cosh(#z) elseif @initialization == 106 ztemp = sin(#z), zscratch = sinh(#z) ztemp = ztemp*ztemp*zscratch*zscratch elseif @initialization == 107 ztemp = sin(#z)*exp(#z) elseif @initialization == 108 ztemp = cos(#z)*exp(#z) elseif @initialization == 109 ztemp = sinh(#z)*exp(#z) elseif @initialization == 110 ztemp = cosh(#z)*exp(#z) elseif @initialization == 111 ztemp = sin(#z)*log(#z) elseif @initialization == 112 ztemp = cos(#z)*log(#z) elseif @initialization == 113 ztemp = sinh(#z)*log(#z) else ; @initialization == 114 ztemp = cosh(#z)*log(#z) endif ; initialization if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip ztemp = flip(ztemp) elseif @trapvariant == 2 ; conjugate ztemp = conj(ztemp) elseif @trapvariant == 3 ; flip conjugate ztemp = flip(conj(ztemp)) elseif @trapvariant == 4 ; negate ztemp = -ztemp elseif @trapvariant == 5 ; negate flip ztemp = -flip(ztemp) elseif @trapvariant == 6 ; negate conjugate ztemp = -conj(ztemp) elseif @trapvariant == 7 ; negate flip conj = conj flip ztemp = -flip(conj(ztemp)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication ztemp = ztemp * @operatee elseif @operator == 2 ; addition ztemp = ztemp + @operatee elseif @operator == 3 ; subtraction ztemp = ztemp - @operatee elseif @operator == 4 ; division ztemp = ztemp / @operatee elseif @operator == 5 ; exponentiation ztemp = ztemp ^ @operatee elseif @operator == 6 ; subtraction2 ztemp = @operatee - ztemp elseif @operator == 7 ; division2 ztemp = @operatee / ztemp elseif @operator == 8 ; exponential2 ztemp = @operatee ^ ztemp elseif @operator == 9 ; logarithm ztemp = log(ztemp) / log(@operatee) elseif @operator == 10 ; logarithm2 ztemp = log(@operatee) / log(ztemp) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip ztemp = flip(ztemp) elseif @trapvariant == 2 ; conjugate ztemp = conj(ztemp) elseif @trapvariant == 3 ; flip conjugate ztemp = flip(conj(ztemp)) elseif @trapvariant == 4 ; negate ztemp = -ztemp elseif @trapvariant == 5 ; negate flip ztemp = -flip(ztemp) elseif @trapvariant == 6 ; negate conjugate ztemp = -conj(ztemp) elseif @trapvariant == 7 ; negate flip conj = conj flip ztemp = -flip(conj(ztemp)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; center, rotate, scale z ztemp = ztemp - center ztemp = ztemp * exp( flip( rotation )) ztemp = scale * ztemp if @history if @histype == 0 zold = ztemp - zold, ztemp = zold elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold, zold = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold, zold = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp zangle = atan2( ztemp ) if zangle < 0 zangle = zangle + twopi endif ; zangle if @newstyle znewstyle = ztemp else znewstyle = #z endif ; newstyle repeat ; count if ( @exfunc == 0 ) ; simple exponential ztemp = @amplitude * exp( @frequency * ztemp + pix ) elseif ( @exfunc == 1 ) ztemp = @amplitude * exp( -@frequency * ztemp + pix ) elseif ( @exfunc == 2 ) ztemp = @amplitude * exp( @frequency / ztemp + pix ) elseif ( @exfunc == 3 ) ztemp = @amplitude * exp( -@frequency / ztemp + pix ) elseif ( @exfunc == 4 ) ztemp = ztemp*ztemp ztemp = @amplitude * exp( @frequency * ztemp + pix ) elseif ( @exfunc == 5 ) ztemp = ztemp*ztemp ztemp = @amplitude * exp( -@frequency * ztemp + pix ) elseif ( @exfunc == 6 ) ztemp = ztemp * ztemp ztemp = @amplitude * exp( @frequency / ztemp + pix ) elseif ( @exfunc == 7 ) ztemp = ztemp * ztemp ztemp = @amplitude * exp( -@frequency / ztemp + pix ) elseif ( @exfunc == 8 ) ztemp = ztemp * ztemp * ztemp ztemp = @amplitude * exp( @frequency * ztemp + pix ) elseif ( @exfunc == 9 ) ztemp = ztemp * ztemp * ztemp ztemp = @amplitude * exp( -@frequency * ztemp + pix ) elseif ( @exfunc == 10 ) ztemp = ztemp * ztemp * ztemp ztemp = @amplitude * exp( @frequency / ztemp + pix ) elseif ( @exfunc == 11 ) ztemp = ztemp * ztemp * ztemp ztemp = @amplitude * sin( -@frequency / ztemp + pix ) elseif ( @exfunc == 12 ) ztemp = ztemp ^ ztemp ztemp = @amplitude * exp( @frequency * ztemp + pix ) elseif ( @exfunc == 13 ) ztemp = ztemp ^ ztemp ztemp = @amplitude * exp( -@frequency * ztemp + pix ) elseif ( @exfunc == 14 ) ztemp = ztemp ^ ztemp ztemp = @amplitude * exp( @frequency / ztemp + pix ) elseif ( @exfunc == 15 ) ztemp = ztemp ^ ztemp ztemp = @amplitude * exp( -@frequency / ztemp + pix ) elseif ( @exfunc == 16 ) ztemp = @amplitude * exp( @frequency * exp(ztemp) + pix ) elseif ( @exfunc == 17 ) ztemp = @amplitude * exp( @frequency * exp(-ztemp) + pix ) elseif ( @exfunc == 18 ) ztemp = @amplitude * exp( -@frequency * exp(ztemp) + pix ) elseif ( @exfunc == 19 ) ztemp = @amplitude * exp( -@frequency * exp(-ztemp) + pix ) elseif ( @exfunc == 20 ) ztemp = @amplitude * exp( @frequency * exp(1/ztemp) + pix ) elseif ( @exfunc == 21 ) ztemp = @amplitude * exp( @frequency * exp(-1/ztemp) + pix ) elseif ( @exfunc == 22 ) ztemp = @amplitude * exp( -@frequency * exp(1/ztemp) + pix ) elseif ( @exfunc == 23 ) ztemp = @amplitude * exp( -@frequency * exp(-1/ztemp) + pix ) elseif ( @exfunc == 24 ) ; simple natural logarithm ztemp = @amplitude * log( @frequency * ztemp + pix ) elseif ( @exfunc == 25 ) ztemp = @amplitude * log( @frequency / ztemp + pix ) elseif ( @exfunc == 26 ) ztemp = @amplitude * log( -@frequency * ztemp + pix ) elseif ( @exfunc == 27 ) ztemp = @amplitude * log( -@frequency / ztemp + pix ) elseif ( @exfunc == 28 ) ztemp = @amplitude * log( log( @frequency * ztemp + pix )) elseif ( @exfunc == 29 ) ztemp = @amplitude * log( log( @frequency / ztemp + pix )) elseif ( @exfunc == 30 ) ztemp = @amplitude * log( log( -@frequency * ztemp + pix )) elseif ( @exfunc == 31 ) ztemp = @amplitude * log( log( -@frequency / ztemp + pix )) elseif ( @exfunc == 32 ) ztemp = @amplitude * log( log( log( @frequency * ztemp + pix ))) elseif ( @exfunc == 33 ) ztemp = @amplitude * ztemp * exp( @frequency * ztemp + pix ) elseif ( @exfunc == 34 ) ztemp = @amplitude * ztemp * exp( -@frequency * ztemp + pix ) elseif ( @exfunc == 35 ) ztemp = @amplitude * ztemp * exp( @frequency / ztemp + pix ) elseif ( @exfunc == 36 ) ztemp = @amplitude * ztemp * exp( -@frequency / ztemp + pix ) elseif ( @exfunc == 37 ) ztemp = @amplitude * ztemp * exp( @frequency * ztemp * ztemp + pix ) elseif ( @exfunc == 38 ) ztemp = @amplitude * ztemp * exp( -@frequency * ztemp * ztemp + pix ) elseif ( @exfunc == 39 ) ztemp = @amplitude * ztemp * exp( @frequency /(ztemp * ztemp) + pix ) elseif ( @exfunc == 40 ) ztemp = @amplitude * ztemp * exp( -@frequency /(ztemp * ztemp) + pix ) elseif ( @exfunc == 41 ) ztemp = @amplitude * ztemp * exp( @frequency * (ztemp ^ ztemp) + pix ) elseif ( @exfunc == 42 ) ztemp = @amplitude * ztemp * log( @frequency * ztemp + pix ) elseif ( @exfunc == 43 ) ztemp = @amplitude * ztemp * log( @frequency / ztemp + pix ) elseif ( @exfunc == 44 ) ztemp = @amplitude * ztemp * log( -@frequency * ztemp + pix ) elseif ( @exfunc == 45 ) ztemp = @amplitude * ztemp * log( -@frequency / ztemp + pix ) elseif ( @exfunc == 46 ) ztemp = @amplitude * ztemp * log( log( @frequency * ztemp + pix )) elseif ( @exfunc == 47 ) ztemp = @amplitude * ztemp * log( log( @frequency / ztemp + pix )) elseif ( @exfunc == 48 ) ztemp = @amplitude * exp( @frequency * ztemp + pix ) / ztemp elseif ( @exfunc == 49 ) ztemp = @amplitude * exp( -@frequency * ztemp + pix ) / ztemp elseif ( @exfunc == 50 ) ztemp = @amplitude * exp( @frequency / ztemp + pix ) / ztemp elseif ( @exfunc == 51 ) ztemp = @amplitude * exp( -@frequency / ztemp + pix ) / ztemp elseif ( @exfunc == 52 ) ztemp = @amplitude * exp( @frequency * ztemp * ztemp + pix ) / ztemp elseif ( @exfunc == 53 ) ztemp = @amplitude * exp( -@frequency * ztemp * ztemp + pix ) / ztemp elseif ( @exfunc == 54 ) ztemp = @amplitude * exp( @frequency /(ztemp * ztemp) + pix ) / ztemp elseif ( @exfunc == 55 ) ztemp = @amplitude * exp( -@frequency /(ztemp * ztemp) + pix ) / ztemp elseif ( @exfunc == 56 ) ztemp = @amplitude * exp( @frequency * (ztemp ^ ztemp) + pix ) / ztemp elseif ( @exfunc == 57 ) ztemp = @amplitude * log( @frequency * ztemp + pix ) / ztemp elseif ( @exfunc == 58 ) ztemp = @amplitude * log( @frequency / ztemp + pix ) / ztemp elseif ( @exfunc == 59 ) ztemp = @amplitude * log( -@frequency * ztemp + pix ) / ztemp elseif ( @exfunc == 60 ) ztemp = @amplitude * log( -@frequency / ztemp + pix ) / ztemp elseif ( @exfunc == 61 ) ztemp = @amplitude * log( log( @frequency * ztemp + pix )) / ztemp elseif ( @exfunc == 62 ) ztemp = @amplitude * log( log( @frequency / ztemp + pix )) / ztemp elseif ( @exfunc == 63 ) ztemp = @amplitude * ztemp * ztemp * exp( @frequency * ztemp + pix ) elseif ( @exfunc == 64 ) ztemp = @amplitude * ztemp * ztemp * exp( -@frequency * ztemp + pix ) elseif ( @exfunc == 65 ) ztemp = @amplitude * ztemp * ztemp * exp( @frequency / ztemp + pix ) elseif ( @exfunc == 66 ) ztemp = @amplitude * ztemp * ztemp * exp( -@frequency / ztemp + pix ) elseif ( @exfunc == 67 ) ztemp = @amplitude * ztemp * ztemp * exp( @frequency * (ztemp ^ ztemp) + pix ) elseif ( @exfunc == 68 ) ztemp = @amplitude * ztemp * ztemp * log( @frequency * ztemp + pix ) elseif ( @exfunc == 69 ) ztemp = @amplitude * ztemp * ztemp * log( @frequency / ztemp + pix ) elseif ( @exfunc == 70 ) ztemp = @amplitude * ztemp * ztemp * log( -@frequency * ztemp + pix ) elseif ( @exfunc == 71 ) ztemp = @amplitude * ztemp * ztemp * log( -@frequency / ztemp + pix ) elseif ( @exfunc == 72 ) ztemp = @amplitude * ztemp * ztemp * log( log( @frequency * ztemp + pix )) elseif ( @exfunc == 73 ) ztemp = @amplitude * ztemp * ztemp * log( log( @frequency / ztemp + pix )) elseif ( @exfunc == 74 ) ztemp = @amplitude * exp( @frequency * ztemp + pix ) / ( ztemp * ztemp ) elseif ( @exfunc == 75 ) ztemp = @amplitude * exp( -@frequency * ztemp + pix ) / ( ztemp * ztemp ) elseif ( @exfunc == 76 ) ztemp = @amplitude * exp( @frequency / ztemp + pix ) / ( ztemp * ztemp ) elseif ( @exfunc == 77 ) ztemp = @amplitude * exp( -@frequency / ztemp + pix ) / ( ztemp * ztemp ) elseif ( @exfunc == 78 ) ztemp = @amplitude * exp( @frequency * (ztemp ^ ztemp) + pix ) / ( ztemp * ztemp ) elseif ( @exfunc == 79 ) ztemp = @amplitude * log( @frequency * ztemp + pix ) / ( ztemp * ztemp ) elseif ( @exfunc == 80 ) ztemp = @amplitude * log( @frequency / ztemp + pix ) / ( ztemp * ztemp ) elseif ( @exfunc == 81 ) ztemp = @amplitude * log( -@frequency * ztemp + pix ) / ( ztemp * ztemp ) elseif @exfunc == 82 ztemp = @amplitude * log( -@frequency / ztemp + pix ) / ( ztemp * ztemp ) else ; @exfunc == 83 ztemp = @amplitude / ztemp + @frequency * pix endif ; exfunc if @polar ztemp = cabs(ztemp) * exp( flip( zangle )) endif ; @polar if ( @trapmode == 0 ) ; transmogrified trap-modulated #z ztest = cabs( ztemp ) elseif ( @trapmode == 1 ) ; distance between fractal and trap ztest = cabs( #z - ztemp ) elseif ( @trapmode == 2 ) ; difference ztest = cabs( ztemp - #z ) elseif ( @trapmode == 3 ) ; sum ztest = cabs( #z + ztemp ) elseif ( @trapmode == 4 ) ; product ztest = cabs( #z * ztemp ) elseif ( @trapmode == 5 ) ; quotient 1 ztest = cabs( #z / ztemp ) elseif ( @trapmode == 6 ) ; quotient 2 ztest = cabs( ztemp / #z ) elseif ( @trapmode == 7 ) ; power 1 ztest = cabs( #z ^ ztemp ) elseif ( @trapmode == 8 ) ; power 2 ztest = cabs( ztemp ^ #z ) elseif ( @trapmode == 9 ) ; arithmetic mean ztest = cabs( (#z + ztemp)/2 ) elseif ( @trapmode == 10 ) ; geometric mean ztest = cabs( sqrt(#z * ztemp) ) elseif ( @trapmode == 11 ) ; angle 1 ztest = #pi + atan2( ztemp ) elseif ( @trapmode == 12 ) ; angle 2 ztest = #pi + atan2( #z - ztemp ) elseif ( @trapmode == 13 ) ; angle 3 ztest = #pi + atan2( #z + ztemp ) elseif ( @trapmode == 14 ) ; angle 4 ztest = #pi + atan2( #z * ztemp ) elseif ( @trapmode == 15 ) ; angle 5 ztest = #pi + atan2( #z / ztemp ) elseif ( @trapmode == 16 ) ; angle 6 ztest = #pi + atan2( ztemp / #z ) elseif ( @trapmode == 17 ) ; angle 7 ztest = #pi + atan2( #z ^ ztemp ) elseif ( @trapmode == 18 ) ; angle 8 ztest = #pi + atan2( ztemp ^ #z ) elseif ( @trapmode == 19 ) ; real 1 ztest = abs( real( ztemp )) elseif ( @trapmode == 20 ) ; real 2 ztest = abs( real( #z - ztemp )) elseif ( @trapmode == 21 ) ; real 3 ztest = abs( real( #z + ztemp )) elseif ( @trapmode == 22 ) ; real 4 ztest = abs( real( #z * ztemp )) elseif ( @trapmode == 23 ) ; real 5 ztest = abs( real( #z / ztemp )) elseif ( @trapmode == 24 ) ; real 6 ztest = abs( real( ztemp / #z )) elseif ( @trapmode == 25 ) ; real 7 ztest = abs( real( #z ^ ztemp )) elseif ( @trapmode == 26 ) ; real 8 ztest = abs( real( ztemp ^ #z )) elseif ( @trapmode == 27 ) ; imag 1 ztest = abs( imag( ztemp )) elseif ( @trapmode == 28 ) ; imag 2 ztest = abs( imag( #z - ztemp )) elseif ( @trapmode == 29 ) ; imag 3 ztest = abs( imag( #z + ztemp )) elseif ( @trapmode == 30 ) ; imag 4 ztest = abs( imag( #z * ztemp )) elseif ( @trapmode == 31 ) ; imag 5 ztest = abs( imag( #z / ztemp )) elseif ( @trapmode == 32 ) ; imag 6 ztest = abs( imag( ztemp / #z )) elseif ( @trapmode == 33 ) ; imag 7 ztest = abs( imag( #z ^ ztemp )) else ; @trapmode == 34 --- imag 8 ztest = abs( imag( ztemp ^ #z )) endif ; trapmode ; Save value for later turbulence tlast = ztest if ( @whattotrap == 0 ) ; minimum if ( ztest < ztesttrapped ) ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp itertrapped = iter endif ; ztest elseif ( @whattotrap == 1 ) ; maximum if ( ztest > ztesttrapped ) ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp itertrapped = iter endif ; ztest elseif ( @whattotrap == 2 ) ; average ztesttrapped = ztest + ztesttrapped itercount = itercount + 1 ztrapped = #z ; this will not be an accurate mode ztemptrapped = ztemp ; this will not be an accurate mode itertrapped = iter ; this will not be an accurate mode elseif ( @whattotrap == 3 ) ; 2nd minimum if ( ztest < ztesttrapped ) ; found a new minimum z2testtrapped = ztesttrapped ; store 2nd minimum ztesttrapped = ztest ; and store new minimum z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 4 ) ; 2nd maximum if ( ztest > ztesttrapped ) z2testtrapped = ztesttrapped ztesttrapped = ztest z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 5 ) ; avg. of min & 2nd min values if ( ztest < ztesttrapped ) ; found a new minimum z2testtrapped = ztesttrapped ; store 2nd minimum ztesttrapped = ztest ; and store new minimum z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 6 ) ; avg. of max & 2nd max values if ( ztest > ztesttrapped ) ; found a new maximum z2testtrapped = ztesttrapped ; store 2nd maximum ztesttrapped = ztest ; and store new maximum z2trapped = ztrapped ztrapped = #z z2temptrapped = ztemptrapped ztemptrapped = ztemp iter2trapped = itertrapped itertrapped = iter endif ; ztest elseif ( @whattotrap == 7 ) ; first trap iteration if ( itertrapped == 0 ) ; nothing trapped yet, so this must be the first itertrapped = iter ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp endif ; itertrapped elseif ( @whattotrap == 8 ) ; last trap iteration; store each one in turn itertrapped = iter ztesttrapped = ztest ztrapped = #z ztemptrapped = ztemp elseif ( @whattotrap == 9 ) ; first threshold if ( itertrapped == 0 ) ; only trapping the first iteration that crosses threshold if ( ztest < @threshold ) ; if so, trap it if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; itertrapped elseif ( @whattotrap == 10 ) ; last threshold --- just store them all if ( ztest < @threshold ) ; if so, trap it if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest elseif @whattotrap == 11 ; threshold count, but store last value if ( ztest < @threshold ) ; if so, trap it threshcount = threshcount + 1 if !@ringstyle itertrapped = threshcount * iter ztesttrapped = threshcount * ztest ztrapped = threshcount * znewstyle ztemptrapped = threshcount * ztemp elseif ztest > innerradius itertrapped = threshcount * iter ztesttrapped = threshcount * ztest ztrapped = threshcount * znewstyle ztemptrapped = threshcount * ztemp endif ; ringstyle endif ; ztest elseif ( @whattotrap == 12 ) ; 2nd to dip below threshold value if ( ztest < @threshold ) if ( itertrapped == 0 ) ; nothing trapped yet, set flag for next time itertrapped = -1 elseif itertrapped == -1 ; must be the 2nd threshold value if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest > innerradius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; itertrapped endif ; test elseif ( @whattotrap == 13 ) ; 1st to exceed threshold limit if ( itertrapped == 0 ) ; nothing trapped yet if ( ztest > @threshold ) if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius for limits itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; itertrapped elseif ( @whattotrap == 14 ) ; 2nd to exceed threshold limit if ( ztest > @threshold ) if ( itertrapped == 0 ) ; nothing trapped yet, set flag for next time itertrapped = -1 elseif itertrapped == -1 ; must be the 2nd threshold value if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; itertrapped endif ; test elseif ( @whattotrap == 15 ) ; last to exceed threshold --- just store them all if ( ztest > @threshold ) if !@ringstyle itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp elseif ztest < innerradius ; really an outer radius for limits itertrapped = iter ztesttrapped = ztest ztrapped = znewstyle ztemptrapped = ztemp endif ; ringstyle endif ; ztest endif ; whattotrap count = count - 1 until ( count < 1 ) endif ; iter final: if ( itertrapped != 0 ) ; something has been trapped if ( @whattotrap == 2 ) ; calculate the average ztesttrapped = ztesttrapped / itercount elseif ( ( @whattotrap == 3 ) || ( @whattotrap == 4 ) ) ; we need to plot ; 2nd min/max, so switch ztesttrapped = z2testtrapped ztrapped = z2trapped ztemptrapped = z2temptrapped itertrapped = iter2trapped elseif ( ( @whattotrap == 5 ) || ( @whattotrap == 6 ) ) ; we need to average ztesttrapped = ( ztesttrapped + z2testtrapped ) / 2 ztrapped = ( ztrapped + z2trapped ) / 2 scratch = ( itertrapped + iter2trapped ) / 2.0 itertrapped = round( scratch ) endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; product1 ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; iteration _colorindex = @colorspread * itertrapped _color = _colorindex / #maxiter elseif ( @colorby == 1 ) ; magnitude _color = @colorspread * ztesttrapped elseif ( @colorby == 2 ) ; distance _color = @colorspread * cabs( ztrapped - ztemptrapped ) elseif ( @colorby == 3 ) ; angle _colorindex = atan2( ztrapped ) + #pi _color = @colorspread * _colorindex elseif ( @colorby == 4 ) ; modulated angle _color = @colorspread * ( #pi + atan2( ztemptrapped )) elseif ( @colorby == 5 ) ; angle of difference _color = @colorspread * ( #pi + atan2( ztrapped - ztemptrapped )) elseif ( @colorby == 6 ) ; zmag _color = @colorspread * cabs( ztrapped ) elseif ( @colorby == 7 ) ; modulated zmag _color = @colorspread * cabs( ztemptrapped ) endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else _color = ((_color + _coloradjust) + ( itertrapped % @ranges )) / @ranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else if ( @solid ) #solid = true else #index = 0.98 + _coloradjust endif ; solid endif ; itertrapped default: title = "Whimsical" param exfunc caption = "Trap Function" enum = "e^z" "e^-z" "e^(1/z)" "e^-(1/z)" "e^z2" "e^-z2" "e^(1/z2)" \ "e^-(1/z2)" "e^z3" "e^-z3" "e^(1/z3)" "e^-(1/z3)" "e^z^z" "e^-(z^z)" \ "e^(1/z^z)" "e^-(1/z^z)" "e^e^z" "e^e^-z" "e^-(e^z)" "e^-(e^-z)" \ "e^e^(1/z)" "e^e^-(1/z)" "e^-(e^(1/z))" "e^-(e^(-1/z))" "log(z)" \ "log(1/z)" "log(-z)" "log(-1/z)" "loglog(z)" "loglog(1/z)" "loglog(-z)" \ "loglog(-1/z)" "logloglog(z)" "ze^z" "ze^-z" "ze^(1/z)" "ze^-(1/z)" \ "ze^z2" "ze^-z2" "ze^(1/z2)" "ze^(-1/z2)" "ze^z^z" "zlog(z)" \ "zlog(1/z)" "zlog(-z)" "zlog(-1/z)" "zloglog(z)" "zloglog(1/z)" \ "(e^z)/z" "(e^-z)/z" "(e^1/z)/z" "(e^-1/z)/z" "(e^z2)/z" "(e^-z2)/z" \ "(e^1/z2)/z" "(e^-1/z2)/z" "(e^z^z)/z" "log(z)/z" "log(1/z)/z" \ "log(-z)/z" "log(-1/z)/z" "loglog(z)/z" "loglog(1/z)/z" "z2e^z" \ "z2e^-z" "z2e^(1/z)" "z2e^-(1/z)" "z2e^z^z" "z2log(z)" \ "z2log(1/z)" "z2log(-z)" "z2log(-1/z)" "z2loglog(z)" "z2loglog(1/z)" \ "(e^z)/z2" "(e^-z)/z2" "(e^1/z)/z2" "(e^-1/z)/z2" "(e^z^z)/z2" \ "log(z)/z2" "log(1/z)/z2" "log(-z)/z2" "log(-1/z)/z2" "1/z" default = 0 hint = "Select primary trap function" endparam param trapmode caption = "Flavor" enum = "modulation" "distance" "difference" "sum" "product" "quotient 1" \ "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" "angle 1" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 1" "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 1" "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "The trap mode. The 'Watch What?' comparison is based on this mode" endparam param whattotrap caption = "Watch What?" enum = "minimum" "maximum" "average" "2nd minimum" "2nd maximum" \ "min2 avg" "max2 avg" "first" "last" "threshold" "last threshold" \ "threshold count" "2nd threshold" "1st limit" "2nd limit" "last limit" default = 0 hint = "What value should be examined for trapping? The 'Flavor' value is \ trapped using this criterion. If 'Watch What?' = [first] 'threshold', \ 'last threshold', or 'threshold count', parameter 'Threshold' may be adjusted" endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to input to the trap function loop" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" endparam param @colorby caption = "Color By?" enum = "iteration" "magnitude" "distance" "angle" "modulated angle" \ "difference angle" "z magnitude" "modulated magnitude" default = 0 hint = "Criterion for computing color index. For selections other than 'iteration', parameter 'Color Spread' may need to be drastically lowered!" endparam param @colorspread caption = "Color Spread" default = 6.0 hint = "This value can be used to expand/contract the range of colors. For 'Color By?' modes other than 'iteration', this value may need to be reduced significantly (~0.1-0.3 or so)." endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that the trap function should be rotated from \ its default position" endparam param centr caption = "Center" default = (0,0) hint = "Enter coordinates of trap function center/origin" endparam param tscale caption = "Scale" default = 1.0 min = 0.0 hint = "This parameter determines the size of the trap function" endparam param pixelinit caption = "Pixel Initialization" enum = "p" "1/p" "p^2" "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)" "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)" "p^power" \ "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 = "The trap loop utilizes this initialized pixel value; p = #pixel" endparam param ppower caption = "Pixel Power" default = (0,1) hint = "Pixel exponent if param 'Pixel Initialization' is set to 'p^power'" endparam param frequency caption = "Frequency" default = (-1,5) hint = "Sets the frequency of the trap function" endparam param amplitude caption = "Amplitude" default = (0.5,4) hint = "Sets the height of the trap function" endparam param threshold caption = "Threshold" default = 0.20 hint = "This parameter sets the maximum value that will be trapped if 'Watch What?' is set \ to 'threshold', and the minimum value that will be trapped if 'Watch What?' is set \ to 'limit'" endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Watch What' is set to one \ of the 'Threshold' or 'Limit' options, then Threshold becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Watch What' is set to a 'Threshold' \ or 'Limit' option, this parameter determines the width of the ring trap" endparam param iterations caption = "Trap Iterations" default = 1 min = 1 hint = "The number of times the trap function will loop for each fractal iteration" endparam param skip caption = "Iterations to Skip" default = 0 min = 0 hint = "The number of fractal iterations to skip before starting to trap z" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" endparam param newstyle caption = "New Style Trapping?" default = FALSE hint = "If enabled, compares trapped value with initialized z rather \ than #z" endparam param polar caption = "Polar Coordinates?" default = FALSE hint = "Alternative interpretation of trap value" endparam param solid caption = "Solid Background" default = false hint = "Sets non-trapped pixels to the inside solid color" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds distortion (fBm) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" endparam } jam-CircleTrap2 { ; jam version 010829 (increased variational possibilities) ; My spin on a circle trap. ; Thanks to Luke Plant's formulas for the inspiration to allow ; feedback variation of the formula parameters. init: if ( @centermode == 0 ) complex trapcenter = @customcenter else ; @centermode == 1 complex trapcenter = #center endif ; centermode ; Change and scale variables to facilitate variation, if selected float rad = @radius, float radstep = 0.05 * @radstp float spread = @colorspread, float spreadstep = 0.05 * @spreadstp float thresh = @threshold, float threshstep = 0.05 * @spreadstp float centerstep = 0.05 * @centerstp float ringstep = 0.05 * @ringstp, float rwidth = @ringwidth bool trapped = FALSE bool vary = TRUE float sign = 0.0 float innerradius = thresh - @ringwidth if @whattotrap > 11 innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, float _color = 0.0 complex zlast = (0,0), complex tlast = (1,0), float turbstep = @turbstp complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex zold2 = (0,0) float rfbcomp = 1-@rfblend, float ifbcomp = 1-@ifblend float rbbcomp = 1-@rbblend, float ibbcomp = 1-@ibblend float trapbcomp = 1-@trapblend, float initbcomp = 1-@initblend if @towatch == 0 int watch = #maxiter else int watch = @skippediters + @towatch endif ; towatch float twopi = 2.0 * #pi int iter = 0, int count = 0 int itrapped = int itrapped2 = int itrapped3 = int itrapped4 = 0 float test = 0.0, float trapped1 = float trapped2 = float trapped3 = float trapped4 = 1e9 float zangle = 0.0, float zatrapped = float zatrapped2 = float zatrapped3 = float zatrapped4 = 0.0 float cangle = 0.0, float catrapped = float catrapped2 = float catrapped3 = float catrapped4 = 0.0 complex ztrapped = complex ztrapped2 = complex ztrapped3 = complex ztrapped4 = (0,0) complex ztemp = complex zttrapped = complex zttrapped2 = complex zttrapped3 = complex zttrapped4 = (0,0) complex tempc = complex ctrapped = complex ctrapped2 = complex ctrapped3 = complex ctrapped4 = (0,0) float tempx = 0.0, float tempy = 0.0, float temp = 0.0, float temp2 = 0.0 complex zinput = (0,0) ; If we're trapping something big, initialize small if (( @whattotrap == 1 ) || ( @whattotrap == 5 ) || ( @whattotrap == 6 ) \ || ( @whattotrap == 7 )) trapped1 = trapped2 = trapped3 = trapped4 = -1e9 elseif @whattotrap > 14 trapped2 = -1e9 ; used to store the max when looking for min-max, min+max, etc. endif ; trapmode loop: iter = iter + 1 if ( iter > @skippediters ) && ( iter <= watch ) ; finished skipping --- start testing for trap ; Initialize front end real, front end imag, if desired temp2 = @rfscale * real(#z) if ( @realfront == 0 ) tempx = temp2 elseif ( @realfront == 1 ) tempx = 1/temp2 elseif ( @realfront == 2 ) tempx = temp2 * temp2 elseif ( @realfront == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realfront == 4 ) tempx = log(temp2) elseif ( @realfront == 5 ) tempx = exp( temp2) elseif ( @realfront == 6 ) tempx = temp2^temp2 elseif ( @realfront == 7 ) tempx = sin( temp2 ) elseif ( @realfront == 8 ) tempx = cos( temp2 ) elseif ( @realfront == 9 ) tempx = tan( temp2 ) elseif ( @realfront == 10 ) tempx = asin( temp2 ) elseif ( @realfront == 11 ) tempx = acos( temp2 ) elseif ( @realfront == 12 ) tempx = atan( temp2 ) elseif ( @realfront == 13 ) tempx = sinh( temp2 ) elseif ( @realfront == 14 ) tempx = cosh( temp2 ) elseif ( @realfront == 15 ) tempx = tanh( temp2 ) elseif ( @realfront == 16 ) tempx = asinh( temp2 ) elseif ( @realfront == 17 ) tempx = acosh( temp2 ) elseif ( @realfront == 18 ) tempx = atanh( temp2 ) elseif ( @realfront == 19 ) tempx = log( 1/temp2 ) elseif ( @realfront == 20 ) tempx = log( log( temp2 )) elseif ( @realfront == 21 ) tempx = exp( -temp2 ) elseif ( @realfront == 22 ) tempx = exp( 1/temp2 ) elseif ( @realfront == 23 ) tempx = temp2^(-temp2) elseif ( @realfront == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 27 ) tempx = cotan( temp2 ) elseif ( @realfront == 28 ) tempx = 1/cos( temp2 ) elseif ( @realfront == 29 ) tempx = 1/sin( temp2 ) elseif ( @realfront == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realfront == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realfront == 35 ) tempx = log(-temp2) elseif ( @realfront == 36 ) tempx = 1/log( temp2 ) elseif ( @realfront == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realfront == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realfront == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realfront == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realfront == 41 ) tempx = sin( temp2^2 ) elseif ( @realfront == 42 ) tempx = exp( -1/temp2 ) elseif ( @realfront == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realfront == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realfront == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realfront == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realfront == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realfront == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realfront == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realfront == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realfront == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realfront == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realfront == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realfront == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realfront == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realfront == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realfront == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realfront == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realfront == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realfront == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realfront == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realfront == 62 ) tempx = sin( 1/temp2 ) elseif ( @realfront == 63 ) tempx = cos( 1/temp2 ) elseif ( @realfront == 64 ) tempx = tan( 1/temp2 ) elseif ( @realfront == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realfront == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realfront == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realfront == 68 ) tempx = cotanh( temp2 ) elseif ( @realfront == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realfront == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realfront == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realfront == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realfront == 73 ) tempx = asinh( 1/temp2 ) elseif @realfront == 74 tempx = temp2^@rfpower elseif @realfront == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realfront == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realfront == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realfront == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realfront == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realfront == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realfront == 81 tempx = sinh(1/temp2) elseif @realfront == 82 tempx = cosh(1/temp2) elseif @realfront == 83 tempx = tanh(1/temp2) elseif @realfront == 84 tempx = cotanh(1/temp2) elseif @realfront == 85 tempx = 1/cosh(1/temp2) elseif @realfront == 86 tempx = 1/sinh(1/temp2) elseif @realfront == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realfront == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realfront == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realfront == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realfront == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realfront == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realfront == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realfront == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realfront == 98 tempx = exp(2*temp2) elseif @realfront == 99 tempx = exp(-2*temp2) elseif @realfront == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realfront == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realfront == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realfront == 104 tempx = sin(temp2) * sinh(temp2) elseif @realfront == 105 tempx = sin(temp2) * cosh(temp2) elseif @realfront == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 107 tempx = sin(temp2)*exp(temp2) elseif @realfront == 108 tempx = cos(temp2)*exp(temp2) elseif @realfront == 109 tempx = sinh(temp2)*exp(temp2) elseif @realfront == 110 tempx = cosh(temp2)*exp(temp2) elseif @realfront == 111 tempx = sin(temp2)*log(temp2) elseif @realfront == 112 tempx = cos(temp2)*log(temp2) elseif @realfront == 113 tempx = sinh(temp2)*log(temp2) else ; @realfront == 114 tempx = cosh(temp2)*log(temp2) endif ; realfront if @rfperturb tempx = @rfblend * tempx + rfbcomp * real(#z) endif ; @rfperturb temp2 = @ifscale * imag(#z) if ( @imagfront == 0 ) tempy = temp2 elseif ( @imagfront == 1 ) tempy = 1/temp2 elseif ( @imagfront == 2 ) tempy = temp2 * temp2 elseif ( @imagfront == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagfront == 4 ) tempy = log(temp2) elseif ( @imagfront == 5 ) tempy = exp( temp2) elseif ( @imagfront == 6 ) tempy = temp2^temp2 elseif ( @imagfront == 7 ) tempy = sin( temp2 ) elseif ( @imagfront == 8 ) tempy = cos( temp2 ) elseif ( @imagfront == 9 ) tempy = tan( temp2 ) elseif ( @imagfront == 10 ) tempy = asin( temp2 ) elseif ( @imagfront == 11 ) tempy = acos( temp2 ) elseif ( @imagfront == 12 ) tempy = atan( temp2 ) elseif ( @imagfront == 13 ) tempy = sinh( temp2 ) elseif ( @imagfront == 14 ) tempy = cosh( temp2 ) elseif ( @imagfront == 15 ) tempy = tanh( temp2 ) elseif ( @imagfront == 16 ) tempy = asinh( temp2 ) elseif ( @imagfront == 17 ) tempy = acosh( temp2 ) elseif ( @imagfront == 18 ) tempy = atanh( temp2 ) elseif ( @imagfront == 19 ) tempy = log( 1/temp2 ) elseif ( @imagfront == 20 ) tempy = log( log( temp2 )) elseif ( @imagfront == 21 ) tempy = exp( -temp2 ) elseif ( @imagfront == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagfront == 23 ) tempy = temp2^(-temp2) elseif ( @imagfront == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 27 ) tempy = cotan( temp2 ) elseif ( @imagfront == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagfront == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagfront == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagfront == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagfront == 35 ) tempy = log(-temp2) elseif ( @imagfront == 36 ) tempy = 1/log( temp2 ) elseif ( @imagfront == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagfront == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagfront == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagfront == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagfront == 41 ) tempy = sin( temp2^2 ) elseif ( @imagfront == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagfront == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagfront == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagfront == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagfront == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagfront == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagfront == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagfront == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagfront == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagfront == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagfront == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagfront == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagfront == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagfront == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagfront == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagfront == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagfront == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagfront == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagfront == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagfront == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagfront == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagfront == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagfront == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagfront == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagfront == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagfront == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagfront == 68 ) tempy = cotanh( temp2 ) elseif ( @imagfront == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagfront == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagfront == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagfront == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagfront == 73 ) tempy = asinh( 1/temp2 ) elseif @imagfront == 74 tempy = temp2^@ifpower elseif @imagfront == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagfront == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagfront == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagfront == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagfront == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagfront == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagfront == 81 tempy = sinh(1/temp2) elseif @imagfront == 82 tempy = cosh(1/temp2) elseif @imagfront == 83 tempy = tanh(1/temp2) elseif @imagfront == 84 tempy = cotanh(1/temp2) elseif @imagfront == 85 tempy = 1/cosh(1/temp2) elseif @imagfront == 86 tempy = 1/sinh(1/temp2) elseif @imagfront == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagfront == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagfront == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagfront == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagfront == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagfront == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagfront == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagfront == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagfront == 98 tempy = exp(2*temp2) elseif @imagfront == 99 tempy = exp(-2*temp2) elseif @imagfront == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagfront == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagfront == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagfront == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagfront == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagfront == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 107 tempy = sin(temp2)*exp(temp2) elseif @imagfront == 108 tempy = cos(temp2)*exp(temp2) elseif @imagfront == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagfront == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagfront == 111 tempy = sin(temp2)*log(temp2) elseif @imagfront == 112 tempy = cos(temp2)*log(temp2) elseif @imagfront == 113 tempy = sinh(temp2)*log(temp2) else ; @imagfront == 114 tempy = cosh(temp2)*log(temp2) endif ; imagfront if @ifperturb tempy = @ifblend * tempy + ifbcomp * imag(#z) endif ; @ifperturb zold = tempx + flip(tempy) ; Initialize z, if desired zold = @ziscale * zold if ( @initialization == 0 ) zinput = zold elseif ( @initialization == 1 ) zinput = 1/zold elseif ( @initialization == 2 ) zinput = zold * zold elseif ( @initialization == 3 ) zinput = 1 / ( zold * zold ) elseif ( @initialization == 4 ) zinput = log(zold) elseif ( @initialization == 5 ) zinput = exp( zold) elseif ( @initialization == 6 ) zinput = zold^zold elseif ( @initialization == 7 ) zinput = sin( zold ) elseif ( @initialization == 8 ) zinput = cos( zold ) elseif ( @initialization == 9 ) zinput = tan( zold ) elseif ( @initialization == 10 ) zinput = asin( zold ) elseif ( @initialization == 11 ) zinput = acos( zold ) elseif ( @initialization == 12 ) zinput = atan( zold ) elseif ( @initialization == 13 ) zinput = sinh( zold ) elseif ( @initialization == 14 ) zinput = cosh( zold ) elseif ( @initialization == 15 ) zinput = tanh( zold ) elseif ( @initialization == 16 ) zinput = asinh( zold ) elseif ( @initialization == 17 ) zinput = acosh( zold ) elseif ( @initialization == 18 ) zinput = atanh( zold ) elseif ( @initialization == 19 ) zinput = log( 1/zold ) elseif ( @initialization == 20 ) zinput = log( log( zold )) elseif ( @initialization == 21 ) zinput = exp( -zold ) elseif ( @initialization == 22 ) zinput = exp( 1/zold ) elseif ( @initialization == 23 ) zinput = zold^(-zold) elseif ( @initialization == 24 ) zinput = sin( zold ) zinput = zinput * zinput elseif ( @initialization == 25 ) zinput = cos( zold ) zinput = zinput * zinput elseif ( @initialization == 26 ) zinput = tan( zold ) zinput = zinput * zinput elseif ( @initialization == 27 ) zinput = cotan( zold ) elseif ( @initialization == 28 ) zinput = 1/cos( zold ) elseif ( @initialization == 29 ) zinput = 1/sin( zold ) elseif ( @initialization == 30 ) zinput = cotan( zold ) zinput = zinput * zinput elseif ( @initialization == 31 ) zinput = 1/cos( zold ) zinput = zinput * zinput elseif ( @initialization == 32 ) zinput = 1/sin( zold ) zinput = zinput * zinput elseif ( @initialization == 33 ) zinput = zold^(zold) zinput = zold^zinput elseif ( @initialization == 34 ) zinput = zold^(zold) zinput = 1/( zold^zinput ) elseif ( @initialization == 35 ) zinput = log(-zold) elseif ( @initialization == 36 ) zinput = 1/log( zold ) elseif ( @initialization == 37 ) zinput = zold * log( zold ) elseif ( @initialization == 38 ) zinput = sin( zold ) / zold elseif ( @initialization == 39 ) zinput = cos( zold ) / zold elseif ( @initialization == 40 ) zinput = sin( zold ) * cos( zold ) elseif ( @initialization == 41 ) zinput = sin( zold^2 ) elseif ( @initialization == 42 ) zinput = exp( -1/zold ) elseif ( @initialization == 43 ) zinput = zold * exp( zold ) elseif ( @initialization == 44 ) zinput = zold * exp( -zold ) elseif ( @initialization == 45 ) zinput = zold * exp( 1/zold ) elseif ( @initialization == 46 ) zinput = zold * exp( -1/zold ) elseif ( @initialization == 47 ) zinput = zold * zold * zold elseif ( @initialization == 48 ) zinput = 1 / ( zold * zold * zold ) elseif ( @initialization == 49 ) zinput = atan( 1 / zold ) elseif ( @initialization == 50 ) zinput = acos( 1 / zold ) elseif ( @initialization == 51 ) zinput = asin( 1 / zold ) elseif ( @initialization == 52 ) zinput = tan( zold ) / zold elseif ( @initialization == 53 ) zinput = cotan( zold ) / zold elseif ( @initialization == 54 ) zinput = 1 / ( zold * cos( zold )) elseif ( @initialization == 55 ) zinput = 1 / ( zold * sin( zold )) elseif ( @initialization == 56 ) zinput = zold * sin( zold ) elseif ( @initialization == 57 ) zinput = zold * cos( zold ) elseif ( @initialization == 58 ) zinput = zold * tan( zold ) elseif ( @initialization == 59 ) zinput = zold * cotan( zold ) elseif ( @initialization == 60 ) zinput = zold/cos( zold ) elseif ( @initialization == 61 ) zinput = zold/sin( zold ) elseif ( @initialization == 62 ) zinput = sin( 1/zold ) elseif ( @initialization == 63 ) zinput = cos( 1/zold ) elseif ( @initialization == 64 ) zinput = tan( 1/zold ) elseif ( @initialization == 65 ) zinput = cotan( 1/zold ) elseif ( @initialization == 66 ) zinput = 1/cos( 1/zold ) elseif ( @initialization == 67 ) zinput = 1/sin( 1/zold ) elseif ( @initialization == 68 ) zinput = cotanh( zold ) elseif ( @initialization == 69 ) zinput = 1/cosh( zold ) elseif ( @initialization == 70 ) zinput = 1/sinh( zold ) elseif ( @initialization == 71 ) zinput = atanh( 1/zold ) elseif ( @initialization == 72 ) zinput = acosh( 1/zold ) elseif ( @initialization == 73 ) zinput = asinh( 1/zold ) elseif @initialization == 74 zinput = zold^@zpower elseif @initialization == 75 zinput = sinh(zold) zinput = zinput * zinput elseif @initialization == 76 zinput = cosh( zold ) zinput = zinput * zinput elseif @initialization == 77 zinput = tanh(zold) zinput = zinput * zinput elseif @initialization == 78 zinput = cotanh( zold ) zinput = zinput * zinput elseif @initialization == 79 zinput = 1/cosh(zold) zinput = zinput * zinput elseif @initialization == 80 zinput = 1 / sinh( zold ) zinput = zinput * zinput elseif @initialization == 81 zinput = sinh(1/zold) elseif @initialization == 82 zinput = cosh(1/zold) elseif @initialization == 83 zinput = tanh(1/zold) elseif @initialization == 84 zinput = cotanh(1/zold) elseif @initialization == 85 zinput = 1/cosh(1/zold) elseif @initialization == 86 zinput = 1/sinh(1/zold) elseif @initialization == 87 zinput = sin( zold ) * tan(zold) elseif @initialization == 88 zinput = sinh(zold) * tanh(zold) elseif @initialization == 89 zinput = sinh(zold) * cosh(zold) elseif @initialization == 90 zinput = sinh(zold), zscratch = cosh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 91 zinput = sin(zold), zscratch = cos(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 92 zinput = 1/zold zinput = sin(zinput)*cos(zinput) elseif @initialization == 93 zinput = sin( 1/zold ) zinput = zinput*zinput elseif @initialization == 94 zinput = sin(zold) * cos(1/zold) elseif @initialization == 95 zinput = sin(zold) * sin(1/zold) elseif @initialization == 96 zinput = log(zold) zinput = zinput*zinput elseif @initialization == 97 zinput = sin(zold) * sin(2*zold) elseif @initialization == 98 zinput = exp(2*zold) elseif @initialization == 99 zinput = exp(-2*zold) elseif @initialization == 100 zinput = 1/zold zinput = sinh(zinput)*cosh(zinput) elseif @initialization == 101 zinput = sinh( 1/zold ) zinput = zinput*zinput elseif @initialization == 102 zinput = sinh(zold) * cosh(1/zold) elseif @initialization == 103 zinput = sinh(zold) * sinh(1/zold) elseif @initialization == 104 zinput = sin(zold) * sinh(zold) elseif @initialization == 105 zinput = sin(zold) * cosh(zold) elseif @initialization == 106 zinput = sin(zold), zscratch = sinh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 107 zinput = sin(zold)*exp(zold) elseif @initialization == 108 zinput = cos(zold)*exp(zold) elseif @initialization == 109 zinput = sinh(zold)*exp(zold) elseif @initialization == 110 zinput = cosh(zold)*exp(zold) elseif @initialization == 111 zinput = sin(zold)*log(zold) elseif @initialization == 112 zinput = cos(zold)*log(zold) elseif @initialization == 113 zinput = sinh(zold)*log(zold) else ; @initialization == 114 zinput = cosh(zold)*log(zold) endif ; initialization if @initperturb zinput = @initblend * zinput + initbcomp * zold endif ; @ifperturb if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication zinput = zinput * @operatee elseif @operator == 2 ; addition zinput = zinput + @operatee elseif @operator == 3 ; subtraction zinput = zinput - @operatee elseif @operator == 4 ; division zinput = zinput / @operatee elseif @operator == 5 ; exponentiation zinput = zinput ^ @operatee elseif @operator == 6 ; subtraction2 zinput = @operatee - zinput elseif @operator == 7 ; division2 zinput = @operatee / zinput elseif @operator == 8 ; exponential2 zinput = @operatee ^ zinput elseif @operator == 9 ; logarithm zinput = log(zinput) / log(@operatee) elseif @operator == 10 ; logarithm2 zinput = log(@operatee) / log(zinput) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; Normalize pixel to circle center ztemp = zinput - trapcenter if @history if @histype == 0 zold2 = ztemp - zold2, ztemp = zold2 elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold2, zold2 = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold2, zold2 = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp ; Find coordinates and angle of point on circle closest to #z (zinput) zangle = atan2( ztemp ) if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle <= twopi endif ; zangle if @sprangle temp = zangle*@sprangfactor else temp = zangle endif ; @sprangle tempx = rad * cos( temp ), tempy = rad * sin( temp ) tempc = tempx + flip( tempy ) zold = tempc ; Now transmute the trapped point of the trapping curve if desired tempc = @tiscale * tempc if @transmogrify != 0 if ( @transmogrify == 1 ) tempc = 1/tempc elseif ( @transmogrify == 2 ) tempc = tempc * tempc elseif ( @transmogrify == 3 ) tempc = 1 / ( tempc * tempc ) elseif ( @transmogrify == 4 ) tempc = log(tempc) elseif ( @transmogrify == 5 ) tempc = exp( tempc) elseif ( @transmogrify == 6 ) tempc = tempc^tempc elseif ( @transmogrify == 7 ) tempc = sin( tempc ) elseif ( @transmogrify == 8 ) tempc = cos( tempc ) elseif ( @transmogrify == 9 ) tempc = tan( tempc ) elseif ( @transmogrify == 10 ) tempc = asin( tempc ) elseif ( @transmogrify == 11 ) tempc = acos( tempc ) elseif ( @transmogrify == 12 ) tempc = atan( tempc ) elseif ( @transmogrify == 13 ) tempc = sinh( tempc ) elseif ( @transmogrify == 14 ) tempc = cosh( tempc ) elseif ( @transmogrify == 15 ) tempc = tanh( tempc ) elseif ( @transmogrify == 16 ) tempc = asinh( tempc ) elseif ( @transmogrify == 17 ) tempc = acosh( tempc ) elseif ( @transmogrify == 18 ) tempc = atanh( tempc ) elseif ( @transmogrify == 19 ) tempc = log( 1/tempc ) elseif ( @transmogrify == 20 ) tempc = log( log( tempc )) elseif ( @transmogrify == 21 ) tempc = exp( -tempc ) elseif ( @transmogrify == 22 ) tempc = exp( 1/tempc ) elseif ( @transmogrify == 23 ) tempc = tempc^(-tempc) elseif ( @transmogrify == 24 ) tempc = sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 25 ) tempc = cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 26 ) tempc = tan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 27 ) tempc = cotan( tempc ) elseif ( @transmogrify == 28 ) tempc = 1/cos( tempc ) elseif ( @transmogrify == 29 ) tempc = 1/sin( tempc ) elseif ( @transmogrify == 30 ) tempc = cotan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 31 ) tempc = 1/cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 32 ) tempc = 1/sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 33 ) tempc = tempc^(tempc) tempc = tempc^tempc elseif ( @transmogrify == 34 ) tempc = tempc^(tempc) tempc = 1/( tempc^tempc ) elseif ( @transmogrify == 35 ) tempc = log(-tempc) elseif ( @transmogrify == 36 ) tempc = 1/log( tempc ) elseif ( @transmogrify == 37 ) tempc = tempc * log( tempc ) elseif ( @transmogrify == 38 ) tempc = sin( tempc ) / tempc elseif ( @transmogrify == 39 ) tempc = cos( tempc ) / tempc elseif ( @transmogrify == 40 ) tempc = sin( tempc ) * cos( tempc ) elseif ( @transmogrify == 41 ) tempc = sin( tempc^2 ) elseif ( @transmogrify == 42 ) tempc = exp( -1/tempc ) elseif ( @transmogrify == 43 ) tempc = tempc * exp( tempc ) elseif ( @transmogrify == 44 ) tempc = tempc * exp( -tempc ) elseif ( @transmogrify == 45 ) tempc = tempc * exp( 1/tempc ) elseif ( @transmogrify == 46 ) tempc = tempc * exp( -1/tempc ) elseif ( @transmogrify == 47 ) tempc = tempc * tempc * tempc elseif ( @transmogrify == 48 ) tempc = 1 / ( tempc * tempc * tempc ) elseif ( @transmogrify == 49 ) tempc = atan( 1 / tempc ) elseif ( @transmogrify == 50 ) tempc = acos( 1 / tempc ) elseif ( @transmogrify == 51 ) tempc = asin( 1 / tempc ) elseif ( @transmogrify == 52 ) tempc = tan( tempc ) / tempc elseif ( @transmogrify == 53 ) tempc = cotan( tempc ) / tempc elseif ( @transmogrify == 54 ) tempc = 1 / ( tempc * cos( tempc )) elseif ( @transmogrify == 55 ) tempc = 1 / ( tempc * sin( tempc )) elseif ( @transmogrify == 56 ) tempc = tempc * sin( tempc ) elseif ( @transmogrify == 57 ) tempc = tempc * cos( tempc ) elseif ( @transmogrify == 58 ) tempc = tempc * tan( tempc ) elseif ( @transmogrify == 59 ) tempc = tempc * cotan( tempc ) elseif ( @transmogrify == 60 ) tempc = tempc/cos( tempc ) elseif ( @transmogrify == 61 ) tempc = tempc/sin( tempc ) elseif ( @transmogrify == 62 ) tempc = sin( 1/tempc ) elseif ( @transmogrify == 63 ) tempc = cos( 1/tempc ) elseif ( @transmogrify == 64 ) tempc = tan( 1/tempc ) elseif ( @transmogrify == 65 ) tempc = cotan( 1/tempc ) elseif ( @transmogrify == 66 ) tempc = 1/cos( 1/tempc ) elseif ( @transmogrify == 67 ) tempc = 1/sin( 1/tempc ) elseif ( @transmogrify == 68 ) tempc = cotanh( tempc ) elseif ( @transmogrify == 69 ) tempc = 1/cosh( tempc ) elseif ( @transmogrify == 70 ) tempc = 1/sinh( tempc ) elseif ( @transmogrify == 71 ) tempc = atanh( 1/tempc ) elseif ( @transmogrify == 72 ) tempc = acosh( 1/tempc ) elseif ( @transmogrify == 73 ) tempc = asinh( 1/tempc ) elseif @transmogrify == 74 tempc = tempc^@tpower elseif @transmogrify == 75 tempc = sinh(tempc) tempc = tempc * tempc elseif @transmogrify == 76 tempc = cosh( tempc ) tempc = tempc * tempc elseif @transmogrify == 77 tempc = tanh(tempc) tempc = tempc * tempc elseif @transmogrify == 78 tempc = cotanh( tempc ) tempc = tempc * tempc elseif @transmogrify == 79 tempc = 1/cosh(tempc) tempc = tempc * tempc elseif @transmogrify == 80 tempc = 1 / sinh( tempc ) tempc = tempc * tempc elseif @transmogrify == 81 tempc = sinh(1/tempc) elseif @transmogrify == 82 tempc = cosh(1/tempc) elseif @transmogrify == 83 tempc = tanh(1/tempc) elseif @transmogrify == 84 tempc = cotanh(1/tempc) elseif @transmogrify == 85 tempc = 1/cosh(1/tempc) elseif @transmogrify == 86 tempc = 1/sinh(1/tempc) elseif @transmogrify == 87 tempc = sin( tempc ) * tan(tempc) elseif @transmogrify == 88 tempc = sinh(tempc) * tanh(tempc) elseif @transmogrify == 89 tempc = sinh(tempc) * cosh(tempc) elseif @transmogrify == 90 zscratch = cosh(tempc) tempc = sinh(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 91 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 92 tempc = 1/tempc tempc = sin(tempc)*cos(tempc) elseif @transmogrify == 93 tempc = sin( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 94 tempc = sin(tempc) * cos(1/tempc) elseif @transmogrify == 95 tempc = sin(tempc) * sin(1/tempc) elseif @transmogrify == 96 tempc = log(tempc) tempc = tempc*tempc elseif @transmogrify == 97 tempc = sin(tempc) * sin(2*tempc) elseif @transmogrify == 98 tempc = exp(2*tempc) elseif @transmogrify == 99 tempc = exp(-2*tempc) elseif @transmogrify == 100 tempc = 1/tempc tempc = sinh(tempc)*cosh(tempc) elseif @transmogrify == 101 tempc = sinh( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 102 tempc = sinh(tempc) * cosh(1/tempc) elseif @transmogrify == 103 tempc = sinh(tempc) * sinh(1/tempc) elseif @transmogrify == 104 tempc = sin(tempc) * sinh(tempc) elseif @transmogrify == 105 tempc = sin(tempc) * cosh(tempc) elseif @transmogrify == 106 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 107 tempc = sin(tempc)*exp(tempc) elseif @transmogrify == 108 tempc = cos(tempc)*exp(tempc) elseif @transmogrify == 109 tempc = sinh(tempc)*exp(tempc) elseif @transmogrify == 110 tempc = cosh(tempc)*exp(tempc) elseif @transmogrify == 111 tempc = sin(tempc)*log(tempc) elseif @transmogrify == 112 tempc = cos(tempc)*log(tempc) elseif @transmogrify == 113 tempc = sinh(tempc)*log(tempc) else ; @transmogrify == 114 tempc = cosh(tempc)*log(tempc) endif ; transmogrify2 endif ; transmogrify1 if @trapperturb tempc = @trapblend * tempc + trapbcomp * zold endif ; @trapperturb ; Initialize back end real, back end imag, if desired temp2 = @rbscale * real(tempc) if ( @realback == 0 ) tempx = temp2 elseif ( @realback == 1 ) tempx = 1/temp2 elseif ( @realback == 2 ) tempx = temp2 * temp2 elseif ( @realback == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realback == 4 ) tempx = log(temp2) elseif ( @realback == 5 ) tempx = exp( temp2) elseif ( @realback == 6 ) tempx = temp2^temp2 elseif ( @realback == 7 ) tempx = sin( temp2 ) elseif ( @realback == 8 ) tempx = cos( temp2 ) elseif ( @realback == 9 ) tempx = tan( temp2 ) elseif ( @realback == 10 ) tempx = asin( temp2 ) elseif ( @realback == 11 ) tempx = acos( temp2 ) elseif ( @realback == 12 ) tempx = atan( temp2 ) elseif ( @realback == 13 ) tempx = sinh( temp2 ) elseif ( @realback == 14 ) tempx = cosh( temp2 ) elseif ( @realback == 15 ) tempx = tanh( temp2 ) elseif ( @realback == 16 ) tempx = asinh( temp2 ) elseif ( @realback == 17 ) tempx = acosh( temp2 ) elseif ( @realback == 18 ) tempx = atanh( temp2 ) elseif ( @realback == 19 ) tempx = log( 1/temp2 ) elseif ( @realback == 20 ) tempx = log( log( temp2 )) elseif ( @realback == 21 ) tempx = exp( -temp2 ) elseif ( @realback == 22 ) tempx = exp( 1/temp2 ) elseif ( @realback == 23 ) tempx = temp2^(-temp2) elseif ( @realback == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realback == 27 ) tempx = cotan( temp2 ) elseif ( @realback == 28 ) tempx = 1/cos( temp2 ) elseif ( @realback == 29 ) tempx = 1/sin( temp2 ) elseif ( @realback == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realback == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realback == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realback == 35 ) tempx = log(-temp2) elseif ( @realback == 36 ) tempx = 1/log( temp2 ) elseif ( @realback == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realback == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realback == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realback == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realback == 41 ) tempx = sin( temp2^2 ) elseif ( @realback == 42 ) tempx = exp( -1/temp2 ) elseif ( @realback == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realback == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realback == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realback == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realback == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realback == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realback == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realback == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realback == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realback == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realback == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realback == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realback == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realback == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realback == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realback == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realback == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realback == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realback == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realback == 62 ) tempx = sin( 1/temp2 ) elseif ( @realback == 63 ) tempx = cos( 1/temp2 ) elseif ( @realback == 64 ) tempx = tan( 1/temp2 ) elseif ( @realback == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realback == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realback == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realback == 68 ) tempx = cotanh( temp2 ) elseif ( @realback == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realback == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realback == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realback == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realback == 73 ) tempx = asinh( 1/temp2 ) elseif @realback == 74 tempx = temp2^@rbpower elseif @realback == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realback == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realback == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realback == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realback == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realback == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realback == 81 tempx = sinh(1/temp2) elseif @realback == 82 tempx = cosh(1/temp2) elseif @realback == 83 tempx = tanh(1/temp2) elseif @realback == 84 tempx = cotanh(1/temp2) elseif @realback == 85 tempx = 1/cosh(1/temp2) elseif @realback == 86 tempx = 1/sinh(1/temp2) elseif @realback == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realback == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realback == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realback == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realback == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realback == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realback == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realback == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realback == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realback == 98 tempx = exp(2*temp2) elseif @realback == 99 tempx = exp(-2*temp2) elseif @realback == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realback == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realback == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realback == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realback == 104 tempx = sin(temp2) * sinh(temp2) elseif @realback == 105 tempx = sin(temp2) * cosh(temp2) elseif @realback == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 107 tempx = sin(temp2)*exp(temp2) elseif @realback == 108 tempx = cos(temp2)*exp(temp2) elseif @realback == 109 tempx = sinh(temp2)*exp(temp2) elseif @realback == 110 tempx = cosh(temp2)*exp(temp2) elseif @realback == 111 tempx = sin(temp2)*log(temp2) elseif @realback == 112 tempx = cos(temp2)*log(temp2) elseif @realback == 113 tempx = sinh(temp2)*log(temp2) else ; @realback == 114 tempx = cosh(temp2)*log(temp2) endif ; realback if @rbperturb tempx = @rbblend * tempx + rbbcomp * real(tempc) endif ; @rbperturb temp2 = @ibscale * imag(tempc) if ( @imagback == 0 ) tempy = temp2 elseif ( @imagback == 1 ) tempy = 1/temp2 elseif ( @imagback == 2 ) tempy = temp2 * temp2 elseif ( @imagback == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagback == 4 ) tempy = log(temp2) elseif ( @imagback == 5 ) tempy = exp( temp2) elseif ( @imagback == 6 ) tempy = temp2^temp2 elseif ( @imagback == 7 ) tempy = sin( temp2 ) elseif ( @imagback == 8 ) tempy = cos( temp2 ) elseif ( @imagback == 9 ) tempy = tan( temp2 ) elseif ( @imagback == 10 ) tempy = asin( temp2 ) elseif ( @imagback == 11 ) tempy = acos( temp2 ) elseif ( @imagback == 12 ) tempy = atan( temp2 ) elseif ( @imagback == 13 ) tempy = sinh( temp2 ) elseif ( @imagback == 14 ) tempy = cosh( temp2 ) elseif ( @imagback == 15 ) tempy = tanh( temp2 ) elseif ( @imagback == 16 ) tempy = asinh( temp2 ) elseif ( @imagback == 17 ) tempy = acosh( temp2 ) elseif ( @imagback == 18 ) tempy = atanh( temp2 ) elseif ( @imagback == 19 ) tempy = log( 1/temp2 ) elseif ( @imagback == 20 ) tempy = log( log( temp2 )) elseif ( @imagback == 21 ) tempy = exp( -temp2 ) elseif ( @imagback == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagback == 23 ) tempy = temp2^(-temp2) elseif ( @imagback == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 27 ) tempy = cotan( temp2 ) elseif ( @imagback == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagback == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagback == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagback == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagback == 35 ) tempy = log(-temp2) elseif ( @imagback == 36 ) tempy = 1/log( temp2 ) elseif ( @imagback == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagback == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagback == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagback == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagback == 41 ) tempy = sin( temp2^2 ) elseif ( @imagback == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagback == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagback == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagback == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagback == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagback == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagback == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagback == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagback == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagback == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagback == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagback == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagback == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagback == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagback == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagback == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagback == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagback == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagback == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagback == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagback == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagback == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagback == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagback == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagback == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagback == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagback == 68 ) tempy = cotanh( temp2 ) elseif ( @imagback == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagback == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagback == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagback == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagback == 73 ) tempy = asinh( 1/temp2 ) elseif @imagback == 74 tempy = temp2^@ibpower elseif @imagback == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagback == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagback == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagback == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagback == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagback == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagback == 81 tempy = sinh(1/temp2) elseif @imagback == 82 tempy = cosh(1/temp2) elseif @imagback == 83 tempy = tanh(1/temp2) elseif @imagback == 84 tempy = cotanh(1/temp2) elseif @imagback == 85 tempy = 1/cosh(1/temp2) elseif @imagback == 86 tempy = 1/sinh(1/temp2) elseif @imagback == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagback == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagback == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagback == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagback == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagback == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagback == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagback == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagback == 98 tempy = exp(2*temp2) elseif @imagback == 99 tempy = exp(-2*temp2) elseif @imagback == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagback == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagback == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagback == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagback == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagback == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 107 tempy = sin(temp2)*exp(temp2) elseif @imagback == 108 tempy = cos(temp2)*exp(temp2) elseif @imagback == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagback == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagback == 111 tempy = sin(temp2)*log(temp2) elseif @imagback == 112 tempy = cos(temp2)*log(temp2) elseif @imagback == 113 tempy = sinh(temp2)*log(temp2) else ; @imagback == 114 tempy = cosh(temp2)*log(temp2) endif ; imagback if @ibperturb tempy = @ibblend * tempy + ibbcomp * imag(tempc) endif ; @ibperturb tempc = tempx + flip(tempy) ; To find angle of point on circle, we will translate point back to its original home cangle = atan2( tempc + trapcenter ) if ( cangle < 0 ) cangle = cangle + twopi endif ; cangle if @twavy if @twavmode == 0 ; radial mode temp = cabs( tempc ) temp = temp + @twavamp * temp * sin( @twavfreq * cangle ) ; vary radius tempc = temp * exp( flip( cangle )) ; compute new tempc else ; tangential mode tempx = cabs( tempc ) temp = cangle + @twavamp * cangle * sin( @twavfreq * tempx ) ; vary azimuth tempc = tempx * exp( flip( temp )) ; compute new tempc cangle = temp endif ; @twavmode endif ; @twavy if @pointmode ; compare subsequent values to first trap point on trap graph if itrapped != 0 ; some point must have already been trapped tempc = ctrapped endif; itrapped endif ; @pointmode ; Save value for later turbulence tlast = tempc if @swapflavor zscratch = ztemp else zscratch = #z endif ; swapflavor if ( @trapmode == 0 ) ; distance test = cabs( ztemp - tempc ) elseif ( @trapmode == 1 ) ; angle test = zangle elseif ( @trapmode == 2 ) ; trap angle test = cangle elseif ( @trapmode == 3 ) ; difference angle test = abs( zangle - cangle ) elseif ( @trapmode == 4 ) ; magnitude test = cabs( ztemp + trapcenter ) elseif ( @trapmode == 5 ) ; trap magnitude test = cabs( tempc + trapcenter ) elseif ( @trapmode == 6 ) ; real test = abs( real( ztemp )) elseif ( @trapmode == 7 ) ; imaginary test = abs( imag( ztemp )) elseif ( @trapmode == 8 ) ; trap real test = abs( real( tempc )) elseif ( @trapmode == 9 ) ; trap imaginary test = abs( imag( tempc )) elseif ( @trapmode == 10 ) ; sum test = cabs( zscratch + tempc ) elseif ( @trapmode == 11 ) ; difference test = cabs( zscratch - tempc) elseif ( @trapmode == 12 ) ; product test = cabs( zscratch * tempc ) elseif ( @trapmode == 13 ) ; quotient 1 test = cabs( zscratch / tempc ) elseif ( @trapmode == 14 ) ; quotient 2 test = cabs( tempc / zscratch ) elseif ( @trapmode == 15 ) ; power 1 test = cabs( zscratch ^ tempc ) elseif ( @trapmode == 16 ) ; power 2 test = cabs( tempc ^ zscratch ) elseif ( @trapmode == 17 ) ; arithmetic mean test = cabs( (zscratch + tempc)/2 ) elseif ( @trapmode == 18 ) ; geometric mean test = cabs( sqrt( zscratch * tempc )) elseif ( @trapmode == 19 ) ; angle 2 test = atan2( zscratch - tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 20 ) ; angle 3 test = atan2( zscratch + tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 21 ) ; angle 4 test = atan2( zscratch * tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 22 ) ; angle 5 test = atan2( zscratch / tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 23 ) ; angle 6 test = atan2( tempc / zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 24 ) ; angle 7 test = atan2( zscratch ^ tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 25 ) ; angle 8 test = atan2( tempc ^ zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 26 ) ; real 2 test = abs( real( zscratch - tempc )) elseif ( @trapmode == 27 ) ; real 3 test = abs( real( zscratch + tempc )) elseif ( @trapmode == 28 ) ; real 4 test = abs( real( zscratch * tempc )) elseif ( @trapmode == 29 ) ; real 5 test = abs( real( zscratch / tempc )) elseif ( @trapmode == 30 ) ; real 6 test = abs( real( tempc / zscratch )) elseif ( @trapmode == 31 ) ; real 7 test = abs( real( zscratch ^ tempc )) elseif ( @trapmode == 32 ) ; real 8 test = abs( real( tempc ^ zscratch )) elseif ( @trapmode == 33 ) ; imag 2 test = abs( imag( zscratch - tempc )) elseif ( @trapmode == 34 ) ; imag 3 test = abs( imag( zscratch + tempc )) elseif ( @trapmode == 35 ) ; imag 4 test = abs( imag( zscratch * tempc )) elseif ( @trapmode == 36 ) ; imag 5 test = abs( imag( zscratch / tempc )) elseif ( @trapmode == 37 ) ; imag 6 test = abs( imag( tempc / zscratch )) elseif ( @trapmode == 38 ) ; imag 7 test = abs( imag( zscratch ^ tempc )) elseif ( @trapmode == 39 ) ; imag 8 test = abs( imag( tempc ^ zscratch )) endif ; trapmode if ( @whattotrap == 0 ) ; minimum if ( test < trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 1 ) ; maximum if ( test > trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 2 ) ; 2nd minimum if ( test < trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 3 ) ; 3rd minimum if ( test < trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 4 ) ; 4th minimum if ( test < trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 5 ) ; 2nd maximum if ( test > trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 6 ) ; 3rd maximum if ( test > trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 7 ) ; 4th maximum if ( test > trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 8 ) ; 1st to dip below threshold value if ( itrapped == 0 ) ; nothing trapped yet if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 9 ) ; last to dip below threshold --- just store them all if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 10 ) ; count dips below threshold --- store the last if ( test < thresh ) count = count + 1 if !@ringstyle trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE elseif test > innerradius trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 11 ) ; 2nd to dip below threshold value if ( test < thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 12 ) ; 1st to exceed threshold limit if ( itrapped == 0 ) ; nothing trapped yet if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 13 ) ; 2nd to exceed threshold limit if ( test > thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 14 ) ; last to exceed threshold --- just store them all if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif @whattotrap > 14 ; maximum/minimum combos; need to find & store both ; trapped2 will hold he max, trapped1 the min if test < trapped1 ; is it a new min? trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > trapped2 ; is it a new max? trapped2 = test, itrapped2 = iter, zatrapped2 = zangle, catrapped2 = cangle ztrapped2 = #z, zttrapped2 = ztemp, ctrapped2 = tempc, trapped = TRUE endif ; test endif ; whattotrap if ( @varymode == 0 ) ; feedback only on iterations where something was trapped vary = trapped elseif ( @varymode == 1 ) ; feedback when nothing was trapped vary = !trapped else ; feedback on each iteration, if enabled for a given parameter vary = TRUE endif ; varymode trapped = FALSE ; reset flag for next iteration if vary ; test to see if any parameters should be varied float value = 0.0 if @oldstyle value = cabs(ctrapped) sign = real(ctrapped)/abs(real(ctrapped)) else value = cabs(ztemp) sign = real(ztemp)/abs(real(ztemp)) endif ; oldstyle if @varyradius rad = rad + radstep * rad * value * sign endif ; varyradius if @varycenter tempx = real(trapcenter) + centerstep * real(trapcenter) * value \ * sign tempy = imag(trapcenter) + centerstep * imag(trapcenter) * value \ * sign trapcenter = tempx + flip( tempy ) endif ; varycenter if @varythresh thresh = thresh + threshstep * thresh * value * sign if @ringstyle if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; ringstyle endif ; varythresh if @varyrwidth rwidth = rwidth + ringstep * rwidth * value * sign if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; varyrwidth if @varyspread spread = spread + spreadstep * spread * value * sign endif ; varyspread if @varyturb turbulamount = turbulamount + turbstep * turbulamount * value * sign endif ; varyturb endif ; vary endif ; iter final: if ( itrapped != 0 ) ; something has been trapped if (( @whattotrap == 2 ) || ( @whattotrap == 5 )) ; we need to swap some values ; so we will plot the right thing trapped1 = trapped2, itrapped = itrapped2, zatrapped = zatrapped2, catrapped = catrapped2 ztrapped = ztrapped2, zttrapped = zttrapped2, ctrapped = ctrapped2 elseif (( @whattotrap == 3 ) || ( @whattotrap == 6 )) trapped1 = trapped3, itrapped = itrapped3, zatrapped = zatrapped3, catrapped = catrapped3 ztrapped = ztrapped3, zttrapped = zttrapped3, ctrapped = ctrapped3 elseif (( @whattotrap == 4 ) || ( @whattotrap == 7 )) trapped1 = trapped4, itrapped = itrapped4, zatrapped = zatrapped4, catrapped = catrapped4 ztrapped = ztrapped4, zttrapped = zttrapped4, ctrapped = ctrapped4 elseif @whattotrap == 15 ; max-min trapped1 = trapped2-trapped1, itrapped = itrapped2-itrapped zatrapped = zatrapped2-zatrapped, catrapped = catrapped2-catrapped ztrapped = ztrapped2-ztrapped, zttrapped = zttrapped2-zttrapped ctrapped = ctrapped2-ctrapped elseif @whattotrap == 16 ; max+min trapped1 = trapped2+trapped1, itrapped = itrapped2+itrapped zatrapped = zatrapped2+zatrapped, catrapped = catrapped2+catrapped ztrapped = ztrapped2+ztrapped, zttrapped = zttrapped2+zttrapped ctrapped = ctrapped2+ctrapped elseif @whattotrap == 17 ; max*min trapped1 = trapped2*trapped1, itrapped = itrapped2*itrapped zatrapped = zatrapped2*zatrapped, catrapped = catrapped2*catrapped ztrapped = ztrapped2*ztrapped, zttrapped = zttrapped2*zttrapped ctrapped = ctrapped2*ctrapped elseif @whattotrap == 18 ; max/min trapped1 = trapped2/trapped1, itrapped = round(itrapped2/itrapped) zatrapped = zatrapped2/zatrapped, catrapped = catrapped2/catrapped ztrapped = ztrapped2/ztrapped, zttrapped = zttrapped2/zttrapped ctrapped = ctrapped2/ctrapped elseif @whattotrap == 19 ; max^min trapped1 = trapped2^trapped1, itrapped = round(itrapped2^itrapped) zatrapped = zatrapped2^zatrapped, catrapped = catrapped2^catrapped ztrapped = ztrapped2^ztrapped, zttrapped = zttrapped2^zttrapped ctrapped = ctrapped2^ctrapped elseif @whattotrap == 20 ; min-max trapped1 = trapped1-trapped2, itrapped = itrapped-itrapped2 zatrapped = zatrapped-zatrapped2, catrapped = catrapped-catrapped2 ztrapped = ztrapped-ztrapped2, zttrapped = zttrapped-zttrapped2 ctrapped = ctrapped-ctrapped2 elseif @whattotrap == 21 ; min/max trapped1 = trapped1/trapped2, itrapped = round(itrapped/itrapped2) zatrapped = zatrapped/zatrapped2, catrapped = catrapped/catrapped2 ztrapped = ztrapped/ztrapped2, zttrapped = zttrapped/zttrapped2 ctrapped = ctrapped/ctrapped2 elseif @whattotrap == 22 ; min^max trapped1 = trapped1^trapped2, itrapped = round(itrapped^itrapped2) zatrapped = zatrapped^zatrapped2, catrapped = catrapped^catrapped2 ztrapped = ztrapped^ztrapped2, zttrapped = zttrapped^zttrapped2 ctrapped = ctrapped^ctrapped2 elseif @whattotrap == 23 ; average: (max+min)/2 trapped1 = (trapped1+trapped2)/2, itrapped = trunc((itrapped+itrapped2)/2) zatrapped = (zatrapped+zatrapped2)/2, catrapped = (catrapped+catrapped2)/2 ztrapped = (ztrapped+ztrapped2)/2, zttrapped = (zttrapped+zttrapped2)/2 ctrapped = (ctrapped+ctrapped2)/2 elseif @whattotrap == 15 ; max-min trapped1 = trapped2-trapped1, itrapped = itrapped2-itrapped zatrapped = zatrapped2-zatrapped, catrapped = catrapped2-catrapped ztrapped = ztrapped2-ztrapped, zttrapped = zttrapped2-zttrapped ctrapped = ctrapped2-ctrapped elseif @whattotrap == 16 ; max+min trapped1 = trapped2+trapped1, itrapped = itrapped2+itrapped zatrapped = zatrapped2+zatrapped, catrapped = catrapped2+catrapped ztrapped = ztrapped2+ztrapped, zttrapped = zttrapped2+zttrapped ctrapped = ctrapped2+ctrapped elseif @whattotrap == 17 ; max*min trapped1 = trapped2*trapped1, itrapped = itrapped2*itrapped zatrapped = zatrapped2*zatrapped, catrapped = catrapped2*catrapped ztrapped = ztrapped2*ztrapped, zttrapped = zttrapped2*zttrapped ctrapped = ctrapped2*ctrapped elseif @whattotrap == 18 ; max/min trapped1 = trapped2/trapped1, itrapped = round(itrapped2/itrapped) zatrapped = zatrapped2/zatrapped, catrapped = catrapped2/catrapped ztrapped = ztrapped2/ztrapped, zttrapped = zttrapped2/zttrapped ctrapped = ctrapped2/ctrapped elseif @whattotrap == 19 ; max^min trapped1 = trapped2^trapped1, itrapped = round(itrapped2^itrapped) zatrapped = zatrapped2^zatrapped, catrapped = catrapped2^catrapped ztrapped = ztrapped2^ztrapped, zttrapped = zttrapped2^zttrapped ctrapped = ctrapped2^ctrapped elseif @whattotrap == 20 ; min-max trapped1 = trapped1-trapped2, itrapped = itrapped-itrapped2 zatrapped = zatrapped-zatrapped2, catrapped = catrapped-catrapped2 ztrapped = ztrapped-ztrapped2, zttrapped = zttrapped-zttrapped2 ctrapped = ctrapped-ctrapped2 elseif @whattotrap == 21 ; min/max trapped1 = trapped1/trapped2, itrapped = round(itrapped/itrapped2) zatrapped = zatrapped/zatrapped2, catrapped = catrapped/catrapped2 ztrapped = ztrapped/ztrapped2, zttrapped = zttrapped/zttrapped2 ctrapped = ctrapped/ctrapped2 elseif @whattotrap == 22 ; min^max trapped1 = trapped1^trapped2, itrapped = round(itrapped^itrapped2) zatrapped = zatrapped^zatrapped2, catrapped = catrapped^catrapped2 ztrapped = ztrapped^ztrapped2, zttrapped = zttrapped^zttrapped2 ctrapped = ctrapped^ctrapped2 elseif @whattotrap == 23 ; average: (max+min)/2 trapped1 = (trapped1+trapped2)/2, itrapped = trunc((itrapped+itrapped2)/2) zatrapped = (zatrapped+zatrapped2)/2, catrapped = (catrapped+catrapped2)/2 ztrapped = (ztrapped+ztrapped2)/2, zttrapped = (zttrapped+zttrapped2)/2 ctrapped = (ctrapped+ctrapped2)/2 endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; product1 ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; distance temp = abs(cabs( zttrapped ) - rad) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask elseif ( @colorby == 1 ) ; iteration if @mask if itrapped < @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp elseif @revmask if itrapped > @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp else _color = 0.3 * spread * itrapped endif ; @mask elseif ( @colorby == 2 ) ; magnitude temp = cabs( ztrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp else _color = 0.25 * spread * temp endif ; @mask elseif ( @colorby == 3 ) ; test if @mask if trapped1 < @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 elseif @revmask if trapped1 > @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 else _color = spread * trapped1 endif ; @mask elseif ( @colorby == 4 ) ; trap magnitude temp = cabs(ctrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 5 ) ; angle temp = atan2( ztrapped ) if ( temp < 0 ) temp = temp + twopi endif ; temp if @mask if temp < @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp else _color = ( spread * temp ) / twopi endif ; @mask elseif ( @colorby == 6 ) ; trap angle if @mask if catrapped < @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped elseif @revmask if catrapped > @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped else _color = ( spread * catrapped ) / twopi endif ; @mask elseif ( @colorby == 7 ) ; modulated magnitude temp = cabs(zttrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 8 ) ; modulated angle if @mask if zatrapped < @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped elseif @revmask if zatrapped > @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped else _color = ( spread * zatrapped ) / twopi endif ; @mask elseif ( @colorby == 9 ) ; real temp = abs( real( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 10 ) ; trap real temp = abs( real( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 11 ) ; modulated real temp = abs( real( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 12 ) ; imaginary temp = abs( imag( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 13 ) ; trap imaginary temp = abs( imag( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 14 ) ; modulated imaginary temp = abs( imag( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 15 ) ; raw distance (distance to #z, not ztemp) temp = abs(cabs( ztrapped ) - rad) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else if !@hideranges _color = ((_color + _coloradjust) + (itrapped % @ranges) ) / @ranges else temp = itrapped % @ranges if temp != @showrange #solid = TRUE else _color = ((_color + _coloradjust) + temp ) / @ranges endif ; temp endif ; hideranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else #solid = TRUE endif ; itrapped default: title = "Circle Trap" param whattotrap caption = "Trap What?" enum = "minimum" "maximum" "2nd minimum" "3rd minimum" "4th minimum" "2nd maximum" \ "3rd maximum" "4th maximum" "1st threshold" "last threshold" "threshold count" \ "2nd threshold" "1st limit" "2nd limit" "last limit" "max-min" "max+min" \ "max*min" "max/min" "max^min" "min-max" "min/max" "min^max" "min,max avg" default = 0 hint = "What type of value will be trapped?" endparam param threshold caption = "Threshold Value" default = 0.5 hint = "Upper bound (maximum value that will be trapped) if one of the \ 'Threshold' options is chosen for param 'Trap What'; \ also, lower bound (minimum trapped value) if 'Trap What' is set to \ a 'Limit' option. Increase value for limit traps" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param varythresh caption = "Vary Threshold?" default = FALSE hint = "If set, the value of the trap will modify the value of 'threshold' and 'limit' type traps \ each iteration; parameter 'ThreshFeedback' can be used to modulate the variation" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param threshstp caption = "ThreshFeedback" default = 1.0 hint = "If 'Vary Threshold' is set, this setting adjusts the amount of variation" visible = @varythresh endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Trap What' is set to a \ 'Threshold' or 'Limit' option, then 'Trap What' \ becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Trap What' is set to either a 'Threshold', \ or 'Limit' option, this parameter determines the width of the ring trap" visible = @ringstyle == TRUE endparam param varyrwidth caption = "Vary Ringwidth?" default = FALSE hint = "If set, the value of the trap will modify the ring width of 'threshold' \ and 'limit' ring-type traps each iteration; parameter 'RingFeedback' can be \ used to modulate the variation" visible = @ringstyle endparam param ringstp caption = "RingFeedback" default = 1.0 hint = "If 'Vary Ringwidth' is set, this setting adjusts the amount of variation" visible = @varyrwidth endparam param trapmode caption = "Trap Flavor" enum = "distance" "angle" "trap angle" "difference angle" "magnitude" "trap magnitude" \ "real" "imaginary" "trap real" "trap imaginary" "sum" "difference" "product" \ "quotient 1" "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "What quantity will be watched for possible trapping?" endparam param swapflavor caption = "New Flavor?" default = FALSE hint = "Try an alternately flavored trap test? Only affects flavor choices \ above 9 (sum, difference, etc)" visible = @trapmode > 9 endparam param radius caption = "Circle Radius" default = 0.5 hint = "Enter radius of circle used as trap" endparam param varyradius caption = "Vary Radius?" default = FALSE hint = "If set, the value of the trap will modify the circle radius each iteration; \ parameter 'RadiusFeedback' can be used to modulate the variation" endparam param radstp caption = "RadiusFeedback" default = 1.0 hint = "If 'Vary Radius' is set, this setting adjusts the amount of variation" visible = @varyradius endparam param centermode caption = "Circle Center" enum = "Custom" "Screen Center" default = 0 hint = "Set circle center; if 'Custom' is selected, parameter 'Custom Center' \ can be set to reposition circle" endparam param customcenter caption = "Custom Center" default = (0, 0) hint = "This value only applies when parameter 'Circle Center' is \ set to 'Custom'" visible = @centermode == 0 endparam param varycenter caption = "Vary Center?" default = FALSE hint = "If set, the value of the trap will modify the circle center each iteration; \ parameter 'CenterFeedback' can be used to modulate the variation" endparam param centerstp caption = "CenterFeedback" default = 1.0 hint = "If 'Vary Center' is set, this setting adjusts the amount of variation" visible = @varycenter endparam param sprangle caption = "Spread Angle?" default = FALSE hint = "If enabled, the angular range is spread out or compressed, \ depending on the value of param 'AngleSpread Factor'" endparam param sprangfactor caption = "AngleSpread Factor" default = 3.0 hint = "If param 'Spread Angle?' is enabled, this is the stretching or \ compression multiplier of atan(z). 1.0 corresponds to no spreading. \ Inactive if 'Spread Angle?' is not enabled" visible = @sprangle == TRUE endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to \ being fed to the trap" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" visible = @initialization == "z^power" endparam param ziscale caption = "Z Init Scale" default = 1.0 hint = "This param can be used to scale the overall iterate z \ before z initialization" endparam param initperturb caption = "Perturb Z Initialization?" default = FALSE hint = "If enabled, then 'Z Initialization' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Z Init Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @initialization != "z" endparam param initblend caption = "Z Init Blend" default = 0.1 hint = "If 'Perturb Z Initialization' is enabled, then this sets the fraction \ of 'Z Initialization' that is mixed in with the original #z. \ Inactive if 'Perturb Z Initialization' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @initperturb endparam param transmogrify caption = "Trap Transmute" enum = "t" "1/t" "t^2" "1/t^2" "log(t)" "e^t" "t^t" "sin(t)" "cos(t)" \ "tan(t)" "asin(t)" "acos(t)" "atan(t)" "sinh(t)" "cosh(t)" "tanh(t)" \ "asinh(t)" "acosh(t)" "atanh(t)" "log(1/t)" "log(log(t))" "e^-t" \ "e^(1/t)" "t^-t" "sin(t)^2" "cos(t)^2" "tan(t)^2" "cot(t)" "sec(t)" \ "csc(t)" "cot(t)^2" "sec(t)^2" "csc(t)^2" "t^t^t" "1/t^t^t" "log(-t)" \ "1/log(t)" "tlog(t)" "sin(t)/t" "cos(t)/t" "sin(t)*cos(t)" "sin(t^2)" \ "e^(-1/t)" "te^t" "te^-t" "te^(1/t)" "te^(-1/t)" "t^3" "1/t^3" \ "acot(t)" "asec(t)" "acsc(t)" "tan(t)/t" "cot(t)/t" "sec(t)/t" \ "csc(t)/t" "tsin(t)" "tcos(t)" "ttan(t)" "tcot(t)" "tsec(t)" "tcsc(t)" \ "sin(1/t)" "cos(1/t)" "tan(1/t)" "cot(1/t)" "sec(1/t)" "csc(1/t)" \ "cotanh(t)" "sech(t)" "cosech(t)" "acoth(t)" "asech(t)" "acosech(t)" "t^power" \ "sinh(t)^2" "cosh(t)^2" "tanh(t)^2" "cotanh(t)^2" \ "sech(t)^2" "cosech(t)^2" "sinh(1/t)" "cosh(1/t)" "tanh(1/t)" \ "cotanh(1/t)" "sech(1/t)" "cosech(1/t)" "sin(t)tan(t)" "sinh(t)tanh(t)" \ "sinh(t)cosh(t)" "sinh(t)^2*cosh(t)^2" "sin(t)^2*cos(t)^2" \ "sin(1/t)*cos(1/t)" "sin(1/t)^2" "sin(t)cos(1/t)" "sin(t)sin(1/t)" \ "log(t)^2" "sin(t)sin(2t)" "e^2t" "e^-2t" "sinh(1/t)cosh(1/t)" \ "sinh(1/t)^2" "sinh(t)cosh(1/t)" "sinh(t)sinh(1/t)" "sin(t)sinh(t)" \ "sin(t)cosh(t)" "sin(t)^2*sinh(t)^2" "sin(t)e^t" "cos(t)e^t" \ "sinh(t)e^t" "cosh(t)e^t" "sin(t)log(t)" "cos(t)log(t)" "sinh(t)log(t)" \ "cosh(t)log(t)" default = 0 hint = "The point, t, on the circle closest to the z iterate can be transformed \ prior to testing for trapping; select 't' for no transmutation. \ Transmute does not work on the following trap flavors: \ 2 (angle), 5 (magnitude), 7 (real), and 8 (imag)" endparam param tpower caption = "Trap Power" default = (0,1) hint = "Trap point t exponent if param 'Trap Transmute' is set to 't^power'" visible = @transmogrify == "t^power" endparam param tiscale caption = "Trap Scale" default = 1.0 hint = "This param can be used to scale the overall trap point t \ before transmutation" endparam param trapperturb caption = "Perturb Trap Transmute?" default = FALSE hint = "If enabled, then 'Trap Transmute' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Trap Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @transmogrify != "t" endparam param trapblend caption = "Trap Blend" default = 0.1 hint = "If 'Perturb Trap Transmute' is enabled, then this sets the fraction \ of 'Trap Transmute' that is mixed in with the original trap point, t. \ Inactive if 'Perturb Trap Transmute' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @trapperturb endparam param realfront caption = "FrontEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the initial value of real(z) before input to \ the 'Z Initialization' function. For 'r^power' set param 'FrontEndReal \ Power'" endparam param rfpower caption = "FrontEndReal Power" default = 4.0 hint = "Real(z) exponent if param 'FrontEndReal Warp' is set to 'r^power'" visible = @realfront == "r^power" endparam param rfscale caption = "Real(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param rfperturb caption = "Perturb FrontEndReal?" default = FALSE hint = "If enabled, then 'FrontEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realfront != "r" endparam param rfblend caption = "FrontEndReal Blend" default = 0.1 hint = "If 'Perturb FrontEndReal' is enabled, then this sets the fraction \ of 'FrontEndReal Warp' that is mixed in with the original real(z). \ Inactive if 'Perturb FrontEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rfperturb endparam param imagfront caption = "FrontEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the initial value of imag(z) before input to \ the 'Z Initialization' function. For 'i^power' set param 'FrontEndImag \ Power'" endparam param ifpower caption = "FrontEndImag Power" default = 4.0 hint = "Imag(z) exponent if param 'FrontEndImag Warp' is set to 'i^power'" visible = @imagfront == "i^power" endparam param ifscale caption = "Imag(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param ifperturb caption = "Perturb FrontEndImag?" default = FALSE hint = "If enabled, then 'FrontEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagfront != "i" endparam param ifblend caption = "FrontEndImag Blend" default = 0.1 hint = "If 'Perturb FrontEndImag' is enabled, then this sets the fraction \ of 'FrontEndImag Warp' that is mixed in with the original imag(z). \ Inactive if 'Perturb FrontEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ifperturb endparam param realback caption = "BackEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the final value of real(trap) before testing for \ trapping by the 'Trap What?' function. For 'r^power' set param 'BackEndReal \ Power'" endparam param rbpower caption = "BackEndReal Power" default = 4.0 hint = "Real(trap) exponent if param 'BackEndReal Warp' is set to 'r^power'" visible = @realback == "r^power" endparam param rbscale caption = "Real(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param rbperturb caption = "Perturb BackEndReal?" default = FALSE hint = "If enabled, then 'BackEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realback != "r" endparam param rbblend caption = "BackEndReal Blend" default = 0.1 hint = "If 'Perturb BackEndReal' is enabled, then this sets the fraction \ of 'BackEndReal Warp' that is mixed in with the original real(trap). \ Inactive if 'Perturb BackEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rbperturb endparam param imagback caption = "BackEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the final value of imag(trap) before testing for \ trapping by the 'Trap What?' function. For 'i^power' set param 'BackEndImag \ Power'" endparam param ibpower caption = "BackEndImag Power" default = 4.0 hint = "Imag(trap) exponent if param 'BackEndImag Warp' is set to 'i^power'" visible = @imagback == "i^power" endparam param ibscale caption = "Imag(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param ibperturb caption = "Perturb BackEndImag?" default = FALSE hint = "If enabled, then 'BackEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagback != "i" endparam param ibblend caption = "BackEndImag Blend" default = 0.1 hint = "If 'Perturb BackEndImag' is enabled, then this sets the fraction \ of 'BackEndImag Warp' that is mixed in with the original imag(trap). \ Inactive if 'Perturb BackEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ibperturb endparam param @colorby caption = "Color By?" enum = "distance" "iteration" "magnitude" "test" "trap magnitude" "angle" \ "trap angle" "mod magnitude" "mod angle" "real" "trap real" "mod real"\ "imag" "trap imag" "mod imag" "raw distance" default = 0 hint = "Criterion for computing color index" endparam param @colorspread caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" visible = @varyspread endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param hideranges caption = "Mask Color Ranges?" default = FALSE hint = "If enabled, then param 'Show Which Range?' can be set to mask pixels \ other than those in the given range. Only valid if 'Color Ranges' > 1" visible = @ranges > 1 endparam param showrange caption = "Show Which Range?" default = 0 min = 0 hint = "If 'Mask Color Ranges?' is turned on, then pixels falling in this color \ range will be visible; others will be set to the solid color. Works best \ with param 'Trap What?' set to a threshold or limit option. 0 <= param < \ 'Color Ranges'" visible = @hideranges == TRUE endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" visible = @colorwarp == "c^power" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" visible = @operator != "none" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" visible = (( @trapvariant != "normal" ) && ( @operator != "none" )) endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" visible = @history == TRUE endparam param twavy caption = "Enable T Waviness?" default = FALSE hint = "Adds waves to the trap function. If enabled, params 'Waviness Mode', \ 'Waviness Amplitude', & 'Waviness Frequency' may be adjusted to vary \ wave character" endparam param twavmode caption = "T Wave Mode" enum = "radial" "tangential" default = 0 hint = "If 'Enable T Waviness' is on, this param sets the type of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavamp caption = "T Wave Amplitude" default = 0.1 hint = "If 'Enable T Waviness' is on, this param sets the height of the waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavfreq caption = "T Wave Frequency" default = 10.0 hint = "If 'Enable T Waviness' is on, this param sets the density of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param pointmode caption = "Enable Point Mode?" default = FALSE hint = "If set, trapping occurs normally until the first #z has been \ trapped using the usual criteria; subsequently, trapping is \ relative to this first trap point, rather than to the entire curve" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds fBm distortion to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" visible = @turb3 endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" visible = @turb3 endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" visible = @turb3 endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" visible = @turb3 endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" visible = @turb3 endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" visible = @turb3 endparam param varyturb caption = "Vary Turbulence?" default = FALSE hint = "If set, the value of the trap will modify the turbulence amount each \ iteration; parameter 'TurbulenceFeedback' can be used to modulate the variation" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param turbstp caption = "TurbulenceFeedback" default = 1.0 hint = "If 'Vary Turbulence' is set, this setting adjusts the amount of variation" visible = @varyturb endparam param mask caption = "Masking?" default = FALSE hint = "If enabled, trapped values below the 'Masking Threshold' parameter \ will be colored the solid color" visible = !@revmask endparam param revmask caption = "Reverse Masking?" default = FALSE hint = "If enabled, trapped values greater than the 'Masking Threshold' \ parameter will be colored the solid color; inactive if normal \ 'Masking' is also enabled" visible = !@mask endparam param maskthresh caption = "Masking Threshold" default = 0.1 hint = "This param is the value used for solid color masking if either \ 'Masking?' or 'Reverse Masking?' are enabled. Depending on how param \ 'Color By' is set, the value may need large adjustment (.001-10 may \ be useful)" visible = (@mask || @revmask) endparam param varymode caption = "Feedback Mode" enum = "trapped" "not trapped" "always" default = 2 hint = "Variation style; variation of individual parameters must still \ be enabled. 'trapped' -- feedback occurs only on iterations where some \ value was trapped; 'not trapped' -- varies on iterations when nothing \ trapped; 'always' -- feedback on every iteation" visible = (@varyturb || @varyradius || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam param oldstyle caption = "OldStyle Feedback?" default = FALSE hint = "Retained for compatibility with original version of this formula; \ enable if you need to render an early image utilizing this formula, \ or for a variant algorithm that generally produces less feedback variation" visible = (@varyturb || @varyradius || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam } jam-ParabolaTangents { ; jam 010902 ; A very early version of this formula had rotation entry specified in radians. ; This parameter has been changed so that it is specified in degrees, which I ; thought was easier for most. If by chance you have an image that does not render ; properly, convert your previous rotation setting to radians! init: if ( @zoommode == 0 ) complex focus = @focs complex vertex = @vertx else complex focus = #center complex vertex = (@vertx - @focs)/#magn endif ; zoommode bool trapped = FALSE int iter = 0, int count = 1 float twopi = 2.0 * #pi, float halfpi = #pi / 2.0 float threehalvespi = 3.0 * halfpi, float fourthpi = halfpi/2.0 complex zinput = (0,0) ; translated #z float zmag = 0.0 complex ztemp = (0,0), float zangle = 0.0, float theta = 0.0 float gamma = sin( halfpi - #pi/@sides ) float sector = twopi / @sides float cangle = 0.0; parabola azimuth float angleincrement = threehalvespi / @numberdisks float disksize = @disksz, float diskradius = disksize/2 float testradius = 0.0 ; alias for diskradius complex tpoint = (0,0) ; test point on trap float tempx = 0.0, float tempy = 0.0 ; for computing point coordinates float test = 0.0 ; misc. value used for testing complex newvertex = (0,0), float vangle = 0.0, float netrotation = 0.0 float distance = 0.0 int _colorrange = 0, float _coloroffset = 0.0 float _colorindex = 1/@numberdisks ; For feedback/variation options float spread = @colorsprd, float spreadstep = 0.1 * @spreadstp float focusstep = 0.1 * @focusstp float vertexstep = 0.1 * @vertexstp float rotation = @rotate * #pi / 180, float rotationstep = 0.1 * @rotationstp if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation float diskstep = 0.1 * @diskstp float linewidth = @linewdth, float linestep = 0.1 * @linestp float elongation = @elongate, float ellipsestep = @ellipsestp float sign = 0.0 loop: iter = iter + 1 if ( !trapped && ( iter > @skippediters )) ; Translate fractal to be focus-centered, and calulate rotated position of z zinput = #z - focus newvertex = vertex - focus vangle = atan2( newvertex ) if ( vangle < 0 ) vangle = vangle + twopi endif ; vangle netrotation = vangle - threehalvespi + rotation if ( netrotation < 0 ) netrotation = netrotation + twopi endif ; netrotation zinput = zinput * exp( flip( -netrotation )) zmag = cabs( zinput ) ; Calculate parabola-specific parameters distance = 2 * cabs( newvertex ) ; So does z lie near one of the parabola shape center points? cangle = fourthpi ; reset tpoint to begin in first quadrant count = 0 ; reset repeat loop index repeat if @bugfix distance = distance/(1 - sin( cangle )) endif ; bugfix tpoint = distance * exp( flip( cangle )) ; Center z temporarily at the shape center ztemp = zinput - tpoint test = cabs( ztemp ) zangle = atan2( ztemp ) ; angle with respect to shape center if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle < twopi endif ; zangle if ( @shape == 0 ) ; disk testradius = diskradius elseif ( @shape == 1 ) ; polygon zangle = zangle % sector ; 0 <= zangle < twopi/sides theta = #pi - zangle - gamma testradius = diskradius * gamma / sin( theta ) elseif ( @shape == 2 ) ; line ztemp = ztemp * exp( -flip( cangle)) ; tpoint along x-axis test = abs(imag( ztemp )), testradius = linewidth else ; ellipse testradius = diskradius * elongation / ( 1 - elongation * cos( zangle )) endif ; shape if ( test <= testradius ) ; Does z fall within one of the tangent disks? trapped = TRUE _colorrange = count - 1 if ( @colormode == 0 ) ; tangent shape-radial _coloroffset = test / diskradius elseif ( @colormode == 1 ) ; circle-radial _coloroffset = (zmag - cabs(tpoint) + diskradius)/diskradius elseif ( @colormode == 2 ) ; _color by ztemp quadrant relative to shape center if ( zangle <= halfpi ) _coloroffset = 0 elseif ( zangle <= #pi ) _coloroffset = 0.25 elseif ( zangle <= 3 * halfpi ) _coloroffset = 0.5 else _coloroffset = 0.75 endif ; zangle else ; @colormode == 3 --- continuous ztemp angle relative to shape center _coloroffset = zangle / twopi endif ; _colormode endif ; test cangle = cangle - angleincrement ; get ready for next tpoint on parabola count = count + 1 until ( trapped || ( count > @numberdisks )) ; tempx if !trapped ; vary chosen parameter if set sign = real(zinput)/abs(real(zinput)) if @varyrotation rotation = rotation + rotationstep * rotation * zmag * sign endif ; varyrotation if @varyfocus tempx = real(focus) + focusstep * real(focus) * zmag * sign tempy = imag(focus) + focusstep * imag(focus) * zmag * sign focus = tempx + flip( tempy ) endif ; varyfocus if @varyvertex tempx = real(vertex) + vertexstep * real(vertex) * zmag * sign tempy = imag(vertex) + vertexstep * imag(vertex) * zmag * sign vertex = tempx + flip( tempy ) endif ; varyvertex if @varydisksz disksize = disksize + diskstep * disksize * zmag * sign endif ; varydisksz if @varyspread spread = spread + spreadstep * spread * zmag * sign endif ; varyspread if @varyline linewidth = linewidth + linestep * linewidth * zmag * sign endif ; varyline if @varyellipse elongation = elongation + ellipsestep * elongation * zmag * sign endif ; varyellipse endif ; !trapped2 endif ; !trapped1 final: if trapped if @onerange #index = _coloroffset else #index = @colorsprd * _colorindex * ( _colorrange + _coloroffset ) endif ; onerange else #solid = TRUE endif ; trapped default: title = "Parabola Tangents" param shape caption = "Tangent Shape" enum = "disk" "polygon" "line" "ellipse" default = 0 hint = "Determines shape of tangent trap" endparam param disksz caption = "Shape Size" default = 0.4 hint = "Enter size of tangent shapes. For 'Tangent Shape' = line, this is the line length; \ line width is set by parameter 'Line Width'" endparam param numberdisks caption = "Shape Number" default = 7 min = 1 hint = "This parameter determines how many shape traps are placed along the primary parabola path" endparam param zoommode caption = "Parabola Focus" enum = "Custom" "Screen Center" default = 0 hint = "Set parabola focus; if 'Custom' is selected, also set parameter \ 'Custom Focus'" endparam param focs caption = "Custom Focus" default = (0, 0) hint = "This value only applies when parameter 'Parabola Focus' is \ set to 'Custom'" endparam param vertx caption = "Parabola Vertex" default = (0, -1) hint = "This value only applies when parameter 'Parabola Focus' is \ set to 'Custom'" endparam param rotate caption = "Rotation" default = 0.0 min = -179.9 max = 359.9 hint = "Enter amount of rotation from default of the parabola (0-359 degrees)" endparam param @colorsprd caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param @colormode caption = "Coloring Mode" enum = "ShapeRadial" "FocusRadial" "Quadrant" "Angle" default = 0 hint = "'ShapeRadial' means color index increases from tangent shape center outwards; \ 'FocusRadial' means index increases from trap focus outward" endparam param sides caption = "Polygon Order" default = 4 min = 3 hint = "Enter number of sides of polygon" endparam param linewdth caption = "Line Width" default = 0.01 hint = "This is the width of the line if 'Tangent Shape' is set to 'line'" endparam param elongate caption = "Ellipse Eccentricity" default = 0.6 min = 0.0 max = 0.95 hint = "This setting (0.0-0.95)affects the elongation of the ellipse if 'Tangent Shape' \ is set to 'ellipse'; 0.0 reverts to a circle" endparam param varydisksz caption = "Vary Shape?" default = FALSE hint = "If set, the value of the trap will modify the tangent shape radius each iteration; \ parameter 'ShapeFeedback' can be used to modulate the variation" endparam param diskstp caption = "ShapeFeedback" default = 1.0 hint = "If 'Vary Shape' is set, this setting adjusts the amount of variation" endparam param varyrotation caption = "Vary Rotation?" default = FALSE hint = "If set, the value of the trap will modify the parabola rotation each iteration; \ parameter 'RotationFeedback' can be used to modulate the variation" endparam param rotationstp caption = "RotationFeedback" default = 1.0 hint = "If 'Vary Rotation' is set, this setting adjusts the amount of variation" endparam param varyfocus caption = "Vary Focus?" default = FALSE hint = "If set, the value of the trap will modify the parabola focus each iteration; \ parameter 'FocusFeedback' can be used to modulate the variation" endparam param focusstp caption = "FocusFeedback" default = 1.0 hint = "If 'Vary Focus' is set, this setting adjusts the amount of variation" endparam param varyvertex caption = "Vary Vertex?" default = FALSE hint = "If set, the value of the trap will modify the parabola vertex each iteration; \ parameter 'VertexFeedback' can be used to modulate the variation" endparam param vertexstp caption = "VertexFeedback" default = 1.0 hint = "If 'Vary Vertex' is set, this setting adjusts the amount of variation" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" endparam param varyline caption = "Vary LineWidth?" default = FALSE hint = "If set, the value of the trap will modify the line width each \ iteration; parameter 'LineFeedback' can be used to modulate the variation. \ Only applies to 'Tangent Shape' = 'line'" endparam param linestp caption = "LineFeedback" default = 1.0 hint = "If 'Vary LineWidth' is set, this setting adjusts the amount of variation" endparam param varyellipse caption = "Vary Eccentricity?" default = FALSE hint = "If set, the value of the trap will modify the ellipse elongation each \ iteration; parameter 'EllipseFeedback' can be used to modulate the variation. \ Only applies to 'Tangent Shape' = 'ellipse'" endparam param ellipsestp caption = "EllipseFeedback" default = 1.0 hint = "If 'Vary Eccentricity' is set, this setting adjusts the amount of variation" endparam param onerange caption = "Single Range?" default = FALSE hint = "If enabled, a single color range will be used; otherwise, the number of \ color ranges is equal to the number of tangent shapes set by 'Shape Number'" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam param bugfix caption = "Bug Fix?" default = TRUE hint = "Oops! Bug looks pretty good, though, and is retained for compatibility" endparam } jam-SemicubicalParabola1Trap { ; jam version 010902 ; The semicubical parabola is defined by y = x^(2/3). ; A very early version of this formula had rotation entry specified in radians. ; This parameter has been changed so that it is specified in degrees, which I ; thought was easier for most. If by chance you have an image that does not render ; properly, convert your previous rotation setting to radians! init: float twopi = 2.0 * #pi ; Change and scale variables to facilitate variation, if selected float spread = @colorspread, float spreadstep = 0.05 * @spreadstp float thresh = @threshold, float threshstep = 0.05 * @threshstp float scale = @pscale, float scalestep = 0.05 * @scalestp float rotation = @rotate * #pi / 180, float rotationstep = 0.05 * @rotationstp if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation complex center = @centr, float centerstep = @centerstp float ringstep = 0.05 * @ringstp, float rwidth = @ringwidth float sign = 0.0 bool trapped = FALSE bool vary = TRUE float innerradius = thresh - @ringwidth if ( @whattotrap > 11 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, float _color = 0.0 complex zlast = (0,0), complex tlast = (1,0), float turbstep = @turbstp complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex zold2 = (0,0) float rfbcomp = 1-@rfblend, float ifbcomp = 1-@ifblend float rbbcomp = 1-@rbblend, float ibbcomp = 1-@ibblend float trapbcomp = 1-@trapblend, float initbcomp = 1-@initblend if @towatch == 0 int watch = #maxiter else int watch = @skippediters + @towatch endif ; towatch float anglelimit = #pi / 36.0 int iter = 0, int count = 0 int itrapped = int itrapped2 = int itrapped3 = int itrapped4 = 0 float test = 0.0, float trapped1 = float trapped2 = float trapped3 = float trapped4 = 1e9 float zangle = 0.0, float zatrapped = float zatrapped2 = float zatrapped3 = float zatrapped4 = 0.0 float cangle = 0.0, float catrapped = float catrapped2 = float catrapped3 = float catrapped4 = 0.0 complex ztrapped = complex ztrapped2 = complex ztrapped3 = complex ztrapped4 = (0,0) complex ztemp = complex zttrapped = complex zttrapped2 = complex zttrapped3 = complex zttrapped4 = (0,0) complex tempc = complex ctrapped = complex ctrapped2 = complex ctrapped3 = complex ctrapped4 = (0,0) float tempx = 0.0, float tempy = 0.0, float temp = 0.0, float temp2 = 0.0 complex zinput = (0,0) float tempzangle = 0.0 ; If we're trapping something big, initialize small if (( @whattotrap == 1 ) || ( @whattotrap == 5 ) || ( @whattotrap == 6 ) \ || ( @whattotrap == 7 )) trapped1 = trapped2 = trapped3 = trapped4 = -1e9 elseif @whattotrap > 14 trapped2 = -1e9 ; used to store the max when looking for min-max, min+max, etc. endif ; trapmode loop: iter = iter + 1 if ( iter > @skippediters ) && ( iter <= watch ) ; finished skipping --- start testing for trap ; Initialize front end real, front end imag, if desired temp2 = @rfscale * real(#z) if ( @realfront == 0 ) tempx = temp2 elseif ( @realfront == 1 ) tempx = 1/temp2 elseif ( @realfront == 2 ) tempx = temp2 * temp2 elseif ( @realfront == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realfront == 4 ) tempx = log(temp2) elseif ( @realfront == 5 ) tempx = exp( temp2) elseif ( @realfront == 6 ) tempx = temp2^temp2 elseif ( @realfront == 7 ) tempx = sin( temp2 ) elseif ( @realfront == 8 ) tempx = cos( temp2 ) elseif ( @realfront == 9 ) tempx = tan( temp2 ) elseif ( @realfront == 10 ) tempx = asin( temp2 ) elseif ( @realfront == 11 ) tempx = acos( temp2 ) elseif ( @realfront == 12 ) tempx = atan( temp2 ) elseif ( @realfront == 13 ) tempx = sinh( temp2 ) elseif ( @realfront == 14 ) tempx = cosh( temp2 ) elseif ( @realfront == 15 ) tempx = tanh( temp2 ) elseif ( @realfront == 16 ) tempx = asinh( temp2 ) elseif ( @realfront == 17 ) tempx = acosh( temp2 ) elseif ( @realfront == 18 ) tempx = atanh( temp2 ) elseif ( @realfront == 19 ) tempx = log( 1/temp2 ) elseif ( @realfront == 20 ) tempx = log( log( temp2 )) elseif ( @realfront == 21 ) tempx = exp( -temp2 ) elseif ( @realfront == 22 ) tempx = exp( 1/temp2 ) elseif ( @realfront == 23 ) tempx = temp2^(-temp2) elseif ( @realfront == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 27 ) tempx = cotan( temp2 ) elseif ( @realfront == 28 ) tempx = 1/cos( temp2 ) elseif ( @realfront == 29 ) tempx = 1/sin( temp2 ) elseif ( @realfront == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realfront == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realfront == 35 ) tempx = log(-temp2) elseif ( @realfront == 36 ) tempx = 1/log( temp2 ) elseif ( @realfront == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realfront == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realfront == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realfront == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realfront == 41 ) tempx = sin( temp2^2 ) elseif ( @realfront == 42 ) tempx = exp( -1/temp2 ) elseif ( @realfront == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realfront == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realfront == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realfront == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realfront == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realfront == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realfront == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realfront == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realfront == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realfront == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realfront == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realfront == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realfront == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realfront == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realfront == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realfront == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realfront == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realfront == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realfront == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realfront == 62 ) tempx = sin( 1/temp2 ) elseif ( @realfront == 63 ) tempx = cos( 1/temp2 ) elseif ( @realfront == 64 ) tempx = tan( 1/temp2 ) elseif ( @realfront == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realfront == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realfront == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realfront == 68 ) tempx = cotanh( temp2 ) elseif ( @realfront == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realfront == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realfront == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realfront == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realfront == 73 ) tempx = asinh( 1/temp2 ) elseif @realfront == 74 tempx = temp2^@rfpower elseif @realfront == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realfront == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realfront == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realfront == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realfront == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realfront == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realfront == 81 tempx = sinh(1/temp2) elseif @realfront == 82 tempx = cosh(1/temp2) elseif @realfront == 83 tempx = tanh(1/temp2) elseif @realfront == 84 tempx = cotanh(1/temp2) elseif @realfront == 85 tempx = 1/cosh(1/temp2) elseif @realfront == 86 tempx = 1/sinh(1/temp2) elseif @realfront == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realfront == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realfront == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realfront == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realfront == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realfront == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realfront == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realfront == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realfront == 98 tempx = exp(2*temp2) elseif @realfront == 99 tempx = exp(-2*temp2) elseif @realfront == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realfront == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realfront == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realfront == 104 tempx = sin(temp2) * sinh(temp2) elseif @realfront == 105 tempx = sin(temp2) * cosh(temp2) elseif @realfront == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 107 tempx = sin(temp2)*exp(temp2) elseif @realfront == 108 tempx = cos(temp2)*exp(temp2) elseif @realfront == 109 tempx = sinh(temp2)*exp(temp2) elseif @realfront == 110 tempx = cosh(temp2)*exp(temp2) elseif @realfront == 111 tempx = sin(temp2)*log(temp2) elseif @realfront == 112 tempx = cos(temp2)*log(temp2) elseif @realfront == 113 tempx = sinh(temp2)*log(temp2) else ; @realfront == 114 tempx = cosh(temp2)*log(temp2) endif ; realfront if @rfperturb tempx = @rfblend * tempx + rfbcomp * real(#z) endif ; @rfperturb temp2 = @ifscale * imag(#z) if ( @imagfront == 0 ) tempy = temp2 elseif ( @imagfront == 1 ) tempy = 1/temp2 elseif ( @imagfront == 2 ) tempy = temp2 * temp2 elseif ( @imagfront == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagfront == 4 ) tempy = log(temp2) elseif ( @imagfront == 5 ) tempy = exp( temp2) elseif ( @imagfront == 6 ) tempy = temp2^temp2 elseif ( @imagfront == 7 ) tempy = sin( temp2 ) elseif ( @imagfront == 8 ) tempy = cos( temp2 ) elseif ( @imagfront == 9 ) tempy = tan( temp2 ) elseif ( @imagfront == 10 ) tempy = asin( temp2 ) elseif ( @imagfront == 11 ) tempy = acos( temp2 ) elseif ( @imagfront == 12 ) tempy = atan( temp2 ) elseif ( @imagfront == 13 ) tempy = sinh( temp2 ) elseif ( @imagfront == 14 ) tempy = cosh( temp2 ) elseif ( @imagfront == 15 ) tempy = tanh( temp2 ) elseif ( @imagfront == 16 ) tempy = asinh( temp2 ) elseif ( @imagfront == 17 ) tempy = acosh( temp2 ) elseif ( @imagfront == 18 ) tempy = atanh( temp2 ) elseif ( @imagfront == 19 ) tempy = log( 1/temp2 ) elseif ( @imagfront == 20 ) tempy = log( log( temp2 )) elseif ( @imagfront == 21 ) tempy = exp( -temp2 ) elseif ( @imagfront == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagfront == 23 ) tempy = temp2^(-temp2) elseif ( @imagfront == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 27 ) tempy = cotan( temp2 ) elseif ( @imagfront == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagfront == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagfront == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagfront == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagfront == 35 ) tempy = log(-temp2) elseif ( @imagfront == 36 ) tempy = 1/log( temp2 ) elseif ( @imagfront == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagfront == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagfront == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagfront == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagfront == 41 ) tempy = sin( temp2^2 ) elseif ( @imagfront == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagfront == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagfront == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagfront == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagfront == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagfront == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagfront == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagfront == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagfront == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagfront == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagfront == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagfront == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagfront == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagfront == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagfront == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagfront == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagfront == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagfront == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagfront == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagfront == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagfront == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagfront == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagfront == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagfront == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagfront == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagfront == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagfront == 68 ) tempy = cotanh( temp2 ) elseif ( @imagfront == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagfront == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagfront == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagfront == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagfront == 73 ) tempy = asinh( 1/temp2 ) elseif @imagfront == 74 tempy = temp2^@ifpower elseif @imagfront == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagfront == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagfront == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagfront == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagfront == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagfront == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagfront == 81 tempy = sinh(1/temp2) elseif @imagfront == 82 tempy = cosh(1/temp2) elseif @imagfront == 83 tempy = tanh(1/temp2) elseif @imagfront == 84 tempy = cotanh(1/temp2) elseif @imagfront == 85 tempy = 1/cosh(1/temp2) elseif @imagfront == 86 tempy = 1/sinh(1/temp2) elseif @imagfront == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagfront == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagfront == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagfront == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagfront == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagfront == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagfront == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagfront == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagfront == 98 tempy = exp(2*temp2) elseif @imagfront == 99 tempy = exp(-2*temp2) elseif @imagfront == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagfront == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagfront == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagfront == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagfront == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagfront == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 107 tempy = sin(temp2)*exp(temp2) elseif @imagfront == 108 tempy = cos(temp2)*exp(temp2) elseif @imagfront == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagfront == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagfront == 111 tempy = sin(temp2)*log(temp2) elseif @imagfront == 112 tempy = cos(temp2)*log(temp2) elseif @imagfront == 113 tempy = sinh(temp2)*log(temp2) else ; @imagfront == 114 tempy = cosh(temp2)*log(temp2) endif ; imagfront if @ifperturb tempy = @ifblend * tempy + ifbcomp * imag(#z) endif ; @ifperturb zold = tempx + flip(tempy) ; Initialize z, if desired zold = @ziscale * zold if ( @initialization == 0 ) zinput = zold elseif ( @initialization == 1 ) zinput = 1/zold elseif ( @initialization == 2 ) zinput = zold * zold elseif ( @initialization == 3 ) zinput = 1 / ( zold * zold ) elseif ( @initialization == 4 ) zinput = log(zold) elseif ( @initialization == 5 ) zinput = exp( zold) elseif ( @initialization == 6 ) zinput = zold^zold elseif ( @initialization == 7 ) zinput = sin( zold ) elseif ( @initialization == 8 ) zinput = cos( zold ) elseif ( @initialization == 9 ) zinput = tan( zold ) elseif ( @initialization == 10 ) zinput = asin( zold ) elseif ( @initialization == 11 ) zinput = acos( zold ) elseif ( @initialization == 12 ) zinput = atan( zold ) elseif ( @initialization == 13 ) zinput = sinh( zold ) elseif ( @initialization == 14 ) zinput = cosh( zold ) elseif ( @initialization == 15 ) zinput = tanh( zold ) elseif ( @initialization == 16 ) zinput = asinh( zold ) elseif ( @initialization == 17 ) zinput = acosh( zold ) elseif ( @initialization == 18 ) zinput = atanh( zold ) elseif ( @initialization == 19 ) zinput = log( 1/zold ) elseif ( @initialization == 20 ) zinput = log( log( zold )) elseif ( @initialization == 21 ) zinput = exp( -zold ) elseif ( @initialization == 22 ) zinput = exp( 1/zold ) elseif ( @initialization == 23 ) zinput = zold^(-zold) elseif ( @initialization == 24 ) zinput = sin( zold ) zinput = zinput * zinput elseif ( @initialization == 25 ) zinput = cos( zold ) zinput = zinput * zinput elseif ( @initialization == 26 ) zinput = tan( zold ) zinput = zinput * zinput elseif ( @initialization == 27 ) zinput = cotan( zold ) elseif ( @initialization == 28 ) zinput = 1/cos( zold ) elseif ( @initialization == 29 ) zinput = 1/sin( zold ) elseif ( @initialization == 30 ) zinput = cotan( zold ) zinput = zinput * zinput elseif ( @initialization == 31 ) zinput = 1/cos( zold ) zinput = zinput * zinput elseif ( @initialization == 32 ) zinput = 1/sin( zold ) zinput = zinput * zinput elseif ( @initialization == 33 ) zinput = zold^(zold) zinput = zold^zinput elseif ( @initialization == 34 ) zinput = zold^(zold) zinput = 1/( zold^zinput ) elseif ( @initialization == 35 ) zinput = log(-zold) elseif ( @initialization == 36 ) zinput = 1/log( zold ) elseif ( @initialization == 37 ) zinput = zold * log( zold ) elseif ( @initialization == 38 ) zinput = sin( zold ) / zold elseif ( @initialization == 39 ) zinput = cos( zold ) / zold elseif ( @initialization == 40 ) zinput = sin( zold ) * cos( zold ) elseif ( @initialization == 41 ) zinput = sin( zold^2 ) elseif ( @initialization == 42 ) zinput = exp( -1/zold ) elseif ( @initialization == 43 ) zinput = zold * exp( zold ) elseif ( @initialization == 44 ) zinput = zold * exp( -zold ) elseif ( @initialization == 45 ) zinput = zold * exp( 1/zold ) elseif ( @initialization == 46 ) zinput = zold * exp( -1/zold ) elseif ( @initialization == 47 ) zinput = zold * zold * zold elseif ( @initialization == 48 ) zinput = 1 / ( zold * zold * zold ) elseif ( @initialization == 49 ) zinput = atan( 1 / zold ) elseif ( @initialization == 50 ) zinput = acos( 1 / zold ) elseif ( @initialization == 51 ) zinput = asin( 1 / zold ) elseif ( @initialization == 52 ) zinput = tan( zold ) / zold elseif ( @initialization == 53 ) zinput = cotan( zold ) / zold elseif ( @initialization == 54 ) zinput = 1 / ( zold * cos( zold )) elseif ( @initialization == 55 ) zinput = 1 / ( zold * sin( zold )) elseif ( @initialization == 56 ) zinput = zold * sin( zold ) elseif ( @initialization == 57 ) zinput = zold * cos( zold ) elseif ( @initialization == 58 ) zinput = zold * tan( zold ) elseif ( @initialization == 59 ) zinput = zold * cotan( zold ) elseif ( @initialization == 60 ) zinput = zold/cos( zold ) elseif ( @initialization == 61 ) zinput = zold/sin( zold ) elseif ( @initialization == 62 ) zinput = sin( 1/zold ) elseif ( @initialization == 63 ) zinput = cos( 1/zold ) elseif ( @initialization == 64 ) zinput = tan( 1/zold ) elseif ( @initialization == 65 ) zinput = cotan( 1/zold ) elseif ( @initialization == 66 ) zinput = 1/cos( 1/zold ) elseif ( @initialization == 67 ) zinput = 1/sin( 1/zold ) elseif ( @initialization == 68 ) zinput = cotanh( zold ) elseif ( @initialization == 69 ) zinput = 1/cosh( zold ) elseif ( @initialization == 70 ) zinput = 1/sinh( zold ) elseif ( @initialization == 71 ) zinput = atanh( 1/zold ) elseif ( @initialization == 72 ) zinput = acosh( 1/zold ) elseif ( @initialization == 73 ) zinput = asinh( 1/zold ) elseif @initialization == 74 zinput = zold^@zpower elseif @initialization == 75 zinput = sinh(zold) zinput = zinput * zinput elseif @initialization == 76 zinput = cosh( zold ) zinput = zinput * zinput elseif @initialization == 77 zinput = tanh(zold) zinput = zinput * zinput elseif @initialization == 78 zinput = cotanh( zold ) zinput = zinput * zinput elseif @initialization == 79 zinput = 1/cosh(zold) zinput = zinput * zinput elseif @initialization == 80 zinput = 1 / sinh( zold ) zinput = zinput * zinput elseif @initialization == 81 zinput = sinh(1/zold) elseif @initialization == 82 zinput = cosh(1/zold) elseif @initialization == 83 zinput = tanh(1/zold) elseif @initialization == 84 zinput = cotanh(1/zold) elseif @initialization == 85 zinput = 1/cosh(1/zold) elseif @initialization == 86 zinput = 1/sinh(1/zold) elseif @initialization == 87 zinput = sin( zold ) * tan(zold) elseif @initialization == 88 zinput = sinh(zold) * tanh(zold) elseif @initialization == 89 zinput = sinh(zold) * cosh(zold) elseif @initialization == 90 zinput = sinh(zold), zscratch = cosh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 91 zinput = sin(zold), zscratch = cos(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 92 zinput = 1/zold zinput = sin(zinput)*cos(zinput) elseif @initialization == 93 zinput = sin( 1/zold ) zinput = zinput*zinput elseif @initialization == 94 zinput = sin(zold) * cos(1/zold) elseif @initialization == 95 zinput = sin(zold) * sin(1/zold) elseif @initialization == 96 zinput = log(zold) zinput = zinput*zinput elseif @initialization == 97 zinput = sin(zold) * sin(2*zold) elseif @initialization == 98 zinput = exp(2*zold) elseif @initialization == 99 zinput = exp(-2*zold) elseif @initialization == 100 zinput = 1/zold zinput = sinh(zinput)*cosh(zinput) elseif @initialization == 101 zinput = sinh( 1/zold ) zinput = zinput*zinput elseif @initialization == 102 zinput = sinh(zold) * cosh(1/zold) elseif @initialization == 103 zinput = sinh(zold) * sinh(1/zold) elseif @initialization == 104 zinput = sin(zold) * sinh(zold) elseif @initialization == 105 zinput = sin(zold) * cosh(zold) elseif @initialization == 106 zinput = sin(zold), zscratch = sinh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 107 zinput = sin(zold)*exp(zold) elseif @initialization == 108 zinput = cos(zold)*exp(zold) elseif @initialization == 109 zinput = sinh(zold)*exp(zold) elseif @initialization == 110 zinput = cosh(zold)*exp(zold) elseif @initialization == 111 zinput = sin(zold)*log(zold) elseif @initialization == 112 zinput = cos(zold)*log(zold) elseif @initialization == 113 zinput = sinh(zold)*log(zold) else ; @initialization == 114 zinput = cosh(zold)*log(zold) endif ; initialization if @initperturb zinput = @initblend * zinput + initbcomp * zold endif ; @ifperturb if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication zinput = zinput * @operatee elseif @operator == 2 ; addition zinput = zinput + @operatee elseif @operator == 3 ; subtraction zinput = zinput - @operatee elseif @operator == 4 ; division zinput = zinput / @operatee elseif @operator == 5 ; exponentiation zinput = zinput ^ @operatee elseif @operator == 6 ; subtraction2 zinput = @operatee - zinput elseif @operator == 7 ; division2 zinput = @operatee / zinput elseif @operator == 8 ; exponential2 zinput = @operatee ^ zinput elseif @operator == 9 ; logarithm zinput = log(zinput) / log(@operatee) elseif @operator == 10 ; logarithm2 zinput = log(@operatee) / log(zinput) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; Find coordinates and angle of point on semicubical parabola closest to #z (zinput) ; First, center z on the parabola center ztemp = zinput - center ; Compute rotated #z ztemp = ztemp * exp( flip( -rotation)) if @history if @histype == 0 zold2 = ztemp - zold2, ztemp = zold2 elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold2, zold2 = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold2, zold2 = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp ; Now find angle of 'rotated' #z zangle = atan2( ztemp ) if ( @anglerestrict && ( zangle < 0 )) zangle = zangle + #pi ; 0 <= zangle <= pi --- semicubical parab undefined for angles > pi elseif ( zangle < 0 ) zangle = anglelimit endif ; anglerestrict ; Find point on semicubical parabola --- origin-#z radial vector tempzangle = zangle if ( (abs( #pi - tempzangle ) < anglelimit ) || ( tempzangle < anglelimit )) ; prevent division by zero tempzangle = anglelimit endif ; abs if @sprangle tempzangle = tempzangle*@sprangfactor endif ; @sprangle ; Actual point on parabola, distance to z tempx = cos( tempzangle ), tempy = sin( tempzangle ) tempc = scale * tempx * tempx / ( tempy * tempy * tempy ) if @bugfix tempc = tempc * exp( flip( tempzangle)) endif ; bugfix if !@polar tempc = real(ztemp) + flip( cabs(tempc)) endif ; @polar zold = tempc ; Now transmute the trapped point of the trapping curve if desired tempc = @tiscale * tempc if @transmogrify != 0 if ( @transmogrify == 1 ) tempc = 1/tempc elseif ( @transmogrify == 2 ) tempc = tempc * tempc elseif ( @transmogrify == 3 ) tempc = 1 / ( tempc * tempc ) elseif ( @transmogrify == 4 ) tempc = log(tempc) elseif ( @transmogrify == 5 ) tempc = exp( tempc) elseif ( @transmogrify == 6 ) tempc = tempc^tempc elseif ( @transmogrify == 7 ) tempc = sin( tempc ) elseif ( @transmogrify == 8 ) tempc = cos( tempc ) elseif ( @transmogrify == 9 ) tempc = tan( tempc ) elseif ( @transmogrify == 10 ) tempc = asin( tempc ) elseif ( @transmogrify == 11 ) tempc = acos( tempc ) elseif ( @transmogrify == 12 ) tempc = atan( tempc ) elseif ( @transmogrify == 13 ) tempc = sinh( tempc ) elseif ( @transmogrify == 14 ) tempc = cosh( tempc ) elseif ( @transmogrify == 15 ) tempc = tanh( tempc ) elseif ( @transmogrify == 16 ) tempc = asinh( tempc ) elseif ( @transmogrify == 17 ) tempc = acosh( tempc ) elseif ( @transmogrify == 18 ) tempc = atanh( tempc ) elseif ( @transmogrify == 19 ) tempc = log( 1/tempc ) elseif ( @transmogrify == 20 ) tempc = log( log( tempc )) elseif ( @transmogrify == 21 ) tempc = exp( -tempc ) elseif ( @transmogrify == 22 ) tempc = exp( 1/tempc ) elseif ( @transmogrify == 23 ) tempc = tempc^(-tempc) elseif ( @transmogrify == 24 ) tempc = sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 25 ) tempc = cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 26 ) tempc = tan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 27 ) tempc = cotan( tempc ) elseif ( @transmogrify == 28 ) tempc = 1/cos( tempc ) elseif ( @transmogrify == 29 ) tempc = 1/sin( tempc ) elseif ( @transmogrify == 30 ) tempc = cotan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 31 ) tempc = 1/cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 32 ) tempc = 1/sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 33 ) tempc = tempc^(tempc) tempc = tempc^tempc elseif ( @transmogrify == 34 ) tempc = tempc^(tempc) tempc = 1/( tempc^tempc ) elseif ( @transmogrify == 35 ) tempc = log(-tempc) elseif ( @transmogrify == 36 ) tempc = 1/log( tempc ) elseif ( @transmogrify == 37 ) tempc = tempc * log( tempc ) elseif ( @transmogrify == 38 ) tempc = sin( tempc ) / tempc elseif ( @transmogrify == 39 ) tempc = cos( tempc ) / tempc elseif ( @transmogrify == 40 ) tempc = sin( tempc ) * cos( tempc ) elseif ( @transmogrify == 41 ) tempc = sin( tempc^2 ) elseif ( @transmogrify == 42 ) tempc = exp( -1/tempc ) elseif ( @transmogrify == 43 ) tempc = tempc * exp( tempc ) elseif ( @transmogrify == 44 ) tempc = tempc * exp( -tempc ) elseif ( @transmogrify == 45 ) tempc = tempc * exp( 1/tempc ) elseif ( @transmogrify == 46 ) tempc = tempc * exp( -1/tempc ) elseif ( @transmogrify == 47 ) tempc = tempc * tempc * tempc elseif ( @transmogrify == 48 ) tempc = 1 / ( tempc * tempc * tempc ) elseif ( @transmogrify == 49 ) tempc = atan( 1 / tempc ) elseif ( @transmogrify == 50 ) tempc = acos( 1 / tempc ) elseif ( @transmogrify == 51 ) tempc = asin( 1 / tempc ) elseif ( @transmogrify == 52 ) tempc = tan( tempc ) / tempc elseif ( @transmogrify == 53 ) tempc = cotan( tempc ) / tempc elseif ( @transmogrify == 54 ) tempc = 1 / ( tempc * cos( tempc )) elseif ( @transmogrify == 55 ) tempc = 1 / ( tempc * sin( tempc )) elseif ( @transmogrify == 56 ) tempc = tempc * sin( tempc ) elseif ( @transmogrify == 57 ) tempc = tempc * cos( tempc ) elseif ( @transmogrify == 58 ) tempc = tempc * tan( tempc ) elseif ( @transmogrify == 59 ) tempc = tempc * cotan( tempc ) elseif ( @transmogrify == 60 ) tempc = tempc/cos( tempc ) elseif ( @transmogrify == 61 ) tempc = tempc/sin( tempc ) elseif ( @transmogrify == 62 ) tempc = sin( 1/tempc ) elseif ( @transmogrify == 63 ) tempc = cos( 1/tempc ) elseif ( @transmogrify == 64 ) tempc = tan( 1/tempc ) elseif ( @transmogrify == 65 ) tempc = cotan( 1/tempc ) elseif ( @transmogrify == 66 ) tempc = 1/cos( 1/tempc ) elseif ( @transmogrify == 67 ) tempc = 1/sin( 1/tempc ) elseif ( @transmogrify == 68 ) tempc = cotanh( tempc ) elseif ( @transmogrify == 69 ) tempc = 1/cosh( tempc ) elseif ( @transmogrify == 70 ) tempc = 1/sinh( tempc ) elseif ( @transmogrify == 71 ) tempc = atanh( 1/tempc ) elseif ( @transmogrify == 72 ) tempc = acosh( 1/tempc ) elseif ( @transmogrify == 73 ) tempc = asinh( 1/tempc ) elseif @transmogrify == 74 tempc = tempc^@tpower elseif @transmogrify == 75 tempc = sinh(tempc) tempc = tempc * tempc elseif @transmogrify == 76 tempc = cosh( tempc ) tempc = tempc * tempc elseif @transmogrify == 77 tempc = tanh(tempc) tempc = tempc * tempc elseif @transmogrify == 78 tempc = cotanh( tempc ) tempc = tempc * tempc elseif @transmogrify == 79 tempc = 1/cosh(tempc) tempc = tempc * tempc elseif @transmogrify == 80 tempc = 1 / sinh( tempc ) tempc = tempc * tempc elseif @transmogrify == 81 tempc = sinh(1/tempc) elseif @transmogrify == 82 tempc = cosh(1/tempc) elseif @transmogrify == 83 tempc = tanh(1/tempc) elseif @transmogrify == 84 tempc = cotanh(1/tempc) elseif @transmogrify == 85 tempc = 1/cosh(1/tempc) elseif @transmogrify == 86 tempc = 1/sinh(1/tempc) elseif @transmogrify == 87 tempc = sin( tempc ) * tan(tempc) elseif @transmogrify == 88 tempc = sinh(tempc) * tanh(tempc) elseif @transmogrify == 89 tempc = sinh(tempc) * cosh(tempc) elseif @transmogrify == 90 zscratch = cosh(tempc) tempc = sinh(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 91 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 92 tempc = 1/tempc tempc = sin(tempc)*cos(tempc) elseif @transmogrify == 93 tempc = sin( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 94 tempc = sin(tempc) * cos(1/tempc) elseif @transmogrify == 95 tempc = sin(tempc) * sin(1/tempc) elseif @transmogrify == 96 tempc = log(tempc) tempc = tempc*tempc elseif @transmogrify == 97 tempc = sin(tempc) * sin(2*tempc) elseif @transmogrify == 98 tempc = exp(2*tempc) elseif @transmogrify == 99 tempc = exp(-2*tempc) elseif @transmogrify == 100 tempc = 1/tempc tempc = sinh(tempc)*cosh(tempc) elseif @transmogrify == 101 tempc = sinh( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 102 tempc = sinh(tempc) * cosh(1/tempc) elseif @transmogrify == 103 tempc = sinh(tempc) * sinh(1/tempc) elseif @transmogrify == 104 tempc = sin(tempc) * sinh(tempc) elseif @transmogrify == 105 tempc = sin(tempc) * cosh(tempc) elseif @transmogrify == 106 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 107 tempc = sin(tempc)*exp(tempc) elseif @transmogrify == 108 tempc = cos(tempc)*exp(tempc) elseif @transmogrify == 109 tempc = sinh(tempc)*exp(tempc) elseif @transmogrify == 110 tempc = cosh(tempc)*exp(tempc) elseif @transmogrify == 111 tempc = sin(tempc)*log(tempc) elseif @transmogrify == 112 tempc = cos(tempc)*log(tempc) elseif @transmogrify == 113 tempc = sinh(tempc)*log(tempc) else ; @transmogrify == 114 tempc = cosh(tempc)*log(tempc) endif ; transmogrify2 endif ; transmogrify1 if @trapperturb tempc = @trapblend * tempc + trapbcomp * zold endif ; @trapperturb ; Initialize back end real, back end imag, if desired temp2 = @rbscale * real(tempc) if ( @realback == 0 ) tempx = temp2 elseif ( @realback == 1 ) tempx = 1/temp2 elseif ( @realback == 2 ) tempx = temp2 * temp2 elseif ( @realback == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realback == 4 ) tempx = log(temp2) elseif ( @realback == 5 ) tempx = exp( temp2) elseif ( @realback == 6 ) tempx = temp2^temp2 elseif ( @realback == 7 ) tempx = sin( temp2 ) elseif ( @realback == 8 ) tempx = cos( temp2 ) elseif ( @realback == 9 ) tempx = tan( temp2 ) elseif ( @realback == 10 ) tempx = asin( temp2 ) elseif ( @realback == 11 ) tempx = acos( temp2 ) elseif ( @realback == 12 ) tempx = atan( temp2 ) elseif ( @realback == 13 ) tempx = sinh( temp2 ) elseif ( @realback == 14 ) tempx = cosh( temp2 ) elseif ( @realback == 15 ) tempx = tanh( temp2 ) elseif ( @realback == 16 ) tempx = asinh( temp2 ) elseif ( @realback == 17 ) tempx = acosh( temp2 ) elseif ( @realback == 18 ) tempx = atanh( temp2 ) elseif ( @realback == 19 ) tempx = log( 1/temp2 ) elseif ( @realback == 20 ) tempx = log( log( temp2 )) elseif ( @realback == 21 ) tempx = exp( -temp2 ) elseif ( @realback == 22 ) tempx = exp( 1/temp2 ) elseif ( @realback == 23 ) tempx = temp2^(-temp2) elseif ( @realback == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realback == 27 ) tempx = cotan( temp2 ) elseif ( @realback == 28 ) tempx = 1/cos( temp2 ) elseif ( @realback == 29 ) tempx = 1/sin( temp2 ) elseif ( @realback == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realback == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realback == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realback == 35 ) tempx = log(-temp2) elseif ( @realback == 36 ) tempx = 1/log( temp2 ) elseif ( @realback == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realback == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realback == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realback == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realback == 41 ) tempx = sin( temp2^2 ) elseif ( @realback == 42 ) tempx = exp( -1/temp2 ) elseif ( @realback == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realback == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realback == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realback == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realback == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realback == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realback == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realback == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realback == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realback == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realback == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realback == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realback == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realback == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realback == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realback == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realback == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realback == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realback == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realback == 62 ) tempx = sin( 1/temp2 ) elseif ( @realback == 63 ) tempx = cos( 1/temp2 ) elseif ( @realback == 64 ) tempx = tan( 1/temp2 ) elseif ( @realback == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realback == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realback == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realback == 68 ) tempx = cotanh( temp2 ) elseif ( @realback == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realback == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realback == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realback == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realback == 73 ) tempx = asinh( 1/temp2 ) elseif @realback == 74 tempx = temp2^@rbpower elseif @realback == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realback == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realback == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realback == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realback == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realback == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realback == 81 tempx = sinh(1/temp2) elseif @realback == 82 tempx = cosh(1/temp2) elseif @realback == 83 tempx = tanh(1/temp2) elseif @realback == 84 tempx = cotanh(1/temp2) elseif @realback == 85 tempx = 1/cosh(1/temp2) elseif @realback == 86 tempx = 1/sinh(1/temp2) elseif @realback == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realback == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realback == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realback == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realback == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realback == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realback == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realback == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realback == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realback == 98 tempx = exp(2*temp2) elseif @realback == 99 tempx = exp(-2*temp2) elseif @realback == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realback == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realback == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realback == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realback == 104 tempx = sin(temp2) * sinh(temp2) elseif @realback == 105 tempx = sin(temp2) * cosh(temp2) elseif @realback == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 107 tempx = sin(temp2)*exp(temp2) elseif @realback == 108 tempx = cos(temp2)*exp(temp2) elseif @realback == 109 tempx = sinh(temp2)*exp(temp2) elseif @realback == 110 tempx = cosh(temp2)*exp(temp2) elseif @realback == 111 tempx = sin(temp2)*log(temp2) elseif @realback == 112 tempx = cos(temp2)*log(temp2) elseif @realback == 113 tempx = sinh(temp2)*log(temp2) else ; @realback == 114 tempx = cosh(temp2)*log(temp2) endif ; realback if @rbperturb tempx = @rbblend * tempx + rbbcomp * real(tempc) endif ; @rbperturb temp2 = @ibscale * imag(tempc) if ( @imagback == 0 ) tempy = temp2 elseif ( @imagback == 1 ) tempy = 1/temp2 elseif ( @imagback == 2 ) tempy = temp2 * temp2 elseif ( @imagback == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagback == 4 ) tempy = log(temp2) elseif ( @imagback == 5 ) tempy = exp( temp2) elseif ( @imagback == 6 ) tempy = temp2^temp2 elseif ( @imagback == 7 ) tempy = sin( temp2 ) elseif ( @imagback == 8 ) tempy = cos( temp2 ) elseif ( @imagback == 9 ) tempy = tan( temp2 ) elseif ( @imagback == 10 ) tempy = asin( temp2 ) elseif ( @imagback == 11 ) tempy = acos( temp2 ) elseif ( @imagback == 12 ) tempy = atan( temp2 ) elseif ( @imagback == 13 ) tempy = sinh( temp2 ) elseif ( @imagback == 14 ) tempy = cosh( temp2 ) elseif ( @imagback == 15 ) tempy = tanh( temp2 ) elseif ( @imagback == 16 ) tempy = asinh( temp2 ) elseif ( @imagback == 17 ) tempy = acosh( temp2 ) elseif ( @imagback == 18 ) tempy = atanh( temp2 ) elseif ( @imagback == 19 ) tempy = log( 1/temp2 ) elseif ( @imagback == 20 ) tempy = log( log( temp2 )) elseif ( @imagback == 21 ) tempy = exp( -temp2 ) elseif ( @imagback == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagback == 23 ) tempy = temp2^(-temp2) elseif ( @imagback == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 27 ) tempy = cotan( temp2 ) elseif ( @imagback == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagback == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagback == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagback == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagback == 35 ) tempy = log(-temp2) elseif ( @imagback == 36 ) tempy = 1/log( temp2 ) elseif ( @imagback == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagback == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagback == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagback == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagback == 41 ) tempy = sin( temp2^2 ) elseif ( @imagback == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagback == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagback == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagback == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagback == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagback == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagback == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagback == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagback == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagback == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagback == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagback == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagback == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagback == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagback == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagback == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagback == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagback == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagback == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagback == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagback == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagback == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagback == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagback == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagback == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagback == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagback == 68 ) tempy = cotanh( temp2 ) elseif ( @imagback == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagback == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagback == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagback == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagback == 73 ) tempy = asinh( 1/temp2 ) elseif @imagback == 74 tempy = temp2^@ibpower elseif @imagback == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagback == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagback == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagback == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagback == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagback == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagback == 81 tempy = sinh(1/temp2) elseif @imagback == 82 tempy = cosh(1/temp2) elseif @imagback == 83 tempy = tanh(1/temp2) elseif @imagback == 84 tempy = cotanh(1/temp2) elseif @imagback == 85 tempy = 1/cosh(1/temp2) elseif @imagback == 86 tempy = 1/sinh(1/temp2) elseif @imagback == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagback == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagback == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagback == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagback == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagback == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagback == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagback == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagback == 98 tempy = exp(2*temp2) elseif @imagback == 99 tempy = exp(-2*temp2) elseif @imagback == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagback == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagback == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagback == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagback == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagback == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 107 tempy = sin(temp2)*exp(temp2) elseif @imagback == 108 tempy = cos(temp2)*exp(temp2) elseif @imagback == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagback == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagback == 111 tempy = sin(temp2)*log(temp2) elseif @imagback == 112 tempy = cos(temp2)*log(temp2) elseif @imagback == 113 tempy = sinh(temp2)*log(temp2) else ; @imagback == 114 tempy = cosh(temp2)*log(temp2) endif ; imagback if @ibperturb tempy = @ibblend * tempy + ibbcomp * imag(tempc) endif ; @ibperturb tempc = tempx + flip(tempy) cangle = atan2( tempc ) if ( cangle < 0 ) cangle = cangle + twopi endif ; cangle if @twavy if @twavmode == 0 ; radial mode temp = cabs( tempc ) temp = temp + @twavamp * temp * sin( @twavfreq * cangle ) ; vary radius tempc = temp * exp( flip( cangle )) ; compute new tempc else ; tangential mode tempx = cabs( tempc ) temp = cangle + @twavamp * cangle * sin( @twavfreq * tempx ) ; vary azimuth tempc = tempx * exp( flip( temp )) ; compute new tempc cangle = temp endif ; @twavmode endif ; @twavy if @pointmode ; compare subsequent values to first trap point on trap graph if itrapped != 0 ; some point must have already been trapped tempc = ctrapped endif; itrapped endif ; @pointmode ; Save value for later turbulence tlast = tempc if @swapflavor zscratch = ztemp else zscratch = #z endif ; swapflavor if ( @trapmode == 0 ) ; distance test = cabs( ztemp - tempc ) elseif ( @trapmode == 1 ) ; angle test = zangle elseif ( @trapmode == 2 ) ; trap angle test = cangle elseif ( @trapmode == 3 ) ; difference angle test = abs( zangle - cangle ) elseif ( @trapmode == 4 ) ; magnitude test = cabs( ztemp ) elseif ( @trapmode == 5 ) ; trap magnitude test = cabs( tempc ) elseif ( @trapmode == 6 ) ; real test = abs( real( ztemp )) elseif ( @trapmode == 7 ) ; imaginary test = abs( imag( ztemp )) elseif ( @trapmode == 8 ) ; trap real test = abs( real( tempc )) elseif ( @trapmode == 9 ) ; trap imaginary test = abs( imag( tempc )) elseif ( @trapmode == 10 ) ; sum test = cabs( zscratch + tempc ) elseif ( @trapmode == 11 ) ; difference test = cabs( zscratch - tempc) elseif ( @trapmode == 12 ) ; product test = cabs( zscratch * tempc ) elseif ( @trapmode == 13 ) ; quotient 1 test = cabs( zscratch / tempc ) elseif ( @trapmode == 14 ) ; quotient 2 test = cabs( tempc / zscratch ) elseif ( @trapmode == 15 ) ; power 1 test = cabs( zscratch ^ tempc ) elseif ( @trapmode == 16 ) ; power 2 test = cabs( tempc ^ zscratch ) elseif ( @trapmode == 17 ) ; arithmetic mean test = cabs( (zscratch + tempc)/2 ) elseif ( @trapmode == 18 ) ; geometric mean test = cabs( sqrt( zscratch * tempc )) elseif ( @trapmode == 19 ) ; angle 2 test = atan2( zscratch - tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 20 ) ; angle 3 test = atan2( zscratch + tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 21 ) ; angle 4 test = atan2( zscratch * tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 22 ) ; angle 5 test = atan2( zscratch / tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 23 ) ; angle 6 test = atan2( tempc / zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 24 ) ; angle 7 test = atan2( zscratch ^ tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 25 ) ; angle 8 test = atan2( tempc ^ zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 26 ) ; real 2 test = abs( real( zscratch - tempc )) elseif ( @trapmode == 27 ) ; real 3 test = abs( real( zscratch + tempc )) elseif ( @trapmode == 28 ) ; real 4 test = abs( real( zscratch * tempc )) elseif ( @trapmode == 29 ) ; real 5 test = abs( real( zscratch / tempc )) elseif ( @trapmode == 30 ) ; real 6 test = abs( real( tempc / zscratch )) elseif ( @trapmode == 31 ) ; real 7 test = abs( real( zscratch ^ tempc )) elseif ( @trapmode == 32 ) ; real 8 test = abs( real( tempc ^ zscratch )) elseif ( @trapmode == 33 ) ; imag 2 test = abs( imag( zscratch - tempc )) elseif ( @trapmode == 34 ) ; imag 3 test = abs( imag( zscratch + tempc )) elseif ( @trapmode == 35 ) ; imag 4 test = abs( imag( zscratch * tempc )) elseif ( @trapmode == 36 ) ; imag 5 test = abs( imag( zscratch / tempc )) elseif ( @trapmode == 37 ) ; imag 6 test = abs( imag( tempc / zscratch )) elseif ( @trapmode == 38 ) ; imag 7 test = abs( imag( zscratch ^ tempc )) elseif ( @trapmode == 39 ) ; imag 8 test = abs( imag( tempc ^ zscratch )) endif ; trapmode if ( @whattotrap == 0 ) ; minimum if ( test < trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 1 ) ; maximum if ( test > trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 2 ) ; 2nd minimum if ( test < trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 3 ) ; 3rd minimum if ( test < trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 4 ) ; 4th minimum if ( test < trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 5 ) ; 2nd maximum if ( test > trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 6 ) ; 3rd maximum if ( test > trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 7 ) ; 4th maximum if ( test > trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 8 ) ; 1st to dip below threshold value if ( itrapped == 0 ) ; nothing trapped yet if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 9 ) ; last to dip below threshold --- just store them all if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 10 ) ; count dips below threshold --- store the last if ( test < thresh ) count = count + 1 if !@ringstyle trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE elseif test > innerradius trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 11 ) ; 2nd to dip below threshold value if ( test < thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 12 ) ; 1st to exceed threshold limit if ( itrapped == 0 ) ; nothing trapped yet if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 13 ) ; 2nd to exceed threshold limit if ( test > thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 14 ) ; last to exceed threshold --- just store them all if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif @whattotrap > 14 ; maximum/minimum combos; need to find & store both ; trapped2 will hold he max, trapped1 the min if test < trapped1 ; is it a new min? trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > trapped2 ; is it a new max? trapped2 = test, itrapped2 = iter, zatrapped2 = zangle, catrapped2 = cangle ztrapped2 = #z, zttrapped2 = ztemp, ctrapped2 = tempc, trapped = TRUE endif ; test endif ; whattotrap if ( @varymode == 0 ) ; feedback only on iterations where something was trapped vary = trapped elseif ( @varymode == 1 ) ; feedback when nothing was trapped vary = !trapped else ; feedback on each iteration, if enabled for a given parameter vary = TRUE endif ; varymode trapped = FALSE ; reset flag for next iteration if vary ; vary chosen parameter if set float value = 0.0 if @oldstyle value = cabs(ctrapped) sign = real(ctrapped)/abs(real(ctrapped)) else value = cabs(ztemp) sign = real(ztemp)/abs(real(ztemp)) endif ; oldstyle if @varyrotation rotation = rotation + rotationstep * rotation * value * sign endif ; varyrotation if @varyscale scale = scale + scalestep * scale * value * sign endif ; varyscale if @varythresh thresh = thresh + threshstep * thresh * value * sign if @ringstyle if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; ringstyle endif ; varythresh if @varyrwidth rwidth = rwidth + ringstep * rwidth * value * sign if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; varyrwidth if @varyspread spread = spread + spreadstep * spread * value * sign endif ; varyspread if @varycenter tempx = real(center) + centerstep * real(center) * value * sign tempy = imag(center) + centerstep * imag(center) * value * sign center = tempx + flip( tempy ) endif ; varycenter if @varyturb turbulamount = turbulamount + turbstep * turbulamount * value * sign endif ; varyturb endif ; vary endif ; iter final: if ( itrapped != 0 ) ; something has been trapped if (( @whattotrap == 2 ) || ( @whattotrap == 5 )) ; we need to swap some values ; so we will plot the right thing trapped1 = trapped2, itrapped = itrapped2, zatrapped = zatrapped2, catrapped = catrapped2 ztrapped = ztrapped2, zttrapped = zttrapped2, ctrapped = ctrapped2 elseif (( @whattotrap == 3 ) || ( @whattotrap == 6 )) trapped1 = trapped3, itrapped = itrapped3, zatrapped = zatrapped3, catrapped = catrapped3 ztrapped = ztrapped3, zttrapped = zttrapped3, ctrapped = ctrapped3 elseif (( @whattotrap == 4 ) || ( @whattotrap == 7 )) trapped1 = trapped4, itrapped = itrapped4, zatrapped = zatrapped4, catrapped = catrapped4 ztrapped = ztrapped4, zttrapped = zttrapped4, ctrapped = ctrapped4 elseif @whattotrap == 15 ; max-min trapped1 = trapped2-trapped1, itrapped = itrapped2-itrapped zatrapped = zatrapped2-zatrapped, catrapped = catrapped2-catrapped ztrapped = ztrapped2-ztrapped, zttrapped = zttrapped2-zttrapped ctrapped = ctrapped2-ctrapped elseif @whattotrap == 16 ; max+min trapped1 = trapped2+trapped1, itrapped = itrapped2+itrapped zatrapped = zatrapped2+zatrapped, catrapped = catrapped2+catrapped ztrapped = ztrapped2+ztrapped, zttrapped = zttrapped2+zttrapped ctrapped = ctrapped2+ctrapped elseif @whattotrap == 17 ; max*min trapped1 = trapped2*trapped1, itrapped = itrapped2*itrapped zatrapped = zatrapped2*zatrapped, catrapped = catrapped2*catrapped ztrapped = ztrapped2*ztrapped, zttrapped = zttrapped2*zttrapped ctrapped = ctrapped2*ctrapped elseif @whattotrap == 18 ; max/min trapped1 = trapped2/trapped1, itrapped = round(itrapped2/itrapped) zatrapped = zatrapped2/zatrapped, catrapped = catrapped2/catrapped ztrapped = ztrapped2/ztrapped, zttrapped = zttrapped2/zttrapped ctrapped = ctrapped2/ctrapped elseif @whattotrap == 19 ; max^min trapped1 = trapped2^trapped1, itrapped = round(itrapped2^itrapped) zatrapped = zatrapped2^zatrapped, catrapped = catrapped2^catrapped ztrapped = ztrapped2^ztrapped, zttrapped = zttrapped2^zttrapped ctrapped = ctrapped2^ctrapped elseif @whattotrap == 20 ; min-max trapped1 = trapped1-trapped2, itrapped = itrapped-itrapped2 zatrapped = zatrapped-zatrapped2, catrapped = catrapped-catrapped2 ztrapped = ztrapped-ztrapped2, zttrapped = zttrapped-zttrapped2 ctrapped = ctrapped-ctrapped2 elseif @whattotrap == 21 ; min/max trapped1 = trapped1/trapped2, itrapped = round(itrapped/itrapped2) zatrapped = zatrapped/zatrapped2, catrapped = catrapped/catrapped2 ztrapped = ztrapped/ztrapped2, zttrapped = zttrapped/zttrapped2 ctrapped = ctrapped/ctrapped2 elseif @whattotrap == 22 ; min^max trapped1 = trapped1^trapped2, itrapped = round(itrapped^itrapped2) zatrapped = zatrapped^zatrapped2, catrapped = catrapped^catrapped2 ztrapped = ztrapped^ztrapped2, zttrapped = zttrapped^zttrapped2 ctrapped = ctrapped^ctrapped2 elseif @whattotrap == 23 ; average: (max+min)/2 trapped1 = (trapped1+trapped2)/2, itrapped = trunc((itrapped+itrapped2)/2) zatrapped = (zatrapped+zatrapped2)/2, catrapped = (catrapped+catrapped2)/2 ztrapped = (ztrapped+ztrapped2)/2, zttrapped = (zttrapped+zttrapped2)/2 ctrapped = (ctrapped+ctrapped2)/2 endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; products ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; distance temp = cabs( zttrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask elseif ( @colorby == 1 ) ; iteration if @mask if itrapped < @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp elseif @revmask if itrapped > @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp else _color = 0.3 * spread * itrapped endif ; @mask elseif ( @colorby == 2 ) ; magnitude temp = cabs( ztrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp else _color = 0.25 * spread * temp endif ; @mask elseif ( @colorby == 3 ) ; test if @mask if trapped1 < @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 elseif @revmask if trapped1 > @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 else _color = spread * trapped1 endif ; @mask elseif ( @colorby == 4 ) ; trap magnitude temp = cabs(ctrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 5 ) ; angle temp = atan2( ztrapped ) if ( temp < 0 ) temp = temp + twopi endif ; temp if @mask if temp < @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp else _color = ( spread * temp ) / twopi endif ; @mask elseif ( @colorby == 6 ) ; trap angle if @mask if catrapped < @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped elseif @revmask if catrapped > @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped else _color = ( spread * catrapped ) / twopi endif ; @mask elseif ( @colorby == 7 ) ; modulated magnitude temp = cabs(zttrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 8 ) ; modulated angle if @mask if zatrapped < @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped elseif @revmask if zatrapped > @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped else _color = ( spread * zatrapped ) / twopi endif ; @mask elseif ( @colorby == 9 ) ; real temp = abs( real( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 10 ) ; trap real temp = abs( real( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 11 ) ; modulated real temp = abs( real( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 12 ) ; imaginary temp = abs( imag( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 13 ) ; trap imaginary temp = abs( imag( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 14 ) ; modulated imaginary temp = abs( imag( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 15 ) ; raw distance (distance to #z, not ztemp) temp = cabs( ztrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else if !@hideranges _color = ((_color + _coloradjust) + (itrapped % @ranges) ) / @ranges else temp = itrapped % @ranges if temp != @showrange #solid = TRUE else _color = ((_color + _coloradjust) + temp ) / @ranges endif ; temp endif ; hideranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else #solid = TRUE endif ; itrapped default: title = "SemicubicalParabola1 Trap" param whattotrap caption = "Trap What?" enum = "minimum" "maximum" "2nd minimum" "3rd minimum" "4th minimum" "2nd maximum" \ "3rd maximum" "4th maximum" "1st threshold" "last threshold" "threshold count" \ "2nd threshold" "1st limit" "2nd limit" "last limit" "max-min" "max+min" \ "max*min" "max/min" "max^min" "min-max" "min/max" "min^max" "min,max avg" default = 0 hint = "What type of value will be trapped?" endparam param threshold caption = "Threshold Value" default = 0.5 hint = "Upper bound (maximum value that will be trapped) if one of the \ 'Threshold' options is chosen for param 'Trap What'; \ also, lower bound (minimum trapped value) if 'Trap What' is set to \ a 'Limit' option. Increase value for limit traps" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param varythresh caption = "Vary Threshold?" default = FALSE hint = "If set, the value of the trap will modify the value of 'threshold' and 'limit' type traps \ each iteration; parameter 'ThreshFeedback' can be used to modulate the variation" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param threshstp caption = "ThreshFeedback" default = 1.0 hint = "If 'Vary Threshold' is set, this setting adjusts the amount of variation" visible = @varythresh endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Trap What' is set to a \ 'Threshold' or 'Limit' option, then 'Trap What' \ becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Trap What' is set to either a 'Threshold', \ or 'Limit' option, this parameter determines the width of the ring trap" visible = @ringstyle == TRUE endparam param varyrwidth caption = "Vary Ringwidth?" default = FALSE hint = "If set, the value of the trap will modify the ring width of 'threshold' \ and 'limit' ring-type traps each iteration; parameter 'RingFeedback' can be \ used to modulate the variation" visible = @ringstyle endparam param ringstp caption = "RingFeedback" default = 1.0 hint = "If 'Vary Ringwidth' is set, this setting adjusts the amount of variation" visible = @varyrwidth endparam param trapmode caption = "Trap Flavor" enum = "distance" "angle" "trap angle" "difference angle" "magnitude" "trap magnitude" \ "real" "imaginary" "trap real" "trap imaginary" "sum" "difference" "product" \ "quotient 1" "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "What quantity will be watched for possible trapping?" endparam param swapflavor caption = "New Flavor?" default = FALSE hint = "Try an alternately flavored trap test? Only affects flavor choices \ above 9 (sum, difference, etc)" visible = @trapmode > 9 endparam param pscale caption = "Scale" default = 0.25 hint = "This parameter determines the size of the semicubical parabola" endparam param varyscale caption = "Vary Scale?" default = FALSE hint = "If set, the value of the trap will modify the trap size each iteration; \ parameter 'ScaleFeedback' can be used to modulate the variation" endparam param scalestp caption = "ScaleFeedback" default = 1.0 hint = "If 'Vary Scale' is set, this setting adjusts the amount of variation" visible = @varyscale endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that parabola should be rotated from its default position" endparam param varyrotation caption = "Vary Rotation?" default = FALSE hint = "If set, the value of the trap will modify the trap rotation each iteration; \ parameter 'RotationFeedback' can be used to modulate the variation" endparam param rotationstp caption = "RotationFeedback" default = 1.0 hint = "If 'Vary Rotation' is set, this setting adjusts the amount of variation" visible = @varyrotation endparam param centr caption = "Center" default = (0,0) hint = "Enter coordinates of parabola 'center'" endparam param varycenter caption = "Vary Center?" default = FALSE hint = "If set, the value of the trap will modify the trap center each iteration; \ parameter 'CenterFeedback' can be used to modulate the variation" endparam param centerstp caption = "CenterFeedback" default = 1.0 hint = "If 'Vary Center' is set, this setting adjusts the amount of variation" visible = @varycenter endparam param sprangle caption = "Spread Angle?" default = FALSE hint = "If enabled, the angular range is spread out or compressed, \ depending on the value of param 'AngleSpread Factor'" endparam param sprangfactor caption = "AngleSpread Factor" default = 3.0 hint = "If param 'Spread Angle?' is enabled, this is the stretching or \ compression multiplier of atan(z). 1.0 corresponds to no spreading. \ Inactive if 'Spread Angle?' is not enabled" visible = @sprangle == TRUE endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to \ being fed to the trap" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" visible = @initialization == "z^power" endparam param ziscale caption = "Z Init Scale" default = 1.0 hint = "This param can be used to scale the overall iterate z \ before z initialization" endparam param initperturb caption = "Perturb Z Initialization?" default = FALSE hint = "If enabled, then 'Z Initialization' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Z Init Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @initialization != "z" endparam param initblend caption = "Z Init Blend" default = 0.1 hint = "If 'Perturb Z Initialization' is enabled, then this sets the fraction \ of 'Z Initialization' that is mixed in with the original #z. \ Inactive if 'Perturb Z Initialization' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @initperturb endparam param transmogrify caption = "Trap Transmute" enum = "t" "1/t" "t^2" "1/t^2" "log(t)" "e^t" "t^t" "sin(t)" "cos(t)" \ "tan(t)" "asin(t)" "acos(t)" "atan(t)" "sinh(t)" "cosh(t)" "tanh(t)" \ "asinh(t)" "acosh(t)" "atanh(t)" "log(1/t)" "log(log(t))" "e^-t" \ "e^(1/t)" "t^-t" "sin(t)^2" "cos(t)^2" "tan(t)^2" "cot(t)" "sec(t)" \ "csc(t)" "cot(t)^2" "sec(t)^2" "csc(t)^2" "t^t^t" "1/t^t^t" "log(-t)" \ "1/log(t)" "tlog(t)" "sin(t)/t" "cos(t)/t" "sin(t)*cos(t)" "sin(t^2)" \ "e^(-1/t)" "te^t" "te^-t" "te^(1/t)" "te^(-1/t)" "t^3" "1/t^3" \ "acot(t)" "asec(t)" "acsc(t)" "tan(t)/t" "cot(t)/t" "sec(t)/t" \ "csc(t)/t" "tsin(t)" "tcos(t)" "ttan(t)" "tcot(t)" "tsec(t)" "tcsc(t)" \ "sin(1/t)" "cos(1/t)" "tan(1/t)" "cot(1/t)" "sec(1/t)" "csc(1/t)" \ "cotanh(t)" "sech(t)" "cosech(t)" "acoth(t)" "asech(t)" "acosech(t)" "t^power" \ "sinh(t)^2" "cosh(t)^2" "tanh(t)^2" "cotanh(t)^2" \ "sech(t)^2" "cosech(t)^2" "sinh(1/t)" "cosh(1/t)" "tanh(1/t)" \ "cotanh(1/t)" "sech(1/t)" "cosech(1/t)" "sin(t)tan(t)" "sinh(t)tanh(t)" \ "sinh(t)cosh(t)" "sinh(t)^2*cosh(t)^2" "sin(t)^2*cos(t)^2" \ "sin(1/t)*cos(1/t)" "sin(1/t)^2" "sin(t)cos(1/t)" "sin(t)sin(1/t)" \ "log(t)^2" "sin(t)sin(2t)" "e^2t" "e^-2t" "sinh(1/t)cosh(1/t)" \ "sinh(1/t)^2" "sinh(t)cosh(1/t)" "sinh(t)sinh(1/t)" "sin(t)sinh(t)" \ "sin(t)cosh(t)" "sin(t)^2*sinh(t)^2" "sin(t)e^t" "cos(t)e^t" \ "sinh(t)e^t" "cosh(t)e^t" "sin(t)log(t)" "cos(t)log(t)" "sinh(t)log(t)" \ "cosh(t)log(t)" default = 0 hint = "The point, t, on the parabola potentially trapped by z can be transformed \ prior to testing; select 't' for no transmutation. \ Transmute does not work on the following trap flavors: \ 2 (angle), 5 (magnitude), 7 (real), and 8 (imag)" endparam param tpower caption = "Trap Power" default = (0,1) hint = "Trap point t exponent if param 'Trap Transmute' is set to 't^power'" visible = @transmogrify == "t^power" endparam param tiscale caption = "Trap Scale" default = 1.0 hint = "This param can be used to scale the overall trap point t \ before transmutation" endparam param trapperturb caption = "Perturb Trap Transmute?" default = FALSE hint = "If enabled, then 'Trap Transmute' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Trap Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @transmogrify != "t" endparam param trapblend caption = "Trap Blend" default = 0.1 hint = "If 'Perturb Trap Transmute' is enabled, then this sets the fraction \ of 'Trap Transmute' that is mixed in with the original trap point, t. \ Inactive if 'Perturb Trap Transmute' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @trapperturb endparam param realfront caption = "FrontEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the initial value of real(z) before input to \ the 'Z Initialization' function. For 'r^power' set param 'FrontEndReal \ Power'" endparam param rfpower caption = "FrontEndReal Power" default = 4.0 hint = "Real(z) exponent if param 'FrontEndReal Warp' is set to 'r^power'" visible = @realfront == "r^power" endparam param rfscale caption = "Real(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param rfperturb caption = "Perturb FrontEndReal?" default = FALSE hint = "If enabled, then 'FrontEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realfront != "r" endparam param rfblend caption = "FrontEndReal Blend" default = 0.1 hint = "If 'Perturb FrontEndReal' is enabled, then this sets the fraction \ of 'FrontEndReal Warp' that is mixed in with the original real(z). \ Inactive if 'Perturb FrontEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rfperturb endparam param imagfront caption = "FrontEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the initial value of imag(z) before input to \ the 'Z Initialization' function. For 'i^power' set param 'FrontEndImag \ Power'" endparam param ifpower caption = "FrontEndImag Power" default = 4.0 hint = "Imag(z) exponent if param 'FrontEndImag Warp' is set to 'i^power'" visible = @imagfront == "i^power" endparam param ifscale caption = "Imag(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param ifperturb caption = "Perturb FrontEndImag?" default = FALSE hint = "If enabled, then 'FrontEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagfront != "i" endparam param ifblend caption = "FrontEndImag Blend" default = 0.1 hint = "If 'Perturb FrontEndImag' is enabled, then this sets the fraction \ of 'FrontEndImag Warp' that is mixed in with the original imag(z). \ Inactive if 'Perturb FrontEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ifperturb endparam param realback caption = "BackEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the final value of real(trap) before testing for \ trapping by the 'Trap What?' function. For 'r^power' set param 'BackEndReal \ Power'" endparam param rbpower caption = "BackEndReal Power" default = 4.0 hint = "Real(trap) exponent if param 'BackEndReal Warp' is set to 'r^power'" visible = @realback == "r^power" endparam param rbscale caption = "Real(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param rbperturb caption = "Perturb BackEndReal?" default = FALSE hint = "If enabled, then 'BackEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realback != "r" endparam param rbblend caption = "BackEndReal Blend" default = 0.1 hint = "If 'Perturb BackEndReal' is enabled, then this sets the fraction \ of 'BackEndReal Warp' that is mixed in with the original real(trap). \ Inactive if 'Perturb BackEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rbperturb endparam param imagback caption = "BackEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the final value of imag(trap) before testing for \ trapping by the 'Trap What?' function. For 'i^power' set param 'BackEndImag \ Power'" endparam param ibpower caption = "BackEndImag Power" default = 4.0 hint = "Imag(trap) exponent if param 'BackEndImag Warp' is set to 'i^power'" visible = @imagback == "i^power" endparam param ibscale caption = "Imag(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param ibperturb caption = "Perturb BackEndImag?" default = FALSE hint = "If enabled, then 'BackEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagback != "i" endparam param ibblend caption = "BackEndImag Blend" default = 0.1 hint = "If 'Perturb BackEndImag' is enabled, then this sets the fraction \ of 'BackEndImag Warp' that is mixed in with the original imag(trap). \ Inactive if 'Perturb BackEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ibperturb endparam param @colorby caption = "Color By?" enum = "distance" "iteration" "magnitude" "test" "trap magnitude" "angle" \ "trap angle" "mod magnitude" "mod angle" "real" "trap real" "mod real"\ "imag" "trap imag" "mod imag" "raw distance" default = 0 hint = "Criterion for computing color index" endparam param @colorspread caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" visible = @varyspread endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param hideranges caption = "Mask Color Ranges?" default = FALSE hint = "If enabled, then param 'Show Which Range?' can be set to mask pixels \ other than those in the given range. Only valid if 'Color Ranges' > 1" visible = @ranges > 1 endparam param showrange caption = "Show Which Range?" default = 0 min = 0 hint = "If 'Mask Color Ranges?' is turned on, then pixels falling in this color \ range will be visible; others will be set to the solid color. Works best \ with param 'Trap What?' set to a threshold or limit option. 0 <= param < \ 'Color Ranges'" visible = @hideranges == TRUE endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" visible = @colorwarp == "c^power" endparam param anglerestrict caption = "Restrict Angle?" default = FALSE hint = "If enabled, atan(z) is restricted to the interval 0-pi symmetrically; otherwise, \ it is unrestricted" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param bugfix caption = "Fix Bug?" default = TRUE hint = "Oops! The bug looks pretty good, though, and is retained for compatibility" endparam param polar caption = "Polar Coordinates?" default = TRUE hint = "Alternative interpretation of trap value" endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" visible = @operator != "none" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" visible = (( @trapvariant != "normal" ) && ( @operator != "none" )) endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" visible = @history == TRUE endparam param twavy caption = "Enable T Waviness?" default = FALSE hint = "Adds waves to the trap function. If enabled, params 'Waviness Mode', \ 'Waviness Amplitude', & 'Waviness Frequency' may be adjusted to vary \ wave character" endparam param twavmode caption = "T Wave Mode" enum = "radial" "tangential" default = 0 hint = "If 'Enable T Waviness' is on, this param sets the type of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavamp caption = "T Wave Amplitude" default = 0.1 hint = "If 'Enable T Waviness' is on, this param sets the height of the waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavfreq caption = "T Wave Frequency" default = 10.0 hint = "If 'Enable T Waviness' is on, this param sets the density of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param pointmode caption = "Enable Point Mode?" default = FALSE hint = "If set, trapping occurs normally until the first #z has been \ trapped using the usual criteria; subsequently, trapping is \ relative to this first trap point, rather than to the entire curve" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds distortion (fBm) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" visible = @turb3 endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" visible = @turb3 endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" visible = @turb3 endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" visible = @turb3 endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" visible = @turb3 endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" visible = @turb3 endparam param varyturb caption = "Vary Turbulence?" default = FALSE hint = "If set, the value of the trap will modify the turbulence amount each \ iteration; parameter 'TurbulenceFeedback' can be used to modulate the variation" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param turbstp caption = "TurbulenceFeedback" default = 1.0 hint = "If 'Vary Turbulence' is set, this setting adjusts the amount of variation" visible = @varyturb endparam param mask caption = "Masking?" default = FALSE hint = "If enabled, trapped values below the 'Masking Threshold' parameter \ will be colored the solid color" visible = !@revmask endparam param revmask caption = "Reverse Masking?" default = FALSE hint = "If enabled, trapped values greater than the 'Masking Threshold' \ parameter will be colored the solid color; inactive if normal \ 'Masking' is also enabled" visible = !@mask endparam param maskthresh caption = "Masking Threshold" default = 0.1 hint = "This param is the value used for solid color masking if either \ 'Masking?' or 'Reverse Masking?' are enabled. Depending on how param \ 'Color By' is set, the value may need large adjustment (.001-10 may \ be useful)" visible = (@mask || @revmask) endparam param varymode caption = "Feedback Mode" enum = "trapped" "not trapped" "always" default = 2 hint = "Variation style; variation of individual parameters must still \ be enabled. 'trapped' -- feedback occurs only on iterations where some \ value was trapped; 'not trapped' -- varies on iterations when nothing \ trapped; 'always' -- feedback on every iteation" visible = (@varyturb || @varyscale || @varyrotation || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam param oldstyle caption = "OldStyle Feedback?" default = FALSE hint = "Retained for compatibility with original version of this formula; \ enable if you need to render an early image utilizing this formula, \ or for a variant algorithm that generally produces less feedback variation" visible = (@varyturb || @varyscale || @varyrotation || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam } jam-CircleTangents { ; jam 010902 init: if ( @centermode == 0 ) complex circlecenter = @circlecentr float radius = @rad else complex circlecenter = #center float radius = @rad/#magn endif ; centermode bool trapped = FALSE int iter = 0, int count = 1 float twopi = 2.0 * #pi, float halfpi = #pi / 2.0 complex zinput = (0,0) ; translated #z float zmag = 0.0 complex ztemp = (0,0), float zangle = 0.0, float theta = 0.0 float gamma = sin( halfpi - #pi/@sides ) float sector = twopi / @sides float cangle = 0.0; circle azimuth float angleincrement = twopi / @numberdisks float disksize = @disksz, float diskradius = disksize/2 float testradius = 0.0 ; alias for diskradius complex tpoint = (0,0) ; test point on circle float tempx = 0.0, float tempy = 0.0 ; for computing point coordinates float test = 0.0 ; misc. value used for testing int _colorrange = 0, float _coloroffset = 0.0 float _colorindex = 1/@numberdisks ; For feedback/variation options float _colorspread = @colorsprd, float spreadstep = 0.1 * @spreadstp float centerstep = 0.1 * @centerstp float radstep = 0.1 * @radstp float diskstep = 0.1 * @diskstp float linewidth = @linewdth, float linestep = 0.1 * @linestp float elongation = @elongate, float ellipsestep = @ellipsestp float sign = 0.0 loop: iter = iter + 1 if ( !trapped && ( iter > @skippediters )) ; Translate fractal to be circle-centered zinput = #z - circlecenter zmag = cabs( zinput ) if ( abs(zmag - radius) <= diskradius ) ; magnitude falls within trap ring width ; So does it also lie near one of the circle points? cangle = 0.0 ; reset tpoint to begin at origin count = 0 ; reset repeat loop index repeat tempx = radius * cos( cangle ), tempy = radius * sin( cangle ) tpoint = tempx + flip( tempy ) ; Center z temporarily at the shape center ztemp = zinput - tpoint test = cabs( ztemp ) zangle = atan2( ztemp ) ; angle with respect to shape (point trap) center if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle < twopi endif ; zangle if ( @shape == 0 ) ; disk testradius = diskradius elseif ( @shape == 1 ) ; polygon zangle = zangle % sector ; 0 <= zangle < twopi/sides theta = #pi - zangle - gamma testradius = diskradius * gamma / sin( theta ) elseif ( @shape == 2 ) ; line ztemp = ztemp * exp( -flip( cangle)) ; tpoint along x-axis test = abs(imag( ztemp )), testradius = linewidth else ; ellipse testradius = diskradius * elongation / ( 1 - elongation * cos( zangle )) endif ; shape if ( test <= testradius ) ; Does z fall within one of the tangent disks? trapped = TRUE _colorrange = count - 1 if ( @colormode == 0 ) ; tangent shape-radial _coloroffset = test / diskradius elseif ( @colormode == 1 ) ; circle-radial _coloroffset = (zmag - radius + diskradius)/diskradius elseif ( @colormode == 2 ) ; _color by ztemp quadrant relative to shape center if ( zangle <= halfpi ) _coloroffset = 0 elseif ( zangle <= #pi ) _coloroffset = 0.25 elseif ( zangle <= 3 * halfpi ) _coloroffset = 0.5 else _coloroffset = 0.75 endif ; zangle else ; @colormode == 3 --- continuous ztemp angle relative to shape center _coloroffset = zangle / twopi endif ; _colormode endif ; test cangle = cangle + angleincrement ; get ready for next tpoint on circle count = count + 1 until ( trapped || ( count > @numberdisks )) ; tempx endif ; zmag if !trapped ; vary chosen parameter if set sign = real(zinput)/abs(real(zinput)) if @varyradius radius = radius + radstep * radius * zmag * sign endif ; varyradius if @varycenter tempx = real(circlecenter) + centerstep * real(circlecenter) * zmag * sign tempy = imag(circlecenter) + centerstep * imag(circlecenter) * zmag * sign circlecenter = tempx + flip( tempy ) endif ; varycenter if @varydisksz disksize = disksize + diskstep * disksize * zmag * sign endif ; varydisksz if @varyspread _colorspread = _colorspread + spreadstep * _colorspread * zmag * sign endif ; varyspread if @varyline linewidth = linewidth + linestep * linewidth * zmag * sign endif ; varyline if @varyellipse elongation = elongation + ellipsestep * elongation * zmag * sign endif ; varyellipse endif ; !trapped2 endif ; !trapped1 final: if trapped if @onerange #index = _coloroffset else #index = @colorsprd * _colorindex * ( _colorrange + _coloroffset ) endif ; onerange else #solid = TRUE endif ; trapped default: title = "Circle Tangents" param shape caption = "Tangent Shape" enum = "disk" "polygon" "line" "ellipse" default = 0 hint = "Determines shape of tangent trap" endparam param disksz caption = "Shape Size" default = 0.2 hint = "Enter size of tangent shapes. For 'Tangent Shape' = line, this is the line length; \ line width is set by parameter 'Line Width'" endparam param numberdisks caption = "Shape Number" default = 7 min = 1 hint = "This parameter determines how many shapes are placed around the trap circle" endparam param rad caption = "Circle Radius" default = 0.5 hint = "Enter radius of circle used as trap" endparam param centermode caption = "Circle Center" enum = "Custom" "Screen Center" default = 0 hint = "Set circle center; if 'Custom' is selected, also set parameter \ 'Custom Center'" endparam param circlecentr caption = "Custom Center" default = (0, 0) hint = "This value only applies when parameter 'Circle Center' is \ set to 'Custom'" endparam param @colorsprd caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param @colormode caption = "Coloring Mode" enum = "ShapeRadial" "CircleRadial" "Quadrant" "Angle" default = 0 hint = "'ShapeRadial' means color index increases from tangent shape center outwards; \ 'CircleRadial' means index increases from trap circle center outward" endparam param sides caption = "Polygon Order" default = 4 min = 3 hint = "Enter number of sides of polygon" endparam param linewdth caption = "Line Width" default = 0.02 hint = "This is the width of the line if 'Tangent Shape' is set to 'line'" endparam param elongate caption = "Ellipse Eccentricity" default = 0.6 min = 0.0 max = 0.95 hint = "This setting (0.0-0.95)affects the elongation of the ellipse if 'Tangent Shape' \ is set to 'ellipse'; 0.0 reverts to a circle" endparam param varydisksz caption = "Vary Shape?" default = FALSE hint = "If set, the value of the trap will modify the tangent shape radius each iteration; \ parameter 'ShapeFeedback' can be used to modulate the variation" endparam param diskstp caption = "ShapeFeedback" default = 1.0 hint = "If 'Vary Shape' is set, this setting adjusts the amount of variation" endparam param varyradius caption = "Vary Radius?" default = FALSE hint = "If set, the value of the trap will modify the circle radius each iteration; \ parameter 'RadiusFeedback' can be used to modulate the variation" endparam param radstp caption = "RadiusFeedback" default = 1.0 hint = "If 'Vary Radius' is set, this setting adjusts the amount of variation" endparam param varycenter caption = "Vary Center?" default = FALSE hint = "If set, the value of the trap will modify the circle center each iteration; \ parameter 'CenterFeedback' can be used to modulate the variation" endparam param centerstp caption = "CenterFeedback" default = 1.0 hint = "If 'Vary Center' is set, this setting adjusts the amount of variation" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" endparam param varyline caption = "Vary LineWidth?" default = FALSE hint = "If set, the value of the trap will modify the line width each \ iteration; parameter 'LineFeedback' can be used to modulate the variation. \ Only applies to 'Tangent Shape' = 'line'" endparam param linestp caption = "LineFeedback" default = 1.0 hint = "If 'Vary LineWidth' is set, this setting adjusts the amount of variation" endparam param varyellipse caption = "Vary Eccentricity?" default = FALSE hint = "If set, the value of the trap will modify the ellipse elongation each \ iteration; parameter 'EllipseFeedback' can be used to modulate the variation. \ Only applies to 'Tangent Shape' = 'ellipse'" endparam param ellipsestp caption = "EllipseFeedback" default = 1.0 hint = "If 'Vary Eccentricity' is set, this setting adjusts the amount of variation" endparam param onerange caption = "Single Range?" default = FALSE hint = "If enabled, a single color range will be used; otherwise, the number of \ color ranges is equal to the number of tangent shapes set by 'Shape Number'" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam } jam-ParabolaTrap { ; jam version 010829 ; Thanks to Luke Plant's formulas for the inspiration to allow ; feedback variation of the formula parameters. ; A very early version of this formula had rotation entry specified in radians. ; This parameter has been changed so that it is specified in degrees, which I ; thought was easier for most. If by chance you have an image that does not render ; properly, convert your previous rotation setting to radians! init: if ( @zoommode == 0 ) complex focus = @focs/#magn else ; @zoommode == 1 complex focus = @focs endif ; zoommode ; Change and scale variables to facilitate variation, if selected float twopi = 2.0 * #pi, float halfpi = #pi/2.0, float threehalvespi = 3*halfpi complex vertex = @vertx, float vertexstep = 0.05 * @vertexstp float spread = @colorspread, float spreadstep = 0.05 * @spreadstp float thresh = @threshold, float threshstep = 0.05 * @threshstp float focusstep = 0.05 * @focusstp float ringstep = 0.05 * @ringstp, float rwidth = @ringwidth float rotation = @rotate * #pi / 180, float rotationstep = 0.05 * @rotationstp if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation bool trapped = FALSE bool vary = TRUE float sign = 0.0 float innerradius = thresh - @ringwidth if ( @whattotrap > 11 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, float _color = 0.0 complex zlast = (0,0), complex tlast = (1,0), float turbstep = @turbstp complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex zold2 = (0,0) float rfbcomp = 1-@rfblend, float ifbcomp = 1-@ifblend float rbbcomp = 1-@rbblend, float ibbcomp = 1-@ibblend float trapbcomp = 1-@trapblend, float initbcomp = 1-@initblend if @towatch == 0 int watch = #maxiter else int watch = @skippediters + @towatch endif ; towatch complex newvertex = (0,0), float vangle = 0.0, float netrotation = 0.0 float distance = 0.0, float tempzangle = 0.0 int iter = 0, int count = 0 int itrapped = int itrapped2 = int itrapped3 = int itrapped4 = 0 float test = 0.0, float trapped1 = float trapped2 = float trapped3 = float trapped4 = 1e9 float zangle = 0.0, float zatrapped = float zatrapped2 = float zatrapped3 = float zatrapped4 = 0.0 float cangle = 0.0, float catrapped = float catrapped2 = float catrapped3 = float catrapped4 = 0.0 complex ztrapped = complex ztrapped2 = complex ztrapped3 = complex ztrapped4 = (0,0) complex ztemp = complex zttrapped = complex zttrapped2 = complex zttrapped3 = complex zttrapped4 = (0,0) complex tempc = complex ctrapped = complex ctrapped2 = complex ctrapped3 = complex ctrapped4 = (0,0) float tempx = 0.0, float tempy = 0.0, float temp = 0.0, float temp2 = 0.0 complex zinput = (0,0) ; If we're trapping something big, initialize small if (( @whattotrap == 1 ) || ( @whattotrap == 5 ) || ( @whattotrap == 6 ) \ || ( @whattotrap == 7 )) trapped1 = trapped2 = trapped3 = trapped4 = -1e9 elseif @whattotrap > 14 trapped2 = -1e9 ; used to store the max when looking for min-max, min+max, etc. endif ; trapmode loop: iter = iter + 1 if ( iter > @skippediters ) && ( iter <= watch ) ; finished skipping --- start testing for trap ; Initialize front end real, front end imag, if desired temp2 = @rfscale * real(#z) if ( @realfront == 0 ) tempx = temp2 elseif ( @realfront == 1 ) tempx = 1/temp2 elseif ( @realfront == 2 ) tempx = temp2 * temp2 elseif ( @realfront == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realfront == 4 ) tempx = log(temp2) elseif ( @realfront == 5 ) tempx = exp( temp2) elseif ( @realfront == 6 ) tempx = temp2^temp2 elseif ( @realfront == 7 ) tempx = sin( temp2 ) elseif ( @realfront == 8 ) tempx = cos( temp2 ) elseif ( @realfront == 9 ) tempx = tan( temp2 ) elseif ( @realfront == 10 ) tempx = asin( temp2 ) elseif ( @realfront == 11 ) tempx = acos( temp2 ) elseif ( @realfront == 12 ) tempx = atan( temp2 ) elseif ( @realfront == 13 ) tempx = sinh( temp2 ) elseif ( @realfront == 14 ) tempx = cosh( temp2 ) elseif ( @realfront == 15 ) tempx = tanh( temp2 ) elseif ( @realfront == 16 ) tempx = asinh( temp2 ) elseif ( @realfront == 17 ) tempx = acosh( temp2 ) elseif ( @realfront == 18 ) tempx = atanh( temp2 ) elseif ( @realfront == 19 ) tempx = log( 1/temp2 ) elseif ( @realfront == 20 ) tempx = log( log( temp2 )) elseif ( @realfront == 21 ) tempx = exp( -temp2 ) elseif ( @realfront == 22 ) tempx = exp( 1/temp2 ) elseif ( @realfront == 23 ) tempx = temp2^(-temp2) elseif ( @realfront == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 27 ) tempx = cotan( temp2 ) elseif ( @realfront == 28 ) tempx = 1/cos( temp2 ) elseif ( @realfront == 29 ) tempx = 1/sin( temp2 ) elseif ( @realfront == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realfront == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realfront == 35 ) tempx = log(-temp2) elseif ( @realfront == 36 ) tempx = 1/log( temp2 ) elseif ( @realfront == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realfront == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realfront == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realfront == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realfront == 41 ) tempx = sin( temp2^2 ) elseif ( @realfront == 42 ) tempx = exp( -1/temp2 ) elseif ( @realfront == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realfront == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realfront == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realfront == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realfront == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realfront == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realfront == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realfront == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realfront == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realfront == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realfront == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realfront == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realfront == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realfront == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realfront == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realfront == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realfront == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realfront == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realfront == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realfront == 62 ) tempx = sin( 1/temp2 ) elseif ( @realfront == 63 ) tempx = cos( 1/temp2 ) elseif ( @realfront == 64 ) tempx = tan( 1/temp2 ) elseif ( @realfront == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realfront == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realfront == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realfront == 68 ) tempx = cotanh( temp2 ) elseif ( @realfront == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realfront == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realfront == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realfront == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realfront == 73 ) tempx = asinh( 1/temp2 ) elseif @realfront == 74 tempx = temp2^@rfpower elseif @realfront == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realfront == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realfront == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realfront == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realfront == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realfront == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realfront == 81 tempx = sinh(1/temp2) elseif @realfront == 82 tempx = cosh(1/temp2) elseif @realfront == 83 tempx = tanh(1/temp2) elseif @realfront == 84 tempx = cotanh(1/temp2) elseif @realfront == 85 tempx = 1/cosh(1/temp2) elseif @realfront == 86 tempx = 1/sinh(1/temp2) elseif @realfront == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realfront == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realfront == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realfront == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realfront == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realfront == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realfront == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realfront == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realfront == 98 tempx = exp(2*temp2) elseif @realfront == 99 tempx = exp(-2*temp2) elseif @realfront == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realfront == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realfront == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realfront == 104 tempx = sin(temp2) * sinh(temp2) elseif @realfront == 105 tempx = sin(temp2) * cosh(temp2) elseif @realfront == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 107 tempx = sin(temp2)*exp(temp2) elseif @realfront == 108 tempx = cos(temp2)*exp(temp2) elseif @realfront == 109 tempx = sinh(temp2)*exp(temp2) elseif @realfront == 110 tempx = cosh(temp2)*exp(temp2) elseif @realfront == 111 tempx = sin(temp2)*log(temp2) elseif @realfront == 112 tempx = cos(temp2)*log(temp2) elseif @realfront == 113 tempx = sinh(temp2)*log(temp2) else ; @realfront == 114 tempx = cosh(temp2)*log(temp2) endif ; realfront if @rfperturb tempx = @rfblend * tempx + rfbcomp * real(#z) endif ; @rfperturb temp2 = @ifscale * imag(#z) if ( @imagfront == 0 ) tempy = temp2 elseif ( @imagfront == 1 ) tempy = 1/temp2 elseif ( @imagfront == 2 ) tempy = temp2 * temp2 elseif ( @imagfront == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagfront == 4 ) tempy = log(temp2) elseif ( @imagfront == 5 ) tempy = exp( temp2) elseif ( @imagfront == 6 ) tempy = temp2^temp2 elseif ( @imagfront == 7 ) tempy = sin( temp2 ) elseif ( @imagfront == 8 ) tempy = cos( temp2 ) elseif ( @imagfront == 9 ) tempy = tan( temp2 ) elseif ( @imagfront == 10 ) tempy = asin( temp2 ) elseif ( @imagfront == 11 ) tempy = acos( temp2 ) elseif ( @imagfront == 12 ) tempy = atan( temp2 ) elseif ( @imagfront == 13 ) tempy = sinh( temp2 ) elseif ( @imagfront == 14 ) tempy = cosh( temp2 ) elseif ( @imagfront == 15 ) tempy = tanh( temp2 ) elseif ( @imagfront == 16 ) tempy = asinh( temp2 ) elseif ( @imagfront == 17 ) tempy = acosh( temp2 ) elseif ( @imagfront == 18 ) tempy = atanh( temp2 ) elseif ( @imagfront == 19 ) tempy = log( 1/temp2 ) elseif ( @imagfront == 20 ) tempy = log( log( temp2 )) elseif ( @imagfront == 21 ) tempy = exp( -temp2 ) elseif ( @imagfront == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagfront == 23 ) tempy = temp2^(-temp2) elseif ( @imagfront == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 27 ) tempy = cotan( temp2 ) elseif ( @imagfront == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagfront == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagfront == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagfront == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagfront == 35 ) tempy = log(-temp2) elseif ( @imagfront == 36 ) tempy = 1/log( temp2 ) elseif ( @imagfront == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagfront == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagfront == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagfront == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagfront == 41 ) tempy = sin( temp2^2 ) elseif ( @imagfront == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagfront == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagfront == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagfront == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagfront == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagfront == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagfront == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagfront == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagfront == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagfront == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagfront == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagfront == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagfront == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagfront == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagfront == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagfront == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagfront == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagfront == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagfront == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagfront == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagfront == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagfront == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagfront == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagfront == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagfront == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagfront == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagfront == 68 ) tempy = cotanh( temp2 ) elseif ( @imagfront == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagfront == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagfront == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagfront == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagfront == 73 ) tempy = asinh( 1/temp2 ) elseif @imagfront == 74 tempy = temp2^@ifpower elseif @imagfront == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagfront == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagfront == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagfront == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagfront == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagfront == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagfront == 81 tempy = sinh(1/temp2) elseif @imagfront == 82 tempy = cosh(1/temp2) elseif @imagfront == 83 tempy = tanh(1/temp2) elseif @imagfront == 84 tempy = cotanh(1/temp2) elseif @imagfront == 85 tempy = 1/cosh(1/temp2) elseif @imagfront == 86 tempy = 1/sinh(1/temp2) elseif @imagfront == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagfront == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagfront == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagfront == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagfront == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagfront == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagfront == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagfront == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagfront == 98 tempy = exp(2*temp2) elseif @imagfront == 99 tempy = exp(-2*temp2) elseif @imagfront == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagfront == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagfront == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagfront == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagfront == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagfront == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 107 tempy = sin(temp2)*exp(temp2) elseif @imagfront == 108 tempy = cos(temp2)*exp(temp2) elseif @imagfront == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagfront == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagfront == 111 tempy = sin(temp2)*log(temp2) elseif @imagfront == 112 tempy = cos(temp2)*log(temp2) elseif @imagfront == 113 tempy = sinh(temp2)*log(temp2) else ; @imagfront == 114 tempy = cosh(temp2)*log(temp2) endif ; imagfront if @ifperturb tempy = @ifblend * tempy + ifbcomp * imag(#z) endif ; @ifperturb zold = tempx + flip(tempy) ; Initialize z, if desired zold = @ziscale * zold if ( @initialization == 0 ) zinput = zold elseif ( @initialization == 1 ) zinput = 1/zold elseif ( @initialization == 2 ) zinput = zold * zold elseif ( @initialization == 3 ) zinput = 1 / ( zold * zold ) elseif ( @initialization == 4 ) zinput = log(zold) elseif ( @initialization == 5 ) zinput = exp( zold) elseif ( @initialization == 6 ) zinput = zold^zold elseif ( @initialization == 7 ) zinput = sin( zold ) elseif ( @initialization == 8 ) zinput = cos( zold ) elseif ( @initialization == 9 ) zinput = tan( zold ) elseif ( @initialization == 10 ) zinput = asin( zold ) elseif ( @initialization == 11 ) zinput = acos( zold ) elseif ( @initialization == 12 ) zinput = atan( zold ) elseif ( @initialization == 13 ) zinput = sinh( zold ) elseif ( @initialization == 14 ) zinput = cosh( zold ) elseif ( @initialization == 15 ) zinput = tanh( zold ) elseif ( @initialization == 16 ) zinput = asinh( zold ) elseif ( @initialization == 17 ) zinput = acosh( zold ) elseif ( @initialization == 18 ) zinput = atanh( zold ) elseif ( @initialization == 19 ) zinput = log( 1/zold ) elseif ( @initialization == 20 ) zinput = log( log( zold )) elseif ( @initialization == 21 ) zinput = exp( -zold ) elseif ( @initialization == 22 ) zinput = exp( 1/zold ) elseif ( @initialization == 23 ) zinput = zold^(-zold) elseif ( @initialization == 24 ) zinput = sin( zold ) zinput = zinput * zinput elseif ( @initialization == 25 ) zinput = cos( zold ) zinput = zinput * zinput elseif ( @initialization == 26 ) zinput = tan( zold ) zinput = zinput * zinput elseif ( @initialization == 27 ) zinput = cotan( zold ) elseif ( @initialization == 28 ) zinput = 1/cos( zold ) elseif ( @initialization == 29 ) zinput = 1/sin( zold ) elseif ( @initialization == 30 ) zinput = cotan( zold ) zinput = zinput * zinput elseif ( @initialization == 31 ) zinput = 1/cos( zold ) zinput = zinput * zinput elseif ( @initialization == 32 ) zinput = 1/sin( zold ) zinput = zinput * zinput elseif ( @initialization == 33 ) zinput = zold^(zold) zinput = zold^zinput elseif ( @initialization == 34 ) zinput = zold^(zold) zinput = 1/( zold^zinput ) elseif ( @initialization == 35 ) zinput = log(-zold) elseif ( @initialization == 36 ) zinput = 1/log( zold ) elseif ( @initialization == 37 ) zinput = zold * log( zold ) elseif ( @initialization == 38 ) zinput = sin( zold ) / zold elseif ( @initialization == 39 ) zinput = cos( zold ) / zold elseif ( @initialization == 40 ) zinput = sin( zold ) * cos( zold ) elseif ( @initialization == 41 ) zinput = sin( zold^2 ) elseif ( @initialization == 42 ) zinput = exp( -1/zold ) elseif ( @initialization == 43 ) zinput = zold * exp( zold ) elseif ( @initialization == 44 ) zinput = zold * exp( -zold ) elseif ( @initialization == 45 ) zinput = zold * exp( 1/zold ) elseif ( @initialization == 46 ) zinput = zold * exp( -1/zold ) elseif ( @initialization == 47 ) zinput = zold * zold * zold elseif ( @initialization == 48 ) zinput = 1 / ( zold * zold * zold ) elseif ( @initialization == 49 ) zinput = atan( 1 / zold ) elseif ( @initialization == 50 ) zinput = acos( 1 / zold ) elseif ( @initialization == 51 ) zinput = asin( 1 / zold ) elseif ( @initialization == 52 ) zinput = tan( zold ) / zold elseif ( @initialization == 53 ) zinput = cotan( zold ) / zold elseif ( @initialization == 54 ) zinput = 1 / ( zold * cos( zold )) elseif ( @initialization == 55 ) zinput = 1 / ( zold * sin( zold )) elseif ( @initialization == 56 ) zinput = zold * sin( zold ) elseif ( @initialization == 57 ) zinput = zold * cos( zold ) elseif ( @initialization == 58 ) zinput = zold * tan( zold ) elseif ( @initialization == 59 ) zinput = zold * cotan( zold ) elseif ( @initialization == 60 ) zinput = zold/cos( zold ) elseif ( @initialization == 61 ) zinput = zold/sin( zold ) elseif ( @initialization == 62 ) zinput = sin( 1/zold ) elseif ( @initialization == 63 ) zinput = cos( 1/zold ) elseif ( @initialization == 64 ) zinput = tan( 1/zold ) elseif ( @initialization == 65 ) zinput = cotan( 1/zold ) elseif ( @initialization == 66 ) zinput = 1/cos( 1/zold ) elseif ( @initialization == 67 ) zinput = 1/sin( 1/zold ) elseif ( @initialization == 68 ) zinput = cotanh( zold ) elseif ( @initialization == 69 ) zinput = 1/cosh( zold ) elseif ( @initialization == 70 ) zinput = 1/sinh( zold ) elseif ( @initialization == 71 ) zinput = atanh( 1/zold ) elseif ( @initialization == 72 ) zinput = acosh( 1/zold ) elseif ( @initialization == 73 ) zinput = asinh( 1/zold ) elseif @initialization == 74 zinput = zold^@zpower elseif @initialization == 75 zinput = sinh(zold) zinput = zinput * zinput elseif @initialization == 76 zinput = cosh( zold ) zinput = zinput * zinput elseif @initialization == 77 zinput = tanh(zold) zinput = zinput * zinput elseif @initialization == 78 zinput = cotanh( zold ) zinput = zinput * zinput elseif @initialization == 79 zinput = 1/cosh(zold) zinput = zinput * zinput elseif @initialization == 80 zinput = 1 / sinh( zold ) zinput = zinput * zinput elseif @initialization == 81 zinput = sinh(1/zold) elseif @initialization == 82 zinput = cosh(1/zold) elseif @initialization == 83 zinput = tanh(1/zold) elseif @initialization == 84 zinput = cotanh(1/zold) elseif @initialization == 85 zinput = 1/cosh(1/zold) elseif @initialization == 86 zinput = 1/sinh(1/zold) elseif @initialization == 87 zinput = sin( zold ) * tan(zold) elseif @initialization == 88 zinput = sinh(zold) * tanh(zold) elseif @initialization == 89 zinput = sinh(zold) * cosh(zold) elseif @initialization == 90 zinput = sinh(zold), zscratch = cosh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 91 zinput = sin(zold), zscratch = cos(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 92 zinput = 1/zold zinput = sin(zinput)*cos(zinput) elseif @initialization == 93 zinput = sin( 1/zold ) zinput = zinput*zinput elseif @initialization == 94 zinput = sin(zold) * cos(1/zold) elseif @initialization == 95 zinput = sin(zold) * sin(1/zold) elseif @initialization == 96 zinput = log(zold) zinput = zinput*zinput elseif @initialization == 97 zinput = sin(zold) * sin(2*zold) elseif @initialization == 98 zinput = exp(2*zold) elseif @initialization == 99 zinput = exp(-2*zold) elseif @initialization == 100 zinput = 1/zold zinput = sinh(zinput)*cosh(zinput) elseif @initialization == 101 zinput = sinh( 1/zold ) zinput = zinput*zinput elseif @initialization == 102 zinput = sinh(zold) * cosh(1/zold) elseif @initialization == 103 zinput = sinh(zold) * sinh(1/zold) elseif @initialization == 104 zinput = sin(zold) * sinh(zold) elseif @initialization == 105 zinput = sin(zold) * cosh(zold) elseif @initialization == 106 zinput = sin(zold), zscratch = sinh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 107 zinput = sin(zold)*exp(zold) elseif @initialization == 108 zinput = cos(zold)*exp(zold) elseif @initialization == 109 zinput = sinh(zold)*exp(zold) elseif @initialization == 110 zinput = cosh(zold)*exp(zold) elseif @initialization == 111 zinput = sin(zold)*log(zold) elseif @initialization == 112 zinput = cos(zold)*log(zold) elseif @initialization == 113 zinput = sinh(zold)*log(zold) else ; @initialization == 114 zinput = cosh(zold)*log(zold) endif ; initialization if @initperturb zinput = @initblend * zinput + initbcomp * zold endif ; @ifperturb if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication zinput = zinput * @operatee elseif @operator == 2 ; addition zinput = zinput + @operatee elseif @operator == 3 ; subtraction zinput = zinput - @operatee elseif @operator == 4 ; division zinput = zinput / @operatee elseif @operator == 5 ; exponentiation zinput = zinput ^ @operatee elseif @operator == 6 ; subtraction2 zinput = @operatee - zinput elseif @operator == 7 ; division2 zinput = @operatee / zinput elseif @operator == 8 ; exponential2 zinput = @operatee ^ zinput elseif @operator == 9 ; logarithm zinput = log(zinput) / log(@operatee) elseif @operator == 10 ; logarithm2 zinput = log(@operatee) / log(zinput) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; Normalize pixel and vertex to parabola focus ztemp = zinput - focus, newvertex = vertex - focus ; Find coordinates and angle of point on parabola closest to #z (zinput) ; First, angle of vertex with respect to focus vangle = atan2( newvertex ) if ( vangle < 0 ) vangle = vangle = twopi endif ; vangle ; Compute rotated #z netrotation = vangle - threehalvespi + rotation if ( netrotation < 0 ) netrotation = netrotation + twopi endif ; netrotation ztemp = ztemp * exp( flip( -netrotation)) if @history if @histype == 0 zold2 = ztemp - zold2, ztemp = zold2 elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold2, zold2 = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold2, zold2 = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp ; Now find angle of 'rotated' #z zangle = atan2( ztemp ) if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle <= twopi endif ; zangle if ( @anglerestrict && ( zangle < #pi )) zangle = twopi - zangle ; pi <= zangle <= twopi, i.e., 3rd or 4th quadrant endif ; anglerestrict ; Find point on parabola --- focus-#z radial vector distance = 2 * cabs( newvertex ) tempzangle = zangle if ( abs( halfpi - tempzangle ) < 1e-6 ) ; prevent division by zero tempzangle = 49 * #pi / 100 endif ; abs if @sprangle tempzangle = tempzangle*@sprangfactor endif ; @sprangle ; Actual point on parabola, distance to z distance = distance / ( 1 - sin( tempzangle )) tempc = @scale * distance * exp( flip( tempzangle)) if !@polar tempc = real(ztemp) + flip(distance) endif ; @polar zold = tempc ; Now transmute the trapped point of the trapping curve if desired tempc = @tiscale * tempc if @transmogrify != 0 if ( @transmogrify == 1 ) tempc = 1/tempc elseif ( @transmogrify == 2 ) tempc = tempc * tempc elseif ( @transmogrify == 3 ) tempc = 1 / ( tempc * tempc ) elseif ( @transmogrify == 4 ) tempc = log(tempc) elseif ( @transmogrify == 5 ) tempc = exp( tempc) elseif ( @transmogrify == 6 ) tempc = tempc^tempc elseif ( @transmogrify == 7 ) tempc = sin( tempc ) elseif ( @transmogrify == 8 ) tempc = cos( tempc ) elseif ( @transmogrify == 9 ) tempc = tan( tempc ) elseif ( @transmogrify == 10 ) tempc = asin( tempc ) elseif ( @transmogrify == 11 ) tempc = acos( tempc ) elseif ( @transmogrify == 12 ) tempc = atan( tempc ) elseif ( @transmogrify == 13 ) tempc = sinh( tempc ) elseif ( @transmogrify == 14 ) tempc = cosh( tempc ) elseif ( @transmogrify == 15 ) tempc = tanh( tempc ) elseif ( @transmogrify == 16 ) tempc = asinh( tempc ) elseif ( @transmogrify == 17 ) tempc = acosh( tempc ) elseif ( @transmogrify == 18 ) tempc = atanh( tempc ) elseif ( @transmogrify == 19 ) tempc = log( 1/tempc ) elseif ( @transmogrify == 20 ) tempc = log( log( tempc )) elseif ( @transmogrify == 21 ) tempc = exp( -tempc ) elseif ( @transmogrify == 22 ) tempc = exp( 1/tempc ) elseif ( @transmogrify == 23 ) tempc = tempc^(-tempc) elseif ( @transmogrify == 24 ) tempc = sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 25 ) tempc = cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 26 ) tempc = tan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 27 ) tempc = cotan( tempc ) elseif ( @transmogrify == 28 ) tempc = 1/cos( tempc ) elseif ( @transmogrify == 29 ) tempc = 1/sin( tempc ) elseif ( @transmogrify == 30 ) tempc = cotan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 31 ) tempc = 1/cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 32 ) tempc = 1/sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 33 ) tempc = tempc^(tempc) tempc = tempc^tempc elseif ( @transmogrify == 34 ) tempc = tempc^(tempc) tempc = 1/( tempc^tempc ) elseif ( @transmogrify == 35 ) tempc = log(-tempc) elseif ( @transmogrify == 36 ) tempc = 1/log( tempc ) elseif ( @transmogrify == 37 ) tempc = tempc * log( tempc ) elseif ( @transmogrify == 38 ) tempc = sin( tempc ) / tempc elseif ( @transmogrify == 39 ) tempc = cos( tempc ) / tempc elseif ( @transmogrify == 40 ) tempc = sin( tempc ) * cos( tempc ) elseif ( @transmogrify == 41 ) tempc = sin( tempc^2 ) elseif ( @transmogrify == 42 ) tempc = exp( -1/tempc ) elseif ( @transmogrify == 43 ) tempc = tempc * exp( tempc ) elseif ( @transmogrify == 44 ) tempc = tempc * exp( -tempc ) elseif ( @transmogrify == 45 ) tempc = tempc * exp( 1/tempc ) elseif ( @transmogrify == 46 ) tempc = tempc * exp( -1/tempc ) elseif ( @transmogrify == 47 ) tempc = tempc * tempc * tempc elseif ( @transmogrify == 48 ) tempc = 1 / ( tempc * tempc * tempc ) elseif ( @transmogrify == 49 ) tempc = atan( 1 / tempc ) elseif ( @transmogrify == 50 ) tempc = acos( 1 / tempc ) elseif ( @transmogrify == 51 ) tempc = asin( 1 / tempc ) elseif ( @transmogrify == 52 ) tempc = tan( tempc ) / tempc elseif ( @transmogrify == 53 ) tempc = cotan( tempc ) / tempc elseif ( @transmogrify == 54 ) tempc = 1 / ( tempc * cos( tempc )) elseif ( @transmogrify == 55 ) tempc = 1 / ( tempc * sin( tempc )) elseif ( @transmogrify == 56 ) tempc = tempc * sin( tempc ) elseif ( @transmogrify == 57 ) tempc = tempc * cos( tempc ) elseif ( @transmogrify == 58 ) tempc = tempc * tan( tempc ) elseif ( @transmogrify == 59 ) tempc = tempc * cotan( tempc ) elseif ( @transmogrify == 60 ) tempc = tempc/cos( tempc ) elseif ( @transmogrify == 61 ) tempc = tempc/sin( tempc ) elseif ( @transmogrify == 62 ) tempc = sin( 1/tempc ) elseif ( @transmogrify == 63 ) tempc = cos( 1/tempc ) elseif ( @transmogrify == 64 ) tempc = tan( 1/tempc ) elseif ( @transmogrify == 65 ) tempc = cotan( 1/tempc ) elseif ( @transmogrify == 66 ) tempc = 1/cos( 1/tempc ) elseif ( @transmogrify == 67 ) tempc = 1/sin( 1/tempc ) elseif ( @transmogrify == 68 ) tempc = cotanh( tempc ) elseif ( @transmogrify == 69 ) tempc = 1/cosh( tempc ) elseif ( @transmogrify == 70 ) tempc = 1/sinh( tempc ) elseif ( @transmogrify == 71 ) tempc = atanh( 1/tempc ) elseif ( @transmogrify == 72 ) tempc = acosh( 1/tempc ) elseif ( @transmogrify == 73 ) tempc = asinh( 1/tempc ) elseif @transmogrify == 74 tempc = tempc^@tpower elseif @transmogrify == 75 tempc = sinh(tempc) tempc = tempc * tempc elseif @transmogrify == 76 tempc = cosh( tempc ) tempc = tempc * tempc elseif @transmogrify == 77 tempc = tanh(tempc) tempc = tempc * tempc elseif @transmogrify == 78 tempc = cotanh( tempc ) tempc = tempc * tempc elseif @transmogrify == 79 tempc = 1/cosh(tempc) tempc = tempc * tempc elseif @transmogrify == 80 tempc = 1 / sinh( tempc ) tempc = tempc * tempc elseif @transmogrify == 81 tempc = sinh(1/tempc) elseif @transmogrify == 82 tempc = cosh(1/tempc) elseif @transmogrify == 83 tempc = tanh(1/tempc) elseif @transmogrify == 84 tempc = cotanh(1/tempc) elseif @transmogrify == 85 tempc = 1/cosh(1/tempc) elseif @transmogrify == 86 tempc = 1/sinh(1/tempc) elseif @transmogrify == 87 tempc = sin( tempc ) * tan(tempc) elseif @transmogrify == 88 tempc = sinh(tempc) * tanh(tempc) elseif @transmogrify == 89 tempc = sinh(tempc) * cosh(tempc) elseif @transmogrify == 90 zscratch = cosh(tempc) tempc = sinh(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 91 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 92 tempc = 1/tempc tempc = sin(tempc)*cos(tempc) elseif @transmogrify == 93 tempc = sin( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 94 tempc = sin(tempc) * cos(1/tempc) elseif @transmogrify == 95 tempc = sin(tempc) * sin(1/tempc) elseif @transmogrify == 96 tempc = log(tempc) tempc = tempc*tempc elseif @transmogrify == 97 tempc = sin(tempc) * sin(2*tempc) elseif @transmogrify == 98 tempc = exp(2*tempc) elseif @transmogrify == 99 tempc = exp(-2*tempc) elseif @transmogrify == 100 tempc = 1/tempc tempc = sinh(tempc)*cosh(tempc) elseif @transmogrify == 101 tempc = sinh( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 102 tempc = sinh(tempc) * cosh(1/tempc) elseif @transmogrify == 103 tempc = sinh(tempc) * sinh(1/tempc) elseif @transmogrify == 104 tempc = sin(tempc) * sinh(tempc) elseif @transmogrify == 105 tempc = sin(tempc) * cosh(tempc) elseif @transmogrify == 106 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 107 tempc = sin(tempc)*exp(tempc) elseif @transmogrify == 108 tempc = cos(tempc)*exp(tempc) elseif @transmogrify == 109 tempc = sinh(tempc)*exp(tempc) elseif @transmogrify == 110 tempc = cosh(tempc)*exp(tempc) elseif @transmogrify == 111 tempc = sin(tempc)*log(tempc) elseif @transmogrify == 112 tempc = cos(tempc)*log(tempc) elseif @transmogrify == 113 tempc = sinh(tempc)*log(tempc) else ; @transmogrify == 114 tempc = cosh(tempc)*log(tempc) endif ; transmogrify2 endif ; transmogrify1 if @trapperturb tempc = @trapblend * tempc + trapbcomp * zold endif ; @trapperturb ; Initialize back end real, back end imag, if desired temp2 = @rbscale * real(tempc) if ( @realback == 0 ) tempx = temp2 elseif ( @realback == 1 ) tempx = 1/temp2 elseif ( @realback == 2 ) tempx = temp2 * temp2 elseif ( @realback == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realback == 4 ) tempx = log(temp2) elseif ( @realback == 5 ) tempx = exp( temp2) elseif ( @realback == 6 ) tempx = temp2^temp2 elseif ( @realback == 7 ) tempx = sin( temp2 ) elseif ( @realback == 8 ) tempx = cos( temp2 ) elseif ( @realback == 9 ) tempx = tan( temp2 ) elseif ( @realback == 10 ) tempx = asin( temp2 ) elseif ( @realback == 11 ) tempx = acos( temp2 ) elseif ( @realback == 12 ) tempx = atan( temp2 ) elseif ( @realback == 13 ) tempx = sinh( temp2 ) elseif ( @realback == 14 ) tempx = cosh( temp2 ) elseif ( @realback == 15 ) tempx = tanh( temp2 ) elseif ( @realback == 16 ) tempx = asinh( temp2 ) elseif ( @realback == 17 ) tempx = acosh( temp2 ) elseif ( @realback == 18 ) tempx = atanh( temp2 ) elseif ( @realback == 19 ) tempx = log( 1/temp2 ) elseif ( @realback == 20 ) tempx = log( log( temp2 )) elseif ( @realback == 21 ) tempx = exp( -temp2 ) elseif ( @realback == 22 ) tempx = exp( 1/temp2 ) elseif ( @realback == 23 ) tempx = temp2^(-temp2) elseif ( @realback == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realback == 27 ) tempx = cotan( temp2 ) elseif ( @realback == 28 ) tempx = 1/cos( temp2 ) elseif ( @realback == 29 ) tempx = 1/sin( temp2 ) elseif ( @realback == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realback == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realback == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realback == 35 ) tempx = log(-temp2) elseif ( @realback == 36 ) tempx = 1/log( temp2 ) elseif ( @realback == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realback == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realback == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realback == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realback == 41 ) tempx = sin( temp2^2 ) elseif ( @realback == 42 ) tempx = exp( -1/temp2 ) elseif ( @realback == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realback == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realback == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realback == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realback == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realback == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realback == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realback == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realback == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realback == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realback == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realback == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realback == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realback == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realback == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realback == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realback == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realback == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realback == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realback == 62 ) tempx = sin( 1/temp2 ) elseif ( @realback == 63 ) tempx = cos( 1/temp2 ) elseif ( @realback == 64 ) tempx = tan( 1/temp2 ) elseif ( @realback == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realback == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realback == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realback == 68 ) tempx = cotanh( temp2 ) elseif ( @realback == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realback == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realback == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realback == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realback == 73 ) tempx = asinh( 1/temp2 ) elseif @realback == 74 tempx = temp2^@rbpower elseif @realback == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realback == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realback == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realback == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realback == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realback == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realback == 81 tempx = sinh(1/temp2) elseif @realback == 82 tempx = cosh(1/temp2) elseif @realback == 83 tempx = tanh(1/temp2) elseif @realback == 84 tempx = cotanh(1/temp2) elseif @realback == 85 tempx = 1/cosh(1/temp2) elseif @realback == 86 tempx = 1/sinh(1/temp2) elseif @realback == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realback == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realback == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realback == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realback == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realback == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realback == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realback == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realback == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realback == 98 tempx = exp(2*temp2) elseif @realback == 99 tempx = exp(-2*temp2) elseif @realback == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realback == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realback == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realback == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realback == 104 tempx = sin(temp2) * sinh(temp2) elseif @realback == 105 tempx = sin(temp2) * cosh(temp2) elseif @realback == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 107 tempx = sin(temp2)*exp(temp2) elseif @realback == 108 tempx = cos(temp2)*exp(temp2) elseif @realback == 109 tempx = sinh(temp2)*exp(temp2) elseif @realback == 110 tempx = cosh(temp2)*exp(temp2) elseif @realback == 111 tempx = sin(temp2)*log(temp2) elseif @realback == 112 tempx = cos(temp2)*log(temp2) elseif @realback == 113 tempx = sinh(temp2)*log(temp2) else ; @realback == 114 tempx = cosh(temp2)*log(temp2) endif ; realback if @rbperturb tempx = @rbblend * tempx + rbbcomp * real(tempc) endif ; @rbperturb temp2 = @ibscale * imag(tempc) if ( @imagback == 0 ) tempy = temp2 elseif ( @imagback == 1 ) tempy = 1/temp2 elseif ( @imagback == 2 ) tempy = temp2 * temp2 elseif ( @imagback == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagback == 4 ) tempy = log(temp2) elseif ( @imagback == 5 ) tempy = exp( temp2) elseif ( @imagback == 6 ) tempy = temp2^temp2 elseif ( @imagback == 7 ) tempy = sin( temp2 ) elseif ( @imagback == 8 ) tempy = cos( temp2 ) elseif ( @imagback == 9 ) tempy = tan( temp2 ) elseif ( @imagback == 10 ) tempy = asin( temp2 ) elseif ( @imagback == 11 ) tempy = acos( temp2 ) elseif ( @imagback == 12 ) tempy = atan( temp2 ) elseif ( @imagback == 13 ) tempy = sinh( temp2 ) elseif ( @imagback == 14 ) tempy = cosh( temp2 ) elseif ( @imagback == 15 ) tempy = tanh( temp2 ) elseif ( @imagback == 16 ) tempy = asinh( temp2 ) elseif ( @imagback == 17 ) tempy = acosh( temp2 ) elseif ( @imagback == 18 ) tempy = atanh( temp2 ) elseif ( @imagback == 19 ) tempy = log( 1/temp2 ) elseif ( @imagback == 20 ) tempy = log( log( temp2 )) elseif ( @imagback == 21 ) tempy = exp( -temp2 ) elseif ( @imagback == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagback == 23 ) tempy = temp2^(-temp2) elseif ( @imagback == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 27 ) tempy = cotan( temp2 ) elseif ( @imagback == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagback == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagback == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagback == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagback == 35 ) tempy = log(-temp2) elseif ( @imagback == 36 ) tempy = 1/log( temp2 ) elseif ( @imagback == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagback == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagback == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagback == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagback == 41 ) tempy = sin( temp2^2 ) elseif ( @imagback == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagback == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagback == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagback == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagback == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagback == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagback == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagback == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagback == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagback == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagback == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagback == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagback == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagback == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagback == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagback == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagback == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagback == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagback == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagback == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagback == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagback == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagback == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagback == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagback == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagback == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagback == 68 ) tempy = cotanh( temp2 ) elseif ( @imagback == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagback == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagback == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagback == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagback == 73 ) tempy = asinh( 1/temp2 ) elseif @imagback == 74 tempy = temp2^@ibpower elseif @imagback == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagback == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagback == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagback == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagback == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagback == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagback == 81 tempy = sinh(1/temp2) elseif @imagback == 82 tempy = cosh(1/temp2) elseif @imagback == 83 tempy = tanh(1/temp2) elseif @imagback == 84 tempy = cotanh(1/temp2) elseif @imagback == 85 tempy = 1/cosh(1/temp2) elseif @imagback == 86 tempy = 1/sinh(1/temp2) elseif @imagback == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagback == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagback == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagback == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagback == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagback == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagback == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagback == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagback == 98 tempy = exp(2*temp2) elseif @imagback == 99 tempy = exp(-2*temp2) elseif @imagback == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagback == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagback == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagback == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagback == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagback == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 107 tempy = sin(temp2)*exp(temp2) elseif @imagback == 108 tempy = cos(temp2)*exp(temp2) elseif @imagback == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagback == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagback == 111 tempy = sin(temp2)*log(temp2) elseif @imagback == 112 tempy = cos(temp2)*log(temp2) elseif @imagback == 113 tempy = sinh(temp2)*log(temp2) else ; @imagback == 114 tempy = cosh(temp2)*log(temp2) endif ; imagback if @ibperturb tempy = @ibblend * tempy + ibbcomp * imag(tempc) endif ; @ibperturb tempc = tempx + flip(tempy) cangle = atan2( tempc ) if ( cangle < 0 ) cangle = cangle + twopi endif ; cangle if @twavy if @twavmode == 0 ; radial mode temp = cabs( tempc ) temp = temp + @twavamp * temp * sin( @twavfreq * cangle ) ; vary radius tempc = temp * exp( flip( cangle )) ; compute new tempc else ; tangential mode tempx = cabs( tempc ) temp = cangle + @twavamp * cangle * sin( @twavfreq * tempx ) ; vary azimuth tempc = tempx * exp( flip( temp )) ; compute new tempc cangle = temp endif ; @twavmode endif ; @twavy if @pointmode ; compare subsequent values to first trap point on trap graph if itrapped != 0 ; some point must have already been trapped tempc = ctrapped endif; itrapped endif ; @pointmode ; Save value for later turbulence tlast = tempc if @swapflavor zscratch = ztemp else zscratch = #z endif ; swapflavor if ( @trapmode == 0 ) ; distance test = cabs( ztemp - tempc ) elseif ( @trapmode == 1 ) ; angle test = zangle elseif ( @trapmode == 2 ) ; trap angle test = cangle elseif ( @trapmode == 3 ) ; difference angle test = abs( zangle - cangle ) elseif ( @trapmode == 4 ) ; magnitude test = cabs( ztemp + focus ) elseif ( @trapmode == 5 ) ; trap magnitude test = cabs( tempc + focus ) elseif ( @trapmode == 6 ) ; real test = abs( real( ztemp )) elseif ( @trapmode == 7 ) ; imaginary test = abs( imag( ztemp )) elseif ( @trapmode == 8 ) ; trap real test = abs( real( tempc )) elseif ( @trapmode == 9 ) ; trap imaginary test = abs( imag( tempc )) elseif ( @trapmode == 10 ) ; sum test = cabs( zscratch + tempc ) elseif ( @trapmode == 11 ) ; difference test = cabs( zscratch - tempc) elseif ( @trapmode == 12 ) ; product test = cabs( zscratch * tempc ) elseif ( @trapmode == 13 ) ; quotient 1 test = cabs( zscratch / tempc ) elseif ( @trapmode == 14 ) ; quotient 2 test = cabs( tempc / zscratch ) elseif ( @trapmode == 15 ) ; power 1 test = cabs( zscratch ^ tempc ) elseif ( @trapmode == 16 ) ; power 2 test = cabs( tempc ^ zscratch ) elseif ( @trapmode == 17 ) ; arithmetic mean test = cabs( (zscratch + tempc)/2 ) elseif ( @trapmode == 18 ) ; geometric mean test = cabs( sqrt( zscratch * tempc )) elseif ( @trapmode == 19 ) ; angle 2 test = atan2( zscratch - tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 20 ) ; angle 3 test = atan2( zscratch + tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 21 ) ; angle 4 test = atan2( zscratch * tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 22 ) ; angle 5 test = atan2( zscratch / tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 23 ) ; angle 6 test = atan2( tempc / zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 24 ) ; angle 7 test = atan2( zscratch ^ tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 25 ) ; angle 8 test = atan2( tempc ^ zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 26 ) ; real 2 test = abs( real( zscratch - tempc )) elseif ( @trapmode == 27 ) ; real 3 test = abs( real( zscratch + tempc )) elseif ( @trapmode == 28 ) ; real 4 test = abs( real( zscratch * tempc )) elseif ( @trapmode == 29 ) ; real 5 test = abs( real( zscratch / tempc )) elseif ( @trapmode == 30 ) ; real 6 test = abs( real( tempc / zscratch )) elseif ( @trapmode == 31 ) ; real 7 test = abs( real( zscratch ^ tempc )) elseif ( @trapmode == 32 ) ; real 8 test = abs( real( tempc ^ zscratch )) elseif ( @trapmode == 33 ) ; imag 2 test = abs( imag( zscratch - tempc )) elseif ( @trapmode == 34 ) ; imag 3 test = abs( imag( zscratch + tempc )) elseif ( @trapmode == 35 ) ; imag 4 test = abs( imag( zscratch * tempc )) elseif ( @trapmode == 36 ) ; imag 5 test = abs( imag( zscratch / tempc )) elseif ( @trapmode == 37 ) ; imag 6 test = abs( imag( tempc / zscratch )) elseif ( @trapmode == 38 ) ; imag 7 test = abs( imag( zscratch ^ tempc )) elseif ( @trapmode == 39 ) ; imag 8 test = abs( imag( tempc ^ zscratch )) endif ; trapmode if ( @whattotrap == 0 ) ; minimum if ( test < trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 1 ) ; maximum if ( test > trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 2 ) ; 2nd minimum if ( test < trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 3 ) ; 3rd minimum if ( test < trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 4 ) ; 4th minimum if ( test < trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 5 ) ; 2nd maximum if ( test > trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 6 ) ; 3rd maximum if ( test > trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 7 ) ; 4th maximum if ( test > trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 8 ) ; 1st to dip below threshold value if ( itrapped == 0 ) ; nothing trapped yet if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 9 ) ; last to dip below threshold --- just store them all if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 10 ) ; count dips below threshold --- store the last if ( test < thresh ) count = count + 1 if !@ringstyle trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE elseif test > innerradius trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 11 ) ; 2nd to dip below threshold value if ( test < thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 12 ) ; 1st to exceed threshold limit if ( itrapped == 0 ) ; nothing trapped yet if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 13 ) ; 2nd to exceed threshold limit if ( test > thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 14 ) ; last to exceed threshold --- just store them all if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif @whattotrap > 14 ; maximum/minimum combos; need to find & store both ; trapped2 will hold he max, trapped1 the min if test < trapped1 ; is it a new min? trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > trapped2 ; is it a new max? trapped2 = test, itrapped2 = iter, zatrapped2 = zangle, catrapped2 = cangle ztrapped2 = #z, zttrapped2 = ztemp, ctrapped2 = tempc, trapped = TRUE endif ; test endif ; whattotrap if ( @varymode == 0 ) ; feedback only on iterations where something was trapped vary = trapped elseif ( @varymode == 1 ) ; feedback when nothing was trapped vary = !trapped else ; feedback on each iteration, if enabled for a given parameter vary = TRUE endif ; varymode trapped = FALSE ; reset flag for next iteration if vary ; vary chosen parameter if set float value = 0.0 if @oldstyle value = cabs(ctrapped) sign = real(ctrapped)/abs(real(ctrapped)) else value = cabs(ztemp) sign = real(ztemp)/abs(real(ztemp)) endif ; oldstyle if @varyrotation rotation = rotation + rotationstep * rotation * value * sign endif ; varyrotation if @varyfocus tempx = real(focus) + focusstep * real(focus) * value * sign tempy = imag(focus) + focusstep * imag(focus) * value * sign focus = tempx + flip( tempy ) endif ; varyfocus if @varyvertex tempx = real(vertex) + vertexstep * real(vertex) * value * sign tempy = imag(vertex) + vertexstep * imag(vertex) * value * sign vertex = tempx + flip( tempy ) endif ; varyvertex if @varythresh thresh = thresh + threshstep * thresh * value * sign if @ringstyle if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; ringstyle endif ; varythresh if @varyrwidth rwidth = rwidth + ringstep * rwidth * value * sign if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; varyrwidth if @varyspread spread = spread + spreadstep * spread * value * sign endif ; varyspread if @varyturb turbulamount = turbulamount + turbstep * turbulamount * value * sign endif ; varyturb endif ; vary endif ; iter final: if ( itrapped != 0 ) ; something has been trapped if (( @whattotrap == 2 ) || ( @whattotrap == 5 )) ; we need to swap some values ; so we will plot the right thing trapped1 = trapped2, itrapped = itrapped2, zatrapped = zatrapped2, catrapped = catrapped2 ztrapped = ztrapped2, zttrapped = zttrapped2, ctrapped = ctrapped2 elseif (( @whattotrap == 3 ) || ( @whattotrap == 6 )) trapped1 = trapped3, itrapped = itrapped3, zatrapped = zatrapped3, catrapped = catrapped3 ztrapped = ztrapped3, zttrapped = zttrapped3, ctrapped = ctrapped3 elseif (( @whattotrap == 4 ) || ( @whattotrap == 7 )) trapped1 = trapped4, itrapped = itrapped4, zatrapped = zatrapped4, catrapped = catrapped4 ztrapped = ztrapped4, zttrapped = zttrapped4, ctrapped = ctrapped4 elseif @whattotrap == 15 ; max-min trapped1 = trapped2-trapped1, itrapped = itrapped2-itrapped zatrapped = zatrapped2-zatrapped, catrapped = catrapped2-catrapped ztrapped = ztrapped2-ztrapped, zttrapped = zttrapped2-zttrapped ctrapped = ctrapped2-ctrapped elseif @whattotrap == 16 ; max+min trapped1 = trapped2+trapped1, itrapped = itrapped2+itrapped zatrapped = zatrapped2+zatrapped, catrapped = catrapped2+catrapped ztrapped = ztrapped2+ztrapped, zttrapped = zttrapped2+zttrapped ctrapped = ctrapped2+ctrapped elseif @whattotrap == 17 ; max*min trapped1 = trapped2*trapped1, itrapped = itrapped2*itrapped zatrapped = zatrapped2*zatrapped, catrapped = catrapped2*catrapped ztrapped = ztrapped2*ztrapped, zttrapped = zttrapped2*zttrapped ctrapped = ctrapped2*ctrapped elseif @whattotrap == 18 ; max/min trapped1 = trapped2/trapped1, itrapped = round(itrapped2/itrapped) zatrapped = zatrapped2/zatrapped, catrapped = catrapped2/catrapped ztrapped = ztrapped2/ztrapped, zttrapped = zttrapped2/zttrapped ctrapped = ctrapped2/ctrapped elseif @whattotrap == 19 ; max^min trapped1 = trapped2^trapped1, itrapped = round(itrapped2^itrapped) zatrapped = zatrapped2^zatrapped, catrapped = catrapped2^catrapped ztrapped = ztrapped2^ztrapped, zttrapped = zttrapped2^zttrapped ctrapped = ctrapped2^ctrapped elseif @whattotrap == 20 ; min-max trapped1 = trapped1-trapped2, itrapped = itrapped-itrapped2 zatrapped = zatrapped-zatrapped2, catrapped = catrapped-catrapped2 ztrapped = ztrapped-ztrapped2, zttrapped = zttrapped-zttrapped2 ctrapped = ctrapped-ctrapped2 elseif @whattotrap == 21 ; min/max trapped1 = trapped1/trapped2, itrapped = round(itrapped/itrapped2) zatrapped = zatrapped/zatrapped2, catrapped = catrapped/catrapped2 ztrapped = ztrapped/ztrapped2, zttrapped = zttrapped/zttrapped2 ctrapped = ctrapped/ctrapped2 elseif @whattotrap == 22 ; min^max trapped1 = trapped1^trapped2, itrapped = round(itrapped^itrapped2) zatrapped = zatrapped^zatrapped2, catrapped = catrapped^catrapped2 ztrapped = ztrapped^ztrapped2, zttrapped = zttrapped^zttrapped2 ctrapped = ctrapped^ctrapped2 elseif @whattotrap == 23 ; average: (max+min)/2 trapped1 = (trapped1+trapped2)/2, itrapped = trunc((itrapped+itrapped2)/2) zatrapped = (zatrapped+zatrapped2)/2, catrapped = (catrapped+catrapped2)/2 ztrapped = (ztrapped+ztrapped2)/2, zttrapped = (zttrapped+zttrapped2)/2 ctrapped = (ctrapped+ctrapped2)/2 endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; product1 ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; distance temp = cabs( zttrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask elseif ( @colorby == 1 ) ; iteration if @mask if itrapped < @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp elseif @revmask if itrapped > @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp else _color = 0.3 * spread * itrapped endif ; @mask elseif ( @colorby == 2 ) ; magnitude temp = cabs( ztrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp else _color = 0.25 * spread * temp endif ; @mask elseif ( @colorby == 3 ) ; test if @mask if trapped1 < @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 elseif @revmask if trapped1 > @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 else _color = spread * trapped1 endif ; @mask elseif ( @colorby == 4 ) ; trap magnitude temp = cabs(ctrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 5 ) ; angle temp = atan2( ztrapped ) if ( temp < 0 ) temp = temp + twopi endif ; temp if @mask if temp < @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp else _color = ( spread * temp ) / twopi endif ; @mask elseif ( @colorby == 6 ) ; trap angle if @mask if catrapped < @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped elseif @revmask if catrapped > @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped else _color = ( spread * catrapped ) / twopi endif ; @mask elseif ( @colorby == 7 ) ; modulated magnitude temp = cabs(zttrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 8 ) ; modulated angle if @mask if zatrapped < @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped elseif @revmask if zatrapped > @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped else _color = ( spread * zatrapped ) / twopi endif ; @mask elseif ( @colorby == 9 ) ; real temp = abs( real( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 10 ) ; trap real temp = abs( real( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 11 ) ; modulated real temp = abs( real( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 12 ) ; imaginary temp = abs( imag( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 13 ) ; trap imaginary temp = abs( imag( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 14 ) ; modulated imaginary temp = abs( imag( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 15 ) ; raw distance (distance to #z, not ztemp) temp = cabs( ztrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else if !@hideranges _color = ((_color + _coloradjust) + (itrapped % @ranges) ) / @ranges else temp = itrapped % @ranges if temp != @showrange #solid = TRUE else _color = ((_color + _coloradjust) + temp ) / @ranges endif ; temp endif ; hideranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else #solid = TRUE endif ; itrapped default: title = "Parabola Trap" param whattotrap caption = "Trap What?" enum = "minimum" "maximum" "2nd minimum" "3rd minimum" "4th minimum" "2nd maximum" \ "3rd maximum" "4th maximum" "1st threshold" "last threshold" "threshold count" \ "2nd threshold" "1st limit" "2nd limit" "last limit" "max-min" "max+min" \ "max*min" "max/min" "max^min" "min-max" "min/max" "min^max" "min,max avg" default = 0 hint = "What type of value will be trapped?" endparam param threshold caption = "Threshold Value" default = 0.5 hint = "Upper bound (maximum value that will be trapped) if one of the \ 'Threshold' options is chosen for param 'Trap What'; \ also, lower bound (minimum trapped value) if 'Trap What' is set to \ a 'Limit' option. Increase value for limit traps" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param varythresh caption = "Vary Threshold?" default = FALSE hint = "If set, the value of the trap will modify the value of 'threshold' and 'limit' type traps \ each iteration; parameter 'ThreshFeedback' can be used to modulate the variation" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param threshstp caption = "ThreshFeedback" default = 1.0 hint = "If 'Vary Threshold' is set, this setting adjusts the amount of variation" visible = @varythresh endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Trap What' is set to a \ 'Threshold' or 'Limit' option, then 'Trap What' \ becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Trap What' is set to either a 'Threshold', \ or 'Limit' option, this parameter determines the width of the ring trap" visible = @ringstyle == TRUE endparam param varyrwidth caption = "Vary Ringwidth?" default = FALSE hint = "If set, the value of the trap will modify the ring width of 'threshold' \ and 'limit' ring-type traps each iteration; parameter 'RingFeedback' can be \ used to modulate the variation" visible = @ringstyle endparam param ringstp caption = "RingFeedback" default = 1.0 hint = "If 'Vary Ringwidth' is set, this setting adjusts the amount of variation" visible = @varyrwidth endparam param trapmode caption = "Trap Flavor" enum = "distance" "angle" "trap angle" "difference angle" "magnitude" "trap magnitude" \ "real" "imaginary" "trap real" "trap imaginary" "sum" "difference" "product" \ "quotient 1" "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "What quantity will be watched for possible trapping?" endparam param swapflavor caption = "New Flavor?" default = FALSE hint = "Try an alternately flavored trap test? Only affects flavor choices \ above 9 (sum, difference, etc)" visible = @trapmode > 9 endparam param zoommode caption = "Focus Mode" enum = "Screen Center" "Custom" default = 1 hint = "If 'Screen Center' is set, focus and vertex follow zoom with scaling; \ ; if 'Custom' is selected, focus and vertex remain fixed at selected coordinates upon zoom" endparam param focs caption = "Focus of Parabola" default = (0,0) hint = "Enter coordinates of parabola focus" visible = @zoommode == "Custom" endparam param varyfocus caption = "Vary Focus?" default = FALSE hint = "If set, the value of the trap will modify the parabola focus each iteration; \ parameter 'FocusFeedback' can be used to modulate the variation" visible = @zoommode == "Custom" endparam param focusstp caption = "FocusFeedback" default = 1.0 hint = "If 'Vary Focus' is set, this setting adjusts the amount of variation" visible = @varyfocus && ( @zoommode == "Custom" ) endparam param vertx caption = "Vertex of Parabola" default = (0,-1) hint = "Enter coordinates of parabola vertex" visible = @zoommode == "Custom" endparam param varyvertex caption = "Vary Vertex?" default = FALSE hint = "If set, the value of the trap will modify the parabola vertex each iteration; \ parameter 'VertexFeedback' can be used to modulate the variation" visible = @zoommode == "Custom" endparam param vertexstp caption = "VertexFeedback" default = 1.0 hint = "If 'Vary Vertex' is set, this setting adjusts the amount of variation" visible = @varyvertex && ( @zoommode == "Custom" ) endparam param scale caption = "Parabola Scale" default = 1.0 hint = "This value can be used to adjust the size of the parabola" endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that parabola should be rotated from its default position" endparam param varyrotation caption = "Vary Rotation?" default = FALSE hint = "If set, the value of the trap will modify the trap rotation each iteration; \ parameter 'RotationFeedback' can be used to modulate the variation" endparam param rotationstp caption = "RotationFeedback" default = 1.0 hint = "If 'Vary Rotation' is set, this setting adjusts the amount of variation" visible = @varyrotation endparam param sprangle caption = "Spread Angle?" default = FALSE hint = "If enabled, the angular range is spread out or compressed, \ depending on the value of param 'AngleSpread Factor'" endparam param sprangfactor caption = "AngleSpread Factor" default = 3.0 hint = "If param 'Spread Angle?' is enabled, this is the stretching or \ compression multiplier of atan(z). 1.0 corresponds to no spreading. \ Inactive if 'Spread Angle?' is not enabled" visible = @sprangle == TRUE endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to \ being fed to the trap" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" visible = @initialization == "z^power" endparam param ziscale caption = "Z Init Scale" default = 1.0 hint = "This param can be used to scale the overall iterate z \ before z initialization" endparam param initperturb caption = "Perturb Z Initialization?" default = FALSE hint = "If enabled, then 'Z Initialization' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Z Init Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @initialization != "z" endparam param initblend caption = "Z Init Blend" default = 0.1 hint = "If 'Perturb Z Initialization' is enabled, then this sets the fraction \ of 'Z Initialization' that is mixed in with the original #z. \ Inactive if 'Perturb Z Initialization' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @initperturb endparam param transmogrify caption = "Trap Transmute" enum = "t" "1/t" "t^2" "1/t^2" "log(t)" "e^t" "t^t" "sin(t)" "cos(t)" \ "tan(t)" "asin(t)" "acos(t)" "atan(t)" "sinh(t)" "cosh(t)" "tanh(t)" \ "asinh(t)" "acosh(t)" "atanh(t)" "log(1/t)" "log(log(t))" "e^-t" \ "e^(1/t)" "t^-t" "sin(t)^2" "cos(t)^2" "tan(t)^2" "cot(t)" "sec(t)" \ "csc(t)" "cot(t)^2" "sec(t)^2" "csc(t)^2" "t^t^t" "1/t^t^t" "log(-t)" \ "1/log(t)" "tlog(t)" "sin(t)/t" "cos(t)/t" "sin(t)*cos(t)" "sin(t^2)" \ "e^(-1/t)" "te^t" "te^-t" "te^(1/t)" "te^(-1/t)" "t^3" "1/t^3" \ "acot(t)" "asec(t)" "acsc(t)" "tan(t)/t" "cot(t)/t" "sec(t)/t" \ "csc(t)/t" "tsin(t)" "tcos(t)" "ttan(t)" "tcot(t)" "tsec(t)" "tcsc(t)" \ "sin(1/t)" "cos(1/t)" "tan(1/t)" "cot(1/t)" "sec(1/t)" "csc(1/t)" \ "cotanh(t)" "sech(t)" "cosech(t)" "acoth(t)" "asech(t)" "acosech(t)" "t^power" \ "sinh(t)^2" "cosh(t)^2" "tanh(t)^2" "cotanh(t)^2" \ "sech(t)^2" "cosech(t)^2" "sinh(1/t)" "cosh(1/t)" "tanh(1/t)" \ "cotanh(1/t)" "sech(1/t)" "cosech(1/t)" "sin(t)tan(t)" "sinh(t)tanh(t)" \ "sinh(t)cosh(t)" "sinh(t)^2*cosh(t)^2" "sin(t)^2*cos(t)^2" \ "sin(1/t)*cos(1/t)" "sin(1/t)^2" "sin(t)cos(1/t)" "sin(t)sin(1/t)" \ "log(t)^2" "sin(t)sin(2t)" "e^2t" "e^-2t" "sinh(1/t)cosh(1/t)" \ "sinh(1/t)^2" "sinh(t)cosh(1/t)" "sinh(t)sinh(1/t)" "sin(t)sinh(t)" \ "sin(t)cosh(t)" "sin(t)^2*sinh(t)^2" "sin(t)e^t" "cos(t)e^t" \ "sinh(t)e^t" "cosh(t)e^t" "sin(t)log(t)" "cos(t)log(t)" "sinh(t)log(t)" \ "cosh(t)log(t)" default = 0 hint = "The point, t, on the parabola potentially trapped by z can be transformed \ prior to testing; select 't' for no transmutation. \ Transmute does not work on the following trap flavors: \ 2 (angle), 5 (magnitude), 7 (real), and 8 (imag)" endparam param tpower caption = "Trap Power" default = (0,1) hint = "Trap point t exponent if param 'Trap Transmute' is set to 't^power'" visible = @transmogrify == "t^power" endparam param tiscale caption = "Trap Scale" default = 1.0 hint = "This param can be used to scale the overall trap point t \ before transmutation" endparam param trapperturb caption = "Perturb Trap Transmute?" default = FALSE hint = "If enabled, then 'Trap Transmute' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Trap Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @transmogrify != "t" endparam param trapblend caption = "Trap Blend" default = 0.1 hint = "If 'Perturb Trap Transmute' is enabled, then this sets the fraction \ of 'Trap Transmute' that is mixed in with the original trap point, t. \ Inactive if 'Perturb Trap Transmute' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @trapperturb endparam param realfront caption = "FrontEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the initial value of real(z) before input to \ the 'Z Initialization' function. For 'r^power' set param 'FrontEndReal \ Power'" endparam param rfpower caption = "FrontEndReal Power" default = 4.0 hint = "Real(z) exponent if param 'FrontEndReal Warp' is set to 'r^power'" visible = @realfront == "r^power" endparam param rfscale caption = "Real(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param rfperturb caption = "Perturb FrontEndReal?" default = FALSE hint = "If enabled, then 'FrontEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realfront != "r" endparam param rfblend caption = "FrontEndReal Blend" default = 0.1 hint = "If 'Perturb FrontEndReal' is enabled, then this sets the fraction \ of 'FrontEndReal Warp' that is mixed in with the original real(z). \ Inactive if 'Perturb FrontEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rfperturb endparam param imagfront caption = "FrontEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the initial value of imag(z) before input to \ the 'Z Initialization' function. For 'i^power' set param 'FrontEndImag \ Power'" endparam param ifpower caption = "FrontEndImag Power" default = 4.0 hint = "Imag(z) exponent if param 'FrontEndImag Warp' is set to 'i^power'" visible = @imagfront == "i^power" endparam param ifscale caption = "Imag(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param ifperturb caption = "Perturb FrontEndImag?" default = FALSE hint = "If enabled, then 'FrontEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagfront != "i" endparam param ifblend caption = "FrontEndImag Blend" default = 0.1 hint = "If 'Perturb FrontEndImag' is enabled, then this sets the fraction \ of 'FrontEndImag Warp' that is mixed in with the original imag(z). \ Inactive if 'Perturb FrontEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ifperturb endparam param realback caption = "BackEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the final value of real(trap) before testing for \ trapping by the 'Trap What?' function. For 'r^power' set param 'BackEndReal \ Power'" endparam param rbpower caption = "BackEndReal Power" default = 4.0 hint = "Real(trap) exponent if param 'BackEndReal Warp' is set to 'r^power'" visible = @realback == "r^power" endparam param rbscale caption = "Real(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param rbperturb caption = "Perturb BackEndReal?" default = FALSE hint = "If enabled, then 'BackEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realback != "r" endparam param rbblend caption = "BackEndReal Blend" default = 0.1 hint = "If 'Perturb BackEndReal' is enabled, then this sets the fraction \ of 'BackEndReal Warp' that is mixed in with the original real(trap). \ Inactive if 'Perturb BackEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rbperturb endparam param imagback caption = "BackEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the final value of imag(trap) before testing for \ trapping by the 'Trap What?' function. For 'i^power' set param 'BackEndImag \ Power'" endparam param ibpower caption = "BackEndImag Power" default = 4.0 hint = "Imag(trap) exponent if param 'BackEndImag Warp' is set to 'i^power'" visible = @imagback == "i^power" endparam param ibscale caption = "Imag(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param ibperturb caption = "Perturb BackEndImag?" default = FALSE hint = "If enabled, then 'BackEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagback != "i" endparam param ibblend caption = "BackEndImag Blend" default = 0.1 hint = "If 'Perturb BackEndImag' is enabled, then this sets the fraction \ of 'BackEndImag Warp' that is mixed in with the original imag(trap). \ Inactive if 'Perturb BackEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ibperturb endparam param @colorby caption = "Color By?" enum = "distance" "iteration" "magnitude" "test" "trap magnitude" "angle" \ "trap angle" "mod magnitude" "mod angle" "real" "trap real" "mod real"\ "imag" "trap imag" "mod imag" "raw distance" default = 0 hint = "Criterion for computing color index" endparam param @colorspread caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" visible = @varyspread endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param hideranges caption = "Mask Color Ranges?" default = FALSE hint = "If enabled, then param 'Show Which Range?' can be set to mask pixels \ other than those in the given range. Only valid if 'Color Ranges' > 1" visible = @ranges > 1 endparam param showrange caption = "Show Which Range?" default = 0 min = 0 hint = "If 'Mask Color Ranges?' is turned on, then pixels falling in this color \ range will be visible; others will be set to the solid color. Works best \ with param 'Trap What?' set to a threshold or limit option. 0 <= param < \ 'Color Ranges'" visible = @hideranges == TRUE endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" visible = @colorwarp == "c^power" endparam param anglerestrict caption = "Restrict Angle?" default = FALSE hint = "If enabled, atan(z) is restricted to the interval 'below' the parabola; \ otherwise, it is unrestricted" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param polar caption = "Polar Coordinates?" default = TRUE hint = "Alternative interpretation of trap value" endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" visible = @operator != "none" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" visible = (( @trapvariant != "normal" ) && ( @operator != "none" )) endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" visible = @history == TRUE endparam param twavy caption = "Enable T Waviness?" default = FALSE hint = "Adds waves to the trap function. If enabled, params 'Waviness Mode', \ 'Waviness Amplitude', & 'Waviness Frequency' may be adjusted to vary \ wave character" endparam param twavmode caption = "T Wave Mode" enum = "radial" "tangential" default = 0 hint = "If 'Enable T Waviness' is on, this param sets the type of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavamp caption = "T Wave Amplitude" default = 0.1 hint = "If 'Enable T Waviness' is on, this param sets the height of the waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavfreq caption = "T Wave Frequency" default = 10.0 hint = "If 'Enable T Waviness' is on, this param sets the density of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param pointmode caption = "Enable Point Mode?" default = FALSE hint = "If set, trapping occurs normally until the first #z has been \ trapped using the usual criteria; subsequently, trapping is \ relative to this first trap point, rather than to the entire curve" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds fBm distortion to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" visible = @turb3 endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" visible = @turb3 endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" visible = @turb3 endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" visible = @turb3 endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" visible = @turb3 endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" visible = @turb3 endparam param varyturb caption = "Vary Turbulence?" default = FALSE hint = "If set, the value of the trap will modify the turbulence amount each \ iteration; parameter 'TurbulenceFeedback' can be used to modulate the variation" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param turbstp caption = "TurbulenceFeedback" default = 1.0 hint = "If 'Vary Turbulence' is set, this setting adjusts the amount of variation" visible = @varyturb endparam param mask caption = "Masking?" default = FALSE hint = "If enabled, trapped values below the 'Masking Threshold' parameter \ will be colored the solid color" visible = !@revmask endparam param revmask caption = "Reverse Masking?" default = FALSE hint = "If enabled, trapped values greater than the 'Masking Threshold' \ parameter will be colored the solid color; inactive if normal \ 'Masking' is also enabled" visible = !@mask endparam param maskthresh caption = "Masking Threshold" default = 0.1 hint = "This param is the value used for solid color masking if either \ 'Masking?' or 'Reverse Masking?' are enabled. Depending on how param \ 'Color By' is set, the value may need large adjustment (.001-10 may \ be useful)" visible = (@mask || @revmask) endparam param varymode caption = "Feedback Mode" enum = "trapped" "not trapped" "always" default = 2 hint = "Variation style; variation of individual parameters must still \ be enabled. 'trapped' -- feedback occurs only on iterations where some \ value was trapped; 'not trapped' -- varies on iterations when nothing \ trapped; 'always' -- feedback on every iteation" visible = (@varyturb || @varyfocus || @varyvertex || @varyrotation || @varythresh || @varyrwidth || @varyspread) endparam param oldstyle caption = "OldStyle Feedback?" default = FALSE hint = "Retained for compatibility with original version of this formula; \ enable if you need to render an early image utilizing this formula, \ or for a variant algorithm that generally produces less feedback variation" visible = (@varyturb || @varyfocus || @varyvertex || @varyrotation || @varythresh || @varyrwidth || @varyspread) endparam } jam-SemicubicParab1Tangents { ; jam 010904 ; A very early version of this formula had rotation entry specified in radians. ; This parameter has been changed so that it is specified in degrees, which I ; thought was easier for most. If by chance you have an image that does not render ; properly, convert your previous rotation setting to radians! init: bool trapped = FALSE int iter = 0, int count = 1 float twopi = 2.0 * #pi, float halfpi = #pi / 2.0 float sixthpi = halfpi/3.0, float fivesixthspi = 5.0 * sixthpi complex zinput = (0,0) ; translated #z float zmag = 0.0 complex ztemp = (0,0), float zangle = 0.0, float theta = 0.0 float gamma = sin( halfpi - #pi/@sides ) float sector = twopi / @sides float cangle = 0.0; parabola azimuth float angleincrement = (fivesixthspi - sixthpi) / @numberdisks float disksize = @disksz, float diskradius = disksize/2 float testradius = 0.0 ; alias for diskradius complex tpoint = (0,0) ; test point on trap float tempx = 0.0, float tempy = 0.0 ; for computing point coordinates float test = 0.0 ; misc. value used for testing int _colorrange = 0, float _coloroffset = 0.0 float _colorindex = 1/@numberdisks ; For feedback/variation options complex center = @centr, float centerstep = 0.1 * @centerstp float scale = @pscale, float scalestep = 0.1 * @scalestp float spread = @colorsprd, float spreadstep = 0.1 * @spreadstp float rotation = @rotate * #pi / 180, float rotationstep = 0.1 * @rotationstp if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation float diskstep = 0.1 * @diskstp float linewidth = @linewdth, float linestep = 0.1 * @linestp float elongation = @elongate, float ellipsestep = @ellipsestp float sign = 0.0 loop: iter = iter + 1 if ( !trapped && ( iter > @skippediters )) ; Translate fractal to be parabola-centered, and calulate rotated position of z zinput = #z - center zinput = zinput * exp( flip( -rotation )) zmag = cabs( zinput ) ; Calculate semicubical parabola-specific parameters ; Does z lie near one of the parabola shape center points? cangle = sixthpi ; reset tpoint to begin in first quadrant count = 0 ; reset repeat loop index repeat tempx = cos( cangle ), tempy = sin( cangle ) tempx = scale * tempx * tempx / ( tempy * tempy * tempy ) tpoint = tempx * exp( flip( cangle )) ; Center z temporarily at the shape center ztemp = zinput - tpoint test = cabs( ztemp ) zangle = atan2( ztemp ) ; angle with respect to shape center if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle < twopi endif ; zangle if ( @shape == 0 ) ; disk testradius = diskradius elseif ( @shape == 1 ) ; polygon zangle = zangle % sector ; 0 <= zangle < twopi/sides theta = #pi - zangle - gamma testradius = diskradius * gamma / sin( theta ) elseif ( @shape == 2 ) ; line ztemp = ztemp * exp( -flip( cangle)) ; tpoint along x-axis test = abs(imag( ztemp )), testradius = linewidth else ; ellipse testradius = diskradius * elongation / ( 1 - elongation * cos( zangle )) endif ; shape if ( test <= testradius ) ; Does z fall within one of the tangent disks? trapped = TRUE _colorrange = count - 1 if ( @colormode == 0 ) ; tangent shape-radial _coloroffset = test / diskradius elseif ( @colormode == 1 ) ; circle-radial _coloroffset = (zmag - cabs(tpoint) + diskradius)/diskradius elseif ( @colormode == 2 ) ; _color by ztemp quadrant relative to shape center if ( zangle <= halfpi ) _coloroffset = 0 elseif ( zangle <= #pi ) _coloroffset = 0.25 elseif ( zangle <= 3 * halfpi ) _coloroffset = 0.5 else _coloroffset = 0.75 endif ; zangle else ; @colormode == 3 --- continuous ztemp angle relative to shape center _coloroffset = zangle / twopi endif ; _colormode endif ; test cangle = cangle + angleincrement ; get ready for next tpoint on parabola count = count + 1 until ( trapped || ( count > @numberdisks )) ; tempx if !trapped ; vary chosen parameter if set sign = real(zinput)/abs(real(zinput)) if @varyrotation rotation = rotation + rotationstep * rotation * zmag * sign endif ; varyrotation if @varycenter tempx = real(center) + centerstep * real(center) * zmag * sign tempy = imag(center) + centerstep * imag(center) * zmag * sign center = tempx + flip( tempy ) endif ; varycenter if @varyscale scale = scale + scalestep * scale * zmag * sign endif ; varyscale if @varydisksz disksize = disksize + diskstep * disksize * zmag * sign endif ; varydisksz if @varyspread spread = spread + spreadstep * spread * zmag * sign endif ; varyspread if @varyline linewidth = linewidth + linestep * linewidth * zmag * sign endif ; varyline if @varyellipse elongation = elongation + ellipsestep * elongation * zmag * sign endif ; varyellipse endif ; !trapped2 endif ; !trapped1 final: if trapped if @onerange #index = _coloroffset else #index = @colorsprd * _colorindex * ( _colorrange + _coloroffset ) endif ; onerange else #solid = TRUE endif ; trapped default: title = "Semicub1 Tangents" param shape caption = "Tangent Shape" enum = "disk" "polygon" "line" "ellipse" default = 0 hint = "Determines shape of tangent trap" endparam param disksz caption = "Shape Size" default = 0.4 hint = "Enter size of tangent shapes. For 'Tangent Shape' = line, this is the line length; \ line width is set by parameter 'Line Width'" endparam param numberdisks caption = "Shape Number" default = 7 min = 1 hint = "This parameter determines how many shape traps are placed along the primary parabola path" endparam param centr caption = "Sparabola Center" default = (0, 0) hint = "These are the coordinates of the semicubical parabola 'center'" endparam param pscale caption = "Sparabola Scale" default = 1.0 hint = "This parameter affects the overall size of the semicubical parabola" endparam param rotate caption = "Rotation" default = 0.0 min = -179.9 max = 359.9 hint = "Enter amount of rotation from default of the parabola (0-359 degrees)" endparam param @colorsprd caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param @colormode caption = "Coloring Mode" enum = "ShapeRadial" "FocusRadial" "Quadrant" "Angle" default = 0 hint = "'ShapeRadial' means color index increases from tangent shape center outwards; \ 'FocusRadial' means index increases from trap center outward" endparam param sides caption = "Polygon Order" default = 4 min = 3 hint = "Enter number of sides of polygon" endparam param linewdth caption = "Line Width" default = 0.01 hint = "This is the width of the line if 'Tangent Shape' is set to 'line'" endparam param elongate caption = "Ellipse Eccentricity" default = 0.6 min = 0.0 max = 0.95 hint = "This setting (0.0-0.95)affects the elongation of the ellipse if 'Tangent Shape' \ is set to 'ellipse'; 0.0 reverts to a circle" endparam param varydisksz caption = "Vary Shape?" default = FALSE hint = "If set, the value of the trap will modify the tangent shape radius each iteration; \ parameter 'ShapeFeedback' can be used to modulate the variation" endparam param diskstp caption = "ShapeFeedback" default = 1.0 hint = "If 'Vary Shape' is set, this setting adjusts the amount of variation" endparam param varyrotation caption = "Vary Rotation?" default = FALSE hint = "If set, the value of the trap will modify the parabola rotation each iteration; \ parameter 'RotationFeedback' can be used to modulate the variation" endparam param rotationstp caption = "RotationFeedback" default = 1.0 hint = "If 'Vary Rotation' is set, this setting adjusts the amount of variation" endparam param varyscale caption = "Vary Scale?" default = FALSE hint = "If set, the value of the trap will modify the parabola size each iteration; \ parameter 'ScaleFeedback' can be used to modulate the variation" endparam param scalestp caption = "ScaleFeedback" default = 1.0 hint = "If 'Vary Scale' is set, this setting adjusts the amount of variation" endparam param varycenter caption = "Vary Center?" default = FALSE hint = "If set, the value of the trap will modify the parabola focus each iteration; \ parameter 'CenterFeedback' can be used to modulate the variation" endparam param centerstp caption = "CenterFeedback" default = 1.0 hint = "If 'Vary Center' is set, this setting adjusts the amount of variation" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" endparam param varyline caption = "Vary LineWidth?" default = FALSE hint = "If set, the value of the trap will modify the line width each \ iteration; parameter 'LineFeedback' can be used to modulate the variation. \ Only applies to 'Tangent Shape' = 'line'" endparam param linestp caption = "LineFeedback" default = 1.0 hint = "If 'Vary LineWidth' is set, this setting adjusts the amount of variation" endparam param varyellipse caption = "Vary Eccentricity?" default = FALSE hint = "If set, the value of the trap will modify the ellipse elongation each \ iteration; parameter 'EllipseFeedback' can be used to modulate the variation. \ Only applies to 'Tangent Shape' = 'ellipse'" endparam param ellipsestp caption = "EllipseFeedback" default = 1.0 hint = "If 'Vary Eccentricity' is set, this setting adjusts the amount of variation" endparam param onerange caption = "Single Range?" default = FALSE hint = "If enabled, a single color range will be used; otherwise, the number of \ color ranges is equal to the number of tangent shapes set by 'Shape Number'" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam } jam-NephroidTrap { ; jam version 010910 ; The nephroid is an epicycloid defined by x = a(3cos(theta)-cos(3*theta)), ; y = a(3sin(theta)-sin(3*theta)). init: float twopi = 2.0 * #pi ; Change and scale variables to facilitate variation, if selected float spread = @colorspread, float spreadstep = 0.05 * @spreadstp float thresh = @threshold, float threshstep = 0.05 * @threshstp float scale = @nscale, float scalestep = 0.05 * @scalestp float ringstep = 0.05 * @ringstp, float rwidth = @ringwidth float rotation = @rotate * #pi / 180, float rotationstep = 0.05 * @rotationstp if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation complex center = @centr, float centerstep = @centerstp float sign = 0.0 bool trapped = FALSE bool vary = TRUE float innerradius = thresh - @ringwidth if ( @whattotrap > 11 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, float _color = 0.0 complex zlast = (0,0), complex tlast = (1,0), float turbstep = @turbstp complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex zold2 = (0,0) float rfbcomp = 1-@rfblend, float ifbcomp = 1-@ifblend float rbbcomp = 1-@rbblend, float ibbcomp = 1-@ibblend float trapbcomp = 1-@trapblend, float initbcomp = 1-@initblend if @towatch == 0 int watch = #maxiter else int watch = @skippediters + @towatch endif ; towatch int iter = 0, int count = 0 int itrapped = int itrapped2 = int itrapped3 = int itrapped4 = 0 float test = 0.0, float trapped1 = float trapped2 = float trapped3 = float trapped4 = 1e9 float zangle = 0.0, float zatrapped = float zatrapped2 = float zatrapped3 = float zatrapped4 = 0.0 float cangle = 0.0, float catrapped = float catrapped2 = float catrapped3 = float catrapped4 = 0.0 complex ztrapped = complex ztrapped2 = complex ztrapped3 = complex ztrapped4 = (0,0) complex ztemp = complex zttrapped = complex zttrapped2 = complex zttrapped3 = complex zttrapped4 = (0,0) complex tempc = complex ctrapped = complex ctrapped2 = complex ctrapped3 = complex ctrapped4 = (0,0) float tempx = 0.0, float tempy = 0.0, float temp = 0.0, float temp2 = 0.0 complex zinput = (0,0) ; If we're trapping something big, initialize small if (( @whattotrap == 1 ) || ( @whattotrap == 5 ) || ( @whattotrap == 6 ) \ || ( @whattotrap == 7 )) trapped1 = trapped2 = trapped3 = trapped4 = -1e9 elseif @whattotrap > 14 trapped2 = -1e9 ; used to store the max when looking for min-max, min+max, etc. endif ; trapmode loop: iter = iter + 1 if ( iter > @skippediters ) && ( iter <= watch ) ; finished skipping --- start testing for trap ; Initialize front end real, front end imag, if desired temp2 = @rfscale * real(#z) if ( @realfront == 0 ) tempx = temp2 elseif ( @realfront == 1 ) tempx = 1/temp2 elseif ( @realfront == 2 ) tempx = temp2 * temp2 elseif ( @realfront == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realfront == 4 ) tempx = log(temp2) elseif ( @realfront == 5 ) tempx = exp( temp2) elseif ( @realfront == 6 ) tempx = temp2^temp2 elseif ( @realfront == 7 ) tempx = sin( temp2 ) elseif ( @realfront == 8 ) tempx = cos( temp2 ) elseif ( @realfront == 9 ) tempx = tan( temp2 ) elseif ( @realfront == 10 ) tempx = asin( temp2 ) elseif ( @realfront == 11 ) tempx = acos( temp2 ) elseif ( @realfront == 12 ) tempx = atan( temp2 ) elseif ( @realfront == 13 ) tempx = sinh( temp2 ) elseif ( @realfront == 14 ) tempx = cosh( temp2 ) elseif ( @realfront == 15 ) tempx = tanh( temp2 ) elseif ( @realfront == 16 ) tempx = asinh( temp2 ) elseif ( @realfront == 17 ) tempx = acosh( temp2 ) elseif ( @realfront == 18 ) tempx = atanh( temp2 ) elseif ( @realfront == 19 ) tempx = log( 1/temp2 ) elseif ( @realfront == 20 ) tempx = log( log( temp2 )) elseif ( @realfront == 21 ) tempx = exp( -temp2 ) elseif ( @realfront == 22 ) tempx = exp( 1/temp2 ) elseif ( @realfront == 23 ) tempx = temp2^(-temp2) elseif ( @realfront == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 27 ) tempx = cotan( temp2 ) elseif ( @realfront == 28 ) tempx = 1/cos( temp2 ) elseif ( @realfront == 29 ) tempx = 1/sin( temp2 ) elseif ( @realfront == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realfront == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realfront == 35 ) tempx = log(-temp2) elseif ( @realfront == 36 ) tempx = 1/log( temp2 ) elseif ( @realfront == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realfront == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realfront == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realfront == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realfront == 41 ) tempx = sin( temp2^2 ) elseif ( @realfront == 42 ) tempx = exp( -1/temp2 ) elseif ( @realfront == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realfront == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realfront == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realfront == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realfront == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realfront == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realfront == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realfront == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realfront == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realfront == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realfront == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realfront == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realfront == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realfront == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realfront == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realfront == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realfront == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realfront == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realfront == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realfront == 62 ) tempx = sin( 1/temp2 ) elseif ( @realfront == 63 ) tempx = cos( 1/temp2 ) elseif ( @realfront == 64 ) tempx = tan( 1/temp2 ) elseif ( @realfront == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realfront == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realfront == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realfront == 68 ) tempx = cotanh( temp2 ) elseif ( @realfront == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realfront == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realfront == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realfront == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realfront == 73 ) tempx = asinh( 1/temp2 ) elseif @realfront == 74 tempx = temp2^@rfpower elseif @realfront == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realfront == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realfront == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realfront == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realfront == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realfront == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realfront == 81 tempx = sinh(1/temp2) elseif @realfront == 82 tempx = cosh(1/temp2) elseif @realfront == 83 tempx = tanh(1/temp2) elseif @realfront == 84 tempx = cotanh(1/temp2) elseif @realfront == 85 tempx = 1/cosh(1/temp2) elseif @realfront == 86 tempx = 1/sinh(1/temp2) elseif @realfront == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realfront == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realfront == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realfront == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realfront == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realfront == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realfront == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realfront == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realfront == 98 tempx = exp(2*temp2) elseif @realfront == 99 tempx = exp(-2*temp2) elseif @realfront == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realfront == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realfront == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realfront == 104 tempx = sin(temp2) * sinh(temp2) elseif @realfront == 105 tempx = sin(temp2) * cosh(temp2) elseif @realfront == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 107 tempx = sin(temp2)*exp(temp2) elseif @realfront == 108 tempx = cos(temp2)*exp(temp2) elseif @realfront == 109 tempx = sinh(temp2)*exp(temp2) elseif @realfront == 110 tempx = cosh(temp2)*exp(temp2) elseif @realfront == 111 tempx = sin(temp2)*log(temp2) elseif @realfront == 112 tempx = cos(temp2)*log(temp2) elseif @realfront == 113 tempx = sinh(temp2)*log(temp2) else ; @realfront == 114 tempx = cosh(temp2)*log(temp2) endif ; realfront if @rfperturb tempx = @rfblend * tempx + rfbcomp * real(#z) endif ; @rfperturb temp2 = @ifscale * imag(#z) if ( @imagfront == 0 ) tempy = temp2 elseif ( @imagfront == 1 ) tempy = 1/temp2 elseif ( @imagfront == 2 ) tempy = temp2 * temp2 elseif ( @imagfront == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagfront == 4 ) tempy = log(temp2) elseif ( @imagfront == 5 ) tempy = exp( temp2) elseif ( @imagfront == 6 ) tempy = temp2^temp2 elseif ( @imagfront == 7 ) tempy = sin( temp2 ) elseif ( @imagfront == 8 ) tempy = cos( temp2 ) elseif ( @imagfront == 9 ) tempy = tan( temp2 ) elseif ( @imagfront == 10 ) tempy = asin( temp2 ) elseif ( @imagfront == 11 ) tempy = acos( temp2 ) elseif ( @imagfront == 12 ) tempy = atan( temp2 ) elseif ( @imagfront == 13 ) tempy = sinh( temp2 ) elseif ( @imagfront == 14 ) tempy = cosh( temp2 ) elseif ( @imagfront == 15 ) tempy = tanh( temp2 ) elseif ( @imagfront == 16 ) tempy = asinh( temp2 ) elseif ( @imagfront == 17 ) tempy = acosh( temp2 ) elseif ( @imagfront == 18 ) tempy = atanh( temp2 ) elseif ( @imagfront == 19 ) tempy = log( 1/temp2 ) elseif ( @imagfront == 20 ) tempy = log( log( temp2 )) elseif ( @imagfront == 21 ) tempy = exp( -temp2 ) elseif ( @imagfront == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagfront == 23 ) tempy = temp2^(-temp2) elseif ( @imagfront == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 27 ) tempy = cotan( temp2 ) elseif ( @imagfront == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagfront == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagfront == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagfront == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagfront == 35 ) tempy = log(-temp2) elseif ( @imagfront == 36 ) tempy = 1/log( temp2 ) elseif ( @imagfront == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagfront == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagfront == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagfront == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagfront == 41 ) tempy = sin( temp2^2 ) elseif ( @imagfront == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagfront == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagfront == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagfront == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagfront == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagfront == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagfront == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagfront == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagfront == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagfront == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagfront == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagfront == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagfront == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagfront == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagfront == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagfront == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagfront == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagfront == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagfront == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagfront == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagfront == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagfront == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagfront == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagfront == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagfront == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagfront == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagfront == 68 ) tempy = cotanh( temp2 ) elseif ( @imagfront == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagfront == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagfront == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagfront == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagfront == 73 ) tempy = asinh( 1/temp2 ) elseif @imagfront == 74 tempy = temp2^@ifpower elseif @imagfront == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagfront == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagfront == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagfront == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagfront == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagfront == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagfront == 81 tempy = sinh(1/temp2) elseif @imagfront == 82 tempy = cosh(1/temp2) elseif @imagfront == 83 tempy = tanh(1/temp2) elseif @imagfront == 84 tempy = cotanh(1/temp2) elseif @imagfront == 85 tempy = 1/cosh(1/temp2) elseif @imagfront == 86 tempy = 1/sinh(1/temp2) elseif @imagfront == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagfront == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagfront == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagfront == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagfront == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagfront == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagfront == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagfront == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagfront == 98 tempy = exp(2*temp2) elseif @imagfront == 99 tempy = exp(-2*temp2) elseif @imagfront == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagfront == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagfront == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagfront == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagfront == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagfront == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 107 tempy = sin(temp2)*exp(temp2) elseif @imagfront == 108 tempy = cos(temp2)*exp(temp2) elseif @imagfront == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagfront == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagfront == 111 tempy = sin(temp2)*log(temp2) elseif @imagfront == 112 tempy = cos(temp2)*log(temp2) elseif @imagfront == 113 tempy = sinh(temp2)*log(temp2) else ; @imagfront == 114 tempy = cosh(temp2)*log(temp2) endif ; imagfront if @ifperturb tempy = @ifblend * tempy + ifbcomp * imag(#z) endif ; @ifperturb zold = tempx + flip(tempy) ; Initialize z, if desired zold = @ziscale * zold if ( @initialization == 0 ) zinput = zold elseif ( @initialization == 1 ) zinput = 1/zold elseif ( @initialization == 2 ) zinput = zold * zold elseif ( @initialization == 3 ) zinput = 1 / ( zold * zold ) elseif ( @initialization == 4 ) zinput = log(zold) elseif ( @initialization == 5 ) zinput = exp( zold) elseif ( @initialization == 6 ) zinput = zold^zold elseif ( @initialization == 7 ) zinput = sin( zold ) elseif ( @initialization == 8 ) zinput = cos( zold ) elseif ( @initialization == 9 ) zinput = tan( zold ) elseif ( @initialization == 10 ) zinput = asin( zold ) elseif ( @initialization == 11 ) zinput = acos( zold ) elseif ( @initialization == 12 ) zinput = atan( zold ) elseif ( @initialization == 13 ) zinput = sinh( zold ) elseif ( @initialization == 14 ) zinput = cosh( zold ) elseif ( @initialization == 15 ) zinput = tanh( zold ) elseif ( @initialization == 16 ) zinput = asinh( zold ) elseif ( @initialization == 17 ) zinput = acosh( zold ) elseif ( @initialization == 18 ) zinput = atanh( zold ) elseif ( @initialization == 19 ) zinput = log( 1/zold ) elseif ( @initialization == 20 ) zinput = log( log( zold )) elseif ( @initialization == 21 ) zinput = exp( -zold ) elseif ( @initialization == 22 ) zinput = exp( 1/zold ) elseif ( @initialization == 23 ) zinput = zold^(-zold) elseif ( @initialization == 24 ) zinput = sin( zold ) zinput = zinput * zinput elseif ( @initialization == 25 ) zinput = cos( zold ) zinput = zinput * zinput elseif ( @initialization == 26 ) zinput = tan( zold ) zinput = zinput * zinput elseif ( @initialization == 27 ) zinput = cotan( zold ) elseif ( @initialization == 28 ) zinput = 1/cos( zold ) elseif ( @initialization == 29 ) zinput = 1/sin( zold ) elseif ( @initialization == 30 ) zinput = cotan( zold ) zinput = zinput * zinput elseif ( @initialization == 31 ) zinput = 1/cos( zold ) zinput = zinput * zinput elseif ( @initialization == 32 ) zinput = 1/sin( zold ) zinput = zinput * zinput elseif ( @initialization == 33 ) zinput = zold^(zold) zinput = zold^zinput elseif ( @initialization == 34 ) zinput = zold^(zold) zinput = 1/( zold^zinput ) elseif ( @initialization == 35 ) zinput = log(-zold) elseif ( @initialization == 36 ) zinput = 1/log( zold ) elseif ( @initialization == 37 ) zinput = zold * log( zold ) elseif ( @initialization == 38 ) zinput = sin( zold ) / zold elseif ( @initialization == 39 ) zinput = cos( zold ) / zold elseif ( @initialization == 40 ) zinput = sin( zold ) * cos( zold ) elseif ( @initialization == 41 ) zinput = sin( zold^2 ) elseif ( @initialization == 42 ) zinput = exp( -1/zold ) elseif ( @initialization == 43 ) zinput = zold * exp( zold ) elseif ( @initialization == 44 ) zinput = zold * exp( -zold ) elseif ( @initialization == 45 ) zinput = zold * exp( 1/zold ) elseif ( @initialization == 46 ) zinput = zold * exp( -1/zold ) elseif ( @initialization == 47 ) zinput = zold * zold * zold elseif ( @initialization == 48 ) zinput = 1 / ( zold * zold * zold ) elseif ( @initialization == 49 ) zinput = atan( 1 / zold ) elseif ( @initialization == 50 ) zinput = acos( 1 / zold ) elseif ( @initialization == 51 ) zinput = asin( 1 / zold ) elseif ( @initialization == 52 ) zinput = tan( zold ) / zold elseif ( @initialization == 53 ) zinput = cotan( zold ) / zold elseif ( @initialization == 54 ) zinput = 1 / ( zold * cos( zold )) elseif ( @initialization == 55 ) zinput = 1 / ( zold * sin( zold )) elseif ( @initialization == 56 ) zinput = zold * sin( zold ) elseif ( @initialization == 57 ) zinput = zold * cos( zold ) elseif ( @initialization == 58 ) zinput = zold * tan( zold ) elseif ( @initialization == 59 ) zinput = zold * cotan( zold ) elseif ( @initialization == 60 ) zinput = zold/cos( zold ) elseif ( @initialization == 61 ) zinput = zold/sin( zold ) elseif ( @initialization == 62 ) zinput = sin( 1/zold ) elseif ( @initialization == 63 ) zinput = cos( 1/zold ) elseif ( @initialization == 64 ) zinput = tan( 1/zold ) elseif ( @initialization == 65 ) zinput = cotan( 1/zold ) elseif ( @initialization == 66 ) zinput = 1/cos( 1/zold ) elseif ( @initialization == 67 ) zinput = 1/sin( 1/zold ) elseif ( @initialization == 68 ) zinput = cotanh( zold ) elseif ( @initialization == 69 ) zinput = 1/cosh( zold ) elseif ( @initialization == 70 ) zinput = 1/sinh( zold ) elseif ( @initialization == 71 ) zinput = atanh( 1/zold ) elseif ( @initialization == 72 ) zinput = acosh( 1/zold ) elseif ( @initialization == 73 ) zinput = asinh( 1/zold ) elseif @initialization == 74 zinput = zold^@zpower elseif @initialization == 75 zinput = sinh(zold) zinput = zinput * zinput elseif @initialization == 76 zinput = cosh( zold ) zinput = zinput * zinput elseif @initialization == 77 zinput = tanh(zold) zinput = zinput * zinput elseif @initialization == 78 zinput = cotanh( zold ) zinput = zinput * zinput elseif @initialization == 79 zinput = 1/cosh(zold) zinput = zinput * zinput elseif @initialization == 80 zinput = 1 / sinh( zold ) zinput = zinput * zinput elseif @initialization == 81 zinput = sinh(1/zold) elseif @initialization == 82 zinput = cosh(1/zold) elseif @initialization == 83 zinput = tanh(1/zold) elseif @initialization == 84 zinput = cotanh(1/zold) elseif @initialization == 85 zinput = 1/cosh(1/zold) elseif @initialization == 86 zinput = 1/sinh(1/zold) elseif @initialization == 87 zinput = sin( zold ) * tan(zold) elseif @initialization == 88 zinput = sinh(zold) * tanh(zold) elseif @initialization == 89 zinput = sinh(zold) * cosh(zold) elseif @initialization == 90 zinput = sinh(zold), zscratch = cosh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 91 zinput = sin(zold), zscratch = cos(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 92 zinput = 1/zold zinput = sin(zinput)*cos(zinput) elseif @initialization == 93 zinput = sin( 1/zold ) zinput = zinput*zinput elseif @initialization == 94 zinput = sin(zold) * cos(1/zold) elseif @initialization == 95 zinput = sin(zold) * sin(1/zold) elseif @initialization == 96 zinput = log(zold) zinput = zinput*zinput elseif @initialization == 97 zinput = sin(zold) * sin(2*zold) elseif @initialization == 98 zinput = exp(2*zold) elseif @initialization == 99 zinput = exp(-2*zold) elseif @initialization == 100 zinput = 1/zold zinput = sinh(zinput)*cosh(zinput) elseif @initialization == 101 zinput = sinh( 1/zold ) zinput = zinput*zinput elseif @initialization == 102 zinput = sinh(zold) * cosh(1/zold) elseif @initialization == 103 zinput = sinh(zold) * sinh(1/zold) elseif @initialization == 104 zinput = sin(zold) * sinh(zold) elseif @initialization == 105 zinput = sin(zold) * cosh(zold) elseif @initialization == 106 zinput = sin(zold), zscratch = sinh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 107 zinput = sin(zold)*exp(zold) elseif @initialization == 108 zinput = cos(zold)*exp(zold) elseif @initialization == 109 zinput = sinh(zold)*exp(zold) elseif @initialization == 110 zinput = cosh(zold)*exp(zold) elseif @initialization == 111 zinput = sin(zold)*log(zold) elseif @initialization == 112 zinput = cos(zold)*log(zold) elseif @initialization == 113 zinput = sinh(zold)*log(zold) else ; @initialization == 114 zinput = cosh(zold)*log(zold) endif ; initialization if @initperturb zinput = @initblend * zinput + initbcomp * zold endif ; @ifperturb if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication zinput = zinput * @operatee elseif @operator == 2 ; addition zinput = zinput + @operatee elseif @operator == 3 ; subtraction zinput = zinput - @operatee elseif @operator == 4 ; division zinput = zinput / @operatee elseif @operator == 5 ; exponentiation zinput = zinput ^ @operatee elseif @operator == 6 ; subtraction2 zinput = @operatee - zinput elseif @operator == 7 ; division2 zinput = @operatee / zinput elseif @operator == 8 ; exponential2 zinput = @operatee ^ zinput elseif @operator == 9 ; logarithm zinput = log(zinput) / log(@operatee) elseif @operator == 10 ; logarithm2 zinput = log(@operatee) / log(zinput) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; Find coordinates and angle of point on nephroid closest to #z (zinput) ; First, center z on the nephroid center ztemp = zinput - center ; Compute rotated #z ztemp = ztemp * exp( flip( -rotation)) if @history if @histype == 0 zold2 = ztemp - zold2, ztemp = zold2 elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold2, zold2 = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold2, zold2 = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp ; Now find angle of 'rotated' #z zangle = atan2( ztemp ) if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle <= two pi endif ; zangle if @sprangle temp = zangle*@sprangfactor else temp = zangle endif ; @sprangle ; Find point on nephroid (i.e., on origin-#z radial vector) tempx = scale * ( 3 * cos(temp) - cos( 3 * temp)) tempy = scale * ( 3 * sin(temp) - sin( 3 * temp)) tempc = tempx + flip( tempy ) if @polar if @mutantpolar tempc = abs(tempx) * exp( flip( tempy )) else tempc = (tempx/cos(zangle)) * exp( flip( zangle )) endif ; @mutantpolar endif ; @polar zold = tempc ; Now transmute the trapped point of the trapping curve if desired tempc = @tiscale * tempc if @transmogrify != 0 if ( @transmogrify == 1 ) tempc = 1/tempc elseif ( @transmogrify == 2 ) tempc = tempc * tempc elseif ( @transmogrify == 3 ) tempc = 1 / ( tempc * tempc ) elseif ( @transmogrify == 4 ) tempc = log(tempc) elseif ( @transmogrify == 5 ) tempc = exp( tempc) elseif ( @transmogrify == 6 ) tempc = tempc^tempc elseif ( @transmogrify == 7 ) tempc = sin( tempc ) elseif ( @transmogrify == 8 ) tempc = cos( tempc ) elseif ( @transmogrify == 9 ) tempc = tan( tempc ) elseif ( @transmogrify == 10 ) tempc = asin( tempc ) elseif ( @transmogrify == 11 ) tempc = acos( tempc ) elseif ( @transmogrify == 12 ) tempc = atan( tempc ) elseif ( @transmogrify == 13 ) tempc = sinh( tempc ) elseif ( @transmogrify == 14 ) tempc = cosh( tempc ) elseif ( @transmogrify == 15 ) tempc = tanh( tempc ) elseif ( @transmogrify == 16 ) tempc = asinh( tempc ) elseif ( @transmogrify == 17 ) tempc = acosh( tempc ) elseif ( @transmogrify == 18 ) tempc = atanh( tempc ) elseif ( @transmogrify == 19 ) tempc = log( 1/tempc ) elseif ( @transmogrify == 20 ) tempc = log( log( tempc )) elseif ( @transmogrify == 21 ) tempc = exp( -tempc ) elseif ( @transmogrify == 22 ) tempc = exp( 1/tempc ) elseif ( @transmogrify == 23 ) tempc = tempc^(-tempc) elseif ( @transmogrify == 24 ) tempc = sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 25 ) tempc = cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 26 ) tempc = tan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 27 ) tempc = cotan( tempc ) elseif ( @transmogrify == 28 ) tempc = 1/cos( tempc ) elseif ( @transmogrify == 29 ) tempc = 1/sin( tempc ) elseif ( @transmogrify == 30 ) tempc = cotan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 31 ) tempc = 1/cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 32 ) tempc = 1/sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 33 ) tempc = tempc^(tempc) tempc = tempc^tempc elseif ( @transmogrify == 34 ) tempc = tempc^(tempc) tempc = 1/( tempc^tempc ) elseif ( @transmogrify == 35 ) tempc = log(-tempc) elseif ( @transmogrify == 36 ) tempc = 1/log( tempc ) elseif ( @transmogrify == 37 ) tempc = tempc * log( tempc ) elseif ( @transmogrify == 38 ) tempc = sin( tempc ) / tempc elseif ( @transmogrify == 39 ) tempc = cos( tempc ) / tempc elseif ( @transmogrify == 40 ) tempc = sin( tempc ) * cos( tempc ) elseif ( @transmogrify == 41 ) tempc = sin( tempc^2 ) elseif ( @transmogrify == 42 ) tempc = exp( -1/tempc ) elseif ( @transmogrify == 43 ) tempc = tempc * exp( tempc ) elseif ( @transmogrify == 44 ) tempc = tempc * exp( -tempc ) elseif ( @transmogrify == 45 ) tempc = tempc * exp( 1/tempc ) elseif ( @transmogrify == 46 ) tempc = tempc * exp( -1/tempc ) elseif ( @transmogrify == 47 ) tempc = tempc * tempc * tempc elseif ( @transmogrify == 48 ) tempc = 1 / ( tempc * tempc * tempc ) elseif ( @transmogrify == 49 ) tempc = atan( 1 / tempc ) elseif ( @transmogrify == 50 ) tempc = acos( 1 / tempc ) elseif ( @transmogrify == 51 ) tempc = asin( 1 / tempc ) elseif ( @transmogrify == 52 ) tempc = tan( tempc ) / tempc elseif ( @transmogrify == 53 ) tempc = cotan( tempc ) / tempc elseif ( @transmogrify == 54 ) tempc = 1 / ( tempc * cos( tempc )) elseif ( @transmogrify == 55 ) tempc = 1 / ( tempc * sin( tempc )) elseif ( @transmogrify == 56 ) tempc = tempc * sin( tempc ) elseif ( @transmogrify == 57 ) tempc = tempc * cos( tempc ) elseif ( @transmogrify == 58 ) tempc = tempc * tan( tempc ) elseif ( @transmogrify == 59 ) tempc = tempc * cotan( tempc ) elseif ( @transmogrify == 60 ) tempc = tempc/cos( tempc ) elseif ( @transmogrify == 61 ) tempc = tempc/sin( tempc ) elseif ( @transmogrify == 62 ) tempc = sin( 1/tempc ) elseif ( @transmogrify == 63 ) tempc = cos( 1/tempc ) elseif ( @transmogrify == 64 ) tempc = tan( 1/tempc ) elseif ( @transmogrify == 65 ) tempc = cotan( 1/tempc ) elseif ( @transmogrify == 66 ) tempc = 1/cos( 1/tempc ) elseif ( @transmogrify == 67 ) tempc = 1/sin( 1/tempc ) elseif ( @transmogrify == 68 ) tempc = cotanh( tempc ) elseif ( @transmogrify == 69 ) tempc = 1/cosh( tempc ) elseif ( @transmogrify == 70 ) tempc = 1/sinh( tempc ) elseif ( @transmogrify == 71 ) tempc = atanh( 1/tempc ) elseif ( @transmogrify == 72 ) tempc = acosh( 1/tempc ) elseif ( @transmogrify == 73 ) tempc = asinh( 1/tempc ) elseif @transmogrify == 74 tempc = tempc^@tpower elseif @transmogrify == 75 tempc = sinh(tempc) tempc = tempc * tempc elseif @transmogrify == 76 tempc = cosh( tempc ) tempc = tempc * tempc elseif @transmogrify == 77 tempc = tanh(tempc) tempc = tempc * tempc elseif @transmogrify == 78 tempc = cotanh( tempc ) tempc = tempc * tempc elseif @transmogrify == 79 tempc = 1/cosh(tempc) tempc = tempc * tempc elseif @transmogrify == 80 tempc = 1 / sinh( tempc ) tempc = tempc * tempc elseif @transmogrify == 81 tempc = sinh(1/tempc) elseif @transmogrify == 82 tempc = cosh(1/tempc) elseif @transmogrify == 83 tempc = tanh(1/tempc) elseif @transmogrify == 84 tempc = cotanh(1/tempc) elseif @transmogrify == 85 tempc = 1/cosh(1/tempc) elseif @transmogrify == 86 tempc = 1/sinh(1/tempc) elseif @transmogrify == 87 tempc = sin( tempc ) * tan(tempc) elseif @transmogrify == 88 tempc = sinh(tempc) * tanh(tempc) elseif @transmogrify == 89 tempc = sinh(tempc) * cosh(tempc) elseif @transmogrify == 90 zscratch = cosh(tempc) tempc = sinh(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 91 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 92 tempc = 1/tempc tempc = sin(tempc)*cos(tempc) elseif @transmogrify == 93 tempc = sin( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 94 tempc = sin(tempc) * cos(1/tempc) elseif @transmogrify == 95 tempc = sin(tempc) * sin(1/tempc) elseif @transmogrify == 96 tempc = log(tempc) tempc = tempc*tempc elseif @transmogrify == 97 tempc = sin(tempc) * sin(2*tempc) elseif @transmogrify == 98 tempc = exp(2*tempc) elseif @transmogrify == 99 tempc = exp(-2*tempc) elseif @transmogrify == 100 tempc = 1/tempc tempc = sinh(tempc)*cosh(tempc) elseif @transmogrify == 101 tempc = sinh( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 102 tempc = sinh(tempc) * cosh(1/tempc) elseif @transmogrify == 103 tempc = sinh(tempc) * sinh(1/tempc) elseif @transmogrify == 104 tempc = sin(tempc) * sinh(tempc) elseif @transmogrify == 105 tempc = sin(tempc) * cosh(tempc) elseif @transmogrify == 106 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 107 tempc = sin(tempc)*exp(tempc) elseif @transmogrify == 108 tempc = cos(tempc)*exp(tempc) elseif @transmogrify == 109 tempc = sinh(tempc)*exp(tempc) elseif @transmogrify == 110 tempc = cosh(tempc)*exp(tempc) elseif @transmogrify == 111 tempc = sin(tempc)*log(tempc) elseif @transmogrify == 112 tempc = cos(tempc)*log(tempc) elseif @transmogrify == 113 tempc = sinh(tempc)*log(tempc) else ; @transmogrify == 114 tempc = cosh(tempc)*log(tempc) endif ; transmogrify2 endif ; transmogrify1 if @trapperturb tempc = @trapblend * tempc + trapbcomp * zold endif ; @trapperturb ; Initialize back end real, back end imag, if desired temp2 = @rbscale * real(tempc) if ( @realback == 0 ) tempx = temp2 elseif ( @realback == 1 ) tempx = 1/temp2 elseif ( @realback == 2 ) tempx = temp2 * temp2 elseif ( @realback == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realback == 4 ) tempx = log(temp2) elseif ( @realback == 5 ) tempx = exp( temp2) elseif ( @realback == 6 ) tempx = temp2^temp2 elseif ( @realback == 7 ) tempx = sin( temp2 ) elseif ( @realback == 8 ) tempx = cos( temp2 ) elseif ( @realback == 9 ) tempx = tan( temp2 ) elseif ( @realback == 10 ) tempx = asin( temp2 ) elseif ( @realback == 11 ) tempx = acos( temp2 ) elseif ( @realback == 12 ) tempx = atan( temp2 ) elseif ( @realback == 13 ) tempx = sinh( temp2 ) elseif ( @realback == 14 ) tempx = cosh( temp2 ) elseif ( @realback == 15 ) tempx = tanh( temp2 ) elseif ( @realback == 16 ) tempx = asinh( temp2 ) elseif ( @realback == 17 ) tempx = acosh( temp2 ) elseif ( @realback == 18 ) tempx = atanh( temp2 ) elseif ( @realback == 19 ) tempx = log( 1/temp2 ) elseif ( @realback == 20 ) tempx = log( log( temp2 )) elseif ( @realback == 21 ) tempx = exp( -temp2 ) elseif ( @realback == 22 ) tempx = exp( 1/temp2 ) elseif ( @realback == 23 ) tempx = temp2^(-temp2) elseif ( @realback == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realback == 27 ) tempx = cotan( temp2 ) elseif ( @realback == 28 ) tempx = 1/cos( temp2 ) elseif ( @realback == 29 ) tempx = 1/sin( temp2 ) elseif ( @realback == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realback == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realback == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realback == 35 ) tempx = log(-temp2) elseif ( @realback == 36 ) tempx = 1/log( temp2 ) elseif ( @realback == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realback == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realback == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realback == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realback == 41 ) tempx = sin( temp2^2 ) elseif ( @realback == 42 ) tempx = exp( -1/temp2 ) elseif ( @realback == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realback == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realback == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realback == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realback == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realback == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realback == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realback == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realback == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realback == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realback == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realback == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realback == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realback == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realback == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realback == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realback == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realback == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realback == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realback == 62 ) tempx = sin( 1/temp2 ) elseif ( @realback == 63 ) tempx = cos( 1/temp2 ) elseif ( @realback == 64 ) tempx = tan( 1/temp2 ) elseif ( @realback == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realback == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realback == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realback == 68 ) tempx = cotanh( temp2 ) elseif ( @realback == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realback == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realback == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realback == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realback == 73 ) tempx = asinh( 1/temp2 ) elseif @realback == 74 tempx = temp2^@rbpower elseif @realback == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realback == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realback == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realback == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realback == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realback == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realback == 81 tempx = sinh(1/temp2) elseif @realback == 82 tempx = cosh(1/temp2) elseif @realback == 83 tempx = tanh(1/temp2) elseif @realback == 84 tempx = cotanh(1/temp2) elseif @realback == 85 tempx = 1/cosh(1/temp2) elseif @realback == 86 tempx = 1/sinh(1/temp2) elseif @realback == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realback == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realback == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realback == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realback == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realback == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realback == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realback == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realback == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realback == 98 tempx = exp(2*temp2) elseif @realback == 99 tempx = exp(-2*temp2) elseif @realback == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realback == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realback == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realback == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realback == 104 tempx = sin(temp2) * sinh(temp2) elseif @realback == 105 tempx = sin(temp2) * cosh(temp2) elseif @realback == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 107 tempx = sin(temp2)*exp(temp2) elseif @realback == 108 tempx = cos(temp2)*exp(temp2) elseif @realback == 109 tempx = sinh(temp2)*exp(temp2) elseif @realback == 110 tempx = cosh(temp2)*exp(temp2) elseif @realback == 111 tempx = sin(temp2)*log(temp2) elseif @realback == 112 tempx = cos(temp2)*log(temp2) elseif @realback == 113 tempx = sinh(temp2)*log(temp2) else ; @realback == 114 tempx = cosh(temp2)*log(temp2) endif ; realback if @rbperturb tempx = @rbblend * tempx + rbbcomp * real(tempc) endif ; @rbperturb temp2 = @ibscale * imag(tempc) if ( @imagback == 0 ) tempy = temp2 elseif ( @imagback == 1 ) tempy = 1/temp2 elseif ( @imagback == 2 ) tempy = temp2 * temp2 elseif ( @imagback == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagback == 4 ) tempy = log(temp2) elseif ( @imagback == 5 ) tempy = exp( temp2) elseif ( @imagback == 6 ) tempy = temp2^temp2 elseif ( @imagback == 7 ) tempy = sin( temp2 ) elseif ( @imagback == 8 ) tempy = cos( temp2 ) elseif ( @imagback == 9 ) tempy = tan( temp2 ) elseif ( @imagback == 10 ) tempy = asin( temp2 ) elseif ( @imagback == 11 ) tempy = acos( temp2 ) elseif ( @imagback == 12 ) tempy = atan( temp2 ) elseif ( @imagback == 13 ) tempy = sinh( temp2 ) elseif ( @imagback == 14 ) tempy = cosh( temp2 ) elseif ( @imagback == 15 ) tempy = tanh( temp2 ) elseif ( @imagback == 16 ) tempy = asinh( temp2 ) elseif ( @imagback == 17 ) tempy = acosh( temp2 ) elseif ( @imagback == 18 ) tempy = atanh( temp2 ) elseif ( @imagback == 19 ) tempy = log( 1/temp2 ) elseif ( @imagback == 20 ) tempy = log( log( temp2 )) elseif ( @imagback == 21 ) tempy = exp( -temp2 ) elseif ( @imagback == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagback == 23 ) tempy = temp2^(-temp2) elseif ( @imagback == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 27 ) tempy = cotan( temp2 ) elseif ( @imagback == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagback == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagback == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagback == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagback == 35 ) tempy = log(-temp2) elseif ( @imagback == 36 ) tempy = 1/log( temp2 ) elseif ( @imagback == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagback == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagback == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagback == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagback == 41 ) tempy = sin( temp2^2 ) elseif ( @imagback == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagback == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagback == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagback == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagback == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagback == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagback == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagback == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagback == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagback == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagback == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagback == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagback == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagback == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagback == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagback == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagback == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagback == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagback == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagback == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagback == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagback == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagback == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagback == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagback == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagback == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagback == 68 ) tempy = cotanh( temp2 ) elseif ( @imagback == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagback == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagback == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagback == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagback == 73 ) tempy = asinh( 1/temp2 ) elseif @imagback == 74 tempy = temp2^@ibpower elseif @imagback == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagback == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagback == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagback == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagback == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagback == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagback == 81 tempy = sinh(1/temp2) elseif @imagback == 82 tempy = cosh(1/temp2) elseif @imagback == 83 tempy = tanh(1/temp2) elseif @imagback == 84 tempy = cotanh(1/temp2) elseif @imagback == 85 tempy = 1/cosh(1/temp2) elseif @imagback == 86 tempy = 1/sinh(1/temp2) elseif @imagback == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagback == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagback == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagback == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagback == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagback == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagback == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagback == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagback == 98 tempy = exp(2*temp2) elseif @imagback == 99 tempy = exp(-2*temp2) elseif @imagback == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagback == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagback == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagback == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagback == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagback == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 107 tempy = sin(temp2)*exp(temp2) elseif @imagback == 108 tempy = cos(temp2)*exp(temp2) elseif @imagback == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagback == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagback == 111 tempy = sin(temp2)*log(temp2) elseif @imagback == 112 tempy = cos(temp2)*log(temp2) elseif @imagback == 113 tempy = sinh(temp2)*log(temp2) else ; @imagback == 114 tempy = cosh(temp2)*log(temp2) endif ; imagback if @ibperturb tempy = @ibblend * tempy + ibbcomp * imag(tempc) endif ; @ibperturb tempc = tempx + flip(tempy) cangle = atan2( tempc ) if ( cangle < 0 ) cangle = cangle + twopi endif ; cangle if @twavy if @twavmode == 0 ; radial mode temp = cabs( tempc ) temp = temp + @twavamp * temp * sin( @twavfreq * cangle ) ; vary radius tempc = temp * exp( flip( cangle )) ; compute new tempc else ; tangential mode tempx = cabs( tempc ) temp = cangle + @twavamp * cangle * sin( @twavfreq * tempx ) ; vary azimuth tempc = tempx * exp( flip( temp )) ; compute new tempc cangle = temp endif ; @twavmode endif ; @twavy if @pointmode ; compare subsequent values to first trap point on trap graph if itrapped != 0 ; some point must have already been trapped tempc = ctrapped endif; itrapped endif ; @pointmode ; Save value for later turbulence tlast = tempc if @swapflavor zscratch = ztemp else zscratch = #z endif ; swapflavor if ( @trapmode == 0 ) ; distance test = cabs( ztemp - tempc ) elseif ( @trapmode == 1 ) ; angle test = zangle elseif ( @trapmode == 2 ) ; trap angle test = cangle elseif ( @trapmode == 3 ) ; difference angle test = abs( zangle - cangle ) elseif ( @trapmode == 4 ) ; magnitude test = cabs( ztemp ) elseif ( @trapmode == 5 ) ; trap magnitude test = cabs( tempc ) elseif ( @trapmode == 6 ) ; real test = abs( real( ztemp )) elseif ( @trapmode == 7 ) ; imaginary test = abs( imag( ztemp )) elseif ( @trapmode == 8 ) ; trap real test = abs( real( tempc )) elseif ( @trapmode == 9 ) ; trap imaginary test = abs( imag( tempc )) elseif ( @trapmode == 10 ) ; sum test = cabs( zscratch + tempc ) elseif ( @trapmode == 11 ) ; difference test = cabs( zscratch - tempc) elseif ( @trapmode == 12 ) ; product test = cabs( zscratch * tempc ) elseif ( @trapmode == 13 ) ; quotient 1 test = cabs( zscratch / tempc ) elseif ( @trapmode == 14 ) ; quotient 2 test = cabs( tempc / zscratch ) elseif ( @trapmode == 15 ) ; power 1 test = cabs( zscratch ^ tempc ) elseif ( @trapmode == 16 ) ; power 2 test = cabs( tempc ^ zscratch ) elseif ( @trapmode == 17 ) ; arithmetic mean test = cabs( (zscratch + tempc)/2 ) elseif ( @trapmode == 18 ) ; geometric mean test = cabs( sqrt( zscratch * tempc )) elseif ( @trapmode == 19 ) ; angle 2 test = atan2( zscratch - tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 20 ) ; angle 3 test = atan2( zscratch + tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 21 ) ; angle 4 test = atan2( zscratch * tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 22 ) ; angle 5 test = atan2( zscratch / tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 23 ) ; angle 6 test = atan2( tempc / zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 24 ) ; angle 7 test = atan2( zscratch ^ tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 25 ) ; angle 8 test = atan2( tempc ^ zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 26 ) ; real 2 test = abs( real( zscratch - tempc )) elseif ( @trapmode == 27 ) ; real 3 test = abs( real( zscratch + tempc )) elseif ( @trapmode == 28 ) ; real 4 test = abs( real( zscratch * tempc )) elseif ( @trapmode == 29 ) ; real 5 test = abs( real( zscratch / tempc )) elseif ( @trapmode == 30 ) ; real 6 test = abs( real( tempc / zscratch )) elseif ( @trapmode == 31 ) ; real 7 test = abs( real( zscratch ^ tempc )) elseif ( @trapmode == 32 ) ; real 8 test = abs( real( tempc ^ zscratch )) elseif ( @trapmode == 33 ) ; imag 2 test = abs( imag( zscratch - tempc )) elseif ( @trapmode == 34 ) ; imag 3 test = abs( imag( zscratch + tempc )) elseif ( @trapmode == 35 ) ; imag 4 test = abs( imag( zscratch * tempc )) elseif ( @trapmode == 36 ) ; imag 5 test = abs( imag( zscratch / tempc )) elseif ( @trapmode == 37 ) ; imag 6 test = abs( imag( tempc / zscratch )) elseif ( @trapmode == 38 ) ; imag 7 test = abs( imag( zscratch ^ tempc )) elseif ( @trapmode == 39 ) ; imag 8 test = abs( imag( tempc ^ zscratch )) endif ; trapmode if ( @whattotrap == 0 ) ; minimum if ( test < trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 1 ) ; maximum if ( test > trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 2 ) ; 2nd minimum if ( test < trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 3 ) ; 3rd minimum if ( test < trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 4 ) ; 4th minimum if ( test < trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 5 ) ; 2nd maximum if ( test > trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 6 ) ; 3rd maximum if ( test > trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 7 ) ; 4th maximum if ( test > trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 8 ) ; 1st to dip below threshold value if ( itrapped == 0 ) ; nothing trapped yet if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 9 ) ; last to dip below threshold --- just store them all if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 10 ) ; count dips below threshold --- store the last if ( test < thresh ) count = count + 1 if !@ringstyle trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE elseif test > innerradius trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 11 ) ; 2nd to dip below threshold value if ( test < thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 12 ) ; 1st to exceed threshold limit if ( itrapped == 0 ) ; nothing trapped yet if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 13 ) ; 2nd to exceed threshold limit if ( test > thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 14 ) ; last to exceed threshold --- just store them all if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif @whattotrap > 14 ; maximum/minimum combos; need to find & store both ; trapped2 will hold he max, trapped1 the min if test < trapped1 ; is it a new min? trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > trapped2 ; is it a new max? trapped2 = test, itrapped2 = iter, zatrapped2 = zangle, catrapped2 = cangle ztrapped2 = #z, zttrapped2 = ztemp, ctrapped2 = tempc, trapped = TRUE endif ; test endif ; whattotrap if ( @varymode == 0 ) ; feedback only on iterations where something was trapped vary = trapped elseif ( @varymode == 1 ) ; feedback when nothing was trapped vary = !trapped else ; feedback on each iteration, if enabled for a given parameter vary = TRUE endif ; varymode trapped = FALSE ; reset flag for next iteration if vary ; vary chosen parameter if set float value = 0.0 if @oldstyle value = cabs(ctrapped) sign = real(ctrapped)/abs(real(ctrapped)) else value = cabs(ztemp) sign = real(ztemp)/abs(real(ztemp)) endif ; oldstyle if @varyrotation rotation = rotation + rotationstep * rotation * value * sign endif ; varyrotation if @varyscale scale = scale + scalestep * scale * value * sign endif ; varyscale if @varythresh thresh = thresh + threshstep * thresh * value * sign if @ringstyle if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; ringstyle endif ; varythresh if @varyrwidth rwidth = rwidth + ringstep * rwidth * value * sign if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; varyrwidth if @varyspread spread = spread + spreadstep * spread * value * sign endif ; varyspread if @varycenter tempx = real(center) + centerstep * real(center) * value * sign tempy = imag(center) + centerstep * imag(center) * value * sign center = tempx + flip( tempy ) endif ; varycenter if @varyturb turbulamount = turbulamount + turbstep * turbulamount * value * sign endif ; varyturb endif ; vary endif ; iter final: if ( itrapped != 0 ) ; something has been trapped if (( @whattotrap == 2 ) || ( @whattotrap == 5 )) ; we need to swap some values ; so we will plot the right thing trapped1 = trapped2, itrapped = itrapped2, zatrapped = zatrapped2, catrapped = catrapped2 ztrapped = ztrapped2, zttrapped = zttrapped2, ctrapped = ctrapped2 elseif (( @whattotrap == 3 ) || ( @whattotrap == 6 )) trapped1 = trapped3, itrapped = itrapped3, zatrapped = zatrapped3, catrapped = catrapped3 ztrapped = ztrapped3, zttrapped = zttrapped3, ctrapped = ctrapped3 elseif (( @whattotrap == 4 ) || ( @whattotrap == 7 )) trapped1 = trapped4, itrapped = itrapped4, zatrapped = zatrapped4, catrapped = catrapped4 ztrapped = ztrapped4, zttrapped = zttrapped4, ctrapped = ctrapped4 elseif @whattotrap == 15 ; max-min trapped1 = trapped2-trapped1, itrapped = itrapped2-itrapped zatrapped = zatrapped2-zatrapped, catrapped = catrapped2-catrapped ztrapped = ztrapped2-ztrapped, zttrapped = zttrapped2-zttrapped ctrapped = ctrapped2-ctrapped elseif @whattotrap == 16 ; max+min trapped1 = trapped2+trapped1, itrapped = itrapped2+itrapped zatrapped = zatrapped2+zatrapped, catrapped = catrapped2+catrapped ztrapped = ztrapped2+ztrapped, zttrapped = zttrapped2+zttrapped ctrapped = ctrapped2+ctrapped elseif @whattotrap == 17 ; max*min trapped1 = trapped2*trapped1, itrapped = itrapped2*itrapped zatrapped = zatrapped2*zatrapped, catrapped = catrapped2*catrapped ztrapped = ztrapped2*ztrapped, zttrapped = zttrapped2*zttrapped ctrapped = ctrapped2*ctrapped elseif @whattotrap == 18 ; max/min trapped1 = trapped2/trapped1, itrapped = round(itrapped2/itrapped) zatrapped = zatrapped2/zatrapped, catrapped = catrapped2/catrapped ztrapped = ztrapped2/ztrapped, zttrapped = zttrapped2/zttrapped ctrapped = ctrapped2/ctrapped elseif @whattotrap == 19 ; max^min trapped1 = trapped2^trapped1, itrapped = round(itrapped2^itrapped) zatrapped = zatrapped2^zatrapped, catrapped = catrapped2^catrapped ztrapped = ztrapped2^ztrapped, zttrapped = zttrapped2^zttrapped ctrapped = ctrapped2^ctrapped elseif @whattotrap == 20 ; min-max trapped1 = trapped1-trapped2, itrapped = itrapped-itrapped2 zatrapped = zatrapped-zatrapped2, catrapped = catrapped-catrapped2 ztrapped = ztrapped-ztrapped2, zttrapped = zttrapped-zttrapped2 ctrapped = ctrapped-ctrapped2 elseif @whattotrap == 21 ; min/max trapped1 = trapped1/trapped2, itrapped = round(itrapped/itrapped2) zatrapped = zatrapped/zatrapped2, catrapped = catrapped/catrapped2 ztrapped = ztrapped/ztrapped2, zttrapped = zttrapped/zttrapped2 ctrapped = ctrapped/ctrapped2 elseif @whattotrap == 22 ; min^max trapped1 = trapped1^trapped2, itrapped = round(itrapped^itrapped2) zatrapped = zatrapped^zatrapped2, catrapped = catrapped^catrapped2 ztrapped = ztrapped^ztrapped2, zttrapped = zttrapped^zttrapped2 ctrapped = ctrapped^ctrapped2 elseif @whattotrap == 23 ; average: (max+min)/2 trapped1 = (trapped1+trapped2)/2, itrapped = trunc((itrapped+itrapped2)/2) zatrapped = (zatrapped+zatrapped2)/2, catrapped = (catrapped+catrapped2)/2 ztrapped = (ztrapped+ztrapped2)/2, zttrapped = (zttrapped+zttrapped2)/2 ctrapped = (ctrapped+ctrapped2)/2 endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; product1 ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; distance temp = cabs( zttrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask elseif ( @colorby == 1 ) ; iteration if @mask if itrapped < @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp elseif @revmask if itrapped > @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp else _color = 0.3 * spread * itrapped endif ; @mask elseif ( @colorby == 2 ) ; magnitude temp = cabs( ztrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp else _color = 0.25 * spread * temp endif ; @mask elseif ( @colorby == 3 ) ; test if @mask if trapped1 < @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 elseif @revmask if trapped1 > @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 else _color = spread * trapped1 endif ; @mask elseif ( @colorby == 4 ) ; trap magnitude temp = cabs(ctrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 5 ) ; angle temp = atan2( ztrapped ) if ( temp < 0 ) temp = temp + twopi endif ; temp if @mask if temp < @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp else _color = ( spread * temp ) / twopi endif ; @mask elseif ( @colorby == 6 ) ; trap angle if @mask if catrapped < @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped elseif @revmask if catrapped > @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped else _color = ( spread * catrapped ) / twopi endif ; @mask elseif ( @colorby == 7 ) ; modulated magnitude temp = cabs(zttrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 8 ) ; modulated angle if @mask if zatrapped < @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped elseif @revmask if zatrapped > @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped else _color = ( spread * zatrapped ) / twopi endif ; @mask elseif ( @colorby == 9 ) ; real temp = abs( real( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 10 ) ; trap real temp = abs( real( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 11 ) ; modulated real temp = abs( real( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 12 ) ; imaginary temp = abs( imag( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 13 ) ; trap imaginary temp = abs( imag( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 14 ) ; modulated imaginary temp = abs( imag( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 15 ) ; raw distance (distance to #z, not ztemp) temp = cabs( ztrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else if !@hideranges _color = ((_color + _coloradjust) + (itrapped % @ranges) ) / @ranges else temp = itrapped % @ranges if temp != @showrange #solid = TRUE else _color = ((_color + _coloradjust) + temp ) / @ranges endif ; temp endif ; hideranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else #solid = TRUE endif ; itrapped default: title = "Nephroid Trap" param whattotrap caption = "Trap What?" enum = "minimum" "maximum" "2nd minimum" "3rd minimum" "4th minimum" "2nd maximum" \ "3rd maximum" "4th maximum" "1st threshold" "last threshold" "threshold count" \ "2nd threshold" "1st limit" "2nd limit" "last limit" "max-min" "max+min" \ "max*min" "max/min" "max^min" "min-max" "min/max" "min^max" "min,max avg" default = 0 hint = "What type of value will be trapped?" endparam param threshold caption = "Threshold Value" default = 0.5 hint = "Upper bound (maximum value that will be trapped) if one of the \ 'Threshold' options is chosen for param 'Trap What'; \ also, lower bound (minimum trapped value) if 'Trap What' is set to \ a 'Limit' option. Increase value for limit traps" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param varythresh caption = "Vary Threshold?" default = FALSE hint = "If set, the value of the trap will modify the value of 'threshold' and 'limit' type traps \ each iteration; parameter 'ThreshFeedback' can be used to modulate the variation" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param threshstp caption = "ThreshFeedback" default = 1.0 hint = "If 'Vary Threshold' is set, this setting adjusts the amount of variation" visible = @varythresh endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Trap What' is set to a \ 'Threshold' or 'Limit' option, then 'Trap What' \ becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Trap What' is set to either a 'Threshold', \ or 'Limit' option, this parameter determines the width of the ring trap" visible = @ringstyle == TRUE endparam param varyrwidth caption = "Vary Ringwidth?" default = FALSE hint = "If set, the value of the trap will modify the ring width of 'threshold' \ and 'limit' ring-type traps each iteration; parameter 'RingFeedback' can be \ used to modulate the variation" visible = @ringstyle endparam param ringstp caption = "RingFeedback" default = 1.0 hint = "If 'Vary Ringwidth' is set, this setting adjusts the amount of variation" visible = @varyrwidth endparam param trapmode caption = "Trap Flavor" enum = "distance" "angle" "trap angle" "difference angle" "magnitude" "trap magnitude" \ "real" "imaginary" "trap real" "trap imaginary" "sum" "difference" "product" \ "quotient 1" "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "What quantity will be watched for possible trapping?" endparam param swapflavor caption = "New Flavor?" default = FALSE hint = "Try an alternately flavored trap test? Only affects flavor choices \ above 9 (sum, difference, etc)" visible = @trapmode > 9 endparam param nscale caption = "Scale" default = 0.25 hint = "This parameter determines the size of the nephroid" endparam param varyscale caption = "Vary Scale?" default = FALSE hint = "If set, the value of the trap will modify the trap size each iteration; \ parameter 'ScaleFeedback' can be used to modulate the variation" endparam param scalestp caption = "ScaleFeedback" default = 1.0 hint = "If 'Vary Scale' is set, this setting adjusts the amount of variation" visible = @varyscale endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that the nephroid should be rotated from its default position" endparam param varyrotation caption = "Vary Rotation?" default = FALSE hint = "If set, the value of the trap will modify the trap rotation each iteration; \ parameter 'RotationFeedback' can be used to modulate the variation" endparam param rotationstp caption = "RotationFeedback" default = 1.0 hint = "If 'Vary Rotation' is set, this setting adjusts the amount of variation" visible = @varyrotation endparam param centr caption = "Center" default = (0,0) hint = "Enter coordinates of nephroid center" endparam param varycenter caption = "Vary Center?" default = FALSE hint = "If set, the value of the trap will modify the trap center each iteration; \ parameter 'CenterFeedback' can be used to modulate the variation" endparam param centerstp caption = "CenterFeedback" default = 1.0 hint = "If 'Vary Center' is set, this setting adjusts the amount of variation" visible = @varycenter endparam param sprangle caption = "Spread Angle?" default = FALSE hint = "If enabled, the angular range is spread out or compressed, \ depending on the value of param 'AngleSpread Factor'" endparam param sprangfactor caption = "AngleSpread Factor" default = 3.0 hint = "If param 'Spread Angle?' is enabled, this is the stretching or \ compression multiplier of atan(z). 1.0 corresponds to no spreading. \ Inactive if 'Spread Angle?' is not enabled" endparam param sprangfactor caption = "AngleSpread Factor" default = 3.0 hint = "If param 'Spread Angle?' is enabled, this is the stretching or \ compression multiplier of atan(z). 1.0 corresponds to no spreading. \ Inactive if 'Spread Angle?' is not enabled" visible = @sprangle == TRUE endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to \ being fed to the trap" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" visible = @initialization == "z^power" endparam param ziscale caption = "Z Init Scale" default = 1.0 hint = "This param can be used to scale the overall iterate z \ before z initialization" endparam param initperturb caption = "Perturb Z Initialization?" default = FALSE hint = "If enabled, then 'Z Initialization' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Z Init Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @initialization != "z" endparam param initblend caption = "Z Init Blend" default = 0.1 hint = "If 'Perturb Z Initialization' is enabled, then this sets the fraction \ of 'Z Initialization' that is mixed in with the original #z. \ Inactive if 'Perturb Z Initialization' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @initperturb endparam param transmogrify caption = "Trap Transmute" enum = "t" "1/t" "t^2" "1/t^2" "log(t)" "e^t" "t^t" "sin(t)" "cos(t)" \ "tan(t)" "asin(t)" "acos(t)" "atan(t)" "sinh(t)" "cosh(t)" "tanh(t)" \ "asinh(t)" "acosh(t)" "atanh(t)" "log(1/t)" "log(log(t))" "e^-t" \ "e^(1/t)" "t^-t" "sin(t)^2" "cos(t)^2" "tan(t)^2" "cot(t)" "sec(t)" \ "csc(t)" "cot(t)^2" "sec(t)^2" "csc(t)^2" "t^t^t" "1/t^t^t" "log(-t)" \ "1/log(t)" "tlog(t)" "sin(t)/t" "cos(t)/t" "sin(t)*cos(t)" "sin(t^2)" \ "e^(-1/t)" "te^t" "te^-t" "te^(1/t)" "te^(-1/t)" "t^3" "1/t^3" \ "acot(t)" "asec(t)" "acsc(t)" "tan(t)/t" "cot(t)/t" "sec(t)/t" \ "csc(t)/t" "tsin(t)" "tcos(t)" "ttan(t)" "tcot(t)" "tsec(t)" "tcsc(t)" \ "sin(1/t)" "cos(1/t)" "tan(1/t)" "cot(1/t)" "sec(1/t)" "csc(1/t)" \ "cotanh(t)" "sech(t)" "cosech(t)" "acoth(t)" "asech(t)" "acosech(t)" "t^power" \ "sinh(t)^2" "cosh(t)^2" "tanh(t)^2" "cotanh(t)^2" \ "sech(t)^2" "cosech(t)^2" "sinh(1/t)" "cosh(1/t)" "tanh(1/t)" \ "cotanh(1/t)" "sech(1/t)" "cosech(1/t)" "sin(t)tan(t)" "sinh(t)tanh(t)" \ "sinh(t)cosh(t)" "sinh(t)^2*cosh(t)^2" "sin(t)^2*cos(t)^2" \ "sin(1/t)*cos(1/t)" "sin(1/t)^2" "sin(t)cos(1/t)" "sin(t)sin(1/t)" \ "log(t)^2" "sin(t)sin(2t)" "e^2t" "e^-2t" "sinh(1/t)cosh(1/t)" \ "sinh(1/t)^2" "sinh(t)cosh(1/t)" "sinh(t)sinh(1/t)" "sin(t)sinh(t)" \ "sin(t)cosh(t)" "sin(t)^2*sinh(t)^2" "sin(t)e^t" "cos(t)e^t" \ "sinh(t)e^t" "cosh(t)e^t" "sin(t)log(t)" "cos(t)log(t)" "sinh(t)log(t)" \ "cosh(t)log(t)" default = 0 hint = "The point, t, on the nephroid potentially trapped by z can be transformed \ prior to testing; select 't' for no transmutation. \ Transmute does not work on the following trap flavors: \ 2 (angle), 5 (magnitude), 7 (real), and 8 (imag)" endparam param tpower caption = "Trap Power" default = (0,1) hint = "Trap point t exponent if param 'Trap Transmute' is set to 't^power'" visible = @transmogrify == "t^power" endparam param tiscale caption = "Trap Scale" default = 1.0 hint = "This param can be used to scale the overall trap point t \ before transmutation" endparam param trapperturb caption = "Perturb Trap Transmute?" default = FALSE hint = "If enabled, then 'Trap Transmute' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Trap Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @transmogrify != "t" endparam param trapblend caption = "Trap Blend" default = 0.1 hint = "If 'Perturb Trap Transmute' is enabled, then this sets the fraction \ of 'Trap Transmute' that is mixed in with the original trap point, t. \ Inactive if 'Perturb Trap Transmute' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @trapperturb endparam param realfront caption = "FrontEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the initial value of real(z) before input to \ the 'Z Initialization' function. For 'r^power' set param 'FrontEndReal \ Power'" endparam param rfpower caption = "FrontEndReal Power" default = 4.0 hint = "Real(z) exponent if param 'FrontEndReal Warp' is set to 'r^power'" visible = @realfront == "r^power" endparam param rfscale caption = "Real(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param rfperturb caption = "Perturb FrontEndReal?" default = FALSE hint = "If enabled, then 'FrontEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realfront != "r" endparam param rfblend caption = "FrontEndReal Blend" default = 0.1 hint = "If 'Perturb FrontEndReal' is enabled, then this sets the fraction \ of 'FrontEndReal Warp' that is mixed in with the original real(z). \ Inactive if 'Perturb FrontEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rfperturb endparam param imagfront caption = "FrontEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the initial value of imag(z) before input to \ the 'Z Initialization' function. For 'i^power' set param 'FrontEndImag \ Power'" endparam param ifpower caption = "FrontEndImag Power" default = 4.0 hint = "Imag(z) exponent if param 'FrontEndImag Warp' is set to 'i^power'" visible = @imagfront == "i^power" endparam param ifscale caption = "Imag(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param ifperturb caption = "Perturb FrontEndImag?" default = FALSE hint = "If enabled, then 'FrontEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagfront != "i" endparam param ifblend caption = "FrontEndImag Blend" default = 0.1 hint = "If 'Perturb FrontEndImag' is enabled, then this sets the fraction \ of 'FrontEndImag Warp' that is mixed in with the original imag(z). \ Inactive if 'Perturb FrontEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ifperturb endparam param realback caption = "BackEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the final value of real(trap) before testing for \ trapping by the 'Trap What?' function. For 'r^power' set param 'BackEndReal \ Power'" endparam param rbpower caption = "BackEndReal Power" default = 4.0 hint = "Real(trap) exponent if param 'BackEndReal Warp' is set to 'r^power'" visible = @realback == "r^power" endparam param rbscale caption = "Real(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param rbperturb caption = "Perturb BackEndReal?" default = FALSE hint = "If enabled, then 'BackEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realback != "r" endparam param rbblend caption = "BackEndReal Blend" default = 0.1 hint = "If 'Perturb BackEndReal' is enabled, then this sets the fraction \ of 'BackEndReal Warp' that is mixed in with the original real(trap). \ Inactive if 'Perturb BackEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rbperturb endparam param imagback caption = "BackEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the final value of imag(trap) before testing for \ trapping by the 'Trap What?' function. For 'i^power' set param 'BackEndImag \ Power'" endparam param ibpower caption = "BackEndImag Power" default = 4.0 hint = "Imag(trap) exponent if param 'BackEndImag Warp' is set to 'i^power'" visible = @imagback == "i^power" endparam param ibscale caption = "Imag(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param ibperturb caption = "Perturb BackEndImag?" default = FALSE hint = "If enabled, then 'BackEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagback != "i" endparam param ibblend caption = "BackEndImag Blend" default = 0.1 hint = "If 'Perturb BackEndImag' is enabled, then this sets the fraction \ of 'BackEndImag Warp' that is mixed in with the original imag(trap). \ Inactive if 'Perturb BackEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ibperturb endparam param @colorby caption = "Color By?" enum = "distance" "iteration" "magnitude" "test" "trap magnitude" "angle" \ "trap angle" "mod magnitude" "mod angle" "real" "trap real" "mod real"\ "imag" "trap imag" "mod imag" "raw distance" default = 0 hint = "Criterion for computing color index" endparam param @colorspread caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" visible = @varyspread endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param hideranges caption = "Mask Color Ranges?" default = FALSE hint = "If enabled, then param 'Show Which Range?' can be set to mask pixels \ other than those in the given range. Only valid if 'Color Ranges' > 1" visible = @ranges > 1 endparam param showrange caption = "Show Which Range?" default = 0 min = 0 hint = "If 'Mask Color Ranges?' is turned on, then pixels falling in this color \ range will be visible; others will be set to the solid color. Works best \ with param 'Trap What?' set to a threshold or limit option. 0 <= param < \ 'Color Ranges'" visible = @hideranges == TRUE endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" visible = @colorwarp == "c^power" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param polar caption = "Polar Coordinates?" default = FALSE hint = "Alternative interpretation of trap value" endparam param mutantpolar caption = "Mutant Polars?" default = FALSE hint = "Optional interpretation; only active if param 'Polar Coordinates' \ is also set" visible = @polar endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" visible = @operator != "none" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" visible = (( @trapvariant != "normal" ) && ( @operator != "none" )) endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" visible = @history == TRUE endparam param twavy caption = "Enable T Waviness?" default = FALSE hint = "Adds waves to the trap function. If enabled, params 'Waviness Mode', \ 'Waviness Amplitude', & 'Waviness Frequency' may be adjusted to vary \ wave character" endparam param twavmode caption = "T Wave Mode" enum = "radial" "tangential" default = 0 hint = "If 'Enable T Waviness' is on, this param sets the type of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavamp caption = "T Wave Amplitude" default = 0.1 hint = "If 'Enable T Waviness' is on, this param sets the height of the waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavfreq caption = "T Wave Frequency" default = 10.0 hint = "If 'Enable T Waviness' is on, this param sets the density of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param pointmode caption = "Enable Point Mode?" default = FALSE hint = "If set, trapping occurs normally until the first #z has been \ trapped using the usual criteria; subsequently, trapping is \ relative to this first trap point, rather than to the entire curve" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds fBm distortion to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" visible = @turb3 endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" visible = @turb3 endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" visible = @turb3 endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" visible = @turb3 endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" visible = @turb3 endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" visible = @turb3 endparam param varyturb caption = "Vary Turbulence?" default = FALSE hint = "If set, the value of the trap will modify the turbulence amount each \ iteration; parameter 'TurbulenceFeedback' can be used to modulate the variation" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param turbstp caption = "TurbulenceFeedback" default = 1.0 hint = "If 'Vary Turbulence' is set, this setting adjusts the amount of variation" visible = @varyturb endparam param mask caption = "Masking?" default = FALSE hint = "If enabled, trapped values below the 'Masking Threshold' parameter \ will be colored the solid color" visible = !@revmask endparam param revmask caption = "Reverse Masking?" default = FALSE hint = "If enabled, trapped values greater than the 'Masking Threshold' \ parameter will be colored the solid color; inactive if normal \ 'Masking' is also enabled" visible = !@mask endparam param maskthresh caption = "Masking Threshold" default = 0.1 hint = "This param is the value used for solid color masking if either \ 'Masking?' or 'Reverse Masking?' are enabled. Depending on how param \ 'Color By' is set, the value may need large adjustment (.001-10 may \ be useful)" visible = (@mask || @revmask) endparam param varymode caption = "Feedback Mode" enum = "trapped" "not trapped" "always" default = 2 hint = "Variation style; variation of individual parameters must still \ be enabled. 'trapped' -- feedback occurs only on iterations where some \ value was trapped; 'not trapped' -- varies on iterations when nothing \ trapped; 'always' -- feedback on every iteation" visible = (@varyturb || @varyscale || @varyrotation || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam param oldstyle caption = "OldStyle Feedback?" default = FALSE hint = "Retained for compatibility with original version of this formula; \ enable if you need to render an early image utilizing this formula, \ or for a variant algorithm that generally produces less feedback variation" visible = (@varyturb || @varyscale || @varyrotation || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam } jam-CardioidTrap { ; jam version 010911 ; The cardioid is defined by r = 2a(1 + cos(theta)). init: float twopi = 2.0 * #pi ; Change and scale variables to facilitate variation, if selected float spread = @colorspread, float spreadstep = 0.05 * @spreadstp float thresh = @threshold, float threshstep = 0.05 * @threshstp float scale = @tscale, float scalestep = 0.05 * @scalestp float ringstep = 0.05 * @ringstp, float rwidth = @ringwidth float rotation = @rotate * #pi / 180, float rotationstep = 0.05 * @rotationstp if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation complex center = @centr, float centerstep = @centerstp float sign = 0.0 bool trapped = FALSE bool vary = TRUE float innerradius = thresh - @ringwidth if ( @whattotrap > 11 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, float _color = 0.0 complex zlast = (0,0), complex tlast = (1,0), float turbstep = @turbstp complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex zold2 = (0,0) float rfbcomp = 1-@rfblend, float ifbcomp = 1-@ifblend float rbbcomp = 1-@rbblend, float ibbcomp = 1-@ibblend float trapbcomp = 1-@trapblend, float initbcomp = 1-@initblend if @towatch == 0 int watch = #maxiter else int watch = @skippediters + @towatch endif ; towatch int iter = 0, int count = 0 int itrapped = int itrapped2 = int itrapped3 = int itrapped4 = 0 float test = 0.0, float trapped1 = float trapped2 = float trapped3 = float trapped4 = 1e9 float zangle = 0.0, float zatrapped = float zatrapped2 = float zatrapped3 = float zatrapped4 = 0.0 float cangle = 0.0, float catrapped = float catrapped2 = float catrapped3 = float catrapped4 = 0.0 complex ztrapped = complex ztrapped2 = complex ztrapped3 = complex ztrapped4 = (0,0) complex ztemp = complex zttrapped = complex zttrapped2 = complex zttrapped3 = complex zttrapped4 = (0,0) complex tempc = complex ctrapped = complex ctrapped2 = complex ctrapped3 = complex ctrapped4 = (0,0) float tempx = 0.0, float tempy = 0.0, float temp = 0.0, float temp2 = 0.0 complex zinput = (0,0) ; If we're trapping something big, initialize small if (( @whattotrap == 1 ) || ( @whattotrap == 5 ) || ( @whattotrap == 6 ) \ || ( @whattotrap == 7 )) trapped1 = trapped2 = trapped3 = trapped4 = -1e9 elseif @whattotrap > 14 trapped2 = -1e9 ; used to store the max when looking for min-max, min+max, etc. endif ; trapmode loop: iter = iter + 1 if ( iter > @skippediters ) && ( iter <= watch ) ; finished skipping --- start testing for trap ; Initialize front end real, front end imag, if desired temp2 = @rfscale * real(#z) if ( @realfront == 0 ) tempx = temp2 elseif ( @realfront == 1 ) tempx = 1/temp2 elseif ( @realfront == 2 ) tempx = temp2 * temp2 elseif ( @realfront == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realfront == 4 ) tempx = log(temp2) elseif ( @realfront == 5 ) tempx = exp( temp2) elseif ( @realfront == 6 ) tempx = temp2^temp2 elseif ( @realfront == 7 ) tempx = sin( temp2 ) elseif ( @realfront == 8 ) tempx = cos( temp2 ) elseif ( @realfront == 9 ) tempx = tan( temp2 ) elseif ( @realfront == 10 ) tempx = asin( temp2 ) elseif ( @realfront == 11 ) tempx = acos( temp2 ) elseif ( @realfront == 12 ) tempx = atan( temp2 ) elseif ( @realfront == 13 ) tempx = sinh( temp2 ) elseif ( @realfront == 14 ) tempx = cosh( temp2 ) elseif ( @realfront == 15 ) tempx = tanh( temp2 ) elseif ( @realfront == 16 ) tempx = asinh( temp2 ) elseif ( @realfront == 17 ) tempx = acosh( temp2 ) elseif ( @realfront == 18 ) tempx = atanh( temp2 ) elseif ( @realfront == 19 ) tempx = log( 1/temp2 ) elseif ( @realfront == 20 ) tempx = log( log( temp2 )) elseif ( @realfront == 21 ) tempx = exp( -temp2 ) elseif ( @realfront == 22 ) tempx = exp( 1/temp2 ) elseif ( @realfront == 23 ) tempx = temp2^(-temp2) elseif ( @realfront == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 27 ) tempx = cotan( temp2 ) elseif ( @realfront == 28 ) tempx = 1/cos( temp2 ) elseif ( @realfront == 29 ) tempx = 1/sin( temp2 ) elseif ( @realfront == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realfront == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realfront == 35 ) tempx = log(-temp2) elseif ( @realfront == 36 ) tempx = 1/log( temp2 ) elseif ( @realfront == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realfront == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realfront == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realfront == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realfront == 41 ) tempx = sin( temp2^2 ) elseif ( @realfront == 42 ) tempx = exp( -1/temp2 ) elseif ( @realfront == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realfront == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realfront == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realfront == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realfront == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realfront == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realfront == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realfront == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realfront == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realfront == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realfront == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realfront == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realfront == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realfront == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realfront == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realfront == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realfront == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realfront == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realfront == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realfront == 62 ) tempx = sin( 1/temp2 ) elseif ( @realfront == 63 ) tempx = cos( 1/temp2 ) elseif ( @realfront == 64 ) tempx = tan( 1/temp2 ) elseif ( @realfront == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realfront == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realfront == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realfront == 68 ) tempx = cotanh( temp2 ) elseif ( @realfront == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realfront == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realfront == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realfront == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realfront == 73 ) tempx = asinh( 1/temp2 ) elseif @realfront == 74 tempx = temp2^@rfpower elseif @realfront == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realfront == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realfront == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realfront == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realfront == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realfront == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realfront == 81 tempx = sinh(1/temp2) elseif @realfront == 82 tempx = cosh(1/temp2) elseif @realfront == 83 tempx = tanh(1/temp2) elseif @realfront == 84 tempx = cotanh(1/temp2) elseif @realfront == 85 tempx = 1/cosh(1/temp2) elseif @realfront == 86 tempx = 1/sinh(1/temp2) elseif @realfront == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realfront == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realfront == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realfront == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realfront == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realfront == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realfront == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realfront == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realfront == 98 tempx = exp(2*temp2) elseif @realfront == 99 tempx = exp(-2*temp2) elseif @realfront == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realfront == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realfront == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realfront == 104 tempx = sin(temp2) * sinh(temp2) elseif @realfront == 105 tempx = sin(temp2) * cosh(temp2) elseif @realfront == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 107 tempx = sin(temp2)*exp(temp2) elseif @realfront == 108 tempx = cos(temp2)*exp(temp2) elseif @realfront == 109 tempx = sinh(temp2)*exp(temp2) elseif @realfront == 110 tempx = cosh(temp2)*exp(temp2) elseif @realfront == 111 tempx = sin(temp2)*log(temp2) elseif @realfront == 112 tempx = cos(temp2)*log(temp2) elseif @realfront == 113 tempx = sinh(temp2)*log(temp2) else ; @realfront == 114 tempx = cosh(temp2)*log(temp2) endif ; realfront if @rfperturb tempx = @rfblend * tempx + rfbcomp * real(#z) endif ; @rfperturb temp2 = @ifscale * imag(#z) if ( @imagfront == 0 ) tempy = temp2 elseif ( @imagfront == 1 ) tempy = 1/temp2 elseif ( @imagfront == 2 ) tempy = temp2 * temp2 elseif ( @imagfront == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagfront == 4 ) tempy = log(temp2) elseif ( @imagfront == 5 ) tempy = exp( temp2) elseif ( @imagfront == 6 ) tempy = temp2^temp2 elseif ( @imagfront == 7 ) tempy = sin( temp2 ) elseif ( @imagfront == 8 ) tempy = cos( temp2 ) elseif ( @imagfront == 9 ) tempy = tan( temp2 ) elseif ( @imagfront == 10 ) tempy = asin( temp2 ) elseif ( @imagfront == 11 ) tempy = acos( temp2 ) elseif ( @imagfront == 12 ) tempy = atan( temp2 ) elseif ( @imagfront == 13 ) tempy = sinh( temp2 ) elseif ( @imagfront == 14 ) tempy = cosh( temp2 ) elseif ( @imagfront == 15 ) tempy = tanh( temp2 ) elseif ( @imagfront == 16 ) tempy = asinh( temp2 ) elseif ( @imagfront == 17 ) tempy = acosh( temp2 ) elseif ( @imagfront == 18 ) tempy = atanh( temp2 ) elseif ( @imagfront == 19 ) tempy = log( 1/temp2 ) elseif ( @imagfront == 20 ) tempy = log( log( temp2 )) elseif ( @imagfront == 21 ) tempy = exp( -temp2 ) elseif ( @imagfront == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagfront == 23 ) tempy = temp2^(-temp2) elseif ( @imagfront == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 27 ) tempy = cotan( temp2 ) elseif ( @imagfront == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagfront == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagfront == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagfront == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagfront == 35 ) tempy = log(-temp2) elseif ( @imagfront == 36 ) tempy = 1/log( temp2 ) elseif ( @imagfront == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagfront == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagfront == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagfront == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagfront == 41 ) tempy = sin( temp2^2 ) elseif ( @imagfront == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagfront == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagfront == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagfront == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagfront == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagfront == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagfront == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagfront == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagfront == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagfront == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagfront == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagfront == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagfront == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagfront == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagfront == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagfront == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagfront == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagfront == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagfront == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagfront == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagfront == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagfront == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagfront == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagfront == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagfront == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagfront == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagfront == 68 ) tempy = cotanh( temp2 ) elseif ( @imagfront == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagfront == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagfront == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagfront == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagfront == 73 ) tempy = asinh( 1/temp2 ) elseif @imagfront == 74 tempy = temp2^@ifpower elseif @imagfront == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagfront == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagfront == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagfront == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagfront == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagfront == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagfront == 81 tempy = sinh(1/temp2) elseif @imagfront == 82 tempy = cosh(1/temp2) elseif @imagfront == 83 tempy = tanh(1/temp2) elseif @imagfront == 84 tempy = cotanh(1/temp2) elseif @imagfront == 85 tempy = 1/cosh(1/temp2) elseif @imagfront == 86 tempy = 1/sinh(1/temp2) elseif @imagfront == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagfront == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagfront == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagfront == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagfront == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagfront == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagfront == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagfront == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagfront == 98 tempy = exp(2*temp2) elseif @imagfront == 99 tempy = exp(-2*temp2) elseif @imagfront == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagfront == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagfront == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagfront == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagfront == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagfront == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 107 tempy = sin(temp2)*exp(temp2) elseif @imagfront == 108 tempy = cos(temp2)*exp(temp2) elseif @imagfront == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagfront == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagfront == 111 tempy = sin(temp2)*log(temp2) elseif @imagfront == 112 tempy = cos(temp2)*log(temp2) elseif @imagfront == 113 tempy = sinh(temp2)*log(temp2) else ; @imagfront == 114 tempy = cosh(temp2)*log(temp2) endif ; imagfront if @ifperturb tempy = @ifblend * tempy + ifbcomp * imag(#z) endif ; @ifperturb zold = tempx + flip(tempy) ; Initialize z, if desired zold = @ziscale * zold if ( @initialization == 0 ) zinput = zold elseif ( @initialization == 1 ) zinput = 1/zold elseif ( @initialization == 2 ) zinput = zold * zold elseif ( @initialization == 3 ) zinput = 1 / ( zold * zold ) elseif ( @initialization == 4 ) zinput = log(zold) elseif ( @initialization == 5 ) zinput = exp( zold) elseif ( @initialization == 6 ) zinput = zold^zold elseif ( @initialization == 7 ) zinput = sin( zold ) elseif ( @initialization == 8 ) zinput = cos( zold ) elseif ( @initialization == 9 ) zinput = tan( zold ) elseif ( @initialization == 10 ) zinput = asin( zold ) elseif ( @initialization == 11 ) zinput = acos( zold ) elseif ( @initialization == 12 ) zinput = atan( zold ) elseif ( @initialization == 13 ) zinput = sinh( zold ) elseif ( @initialization == 14 ) zinput = cosh( zold ) elseif ( @initialization == 15 ) zinput = tanh( zold ) elseif ( @initialization == 16 ) zinput = asinh( zold ) elseif ( @initialization == 17 ) zinput = acosh( zold ) elseif ( @initialization == 18 ) zinput = atanh( zold ) elseif ( @initialization == 19 ) zinput = log( 1/zold ) elseif ( @initialization == 20 ) zinput = log( log( zold )) elseif ( @initialization == 21 ) zinput = exp( -zold ) elseif ( @initialization == 22 ) zinput = exp( 1/zold ) elseif ( @initialization == 23 ) zinput = zold^(-zold) elseif ( @initialization == 24 ) zinput = sin( zold ) zinput = zinput * zinput elseif ( @initialization == 25 ) zinput = cos( zold ) zinput = zinput * zinput elseif ( @initialization == 26 ) zinput = tan( zold ) zinput = zinput * zinput elseif ( @initialization == 27 ) zinput = cotan( zold ) elseif ( @initialization == 28 ) zinput = 1/cos( zold ) elseif ( @initialization == 29 ) zinput = 1/sin( zold ) elseif ( @initialization == 30 ) zinput = cotan( zold ) zinput = zinput * zinput elseif ( @initialization == 31 ) zinput = 1/cos( zold ) zinput = zinput * zinput elseif ( @initialization == 32 ) zinput = 1/sin( zold ) zinput = zinput * zinput elseif ( @initialization == 33 ) zinput = zold^(zold) zinput = zold^zinput elseif ( @initialization == 34 ) zinput = zold^(zold) zinput = 1/( zold^zinput ) elseif ( @initialization == 35 ) zinput = log(-zold) elseif ( @initialization == 36 ) zinput = 1/log( zold ) elseif ( @initialization == 37 ) zinput = zold * log( zold ) elseif ( @initialization == 38 ) zinput = sin( zold ) / zold elseif ( @initialization == 39 ) zinput = cos( zold ) / zold elseif ( @initialization == 40 ) zinput = sin( zold ) * cos( zold ) elseif ( @initialization == 41 ) zinput = sin( zold^2 ) elseif ( @initialization == 42 ) zinput = exp( -1/zold ) elseif ( @initialization == 43 ) zinput = zold * exp( zold ) elseif ( @initialization == 44 ) zinput = zold * exp( -zold ) elseif ( @initialization == 45 ) zinput = zold * exp( 1/zold ) elseif ( @initialization == 46 ) zinput = zold * exp( -1/zold ) elseif ( @initialization == 47 ) zinput = zold * zold * zold elseif ( @initialization == 48 ) zinput = 1 / ( zold * zold * zold ) elseif ( @initialization == 49 ) zinput = atan( 1 / zold ) elseif ( @initialization == 50 ) zinput = acos( 1 / zold ) elseif ( @initialization == 51 ) zinput = asin( 1 / zold ) elseif ( @initialization == 52 ) zinput = tan( zold ) / zold elseif ( @initialization == 53 ) zinput = cotan( zold ) / zold elseif ( @initialization == 54 ) zinput = 1 / ( zold * cos( zold )) elseif ( @initialization == 55 ) zinput = 1 / ( zold * sin( zold )) elseif ( @initialization == 56 ) zinput = zold * sin( zold ) elseif ( @initialization == 57 ) zinput = zold * cos( zold ) elseif ( @initialization == 58 ) zinput = zold * tan( zold ) elseif ( @initialization == 59 ) zinput = zold * cotan( zold ) elseif ( @initialization == 60 ) zinput = zold/cos( zold ) elseif ( @initialization == 61 ) zinput = zold/sin( zold ) elseif ( @initialization == 62 ) zinput = sin( 1/zold ) elseif ( @initialization == 63 ) zinput = cos( 1/zold ) elseif ( @initialization == 64 ) zinput = tan( 1/zold ) elseif ( @initialization == 65 ) zinput = cotan( 1/zold ) elseif ( @initialization == 66 ) zinput = 1/cos( 1/zold ) elseif ( @initialization == 67 ) zinput = 1/sin( 1/zold ) elseif ( @initialization == 68 ) zinput = cotanh( zold ) elseif ( @initialization == 69 ) zinput = 1/cosh( zold ) elseif ( @initialization == 70 ) zinput = 1/sinh( zold ) elseif ( @initialization == 71 ) zinput = atanh( 1/zold ) elseif ( @initialization == 72 ) zinput = acosh( 1/zold ) elseif ( @initialization == 73 ) zinput = asinh( 1/zold ) elseif @initialization == 74 zinput = zold^@zpower elseif @initialization == 75 zinput = sinh(zold) zinput = zinput * zinput elseif @initialization == 76 zinput = cosh( zold ) zinput = zinput * zinput elseif @initialization == 77 zinput = tanh(zold) zinput = zinput * zinput elseif @initialization == 78 zinput = cotanh( zold ) zinput = zinput * zinput elseif @initialization == 79 zinput = 1/cosh(zold) zinput = zinput * zinput elseif @initialization == 80 zinput = 1 / sinh( zold ) zinput = zinput * zinput elseif @initialization == 81 zinput = sinh(1/zold) elseif @initialization == 82 zinput = cosh(1/zold) elseif @initialization == 83 zinput = tanh(1/zold) elseif @initialization == 84 zinput = cotanh(1/zold) elseif @initialization == 85 zinput = 1/cosh(1/zold) elseif @initialization == 86 zinput = 1/sinh(1/zold) elseif @initialization == 87 zinput = sin( zold ) * tan(zold) elseif @initialization == 88 zinput = sinh(zold) * tanh(zold) elseif @initialization == 89 zinput = sinh(zold) * cosh(zold) elseif @initialization == 90 zinput = sinh(zold), zscratch = cosh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 91 zinput = sin(zold), zscratch = cos(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 92 zinput = 1/zold zinput = sin(zinput)*cos(zinput) elseif @initialization == 93 zinput = sin( 1/zold ) zinput = zinput*zinput elseif @initialization == 94 zinput = sin(zold) * cos(1/zold) elseif @initialization == 95 zinput = sin(zold) * sin(1/zold) elseif @initialization == 96 zinput = log(zold) zinput = zinput*zinput elseif @initialization == 97 zinput = sin(zold) * sin(2*zold) elseif @initialization == 98 zinput = exp(2*zold) elseif @initialization == 99 zinput = exp(-2*zold) elseif @initialization == 100 zinput = 1/zold zinput = sinh(zinput)*cosh(zinput) elseif @initialization == 101 zinput = sinh( 1/zold ) zinput = zinput*zinput elseif @initialization == 102 zinput = sinh(zold) * cosh(1/zold) elseif @initialization == 103 zinput = sinh(zold) * sinh(1/zold) elseif @initialization == 104 zinput = sin(zold) * sinh(zold) elseif @initialization == 105 zinput = sin(zold) * cosh(zold) elseif @initialization == 106 zinput = sin(zold), zscratch = sinh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 107 zinput = sin(zold)*exp(zold) elseif @initialization == 108 zinput = cos(zold)*exp(zold) elseif @initialization == 109 zinput = sinh(zold)*exp(zold) elseif @initialization == 110 zinput = cosh(zold)*exp(zold) elseif @initialization == 111 zinput = sin(zold)*log(zold) elseif @initialization == 112 zinput = cos(zold)*log(zold) elseif @initialization == 113 zinput = sinh(zold)*log(zold) else ; @initialization == 114 zinput = cosh(zold)*log(zold) endif ; initialization if @initperturb zinput = @initblend * zinput + initbcomp * zold endif ; @ifperturb if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication zinput = zinput * @operatee elseif @operator == 2 ; addition zinput = zinput + @operatee elseif @operator == 3 ; subtraction zinput = zinput - @operatee elseif @operator == 4 ; division zinput = zinput / @operatee elseif @operator == 5 ; exponentiation zinput = zinput ^ @operatee elseif @operator == 6 ; subtraction2 zinput = @operatee - zinput elseif @operator == 7 ; division2 zinput = @operatee / zinput elseif @operator == 8 ; exponential2 zinput = @operatee ^ zinput elseif @operator == 9 ; logarithm zinput = log(zinput) / log(@operatee) elseif @operator == 10 ; logarithm2 zinput = log(@operatee) / log(zinput) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; Find coordinates and angle of point on cardioid closest to #z (zinput) ; First, center z on the cardioid cusp ztemp = zinput - center ; Compute rotated #z ztemp = ztemp * exp( flip( -rotation)) if @history if @histype == 0 zold2 = ztemp - zold2, ztemp = zold2 elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold2, zold2 = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold2, zold2 = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp ; Now find angle of 'rotated' #z zangle = atan2( ztemp ) if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle <= two pi endif ; zangle if @sprangle temp = zangle*@sprangfactor else temp = zangle endif ; @sprangle ; Find point on cardioid (i.e., on origin-#z radial vector) tempx = scale * ( 1 + cos( temp )) tempc = tempx * exp( flip( temp )) if !@polar tempc = real(ztemp) + flip(tempx) endif ; @polar zold = tempc ; Now transmute the trapped cardioid point if desired tempc = @tiscale * tempc if @transmogrify != 0 if ( @transmogrify == 1 ) tempc = 1/tempc elseif ( @transmogrify == 2 ) tempc = tempc * tempc elseif ( @transmogrify == 3 ) tempc = 1 / ( tempc * tempc ) elseif ( @transmogrify == 4 ) tempc = log(tempc) elseif ( @transmogrify == 5 ) tempc = exp( tempc) elseif ( @transmogrify == 6 ) tempc = tempc^tempc elseif ( @transmogrify == 7 ) tempc = sin( tempc ) elseif ( @transmogrify == 8 ) tempc = cos( tempc ) elseif ( @transmogrify == 9 ) tempc = tan( tempc ) elseif ( @transmogrify == 10 ) tempc = asin( tempc ) elseif ( @transmogrify == 11 ) tempc = acos( tempc ) elseif ( @transmogrify == 12 ) tempc = atan( tempc ) elseif ( @transmogrify == 13 ) tempc = sinh( tempc ) elseif ( @transmogrify == 14 ) tempc = cosh( tempc ) elseif ( @transmogrify == 15 ) tempc = tanh( tempc ) elseif ( @transmogrify == 16 ) tempc = asinh( tempc ) elseif ( @transmogrify == 17 ) tempc = acosh( tempc ) elseif ( @transmogrify == 18 ) tempc = atanh( tempc ) elseif ( @transmogrify == 19 ) tempc = log( 1/tempc ) elseif ( @transmogrify == 20 ) tempc = log( log( tempc )) elseif ( @transmogrify == 21 ) tempc = exp( -tempc ) elseif ( @transmogrify == 22 ) tempc = exp( 1/tempc ) elseif ( @transmogrify == 23 ) tempc = tempc^(-tempc) elseif ( @transmogrify == 24 ) tempc = sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 25 ) tempc = cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 26 ) tempc = tan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 27 ) tempc = cotan( tempc ) elseif ( @transmogrify == 28 ) tempc = 1/cos( tempc ) elseif ( @transmogrify == 29 ) tempc = 1/sin( tempc ) elseif ( @transmogrify == 30 ) tempc = cotan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 31 ) tempc = 1/cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 32 ) tempc = 1/sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 33 ) tempc = tempc^(tempc) tempc = tempc^tempc elseif ( @transmogrify == 34 ) tempc = tempc^(tempc) tempc = 1/( tempc^tempc ) elseif ( @transmogrify == 35 ) tempc = log(-tempc) elseif ( @transmogrify == 36 ) tempc = 1/log( tempc ) elseif ( @transmogrify == 37 ) tempc = tempc * log( tempc ) elseif ( @transmogrify == 38 ) tempc = sin( tempc ) / tempc elseif ( @transmogrify == 39 ) tempc = cos( tempc ) / tempc elseif ( @transmogrify == 40 ) tempc = sin( tempc ) * cos( tempc ) elseif ( @transmogrify == 41 ) tempc = sin( tempc^2 ) elseif ( @transmogrify == 42 ) tempc = exp( -1/tempc ) elseif ( @transmogrify == 43 ) tempc = tempc * exp( tempc ) elseif ( @transmogrify == 44 ) tempc = tempc * exp( -tempc ) elseif ( @transmogrify == 45 ) tempc = tempc * exp( 1/tempc ) elseif ( @transmogrify == 46 ) tempc = tempc * exp( -1/tempc ) elseif ( @transmogrify == 47 ) tempc = tempc * tempc * tempc elseif ( @transmogrify == 48 ) tempc = 1 / ( tempc * tempc * tempc ) elseif ( @transmogrify == 49 ) tempc = atan( 1 / tempc ) elseif ( @transmogrify == 50 ) tempc = acos( 1 / tempc ) elseif ( @transmogrify == 51 ) tempc = asin( 1 / tempc ) elseif ( @transmogrify == 52 ) tempc = tan( tempc ) / tempc elseif ( @transmogrify == 53 ) tempc = cotan( tempc ) / tempc elseif ( @transmogrify == 54 ) tempc = 1 / ( tempc * cos( tempc )) elseif ( @transmogrify == 55 ) tempc = 1 / ( tempc * sin( tempc )) elseif ( @transmogrify == 56 ) tempc = tempc * sin( tempc ) elseif ( @transmogrify == 57 ) tempc = tempc * cos( tempc ) elseif ( @transmogrify == 58 ) tempc = tempc * tan( tempc ) elseif ( @transmogrify == 59 ) tempc = tempc * cotan( tempc ) elseif ( @transmogrify == 60 ) tempc = tempc/cos( tempc ) elseif ( @transmogrify == 61 ) tempc = tempc/sin( tempc ) elseif ( @transmogrify == 62 ) tempc = sin( 1/tempc ) elseif ( @transmogrify == 63 ) tempc = cos( 1/tempc ) elseif ( @transmogrify == 64 ) tempc = tan( 1/tempc ) elseif ( @transmogrify == 65 ) tempc = cotan( 1/tempc ) elseif ( @transmogrify == 66 ) tempc = 1/cos( 1/tempc ) elseif ( @transmogrify == 67 ) tempc = 1/sin( 1/tempc ) elseif ( @transmogrify == 68 ) tempc = cotanh( tempc ) elseif ( @transmogrify == 69 ) tempc = 1/cosh( tempc ) elseif ( @transmogrify == 70 ) tempc = 1/sinh( tempc ) elseif ( @transmogrify == 71 ) tempc = atanh( 1/tempc ) elseif ( @transmogrify == 72 ) tempc = acosh( 1/tempc ) elseif ( @transmogrify == 73 ) tempc = asinh( 1/tempc ) elseif @transmogrify == 74 tempc = tempc^@tpower elseif @transmogrify == 75 tempc = sinh(tempc) tempc = tempc * tempc elseif @transmogrify == 76 tempc = cosh( tempc ) tempc = tempc * tempc elseif @transmogrify == 77 tempc = tanh(tempc) tempc = tempc * tempc elseif @transmogrify == 78 tempc = cotanh( tempc ) tempc = tempc * tempc elseif @transmogrify == 79 tempc = 1/cosh(tempc) tempc = tempc * tempc elseif @transmogrify == 80 tempc = 1 / sinh( tempc ) tempc = tempc * tempc elseif @transmogrify == 81 tempc = sinh(1/tempc) elseif @transmogrify == 82 tempc = cosh(1/tempc) elseif @transmogrify == 83 tempc = tanh(1/tempc) elseif @transmogrify == 84 tempc = cotanh(1/tempc) elseif @transmogrify == 85 tempc = 1/cosh(1/tempc) elseif @transmogrify == 86 tempc = 1/sinh(1/tempc) elseif @transmogrify == 87 tempc = sin( tempc ) * tan(tempc) elseif @transmogrify == 88 tempc = sinh(tempc) * tanh(tempc) elseif @transmogrify == 89 tempc = sinh(tempc) * cosh(tempc) elseif @transmogrify == 90 zscratch = cosh(tempc) tempc = sinh(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 91 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 92 tempc = 1/tempc tempc = sin(tempc)*cos(tempc) elseif @transmogrify == 93 tempc = sin( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 94 tempc = sin(tempc) * cos(1/tempc) elseif @transmogrify == 95 tempc = sin(tempc) * sin(1/tempc) elseif @transmogrify == 96 tempc = log(tempc) tempc = tempc*tempc elseif @transmogrify == 97 tempc = sin(tempc) * sin(2*tempc) elseif @transmogrify == 98 tempc = exp(2*tempc) elseif @transmogrify == 99 tempc = exp(-2*tempc) elseif @transmogrify == 100 tempc = 1/tempc tempc = sinh(tempc)*cosh(tempc) elseif @transmogrify == 101 tempc = sinh( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 102 tempc = sinh(tempc) * cosh(1/tempc) elseif @transmogrify == 103 tempc = sinh(tempc) * sinh(1/tempc) elseif @transmogrify == 104 tempc = sin(tempc) * sinh(tempc) elseif @transmogrify == 105 tempc = sin(tempc) * cosh(tempc) elseif @transmogrify == 106 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 107 tempc = sin(tempc)*exp(tempc) elseif @transmogrify == 108 tempc = cos(tempc)*exp(tempc) elseif @transmogrify == 109 tempc = sinh(tempc)*exp(tempc) elseif @transmogrify == 110 tempc = cosh(tempc)*exp(tempc) elseif @transmogrify == 111 tempc = sin(tempc)*log(tempc) elseif @transmogrify == 112 tempc = cos(tempc)*log(tempc) elseif @transmogrify == 113 tempc = sinh(tempc)*log(tempc) else ; @transmogrify == 114 tempc = cosh(tempc)*log(tempc) endif ; transmogrify2 endif ; transmogrify1 if @trapperturb tempc = @trapblend * tempc + trapbcomp * zold endif ; @trapperturb ; Initialize back end real, back end imag, if desired temp2 = @rbscale * real(tempc) if ( @realback == 0 ) tempx = temp2 elseif ( @realback == 1 ) tempx = 1/temp2 elseif ( @realback == 2 ) tempx = temp2 * temp2 elseif ( @realback == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realback == 4 ) tempx = log(temp2) elseif ( @realback == 5 ) tempx = exp( temp2) elseif ( @realback == 6 ) tempx = temp2^temp2 elseif ( @realback == 7 ) tempx = sin( temp2 ) elseif ( @realback == 8 ) tempx = cos( temp2 ) elseif ( @realback == 9 ) tempx = tan( temp2 ) elseif ( @realback == 10 ) tempx = asin( temp2 ) elseif ( @realback == 11 ) tempx = acos( temp2 ) elseif ( @realback == 12 ) tempx = atan( temp2 ) elseif ( @realback == 13 ) tempx = sinh( temp2 ) elseif ( @realback == 14 ) tempx = cosh( temp2 ) elseif ( @realback == 15 ) tempx = tanh( temp2 ) elseif ( @realback == 16 ) tempx = asinh( temp2 ) elseif ( @realback == 17 ) tempx = acosh( temp2 ) elseif ( @realback == 18 ) tempx = atanh( temp2 ) elseif ( @realback == 19 ) tempx = log( 1/temp2 ) elseif ( @realback == 20 ) tempx = log( log( temp2 )) elseif ( @realback == 21 ) tempx = exp( -temp2 ) elseif ( @realback == 22 ) tempx = exp( 1/temp2 ) elseif ( @realback == 23 ) tempx = temp2^(-temp2) elseif ( @realback == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realback == 27 ) tempx = cotan( temp2 ) elseif ( @realback == 28 ) tempx = 1/cos( temp2 ) elseif ( @realback == 29 ) tempx = 1/sin( temp2 ) elseif ( @realback == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realback == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realback == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realback == 35 ) tempx = log(-temp2) elseif ( @realback == 36 ) tempx = 1/log( temp2 ) elseif ( @realback == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realback == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realback == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realback == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realback == 41 ) tempx = sin( temp2^2 ) elseif ( @realback == 42 ) tempx = exp( -1/temp2 ) elseif ( @realback == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realback == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realback == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realback == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realback == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realback == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realback == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realback == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realback == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realback == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realback == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realback == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realback == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realback == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realback == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realback == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realback == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realback == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realback == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realback == 62 ) tempx = sin( 1/temp2 ) elseif ( @realback == 63 ) tempx = cos( 1/temp2 ) elseif ( @realback == 64 ) tempx = tan( 1/temp2 ) elseif ( @realback == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realback == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realback == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realback == 68 ) tempx = cotanh( temp2 ) elseif ( @realback == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realback == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realback == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realback == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realback == 73 ) tempx = asinh( 1/temp2 ) elseif @realback == 74 tempx = temp2^@rbpower elseif @realback == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realback == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realback == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realback == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realback == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realback == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realback == 81 tempx = sinh(1/temp2) elseif @realback == 82 tempx = cosh(1/temp2) elseif @realback == 83 tempx = tanh(1/temp2) elseif @realback == 84 tempx = cotanh(1/temp2) elseif @realback == 85 tempx = 1/cosh(1/temp2) elseif @realback == 86 tempx = 1/sinh(1/temp2) elseif @realback == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realback == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realback == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realback == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realback == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realback == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realback == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realback == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realback == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realback == 98 tempx = exp(2*temp2) elseif @realback == 99 tempx = exp(-2*temp2) elseif @realback == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realback == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realback == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realback == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realback == 104 tempx = sin(temp2) * sinh(temp2) elseif @realback == 105 tempx = sin(temp2) * cosh(temp2) elseif @realback == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 107 tempx = sin(temp2)*exp(temp2) elseif @realback == 108 tempx = cos(temp2)*exp(temp2) elseif @realback == 109 tempx = sinh(temp2)*exp(temp2) elseif @realback == 110 tempx = cosh(temp2)*exp(temp2) elseif @realback == 111 tempx = sin(temp2)*log(temp2) elseif @realback == 112 tempx = cos(temp2)*log(temp2) elseif @realback == 113 tempx = sinh(temp2)*log(temp2) else ; @realback == 114 tempx = cosh(temp2)*log(temp2) endif ; realback if @rbperturb tempx = @rbblend * tempx + rbbcomp * real(tempc) endif ; @rbperturb temp2 = @ibscale * imag(tempc) if ( @imagback == 0 ) tempy = temp2 elseif ( @imagback == 1 ) tempy = 1/temp2 elseif ( @imagback == 2 ) tempy = temp2 * temp2 elseif ( @imagback == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagback == 4 ) tempy = log(temp2) elseif ( @imagback == 5 ) tempy = exp( temp2) elseif ( @imagback == 6 ) tempy = temp2^temp2 elseif ( @imagback == 7 ) tempy = sin( temp2 ) elseif ( @imagback == 8 ) tempy = cos( temp2 ) elseif ( @imagback == 9 ) tempy = tan( temp2 ) elseif ( @imagback == 10 ) tempy = asin( temp2 ) elseif ( @imagback == 11 ) tempy = acos( temp2 ) elseif ( @imagback == 12 ) tempy = atan( temp2 ) elseif ( @imagback == 13 ) tempy = sinh( temp2 ) elseif ( @imagback == 14 ) tempy = cosh( temp2 ) elseif ( @imagback == 15 ) tempy = tanh( temp2 ) elseif ( @imagback == 16 ) tempy = asinh( temp2 ) elseif ( @imagback == 17 ) tempy = acosh( temp2 ) elseif ( @imagback == 18 ) tempy = atanh( temp2 ) elseif ( @imagback == 19 ) tempy = log( 1/temp2 ) elseif ( @imagback == 20 ) tempy = log( log( temp2 )) elseif ( @imagback == 21 ) tempy = exp( -temp2 ) elseif ( @imagback == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagback == 23 ) tempy = temp2^(-temp2) elseif ( @imagback == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 27 ) tempy = cotan( temp2 ) elseif ( @imagback == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagback == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagback == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagback == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagback == 35 ) tempy = log(-temp2) elseif ( @imagback == 36 ) tempy = 1/log( temp2 ) elseif ( @imagback == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagback == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagback == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagback == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagback == 41 ) tempy = sin( temp2^2 ) elseif ( @imagback == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagback == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagback == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagback == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagback == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagback == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagback == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagback == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagback == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagback == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagback == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagback == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagback == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagback == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagback == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagback == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagback == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagback == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagback == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagback == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagback == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagback == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagback == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagback == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagback == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagback == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagback == 68 ) tempy = cotanh( temp2 ) elseif ( @imagback == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagback == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagback == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagback == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagback == 73 ) tempy = asinh( 1/temp2 ) elseif @imagback == 74 tempy = temp2^@ibpower elseif @imagback == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagback == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagback == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagback == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagback == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagback == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagback == 81 tempy = sinh(1/temp2) elseif @imagback == 82 tempy = cosh(1/temp2) elseif @imagback == 83 tempy = tanh(1/temp2) elseif @imagback == 84 tempy = cotanh(1/temp2) elseif @imagback == 85 tempy = 1/cosh(1/temp2) elseif @imagback == 86 tempy = 1/sinh(1/temp2) elseif @imagback == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagback == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagback == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagback == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagback == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagback == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagback == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagback == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagback == 98 tempy = exp(2*temp2) elseif @imagback == 99 tempy = exp(-2*temp2) elseif @imagback == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagback == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagback == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagback == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagback == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagback == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 107 tempy = sin(temp2)*exp(temp2) elseif @imagback == 108 tempy = cos(temp2)*exp(temp2) elseif @imagback == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagback == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagback == 111 tempy = sin(temp2)*log(temp2) elseif @imagback == 112 tempy = cos(temp2)*log(temp2) elseif @imagback == 113 tempy = sinh(temp2)*log(temp2) else ; @imagback == 114 tempy = cosh(temp2)*log(temp2) endif ; imagback if @ibperturb tempy = @ibblend * tempy + ibbcomp * imag(tempc) endif ; @ibperturb tempc = tempx + flip(tempy) cangle = atan2( tempc ) if ( cangle < 0 ) cangle = cangle + twopi endif ; cangle if @twavy if @twavmode == 0 ; radial mode temp = cabs( tempc ) temp = temp + @twavamp * temp * sin( @twavfreq * cangle ) ; vary radius tempc = temp * exp( flip( cangle )) ; compute new tempc else ; tangential mode tempx = cabs( tempc ) temp = cangle + @twavamp * cangle * sin( @twavfreq * tempx ) ; vary azimuth tempc = tempx * exp( flip( temp )) ; compute new tempc cangle = temp endif ; @twavmode endif ; @twavy if @pointmode ; compare subsequent values to first trap point on trap graph if itrapped != 0 ; some point must have already been trapped tempc = ctrapped endif; itrapped endif ; @pointmode ; Save value for later turbulence tlast = tempc if @swapflavor zscratch = ztemp else zscratch = #z endif ; swapflavor if ( @trapmode == 0 ) ; distance test = cabs( ztemp - tempc ) elseif ( @trapmode == 1 ) ; angle test = zangle elseif ( @trapmode == 2 ) ; trap angle test = cangle elseif ( @trapmode == 3 ) ; difference angle test = abs( zangle - cangle ) elseif ( @trapmode == 4 ) ; magnitude test = cabs( ztemp ) elseif ( @trapmode == 5 ) ; trap magnitude test = cabs( tempc ) elseif ( @trapmode == 6 ) ; real test = abs( real( ztemp )) elseif ( @trapmode == 7 ) ; imaginary test = abs( imag( ztemp )) elseif ( @trapmode == 8 ) ; trap real test = abs( real( tempc )) elseif ( @trapmode == 9 ) ; trap imaginary test = abs( imag( tempc )) elseif ( @trapmode == 10 ) ; sum test = cabs( zscratch + tempc ) elseif ( @trapmode == 11 ) ; difference test = cabs( zscratch - tempc) elseif ( @trapmode == 12 ) ; product test = cabs( zscratch * tempc ) elseif ( @trapmode == 13 ) ; quotient 1 test = cabs( zscratch / tempc ) elseif ( @trapmode == 14 ) ; quotient 2 test = cabs( tempc / zscratch ) elseif ( @trapmode == 15 ) ; power 1 test = cabs( zscratch ^ tempc ) elseif ( @trapmode == 16 ) ; power 2 test = cabs( tempc ^ zscratch ) elseif ( @trapmode == 17 ) ; arithmetic mean test = cabs( (zscratch + tempc)/2 ) elseif ( @trapmode == 18 ) ; geometric mean test = cabs( sqrt( zscratch * tempc )) elseif ( @trapmode == 19 ) ; angle 2 test = atan2( zscratch - tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 20 ) ; angle 3 test = atan2( zscratch + tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 21 ) ; angle 4 test = atan2( zscratch * tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 22 ) ; angle 5 test = atan2( zscratch / tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 23 ) ; angle 6 test = atan2( tempc / zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 24 ) ; angle 7 test = atan2( zscratch ^ tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 25 ) ; angle 8 test = atan2( tempc ^ zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 26 ) ; real 2 test = abs( real( zscratch - tempc )) elseif ( @trapmode == 27 ) ; real 3 test = abs( real( zscratch + tempc )) elseif ( @trapmode == 28 ) ; real 4 test = abs( real( zscratch * tempc )) elseif ( @trapmode == 29 ) ; real 5 test = abs( real( zscratch / tempc )) elseif ( @trapmode == 30 ) ; real 6 test = abs( real( tempc / zscratch )) elseif ( @trapmode == 31 ) ; real 7 test = abs( real( zscratch ^ tempc )) elseif ( @trapmode == 32 ) ; real 8 test = abs( real( tempc ^ zscratch )) elseif ( @trapmode == 33 ) ; imag 2 test = abs( imag( zscratch - tempc )) elseif ( @trapmode == 34 ) ; imag 3 test = abs( imag( zscratch + tempc )) elseif ( @trapmode == 35 ) ; imag 4 test = abs( imag( zscratch * tempc )) elseif ( @trapmode == 36 ) ; imag 5 test = abs( imag( zscratch / tempc )) elseif ( @trapmode == 37 ) ; imag 6 test = abs( imag( tempc / zscratch )) elseif ( @trapmode == 38 ) ; imag 7 test = abs( imag( zscratch ^ tempc )) elseif ( @trapmode == 39 ) ; imag 8 test = abs( imag( tempc ^ zscratch )) endif ; trapmode if ( @whattotrap == 0 ) ; minimum if ( test < trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 1 ) ; maximum if ( test > trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 2 ) ; 2nd minimum if ( test < trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 3 ) ; 3rd minimum if ( test < trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 4 ) ; 4th minimum if ( test < trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 5 ) ; 2nd maximum if ( test > trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 6 ) ; 3rd maximum if ( test > trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 7 ) ; 4th maximum if ( test > trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 8 ) ; 1st to dip below threshold value if ( itrapped == 0 ) ; nothing trapped yet if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 9 ) ; last to dip below threshold --- just store them all if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 10 ) ; count dips below threshold --- store the last if ( test < thresh ) count = count + 1 if !@ringstyle trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE elseif test > innerradius trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 11 ) ; 2nd to dip below threshold value if ( test < thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 12 ) ; 1st to exceed threshold limit if ( itrapped == 0 ) ; nothing trapped yet if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 13 ) ; 2nd to exceed threshold limit if ( test > thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 14 ) ; last to exceed threshold --- just store them all if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif @whattotrap > 14 ; maximum/minimum combos; need to find & store both ; trapped2 will hold he max, trapped1 the min if test < trapped1 ; is it a new min? trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > trapped2 ; is it a new max? trapped2 = test, itrapped2 = iter, zatrapped2 = zangle, catrapped2 = cangle ztrapped2 = #z, zttrapped2 = ztemp, ctrapped2 = tempc, trapped = TRUE endif ; test endif ; whattotrap if ( @varymode == 0 ) ; feedback only on iterations where something was trapped vary = trapped elseif ( @varymode == 1 ) ; feedback when nothing was trapped vary = !trapped else ; feedback on each iteration, if enabled for a given parameter vary = TRUE endif ; varymode trapped = FALSE ; reset flag for next iteration if vary ; vary chosen parameter if set float value = 0.0 if @oldstyle value = cabs(ctrapped) sign = real(ctrapped)/abs(real(ctrapped)) else value = cabs(ztemp) sign = real(ztemp)/abs(real(ztemp)) endif ; oldstyle if @varyrotation rotation = rotation + rotationstep * rotation * value * sign endif ; varyrotation if @varyscale scale = scale + scalestep * scale * value * sign endif ; varyscale if @varythresh thresh = thresh + threshstep * thresh * value * sign if @ringstyle if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; ringstyle endif ; varythresh if @varyrwidth rwidth = rwidth + ringstep * rwidth * value * sign if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; varyrwidth if @varyspread spread = spread + spreadstep * spread * value * sign endif ; varyspread if @varycenter tempx = real(center) + centerstep * real(center) * value * sign tempy = imag(center) + centerstep * imag(center) * value * sign center = tempx + flip( tempy ) endif ; varycenter if @varyturb turbulamount = turbulamount + turbstep * turbulamount * value * sign endif ; varyturb endif ; vary endif ; iter final: if ( itrapped != 0 ) ; something has been trapped if (( @whattotrap == 2 ) || ( @whattotrap == 5 )) ; we need to swap some values ; so we will plot the right thing trapped1 = trapped2, itrapped = itrapped2, zatrapped = zatrapped2, catrapped = catrapped2 ztrapped = ztrapped2, zttrapped = zttrapped2, ctrapped = ctrapped2 elseif (( @whattotrap == 3 ) || ( @whattotrap == 6 )) trapped1 = trapped3, itrapped = itrapped3, zatrapped = zatrapped3, catrapped = catrapped3 ztrapped = ztrapped3, zttrapped = zttrapped3, ctrapped = ctrapped3 elseif (( @whattotrap == 4 ) || ( @whattotrap == 7 )) trapped1 = trapped4, itrapped = itrapped4, zatrapped = zatrapped4, catrapped = catrapped4 ztrapped = ztrapped4, zttrapped = zttrapped4, ctrapped = ctrapped4 elseif @whattotrap == 15 ; max-min trapped1 = trapped2-trapped1, itrapped = itrapped2-itrapped zatrapped = zatrapped2-zatrapped, catrapped = catrapped2-catrapped ztrapped = ztrapped2-ztrapped, zttrapped = zttrapped2-zttrapped ctrapped = ctrapped2-ctrapped elseif @whattotrap == 16 ; max+min trapped1 = trapped2+trapped1, itrapped = itrapped2+itrapped zatrapped = zatrapped2+zatrapped, catrapped = catrapped2+catrapped ztrapped = ztrapped2+ztrapped, zttrapped = zttrapped2+zttrapped ctrapped = ctrapped2+ctrapped elseif @whattotrap == 17 ; max*min trapped1 = trapped2*trapped1, itrapped = itrapped2*itrapped zatrapped = zatrapped2*zatrapped, catrapped = catrapped2*catrapped ztrapped = ztrapped2*ztrapped, zttrapped = zttrapped2*zttrapped ctrapped = ctrapped2*ctrapped elseif @whattotrap == 18 ; max/min trapped1 = trapped2/trapped1, itrapped = round(itrapped2/itrapped) zatrapped = zatrapped2/zatrapped, catrapped = catrapped2/catrapped ztrapped = ztrapped2/ztrapped, zttrapped = zttrapped2/zttrapped ctrapped = ctrapped2/ctrapped elseif @whattotrap == 19 ; max^min trapped1 = trapped2^trapped1, itrapped = round(itrapped2^itrapped) zatrapped = zatrapped2^zatrapped, catrapped = catrapped2^catrapped ztrapped = ztrapped2^ztrapped, zttrapped = zttrapped2^zttrapped ctrapped = ctrapped2^ctrapped elseif @whattotrap == 20 ; min-max trapped1 = trapped1-trapped2, itrapped = itrapped-itrapped2 zatrapped = zatrapped-zatrapped2, catrapped = catrapped-catrapped2 ztrapped = ztrapped-ztrapped2, zttrapped = zttrapped-zttrapped2 ctrapped = ctrapped-ctrapped2 elseif @whattotrap == 21 ; min/max trapped1 = trapped1/trapped2, itrapped = round(itrapped/itrapped2) zatrapped = zatrapped/zatrapped2, catrapped = catrapped/catrapped2 ztrapped = ztrapped/ztrapped2, zttrapped = zttrapped/zttrapped2 ctrapped = ctrapped/ctrapped2 elseif @whattotrap == 22 ; min^max trapped1 = trapped1^trapped2, itrapped = round(itrapped^itrapped2) zatrapped = zatrapped^zatrapped2, catrapped = catrapped^catrapped2 ztrapped = ztrapped^ztrapped2, zttrapped = zttrapped^zttrapped2 ctrapped = ctrapped^ctrapped2 elseif @whattotrap == 23 ; average: (max+min)/2 trapped1 = (trapped1+trapped2)/2, itrapped = trunc((itrapped+itrapped2)/2) zatrapped = (zatrapped+zatrapped2)/2, catrapped = (catrapped+catrapped2)/2 ztrapped = (ztrapped+ztrapped2)/2, zttrapped = (zttrapped+zttrapped2)/2 ctrapped = (ctrapped+ctrapped2)/2 endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; product1 ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; distance temp = cabs( zttrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask elseif ( @colorby == 1 ) ; iteration if @mask if itrapped < @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp elseif @revmask if itrapped > @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp else _color = 0.3 * spread * itrapped endif ; @mask elseif ( @colorby == 2 ) ; magnitude temp = cabs( ztrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp else _color = 0.25 * spread * temp endif ; @mask elseif ( @colorby == 3 ) ; test if @mask if trapped1 < @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 elseif @revmask if trapped1 > @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 else _color = spread * trapped1 endif ; @mask elseif ( @colorby == 4 ) ; trap magnitude temp = cabs(ctrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 5 ) ; angle temp = atan2( ztrapped ) if ( temp < 0 ) temp = temp + twopi endif ; temp if @mask if temp < @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp else _color = ( spread * temp ) / twopi endif ; @mask elseif ( @colorby == 6 ) ; trap angle if @mask if catrapped < @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped elseif @revmask if catrapped > @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped else _color = ( spread * catrapped ) / twopi endif ; @mask elseif ( @colorby == 7 ) ; modulated magnitude temp = cabs(zttrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 8 ) ; modulated angle if @mask if zatrapped < @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped elseif @revmask if zatrapped > @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped else _color = ( spread * zatrapped ) / twopi endif ; @mask elseif ( @colorby == 9 ) ; real temp = abs( real( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 10 ) ; trap real temp = abs( real( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 11 ) ; modulated real temp = abs( real( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 12 ) ; imaginary temp = abs( imag( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 13 ) ; trap imaginary temp = abs( imag( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 14 ) ; modulated imaginary temp = abs( imag( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 15 ) ; raw distance (distance to #z, not ztemp) temp = cabs( ztrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else if !@hideranges _color = ((_color + _coloradjust) + (itrapped % @ranges) ) / @ranges else temp = itrapped % @ranges if temp != @showrange #solid = TRUE else _color = ((_color + _coloradjust) + temp ) / @ranges endif ; temp endif ; hideranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else #solid = TRUE endif ; itrapped default: title = "Cardioid Trap" param whattotrap caption = "Trap What?" enum = "minimum" "maximum" "2nd minimum" "3rd minimum" "4th minimum" "2nd maximum" \ "3rd maximum" "4th maximum" "1st threshold" "last threshold" "threshold count" \ "2nd threshold" "1st limit" "2nd limit" "last limit" "max-min" "max+min" \ "max*min" "max/min" "max^min" "min-max" "min/max" "min^max" "min,max avg" default = 0 hint = "What type of value will be trapped?" endparam param threshold caption = "Threshold Value" default = 0.5 hint = "Upper bound (maximum value that will be trapped) if one of the \ 'Threshold' options is chosen for param 'Trap What'; \ also, lower bound (minimum trapped value) if 'Trap What' is set to \ a 'Limit' option. Increase value for limit traps" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param varythresh caption = "Vary Threshold?" default = FALSE hint = "If set, the value of the trap will modify the value of 'threshold' and 'limit' type traps \ each iteration; parameter 'ThreshFeedback' can be used to modulate the variation" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param threshstp caption = "ThreshFeedback" default = 1.0 hint = "If 'Vary Threshold' is set, this setting adjusts the amount of variation" visible = @varythresh endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Trap What' is set to a \ 'Threshold' or 'Limit' option, then 'Trap What' \ becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Trap What' is set to either a 'Threshold', \ or 'Limit' option, this parameter determines the width of the ring trap" visible = @ringstyle == TRUE endparam param varyrwidth caption = "Vary Ringwidth?" default = FALSE hint = "If set, the value of the trap will modify the ring width of 'threshold' \ and 'limit' ring-type traps each iteration; parameter 'RingFeedback' can be \ used to modulate the variation" visible = @ringstyle endparam param ringstp caption = "RingFeedback" default = 1.0 hint = "If 'Vary Ringwidth' is set, this setting adjusts the amount of variation" visible = @varyrwidth endparam param trapmode caption = "Trap Flavor" enum = "distance" "angle" "trap angle" "difference angle" "magnitude" "trap magnitude" \ "real" "imaginary" "trap real" "trap imaginary" "sum" "difference" "product" \ "quotient 1" "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "What quantity will be watched for possible trapping?" endparam param swapflavor caption = "New Flavor?" default = FALSE hint = "Try an alternately flavored trap test? Only affects flavor choices \ above 9 (sum, difference, etc)" visible = @trapmode > 9 endparam param tscale caption = "Scale" default = 0.25 hint = "This parameter determines the size of the cardioid" endparam param varyscale caption = "Vary Scale?" default = FALSE hint = "If set, the value of the trap will modify the trap size each iteration; \ parameter 'ScaleFeedback' can be used to modulate the variation" endparam param scalestp caption = "ScaleFeedback" default = 1.0 hint = "If 'Vary Scale' is set, this setting adjusts the amount of variation" visible = @varyscale endparam param rotate caption = "Rotation Angle" default = 0.0 min = -179.9 max = 359.9 hint = "Number of degrees (0-359) that the cardioid should be rotated from its default position" endparam param varyrotation caption = "Vary Rotation?" default = FALSE hint = "If set, the value of the trap will modify the trap rotation each iteration; \ parameter 'RotationFeedback' can be used to modulate the variation" endparam param rotationstp caption = "RotationFeedback" default = 1.0 hint = "If 'Vary Rotation' is set, this setting adjusts the amount of variation" visible = @varyrotation endparam param centr caption = "Center" default = (0,0) hint = "Enter coordinates of cardioid center (cusp)" endparam param varycenter caption = "Vary Center?" default = FALSE hint = "If set, the value of the trap will modify the trap center each iteration; \ parameter 'CenterFeedback' can be used to modulate the variation" endparam param centerstp caption = "CenterFeedback" default = 1.0 hint = "If 'Vary Center' is set, this setting adjusts the amount of variation" visible = @varycenter endparam param sprangle caption = "Spread Angle?" default = FALSE hint = "If enabled, the angular range is spread out or compressed, \ depending on the value of param 'AngleSpread Factor'" endparam param sprangfactor caption = "AngleSpread Factor" default = 3.0 hint = "If param 'Spread Angle?' is enabled, this is the stretching or \ compression multiplier of atan(z). 1.0 corresponds to no spreading. \ Inactive if 'Spread Angle?' is not enabled" visible = @sprangle == TRUE endparam param initialization caption = "Z Initialization" enum = "z" "1/z" "z^2" "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)" "z^power" \ "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)" default = 0 hint = "The fractal is initialized to this value at each iteration prior to \ being fed to the trap" endparam param zpower caption = "Z Power" default = (0,1) hint = "Z exponent if param 'Z Initialization' is set to 'z^power'" visible = @initialization == "z^power" endparam param ziscale caption = "Z Init Scale" default = 1.0 hint = "This param can be used to scale the overall iterate z \ before z initialization" endparam param initperturb caption = "Perturb Z Initialization?" default = FALSE hint = "If enabled, then 'Z Initialization' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Z Init Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @initialization != "z" endparam param initblend caption = "Z Init Blend" default = 0.1 hint = "If 'Perturb Z Initialization' is enabled, then this sets the fraction \ of 'Z Initialization' that is mixed in with the original #z. \ Inactive if 'Perturb Z Initialization' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @initperturb endparam param transmogrify caption = "Trap Transmute" enum = "t" "1/t" "t^2" "1/t^2" "log(t)" "e^t" "t^t" "sin(t)" "cos(t)" \ "tan(t)" "asin(t)" "acos(t)" "atan(t)" "sinh(t)" "cosh(t)" "tanh(t)" \ "asinh(t)" "acosh(t)" "atanh(t)" "log(1/t)" "log(log(t))" "e^-t" \ "e^(1/t)" "t^-t" "sin(t)^2" "cos(t)^2" "tan(t)^2" "cot(t)" "sec(t)" \ "csc(t)" "cot(t)^2" "sec(t)^2" "csc(t)^2" "t^t^t" "1/t^t^t" "log(-t)" \ "1/log(t)" "tlog(t)" "sin(t)/t" "cos(t)/t" "sin(t)*cos(t)" "sin(t^2)" \ "e^(-1/t)" "te^t" "te^-t" "te^(1/t)" "te^(-1/t)" "t^3" "1/t^3" \ "acot(t)" "asec(t)" "acsc(t)" "tan(t)/t" "cot(t)/t" "sec(t)/t" \ "csc(t)/t" "tsin(t)" "tcos(t)" "ttan(t)" "tcot(t)" "tsec(t)" "tcsc(t)" \ "sin(1/t)" "cos(1/t)" "tan(1/t)" "cot(1/t)" "sec(1/t)" "csc(1/t)" \ "cotanh(t)" "sech(t)" "cosech(t)" "acoth(t)" "asech(t)" "acosech(t)" "t^power" \ "sinh(t)^2" "cosh(t)^2" "tanh(t)^2" "cotanh(t)^2" \ "sech(t)^2" "cosech(t)^2" "sinh(1/t)" "cosh(1/t)" "tanh(1/t)" \ "cotanh(1/t)" "sech(1/t)" "cosech(1/t)" "sin(t)tan(t)" "sinh(t)tanh(t)" \ "sinh(t)cosh(t)" "sinh(t)^2*cosh(t)^2" "sin(t)^2*cos(t)^2" \ "sin(1/t)*cos(1/t)" "sin(1/t)^2" "sin(t)cos(1/t)" "sin(t)sin(1/t)" \ "log(t)^2" "sin(t)sin(2t)" "e^2t" "e^-2t" "sinh(1/t)cosh(1/t)" \ "sinh(1/t)^2" "sinh(t)cosh(1/t)" "sinh(t)sinh(1/t)" "sin(t)sinh(t)" \ "sin(t)cosh(t)" "sin(t)^2*sinh(t)^2" "sin(t)e^t" "cos(t)e^t" \ "sinh(t)e^t" "cosh(t)e^t" "sin(t)log(t)" "cos(t)log(t)" "sinh(t)log(t)" \ "cosh(t)log(t)" default = 0 hint = "The point, t, on the cardioid potentially trapped by z can be transformed \ prior to testing; select 't' for no transmutation. \ Transmute does not work on the following trap flavors: \ 2 (angle), 5 (magnitude), 7 (real), and 8 (imag)" endparam param tpower caption = "Trap Power" default = (0,1) hint = "Trap point t exponent if param 'Trap Transmute' is set to 't^power'" visible = @transmogrify == "t^power" endparam param tiscale caption = "Trap Scale" default = 1.0 hint = "This param can be used to scale the overall trap point t \ before transmutation" endparam param trapperturb caption = "Perturb Trap Transmute?" default = FALSE hint = "If enabled, then 'Trap Transmute' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'Trap Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @transmogrify != "t" endparam param trapblend caption = "Trap Blend" default = 0.1 hint = "If 'Perturb Trap Transmute' is enabled, then this sets the fraction \ of 'Trap Transmute' that is mixed in with the original trap point, t. \ Inactive if 'Perturb Trap Transmute' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @trapperturb endparam param realfront caption = "FrontEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the initial value of real(z) before input to \ the 'Z Initialization' function. For 'r^power' set param 'FrontEndReal \ Power'" endparam param rfpower caption = "FrontEndReal Power" default = 4.0 hint = "Real(z) exponent if param 'FrontEndReal Warp' is set to 'r^power'" visible = @realfront == "r^power" endparam param rfscale caption = "Real(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param rfperturb caption = "Perturb FrontEndReal?" default = FALSE hint = "If enabled, then 'FrontEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realfront != "r" endparam param rfblend caption = "FrontEndReal Blend" default = 0.1 hint = "If 'Perturb FrontEndReal' is enabled, then this sets the fraction \ of 'FrontEndReal Warp' that is mixed in with the original real(z). \ Inactive if 'Perturb FrontEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rfperturb endparam param imagfront caption = "FrontEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the initial value of imag(z) before input to \ the 'Z Initialization' function. For 'i^power' set param 'FrontEndImag \ Power'" endparam param ifpower caption = "FrontEndImag Power" default = 4.0 hint = "Imag(z) exponent if param 'FrontEndImag Warp' is set to 'i^power'" visible = @imagfront == "i^power" endparam param ifscale caption = "Imag(z) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ iterate z before warping or initialization" endparam param ifperturb caption = "Perturb FrontEndImag?" default = FALSE hint = "If enabled, then 'FrontEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'FrontEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagfront != "i" endparam param ifblend caption = "FrontEndImag Blend" default = 0.1 hint = "If 'Perturb FrontEndImag' is enabled, then this sets the fraction \ of 'FrontEndImag Warp' that is mixed in with the original imag(z). \ Inactive if 'Perturb FrontEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ifperturb endparam param realback caption = "BackEndReal Warp" enum = "r" "1/r" "r^2" "1/r^2" "log(r)" "e^r" "r^r" "sin(r)" "cos(r)" \ "tan(r)" "asin(r)" "acos(r)" "atan(r)" "sinh(r)" "cosh(r)" "tanh(r)" \ "asinh(r)" "acosh(r)" "atanh(r)" "log(1/r)" "log(log(r))" "e^-r" \ "e^(1/r)" "r^-r" "sin(r)^2" "cos(r)^2" "tan(r)^2" "cot(r)" "sec(r)" \ "csc(r)" "cot(r)^2" "sec(r)^2" "csc(r)^2" "r^r^r" "1/r^r^r" "log(-r)" \ "1/log(r)" "rlog(r)" "sin(r)/r" "cos(r)/r" "sin(r)*cos(r)" "sin(r^2)" \ "e^(-1/r)" "re^r" "re^-r" "re^(1/r)" "re^(-1/r)" "r^3" "1/r^3" \ "acot(r)" "asec(r)" "acsc(r)" "tan(r)/r" "cot(r)/r" "sec(r)/r" \ "csc(r)/r" "rsin(r)" "rcos(r)" "rtan(r)" "rcot(r)" "rsec(r)" "rcsc(r)" \ "sin(1/r)" "cos(1/r)" "tan(1/r)" "cot(1/r)" "sec(1/r)" "csc(1/r)" \ "cotanh(r)" "sech(r)" "cosech(r)" "acoth(r)" "asech(r)" "acosech(r)" "r^power" \ "sinh(r)^2" "cosh(r)^2" "tanh(r)^2" "cotanh(r)^2" \ "sech(r)^2" "cosech(r)^2" "sinh(1/r)" "cosh(1/r)" "tanh(1/r)" \ "cotanh(1/r)" "sech(1/r)" "cosech(1/r)" "sin(r)tan(r)" "sinh(r)tanh(r)" \ "sinh(r)cosh(r)" "sinh(r)^2*cosh(r)^2" "sin(r)^2*cos(r)^2" \ "sin(1/r)*cos(1/r)" "sin(1/r)^2" "sin(r)cos(1/r)" "sin(r)sin(1/r)" \ "log(r)^2" "sin(r)sin(2r)" "e^2r" "e^-2r" "sinh(1/r)cosh(1/r)" \ "sinh(1/r)^2" "sinh(r)cosh(1/r)" "sinh(r)sinh(1/r)" "sin(r)sinh(r)" \ "sin(r)cosh(r)" "sin(r)^2*sinh(r)^2" "sin(r)e^r" "cos(r)e^r" \ "sinh(r)e^r" "cosh(r)e^r" "sin(r)log(r)" "cos(r)log(r)" "sinh(r)log(r)" \ "cosh(r)log(r)" default = 0 hint = "This function can warp the final value of real(trap) before testing for \ trapping by the 'Trap What?' function. For 'r^power' set param 'BackEndReal \ Power'" endparam param rbpower caption = "BackEndReal Power" default = 4.0 hint = "Real(trap) exponent if param 'BackEndReal Warp' is set to 'r^power'" visible = @realback == "r^power" endparam param rbscale caption = "Real(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param rbperturb caption = "Perturb BackEndReal?" default = FALSE hint = "If enabled, then 'BackEndReal Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndReal Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @realback != "r" endparam param rbblend caption = "BackEndReal Blend" default = 0.1 hint = "If 'Perturb BackEndReal' is enabled, then this sets the fraction \ of 'BackEndReal Warp' that is mixed in with the original real(trap). \ Inactive if 'Perturb BackEndReal' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @rbperturb endparam param imagback caption = "BackEndImag Warp" enum = "i" "1/i" "i^2" "1/i^2" "log(i)" "e^i" "i^i" "sin(i)" "cos(i)" \ "tan(i)" "asin(i)" "acos(i)" "atan(i)" "sinh(i)" "cosh(i)" "tanh(i)" \ "asinh(i)" "acosh(i)" "atanh(i)" "log(1/i)" "log(log(i))" "e^-i" \ "e^(1/i)" "i^-i" "sin(i)^2" "cos(i)^2" "tan(i)^2" "cot(i)" "sec(i)" \ "csc(i)" "cot(i)^2" "sec(i)^2" "csc(i)^2" "i^i^i" "1/i^i^i" "log(-i)" \ "1/log(i)" "ilog(i)" "sin(i)/i" "cos(i)/i" "sin(i)*cos(i)" "sin(i^2)" \ "e^(-1/i)" "ie^i" "ie^-i" "ie^(1/i)" "ie^(-1/i)" "i^3" "1/i^3" \ "acot(i)" "asec(i)" "acsc(i)" "tan(i)/i" "cot(i)/i" "sec(i)/i" \ "csc(i)/i" "isin(i)" "icos(i)" "itan(i)" "icot(i)" "isec(i)" "icsc(i)" \ "sin(1/i)" "cos(1/i)" "tan(1/i)" "cot(1/i)" "sec(1/i)" "csc(1/i)" \ "cotanh(i)" "sech(i)" "cosech(i)" "acoth(i)" "asech(i)" "acosech(i)" "i^power" \ "sinh(i)^2" "cosh(i)^2" "tanh(i)^2" "cotanh(i)^2" \ "sech(i)^2" "cosech(i)^2" "sinh(1/i)" "cosh(1/i)" "tanh(1/i)" \ "cotanh(1/i)" "sech(1/i)" "cosech(1/i)" "sin(i)tan(i)" "sinh(i)tanh(i)" \ "sinh(i)cosh(i)" "sinh(i)^2*cosh(i)^2" "sin(i)^2*cos(i)^2" \ "sin(1/i)*cos(1/i)" "sin(1/i)^2" "sin(i)cos(1/i)" "sin(i)sin(1/i)" \ "log(i)^2" "sin(i)sin(2i)" "e^2i" "e^-2i" "sinh(1/i)cosh(1/i)" \ "sinh(1/i)^2" "sinh(i)cosh(1/i)" "sinh(i)sinh(1/i)" "sin(i)sinh(i)" \ "sin(i)cosh(i)" "sin(i)^2*sinh(i)^2" "sin(i)e^i" "cos(i)e^i" \ "sinh(i)e^i" "cosh(i)e^i" "sin(i)log(i)" "cos(i)log(i)" "sinh(i)log(i)" \ "cosh(i)log(i)" default = 0 hint = "This function can warp the final value of imag(trap) before testing for \ trapping by the 'Trap What?' function. For 'i^power' set param 'BackEndImag \ Power'" endparam param ibpower caption = "BackEndImag Power" default = 4.0 hint = "Imag(trap) exponent if param 'BackEndImag Warp' is set to 'i^power'" visible = @imagback == "i^power" endparam param ibscale caption = "Imag(t) Scale" default = 1.0 hint = "These params can be used to scale the individual parts of the \ trap point t before warping (but after transmutation)" endparam param ibperturb caption = "Perturb BackEndImag?" default = FALSE hint = "If enabled, then 'BackEndImag Warp' is only partially \ blended into the original value, instead of replacing it (less \ warping); param 'BackEndImag Blend' sets the fraction to be blended \ in (0=no perturbation, 1=full perturbation)" visible = @imagback != "i" endparam param ibblend caption = "BackEndImag Blend" default = 0.1 hint = "If 'Perturb BackEndImag' is enabled, then this sets the fraction \ of 'BackEndImag Warp' that is mixed in with the original imag(trap). \ Inactive if 'Perturb BackEndImag' is disabled. 0=no perturbation, \ 1=full perturbation" visible = @ibperturb endparam param @colorby caption = "Color By?" enum = "distance" "iteration" "magnitude" "test" "trap magnitude" "angle" \ "trap angle" "mod magnitude" "mod angle" "real" "trap real" "mod real"\ "imag" "trap imag" "mod imag" "raw distance" default = 0 hint = "Criterion for computing color index" endparam param @colorspread caption = "Color Spread" default = 1.0 hint = "This value can increase or decrease the color index range; adjust \ if fractal coloring is too monotone" endparam param varyspread caption = "Vary Colorspread?" default = FALSE hint = "If set, the value of the trap will modify the color index spread each \ iteration; parameter 'SpreadFeedback' can be used to modulate the variation" endparam param spreadstp caption = "SpreadFeedback" default = 1.0 hint = "If 'Vary Colorspread' is set, this setting adjusts the amount of variation" visible = @varyspread endparam param ranges caption = "Color Ranges" default = 1 hint = "Different ranges of the color palette can be used, based on iteration" endparam param hideranges caption = "Mask Color Ranges?" default = FALSE hint = "If enabled, then param 'Show Which Range?' can be set to mask pixels \ other than those in the given range. Only valid if 'Color Ranges' > 1" visible = @ranges > 1 endparam param showrange caption = "Show Which Range?" default = 0 min = 0 hint = "If 'Mask Color Ranges?' is turned on, then pixels falling in this color \ range will be visible; others will be set to the solid color. Works best \ with param 'Trap What?' set to a threshold or limit option. 0 <= param < \ 'Color Ranges'" visible = @hideranges == TRUE endparam param @colorwarp caption = "Color Warp Factor" enum = "c" "1/c" "c^2" "1/c^2" "log(c)" "e^c" "c^c" "sin(c)" "cos(c)" \ "tan(c)" "asin(c)" "acos(c)" "atan(c)" "sinh(c)" "cosh(c)" "tanh(c)" \ "asinh(c)" "acosh(c)" "atanh(c)" "log(1/c)" "log(log(c))" "e^-c" \ "e^(1/c)" "c^-c" "sin(c)^2" "cos(c)^2" "tan(c)^2" "cot(c)" "sec(c)" \ "csc(c)" "cot(c)^2" "sec(c)^2" "csc(c)^2" "c^c^c" "1/c^c^c" "log(-c)" \ "1/log(c)" "clog(c)" "sin(c)/c" "cos(c)/c" "sin(c)*cos(c)" "sin(c^2)" \ "e^(-1/c)" "ce^c" "ce^-c" "ce^(1/c)" "ce^(-1/c)" "c^3" "1/c^3" \ "acot(c)" "asec(c)" "acsc(c)" "tan(c)/c" "cot(c)/c" "sec(c)/c" \ "csc(c)/c" "csin(c)" "ccos(c)" "ctan(c)" "ccot(c)" "csec(c)" "ccsc(c)" \ "sin(1/c)" "cos(1/c)" "tan(1/c)" "cot(1/c)" "sec(1/c)" "csc(1/c)" \ "cotanh(c)" "sech(c)" "cosech(c)" "acoth(c)" "asech(c)" "acosech(c)" "c^power" \ "sinh(c)^2" "cosh(c)^2" "tanh(c)^2" "cotanh(c)^2" \ "sech(c)^2" "cosech(c)^2" "sinh(1/c)" "cosh(1/c)" "tanh(1/c)" \ "cotanh(1/c)" "sech(1/c)" "cosech(1/c)" "sin(c)tan(c)" "sinh(c)tanh(c)" \ "sinh(c)cosh(c)" "sinh(c)^2*cosh(c)^2" "sin(c)^2*cos(c)^2" \ "sin(1/c)*cos(1/c)" "sin(1/c)^2" "sin(c)cos(1/c)" "sin(c)sin(1/c)" \ "log(c)^2" "sin(c)sin(2c)" "e^2c" "e^-2c" "sinh(1/c)cosh(1/c)" \ "sinh(1/c)^2" "sinh(c)cosh(1/c)" "sinh(c)sinh(1/c)" "sin(c)sinh(c)" \ "sin(c)cosh(c)" "sin(c)^2*sinh(c)^2" "sin(c)e^c" "cos(c)e^c" \ "sinh(c)e^c" "cosh(c)e^c" "sin(c)log(c)" "cos(c)log(c)" "sinh(c)log(c)" \ "cosh(c)log(c)" default = 0 hint = "The final color index can be warped by this function; default is \ 'c' (no change in color index)" endparam param cpower caption = "Color Power" default = 0.25 hint = "Color index exponent if param 'Color Warp Factor' is set to 'c^power'" visible = @colorwarp == "c^power" endparam param skippediters caption = "Iterations to Skip" default = 0 hint = "Values will not be watched for trapping until after this many \ fractal iterations" endparam param towatch caption = "Iterations to Watch" default = 0 min = 0 hint = "How many iterations should the orbit be monitored for potential trapping? \ '0' means watch all iterations" endparam param polar caption = "Polar Coordinates?" default = TRUE hint = "Alternative interpretation of trap value" endparam param trapvariant caption = "Trap Variants" enum = "Normal" "Flip" "Conjugate" "FlipConjugate" "Negate" "Negate Flip" \ "Negate Conjugate" "Conjugate Flip" default = 0 hint = "Enables alternative coloring algorithms based on manipulation of \ real(z) and imag(z) before trapping" endparam param operator caption = "Enable Operator?" enum = "none" "multiply" "add" "subtract" "divide" "exponentiate" \ "subtraction2" "division2" "exponential2" "logarithm" "logarithm2" default = 0 hint = "If enabled, z is multiplied by (added to, etc) this constant on each iteration \ before testing; parameter 'Operator Constant' sets the constant \ value that is used in the operation" endparam param operatee caption = "Operation Constant" default = (-1, 1) hint = "If 'Enable Operator' is set, this is the constant used in the \ multiplication/addition/subtraction/division/exponentiation/logarithm" visible = @operator != "none" endparam param swaporder caption = "Swap Order?" default = FALSE hint = "Swaps order of 'Trap Variants' and 'Enable Operator'. Normally, \ the trap variation is executed AFTER the arithmetic operation; this \ param toggles the execution order" visible = (( @trapvariant != "normal" ) && ( @operator != "none" )) endparam param history caption = "Enable History?" default = FALSE hint = "If enabled, both the previous and current z are used to determine \ trapping; a curvature-based coloring variant" endparam param histype caption = "History Type" enum = "middle aged" "old" "very old" default = 0 hint = "Determines curvature algorithm" visible = @history == TRUE endparam param twavy caption = "Enable T Waviness?" default = FALSE hint = "Adds waves to the trap function. If enabled, params 'Waviness Mode', \ 'Waviness Amplitude', & 'Waviness Frequency' may be adjusted to vary \ wave character" endparam param twavmode caption = "T Wave Mode" enum = "radial" "tangential" default = 0 hint = "If 'Enable T Waviness' is on, this param sets the type of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavamp caption = "T Wave Amplitude" default = 0.1 hint = "If 'Enable T Waviness' is on, this param sets the height of the waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param twavfreq caption = "T Wave Frequency" default = 10.0 hint = "If 'Enable T Waviness' is on, this param sets the density of waves \ superposed on the trap function; inactive otherwise" visible = @twavy == TRUE endparam param pointmode caption = "Enable Point Mode?" default = FALSE hint = "If set, trapping occurs normally until the first #z has been \ trapped using the usual criteria; subsequently, trapping is \ relative to this first trap point, rather than to the entire curve" endparam param turb1 caption = "Turbulence 1?" default = FALSE hint = "Adds distortion (Products) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb2 caption = "Turbulence 2?" default = FALSE hint = "Adds distortion (Random) to coloring; amount of turbulence \ is set for all types by parameter 'Turbulence Amount'" endparam param turb3 caption = "Turbulence 3?" default = FALSE hint = "Adds fBm distortion to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount', while \ the six 'fBm' params ('fBm Scale', 'fBm Rotation', etc) are \ specific to 'Turbulence 3'" endparam param turb4 caption = "Turbulence 4?" default = FALSE hint = "Adds distortion (Sine) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb5 caption = "Turbulence 5?" default = FALSE hint = "Adds distortion (Log) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turb6 caption = "Turbulence 6?" default = FALSE hint = "Adds distortion (Vectors) to coloring; amount of turbulence \ for all types is set by parameter 'Turbulence Amount'" endparam param turbamount caption = "Turbulence Amount" default = 1.0 hint = "Overall degree of texturizing, if any of the six 'Turbulence' \ parameters are enabled" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param bscale caption = "fBm Scale" default = 1.0 hint = "The overall scale of 'Turbulence 3', the fBm turbulence option" visible = @turb3 endparam param bangle caption = "fBm Rotation" default = 0.0 hint = "Angular parameter for 'Turbulence 3', fBm noise" visible = @turb3 endparam param bstep caption = "fBm Stepsize" default = 0.5 hint = "'Turbulence 3' scale step size for fBm noise iterations" visible = @turb3 endparam param banglestep caption = "fBm Rotation Step" default = 37.0 hint = "The angle in degrees for noise function rotation after \ each fBm iteration; used if 'Turbulence 3' is enabled" visible = @turb3 endparam param boctaves caption = "fBm Octaves" default = 7 min = 1 hint = "The number of iterations of the 'Turbulence 3' fBm noise function" visible = @turb3 endparam param bpower caption = "fBm Exponent" default = 2.0 hint = "The exponent used if param 'Turbulence 3' is enabled \ for fBm randomization" visible = @turb3 endparam param varyturb caption = "Vary Turbulence?" default = FALSE hint = "If set, the value of the trap will modify the turbulence amount each \ iteration; parameter 'TurbulenceFeedback' can be used to modulate the variation" visible = (@turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6) endparam param turbstp caption = "TurbulenceFeedback" default = 1.0 hint = "If 'Vary Turbulence' is set, this setting adjusts the amount of variation" visible = @varyturb endparam param mask caption = "Masking?" default = FALSE hint = "If enabled, trapped values below the 'Masking Threshold' parameter \ will be colored the solid color" visible = !@revmask endparam param revmask caption = "Reverse Masking?" default = FALSE hint = "If enabled, trapped values greater than the 'Masking Threshold' \ parameter will be colored the solid color; inactive if normal \ 'Masking' is also enabled" visible = !@mask endparam param maskthresh caption = "Masking Threshold" default = 0.1 hint = "This param is the value used for solid color masking if either \ 'Masking?' or 'Reverse Masking?' are enabled. Depending on how param \ 'Color By' is set, the value may need large adjustment (.001-10 may \ be useful)" visible = (@mask || @revmask) endparam param varymode caption = "Feedback Mode" enum = "trapped" "not trapped" "always" default = 2 hint = "Variation style; variation of individual parameters must still \ be enabled. 'trapped' -- feedback occurs only on iterations where some \ value was trapped; 'not trapped' -- varies on iterations when nothing \ trapped; 'always' -- feedback on every iteation" visible = (@varyturb || @varyscale || @varyrotation || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam param oldstyle caption = "OldStyle Feedback?" default = FALSE hint = "Retained for compatibility with original version of this formula; \ enable if you need to render an early image utilizing this formula, \ or for a variant algorithm that generally produces less feedback variation" visible = (@varyturb || @varyscale || @varyrotation || @varythresh || @varyrwidth || @varycenter || @varyspread) endparam } jam-RoseTrap { ; jam version 010922 ; The rose is defined by r = a*sin(N*theta), ; where N = number of leaves (odd N) or ; 2N = number of leaves (even N). init: float twopi = 2.0 * #pi ; Change and scale variables to facilitate variation, if selected float spread = @colorspread, float spreadstep = 0.05 * @spreadstp float thresh = @threshold, float threshstep = 0.05 * @threshstp float scale = @tscale, float scalestep = 0.05 * @scalestp float ringstep = 0.05 * @ringstp, float rwidth = @ringwidth float rotation = @rotate * #pi / 180, float rotationstep = 0.05 * @rotationstp if ( rotation < 0 ) rotation = rotation + twopi endif ; rotation complex center = @centr, float centerstep = @centerstp float sign = 0.0 bool trapped = FALSE bool vary = TRUE float innerradius = thresh - @ringwidth if ( @whattotrap > 11 ) innerradius = thresh + @ringwidth ; innerradius is really an outerradius if we are exceeding limits endif ; @whattotrap ; For turbulence computation option float turbulamount = @turbamount, float _coloradjust = 0.0, float _color = 0.0 complex zlast = (0,0), complex tlast = (1,0), float turbstep = @turbstp complex zold = (0,0), complex zveryold = (0,0), complex zscratch = (0,0) complex zold2 = (0,0) float rfbcomp = 1-@rfblend, float ifbcomp = 1-@ifblend float rbbcomp = 1-@rbblend, float ibbcomp = 1-@ibblend float trapbcomp = 1-@trapblend, float initbcomp = 1-@initblend if @leafs % 2 == 0 ; even number of leaves int leaves = round(@leafs/2) else int leaves = @leafs endif if @towatch == 0 int watch = #maxiter else int watch = @skippediters + @towatch endif ; towatch int iter = 0, int count = 0 int itrapped = int itrapped2 = int itrapped3 = int itrapped4 = 0 float test = 0.0, float trapped1 = float trapped2 = float trapped3 = float trapped4 = 1e9 float zangle = 0.0, float zatrapped = float zatrapped2 = float zatrapped3 = float zatrapped4 = 0.0 float cangle = 0.0, float catrapped = float catrapped2 = float catrapped3 = float catrapped4 = 0.0 complex ztrapped = complex ztrapped2 = complex ztrapped3 = complex ztrapped4 = (0,0) complex ztemp = complex zttrapped = complex zttrapped2 = complex zttrapped3 = complex zttrapped4 = (0,0) complex tempc = complex ctrapped = complex ctrapped2 = complex ctrapped3 = complex ctrapped4 = (0,0) float tempx = 0.0, float tempy = 0.0, float temp = 0.0, float temp2 = 0.0 complex zinput = (0,0) ; If we're trapping something big, initialize small if (( @whattotrap == 1 ) || ( @whattotrap == 5 ) || ( @whattotrap == 6 ) \ || ( @whattotrap == 7 )) trapped1 = trapped2 = trapped3 = trapped4 = -1e9 elseif @whattotrap > 14 trapped2 = -1e9 ; used to store the max when looking for min-max, min+max, etc. endif ; trapmode loop: iter = iter + 1 if ( iter > @skippediters ) && ( iter <= watch ) ; finished skipping --- start testing for trap ; Initialize front end real, front end imag, if desired temp2 = @rfscale * real(#z) if ( @realfront == 0 ) tempx = temp2 elseif ( @realfront == 1 ) tempx = 1/temp2 elseif ( @realfront == 2 ) tempx = temp2 * temp2 elseif ( @realfront == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realfront == 4 ) tempx = log(temp2) elseif ( @realfront == 5 ) tempx = exp( temp2) elseif ( @realfront == 6 ) tempx = temp2^temp2 elseif ( @realfront == 7 ) tempx = sin( temp2 ) elseif ( @realfront == 8 ) tempx = cos( temp2 ) elseif ( @realfront == 9 ) tempx = tan( temp2 ) elseif ( @realfront == 10 ) tempx = asin( temp2 ) elseif ( @realfront == 11 ) tempx = acos( temp2 ) elseif ( @realfront == 12 ) tempx = atan( temp2 ) elseif ( @realfront == 13 ) tempx = sinh( temp2 ) elseif ( @realfront == 14 ) tempx = cosh( temp2 ) elseif ( @realfront == 15 ) tempx = tanh( temp2 ) elseif ( @realfront == 16 ) tempx = asinh( temp2 ) elseif ( @realfront == 17 ) tempx = acosh( temp2 ) elseif ( @realfront == 18 ) tempx = atanh( temp2 ) elseif ( @realfront == 19 ) tempx = log( 1/temp2 ) elseif ( @realfront == 20 ) tempx = log( log( temp2 )) elseif ( @realfront == 21 ) tempx = exp( -temp2 ) elseif ( @realfront == 22 ) tempx = exp( 1/temp2 ) elseif ( @realfront == 23 ) tempx = temp2^(-temp2) elseif ( @realfront == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 27 ) tempx = cotan( temp2 ) elseif ( @realfront == 28 ) tempx = 1/cos( temp2 ) elseif ( @realfront == 29 ) tempx = 1/sin( temp2 ) elseif ( @realfront == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realfront == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realfront == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realfront == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realfront == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realfront == 35 ) tempx = log(-temp2) elseif ( @realfront == 36 ) tempx = 1/log( temp2 ) elseif ( @realfront == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realfront == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realfront == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realfront == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realfront == 41 ) tempx = sin( temp2^2 ) elseif ( @realfront == 42 ) tempx = exp( -1/temp2 ) elseif ( @realfront == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realfront == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realfront == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realfront == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realfront == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realfront == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realfront == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realfront == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realfront == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realfront == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realfront == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realfront == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realfront == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realfront == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realfront == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realfront == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realfront == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realfront == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realfront == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realfront == 62 ) tempx = sin( 1/temp2 ) elseif ( @realfront == 63 ) tempx = cos( 1/temp2 ) elseif ( @realfront == 64 ) tempx = tan( 1/temp2 ) elseif ( @realfront == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realfront == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realfront == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realfront == 68 ) tempx = cotanh( temp2 ) elseif ( @realfront == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realfront == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realfront == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realfront == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realfront == 73 ) tempx = asinh( 1/temp2 ) elseif @realfront == 74 tempx = temp2^@rfpower elseif @realfront == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realfront == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realfront == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realfront == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realfront == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realfront == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realfront == 81 tempx = sinh(1/temp2) elseif @realfront == 82 tempx = cosh(1/temp2) elseif @realfront == 83 tempx = tanh(1/temp2) elseif @realfront == 84 tempx = cotanh(1/temp2) elseif @realfront == 85 tempx = 1/cosh(1/temp2) elseif @realfront == 86 tempx = 1/sinh(1/temp2) elseif @realfront == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realfront == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realfront == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realfront == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realfront == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realfront == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realfront == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realfront == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realfront == 98 tempx = exp(2*temp2) elseif @realfront == 99 tempx = exp(-2*temp2) elseif @realfront == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realfront == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realfront == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realfront == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realfront == 104 tempx = sin(temp2) * sinh(temp2) elseif @realfront == 105 tempx = sin(temp2) * cosh(temp2) elseif @realfront == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realfront == 107 tempx = sin(temp2)*exp(temp2) elseif @realfront == 108 tempx = cos(temp2)*exp(temp2) elseif @realfront == 109 tempx = sinh(temp2)*exp(temp2) elseif @realfront == 110 tempx = cosh(temp2)*exp(temp2) elseif @realfront == 111 tempx = sin(temp2)*log(temp2) elseif @realfront == 112 tempx = cos(temp2)*log(temp2) elseif @realfront == 113 tempx = sinh(temp2)*log(temp2) else ; @realfront == 114 tempx = cosh(temp2)*log(temp2) endif ; realfront if @rfperturb tempx = @rfblend * tempx + rfbcomp * real(#z) endif ; @rfperturb temp2 = @ifscale * imag(#z) if ( @imagfront == 0 ) tempy = temp2 elseif ( @imagfront == 1 ) tempy = 1/temp2 elseif ( @imagfront == 2 ) tempy = temp2 * temp2 elseif ( @imagfront == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagfront == 4 ) tempy = log(temp2) elseif ( @imagfront == 5 ) tempy = exp( temp2) elseif ( @imagfront == 6 ) tempy = temp2^temp2 elseif ( @imagfront == 7 ) tempy = sin( temp2 ) elseif ( @imagfront == 8 ) tempy = cos( temp2 ) elseif ( @imagfront == 9 ) tempy = tan( temp2 ) elseif ( @imagfront == 10 ) tempy = asin( temp2 ) elseif ( @imagfront == 11 ) tempy = acos( temp2 ) elseif ( @imagfront == 12 ) tempy = atan( temp2 ) elseif ( @imagfront == 13 ) tempy = sinh( temp2 ) elseif ( @imagfront == 14 ) tempy = cosh( temp2 ) elseif ( @imagfront == 15 ) tempy = tanh( temp2 ) elseif ( @imagfront == 16 ) tempy = asinh( temp2 ) elseif ( @imagfront == 17 ) tempy = acosh( temp2 ) elseif ( @imagfront == 18 ) tempy = atanh( temp2 ) elseif ( @imagfront == 19 ) tempy = log( 1/temp2 ) elseif ( @imagfront == 20 ) tempy = log( log( temp2 )) elseif ( @imagfront == 21 ) tempy = exp( -temp2 ) elseif ( @imagfront == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagfront == 23 ) tempy = temp2^(-temp2) elseif ( @imagfront == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 27 ) tempy = cotan( temp2 ) elseif ( @imagfront == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagfront == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagfront == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagfront == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagfront == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagfront == 35 ) tempy = log(-temp2) elseif ( @imagfront == 36 ) tempy = 1/log( temp2 ) elseif ( @imagfront == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagfront == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagfront == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagfront == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagfront == 41 ) tempy = sin( temp2^2 ) elseif ( @imagfront == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagfront == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagfront == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagfront == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagfront == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagfront == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagfront == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagfront == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagfront == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagfront == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagfront == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagfront == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagfront == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagfront == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagfront == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagfront == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagfront == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagfront == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagfront == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagfront == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagfront == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagfront == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagfront == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagfront == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagfront == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagfront == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagfront == 68 ) tempy = cotanh( temp2 ) elseif ( @imagfront == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagfront == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagfront == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagfront == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagfront == 73 ) tempy = asinh( 1/temp2 ) elseif @imagfront == 74 tempy = temp2^@ifpower elseif @imagfront == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagfront == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagfront == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagfront == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagfront == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagfront == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagfront == 81 tempy = sinh(1/temp2) elseif @imagfront == 82 tempy = cosh(1/temp2) elseif @imagfront == 83 tempy = tanh(1/temp2) elseif @imagfront == 84 tempy = cotanh(1/temp2) elseif @imagfront == 85 tempy = 1/cosh(1/temp2) elseif @imagfront == 86 tempy = 1/sinh(1/temp2) elseif @imagfront == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagfront == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagfront == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagfront == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagfront == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagfront == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagfront == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagfront == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagfront == 98 tempy = exp(2*temp2) elseif @imagfront == 99 tempy = exp(-2*temp2) elseif @imagfront == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagfront == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagfront == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagfront == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagfront == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagfront == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagfront == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagfront == 107 tempy = sin(temp2)*exp(temp2) elseif @imagfront == 108 tempy = cos(temp2)*exp(temp2) elseif @imagfront == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagfront == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagfront == 111 tempy = sin(temp2)*log(temp2) elseif @imagfront == 112 tempy = cos(temp2)*log(temp2) elseif @imagfront == 113 tempy = sinh(temp2)*log(temp2) else ; @imagfront == 114 tempy = cosh(temp2)*log(temp2) endif ; imagfront if @ifperturb tempy = @ifblend * tempy + ifbcomp * imag(#z) endif ; @ifperturb zold = tempx + flip(tempy) ; Initialize z, if desired zold = @ziscale * zold if ( @initialization == 0 ) zinput = zold elseif ( @initialization == 1 ) zinput = 1/zold elseif ( @initialization == 2 ) zinput = zold * zold elseif ( @initialization == 3 ) zinput = 1 / ( zold * zold ) elseif ( @initialization == 4 ) zinput = log(zold) elseif ( @initialization == 5 ) zinput = exp( zold) elseif ( @initialization == 6 ) zinput = zold^zold elseif ( @initialization == 7 ) zinput = sin( zold ) elseif ( @initialization == 8 ) zinput = cos( zold ) elseif ( @initialization == 9 ) zinput = tan( zold ) elseif ( @initialization == 10 ) zinput = asin( zold ) elseif ( @initialization == 11 ) zinput = acos( zold ) elseif ( @initialization == 12 ) zinput = atan( zold ) elseif ( @initialization == 13 ) zinput = sinh( zold ) elseif ( @initialization == 14 ) zinput = cosh( zold ) elseif ( @initialization == 15 ) zinput = tanh( zold ) elseif ( @initialization == 16 ) zinput = asinh( zold ) elseif ( @initialization == 17 ) zinput = acosh( zold ) elseif ( @initialization == 18 ) zinput = atanh( zold ) elseif ( @initialization == 19 ) zinput = log( 1/zold ) elseif ( @initialization == 20 ) zinput = log( log( zold )) elseif ( @initialization == 21 ) zinput = exp( -zold ) elseif ( @initialization == 22 ) zinput = exp( 1/zold ) elseif ( @initialization == 23 ) zinput = zold^(-zold) elseif ( @initialization == 24 ) zinput = sin( zold ) zinput = zinput * zinput elseif ( @initialization == 25 ) zinput = cos( zold ) zinput = zinput * zinput elseif ( @initialization == 26 ) zinput = tan( zold ) zinput = zinput * zinput elseif ( @initialization == 27 ) zinput = cotan( zold ) elseif ( @initialization == 28 ) zinput = 1/cos( zold ) elseif ( @initialization == 29 ) zinput = 1/sin( zold ) elseif ( @initialization == 30 ) zinput = cotan( zold ) zinput = zinput * zinput elseif ( @initialization == 31 ) zinput = 1/cos( zold ) zinput = zinput * zinput elseif ( @initialization == 32 ) zinput = 1/sin( zold ) zinput = zinput * zinput elseif ( @initialization == 33 ) zinput = zold^(zold) zinput = zold^zinput elseif ( @initialization == 34 ) zinput = zold^(zold) zinput = 1/( zold^zinput ) elseif ( @initialization == 35 ) zinput = log(-zold) elseif ( @initialization == 36 ) zinput = 1/log( zold ) elseif ( @initialization == 37 ) zinput = zold * log( zold ) elseif ( @initialization == 38 ) zinput = sin( zold ) / zold elseif ( @initialization == 39 ) zinput = cos( zold ) / zold elseif ( @initialization == 40 ) zinput = sin( zold ) * cos( zold ) elseif ( @initialization == 41 ) zinput = sin( zold^2 ) elseif ( @initialization == 42 ) zinput = exp( -1/zold ) elseif ( @initialization == 43 ) zinput = zold * exp( zold ) elseif ( @initialization == 44 ) zinput = zold * exp( -zold ) elseif ( @initialization == 45 ) zinput = zold * exp( 1/zold ) elseif ( @initialization == 46 ) zinput = zold * exp( -1/zold ) elseif ( @initialization == 47 ) zinput = zold * zold * zold elseif ( @initialization == 48 ) zinput = 1 / ( zold * zold * zold ) elseif ( @initialization == 49 ) zinput = atan( 1 / zold ) elseif ( @initialization == 50 ) zinput = acos( 1 / zold ) elseif ( @initialization == 51 ) zinput = asin( 1 / zold ) elseif ( @initialization == 52 ) zinput = tan( zold ) / zold elseif ( @initialization == 53 ) zinput = cotan( zold ) / zold elseif ( @initialization == 54 ) zinput = 1 / ( zold * cos( zold )) elseif ( @initialization == 55 ) zinput = 1 / ( zold * sin( zold )) elseif ( @initialization == 56 ) zinput = zold * sin( zold ) elseif ( @initialization == 57 ) zinput = zold * cos( zold ) elseif ( @initialization == 58 ) zinput = zold * tan( zold ) elseif ( @initialization == 59 ) zinput = zold * cotan( zold ) elseif ( @initialization == 60 ) zinput = zold/cos( zold ) elseif ( @initialization == 61 ) zinput = zold/sin( zold ) elseif ( @initialization == 62 ) zinput = sin( 1/zold ) elseif ( @initialization == 63 ) zinput = cos( 1/zold ) elseif ( @initialization == 64 ) zinput = tan( 1/zold ) elseif ( @initialization == 65 ) zinput = cotan( 1/zold ) elseif ( @initialization == 66 ) zinput = 1/cos( 1/zold ) elseif ( @initialization == 67 ) zinput = 1/sin( 1/zold ) elseif ( @initialization == 68 ) zinput = cotanh( zold ) elseif ( @initialization == 69 ) zinput = 1/cosh( zold ) elseif ( @initialization == 70 ) zinput = 1/sinh( zold ) elseif ( @initialization == 71 ) zinput = atanh( 1/zold ) elseif ( @initialization == 72 ) zinput = acosh( 1/zold ) elseif ( @initialization == 73 ) zinput = asinh( 1/zold ) elseif @initialization == 74 zinput = zold^@zpower elseif @initialization == 75 zinput = sinh(zold) zinput = zinput * zinput elseif @initialization == 76 zinput = cosh( zold ) zinput = zinput * zinput elseif @initialization == 77 zinput = tanh(zold) zinput = zinput * zinput elseif @initialization == 78 zinput = cotanh( zold ) zinput = zinput * zinput elseif @initialization == 79 zinput = 1/cosh(zold) zinput = zinput * zinput elseif @initialization == 80 zinput = 1 / sinh( zold ) zinput = zinput * zinput elseif @initialization == 81 zinput = sinh(1/zold) elseif @initialization == 82 zinput = cosh(1/zold) elseif @initialization == 83 zinput = tanh(1/zold) elseif @initialization == 84 zinput = cotanh(1/zold) elseif @initialization == 85 zinput = 1/cosh(1/zold) elseif @initialization == 86 zinput = 1/sinh(1/zold) elseif @initialization == 87 zinput = sin( zold ) * tan(zold) elseif @initialization == 88 zinput = sinh(zold) * tanh(zold) elseif @initialization == 89 zinput = sinh(zold) * cosh(zold) elseif @initialization == 90 zinput = sinh(zold), zscratch = cosh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 91 zinput = sin(zold), zscratch = cos(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 92 zinput = 1/zold zinput = sin(zinput)*cos(zinput) elseif @initialization == 93 zinput = sin( 1/zold ) zinput = zinput*zinput elseif @initialization == 94 zinput = sin(zold) * cos(1/zold) elseif @initialization == 95 zinput = sin(zold) * sin(1/zold) elseif @initialization == 96 zinput = log(zold) zinput = zinput*zinput elseif @initialization == 97 zinput = sin(zold) * sin(2*zold) elseif @initialization == 98 zinput = exp(2*zold) elseif @initialization == 99 zinput = exp(-2*zold) elseif @initialization == 100 zinput = 1/zold zinput = sinh(zinput)*cosh(zinput) elseif @initialization == 101 zinput = sinh( 1/zold ) zinput = zinput*zinput elseif @initialization == 102 zinput = sinh(zold) * cosh(1/zold) elseif @initialization == 103 zinput = sinh(zold) * sinh(1/zold) elseif @initialization == 104 zinput = sin(zold) * sinh(zold) elseif @initialization == 105 zinput = sin(zold) * cosh(zold) elseif @initialization == 106 zinput = sin(zold), zscratch = sinh(zold) zinput = zinput*zinput*zscratch*zscratch elseif @initialization == 107 zinput = sin(zold)*exp(zold) elseif @initialization == 108 zinput = cos(zold)*exp(zold) elseif @initialization == 109 zinput = sinh(zold)*exp(zold) elseif @initialization == 110 zinput = cosh(zold)*exp(zold) elseif @initialization == 111 zinput = sin(zold)*log(zold) elseif @initialization == 112 zinput = cos(zold)*log(zold) elseif @initialization == 113 zinput = sinh(zold)*log(zold) else ; @initialization == 114 zinput = cosh(zold)*log(zold) endif ; initialization if @initperturb zinput = @initblend * zinput + initbcomp * zold endif ; @ifperturb if @trapvariant != 0 if @swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 if @operator != 0 if @operator == 1 ; multiplication zinput = zinput * @operatee elseif @operator == 2 ; addition zinput = zinput + @operatee elseif @operator == 3 ; subtraction zinput = zinput - @operatee elseif @operator == 4 ; division zinput = zinput / @operatee elseif @operator == 5 ; exponentiation zinput = zinput ^ @operatee elseif @operator == 6 ; subtraction2 zinput = @operatee - zinput elseif @operator == 7 ; division2 zinput = @operatee / zinput elseif @operator == 8 ; exponential2 zinput = @operatee ^ zinput elseif @operator == 9 ; logarithm zinput = log(zinput) / log(@operatee) elseif @operator == 10 ; logarithm2 zinput = log(@operatee) / log(zinput) endif ; operator2 endif ; operator1 if @trapvariant != 0 if !@swaporder if @trapvariant == 1 ; flip zinput = flip(zinput) elseif @trapvariant == 2 ; conjugate zinput = conj(zinput) elseif @trapvariant == 3 ; flip conjugate zinput = flip(conj(zinput)) elseif @trapvariant == 4 ; negate zinput = -zinput elseif @trapvariant == 5 ; negate flip zinput = -flip(zinput) elseif @trapvariant == 6 ; negate conjugate zinput = -conj(zinput) elseif @trapvariant == 7 ; negate flip conj = conj flip zinput = -flip(conj(zinput)) endif ; trapvariant2 endif ; swaporder endif ; trapvariant1 ; Find coordinates and angle of point on rose closest to #z (zinput) ; First, center z on the rose center ztemp = zinput - center ; Compute rotated #z ztemp = ztemp * exp( flip( -rotation)) if @history if @histype == 0 zold2 = ztemp - zold2, ztemp = zold2 elseif @histype == 1 zscratch = ztemp, ztemp = ztemp - zold2, zold2 = zscratch elseif @histype == 2 zscratch = ztemp, ztemp = ztemp - zveryold, zveryold = zold2, zold2 = zscratch endif ; histype endif ; history ; Save value for later turbulence zlast = ztemp ; Now find angle of 'rotated' #z zangle = atan2( ztemp ) if ( zangle < 0 ) zangle = zangle + twopi ; 0 <= zangle <= two pi endif ; zangle if @sprangle temp = zangle*@sprangfactor else temp = zangle endif ; @sprangle ; Find point on rose (i.e., on origin-#z radial vector) tempx = scale * sin( leaves * temp ) tempc = tempx * exp( flip( temp )) if !@polar tempc = real(ztemp) + flip( tempx ) endif ; @polar zold = tempc ; Now transmute the trapped point of the trapping curve if desired tempc = @tiscale * tempc if @transmogrify != 0 if ( @transmogrify == 1 ) tempc = 1/tempc elseif ( @transmogrify == 2 ) tempc = tempc * tempc elseif ( @transmogrify == 3 ) tempc = 1 / ( tempc * tempc ) elseif ( @transmogrify == 4 ) tempc = log(tempc) elseif ( @transmogrify == 5 ) tempc = exp( tempc) elseif ( @transmogrify == 6 ) tempc = tempc^tempc elseif ( @transmogrify == 7 ) tempc = sin( tempc ) elseif ( @transmogrify == 8 ) tempc = cos( tempc ) elseif ( @transmogrify == 9 ) tempc = tan( tempc ) elseif ( @transmogrify == 10 ) tempc = asin( tempc ) elseif ( @transmogrify == 11 ) tempc = acos( tempc ) elseif ( @transmogrify == 12 ) tempc = atan( tempc ) elseif ( @transmogrify == 13 ) tempc = sinh( tempc ) elseif ( @transmogrify == 14 ) tempc = cosh( tempc ) elseif ( @transmogrify == 15 ) tempc = tanh( tempc ) elseif ( @transmogrify == 16 ) tempc = asinh( tempc ) elseif ( @transmogrify == 17 ) tempc = acosh( tempc ) elseif ( @transmogrify == 18 ) tempc = atanh( tempc ) elseif ( @transmogrify == 19 ) tempc = log( 1/tempc ) elseif ( @transmogrify == 20 ) tempc = log( log( tempc )) elseif ( @transmogrify == 21 ) tempc = exp( -tempc ) elseif ( @transmogrify == 22 ) tempc = exp( 1/tempc ) elseif ( @transmogrify == 23 ) tempc = tempc^(-tempc) elseif ( @transmogrify == 24 ) tempc = sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 25 ) tempc = cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 26 ) tempc = tan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 27 ) tempc = cotan( tempc ) elseif ( @transmogrify == 28 ) tempc = 1/cos( tempc ) elseif ( @transmogrify == 29 ) tempc = 1/sin( tempc ) elseif ( @transmogrify == 30 ) tempc = cotan( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 31 ) tempc = 1/cos( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 32 ) tempc = 1/sin( tempc ) tempc = tempc * tempc elseif ( @transmogrify == 33 ) tempc = tempc^(tempc) tempc = tempc^tempc elseif ( @transmogrify == 34 ) tempc = tempc^(tempc) tempc = 1/( tempc^tempc ) elseif ( @transmogrify == 35 ) tempc = log(-tempc) elseif ( @transmogrify == 36 ) tempc = 1/log( tempc ) elseif ( @transmogrify == 37 ) tempc = tempc * log( tempc ) elseif ( @transmogrify == 38 ) tempc = sin( tempc ) / tempc elseif ( @transmogrify == 39 ) tempc = cos( tempc ) / tempc elseif ( @transmogrify == 40 ) tempc = sin( tempc ) * cos( tempc ) elseif ( @transmogrify == 41 ) tempc = sin( tempc^2 ) elseif ( @transmogrify == 42 ) tempc = exp( -1/tempc ) elseif ( @transmogrify == 43 ) tempc = tempc * exp( tempc ) elseif ( @transmogrify == 44 ) tempc = tempc * exp( -tempc ) elseif ( @transmogrify == 45 ) tempc = tempc * exp( 1/tempc ) elseif ( @transmogrify == 46 ) tempc = tempc * exp( -1/tempc ) elseif ( @transmogrify == 47 ) tempc = tempc * tempc * tempc elseif ( @transmogrify == 48 ) tempc = 1 / ( tempc * tempc * tempc ) elseif ( @transmogrify == 49 ) tempc = atan( 1 / tempc ) elseif ( @transmogrify == 50 ) tempc = acos( 1 / tempc ) elseif ( @transmogrify == 51 ) tempc = asin( 1 / tempc ) elseif ( @transmogrify == 52 ) tempc = tan( tempc ) / tempc elseif ( @transmogrify == 53 ) tempc = cotan( tempc ) / tempc elseif ( @transmogrify == 54 ) tempc = 1 / ( tempc * cos( tempc )) elseif ( @transmogrify == 55 ) tempc = 1 / ( tempc * sin( tempc )) elseif ( @transmogrify == 56 ) tempc = tempc * sin( tempc ) elseif ( @transmogrify == 57 ) tempc = tempc * cos( tempc ) elseif ( @transmogrify == 58 ) tempc = tempc * tan( tempc ) elseif ( @transmogrify == 59 ) tempc = tempc * cotan( tempc ) elseif ( @transmogrify == 60 ) tempc = tempc/cos( tempc ) elseif ( @transmogrify == 61 ) tempc = tempc/sin( tempc ) elseif ( @transmogrify == 62 ) tempc = sin( 1/tempc ) elseif ( @transmogrify == 63 ) tempc = cos( 1/tempc ) elseif ( @transmogrify == 64 ) tempc = tan( 1/tempc ) elseif ( @transmogrify == 65 ) tempc = cotan( 1/tempc ) elseif ( @transmogrify == 66 ) tempc = 1/cos( 1/tempc ) elseif ( @transmogrify == 67 ) tempc = 1/sin( 1/tempc ) elseif ( @transmogrify == 68 ) tempc = cotanh( tempc ) elseif ( @transmogrify == 69 ) tempc = 1/cosh( tempc ) elseif ( @transmogrify == 70 ) tempc = 1/sinh( tempc ) elseif ( @transmogrify == 71 ) tempc = atanh( 1/tempc ) elseif ( @transmogrify == 72 ) tempc = acosh( 1/tempc ) elseif ( @transmogrify == 73 ) tempc = asinh( 1/tempc ) elseif @transmogrify == 74 tempc = tempc^@tpower elseif @transmogrify == 75 tempc = sinh(tempc) tempc = tempc * tempc elseif @transmogrify == 76 tempc = cosh( tempc ) tempc = tempc * tempc elseif @transmogrify == 77 tempc = tanh(tempc) tempc = tempc * tempc elseif @transmogrify == 78 tempc = cotanh( tempc ) tempc = tempc * tempc elseif @transmogrify == 79 tempc = 1/cosh(tempc) tempc = tempc * tempc elseif @transmogrify == 80 tempc = 1 / sinh( tempc ) tempc = tempc * tempc elseif @transmogrify == 81 tempc = sinh(1/tempc) elseif @transmogrify == 82 tempc = cosh(1/tempc) elseif @transmogrify == 83 tempc = tanh(1/tempc) elseif @transmogrify == 84 tempc = cotanh(1/tempc) elseif @transmogrify == 85 tempc = 1/cosh(1/tempc) elseif @transmogrify == 86 tempc = 1/sinh(1/tempc) elseif @transmogrify == 87 tempc = sin( tempc ) * tan(tempc) elseif @transmogrify == 88 tempc = sinh(tempc) * tanh(tempc) elseif @transmogrify == 89 tempc = sinh(tempc) * cosh(tempc) elseif @transmogrify == 90 zscratch = cosh(tempc) tempc = sinh(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 91 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 92 tempc = 1/tempc tempc = sin(tempc)*cos(tempc) elseif @transmogrify == 93 tempc = sin( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 94 tempc = sin(tempc) * cos(1/tempc) elseif @transmogrify == 95 tempc = sin(tempc) * sin(1/tempc) elseif @transmogrify == 96 tempc = log(tempc) tempc = tempc*tempc elseif @transmogrify == 97 tempc = sin(tempc) * sin(2*tempc) elseif @transmogrify == 98 tempc = exp(2*tempc) elseif @transmogrify == 99 tempc = exp(-2*tempc) elseif @transmogrify == 100 tempc = 1/tempc tempc = sinh(tempc)*cosh(tempc) elseif @transmogrify == 101 tempc = sinh( 1/tempc ) tempc = tempc*tempc elseif @transmogrify == 102 tempc = sinh(tempc) * cosh(1/tempc) elseif @transmogrify == 103 tempc = sinh(tempc) * sinh(1/tempc) elseif @transmogrify == 104 tempc = sin(tempc) * sinh(tempc) elseif @transmogrify == 105 tempc = sin(tempc) * cosh(tempc) elseif @transmogrify == 106 zscratch = cosh(tempc) tempc = sin(tempc) tempc = tempc*tempc*zscratch*zscratch elseif @transmogrify == 107 tempc = sin(tempc)*exp(tempc) elseif @transmogrify == 108 tempc = cos(tempc)*exp(tempc) elseif @transmogrify == 109 tempc = sinh(tempc)*exp(tempc) elseif @transmogrify == 110 tempc = cosh(tempc)*exp(tempc) elseif @transmogrify == 111 tempc = sin(tempc)*log(tempc) elseif @transmogrify == 112 tempc = cos(tempc)*log(tempc) elseif @transmogrify == 113 tempc = sinh(tempc)*log(tempc) else ; @transmogrify == 114 tempc = cosh(tempc)*log(tempc) endif ; transmogrify2 endif ; transmogrify1 if @trapperturb tempc = @trapblend * tempc + trapbcomp * zold endif ; @trapperturb ; Initialize back end real, back end imag, if desired temp2 = @rbscale * real(tempc) if ( @realback == 0 ) tempx = temp2 elseif ( @realback == 1 ) tempx = 1/temp2 elseif ( @realback == 2 ) tempx = temp2 * temp2 elseif ( @realback == 3 ) tempx = 1 / ( temp2 * temp2 ) elseif ( @realback == 4 ) tempx = log(temp2) elseif ( @realback == 5 ) tempx = exp( temp2) elseif ( @realback == 6 ) tempx = temp2^temp2 elseif ( @realback == 7 ) tempx = sin( temp2 ) elseif ( @realback == 8 ) tempx = cos( temp2 ) elseif ( @realback == 9 ) tempx = tan( temp2 ) elseif ( @realback == 10 ) tempx = asin( temp2 ) elseif ( @realback == 11 ) tempx = acos( temp2 ) elseif ( @realback == 12 ) tempx = atan( temp2 ) elseif ( @realback == 13 ) tempx = sinh( temp2 ) elseif ( @realback == 14 ) tempx = cosh( temp2 ) elseif ( @realback == 15 ) tempx = tanh( temp2 ) elseif ( @realback == 16 ) tempx = asinh( temp2 ) elseif ( @realback == 17 ) tempx = acosh( temp2 ) elseif ( @realback == 18 ) tempx = atanh( temp2 ) elseif ( @realback == 19 ) tempx = log( 1/temp2 ) elseif ( @realback == 20 ) tempx = log( log( temp2 )) elseif ( @realback == 21 ) tempx = exp( -temp2 ) elseif ( @realback == 22 ) tempx = exp( 1/temp2 ) elseif ( @realback == 23 ) tempx = temp2^(-temp2) elseif ( @realback == 24 ) tempx = sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 25 ) tempx = cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 26 ) tempx = tan( temp2 ) tempx = tempx * tempx elseif ( @realback == 27 ) tempx = cotan( temp2 ) elseif ( @realback == 28 ) tempx = 1/cos( temp2 ) elseif ( @realback == 29 ) tempx = 1/sin( temp2 ) elseif ( @realback == 30 ) tempx = cotan( temp2 ) tempx = tempx * tempx elseif ( @realback == 31 ) tempx = 1/cos( temp2 ) tempx = tempx * tempx elseif ( @realback == 32 ) tempx = 1/sin( temp2 ) tempx = tempx * tempx elseif ( @realback == 33 ) tempx = temp2^(temp2) tempx = temp2^tempx elseif ( @realback == 34 ) tempx = temp2^(temp2) tempx = 1/( temp2^tempx ) elseif ( @realback == 35 ) tempx = log(-temp2) elseif ( @realback == 36 ) tempx = 1/log( temp2 ) elseif ( @realback == 37 ) tempx = temp2 * log( temp2 ) elseif ( @realback == 38 ) tempx = sin( temp2 ) / temp2 elseif ( @realback == 39 ) tempx = cos( temp2 ) / temp2 elseif ( @realback == 40 ) tempx = sin( temp2 ) * cos( temp2 ) elseif ( @realback == 41 ) tempx = sin( temp2^2 ) elseif ( @realback == 42 ) tempx = exp( -1/temp2 ) elseif ( @realback == 43 ) tempx = temp2 * exp( temp2 ) elseif ( @realback == 44 ) tempx = temp2 * exp( -temp2 ) elseif ( @realback == 45 ) tempx = temp2 * exp( 1/temp2 ) elseif ( @realback == 46 ) tempx = temp2 * exp( -1/temp2 ) elseif ( @realback == 47 ) tempx = temp2 * temp2 * temp2 elseif ( @realback == 48 ) tempx = 1 / ( temp2 * temp2 * temp2 ) elseif ( @realback == 49 ) tempx = atan( 1 / temp2 ) elseif ( @realback == 50 ) tempx = acos( 1 / temp2 ) elseif ( @realback == 51 ) tempx = asin( 1 / temp2 ) elseif ( @realback == 52 ) tempx = tan( temp2 ) / temp2 elseif ( @realback == 53 ) tempx = cotan( temp2 ) / temp2 elseif ( @realback == 54 ) tempx = 1 / ( temp2 * cos( temp2 )) elseif ( @realback == 55 ) tempx = 1 / ( temp2 * sin( temp2 )) elseif ( @realback == 56 ) tempx = temp2 * sin( temp2 ) elseif ( @realback == 57 ) tempx = temp2 * cos( temp2 ) elseif ( @realback == 58 ) tempx = temp2 * tan( temp2 ) elseif ( @realback == 59 ) tempx = temp2 * cotan( temp2 ) elseif ( @realback == 60 ) tempx = temp2/cos( temp2 ) elseif ( @realback == 61 ) tempx = temp2/sin( temp2 ) elseif ( @realback == 62 ) tempx = sin( 1/temp2 ) elseif ( @realback == 63 ) tempx = cos( 1/temp2 ) elseif ( @realback == 64 ) tempx = tan( 1/temp2 ) elseif ( @realback == 65 ) tempx = cotan( 1/temp2 ) elseif ( @realback == 66 ) tempx = 1/cos( 1/temp2 ) elseif ( @realback == 67 ) tempx = 1/sin( 1/temp2 ) elseif ( @realback == 68 ) tempx = cotanh( temp2 ) elseif ( @realback == 69 ) tempx = 1/cosh( temp2 ) elseif ( @realback == 70 ) tempx = 1/sinh( temp2 ) elseif ( @realback == 71 ) tempx = atanh( 1/temp2 ) elseif ( @realback == 72 ) tempx = acosh( 1/temp2 ) elseif ( @realback == 73 ) tempx = asinh( 1/temp2 ) elseif @realback == 74 tempx = temp2^@rbpower elseif @realback == 75 tempx = sinh(temp2) tempx = tempx * tempx elseif @realback == 76 tempx = cosh( temp2 ) tempx = tempx * tempx elseif @realback == 77 tempx = tanh(temp2) tempx = tempx * tempx elseif @realback == 78 tempx = cotanh( temp2 ) tempx = tempx * tempx elseif @realback == 79 tempx = 1/cosh(temp2) tempx = tempx * tempx elseif @realback == 80 tempx = 1 / sinh( temp2 ) tempx = tempx * tempx elseif @realback == 81 tempx = sinh(1/temp2) elseif @realback == 82 tempx = cosh(1/temp2) elseif @realback == 83 tempx = tanh(1/temp2) elseif @realback == 84 tempx = cotanh(1/temp2) elseif @realback == 85 tempx = 1/cosh(1/temp2) elseif @realback == 86 tempx = 1/sinh(1/temp2) elseif @realback == 87 tempx = sin( temp2 ) * tan(temp2) elseif @realback == 88 tempx = sinh(temp2) * tanh(temp2) elseif @realback == 89 tempx = sinh(temp2) * cosh(temp2) elseif @realback == 90 tempx = sinh(temp2), temp = cosh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 91 tempx = sin(temp2), temp = cos(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 92 tempx = 1/temp2 tempx = sin(tempx)*cos(tempx) elseif @realback == 93 tempx = sin( 1/temp2 ) tempx = tempx*tempx elseif @realback == 94 tempx = sin(temp2) * cos(1/temp2) elseif @realback == 95 tempx = sin(temp2) * sin(1/temp2) elseif @realback == 96 tempx = log(temp2) tempx = tempx*tempx elseif @realback == 97 tempx = sin(temp2) * sin(2*temp2) elseif @realback == 98 tempx = exp(2*temp2) elseif @realback == 99 tempx = exp(-2*temp2) elseif @realback == 100 tempx = 1/temp2 tempx = sinh(tempx)*cosh(tempx) elseif @realback == 101 tempx = sinh( 1/temp2 ) tempx = tempx*tempx elseif @realback == 102 tempx = sinh(temp2) * cosh(1/temp2) elseif @realback == 103 tempx = sinh(temp2) * sinh(1/temp2) elseif @realback == 104 tempx = sin(temp2) * sinh(temp2) elseif @realback == 105 tempx = sin(temp2) * cosh(temp2) elseif @realback == 106 tempx = sin(temp2), temp = sinh(temp2) tempx = tempx*tempx*temp*temp elseif @realback == 107 tempx = sin(temp2)*exp(temp2) elseif @realback == 108 tempx = cos(temp2)*exp(temp2) elseif @realback == 109 tempx = sinh(temp2)*exp(temp2) elseif @realback == 110 tempx = cosh(temp2)*exp(temp2) elseif @realback == 111 tempx = sin(temp2)*log(temp2) elseif @realback == 112 tempx = cos(temp2)*log(temp2) elseif @realback == 113 tempx = sinh(temp2)*log(temp2) else ; @realback == 114 tempx = cosh(temp2)*log(temp2) endif ; realback if @rbperturb tempx = @rbblend * tempx + rbbcomp * real(tempc) endif ; @rbperturb temp2 = @ibscale * imag(tempc) if ( @imagback == 0 ) tempy = temp2 elseif ( @imagback == 1 ) tempy = 1/temp2 elseif ( @imagback == 2 ) tempy = temp2 * temp2 elseif ( @imagback == 3 ) tempy = 1 / ( temp2 * temp2 ) elseif ( @imagback == 4 ) tempy = log(temp2) elseif ( @imagback == 5 ) tempy = exp( temp2) elseif ( @imagback == 6 ) tempy = temp2^temp2 elseif ( @imagback == 7 ) tempy = sin( temp2 ) elseif ( @imagback == 8 ) tempy = cos( temp2 ) elseif ( @imagback == 9 ) tempy = tan( temp2 ) elseif ( @imagback == 10 ) tempy = asin( temp2 ) elseif ( @imagback == 11 ) tempy = acos( temp2 ) elseif ( @imagback == 12 ) tempy = atan( temp2 ) elseif ( @imagback == 13 ) tempy = sinh( temp2 ) elseif ( @imagback == 14 ) tempy = cosh( temp2 ) elseif ( @imagback == 15 ) tempy = tanh( temp2 ) elseif ( @imagback == 16 ) tempy = asinh( temp2 ) elseif ( @imagback == 17 ) tempy = acosh( temp2 ) elseif ( @imagback == 18 ) tempy = atanh( temp2 ) elseif ( @imagback == 19 ) tempy = log( 1/temp2 ) elseif ( @imagback == 20 ) tempy = log( log( temp2 )) elseif ( @imagback == 21 ) tempy = exp( -temp2 ) elseif ( @imagback == 22 ) tempy = exp( 1/temp2 ) elseif ( @imagback == 23 ) tempy = temp2^(-temp2) elseif ( @imagback == 24 ) tempy = sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 25 ) tempy = cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 26 ) tempy = tan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 27 ) tempy = cotan( temp2 ) elseif ( @imagback == 28 ) tempy = 1/cos( temp2 ) elseif ( @imagback == 29 ) tempy = 1/sin( temp2 ) elseif ( @imagback == 30 ) tempy = cotan( temp2 ) tempy = tempy * tempy elseif ( @imagback == 31 ) tempy = 1/cos( temp2 ) tempy = tempy * tempy elseif ( @imagback == 32 ) tempy = 1/sin( temp2 ) tempy = tempy * tempy elseif ( @imagback == 33 ) tempy = temp2^(temp2) tempy = temp2^tempy elseif ( @imagback == 34 ) tempy = temp2^(temp2) tempy = 1/( temp2^tempy ) elseif ( @imagback == 35 ) tempy = log(-temp2) elseif ( @imagback == 36 ) tempy = 1/log( temp2 ) elseif ( @imagback == 37 ) tempy = temp2 * log( temp2 ) elseif ( @imagback == 38 ) tempy = sin( temp2 ) / temp2 elseif ( @imagback == 39 ) tempy = cos( temp2 ) / temp2 elseif ( @imagback == 40 ) tempy = sin( temp2 ) * cos( temp2 ) elseif ( @imagback == 41 ) tempy = sin( temp2^2 ) elseif ( @imagback == 42 ) tempy = exp( -1/temp2 ) elseif ( @imagback == 43 ) tempy = temp2 * exp( temp2 ) elseif ( @imagback == 44 ) tempy = temp2 * exp( -temp2 ) elseif ( @imagback == 45 ) tempy = temp2 * exp( 1/temp2 ) elseif ( @imagback == 46 ) tempy = temp2 * exp( -1/temp2 ) elseif ( @imagback == 47 ) tempy = temp2 * temp2 * temp2 elseif ( @imagback == 48 ) tempy = 1 / ( temp2 * temp2 * temp2 ) elseif ( @imagback == 49 ) tempy = atan( 1 / temp2 ) elseif ( @imagback == 50 ) tempy = acos( 1 / temp2 ) elseif ( @imagback == 51 ) tempy = asin( 1 / temp2 ) elseif ( @imagback == 52 ) tempy = tan( temp2 ) / temp2 elseif ( @imagback == 53 ) tempy = cotan( temp2 ) / temp2 elseif ( @imagback == 54 ) tempy = 1 / ( temp2 * cos( temp2 )) elseif ( @imagback == 55 ) tempy = 1 / ( temp2 * sin( temp2 )) elseif ( @imagback == 56 ) tempy = temp2 * sin( temp2 ) elseif ( @imagback == 57 ) tempy = temp2 * cos( temp2 ) elseif ( @imagback == 58 ) tempy = temp2 * tan( temp2 ) elseif ( @imagback == 59 ) tempy = temp2 * cotan( temp2 ) elseif ( @imagback == 60 ) tempy = temp2/cos( temp2 ) elseif ( @imagback == 61 ) tempy = temp2/sin( temp2 ) elseif ( @imagback == 62 ) tempy = sin( 1/temp2 ) elseif ( @imagback == 63 ) tempy = cos( 1/temp2 ) elseif ( @imagback == 64 ) tempy = tan( 1/temp2 ) elseif ( @imagback == 65 ) tempy = cotan( 1/temp2 ) elseif ( @imagback == 66 ) tempy = 1/cos( 1/temp2 ) elseif ( @imagback == 67 ) tempy = 1/sin( 1/temp2 ) elseif ( @imagback == 68 ) tempy = cotanh( temp2 ) elseif ( @imagback == 69 ) tempy = 1/cosh( temp2 ) elseif ( @imagback == 70 ) tempy = 1/sinh( temp2 ) elseif ( @imagback == 71 ) tempy = atanh( 1/temp2 ) elseif ( @imagback == 72 ) tempy = acosh( 1/temp2 ) elseif ( @imagback == 73 ) tempy = asinh( 1/temp2 ) elseif @imagback == 74 tempy = temp2^@ibpower elseif @imagback == 75 tempy = sinh(temp2) tempy = tempy * tempy elseif @imagback == 76 tempy = cosh( temp2 ) tempy = tempy * tempy elseif @imagback == 77 tempy = tanh(temp2) tempy = tempy * tempy elseif @imagback == 78 tempy = cotanh( temp2 ) tempy = tempy * tempy elseif @imagback == 79 tempy = 1/cosh(temp2) tempy = tempy * tempy elseif @imagback == 80 tempy = 1 / sinh( temp2 ) tempy = tempy * tempy elseif @imagback == 81 tempy = sinh(1/temp2) elseif @imagback == 82 tempy = cosh(1/temp2) elseif @imagback == 83 tempy = tanh(1/temp2) elseif @imagback == 84 tempy = cotanh(1/temp2) elseif @imagback == 85 tempy = 1/cosh(1/temp2) elseif @imagback == 86 tempy = 1/sinh(1/temp2) elseif @imagback == 87 tempy = sin( temp2 ) * tan(temp2) elseif @imagback == 88 tempy = sinh(temp2) * tanh(temp2) elseif @imagback == 89 tempy = sinh(temp2) * cosh(temp2) elseif @imagback == 90 tempy = sinh(temp2), temp = cosh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 91 tempy = sin(temp2), temp = cos(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 92 tempy = 1/temp2 tempy = sin(tempy)*cos(tempy) elseif @imagback == 93 tempy = sin( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 94 tempy = sin(temp2) * cos(1/temp2) elseif @imagback == 95 tempy = sin(temp2) * sin(1/temp2) elseif @imagback == 96 tempy = log(temp2) tempy = tempy*tempy elseif @imagback == 97 tempy = sin(temp2) * sin(2*temp2) elseif @imagback == 98 tempy = exp(2*temp2) elseif @imagback == 99 tempy = exp(-2*temp2) elseif @imagback == 100 tempy = 1/temp2 tempy = sinh(tempy)*cosh(tempy) elseif @imagback == 101 tempy = sinh( 1/temp2 ) tempy = tempy*tempy elseif @imagback == 102 tempy = sinh(temp2) * cosh(1/temp2) elseif @imagback == 103 tempy = sinh(temp2) * sinh(1/temp2) elseif @imagback == 104 tempy = sin(temp2) * sinh(temp2) elseif @imagback == 105 tempy = sin(temp2) * cosh(temp2) elseif @imagback == 106 tempy = sin(temp2), temp = sinh(temp2) tempy = tempy*tempy*temp*temp elseif @imagback == 107 tempy = sin(temp2)*exp(temp2) elseif @imagback == 108 tempy = cos(temp2)*exp(temp2) elseif @imagback == 109 tempy = sinh(temp2)*exp(temp2) elseif @imagback == 110 tempy = cosh(temp2)*exp(temp2) elseif @imagback == 111 tempy = sin(temp2)*log(temp2) elseif @imagback == 112 tempy = cos(temp2)*log(temp2) elseif @imagback == 113 tempy = sinh(temp2)*log(temp2) else ; @imagback == 114 tempy = cosh(temp2)*log(temp2) endif ; imagback if @ibperturb tempy = @ibblend * tempy + ibbcomp * imag(tempc) endif ; @ibperturb tempc = tempx + flip(tempy) cangle = atan2( tempc ) if ( cangle < 0 ) cangle = cangle + twopi endif ; cangle if @twavy if @twavmode == 0 ; radial mode temp = cabs( tempc ) temp = temp + @twavamp * temp * sin( @twavfreq * cangle ) ; vary radius tempc = temp * exp( flip( cangle )) ; compute new tempc else ; tangential mode tempx = cabs( tempc ) temp = cangle + @twavamp * cangle * sin( @twavfreq * tempx ) ; vary azimuth tempc = tempx * exp( flip( temp )) ; compute new tempc cangle = temp endif ; @twavmode endif ; @twavy if @pointmode ; compare subsequent values to first trap point on trap graph if itrapped != 0 ; some point must have already been trapped tempc = ctrapped endif; itrapped endif ; @pointmode ; Save value for later turbulence tlast = tempc if @swapflavor zscratch = ztemp else zscratch = #z endif ; swapflavor if ( @trapmode == 0 ) ; distance test = cabs( ztemp - tempc ) elseif ( @trapmode == 1 ) ; angle test = zangle elseif ( @trapmode == 2 ) ; trap angle test = cangle elseif ( @trapmode == 3 ) ; difference angle test = abs( zangle - cangle ) elseif ( @trapmode == 4 ) ; magnitude test = cabs( ztemp ) elseif ( @trapmode == 5 ) ; trap magnitude test = cabs( tempc ) elseif ( @trapmode == 6 ) ; real test = abs( real( ztemp )) elseif ( @trapmode == 7 ) ; imaginary test = abs( imag( ztemp )) elseif ( @trapmode == 8 ) ; trap real test = abs( real( tempc )) elseif ( @trapmode == 9 ) ; trap imaginary test = abs( imag( tempc )) elseif ( @trapmode == 10 ) ; sum test = cabs( zscratch + tempc ) elseif ( @trapmode == 11 ) ; difference test = cabs( zscratch - tempc) elseif ( @trapmode == 12 ) ; product test = cabs( zscratch * tempc ) elseif ( @trapmode == 13 ) ; quotient 1 test = cabs( zscratch / tempc ) elseif ( @trapmode == 14 ) ; quotient 2 test = cabs( tempc / zscratch ) elseif ( @trapmode == 15 ) ; power 1 test = cabs( zscratch ^ tempc ) elseif ( @trapmode == 16 ) ; power 2 test = cabs( tempc ^ zscratch ) elseif ( @trapmode == 17 ) ; arithmetic mean test = cabs( (zscratch + tempc)/2 ) elseif ( @trapmode == 18 ) ; geometric mean test = cabs( sqrt( zscratch * tempc )) elseif ( @trapmode == 19 ) ; angle 2 test = atan2( zscratch - tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 20 ) ; angle 3 test = atan2( zscratch + tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 21 ) ; angle 4 test = atan2( zscratch * tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 22 ) ; angle 5 test = atan2( zscratch / tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 23 ) ; angle 6 test = atan2( tempc / zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 24 ) ; angle 7 test = atan2( zscratch ^ tempc ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 25 ) ; angle 8 test = atan2( tempc ^ zscratch ) if ( test < 0 ) test = test + twopi endif ; test elseif ( @trapmode == 26 ) ; real 2 test = abs( real( zscratch - tempc )) elseif ( @trapmode == 27 ) ; real 3 test = abs( real( zscratch + tempc )) elseif ( @trapmode == 28 ) ; real 4 test = abs( real( zscratch * tempc )) elseif ( @trapmode == 29 ) ; real 5 test = abs( real( zscratch / tempc )) elseif ( @trapmode == 30 ) ; real 6 test = abs( real( tempc / zscratch )) elseif ( @trapmode == 31 ) ; real 7 test = abs( real( zscratch ^ tempc )) elseif ( @trapmode == 32 ) ; real 8 test = abs( real( tempc ^ zscratch )) elseif ( @trapmode == 33 ) ; imag 2 test = abs( imag( zscratch - tempc )) elseif ( @trapmode == 34 ) ; imag 3 test = abs( imag( zscratch + tempc )) elseif ( @trapmode == 35 ) ; imag 4 test = abs( imag( zscratch * tempc )) elseif ( @trapmode == 36 ) ; imag 5 test = abs( imag( zscratch / tempc )) elseif ( @trapmode == 37 ) ; imag 6 test = abs( imag( tempc / zscratch )) elseif ( @trapmode == 38 ) ; imag 7 test = abs( imag( zscratch ^ tempc )) elseif ( @trapmode == 39 ) ; imag 8 test = abs( imag( tempc ^ zscratch )) endif ; trapmode if ( @whattotrap == 0 ) ; minimum if ( test < trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 1 ) ; maximum if ( test > trapped1 ) trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 2 ) ; 2nd minimum if ( test < trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 3 ) ; 3rd minimum if ( test < trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 4 ) ; 4th minimum if ( test < trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 5 ) ; 2nd maximum if ( test > trapped1 ) trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 6 ) ; 3rd maximum if ( test > trapped1 ) trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 7 ) ; 4th maximum if ( test > trapped1 ) trapped4 = trapped3, itrapped4 = itrapped3, zatrapped4 = zatrapped3, catrapped4 = catrapped3 ztrapped4 = ztrapped3, zttrapped4 = zttrapped3, ctrapped4 = ctrapped3 trapped3 = trapped2, itrapped3 = itrapped2, zatrapped3 = zatrapped2, catrapped3 = catrapped2 ztrapped3 = ztrapped2, zttrapped3 = zttrapped2, ctrapped3 = ctrapped2 trapped2 = trapped1, itrapped2 = itrapped, zatrapped2 = zatrapped, catrapped2 = catrapped ztrapped2 = ztrapped, zttrapped2 = zttrapped, ctrapped2 = ctrapped trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; test elseif ( @whattotrap == 8 ) ; 1st to dip below threshold value if ( itrapped == 0 ) ; nothing trapped yet if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 9 ) ; last to dip below threshold --- just store them all if ( test < thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 10 ) ; count dips below threshold --- store the last if ( test < thresh ) count = count + 1 if !@ringstyle trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE elseif test > innerradius trapped1 = count * test, itrapped = count * iter zatrapped = count * zangle, catrapped = count * cangle ztrapped = count * #z, zttrapped = count * ztemp ctrapped = count * tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif ( @whattotrap == 11 ) ; 2nd to dip below threshold value if ( test < thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test > innerradius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 12 ) ; 1st to exceed threshold limit if ( itrapped == 0 ) ; nothing trapped yet if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; ztest endif ; itrapped elseif ( @whattotrap == 13 ) ; 2nd to exceed threshold limit if ( test > thresh ) if ( itrapped == 0 ) ; nothing trapped yet, set flag for next time itrapped = -1, trapped = TRUE elseif itrapped == -1 ; must be the 2nd threshold value if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc elseif test < innerradius ; really an outer radius trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc endif ; ringstyle endif ; itrapped endif ; test elseif ( @whattotrap == 14 ) ; last to exceed threshold --- just store them all if ( test > thresh ) if !@ringstyle trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test < innerradius ; really an outer radius for limits trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE endif ; ringstyle endif ; ztest elseif @whattotrap > 14 ; maximum/minimum combos; need to find & store both ; trapped2 will hold he max, trapped1 the min if test < trapped1 ; is it a new min? trapped1 = test, itrapped = iter, zatrapped = zangle, catrapped = cangle ztrapped = #z, zttrapped = ztemp, ctrapped = tempc, trapped = TRUE elseif test > trapped2 ; is it a new max? trapped2 = test, itrapped2 = iter, zatrapped2 = zangle, catrapped2 = cangle ztrapped2 = #z, zttrapped2 = ztemp, ctrapped2 = tempc, trapped = TRUE endif ; test endif ; whattotrap if ( @varymode == 0 ) ; feedback only on iterations where something was trapped vary = trapped elseif ( @varymode == 1 ) ; feedback when nothing was trapped vary = !trapped else ; feedback on each iteration, if enabled for a given parameter vary = TRUE endif ; varymode trapped = FALSE ; reset flag for next iteration if vary ; vary chosen parameter if set float value = 0.0 if @oldstyle value = cabs(ctrapped) sign = real(ctrapped)/abs(real(ctrapped)) else value = cabs(ztemp) sign = real(ztemp)/abs(real(ztemp)) endif ; oldstyle if @varyrotation rotation = rotation + rotationstep * rotation * value * sign endif ; varyrotation if @varyscale scale = scale + scalestep * scale * value * sign endif ; varyscale if @varythresh thresh = thresh + threshstep * thresh * value * sign if @ringstyle if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; ringstyle endif ; varythresh if @varyrwidth rwidth = rwidth + ringstep * rwidth * value * sign if @whattotrap < 12 innerradius = thresh - rwidth else innerradius = thresh + rwidth endif ; whattotrap endif ; varyrwidth if @varyspread spread = spread + spreadstep * spread * value * sign endif ; varyspread if @varycenter tempx = real(center) + centerstep * real(center) * value * sign tempy = imag(center) + centerstep * imag(center) * value * sign center = tempx + flip( tempy ) endif ; varycenter if @varyturb turbulamount = turbulamount + turbstep * turbulamount * value * sign endif ; varyturb endif ; vary endif ; iter final: if ( itrapped != 0 ) ; something has been trapped if (( @whattotrap == 2 ) || ( @whattotrap == 5 )) ; we need to swap some values ; so we will plot the right thing trapped1 = trapped2, itrapped = itrapped2, zatrapped = zatrapped2, catrapped = catrapped2 ztrapped = ztrapped2, zttrapped = zttrapped2, ctrapped = ctrapped2 elseif (( @whattotrap == 3 ) || ( @whattotrap == 6 )) trapped1 = trapped3, itrapped = itrapped3, zatrapped = zatrapped3, catrapped = catrapped3 ztrapped = ztrapped3, zttrapped = zttrapped3, ctrapped = ctrapped3 elseif (( @whattotrap == 4 ) || ( @whattotrap == 7 )) trapped1 = trapped4, itrapped = itrapped4, zatrapped = zatrapped4, catrapped = catrapped4 ztrapped = ztrapped4, zttrapped = zttrapped4, ctrapped = ctrapped4 elseif @whattotrap == 15 ; max-min trapped1 = trapped2-trapped1, itrapped = itrapped2-itrapped zatrapped = zatrapped2-zatrapped, catrapped = catrapped2-catrapped ztrapped = ztrapped2-ztrapped, zttrapped = zttrapped2-zttrapped ctrapped = ctrapped2-ctrapped elseif @whattotrap == 16 ; max+min trapped1 = trapped2+trapped1, itrapped = itrapped2+itrapped zatrapped = zatrapped2+zatrapped, catrapped = catrapped2+catrapped ztrapped = ztrapped2+ztrapped, zttrapped = zttrapped2+zttrapped ctrapped = ctrapped2+ctrapped elseif @whattotrap == 17 ; max*min trapped1 = trapped2*trapped1, itrapped = itrapped2*itrapped zatrapped = zatrapped2*zatrapped, catrapped = catrapped2*catrapped ztrapped = ztrapped2*ztrapped, zttrapped = zttrapped2*zttrapped ctrapped = ctrapped2*ctrapped elseif @whattotrap == 18 ; max/min trapped1 = trapped2/trapped1, itrapped = round(itrapped2/itrapped) zatrapped = zatrapped2/zatrapped, catrapped = catrapped2/catrapped ztrapped = ztrapped2/ztrapped, zttrapped = zttrapped2/zttrapped ctrapped = ctrapped2/ctrapped elseif @whattotrap == 19 ; max^min trapped1 = trapped2^trapped1, itrapped = round(itrapped2^itrapped) zatrapped = zatrapped2^zatrapped, catrapped = catrapped2^catrapped ztrapped = ztrapped2^ztrapped, zttrapped = zttrapped2^zttrapped ctrapped = ctrapped2^ctrapped elseif @whattotrap == 20 ; min-max trapped1 = trapped1-trapped2, itrapped = itrapped-itrapped2 zatrapped = zatrapped-zatrapped2, catrapped = catrapped-catrapped2 ztrapped = ztrapped-ztrapped2, zttrapped = zttrapped-zttrapped2 ctrapped = ctrapped-ctrapped2 elseif @whattotrap == 21 ; min/max trapped1 = trapped1/trapped2, itrapped = round(itrapped/itrapped2) zatrapped = zatrapped/zatrapped2, catrapped = catrapped/catrapped2 ztrapped = ztrapped/ztrapped2, zttrapped = zttrapped/zttrapped2 ctrapped = ctrapped/ctrapped2 elseif @whattotrap == 22 ; min^max trapped1 = trapped1^trapped2, itrapped = round(itrapped^itrapped2) zatrapped = zatrapped^zatrapped2, catrapped = catrapped^catrapped2 ztrapped = ztrapped^ztrapped2, zttrapped = zttrapped^zttrapped2 ctrapped = ctrapped^ctrapped2 elseif @whattotrap == 23 ; average: (max+min)/2 trapped1 = (trapped1+trapped2)/2, itrapped = trunc((itrapped+itrapped2)/2) zatrapped = (zatrapped+zatrapped2)/2, catrapped = (catrapped+catrapped2)/2 ztrapped = (ztrapped+ztrapped2)/2, zttrapped = (zttrapped+zttrapped2)/2 ctrapped = (ctrapped+ctrapped2)/2 endif ; whattotrap ; Figure amount of 'random' turbulence if @turb1 || @turb2 || @turb3 || @turb4 || @turb5 || @turb6 float ca1 = float ca2 = float ca3 = float ca4 = float ca5 = float ca6 = 0.0 zinput = tlast*zlast*#random temp = cabs(zinput) if round(719*temp) % 2 == 0 ; 'random' sign sign = 1 else sign = -1 endif ; round if @turb1 ; product1 ca1 = turbulamount * 0.1 * sign * ((real(tlast)*real(tlast))/|tlast|) \ * ((real(zlast)*real(zlast))/|zlast|) endif ; turb1 if @turb2 ; random ca2 = turbulamount * 0.1 * sign * real(#random) endif ; turb2 if @turb3 ; fBm --- adapted from formulas of dmj, mt, and others complex br = (0,1) ^ (@bangle / 90.0) complex br2 = (0,1) ^ (@banglestep / 90.0) complex bp = zlast * @bscale * br float bsum = 0.0 float bfreq = 1.0 int bi = @boctaves while (bi > 0) float bx0 = floor(real(bp)) % 256 float by0 = floor(imag(bp)) % 256 if bx0 < 0 bx0 = bx0 + 256 endif ; bx0 if by0 < 0 by0 = by0 + 256 endif ; by0 float bx1 = (bx0 + 1) % 256 float by1 = (by0 + 1) % 256 float rx0 = real(bp) - floor(real(bp)) float ry0 = imag(bp) - floor(imag(bp)) float rx1 = rx0 - 1 float ry1 = ry0 - 1 float b00 = (bx0^@bpower % 65536 + by0)^@bpower % 65536 float b10 = (bx1^@bpower % 65536 + by0)^@bpower % 65536 float b01 = (bx0^@bpower % 65536 + by1)^@bpower % 65536 float b11 = (bx1^@bpower % 65536 + by1)^@bpower % 65536 float g_b00_0 = (b00)^@bpower*0.25 % 512 - 256 float g_b10_0 = (b10)^@bpower*0.25 % 512 - 256 float g_b01_0 = (b01)^@bpower*0.25 % 512 - 256 float g_b11_0 = (b11)^@bpower*0.25 % 512 - 256 float g_b00_1 = (b00+1)^@bpower*0.25 % 512 - 256 float g_b10_1 = (b10+1)^@bpower*0.25 % 512 - 256 float g_b01_1 = (b01+1)^@bpower*0.25 % 512 - 256 float g_b11_1 = (b11+1)^@bpower*0.25 % 512 - 256 float bd = 0.0 bd = 1 / sqrt(sqr(g_b00_0) + sqr(g_b00_1)) g_b00_0 = g_b00_0 * bd g_b00_1 = g_b00_1 * bd bd = 1 / sqrt(sqr(g_b10_0) + sqr(g_b10_1)) g_b10_0 = g_b10_0 * bd g_b10_1 = g_b10_1 * bd bd = 1 / sqrt(sqr(g_b01_0) + sqr(g_b01_1)) g_b01_0 = g_b01_0 * bd g_b01_1 = g_b01_1 * bd bd = 1 / sqrt(sqr(g_b11_0) + sqr(g_b11_1)) g_b11_0 = g_b11_0 * bd g_b11_1 = g_b11_1 * bd float u1 = rx0 * g_b00_0 + ry0 * g_b00_1 float v1 = rx1 * g_b10_0 + ry0 * g_b10_1 float u2 = rx0 * g_b01_0 + ry1 * g_b01_1 float v2 = rx1 * g_b11_0 + ry1 * g_b11_1 float sx = sqr(rx0) * (3 - rx0*2) float sy = sqr(ry0) * (3 - ry0*2) float ba = u1 + sx*(v1-u1) float bb = u2 + sx*(v2-u2) bsum = bsum + (ba + sy*(bb-ba))* bfreq bfreq = bfreq * @bstep bp = bp * br2 / @bstep bi = bi - 1 endwhile ; bi ca3 = turbulamount * (bsum + 1) * 0.5 endif ; turb3 if @turb4 ; sin ca4 = turbulamount * 0.1 * sign * ((sin(817*real(zinput))+1)/2) endif ; turb4 if @turb5 ; log ca5 = turbulamount * 0.1 * sign * log(((temp-trunc(temp))*(#e-1))+1) endif ; turb5 if @turb6 ; vectors tempx = trunc(real(zinput)), tempy = trunc(imag(zinput)) float tempx1 = tempx + 1, float tempy1 = tempy + 1 complex t00 = tempx + flip(tempy), complex t10 = tempx1 + flip(tempy) complex t01 = tempx + flip(tempy1), complex t11 = tempx1 + flip(tempy1) tempx = trunc(real(zlast)), tempy = trunc(imag(zlast)) tempx1 = tempx + 1, tempy1 = tempy + 1 complex z00 = tempx + flip(tempy), complex z10 = tempx1 + flip(tempy) complex z01 = tempx + flip(tempy1), complex z11 = tempx1 + flip(tempy1) if real(tlast) >= 0 ; + if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z00-t00) else ; - temp = cabs(z00-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z00-t01) else ; - temp = cabs(z00-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z01-t00) else ; - temp = cabs(z01-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z01-t01) else ; - temp = cabs(z01-t11) endif endif endif else ; - if imag(tlast) >= 0 ; + if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z10-t00) else ; - temp = cabs(z10-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z10-t01) else ; - temp = cabs(z10-t11) endif endif else ; - if real(zlast) >= 0 ; + if imag(zlast) >= 0 ; + temp = cabs(z11-t00) else ; - temp = cabs(z11-t10) endif else ; - if imag(zlast) >= 0 ; + temp = cabs(z11-t01) else ; - temp = cabs(z11-t11) endif endif endif endif ca6 = turbulamount * 0.1 * sign * temp/cabs(zlast-tlast) endif ; turb6 _coloradjust = ca1 + ca2 + ca3 + ca4 + ca5 + ca6 endif ; turb1 || turb2... if ( @colorby == 0 ) ; distance temp = cabs( zttrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask elseif ( @colorby == 1 ) ; iteration if @mask if itrapped < @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp elseif @revmask if itrapped > @maskthresh #solid = TRUE else _color = 0.3 * spread * itrapped endif ; temp else _color = 0.3 * spread * itrapped endif ; @mask elseif ( @colorby == 2 ) ; magnitude temp = cabs( ztrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 0.25 * spread * temp endif ; temp else _color = 0.25 * spread * temp endif ; @mask elseif ( @colorby == 3 ) ; test if @mask if trapped1 < @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 elseif @revmask if trapped1 > @maskthresh #solid = TRUE else _color = spread * trapped1 endif ; trapped1 else _color = spread * trapped1 endif ; @mask elseif ( @colorby == 4 ) ; trap magnitude temp = cabs(ctrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 5 ) ; angle temp = atan2( ztrapped ) if ( temp < 0 ) temp = temp + twopi endif ; temp if @mask if temp < @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = ( spread * temp ) / twopi endif ; temp else _color = ( spread * temp ) / twopi endif ; @mask elseif ( @colorby == 6 ) ; trap angle if @mask if catrapped < @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped elseif @revmask if catrapped > @maskthresh #solid = TRUE else _color = ( spread * catrapped ) / twopi endif ; catrapped else _color = ( spread * catrapped ) / twopi endif ; @mask elseif ( @colorby == 7 ) ; modulated magnitude temp = cabs(zttrapped) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 8 ) ; modulated angle if @mask if zatrapped < @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped elseif @revmask if zatrapped > @maskthresh #solid = TRUE else _color = ( spread * zatrapped ) / twopi endif ; zatrapped else _color = ( spread * zatrapped ) / twopi endif ; @mask elseif ( @colorby == 9 ) ; real temp = abs( real( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 10 ) ; trap real temp = abs( real( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 11 ) ; modulated real temp = abs( real( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 12 ) ; imaginary temp = abs( imag( ztrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 13 ) ; trap imaginary temp = abs( imag( ctrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 14 ) ; modulated imaginary temp = abs( imag( zttrapped )) if @mask if temp < @maskthresh #solid = TRUE else _color = spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = spread * temp endif ; temp else _color = spread * temp endif ; @mask elseif ( @colorby == 15 ) ; raw distance (distance to #z, not ztemp) temp = cabs( ztrapped - ctrapped ) if @mask if temp < @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp elseif @revmask if temp > @maskthresh #solid = TRUE else _color = 3.0 * spread * temp endif ; temp else _color = 3.0 * spread * temp endif ; @mask endif ; _colorby if @ranges == 1 _color = _color + _coloradjust else if !@hideranges _color = ((_color + _coloradjust) + (itrapped % @ranges) ) / @ranges else temp = itrapped % @ranges if temp != @showrange #solid = TRUE else _color = ((_color + _coloradjust) + temp ) / @ranges endif ; temp endif ; hideranges endif ; ranges if ( @colorwarp == 0 ) temp = _color elseif ( @colorwarp == 1 ) temp = 1/_color elseif ( @colorwarp == 2 ) temp = _color * _color elseif ( @colorwarp == 3 ) temp = 1 / ( _color * _color ) elseif ( @colorwarp == 4 ) temp = log(_color) elseif ( @colorwarp == 5 ) temp = exp( _color) elseif ( @colorwarp == 6 ) temp = _color^_color elseif ( @colorwarp == 7 ) temp = sin( _color ) elseif ( @colorwarp == 8 ) temp = cos( _color ) elseif ( @colorwarp == 9 ) temp = tan( _color ) elseif ( @colorwarp == 10 ) temp = asin( _color ) elseif ( @colorwarp == 11 ) temp = acos( _color ) elseif ( @colorwarp == 12 ) temp = atan( _color ) elseif ( @colorwarp == 13 ) temp = sinh( _color ) elseif ( @colorwarp == 14 ) temp = cosh( _color ) elseif ( @colorwarp == 15 ) temp = tanh( _color ) elseif ( @colorwarp == 16 ) temp = asinh( _color ) elseif ( @colorwarp == 17 ) temp = acosh( _color ) elseif ( @colorwarp == 18 ) temp = atanh( _color ) elseif ( @colorwarp == 19 ) temp = log( 1/_color ) elseif ( @colorwarp == 20 ) temp = log( log( _color )) elseif ( @colorwarp == 21 ) temp = exp( -_color ) elseif ( @colorwarp == 22 ) temp = exp( 1/_color ) elseif ( @colorwarp == 23 ) temp = _color^(-_color) elseif ( @colorwarp == 24 ) temp = sin( _color ) temp = temp * temp elseif ( @colorwarp == 25 ) temp = cos( _color ) temp = temp * temp elseif ( @colorwarp == 26 ) temp = tan( _color ) temp = temp * temp elseif ( @colorwarp == 27 ) temp = cotan( _color ) elseif ( @colorwarp == 28 ) temp = 1/cos( _color ) elseif ( @colorwarp == 29 ) temp = 1/sin( _color ) elseif ( @colorwarp == 30 ) temp = cotan( _color ) temp = temp * temp elseif ( @colorwarp == 31 ) temp = 1/cos( _color ) temp = temp * temp elseif ( @colorwarp == 32 ) temp = 1/sin( _color ) temp = temp * temp elseif ( @colorwarp == 33 ) temp = _color^(_color) temp = _color^temp elseif ( @colorwarp == 34 ) temp = _color^(_color) temp = 1/( _color^temp ) elseif ( @colorwarp == 35 ) temp = log(-_color) elseif ( @colorwarp == 36 ) temp = 1/log( _color ) elseif ( @colorwarp == 37 ) temp = _color * log( _color ) elseif ( @colorwarp == 38 ) temp = sin( _color ) / _color elseif ( @colorwarp == 39 ) temp = cos( _color ) / _color elseif ( @colorwarp == 40 ) temp = sin( _color ) * cos( _color ) elseif ( @colorwarp == 41 ) temp = sin( _color^2 ) elseif ( @colorwarp == 42 ) temp = exp( -1/_color ) elseif ( @colorwarp == 43 ) temp = _color * exp( _color ) elseif ( @colorwarp == 44 ) temp = _color * exp( -_color ) elseif ( @colorwarp == 45 ) temp = _color * exp( 1/_color ) elseif ( @colorwarp == 46 ) temp = _color * exp( -1/_color ) elseif ( @colorwarp == 47 ) temp = _color * _color * _color elseif ( @colorwarp == 48 ) temp = 1 / ( _color * _color * _color ) elseif ( @colorwarp == 49 ) temp = atan( 1 / _color ) elseif ( @colorwarp == 50 ) temp = acos( 1 / _color ) elseif ( @colorwarp == 51 ) temp = asin( 1 / _color ) elseif ( @colorwarp == 52 ) temp = tan( _color ) / _color elseif ( @colorwarp == 53 ) temp = cotan( _color ) / _color elseif ( @colorwarp == 54 ) temp = 1 / ( _color * cos( _color )) elseif ( @colorwarp == 55 ) temp = 1 / ( _color * sin( _color )) elseif ( @colorwarp == 56 ) temp = _color * sin( _color ) elseif ( @colorwarp == 57 ) temp = _color * cos( _color ) elseif ( @colorwarp == 58 ) temp = _color * tan( _color ) elseif ( @colorwarp == 59 ) temp = _color * cotan( _color ) elseif ( @colorwarp == 60 ) temp = _color/cos( _color ) elseif ( @colorwarp == 61 ) temp = _color/sin( _color ) elseif ( @colorwarp == 62 ) temp = sin( 1/_color ) elseif ( @colorwarp == 63 ) temp = cos( 1/_color ) elseif ( @colorwarp == 64 ) temp = tan( 1/_color ) elseif ( @colorwarp == 65 ) temp = cotan( 1/_color ) elseif ( @colorwarp == 66 ) temp = 1/cos( 1/_color ) elseif ( @colorwarp == 67 ) temp = 1/sin( 1/_color ) elseif ( @colorwarp == 68 ) temp = cotanh( _color ) elseif ( @colorwarp == 69 ) temp = 1/cosh( _color ) elseif ( @colorwarp == 70 ) temp = 1/sinh( _color ) elseif ( @colorwarp == 71 ) temp = atanh( 1/_color ) elseif ( @colorwarp == 72 ) temp = acosh( 1/_color ) elseif ( @colorwarp == 73 ) temp = asinh( 1/_color ) elseif @colorwarp == 74 temp = _color^@cpower elseif @colorwarp == 75 temp = sinh(_color) temp = temp * temp elseif @colorwarp == 76 temp = cosh( _color ) temp = temp * temp elseif @colorwarp == 77 temp = tanh(_color) temp = temp * temp elseif @colorwarp == 78 temp = cotanh( _color ) temp = temp * temp elseif @colorwarp == 79 temp = 1/cosh(_color) temp = temp * temp elseif @colorwarp == 80 temp = 1 / sinh( _color ) temp = temp * temp elseif @colorwarp == 81 temp = sinh(1/_color) elseif @colorwarp == 82 temp = cosh(1/_color) elseif @colorwarp == 83 temp = tanh(1/_color) elseif @colorwarp == 84 temp = cotanh(1/_color) elseif @colorwarp == 85 temp = 1/cosh(1/_color) elseif @colorwarp == 86 temp = 1/sinh(1/_color) elseif @colorwarp == 87 temp = sin( _color ) * tan(_color) elseif @colorwarp == 88 temp = sinh(_color) * tanh(_color) elseif @colorwarp == 89 temp = sinh(_color) * cosh(_color) elseif @colorwarp == 90 temp = sinh(_color), tempx = cosh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 91 temp = sin(_color), tempx = cos(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 92 temp = 1/_color temp = sin(temp)*cos(temp) elseif @colorwarp == 93 temp = sin( 1/_color ) temp = temp*temp elseif @colorwarp == 94 temp = sin(_color) * cos(1/_color) elseif @colorwarp == 95 temp = sin(_color) * sin(1/_color) elseif @colorwarp == 96 temp = log(_color) temp = temp*temp elseif @colorwarp == 97 temp = sin(_color) * sin(2*_color) elseif @colorwarp == 98 temp = exp(2*_color) elseif @colorwarp == 99 temp = exp(-2*_color) elseif @colorwarp == 100 temp = 1/_color temp = sinh(temp)*cosh(temp) elseif @colorwarp == 101 temp = sinh( 1/_color ) temp = temp*temp elseif @colorwarp == 102 temp = sinh(_color) * cosh(1/_color) elseif @colorwarp == 103 temp = sinh(_color) * sinh(1/_color) elseif @colorwarp == 104 temp = sin(_color) * sinh(_color) elseif @colorwarp == 105 temp = sin(_color) * cosh(_color) elseif @colorwarp == 106 temp = sin(_color), tempx = sinh(_color) temp = temp*temp*tempx*tempx elseif @colorwarp == 107 temp = sin(_color)*exp(_color) elseif @colorwarp == 108 temp = cos(_color)*exp(_color) elseif @colorwarp == 109 temp = sinh(_color)*exp(_color) elseif @colorwarp == 110 temp = cosh(_color)*exp(_color) elseif @colorwarp == 111 temp = sin(_color)*log(_color) elseif @colorwarp == 112 temp = cos(_color)*log(_color) elseif @colorwarp == 113 temp = sinh(_color)*log(_color) else ; @colorwarp == 114 temp = cosh(_color)*log(_color) endif ; _colorwarp #index = abs(temp) else #solid = TRUE endif ; itrapped default: title = "Rose Trap" param whattotrap caption = "Trap What?" enum = "minimum" "maximum" "2nd minimum" "3rd minimum" "4th minimum" "2nd maximum" \ "3rd maximum" "4th maximum" "1st threshold" "last threshold" "threshold count" \ "2nd threshold" "1st limit" "2nd limit" "last limit" "max-min" "max+min" \ "max*min" "max/min" "max^min" "min-max" "min/max" "min^max" "min,max avg" default = 0 hint = "What type of value will be trapped?" endparam param threshold caption = "Threshold Value" default = 0.5 hint = "Upper bound (maximum value that will be trapped) if one of the \ 'Threshold' options is chosen for param 'Trap What'; \ also, lower bound (minimum trapped value) if 'Trap What' is set to \ a 'Limit' option. Increase value for limit traps" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param varythresh caption = "Vary Threshold?" default = FALSE hint = "If set, the value of the trap will modify the value of 'threshold' and 'limit' type traps \ each iteration; parameter 'ThreshFeedback' can be used to modulate the variation" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param threshstp caption = "ThreshFeedback" default = 1.0 hint = "If 'Vary Threshold' is set, this setting adjusts the amount of variation" visible = @varythresh endparam param ringstyle caption = "Enable Rings?" default = FALSE hint = "If 'Enable Rings' is active, AND if param 'Trap What' is set to a \ 'Threshold' or 'Limit' option, then 'Trap What' \ becomes a ring trap. \ 'Threshold Value' sets outer radius, 'Ring Width' sets inner radius" visible = (( @whattotrap > 7 ) && ( @whattotrap < 15 )) endparam param ringwidth caption = "Ring Width" default = 0.25 hint = "If 'Enable Rings' is TRUE and 'Trap What' is set to either a 'Threshold', \ or 'Limit' option, this parameter determines the width of the ring trap" visible = @ringstyle == TRUE endparam param varyrwidth caption = "Vary Ringwidth?" default = FALSE hint = "If set, the value of the trap will modify the ring width of 'threshold' \ and 'limit' ring-type traps each iteration; parameter 'RingFeedback' can be \ used to modulate the variation" visible = @ringstyle endparam param ringstp caption = "RingFeedback" default = 1.0 hint = "If 'Vary Ringwidth' is set, this setting adjusts the amount of variation" visible = @varyrwidth endparam param trapmode caption = "Trap Flavor" enum = "distance" "angle" "trap angle" "difference angle" "magnitude" "trap magnitude" \ "real" "imaginary" "trap real" "trap imaginary" "sum" "difference" "product" \ "quotient 1" "quotient 2" "power 1" "power 2" "arith. mean" "geom. mean" \ "angle 2" "angle 3" "angle 4" "angle 5" "angle 6" "angle 7" "angle 8" \ "real 2" "real 3" "real 4" "real 5" "real 6" "real 7" "real 8" \ "imag 2" "imag 3" "imag 4" "imag 5" "imag 6" "imag 7" "imag 8" default = 0 hint = "What quantity will be watched for possible trapping?" endparam param swapflavor caption = "New Flavor?" default = FALSE hint = "Try an alternately flavored trap test? Only affects flavor choices \ above 9 (sum, difference, etc)" visible = @trapmode > 9 endparam param tscale caption = "Scale" default = 0.25 hint = "This parameter determines the size of the rose" endparam param varyscale caption = "Vary Scale?" default = FALSE hint = "If set, the value of the trap will modify the trap size each iteration; \ parameter 'ScaleFeedback' can be