comment { Coloring methods by Andreas Lober and different tweaks. Thank you Edward Perry for your comments and the permission to tweak and publish. Last update on August 05, 2000, 21:00 For the latest version of this file go to: http://formulas.ultrafractal.com http://www.aartika.freewire.co.uk/lober/mseries and look for the Download Area under "Various Artists" or just type http://www.aartika.freewire.co.uk/lober/mseries/akl-m.zip or mail to abmlober@t-online.de resp. andreas.lober@sap.com Newest updates: all colourings got new options: * masking in different modes requested by Emily Garlick (Queri) and Angela Wilczynski (Wizzle) - their images are worth every hour spent with work on my formulas - inspired by Mark Townsend's masking with some good ideas from Michèle Dessureault * combinable textures inspired by Mark Townsend's texturing in the fBm Popcorn Trap realized with code containing ideas from Mark Townsend's Gnarl and Popcorn and Samuel Monnier's SFBM and some ideas of my own * cut out feature to determine regions that can be masked and do not have to be calculated * Loop Turnaround Mode for a kind of tiling and a Loop Randomness for scratching the shapes * I tried to give all the formulas the same look and feel so that techniques learned with one formula can be applied to the other ones. } some_other_traps { ; ; Hints: ; ; 1. Lattice "floor" or "ceil" ; and Distance Function "recip" ; ; Andreas Lober, July 30, 2000 ; init: bool no_spare = true if (@spareMode > 0) float spareVert = real(@sparePoint) float spareHori = imag(@sparePoint) complex pixpix = #pixel float rePix = 0 float imPix = 0 if (@spareMode <= 18) if (@spareRot%360 != 0) complex rotCentre = @sparePoint if (@spareMode > 12 && @spareMode < 19) rotCentre = (@sparePoint+@sparePoint2)/2 endif pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@spareRot/180) + rotCentre endif rePix = real(pixpix) imPix = imag(pixpix) endif if (@spareMode <= 12) if (@spareMode == 1 || @spareMode == 5 || @spareMode == 6 \ || @spareMode == 9 || @spareMode == 10) ; upper upper+right upper+left ; upper&right upper&left if (imPix >= spareHori) if (@spareMode == 9) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 10) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif elseif (@spareMode == 2 || @spareMode == 7 || @spareMode == 8 \ || @spareMode == 11 || @spareMode == 12) ; lower lower+right lower+left ; lower&right lower&left if (imPix < spareHori) if (@spareMode == 11) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 12) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif endif if (@spareMode == 3 || @spareMode == 5 || @spareMode == 7) ; left upper+left lower+left if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 4 || @spareMode == 6 || @spareMode == 8) ; right upper+right lower+right if (rePix >= spareVert) no_spare = false endif endif elseif (@spareMode <= 18) float rePnt = real(@sparePoint2) float imPnt = imag(@sparePoint2) float upper = imPnt float lower = spareHori float left = spareVert float right = rePnt if (imPnt < spareHori) upper = spareHori lower = imPnt endif if (spareVert > rePnt) left = rePnt right = spareVert endif if (@spareMode == 13) ; inside rect if (rePix > left && rePix < right && imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 14) ; outside rect if (rePix < left || rePix > right || imPix < lower || imPix > upper) no_spare = false endif elseif (@spareMode == 15) ; inside vert if (rePix > left && rePix < right) no_spare = false endif elseif (@spareMode == 16) ; outside vert if (rePix < left || rePix > right) no_spare = false endif elseif (@spareMode == 17) ; inside hori if (imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 18) ; outside hori if (imPix < lower || imPix > upper) no_spare = false endif endif elseif (@spareMode <= 20) float radiusOFCutCircle = cabs(@sparePoint-@sparePoint2) if (@spareMode == 19) ; inside circle if (cabs(#pixel-@sparePoint) < radiusOFCutCircle) no_spare = false endif elseif (@spareMode == 20) ; outside circle if (cabs(#pixel-@sparePoint) > radiusOFCutCircle) no_spare = false endif endif endif ; spareMode > 12 endif ; @spareMode > 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; float _dist = 0 float _tdist = 0 bool _do_trap = true float _trap = 0.01 complex zStart = 0 int l_coord = @coordLoop int koord = @coord int iter = 0 bool do_transform = true ;float arg = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 loop: if (no_spare) iter = iter + 1 if (@init_z == 0) zStart = #z elseif (@init_z == 1) zStart = zStart + #z elseif (@init_z == 2) zStart = zStart + #z/iter elseif (@init_z == 3) zStart = zStart + #z/iter^2 elseif (@init_z == 4) zStart = 0 elseif (@init_z == 5) zStart = abs(#pixel - #z) elseif (@init_z == 6) zStart = (#pixel + #z)/2 endif; int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 0) zStart = zStart elseif (koord == 1) zStart = cabs(zStart) + 1i*atan2(zStart) elseif (koord == 2) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) zStart = real(sin(zStart)) + 1i*cos(zStart) elseif (koord == 6) zStart = real(sinh(zStart)) + 1i*cosh(zStart) elseif (koord == 7) zStart = real(asin(zStart)) + 1i*acos(zStart) elseif (koord == 8) zStart = real(asinh(zStart)) + 1i*acosh(zStart) elseif (koord == 9) zStart = abs(zStart) + conj(zStart)/(|zStart|+1e-20) elseif (koord >= 10 && koord <= 19) if (zStart != 0) float rad = cabs(zStart) float re = real(zStart)/rad float im = imag(zStart)/rad if (koord == 10) zStart = re*zStart + im*conj(zStart) elseif (koord == 11) zStart = re*zStart + im*flip(zStart) elseif (koord == 12) zStart = re*sin(zStart) + im*cos(zStart) elseif (koord == 13) zStart = re*sin(zStart) + 1i*im*cos(zStart) elseif (koord == 14) zStart = re*asin(zStart) + im*acos(zStart) elseif (koord == 15) zStart = re*asin(zStart) + 1i*im*acos(zStart) elseif (koord == 16) zStart = re*sinh(zStart) + im*cosh(zStart) elseif (koord == 17) zStart = re*sinh(zStart) + 1i*im*cosh(zStart) elseif (koord == 18) zStart = re*asinh(zStart) + im*acosh(zStart) elseif (koord == 19) zStart = re*asinh(zStart) + 1i*im*acosh(zStart) endif endif endif endwhile ; Schleife über die Koordinaten zStart = @startFct(zStart) if (@l_randomness != 0) zStart = zStart + @l_randomness * #random endif ; ; Start with the lattices ; if (@lattice == 1) zStart = round(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zStart) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 8) zStart = floor(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 10) zStart = abs(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*zStart^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice >= 21 && @lattice <= 23) float reL1 = real(@lattFac1) float imL1 = imag(@lattFac1) float reL2 = real(@lattFac2) float imL2 = imag(@lattFac2) float reZ = reL1*real(zStart) float imZ = imL1*imag(zStart) if (reL2 != 0) reZ = reZ%reL2 endif if (imL2 != 0) imZ = imZ%imL2 endif if (@lattice == 21) zStart = reZ + 1i*imZ elseif (@lattice == 22) zStart = reZ/@lattFac1 + 1i*imZ/@lattFac2 elseif (@lattice == 23) zStart = @lattFac1/reZ + 1i*@lattFac2/imZ endif endif if (@turnMode > 0) if (@turnMode == 1 || @turnMode == 3) do_transform = true else ; 2 do_transform = false endif complex zRound = 0 complex zZ = zStart if (@turnScale != 0) complex zRound = round(zStart*@turnScale)/@turnScale complex zZ = zStart-zRound endif float targ = atan2(zZ) ; "Turn around" part taken from Sam if (abs(targ) < testAngle1) zStart = zZ*exp(rotAngle1)+zRound elseif (abs(targ) > testAngle2) zStart = zZ*exp(rotAngle2)+zRound elseif (@turnMode != 3) zStart = 1/zStart*1i do_transform = !do_transform endif else do_transform = true endif ; @turnMode > 0 if (do_transform) complex _fd_dist = @fkt_d(zStart)-@fkt_d(#pixel) _dist = cabs(_fd_dist) complex _ft_dist = @fkt_1(zStart)-@fkt_2(#pixel) _tdist = cabs(_ft_dist) if _do_trap && @_trap_min < _tdist && _tdist < @_trap_max _do_trap = false _trap =_dist endif endif endif ; no_spare final: if (no_spare) float temp = _trap float mask = 0 bool no_mask = true if (@masking > 0) if (@maskType == 0) ; Index mask = temp elseif (@maskType == 1) ; Re z mask = real(zStart) elseif (@maskType == 2) ; Im z mask = imag(zStart) elseif (@maskType == 3) ; Angle mask = atan2(zStart)/(2*#pi) if mask < 0 mask = mask + 1 endif mask = mask*360 elseif (@maskType == 4) ; Iteration mask = iter elseif (@maskType == 5) ; Re Mixel mask = real(zStart+#pixel)/2 elseif (@maskType == 6) ; Im Mixel mask = imag(zStart+#pixel)/2 elseif (@maskType == 7) ; Abs Mixel mask = cabs(zStart+#pixel)/2 elseif (@maskType == 8) ; Dist(z,Pixel) mask = cabs(zStart-#pixel) elseif (@maskType == 9) ; |z| mask = cabs(zStart) endif endif if (@masking == 1) ; Lower if (mask < @threshold_l) #solid = true no_mask = false endif elseif (@masking == 2) ; Upper if (mask > @threshold_u) #solid = true no_mask = false endif elseif (@masking == 3) ; Between if (mask > @threshold_l && mask < @threshold_u) #solid = true no_mask = false endif elseif (@masking == 4) ; Outside if (mask < @threshold_l || mask > @threshold_u) #solid = true no_mask = false endif else no_mask = true endif if (no_mask) float to_index = real(@fkt(temp)) complex _zz = zStart if (@base4txtr == 1) _zz = #pixel elseif (@base4txtr == 2) _zz = (#pixel+_zz)/2 elseif (@base4txtr == 3) _zz = abs(#pixel-_zz) elseif (@base4txtr == 4) _zz = cabs(#pixel-_zz) endif if (@colour_limit != 0) to_index = to_index%@colour_limit endif if (@f_randomness != 0) to_index = to_index + @f_randomness * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz zGnarl = zGnarl-trunc(zGnarl*@txtr_gnarl_scale)/@txtr_gnarl_scale if (@txtr_gnarl_size != 0 && @txtr_gnarl_size != 1) zGnarl = zGnarl/@txtr_gnarl_size endif if (@reachThrough) _zz = zGnarl endif float x = real(zGnarl) float y = imag(zGnarl) float xOld = 0 int iter3 = @txtr_gnarl_octaves while (iter3 > 0) iter3 = iter3-1 xOld = x x = x - sin(y + sin(y)) y = y - sin(xOld + sin(xOld)) endwhile float textureGnarl = 0 if (@txtr_gnarl_type == 0) textureGnarl = abs(x) elseif (@txtr_gnarl_type == 1) textureGnarl = abs(x)/(sqrt(x^2+y^2)+1e-20) elseif (@txtr_gnarl_type == 2) textureGnarl = abs(x-y) elseif (@txtr_gnarl_type == 3) textureGnarl = abs(x-y)/(sqrt(x^2+y^2)+1e-20) elseif (@txtr_gnarl_type == 4) textureGnarl = abs(x+y)/2 elseif (@txtr_gnarl_type == 5) textureGnarl = abs(x*y)/(sqrt(x^2+y^2)+1e-20) elseif (@txtr_gnarl_type == 6) textureGnarl = atan2(x+1i*y)/(2*#pi) if (textureGnarl < 0) textureGnarl = textureGnarl + 1 endif elseif (@txtr_gnarl_type == 7) textureGnarl = sqrt(x^2+y^2) endif if (@txtr_Gnarl_limit != 0) textureGnarl = textureGnarl%@txtr_Gnarl_limit endif to_index = to_index + @txtr_gnarl*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale if (@txtr_PopCorn_size != 0 && @txtr_PopCorn_size != 1) zPopCorn = zPopCorn/@txtr_PopCorn_size endif if (@reachThrough) _zz = zPopCorn endif float x = real(zPopCorn) float y = imag(zPopCorn) float xOld = 0 int iter3 = @txtr_PopCorn_octaves while (iter3 > 0) iter3 = iter3-1 xOld = x x = x - sin(y + log(y + cos(y))) y = y - sin(xOld + log(xOld + cos(xOld))) endwhile float texturePopCorn = 0 if (@txtr_PopCorn_type == 0) texturePopCorn = abs(x) elseif (@txtr_PopCorn_type == 1) texturePopCorn = abs(x)/(sqrt(x^2+y^2)+1e-20) elseif (@txtr_PopCorn_type == 2) texturePopCorn = abs(x-y) elseif (@txtr_PopCorn_type == 3) texturePopCorn = abs(x-y)/(sqrt(x^2+y^2)+1e-20) elseif (@txtr_PopCorn_type == 4) texturePopCorn = abs(x+y)/2 elseif (@txtr_PopCorn_type == 5) texturePopCorn = abs(x*y)/(sqrt(x^2+y^2)+1e-20) elseif (@txtr_PopCorn_type == 6) texturePopCorn = atan2(x+1i*y)/(2*#pi) if (texturePopCorn < 0) texturePopCorn = texturePopCorn + 1 endif elseif (@txtr_PopCorn_type == 7) texturePopCorn = sqrt(x^2+y^2) endif if (@txtr_PopCorn_limit != 0) texturePopCorn = texturePopCorn%@txtr_PopCorn_limit endif to_index = to_index + @txtr_PopCorn*texturePopCorn endif if (@txtr_SFBM != 0) float mod = 1 float d1 = 0 float d2 = 0 float d3 = 0 float d4 = 0 float nindex = 0 float textureSFBM = 0 float scale = 0 cr1 = 0 cr2 = 0 cr3 = 0 cr4 = 0 float crp1 = 0 float crp2 = 0 float crp3 = 0 float crp4 = 0 complex tv1 = 0 complex tv2 = 0 complex tv3 = 0 complex tv4 = 0 complex seed = @txtr_SFBM_seed rotAngleFBM = exp(1i*pi/180*@txtr_SFBM_rot) if (@txtr_SFBM_scaledis == 4) ; min textureSFBM = 1e20 elseif (@txtr_SFBM_scaledis == 5) ; max textureSFBM = -1e20 endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; complex zSFBM = _zz zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale if (@txtr_SFBM_size != 0 && @txtr_SFBM_size != 1) zSFBM = zSFBM/@txtr_SFBM_size endif if (@reachThrough) _zz = zSFBM endif int iter3 = 0 complex ttmp = 0 while (iter3 < @txtr_SFBM_octaves) scale = @txtr_SFBM_magn^iter3 zSFBM = zSFBM*rotAngleFBM iter3 = iter3 + 1 if @txtr_SFBM_mod == 1 mod = sqrt(iter3) endif zc = round(scale*zSFBM)/scale zc1 = zc + (.5,.5)/scale zc2 = zc + (-.5,.5)/scale zc3 = zc + (.5,-.5)/scale zc4 = zc + (-.5,-.5)/scale ttmp = seed/(mod*zc1+124), cr1 = ttmp-floor(ttmp) ttmp = seed/(mod*zc2+124), cr2 = ttmp-floor(ttmp) ttmp = seed/(mod*zc3+124), cr3 = ttmp-floor(ttmp) ttmp = seed/(mod*zc4+124), cr4 = ttmp-floor(ttmp) if (@txtr_SFBM_mode == 0) tv1 = (zSFBM - zc1)*scale tv2 = (zSFBM - zc2)*scale tv3 = (zSFBM - zc3)*scale tv4 = (zSFBM - zc4)*scale crp1 = real(cr1)*real(tv1) + imag(cr1)*imag(tv1) crp2 = real(cr2)*real(tv2) + imag(cr2)*imag(tv2) crp3 = real(cr3)*real(tv3) + imag(cr3)*imag(tv3) crp4 = real(cr4)*real(tv4) + imag(cr4)*imag(tv4) endif ttmp = zSFBM - zc d1 = real(ttmp)*scale + 0.5 d2 = 1 - d1 d3 = imag(ttmp)*scale + 0.5 d4 = 1 - d3 if (@txtr_SFBM_power != 1) d1 = d1^@txtr_SFBM_power d2 = d2^@txtr_SFBM_power d3 = d3^@txtr_SFBM_power d4 = d4^@txtr_SFBM_power endif if @txtr_SFBM_mode == 0 nindex = 10 + crp1*d1*d3 + crp3*d1*d4 + crp2*d2*d3 + crp4*d2*d4 elseif @txtr_SFBM_mode == 1 nindex = cabs(cr1*d1*d3 + cr3*d1*d4 + cr2*d2*d3 + cr4*d2*d4) endif if (@txtr_SFBM_scaledis == 0) textureSFBM = textureSFBM + nindex/scale elseif (@txtr_SFBM_scaledis == 1) textureSFBM = textureSFBM + nindex/sqrt(scale) elseif (@txtr_SFBM_scaledis == 2) textureSFBM = textureSFBM + nindex/(scale^(1/scale)) elseif (@txtr_SFBM_scaledis == 3) textureSFBM = textureSFBM + nindex/iter3 elseif (@txtr_SFBM_scaledis == 4) if (nindex < textureSFBM) textureSFBM = nindex endif elseif (@txtr_SFBM_scaledis == 5) if (nindex > textureSFBM) textureSFBM = nindex endif endif endwhile if (@txtr_SFBM_limit != 0) textureSFBM = textureSFBM%@txtr_SFBM_limit endif to_index = to_index + @txtr_SFBM*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale if (@txtr_Primes_size != 0 && @txtr_Primes_size != 1) zPrimes = zPrimes/@txtr_Primes_size endif if (@reachThrough) _zz = zPrimes endif float texturePrimes = 0 float trz = 0 float tiz = 0 float t_rz = 0 float t_iz = 0 float tstartSnip = 10^@txtr_primes_where2start float tendOfSnip = 10^(@txtr_primes_where2start+@txtr_primes_lengthOfSnip) if (@txtr_primes_mode == 0) trz = |real(zPrimes)| tiz = |imag(zPrimes)| elseif (@txtr_primes_mode == 1) trz = |real(zPrimes)| tiz = trz elseif (@txtr_primes_mode == 2) tiz = |imag(zPrimes)| trz = tiz elseif (@txtr_primes_mode == 3) trz = |zPrimes| tiz = trz elseif (@txtr_primes_mode == 4) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = trz elseif (@txtr_primes_mode == 5) trz = real(atan(zPrimes)) if (trz < 0) trz = trz + 2*#pi endif tiz = imag(atan(zPrimes)) if (tiz < 0) tiz = tiz + 2*#pi endif elseif (@txtr_primes_mode == 6) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = |zPrimes| endif t_rz = (trz - trunc(trz*tstartSnip)/tstartSnip)*tendOfSnip t_iz = (tiz - trunc(tiz*tstartSnip)/tstartSnip)*tendOfSnip if (@txtr_primes_withFinalTrunc) t_rz = trunc(t_rz) t_iz = trunc(t_iz) endif texturePrimes = 10*((t_rz%821) + (t_iz%823))/1644 if (@txtr_Primes_limit != 0) texturePrimes = texturePrimes%@txtr_Primes_limit endif to_index = to_index + @txtr_Primes*texturePrimes endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale if (@txtr_Gauss_size != 0 && @txtr_Gauss_size != 1) zGauss = zGauss/@txtr_Gauss_size endif if (@reachThrough) _zz = zGauss endif float textureGauss = 0 float t_d = cabs(zGauss) float t_r = real(zGauss) float t_i = imag(zGauss) if (@txtr_Gauss_type == 0) textureGauss = t_d elseif (@txtr_Gauss_type == 1) textureGauss = |t_r| elseif (@txtr_Gauss_type == 2) textureGauss = |t_i| elseif (@txtr_Gauss_type == 3) textureGauss = |t_i-t_r| elseif (@txtr_Gauss_type == 4) textureGauss = |t_i*t_r| elseif (@txtr_Gauss_type == 5) textureGauss = |t_i/t_r| elseif (@txtr_Gauss_type == 6) if (|t_i| < |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 7) if (|t_i| > |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 8) textureGauss = atan2(zGauss)/(2*#pi) if textureGauss < 0 textureGauss = textureGauss + 1 endif elseif (@txtr_Gauss_type == 9) textureGauss = (|t_i|+|t_r|+t_d)/3 elseif (@txtr_Gauss_type == 10) textureGauss = (|t_i|*|t_r|*t_d)^(1/3) endif if (@txtr_Gauss_limit != 0) textureGauss = textureGauss%@txtr_Gauss_limit endif to_index = to_index + @txtr_Gauss*textureGauss endif #index = to_index endif ; no_mask else if (@spareMask) #solid = true endif endif ; no_spare default: title = "M Some traps with functions" param _trap_min caption = "Lower Border for Trap" default = 1.0 min = 0.0 hint = "Only usefull with Traps" endparam param _trap_max caption = "Upper Border for Trap" default = 2.0 min = 0.0 hint = "Only usefull with Traps" endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param colour_limit caption = "Colour Limitation" default = 0.0 min = 0.0 max = 400.0 endparam param with_zStart caption = "zStart everywhere Y/N" default = false hint = "Works with the lattices" endparam param init_z caption = "Z Initialisation" enum = "Always New" \ "Sum Up" "W-Sum Up" "W^2-Sum Up" \ "Zero" "Pixel" "Mixel" default = 1 endparam param turnMode caption = "L: Turnaround Mode" enum = "None" "Turn" "Around" "Always" default = 0 endparam param turnScale caption = "L: Turn Scale" default = 0.0 endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param base4txtr caption = "Texture Base" enum = "Z" "Pixel" "Mixel" "Diff(Z,Pixel)" "Dist(Z,Pixel)" default = 0 endparam param reachThrough caption = "T: Reach Through Scales" default = false hint = "Reaches the Scale and Pattern Size from one \ Texture to the next. Every Texture changes all \ that follow." endparam param txtr_gnarl caption = "T: Gnarl Texture" hint = "This adds a Gnarl texture the the coloring." default = 0.0 endparam param txtr_gnarl_type caption = "T: Gnarl Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_gnarl_scale caption = "T: Gnarl Scale" hint = "Scaling Factor for this Gnarl texture." default = 1.0 endparam param txtr_gnarl_size caption = "T: Gnarl Pattern Size" default = 1.0 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_gnarl_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param txtr_PopCorn_type caption = "T: PopCorn Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_PopCorn_scale caption = "T: PopCorn Scale" hint = "Scaling Factor for this PopCorn texture." default = 1.0 endparam param txtr_PopCorn_size caption = "T: PopCorn Pattern Size" default = 1.0 endparam param txtr_PopCorn_limit caption = "T: PopCorn Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn_octaves caption = "T: PopCorn Octaves" default = 5 min = 1 endparam param txtr_SFBM caption = "T: SFBM Texture" hint = "This adds a SFBM texture to the coloring." default = 0.0 endparam param txtr_SFBM_mode caption = "T: SFBM Noise type" default = 1 enum = "Perlin's" "Raw... (Sam's)" endparam param txtr_SFBM_scale caption = "T: SFBM Scale" hint = "Scaling Factor for this SFBM texture." default = 1.0 endparam param txtr_SFBM_scaledis caption = "T: SFBM Scale Distribution" default = 0 enum = "1/scale" "1/sqrt(scale)" "Fancy" "1/i" endparam param txtr_SFBM_size caption = "T: SFBM Pattern Size" default = 0.1 endparam param txtr_SFBM_magn caption = "T: SFBM Magnification Step" default = 1.2 endparam param txtr_SFBM_limit caption = "T: SFBM Limitation" default = 0.0 min = 0.0 endparam param txtr_SFBM_rot caption = "T: SFBM Rotation Step" default = 28.0 endparam param txtr_SFBM_power caption = "T: SFBM Power" default = 1.0 endparam param txtr_SFBM_mod caption = "Vary Random Numbers?" default = 1 enum = "No" "Use sqrt(i)" endparam param txtr_SFBM_seed caption = "T: SFBM Seed" default = 123094 endparam param txtr_SFBM_octaves caption = "T: SFBM Octaves" default = 5 min = 1 endparam param txtr_Primes caption = "T: Primes Texture" hint = "This adds a Primes texture to the coloring." default = 0.0 endparam param txtr_Primes_scale caption = "T: Primes Scale" hint = "Scaling Factor for this Primes texture." default = 1.0 endparam param txtr_Primes_size caption = "T: Primes Pattern Size" default = 0.5 endparam param txtr_primes_withFinalTrunc caption = "With Final Truncation" default = TRUE endparam param txtr_primes_where2start caption = "T: Start of Snip" default = 1 min = 0 endparam param txtr_primes_lengthOfSnip caption = "T: Length of Snip" default = 1 min = 1 endparam param txtr_primes_Mode caption = "T: Primes Mode" enum = "Real,Imag" "Real" "Imag" "|z|" "Angle" "Angel" "Polar" default = 5 endparam param txtr_primes_limit caption = "T: Primes Limitation" default = 0.0 min = 0.0 endparam param txtr_Gauss caption = "T: Gauss Texture" hint = "This adds a Gauss texture to the coloring." default = 0.0 endparam param txtr_Gauss_type caption = "T: Gauss Type" enum = "d" "x" "y" "x-y" "x*y" "y/x" "min x,y" "max x,y" "Angle" \ "Pyth. am" "Pyth. gm" default = 0 endparam param txtr_Gauss_scale caption = "T: Gauss Scale" hint = "Scaling Factor for this Gauss texture." default = 1.0 endparam param txtr_Gauss_size caption = "T: Gauss Pattern Size" default = 1.0 endparam param txtr_Gauss_limit caption = "T: Gauss Limitation" default = 0.0 min = 0.0 endparam param masking caption = "Masking" enum = "None" "Lower" "Upper" "Between" "Outside" default = 0 endparam param maskType caption = "Mask Type" enum = "Index" "Re z" "Im z" "Angle" "Iteration" \ "Re Mixel" "Im Mixel" "Abs Mixel" \ "Dist(z,Pixel)" "|z|" default = 0 endparam param threshold_l caption = "Lower Mask Threshold" default = 0.5 endparam param threshold_u caption = "Upper Mask Threshold" default = 1.0 endparam param spareMode caption = "Cut Out" enum = "None" "Upper" "Lower" \ "Left" "Right" \ "Upper + Left" "Upper + Right" "Lower + Left" "Lower + Right" \ "Upper & Left" "Upper & Right" "Lower & Left" "Lower & Right" \ "Inside Rectangle" "Outside Rectangle" \ "Between Vertical" "Outside Vertical" \ "Between Horizontal" "Outside Horizontal" \ "Inside Circle" "Outside Circle" default = 0 endparam param sparePoint caption = "Line of Cut, 1. Point" default = (0,0) endparam param sparePoint2 caption = "Add. Point/Line for Cut" default = (1,1) endparam param spareRot caption = "Rotate Cut" default = 0.0 min = -90.0 max = 90.0 endparam param spareMask caption = "Mask Cut" default = true endparam func fkt_d caption = "Distance Function" default = exp() endfunc func fkt_1 caption = "Trap Function 1" default = ident() endfunc func fkt_2 caption = "Trap Function 2" default = ident() endfunc func startFct caption = "Start Function" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc } ; some_other_traps stars_and_stripes { ; ; Andreas Lober, July 30, 2000 ; init: bool no_spare = true if (@spareMode > 0) float spareVert = real(@sparePoint) float spareHori = imag(@sparePoint) complex pixpix = #pixel float rePix = 0 float imPix = 0 if (@spareMode <= 18) if (@spareRot%360 != 0) complex rotCentre = @sparePoint if (@spareMode > 12 && @spareMode < 19) rotCentre = (@sparePoint+@sparePoint2)/2 endif pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@spareRot/180) + rotCentre endif rePix = real(pixpix) imPix = imag(pixpix) endif if (@spareMode <= 12) if (@spareMode == 1 || @spareMode == 5 || @spareMode == 6 \ || @spareMode == 9 || @spareMode == 10) ; upper upper+right upper+left ; upper&right upper&left if (imPix >= spareHori) if (@spareMode == 9) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 10) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif elseif (@spareMode == 2 || @spareMode == 7 || @spareMode == 8 \ || @spareMode == 11 || @spareMode == 12) ; lower lower+right lower+left ; lower&right lower&left if (imPix < spareHori) if (@spareMode == 11) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 12) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif endif if (@spareMode == 3 || @spareMode == 5 || @spareMode == 7) ; left upper+left lower+left if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 4 || @spareMode == 6 || @spareMode == 8) ; right upper+right lower+right if (rePix >= spareVert) no_spare = false endif endif elseif (@spareMode <= 18) float rePnt = real(@sparePoint2) float imPnt = imag(@sparePoint2) float upper = imPnt float lower = spareHori float left = spareVert float right = rePnt if (imPnt < spareHori) upper = spareHori lower = imPnt endif if (spareVert > rePnt) left = rePnt right = spareVert endif if (@spareMode == 13) ; inside rect if (rePix > left && rePix < right && imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 14) ; outside rect if (rePix < left || rePix > right || imPix < lower || imPix > upper) no_spare = false endif elseif (@spareMode == 15) ; inside vert if (rePix > left && rePix < right) no_spare = false endif elseif (@spareMode == 16) ; outside vert if (rePix < left || rePix > right) no_spare = false endif elseif (@spareMode == 17) ; inside hori if (imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 18) ; outside hori if (imPix < lower || imPix > upper) no_spare = false endif endif elseif (@spareMode <= 20) float radiusOFCutCircle = cabs(@sparePoint-@sparePoint2) if (@spareMode == 19) ; inside circle if (cabs(#pixel-@sparePoint) < radiusOFCutCircle) no_spare = false endif elseif (@spareMode == 20) ; outside circle if (cabs(#pixel-@sparePoint) > radiusOFCutCircle) no_spare = false endif endif endif ; spareMode > 12 endif ; @spareMode > 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; float _dist = 0 float _rdist = 0 float _idist = 0 float _tdist = 0 float _cdist = 0 float _qdist = 0 float _rd = 0 float _id = 0 float _min_dist = 1e20 float _max_dist = -1 float _min_rdist = 1e20 float _max_rdist = -1 float _min_idist = 1e20 float _max_idist = -1 float _min_tdist = 1e20 float _max_tdist = -1 float _min_cdist = 1e20 float _max_cdist = -1 float _min_qdist = 1e20 float _max_qdist = -1 float temp = -1 ; ; Traps ; bool _do_trap = true float _trap = 0.01 bool _do_rtrap = true float _rtrap = 0.01 bool _do_itrap = true float _itrap = 0.01 bool _do_ttrap = true float _ttrap = 0.01 bool _do_ctrap = true float _ctrap = 0.01 ; ; Sums ; float _sum = 0 float _rsum = 0 float _isum = 0 float _tsum = 0 float _csum = 0 float _qsum = 0 ; ; Weighted Sums ; float _sum_w = 0 float _rsum_w = 0 float _isum_w = 0 float _tsum_w = 0 float _csum_w = 0 float _qsum_w = 0 ; ; Square-Weighted Sums ; float _sum_w2 = 0 float _rsum_w2 = 0 float _isum_w2 = 0 float _tsum_w2 = 0 float _csum_w2 = 0 float _qsum_w2 = 0 complex zStart = 0 int l_coord = @coordLoop int koord = @coord int iter = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 loop: if (no_spare) iter = iter + 1 if (@init_z == 0) zStart = #z elseif (@init_z == 1) zStart = zStart + #z elseif (@init_z == 2) zStart = zStart + #z/iter elseif (@init_z == 3) zStart = zStart + #z/iter^2 elseif (@init_z == 4) zStart = 0 elseif (@init_z == 5) zStart = abs(#pixel - #z) elseif (@init_z == 6) zStart = (#pixel + #z)/2 endif; ; ; Start with the lattices ; if (@lattice == 1) zStart = round(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zStart) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 8) zStart = floor(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 10) zStart = abs(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*zStart^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice >= 21 && @lattice <= 23) float reL1 = real(@lattFac1) float imL1 = imag(@lattFac1) float reL2 = real(@lattFac2) float imL2 = imag(@lattFac2) float reZ = reL1*real(zStart) float imZ = imL1*imag(zStart) if (reL2 != 0) reZ = reZ%reL2 endif if (imL2 != 0) imZ = imZ%imL2 endif if (@lattice == 21) zStart = reZ + 1i*imZ elseif (@lattice == 22) zStart = reZ/@lattFac1 + 1i*imZ/@lattFac2 elseif (@lattice == 23) zStart = @lattFac1/reZ + 1i*@lattFac2/imZ endif endif ; lattices if (@turnMode) complex zRound = 0 complex zZ = zStart if (@turnScale != 0) complex zRound = round(zStart*@turnScale)/@turnScale complex zZ = zStart-zRound endif float targ = atan2(zZ) ; "Turn around" part taken from Sam if (abs(targ) < testAngle1) zStart = zZ*exp(rotAngle1)+zRound elseif (abs(targ) > testAngle2) zStart = zZ*exp(rotAngle2)+zRound endif endif ; @turnMode int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) zStart = cabs(zStart) + 1i*atan2(zStart) elseif (koord == 2) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) zStart = real(sin(zStart)) + 1i*cos(zStart) elseif (koord == 6) zStart = real(sinh(zStart)) + 1i*cosh(zStart) elseif (koord == 7) zStart = real(asin(zStart)) + 1i*acos(zStart) elseif (koord == 8) zStart = real(asinh(zStart)) + 1i*acosh(zStart) elseif (koord == 9) zStart = abs(zStart) + conj(zStart)/(|zStart|+1e-20) elseif (koord >= 10 && koord <= 19) if (zStart != 0) float rad = cabs(zStart) float re = real(zStart)/rad float im = imag(zStart)/rad if (koord == 10) zStart = re*zStart + im*conj(zStart) elseif (koord == 11) zStart = re*zStart + im*flip(zStart) elseif (koord == 12) zStart = re*sin(zStart) + im*cos(zStart) elseif (koord == 13) zStart = re*sin(zStart) + 1i*im*cos(zStart) elseif (koord == 14) zStart = re*asin(zStart) + im*acos(zStart) elseif (koord == 15) zStart = re*asin(zStart) + 1i*im*acos(zStart) elseif (koord == 16) zStart = re*sinh(zStart) + im*cosh(zStart) elseif (koord == 17) zStart = re*sinh(zStart) + 1i*im*cosh(zStart) elseif (koord == 18) zStart = re*asinh(zStart) + im*acosh(zStart) elseif (koord == 19) zStart = re*asinh(zStart) + 1i*im*acosh(zStart) endif endif endif endwhile ; Schleife über die Koordinaten zStart = @startFct(zStart) if (@l_randomness != 0) zStart = zStart + @l_randomness * #random endif x = real(zStart) y = imag(zStart) zStart = ((real(@teilFkt((x^2+1e-20)/(y^2+1e-20)))%@teilung))/@teilung*400 _dist = cabs(zStart - #z) _rd = real(zStart - #z) _id = imag(zStart - #z) _rdist = abs(_rd) _idist = abs(_id) if _rd > _id _tdist = _rdist _cdist = _idist if _id == 0 _qdist = _rdist else _qdist = _rdist / _idist endif else _tdist = _idist _cdist = _rdist if _rd == 0 _qdist = _idist else _qdist = _idist / _rdist endif endif ; ; Calculate Min ; if @_mode == 0 && _dist < _min_dist _min_dist = _dist endif if @_mode == 1 && _rdist < _min_rdist _min_rdist = _rdist endif if @_mode == 2 && _idist < _min_idist _min_idist = _idist endif if @_mode == 3 && _tdist < _min_tdist _min_tdist = _tdist endif if @_mode == 4 && _tdist < _min_cdist _min_cdist = _cdist endif if @_mode == 29 && _qdist < _min_qdist _min_qdist = _qdist endif ; ; Calculate Max ; if @_mode == 5 && _dist > _max_dist _max_dist = _dist endif if @_mode == 6 && _rdist > _max_rdist _max_rdist = _rdist endif if @_mode == 7 && _rdist > _max_rdist _max_idist = _idist endif if @_mode == 8 && _tdist > _max_tdist _max_tdist = _tdist endif if @_mode == 9 && _cdist > _max_cdist _max_cdist = _cdist endif if @_mode == 30 && _qdist > _max_qdist _max_qdist = _qdist endif ; ; Calculate the traps ; if @_mode == 19 && _do_trap && _dist > @_trap_min && _dist < @_trap_max _do_trap = false _trap =_dist endif if @_mode == 20 && _do_rtrap && _rdist > @_trap_min && _rdist < @_trap_max _do_rtrap = false _rtrap =_rdist endif if @_mode == 21 && _do_itrap && _idist > @_trap_min && _idist < @_trap_max _do_itrap = false _itrap =_idist endif if @_mode == 22 && _do_ttrap && _tdist > @_trap_min && _tdist < @_trap_max _do_ttrap = false _ttrap =_tdist endif if @_mode == 23 && _do_ctrap && _cdist > @_trap_min && _cdist < @_trap_max _do_ctrap = false _ctrap =_cdist endif ; ; Calculate the sums ; if @_mode == 24 _sum = _sum + _dist endif if @_mode == 25 _rsum = _rsum + _rdist endif if @_mode == 26 _isum = _isum + _idist endif if @_mode == 27 _tsum = _tsum + _tdist endif if @_mode == 28 _csum = _csum + _cdist endif if @_mode == 31 _qsum = _qsum + _qdist endif ; ; Calculate the weighted sums ; if @_mode == 33 _sum_w = _sum_w + _dist/iter endif if @_mode == 34 _rsum_w = _rsum_w + _rdist/iter endif if @_mode == 35 _isum_w = _isum_w + _idist/iter endif if @_mode == 36 _tsum_w = _tsum_w + _tdist/iter endif if @_mode == 37 _csum_w = _csum_w + _cdist/iter endif if @_mode == 38 _qsum_w = _qsum_w + _qdist/iter endif ; ; Calculate the square-weighted sums ; if @_mode == 39 _sum_w2 = _sum_w2 + _dist/iter^2 endif if @_mode == 40 _rsum_w2 = _rsum_w2 + _rdist/iter^2 endif if @_mode == 41 _isum_w2 = _isum_w2 + _idist/iter^2 endif if @_mode == 42 _tsum_w2 = _tsum_w2 + _tdist/iter^2 endif if @_mode == 43 _csum_w2 = _csum_w2 + _cdist/iter^2 endif if @_mode == 44 _qsum_w2 = _qsum_w2 + _qdist/iter^2 endif endif ; no_spare final: if (no_spare) if @_mode == 0 temp = _min_dist ; "Min Dist" elseif @_mode == 1 temp = _min_rdist ; "Min Real" elseif @_mode == 2 temp = _min_idist ; "Min Imag" elseif @_mode == 3 temp = _min_tdist ; "Min Triang" elseif @_mode == 4 temp = _min_cdist ; "Min Cubus" elseif @_mode == 5 temp = _max_dist ; "Max Dist" elseif @_mode == 6 temp = _max_rdist ; "Max Real" elseif @_mode == 7 temp = _max_idist ; "Max Imag" elseif @_mode == 8 temp = _max_tdist ; "Max Triang" elseif @_mode == 9 temp = _max_cdist ; "Max Cubus" elseif @_mode == 10 temp = cabs(zStart - #pixel) ; "Act Dist" elseif @_mode == 11 temp = abs(real(zStart-#pixel)) ; "Act Real" elseif @_mode == 12 temp = abs(imag(zStart-#pixel)) ; "Act Imag" elseif @_mode == 13 temp = _dist ; "Last Dist" elseif @_mode == 14 temp = _rdist ; "Last Real" elseif @_mode == 15 temp = _idist ; "Last Imag" elseif @_mode == 16 temp = _tdist ; "Last Triang" elseif @_mode == 17 temp = _cdist ; "Last Cubus" elseif @_mode == 18 temp = abs(cabs(zStart)-cabs(#pixel)) ; "Difference" elseif @_mode == 19 temp = _trap ; "Trap Dist" elseif @_mode == 20 temp = _rtrap ; "Trap Real" elseif @_mode == 21 temp = _itrap ; "Trap Imag" elseif @_mode == 22 temp = _ttrap ; "Trap Triang" elseif @_mode == 23 temp = _ctrap ; "Trap Cubus" elseif @_mode == 24 temp = _sum ; "Sum Dist" elseif @_mode == 25 temp = _rsum ; "Sum Real" elseif @_mode == 26 temp = _isum ; "Sum Imag" elseif @_mode == 27 temp = _tsum ; "Sum Triang" elseif @_mode == 28 temp = _csum ; "Sum Cubus" elseif @_mode == 29 temp = _min_qdist ; "Min MinQuot" elseif @_mode == 30 temp = _max_qdist ; "Max MinQuot" elseif @_mode == 31 temp = _qsum ; "Sum MinQuot" elseif @_mode == 32 temp = _qdist ; "Last MinQuot" elseif @_mode == 33 temp = _sum_w elseif @_mode == 34 temp = _rsum_w elseif @_mode == 35 temp = _isum_w elseif @_mode == 36 temp = _tsum_w elseif @_mode == 37 temp = _csum_w elseif @_mode == 38 temp = _qsum_w elseif @_mode == 39 temp = _sum_w2 elseif @_mode == 40 temp = _rsum_w2 elseif @_mode == 41 temp = _isum_w2 elseif @_mode == 42 temp = _tsum_w2 elseif @_mode == 43 temp = _csum_w2 elseif @_mode == 44 temp = _qsum_w2 endif float mask = 0 bool no_mask = true if (@masking > 0) if (@maskType == 0) ; Index mask = temp elseif (@maskType == 1) ; Re z mask = real(zStart) elseif (@maskType == 2) ; Im z mask = imag(zStart) elseif (@maskType == 3) ; Angle mask = atan2(zStart)/(2*#pi) if mask < 0 mask = mask + 1 endif mask = mask*360 elseif (@maskType == 4) ; Iteration mask = iter elseif (@maskType == 5) ; Re Mixel mask = real(zStart+#pixel)/2 elseif (@maskType == 6) ; Im Mixel mask = imag(zStart+#pixel)/2 elseif (@maskType == 7) ; Abs Mixel mask = cabs(zStart+#pixel)/2 elseif (@maskType == 8) ; Dist(z,Pixel) mask = cabs(zStart-#pixel) elseif (@maskType == 9) ; |z| mask = cabs(zStart) endif endif if (@masking == 1) ; Lower if (mask < @threshold_l) #solid = true no_mask = false endif elseif (@masking == 2) ; Upper if (mask > @threshold_u) #solid = true no_mask = false endif elseif (@masking == 3) ; Between if (mask > @threshold_l && mask < @threshold_u) #solid = true no_mask = false endif elseif (@masking == 4) ; Outside if (mask < @threshold_l || mask > @threshold_u) #solid = true no_mask = false endif else no_mask = true endif if (no_mask) float to_index = real(@fkt(temp)) complex _zz = zStart if (@base4txtr == 1) _zz = #pixel elseif (@base4txtr == 2) _zz = (#pixel+_zz)/2 elseif (@base4txtr == 3) _zz = abs(#pixel-_zz) elseif (@base4txtr == 4) _zz = cabs(#pixel-_zz) endif if (@colour_limit != 0) to_index = to_index%@colour_limit endif if (@f_randomness != 0) to_index = to_index + @f_randomness * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz zGnarl = zGnarl-trunc(zGnarl*@txtr_gnarl_scale)/@txtr_gnarl_scale if (@txtr_gnarl_size != 0 && @txtr_gnarl_size != 1) zGnarl = zGnarl/@txtr_gnarl_size endif if (@reachThrough) _zz = zGnarl endif float tx = real(zGnarl) float ty = imag(zGnarl) float txOld = 0 int iter3 = @txtr_gnarl_octaves while (iter3 > 0) iter3 = iter3-1 txOld = tx tx = tx - sin(ty + sin(ty)) ty = ty - sin(txOld + sin(txOld)) endwhile float textureGnarl = 0 if (@txtr_gnarl_type == 0) textureGnarl = abs(tx) elseif (@txtr_gnarl_type == 1) textureGnarl = abs(tx)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 2) textureGnarl = abs(tx-ty) elseif (@txtr_gnarl_type == 3) textureGnarl = abs(tx-ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 4) textureGnarl = abs(tx+ty)/2 elseif (@txtr_gnarl_type == 5) textureGnarl = abs(tx*ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 6) textureGnarl = atan2(tx+1i*ty)/(2*#pi) if (textureGnarl < 0) textureGnarl = textureGnarl + 1 endif elseif (@txtr_gnarl_type == 7) textureGnarl = sqrt(tx^2+ty^2) endif if (@txtr_Gnarl_limit != 0) textureGnarl = textureGnarl%@txtr_Gnarl_limit endif to_index = to_index + @txtr_gnarl*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale if (@txtr_PopCorn_size != 0 && @txtr_PopCorn_size != 1) zPopCorn = zPopCorn/@txtr_PopCorn_size endif if (@reachThrough) _zz = zPopCorn endif float tx = real(zPopCorn) float ty = imag(zPopCorn) float txOld = 0 int iter3 = @txtr_PopCorn_octaves while (iter3 > 0) iter3 = iter3-1 txOld = tx tx = tx - sin(ty + log(ty + cos(ty))) ty = ty - sin(txOld + log(txOld + cos(txOld))) endwhile float texturePopCorn = 0 if (@txtr_PopCorn_type == 0) texturePopCorn = abs(tx) elseif (@txtr_PopCorn_type == 1) texturePopCorn = abs(tx)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 2) texturePopCorn = abs(tx-ty) elseif (@txtr_PopCorn_type == 3) texturePopCorn = abs(tx-ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 4) texturePopCorn = abs(tx+ty)/2 elseif (@txtr_PopCorn_type == 5) texturePopCorn = abs(tx*ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 6) texturePopCorn = atan2(tx+1i*ty)/(2*#pi) if (texturePopCorn < 0) texturePopCorn = texturePopCorn + 1 endif elseif (@txtr_PopCorn_type == 7) texturePopCorn = sqrt(tx^2+ty^2) endif if (@txtr_PopCorn_limit != 0) texturePopCorn = texturePopCorn%@txtr_PopCorn_limit endif to_index = to_index + @txtr_PopCorn*texturePopCorn endif if (@txtr_SFBM != 0) float mod = 1 float d1 = 0 float d2 = 0 float d3 = 0 float d4 = 0 float nindex = 0 float textureSFBM = 0 float scale = 0 cr1 = 0 cr2 = 0 cr3 = 0 cr4 = 0 float crp1 = 0 float crp2 = 0 float crp3 = 0 float crp4 = 0 complex tv1 = 0 complex tv2 = 0 complex tv3 = 0 complex tv4 = 0 complex seed = @txtr_SFBM_seed rotAngleFBM = exp(1i*pi/180*@txtr_SFBM_rot) if (@txtr_SFBM_scaledis == 4) ; min textureSFBM = 1e20 elseif (@txtr_SFBM_scaledis == 5) ; max textureSFBM = -1e20 endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; complex zSFBM = _zz zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale if (@txtr_SFBM_size != 0 && @txtr_SFBM_size != 1) zSFBM = zSFBM/@txtr_SFBM_size endif if (@reachThrough) _zz = zSFBM endif int iter3 = 0 complex ttmp = 0 while (iter3 < @txtr_SFBM_octaves) scale = @txtr_SFBM_magn^iter3 zSFBM = zSFBM*rotAngleFBM iter3 = iter3 + 1 if @txtr_SFBM_mod == 1 mod = sqrt(iter3) endif zc = round(scale*zSFBM)/scale zc1 = zc + (.5,.5)/scale zc2 = zc + (-.5,.5)/scale zc3 = zc + (.5,-.5)/scale zc4 = zc + (-.5,-.5)/scale ttmp = seed/(mod*zc1+124), cr1 = ttmp-floor(ttmp) ttmp = seed/(mod*zc2+124), cr2 = ttmp-floor(ttmp) ttmp = seed/(mod*zc3+124), cr3 = ttmp-floor(ttmp) ttmp = seed/(mod*zc4+124), cr4 = ttmp-floor(ttmp) if (@txtr_SFBM_mode == 0) tv1 = (zSFBM - zc1)*scale tv2 = (zSFBM - zc2)*scale tv3 = (zSFBM - zc3)*scale tv4 = (zSFBM - zc4)*scale crp1 = real(cr1)*real(tv1) + imag(cr1)*imag(tv1) crp2 = real(cr2)*real(tv2) + imag(cr2)*imag(tv2) crp3 = real(cr3)*real(tv3) + imag(cr3)*imag(tv3) crp4 = real(cr4)*real(tv4) + imag(cr4)*imag(tv4) endif ttmp = zSFBM - zc d1 = real(ttmp)*scale + 0.5 d2 = 1 - d1 d3 = imag(ttmp)*scale + 0.5 d4 = 1 - d3 if (@txtr_SFBM_power != 1) d1 = d1^@txtr_SFBM_power d2 = d2^@txtr_SFBM_power d3 = d3^@txtr_SFBM_power d4 = d4^@txtr_SFBM_power endif if @txtr_SFBM_mode == 0 nindex = 10 + crp1*d1*d3 + crp3*d1*d4 + crp2*d2*d3 + crp4*d2*d4 elseif @txtr_SFBM_mode == 1 nindex = cabs(cr1*d1*d3 + cr3*d1*d4 + cr2*d2*d3 + cr4*d2*d4) endif if (@txtr_SFBM_scaledis == 0) textureSFBM = textureSFBM + nindex/scale elseif (@txtr_SFBM_scaledis == 1) textureSFBM = textureSFBM + nindex/sqrt(scale) elseif (@txtr_SFBM_scaledis == 2) textureSFBM = textureSFBM + nindex/(scale^(1/scale)) elseif (@txtr_SFBM_scaledis == 3) textureSFBM = textureSFBM + nindex/iter3 elseif (@txtr_SFBM_scaledis == 4) if (nindex < textureSFBM) textureSFBM = nindex endif elseif (@txtr_SFBM_scaledis == 5) if (nindex > textureSFBM) textureSFBM = nindex endif endif endwhile if (@txtr_SFBM_limit != 0) textureSFBM = textureSFBM%@txtr_SFBM_limit endif to_index = to_index + @txtr_SFBM*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale if (@txtr_Primes_size != 0 && @txtr_Primes_size != 1) zPrimes = zPrimes/@txtr_Primes_size endif if (@reachThrough) _zz = zPrimes endif float texturePrimes = 0 float trz = 0 float tiz = 0 float t_rz = 0 float t_iz = 0 float tstartSnip = 10^@txtr_primes_where2start float tendOfSnip = 10^(@txtr_primes_where2start+@txtr_primes_lengthOfSnip) if (@txtr_primes_mode == 0) trz = |real(zPrimes)| tiz = |imag(zPrimes)| elseif (@txtr_primes_mode == 1) trz = |real(zPrimes)| tiz = trz elseif (@txtr_primes_mode == 2) tiz = |imag(zPrimes)| trz = tiz elseif (@txtr_primes_mode == 3) trz = |zPrimes| tiz = trz elseif (@txtr_primes_mode == 4) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = trz elseif (@txtr_primes_mode == 5) trz = real(atan(zPrimes)) if (trz < 0) trz = trz + 2*#pi endif tiz = imag(atan(zPrimes)) if (tiz < 0) tiz = tiz + 2*#pi endif elseif (@txtr_primes_mode == 6) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = |zPrimes| endif t_rz = (trz - trunc(trz*tstartSnip)/tstartSnip)*tendOfSnip t_iz = (tiz - trunc(tiz*tstartSnip)/tstartSnip)*tendOfSnip if (@txtr_primes_withFinalTrunc) t_rz = trunc(t_rz) t_iz = trunc(t_iz) endif texturePrimes = 10*((t_rz%821) + (t_iz%823))/1644 if (@txtr_Primes_limit != 0) texturePrimes = texturePrimes%@txtr_Primes_limit endif to_index = to_index + @txtr_Primes*texturePrimes endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale if (@txtr_Gauss_size != 0 && @txtr_Gauss_size != 1) zGauss = zGauss/@txtr_Gauss_size endif if (@reachThrough) _zz = zGauss endif float textureGauss = 0 float t_d = cabs(zGauss) float t_r = real(zGauss) float t_i = imag(zGauss) if (@txtr_Gauss_type == 0) textureGauss = t_d elseif (@txtr_Gauss_type == 1) textureGauss = |t_r| elseif (@txtr_Gauss_type == 2) textureGauss = |t_i| elseif (@txtr_Gauss_type == 3) textureGauss = |t_i-t_r| elseif (@txtr_Gauss_type == 4) textureGauss = |t_i*t_r| elseif (@txtr_Gauss_type == 5) textureGauss = |t_i/t_r| elseif (@txtr_Gauss_type == 6) if (|t_i| < |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 7) if (|t_i| > |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 8) textureGauss = atan2(zGauss)/(2*#pi) if textureGauss < 0 textureGauss = textureGauss + 1 endif elseif (@txtr_Gauss_type == 9) textureGauss = (|t_i|+|t_r|+t_d)/3 elseif (@txtr_Gauss_type == 10) textureGauss = (|t_i|*|t_r|*t_d)^(1/3) endif if (@txtr_Gauss_limit != 0) textureGauss = textureGauss%@txtr_Gauss_limit endif to_index = to_index + @txtr_Gauss*textureGauss endif #index = to_index endif ; no_mask else if (@spareMask) #solid = true endif endif ; no_spare default: title = "M Stars and Stripes, Dist. Meth." param _mode caption = "Dist. Mode" enum = "Min Dist" "Min Real" "Min Imag" "Min Triang" "Min Cubus" \ "Max Dist" "Max Real" "Max Imag" "Max Triang" "Max Cubus" \ "Act Dist" "Act Real" "Act Imag" \ "Last Dist" "Last Real" "Last Imag" "Last Triang" "Last Cubus" \ "Difference" \ "Trap Dist" "Trap Real" "Trap Imag" "Trap Triang" "Trap Cubus" \ "Sum Dist" "Sum Real" "Sum Imag" "Sum Triang" "Sum Cubus" \ "Min MinQuot" "Max MinQuot" "Sum MinQuot" "Last MinQuot" \ "W-Sum Dist" "W-Sum Real" "W-Sum Imag" "W-Sum Triang" "W-Sum Cubus" \ "W^2-Sum Dist" "W^2-Sum Real" "W^2-Sum Imag" \ "W^2-Sum Triang" "W^2-Sum Cubus" endparam param _trap_min caption = "Lower Border for Trap" default = 1.0 min = 0.0 hint = "Only usefull with Traps" endparam param _trap_max caption = "Upper Border for Trap" default = 2.0 min = 0.0 hint = "Only usefull with Traps" endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" default = 15 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param colour_limit caption = "Colour Limitation" default = 0.0 min = 0.0 max = 400.0 endparam param teilung caption = "Partitioning" default = 128 endparam param init_z caption = "Z Initialisation" enum = "Always New" \ "Sum Up" "W-Sum Up" "W^2-Sum Up" \ "Zero" "Pixel" "Mixel" default = 1 endparam param turnMode caption = "L: Turnaround Mode" default = false endparam param turnScale caption = "L: Turn Scale" default = 1.0 min = 0.0 endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param base4txtr caption = "Texture Base" enum = "Z" "Pixel" "Mixel" "Diff(Z,Pixel)" "Dist(Z,Pixel)" default = 0 endparam param reachThrough caption = "T: Reach Through Scales" default = false hint = "Reaches the Scale and Pattern Size from one \ Texture to the next. Every Texture changes all \ that follow." endparam param txtr_gnarl caption = "T: Gnarl Texture" hint = "This adds a Gnarl texture the the coloring." default = 0.0 endparam param txtr_gnarl_type caption = "T: Gnarl Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_gnarl_scale caption = "T: Gnarl Scale" hint = "Scaling Factor for this Gnarl texture." default = 1.0 endparam param txtr_gnarl_size caption = "T: Gnarl Pattern Size" default = 1.0 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_gnarl_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param txtr_PopCorn_type caption = "T: PopCorn Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_PopCorn_scale caption = "T: PopCorn Scale" hint = "Scaling Factor for this PopCorn texture." default = 1.0 endparam param txtr_PopCorn_size caption = "T: PopCorn Pattern Size" default = 1.0 endparam param txtr_PopCorn_limit caption = "T: PopCorn Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn_octaves caption = "T: PopCorn Octaves" default = 5 min = 1 endparam param txtr_SFBM caption = "T: SFBM Texture" hint = "This adds a SFBM texture to the coloring." default = 0.0 endparam param txtr_SFBM_mode caption = "T: SFBM Noise type" default = 1 enum = "Perlin's" "Raw... (Sam's)" endparam param txtr_SFBM_scale caption = "T: SFBM Scale" hint = "Scaling Factor for this SFBM texture." default = 1.0 endparam param txtr_SFBM_scaledis caption = "T: SFBM Scale Distribution" default = 0 enum = "1/scale" "1/sqrt(scale)" "Fancy" "1/i" endparam param txtr_SFBM_size caption = "T: SFBM Pattern Size" default = 0.1 endparam param txtr_SFBM_magn caption = "T: SFBM Magnification Step" default = 1.2 endparam param txtr_SFBM_limit caption = "T: SFBM Limitation" default = 0.0 min = 0.0 endparam param txtr_SFBM_rot caption = "T: SFBM Rotation Step" default = 28.0 endparam param txtr_SFBM_power caption = "T: SFBM Power" default = 1.0 endparam param txtr_SFBM_mod caption = "Vary Random Numbers?" default = 1 enum = "No" "Use sqrt(i)" endparam param txtr_SFBM_seed caption = "T: SFBM Seed" default = 123094 endparam param txtr_SFBM_octaves caption = "T: SFBM Octaves" default = 5 min = 1 endparam param txtr_Primes caption = "T: Primes Texture" hint = "This adds a Primes texture to the coloring." default = 0.0 endparam param txtr_Primes_scale caption = "T: Primes Scale" hint = "Scaling Factor for this Primes texture." default = 1.0 endparam param txtr_Primes_size caption = "T: Primes Pattern Size" default = 0.5 endparam param txtr_primes_withFinalTrunc caption = "With Final Truncation" default = TRUE endparam param txtr_primes_where2start caption = "T: Start of Snip" default = 1 min = 0 endparam param txtr_primes_lengthOfSnip caption = "T: Length of Snip" default = 1 min = 1 endparam param txtr_primes_Mode caption = "T: Primes Mode" enum = "Real,Imag" "Real" "Imag" "|z|" "Angle" "Angel" "Polar" default = 5 endparam param txtr_primes_limit caption = "T: Primes Limitation" default = 0.0 min = 0.0 endparam param txtr_Gauss caption = "T: Gauss Texture" hint = "This adds a Gauss texture to the coloring." default = 0.0 endparam param txtr_Gauss_type caption = "T: Gauss Type" enum = "d" "x" "y" "x-y" "x*y" "y/x" "min x,y" "max x,y" "Angle" \ "Pyth. am" "Pyth. gm" default = 0 endparam param txtr_Gauss_scale caption = "T: Gauss Scale" hint = "Scaling Factor for this Gauss texture." default = 1.0 endparam param txtr_Gauss_size caption = "T: Gauss Pattern Size" default = 1.0 endparam param txtr_Gauss_limit caption = "T: Gauss Limitation" default = 0.0 min = 0.0 endparam param masking caption = "Masking" enum = "None" "Lower" "Upper" "Between" "Outside" default = 0 endparam param maskType caption = "Mask Type" enum = "Index" "Re z" "Im z" "Angle" "Iteration" \ "Re Mixel" "Im Mixel" "Abs Mixel" \ "Dist(z,Pixel)" "|z|" default = 0 endparam param threshold_l caption = "Lower Mask Threshold" default = 0.5 endparam param threshold_u caption = "Upper Mask Threshold" default = 1.0 endparam param spareMode caption = "Cut Out" enum = "None" "Upper" "Lower" \ "Left" "Right" \ "Upper + Left" "Upper + Right" "Lower + Left" "Lower + Right" \ "Upper & Left" "Upper & Right" "Lower & Left" "Lower & Right" \ "Inside Rectangle" "Outside Rectangle" \ "Between Vertical" "Outside Vertical" \ "Between Horizontal" "Outside Horizontal" \ "Inside Circle" "Outside Circle" default = 0 endparam param sparePoint caption = "Line of Cut, 1. Point" default = (0,0) endparam param sparePoint2 caption = "Add. Point/Line for Cut" default = (1,1) endparam param spareRot caption = "Rotate Cut" default = 0.0 min = -90.0 max = 90.0 endparam param spareMask caption = "Mask Cut" default = true endparam func teilFkt caption = "Partitioning Function" default = round() endfunc func startFct caption = "Start Function" default = ident() endfunc func fkt caption = "Additional Function" default = ident() hint = "Last Transfer to Index" endfunc } ; stars_and_stripes stars_and_stripes2 { ; ; Andreas Lober, July 30, 2000 ; init: bool no_spare = true if (@spareMode > 0) float spareVert = real(@sparePoint) float spareHori = imag(@sparePoint) complex pixpix = #pixel float rePix = 0 float imPix = 0 if (@spareMode <= 18) if (@spareRot%360 != 0) complex rotCentre = @sparePoint if (@spareMode > 12 && @spareMode < 19) rotCentre = (@sparePoint+@sparePoint2)/2 endif pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@spareRot/180) + rotCentre endif rePix = real(pixpix) imPix = imag(pixpix) endif if (@spareMode <= 12) if (@spareMode == 1 || @spareMode == 5 || @spareMode == 6 \ || @spareMode == 9 || @spareMode == 10) ; upper upper+right upper+left ; upper&right upper&left if (imPix >= spareHori) if (@spareMode == 9) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 10) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif elseif (@spareMode == 2 || @spareMode == 7 || @spareMode == 8 \ || @spareMode == 11 || @spareMode == 12) ; lower lower+right lower+left ; lower&right lower&left if (imPix < spareHori) if (@spareMode == 11) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 12) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif endif if (@spareMode == 3 || @spareMode == 5 || @spareMode == 7) ; left upper+left lower+left if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 4 || @spareMode == 6 || @spareMode == 8) ; right upper+right lower+right if (rePix >= spareVert) no_spare = false endif endif elseif (@spareMode <= 18) float rePnt = real(@sparePoint2) float imPnt = imag(@sparePoint2) float upper = imPnt float lower = spareHori float left = spareVert float right = rePnt if (imPnt < spareHori) upper = spareHori lower = imPnt endif if (spareVert > rePnt) left = rePnt right = spareVert endif if (@spareMode == 13) ; inside rect if (rePix > left && rePix < right && imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 14) ; outside rect if (rePix < left || rePix > right || imPix < lower || imPix > upper) no_spare = false endif elseif (@spareMode == 15) ; inside vert if (rePix > left && rePix < right) no_spare = false endif elseif (@spareMode == 16) ; outside vert if (rePix < left || rePix > right) no_spare = false endif elseif (@spareMode == 17) ; inside hori if (imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 18) ; outside hori if (imPix < lower || imPix > upper) no_spare = false endif endif elseif (@spareMode <= 20) float radiusOFCutCircle = cabs(@sparePoint-@sparePoint2) if (@spareMode == 19) ; inside circle if (cabs(#pixel-@sparePoint) < radiusOFCutCircle) no_spare = false endif elseif (@spareMode == 20) ; outside circle if (cabs(#pixel-@sparePoint) > radiusOFCutCircle) no_spare = false endif endif endif ; spareMode > 12 endif ; @spareMode > 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; float _min = 1e20 float _max = -1 float _sum = 0 float _trap = 0 float wert = -1 bool _do_trap = TRUE float temp = 0 complex zStart = 0 int l_coord = @coordLoop int koord = @coord int iter = 0 float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 loop: if (no_spare) iter = iter + 1 if (@init_z == 0) zStart = #z elseif (@init_z == 1) zStart = zStart + #z elseif (@init_z == 2) zStart = zStart + #z/iter elseif (@init_z == 3) zStart = zStart + #z/iter^2 elseif (@init_z == 4) zStart = zStart + #z + #pixel elseif (@init_z == 5) zStart = abs(#pixel - #z) elseif (@init_z == 6) zStart = (#pixel + #z)/2 endif; ; ; Start with the lattices ; if (@lattice == 1) zStart = round(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zStart) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 8) zStart = floor(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 10) zStart = abs(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*zStart^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice >= 21 && @lattice <= 23) float reL1 = real(@lattFac1) float imL1 = imag(@lattFac1) float reL2 = real(@lattFac2) float imL2 = imag(@lattFac2) float reZ = reL1*real(zStart) float imZ = imL1*imag(zStart) if (reL2 != 0) reZ = reZ%reL2 endif if (imL2 != 0) imZ = imZ%imL2 endif if (@lattice == 21) zStart = reZ + 1i*imZ elseif (@lattice == 22) zStart = reZ/@lattFac1 + 1i*imZ/@lattFac2 elseif (@lattice == 23) zStart = @lattFac1/reZ + 1i*@lattFac2/imZ endif endif if (@turnMode) complex zRound = 0 complex zZ = zStart if (@turnScale != 0) complex zRound = round(zStart*@turnScale)/@turnScale complex zZ = zStart-zRound endif float targ = atan2(zZ) ; "Turn around" part taken from Sam if (abs(targ) < testAngle1) zStart = zZ*exp(rotAngle1)+zRound elseif (abs(targ) > testAngle2) zStart = zZ*exp(rotAngle2)+zRound endif endif ; @turnMode int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) zStart = cabs(zStart) + 1i*atan2(zStart) elseif (koord == 2) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) zStart = real(sin(zStart)) + 1i*cos(zStart) elseif (koord == 6) zStart = real(sinh(zStart)) + 1i*cosh(zStart) elseif (koord == 7) zStart = real(asin(zStart)) + 1i*acos(zStart) elseif (koord == 8) zStart = real(asinh(zStart)) + 1i*acosh(zStart) elseif (koord == 9) zStart = abs(zStart) + conj(zStart)/(|zStart|+1e-20) elseif (koord >= 10 && koord <= 19) if (zStart != 0) float rad = cabs(zStart) float re = real(zStart)/rad float im = imag(zStart)/rad if (koord == 10) zStart = re*zStart + im*conj(zStart) elseif (koord == 11) zStart = re*zStart + im*flip(zStart) elseif (koord == 12) zStart = re*sin(zStart) + im*cos(zStart) elseif (koord == 13) zStart = re*sin(zStart) + 1i*im*cos(zStart) elseif (koord == 14) zStart = re*asin(zStart) + im*acos(zStart) elseif (koord == 15) zStart = re*asin(zStart) + 1i*im*acos(zStart) elseif (koord == 16) zStart = re*sinh(zStart) + im*cosh(zStart) elseif (koord == 17) zStart = re*sinh(zStart) + 1i*im*cosh(zStart) elseif (koord == 18) zStart = re*asinh(zStart) + im*acosh(zStart) elseif (koord == 19) zStart = re*asinh(zStart) + 1i*im*acosh(zStart) endif endif endif endwhile ; Schleife über die Koordinaten zStart = @startFct(zStart) if (@l_randomness != 0) zStart = zStart + @l_randomness * #random endif x = real(zStart) y = imag(zStart) wert = ((real(@teilFkt((x^2+1e-20)/(y^2+1e-20)))%@teilung))/@teilung*400 ; ; Calculate Min ; if @_mode == 0 && wert < _min _min = wert endif if @_mode == 1 && wert > _max _max = wert endif if @_mode == 2 _sum = _sum + wert endif ; ; Calculate the trap ; if @_mode == 4 && _do_trap && wert > @_trap_min && wert < @_trap_max _do_trap = false _trap = wert endif endif ; no_spare final: if (no_spare) if @_mode == 0 temp = _min ; "Min" elseif @_mode == 1 temp = _max ; "Max" elseif @_mode == 2 temp = _sum ; "Sum" elseif @_mode == 3 temp = wert ; "Last" elseif @_mode == 4 temp = _trap ; "Trap" endif float mask = 0 bool no_mask = true if (@masking > 0) if (@maskType == 0) ; Index mask = temp elseif (@maskType == 1) ; Re z mask = real(zStart) elseif (@maskType == 2) ; Im z mask = imag(zStart) elseif (@maskType == 3) ; Angle mask = atan2(zStart)/(2*#pi) if mask < 0 mask = mask + 1 endif mask = mask*360 elseif (@maskType == 4) ; Iteration mask = iter elseif (@maskType == 5) ; Re Mixel mask = real(zStart+#pixel)/2 elseif (@maskType == 6) ; Im Mixel mask = imag(zStart+#pixel)/2 elseif (@maskType == 7) ; Abs Mixel mask = cabs(zStart+#pixel)/2 elseif (@maskType == 8) ; Dist(z,Pixel) mask = cabs(zStart-#pixel) elseif (@maskType == 9) ; |z| mask = cabs(zStart) endif endif if (@masking == 1) ; Lower if (mask < @threshold_l) #solid = true no_mask = false endif elseif (@masking == 2) ; Upper if (mask > @threshold_u) #solid = true no_mask = false endif elseif (@masking == 3) ; Between if (mask > @threshold_l && mask < @threshold_u) #solid = true no_mask = false endif elseif (@masking == 4) ; Outside if (mask < @threshold_l || mask > @threshold_u) #solid = true no_mask = false endif else no_mask = true endif if (no_mask) float to_index = real(@fkt(temp)) complex _zz = zStart if (@base4txtr == 1) _zz = #pixel elseif (@base4txtr == 2) _zz = (#pixel+_zz)/2 elseif (@base4txtr == 3) _zz = abs(#pixel-_zz) elseif (@base4txtr == 4) _zz = cabs(#pixel-_zz) endif if (@colour_limit != 0) to_index = to_index%@colour_limit endif if (@f_randomness != 0) to_index = to_index + @f_randomness * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz zGnarl = zGnarl-trunc(zGnarl*@txtr_gnarl_scale)/@txtr_gnarl_scale if (@txtr_gnarl_size != 0 && @txtr_gnarl_size != 1) zGnarl = zGnarl/@txtr_gnarl_size endif if (@reachThrough) _zz = zGnarl endif float tx = real(zGnarl) float ty = imag(zGnarl) float txOld = 0 int iter3 = @txtr_gnarl_octaves while (iter3 > 0) iter3 = iter3-1 txOld = tx tx = tx - sin(ty + sin(ty)) ty = ty - sin(txOld + sin(txOld)) endwhile float textureGnarl = 0 if (@txtr_gnarl_type == 0) textureGnarl = abs(tx) elseif (@txtr_gnarl_type == 1) textureGnarl = abs(tx)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 2) textureGnarl = abs(tx-ty) elseif (@txtr_gnarl_type == 3) textureGnarl = abs(tx-ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 4) textureGnarl = abs(tx+ty)/2 elseif (@txtr_gnarl_type == 5) textureGnarl = abs(tx*ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 6) textureGnarl = atan2(tx+1i*ty)/(2*#pi) if (textureGnarl < 0) textureGnarl = textureGnarl + 1 endif elseif (@txtr_gnarl_type == 7) textureGnarl = sqrt(tx^2+ty^2) endif if (@txtr_Gnarl_limit != 0) textureGnarl = textureGnarl%@txtr_Gnarl_limit endif to_index = to_index + @txtr_gnarl*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale if (@txtr_PopCorn_size != 0 && @txtr_PopCorn_size != 1) zPopCorn = zPopCorn/@txtr_PopCorn_size endif if (@reachThrough) _zz = zPopCorn endif float tx = real(zPopCorn) float ty = imag(zPopCorn) float txOld = 0 int iter3 = @txtr_PopCorn_octaves while (iter3 > 0) iter3 = iter3-1 txOld = tx tx = tx - sin(ty + log(ty + cos(ty))) ty = ty - sin(txOld + log(txOld + cos(txOld))) endwhile float texturePopCorn = 0 if (@txtr_PopCorn_type == 0) texturePopCorn = abs(tx) elseif (@txtr_PopCorn_type == 1) texturePopCorn = abs(tx)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 2) texturePopCorn = abs(tx-ty) elseif (@txtr_PopCorn_type == 3) texturePopCorn = abs(tx-ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 4) texturePopCorn = abs(tx+ty)/2 elseif (@txtr_PopCorn_type == 5) texturePopCorn = abs(tx*ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 6) texturePopCorn = atan2(tx+1i*ty)/(2*#pi) if (texturePopCorn < 0) texturePopCorn = texturePopCorn + 1 endif elseif (@txtr_PopCorn_type == 7) texturePopCorn = sqrt(tx^2+ty^2) endif if (@txtr_PopCorn_limit != 0) texturePopCorn = texturePopCorn%@txtr_PopCorn_limit endif to_index = to_index + @txtr_PopCorn*texturePopCorn endif if (@txtr_SFBM != 0) float mod = 1 float d1 = 0 float d2 = 0 float d3 = 0 float d4 = 0 float nindex = 0 float textureSFBM = 0 float scale = 0 cr1 = 0 cr2 = 0 cr3 = 0 cr4 = 0 float crp1 = 0 float crp2 = 0 float crp3 = 0 float crp4 = 0 complex tv1 = 0 complex tv2 = 0 complex tv3 = 0 complex tv4 = 0 complex seed = @txtr_SFBM_seed rotAngleFBM = exp(1i*pi/180*@txtr_SFBM_rot) if (@txtr_SFBM_scaledis == 4) ; min textureSFBM = 1e20 elseif (@txtr_SFBM_scaledis == 5) ; max textureSFBM = -1e20 endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; complex zSFBM = _zz zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale if (@txtr_SFBM_size != 0 && @txtr_SFBM_size != 1) zSFBM = zSFBM/@txtr_SFBM_size endif if (@reachThrough) _zz = zSFBM endif int iter3 = 0 complex ttmp = 0 while (iter3 < @txtr_SFBM_octaves) scale = @txtr_SFBM_magn^iter3 zSFBM = zSFBM*rotAngleFBM iter3 = iter3 + 1 if @txtr_SFBM_mod == 1 mod = sqrt(iter3) endif zc = round(scale*zSFBM)/scale zc1 = zc + (.5,.5)/scale zc2 = zc + (-.5,.5)/scale zc3 = zc + (.5,-.5)/scale zc4 = zc + (-.5,-.5)/scale ttmp = seed/(mod*zc1+124), cr1 = ttmp-floor(ttmp) ttmp = seed/(mod*zc2+124), cr2 = ttmp-floor(ttmp) ttmp = seed/(mod*zc3+124), cr3 = ttmp-floor(ttmp) ttmp = seed/(mod*zc4+124), cr4 = ttmp-floor(ttmp) if (@txtr_SFBM_mode == 0) tv1 = (zSFBM - zc1)*scale tv2 = (zSFBM - zc2)*scale tv3 = (zSFBM - zc3)*scale tv4 = (zSFBM - zc4)*scale crp1 = real(cr1)*real(tv1) + imag(cr1)*imag(tv1) crp2 = real(cr2)*real(tv2) + imag(cr2)*imag(tv2) crp3 = real(cr3)*real(tv3) + imag(cr3)*imag(tv3) crp4 = real(cr4)*real(tv4) + imag(cr4)*imag(tv4) endif ttmp = zSFBM - zc d1 = real(ttmp)*scale + 0.5 d2 = 1 - d1 d3 = imag(ttmp)*scale + 0.5 d4 = 1 - d3 if (@txtr_SFBM_power != 1) d1 = d1^@txtr_SFBM_power d2 = d2^@txtr_SFBM_power d3 = d3^@txtr_SFBM_power d4 = d4^@txtr_SFBM_power endif if @txtr_SFBM_mode == 0 nindex = 10 + crp1*d1*d3 + crp3*d1*d4 + crp2*d2*d3 + crp4*d2*d4 elseif @txtr_SFBM_mode == 1 nindex = cabs(cr1*d1*d3 + cr3*d1*d4 + cr2*d2*d3 + cr4*d2*d4) endif if (@txtr_SFBM_scaledis == 0) textureSFBM = textureSFBM + nindex/scale elseif (@txtr_SFBM_scaledis == 1) textureSFBM = textureSFBM + nindex/sqrt(scale) elseif (@txtr_SFBM_scaledis == 2) textureSFBM = textureSFBM + nindex/(scale^(1/scale)) elseif (@txtr_SFBM_scaledis == 3) textureSFBM = textureSFBM + nindex/iter3 elseif (@txtr_SFBM_scaledis == 4) if (nindex < textureSFBM) textureSFBM = nindex endif elseif (@txtr_SFBM_scaledis == 5) if (nindex > textureSFBM) textureSFBM = nindex endif endif endwhile if (@txtr_SFBM_limit != 0) textureSFBM = textureSFBM%@txtr_SFBM_limit endif to_index = to_index + @txtr_SFBM*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale if (@txtr_Primes_size != 0 && @txtr_Primes_size != 1) zPrimes = zPrimes/@txtr_Primes_size endif if (@reachThrough) _zz = zPrimes endif float texturePrimes = 0 float trz = 0 float tiz = 0 float t_rz = 0 float t_iz = 0 float tstartSnip = 10^@txtr_primes_where2start float tendOfSnip = 10^(@txtr_primes_where2start+@txtr_primes_lengthOfSnip) if (@txtr_primes_mode == 0) trz = |real(zPrimes)| tiz = |imag(zPrimes)| elseif (@txtr_primes_mode == 1) trz = |real(zPrimes)| tiz = trz elseif (@txtr_primes_mode == 2) tiz = |imag(zPrimes)| trz = tiz elseif (@txtr_primes_mode == 3) trz = |zPrimes| tiz = trz elseif (@txtr_primes_mode == 4) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = trz elseif (@txtr_primes_mode == 5) trz = real(atan(zPrimes)) if (trz < 0) trz = trz + 2*#pi endif tiz = imag(atan(zPrimes)) if (tiz < 0) tiz = tiz + 2*#pi endif elseif (@txtr_primes_mode == 6) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = |zPrimes| endif t_rz = (trz - trunc(trz*tstartSnip)/tstartSnip)*tendOfSnip t_iz = (tiz - trunc(tiz*tstartSnip)/tstartSnip)*tendOfSnip if (@txtr_primes_withFinalTrunc) t_rz = trunc(t_rz) t_iz = trunc(t_iz) endif texturePrimes = 10*((t_rz%821) + (t_iz%823))/1644 if (@txtr_Primes_limit != 0) texturePrimes = texturePrimes%@txtr_Primes_limit endif to_index = to_index + @txtr_Primes*texturePrimes endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale if (@txtr_Gauss_size != 0 && @txtr_Gauss_size != 1) zGauss = zGauss/@txtr_Gauss_size endif if (@reachThrough) _zz = zGauss endif float textureGauss = 0 float t_d = cabs(zGauss) float t_r = real(zGauss) float t_i = imag(zGauss) if (@txtr_Gauss_type == 0) textureGauss = t_d elseif (@txtr_Gauss_type == 1) textureGauss = |t_r| elseif (@txtr_Gauss_type == 2) textureGauss = |t_i| elseif (@txtr_Gauss_type == 3) textureGauss = |t_i-t_r| elseif (@txtr_Gauss_type == 4) textureGauss = |t_i*t_r| elseif (@txtr_Gauss_type == 5) textureGauss = |t_i/t_r| elseif (@txtr_Gauss_type == 6) if (|t_i| < |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 7) if (|t_i| > |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 8) textureGauss = atan2(zGauss)/(2*#pi) if textureGauss < 0 textureGauss = textureGauss + 1 endif elseif (@txtr_Gauss_type == 9) textureGauss = (|t_i|+|t_r|+t_d)/3 elseif (@txtr_Gauss_type == 10) textureGauss = (|t_i|*|t_r|*t_d)^(1/3) endif if (@txtr_Gauss_limit != 0) textureGauss = textureGauss%@txtr_Gauss_limit endif to_index = to_index + @txtr_Gauss*textureGauss endif #index = to_index endif ; no_mask else if (@spareMask) #solid = true endif endif ; no_spare default: title = "M Stars and Stripes #2" param _mode caption = "Dist. Mode" enum = "Min" "Max" "Sum" "Last" "Trap" endparam param _trap_min caption = "Lower Border for Trap" default = 1.0 min = 0.0 hint = "Only usefull with Traps" endparam param _trap_max caption = "Upper Border for Trap" default = 2.0 min = 0.0 hint = "Only usefull with Traps" endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,0.0) endparam param colour_limit caption = "Colour Limitation" default = 0.0 min = 0.0 max = 400.0 endparam param teilung caption = "Partitioning" default = 128 endparam param init_z caption = "Z Initialisation" enum = "Always New" \ "Sum Up" "W-Sum Up" "W^2-Sum Up" \ "Summm" "Pixel" "Mixel" default = 1 endparam param turnMode caption = "L: Turnaround Mode" default = false endparam param turnScale caption = "L: Turn Scale" default = 1.0 min = 0.0 endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param base4txtr caption = "Texture Base" enum = "Z" "Pixel" "Mixel" "Diff(Z,Pixel)" "Dist(Z,Pixel)" default = 0 endparam param reachThrough caption = "T: Reach Through Scales" default = false hint = "Reaches the Scale and Pattern Size from one \ Texture to the next. Every Texture changes all \ that follow." endparam param txtr_gnarl caption = "T: Gnarl Texture" hint = "This adds a Gnarl texture the the coloring." default = 0.0 endparam param txtr_gnarl_type caption = "T: Gnarl Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_gnarl_scale caption = "T: Gnarl Scale" hint = "Scaling Factor for this Gnarl texture." default = 1.0 endparam param txtr_gnarl_size caption = "T: Gnarl Pattern Size" default = 1.0 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_gnarl_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param txtr_PopCorn_type caption = "T: PopCorn Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_PopCorn_scale caption = "T: PopCorn Scale" hint = "Scaling Factor for this PopCorn texture." default = 1.0 endparam param txtr_PopCorn_size caption = "T: PopCorn Pattern Size" default = 1.0 endparam param txtr_PopCorn_limit caption = "T: PopCorn Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn_octaves caption = "T: PopCorn Octaves" default = 5 min = 1 endparam param txtr_SFBM caption = "T: SFBM Texture" hint = "This adds a SFBM texture to the coloring." default = 0.0 endparam param txtr_SFBM_mode caption = "T: SFBM Noise type" default = 1 enum = "Perlin's" "Raw... (Sam's)" endparam param txtr_SFBM_scale caption = "T: SFBM Scale" hint = "Scaling Factor for this SFBM texture." default = 1.0 endparam param txtr_SFBM_scaledis caption = "T: SFBM Scale Distribution" default = 0 enum = "1/scale" "1/sqrt(scale)" "Fancy" "1/i" endparam param txtr_SFBM_size caption = "T: SFBM Pattern Size" default = 0.1 endparam param txtr_SFBM_magn caption = "T: SFBM Magnification Step" default = 1.2 endparam param txtr_SFBM_limit caption = "T: SFBM Limitation" default = 0.0 min = 0.0 endparam param txtr_SFBM_rot caption = "T: SFBM Rotation Step" default = 28.0 endparam param txtr_SFBM_power caption = "T: SFBM Power" default = 1.0 endparam param txtr_SFBM_mod caption = "Vary Random Numbers?" default = 1 enum = "No" "Use sqrt(i)" endparam param txtr_SFBM_seed caption = "T: SFBM Seed" default = 123094 endparam param txtr_SFBM_octaves caption = "T: SFBM Octaves" default = 5 min = 1 endparam param txtr_Primes caption = "T: Primes Texture" hint = "This adds a Primes texture to the coloring." default = 0.0 endparam param txtr_Primes_scale caption = "T: Primes Scale" hint = "Scaling Factor for this Primes texture." default = 1.0 endparam param txtr_Primes_size caption = "T: Primes Pattern Size" default = 0.5 endparam param txtr_primes_withFinalTrunc caption = "With Final Truncation" default = TRUE endparam param txtr_primes_where2start caption = "T: Start of Snip" default = 1 min = 0 endparam param txtr_primes_lengthOfSnip caption = "T: Length of Snip" default = 1 min = 1 endparam param txtr_primes_Mode caption = "T: Primes Mode" enum = "Real,Imag" "Real" "Imag" "|z|" "Angle" "Angel" "Polar" default = 5 endparam param txtr_primes_limit caption = "T: Primes Limitation" default = 0.0 min = 0.0 endparam param txtr_Gauss caption = "T: Gauss Texture" hint = "This adds a Gauss texture to the coloring." default = 0.0 endparam param txtr_Gauss_type caption = "T: Gauss Type" enum = "d" "x" "y" "x-y" "x*y" "y/x" "min x,y" "max x,y" "Angle" \ "Pyth. am" "Pyth. gm" default = 0 endparam param txtr_Gauss_scale caption = "T: Gauss Scale" hint = "Scaling Factor for this Gauss texture." default = 1.0 endparam param txtr_Gauss_size caption = "T: Gauss Pattern Size" default = 1.0 endparam param txtr_Gauss_limit caption = "T: Gauss Limitation" default = 0.0 min = 0.0 endparam param masking caption = "Masking" enum = "None" "Lower" "Upper" "Between" "Outside" default = 0 endparam param maskType caption = "Mask Type" enum = "Index" "Re z" "Im z" "Angle" "Iteration" \ "Re Mixel" "Im Mixel" "Abs Mixel" \ "Dist(z,Pixel)" "|z|" default = 0 endparam param threshold_l caption = "Lower Mask Threshold" default = 0.5 endparam param threshold_u caption = "Upper Mask Threshold" default = 1.0 endparam param spareMode caption = "Cut Out" enum = "None" "Upper" "Lower" \ "Left" "Right" \ "Upper + Left" "Upper + Right" "Lower + Left" "Lower + Right" \ "Upper & Left" "Upper & Right" "Lower & Left" "Lower & Right" \ "Inside Rectangle" "Outside Rectangle" \ "Between Vertical" "Outside Vertical" \ "Between Horizontal" "Outside Horizontal" \ "Inside Circle" "Outside Circle" default = 0 endparam param sparePoint caption = "Line of Cut, 1. Point" default = (0,0) endparam param sparePoint2 caption = "Add. Point/Line for Cut" default = (1,1) endparam param spareRot caption = "Rotate Cut" default = 0.0 min = -90.0 max = 90.0 endparam param spareMask caption = "Mask Cut" default = true endparam func teilFkt caption = "Partitioning Function" default = sin() endfunc func startFct caption = "Start Function" default = ident() endfunc func fkt caption = "Additional Function" default = ident() hint = "Last Transfer to Index" endfunc } ; stars_and_stripes2 emp+akl-twangle-loop2 { ; Original UCL: ; Edward M. Perry ; ; Version from where the tweak started: ; ; V 1.0 2000-04-15 ; (c) 2000 Edward M. Perry ; http://www.crosswinds.net/~yafp ; ; Thank you for your kind permission ; to tweak the twangle. ; And thank you for the fresh ideas ; you brought to the UF world. ; ; Andreas K. Lober: ; Added *something* out of my toolbox ; Version: M20, 2000-07-29 ; ; Andreas Lober, July 30, 2000 ; init: bool no_spare = true if (@spareMode > 0) float spareVert = real(@sparePoint) float spareHori = imag(@sparePoint) complex pixpix = #pixel float rePix = 0 float imPix = 0 if (@spareMode <= 18) if (@spareRot%360 != 0) complex rotCentre = @sparePoint if (@spareMode > 12 && @spareMode < 19) rotCentre = (@sparePoint+@sparePoint2)/2 endif pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@spareRot/180) + rotCentre endif rePix = real(pixpix) imPix = imag(pixpix) endif if (@spareMode <= 12) if (@spareMode == 1 || @spareMode == 5 || @spareMode == 6 \ || @spareMode == 9 || @spareMode == 10) ; upper upper+right upper+left ; upper&right upper&left if (imPix >= spareHori) if (@spareMode == 9) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 10) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif elseif (@spareMode == 2 || @spareMode == 7 || @spareMode == 8 \ || @spareMode == 11 || @spareMode == 12) ; lower lower+right lower+left ; lower&right lower&left if (imPix < spareHori) if (@spareMode == 11) if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 12) if (rePix >= spareVert) no_spare = false endif else no_spare = false endif endif endif if (@spareMode == 3 || @spareMode == 5 || @spareMode == 7) ; left upper+left lower+left if (rePix < spareVert) no_spare = false endif elseif (@spareMode == 4 || @spareMode == 6 || @spareMode == 8) ; right upper+right lower+right if (rePix >= spareVert) no_spare = false endif endif elseif (@spareMode <= 18) float rePnt = real(@sparePoint2) float imPnt = imag(@sparePoint2) float upper = imPnt float lower = spareHori float left = spareVert float right = rePnt if (imPnt < spareHori) upper = spareHori lower = imPnt endif if (spareVert > rePnt) left = rePnt right = spareVert endif if (@spareMode == 13) ; inside rect if (rePix > left && rePix < right && imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 14) ; outside rect if (rePix < left || rePix > right || imPix < lower || imPix > upper) no_spare = false endif elseif (@spareMode == 15) ; inside vert if (rePix > left && rePix < right) no_spare = false endif elseif (@spareMode == 16) ; outside vert if (rePix < left || rePix > right) no_spare = false endif elseif (@spareMode == 17) ; inside hori if (imPix > lower && imPix < upper) no_spare = false endif elseif (@spareMode == 18) ; outside hori if (imPix < lower || imPix > upper) no_spare = false endif endif elseif (@spareMode <= 20) float radiusOFCutCircle = cabs(@sparePoint-@sparePoint2) if (@spareMode == 19) ; inside circle if (cabs(#pixel-@sparePoint) < radiusOFCutCircle) no_spare = false endif elseif (@spareMode == 20) ; outside circle if (cabs(#pixel-@sparePoint) > radiusOFCutCircle) no_spare = false endif endif endif ; spareMode > 12 endif ; @spareMode > 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; for EMP float RAD = 180.0 / #pi ;float twoPie = 2*#pi complex y = (0,0) complex z = (0,0) float ang = 0.0 float c0 = 0.0 float c1 = 0.0 float d = 0.0 ; for AKL complex zStart = 0 float r = 0 int fixit_cby = 0 int fixit_idx = 0 if (@fixit == 0) ; cBy=Last=0 Idx=Last=0 fixit_cby = 0 fixit_idx = 0 elseif (@fixit == 1) ; cBy=Last=0 Idx=Maxi=1 fixit_cby = 0 fixit_idx = 1 elseif (@fixit == 2) ; cBy=Maxi=1 Idx=Last=0 fixit_cby = 1 fixit_idx = 0 endif float c0_fix = 0 float c1_fix = 0 float rfix = 0 float rtrap = 0 if (fixit_cby == 1) ; Maximum c0_fix = -1.0e20 c1_fix = -1.0e20 endif if (fixit_idx == 1) ; Minimum rfix = -1.0e100 endif complex y_fix = 0 complex z_fix = 0 complex zfix = (0.0,0.0) complex cfix = (0.0,0.0) complex ztrap = (0.0,0.0) complex ctrap = (0.0,0.0) int iter = 0 float ifix = 0 float itrap = 0 int l_coord = @coordLoop int koord = @coord bool do_loop = TRUE bool no_trap = TRUE float testAngle1 = #pi/@corte1 float testAngle2 = 3*testAngle1 complex rotAngle1 = @corte2*1i*testAngle1 complex rotAngle2 = @corte2*1i*testAngle2 loop: if (no_spare) iter = iter + 1 if (no_trap) if (@skipMode > 0) if (@skipMode == 1) ; skip first n if (iter > @skipConst) do_loop = TRUE else do_loop = FALSE endif elseif (@skipMode == 2) ; skip after n if (iter > @skipConst) do_loop = FALSE else do_loop = TRUE endif elseif (@skipMode == 3) ; skip every nth if (iter%@skipConst == 0) do_loop = FALSE else do_loop = TRUE endif elseif (@skipMode == 4) ; skip but the nth if (iter%@skipConst == 0) do_loop = TRUE else do_loop = FALSE endif endif endif ; skipMode > 0 else do_loop = FALSE endif ; no_trap if (do_loop) ;zStart = #z if (@init_z == 0) zStart = #z elseif (@init_z == 1) zStart = zStart + #z elseif (@init_z == 2) zStart = zStart + #z/iter elseif (@init_z == 3) zStart = zStart + #z/iter^2 elseif (@init_z == 4) zStart = zStart + #z + #pixel elseif (@init_z == 5) zStart = abs(#pixel - #z) elseif (@init_z == 6) zStart = (#pixel + #z)/2 endif; int loop_i = 0 while (loop_i < l_coord) loop_i = loop_i + 1 if (@coordMode == 1) ; cyclic koord = (koord+1)%19 endif if (koord == 1) zStart = cabs(zStart) + 1i*atan2(zStart) elseif (koord == 2) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(sinh(phi) + 1i*cosh(phi)) elseif (koord == 3) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asin(phi) + 1i*acos(phi)) elseif (koord == 4) float rad = cabs(zStart) float phi = atan2(zStart) zStart = rad*(asinh(phi) + 1i*acosh(phi)) elseif (koord == 5) zStart = real(sin(zStart)) + 1i*cos(zStart) elseif (koord == 6) zStart = real(sinh(zStart)) + 1i*cosh(zStart) elseif (koord == 7) zStart = real(asin(zStart)) + 1i*acos(zStart) elseif (koord == 8) zStart = real(asinh(zStart)) + 1i*acosh(zStart) elseif (koord == 9) zStart = abs(zStart) + conj(zStart)/(|zStart|+1e-20) elseif (koord >= 10 && koord <= 19) if (zStart != 0) float rad = cabs(zStart) float re = real(zStart)/rad float im = imag(zStart)/rad if (koord == 10) zStart = re*zStart + im*conj(zStart) elseif (koord == 11) zStart = re*zStart + im*flip(zStart) elseif (koord == 12) zStart = re*sin(zStart) + im*cos(zStart) elseif (koord == 13) zStart = re*sin(zStart) + 1i*im*cos(zStart) elseif (koord == 14) zStart = re*asin(zStart) + im*acos(zStart) elseif (koord == 15) zStart = re*asin(zStart) + 1i*im*acos(zStart) elseif (koord == 16) zStart = re*sinh(zStart) + im*cosh(zStart) elseif (koord == 17) zStart = re*sinh(zStart) + 1i*im*cosh(zStart) elseif (koord == 18) zStart = re*asinh(zStart) + im*acosh(zStart) elseif (koord == 19) zStart = re*asinh(zStart) + 1i*im*acosh(zStart) endif endif endif endwhile ; Schleife über die Koordinaten zStart = @startFct(zStart) if (@l_randomness != 0) zStart = zStart + @l_randomness * #random endif ; ; Start with the lattices ; if (@lattice == 1) zStart = round(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zStart) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zStart) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 8) zStart = floor(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 10) zStart = abs(@lattFac1*zStart) \ - @lattFac2*sqrt(real(zStart)*imag(zStart)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*zStart)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*zStart^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zStart) \ - @lattFac1*sqrt(real(zStart)*imag(zStart)))^2) \ - @lattFac2*zStart^2 elseif (@lattice >= 21 && @lattice <= 23) float reL1 = real(@lattFac1) float imL1 = imag(@lattFac1) float reL2 = real(@lattFac2) float imL2 = imag(@lattFac2) float reZ = reL1*real(zStart) float imZ = imL1*imag(zStart) if (reL2 != 0) reZ = reZ%reL2 endif if (imL2 != 0) imZ = imZ%imL2 endif if (@lattice == 21) zStart = reZ + 1i*imZ elseif (@lattice == 22) zStart = reZ/@lattFac1 + 1i*imZ/@lattFac2 elseif (@lattice == 23) zStart = @lattFac1/reZ + 1i*@lattFac2/imZ endif endif if (@turnMode) complex zRound = 0 complex zZ = zStart if (@turnScale != 0) complex zRound = round(zStart*@turnScale)/@turnScale complex zZ = zStart-zRound endif float targ = atan2(zZ) ; "Turn around" part taken from Sam if (abs(targ) < testAngle1) zStart = zZ*exp(rotAngle1)+zRound elseif (abs(targ) > testAngle2) zStart = zZ*exp(rotAngle2)+zRound endif endif ; @turnMode ; AKL -> EMP z = zStart ; EMP y = @amul * y z = @imul * z if (@prec == true) z = recip(z) y = recip(y) endif if (@meth == 0) y = @that(y) z = @this(z) else y = @this(y) z = @this(z) y = @that(y) z = @that(z) endif ang = atan2(y - z) * RAD ; ori d = abs(ang - @ang0) if (d > 180) d = 360 - d endif if (d < @widt) c0 = c0 + (@widt - d) endif d = abs(ang - (@ang0+@ang1)) if (d > 180) d = 360 - d endif if (d < @widt) c1 = c1 + (@widt - d) endif ; AKL if (fixit_cby == 0) ; Last c0_fix = c0 c1_fix = c1 y_fix = abs(y) z_fix = abs(z) elseif (fixit_cby == 1) ; Maximum if (c0 > c0_fix && c1 > c1_fix) ifix = iter endif if (c0 > c0_fix) c0_fix = c0 y_fix = abs(y) ifix = iter endif if (c1 > c1_fix) c1_fix = c1 z_fix = abs(z) ifix = iter endif endif float rz = |real(y_fix - z_fix)| float iz = |imag(y_fix - z_fix)| complex p = y if (@watch == 0) ; Twangle -> from EMP if (c0_fix < c1_fix && c1_fix != 0) r = c0_fix / c1_fix elseif (c1_fix < c0_fix && c0_fix != 0) r = c1_fix / c0_fix else r = (c1_fix+c0_fix)/2 endif elseif (@watch == 1) ; Twongle float yabs = |y_fix| float zabs = |z_fix| if (yabs < zabs) r = yabs/zabs + ifix; (zabs+ifix) else r = zabs/yabs + ifix; (yabs+ifix) endif elseif (@watch == 2) ; Twingle r = |y_fix - z_fix| elseif (@watch == 3) ; Twungle float yabs = |y_fix - z_fix| float zabs = abs(|y_fix|-|z_fix|) if (yabs < zabs) r = yabs/zabs + ifix; (zabs+ifix) else r = zabs/yabs + ifix; (yabs+ifix) endif elseif (@watch == 4) ; min (r,i) if (rziz) r = rz else r = iz endif elseif (@watch == 6) ; MinQuot if (rz < iz && iz != 0) r = rz/iz elseif (rz > iz && rz != 0) r = iz/rz else r = (iz+rz)/2 endif elseif (@watch == 7) ; MaxQuot if (rz > iz && iz != 0) r = rz/iz elseif (rz < iz && rz != 0) r = iz/rz else r = (iz+rz)/2 endif elseif (@watch == 8) ; Diff2 r = |p| elseif (@watch >= 9 && @watch <= 17) ; Astro... float ang = atan(rz/iz) complex zwatch = 0 if (@watch == 9) ; Astro01 zwatch = z elseif (@watch == 10) ; Astro02 zwatch = zStart elseif (@watch == 11) ; Astro03 zwatch = #pixel elseif (@watch == 12) ; Astro12 zwatch = z-zStart elseif (@watch == 13) ; Astro21 zwatch = zStart-z elseif (@watch == 14) ; Astro31 zwatch = #pixel-z elseif (@watch == 15) ; Astro13 zwatch = z-#pixel elseif (@watch == 16) ; Astro32 zwatch = #pixel-zStart elseif (@watch == 17) ; Astro23 zwatch = zStart-#pixel endif r = |zwatch - cos(ang)^3 + 1i*sin(ang)^3| elseif (@watch == 18) ; Re+Im r = rz+iz elseif (@watch == 19) ; Re*Im r = rz*iz endif if (r < 0) r = r + 1 endif if (fixit_idx == 0) ; Last rfix = r zfix = z cfix = y elseif (fixit_idx == 1) ; Maximum if (r > rfix) rfix = r zfix = z cfix = y endif endif ; ; Old Z has to be determined ; if (@whatIsOld == 0) y = z elseif (@whatIsOld == 1) y = zStart elseif (@whatIsOld == 2) y = #z elseif (@whatIsOld == 3) y = #pixel endif y = @oldFct(y) if (@joukOldZ != 0 && y != 0) y = y + @joukOldZ/y endif if (@trapMode > 0) if (@trapMode == 1) if (rfix > @lowerTrap && rfix < @upperTrap) no_trap = FALSE do_loop = FALSE endif elseif (@trapMode == 2) if (cabs(zStart) > @lowerTrap && cabs(zStart) < @upperTrap) no_trap = FALSE do_loop = FALSE endif elseif (@trapMode == 3) if (real(zStart) > @lowerTrap && real(zStart) < @upperTrap) no_trap = FALSE do_loop = FALSE endif elseif (@trapMode == 4) if (imag(zStart) > @lowerTrap && imag(zStart) < @upperTrap) no_trap = FALSE do_loop = FALSE endif elseif (@trapMode == 5) if (|real(zStart)| > @lowerTrap && |real(zStart)| < @upperTrap) no_trap = FALSE do_loop = FALSE endif elseif (@trapMode == 6) if (|imag(zStart)| > @lowerTrap && |imag(zStart)| < @upperTrap) no_trap = FALSE do_loop = FALSE endif endif ; At last trap the values if !do_loop rtrap = r itrap = iter ztrap = zStart ctrap = p endif endif endif ; do_loop endif ; no_spare final: if (no_spare) float temp = 0 if (@colorby == 0) ; Minimum Distance temp = rfix elseif (@colorby == 1) ; Iteration@Fix temp = 0.01*ifix + |atan(zfix)|/(2*#pi) elseif (@colorby >= 2 && @colorby <= 16) ; Angle@Fix / Angle@Calc ; Angel@Fix / Angel@Calc ; Real+@Fix / Real+@Calc ; Imag+@Fix / Imag+@Calc ; RaTan@Fix / RaTan@Calc ; IaTan@Fix / IaTan@Calc if (@colorby == 2) temp = atan2(zfix) elseif (@colorby == 3) temp = atan2(zfix-cfix*ifix)*ifix elseif (@colorby == 4) temp = |atan(zfix)| elseif (@colorby == 5) temp = |atan(zfix-cfix*ifix)|*ifix elseif (@colorby == 6) temp = real(zfix)*|atan(zfix)| elseif (@colorby == 7) temp = real(zfix-cfix*ifix)*ifix elseif (@colorby == 8) temp = imag(zfix)*|atan(zfix)| elseif (@colorby == 9) temp = imag(zfix-cfix*ifix)*ifix elseif (@colorby == 10) temp = real(zfix)*atan2(zfix) + |atan(zfix)| elseif (@colorby == 11) temp = (real(zfix-cfix*ifix)*atan2(zfix-cfix*ifix) + \ |atan(zfix-cfix*ifix)|)*ifix elseif (@colorby == 12) temp = imag(zfix)*atan2(zfix) + |atan(zfix)| elseif (@colorby == 13) temp = (imag(zfix-cfix*ifix)*atan2(zfix-cfix*ifix) + \ |atan(zfix-cfix*ifix)|)*ifix elseif (@colorby == 14) ; temp = atan2(real(zfix-cfix*ifix)^imag(zfix-cfix*ifix)) elseif (@colorby == 15) ; temp = atan2(imag(zfix-cfix*ifix)^real(zfix-cfix*ifix)) elseif (@colorby == 16) temp = atan2(zfix-cfix) endif temp = temp/(2*#pi) if (temp < 0) temp = temp + 1.0 endif elseif (@colorby == 17) ; Trapped Distance temp = rtrap elseif (@colorby == 18) ; Iteration@Trap temp = 0.01*itrap + |atan(ztrap)|/(2*#pi) elseif (@colorby >= 19 && @colorby <= 22) if (@colorby == 19) temp = atan2(ztrap) elseif (@colorby == 20) temp = atan2(ztrap-ctrap*itrap)*itrap elseif (@colorby == 21) temp = |atan(ztrap)| elseif (@colorby == 22) temp = |atan(ztrap-ctrap*itrap)|*itrap endif temp = temp/(2*#pi) if (temp < 0) temp = temp + 1.0 endif endif ; list of colorby's ;if (@nexp != 1) ; temp = temp^@nexp ;endif float mask = 0 bool no_mask = true if (@masking > 0) if (@maskType == 0) ; Index mask = temp elseif (@maskType == 1) ; Re z mask = real(zStart) elseif (@maskType == 2) ; Im z mask = imag(zStart) elseif (@maskType == 3) ; Angle mask = atan2(zStart)/(2*#pi) if mask < 0 mask = mask + 1 endif mask = mask*360 elseif (@maskType == 4) ; Iteration mask = iter elseif (@maskType == 5) ; Re Mixel mask = real(zStart+#pixel)/2 elseif (@maskType == 6) ; Im Mixel mask = imag(zStart+#pixel)/2 elseif (@maskType == 7) ; Abs Mixel mask = cabs(zStart+#pixel)/2 elseif (@maskType == 8) ; Dist(z,Pixel) mask = cabs(zStart-#pixel) elseif (@maskType == 9) ; |z| mask = cabs(zStart) endif endif if (@masking == 1) ; Lower if (mask < @threshold_l) #solid = true no_mask = false endif elseif (@masking == 2) ; Upper if (mask > @threshold_u) #solid = true no_mask = false endif elseif (@masking == 3) ; Between if (mask > @threshold_l && mask < @threshold_u) #solid = true no_mask = false endif elseif (@masking == 4) ; Outside if (mask < @threshold_l || mask > @threshold_u) #solid = true no_mask = false endif else no_mask = true endif if (no_mask) float to_index = real(@fkt(temp)) complex _zz = zStart if (@base4txtr == 1) _zz = #pixel elseif (@base4txtr == 2) _zz = (#pixel+_zz)/2 elseif (@base4txtr == 3) _zz = abs(#pixel-_zz) elseif (@base4txtr == 4) _zz = cabs(#pixel-_zz) endif if (@colour_limit != 0) to_index = to_index%@colour_limit endif if (@f_randomness != 0) to_index = to_index + @f_randomness * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz zGnarl = zGnarl-trunc(zGnarl*@txtr_gnarl_scale)/@txtr_gnarl_scale if (@txtr_gnarl_size != 0 && @txtr_gnarl_size != 1) zGnarl = zGnarl/@txtr_gnarl_size endif if (@reachThrough) _zz = zGnarl endif float tx = real(zGnarl) float ty = imag(zGnarl) float txOld = 0 int iter3 = @txtr_gnarl_octaves while (iter3 > 0) iter3 = iter3-1 txOld = tx tx = tx - sin(ty + sin(ty)) ty = ty - sin(txOld + sin(txOld)) endwhile float textureGnarl = 0 if (@txtr_gnarl_type == 0) textureGnarl = abs(tx) elseif (@txtr_gnarl_type == 1) textureGnarl = abs(tx)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 2) textureGnarl = abs(tx-ty) elseif (@txtr_gnarl_type == 3) textureGnarl = abs(tx-ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 4) textureGnarl = abs(tx+ty)/2 elseif (@txtr_gnarl_type == 5) textureGnarl = abs(tx*ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_gnarl_type == 6) textureGnarl = atan2(tx+1i*ty)/(2*#pi) if (textureGnarl < 0) textureGnarl = textureGnarl + 1 endif elseif (@txtr_gnarl_type == 7) textureGnarl = sqrt(tx^2+ty^2) endif if (@txtr_Gnarl_limit != 0) textureGnarl = textureGnarl%@txtr_Gnarl_limit endif to_index = to_index + @txtr_gnarl*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale if (@txtr_PopCorn_size != 0 && @txtr_PopCorn_size != 1) zPopCorn = zPopCorn/@txtr_PopCorn_size endif if (@reachThrough) _zz = zPopCorn endif float tx = real(zPopCorn) float ty = imag(zPopCorn) float txOld = 0 int iter3 = @txtr_PopCorn_octaves while (iter3 > 0) iter3 = iter3-1 txOld = tx tx = tx - sin(ty + log(ty + cos(ty))) ty = ty - sin(txOld + log(txOld + cos(txOld))) endwhile float texturePopCorn = 0 if (@txtr_PopCorn_type == 0) texturePopCorn = abs(tx) elseif (@txtr_PopCorn_type == 1) texturePopCorn = abs(tx)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 2) texturePopCorn = abs(tx-ty) elseif (@txtr_PopCorn_type == 3) texturePopCorn = abs(tx-ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 4) texturePopCorn = abs(tx+ty)/2 elseif (@txtr_PopCorn_type == 5) texturePopCorn = abs(tx*ty)/(sqrt(tx^2+ty^2)+1e-20) elseif (@txtr_PopCorn_type == 6) texturePopCorn = atan2(tx+1i*ty)/(2*#pi) if (texturePopCorn < 0) texturePopCorn = texturePopCorn + 1 endif elseif (@txtr_PopCorn_type == 7) texturePopCorn = sqrt(tx^2+ty^2) endif if (@txtr_PopCorn_limit != 0) texturePopCorn = texturePopCorn%@txtr_PopCorn_limit endif to_index = to_index + @txtr_PopCorn*texturePopCorn endif if (@txtr_SFBM != 0) float mod = 1 float d1 = 0 float d2 = 0 float d3 = 0 float d4 = 0 float nindex = 0 float textureSFBM = 0 float scale = 0 cr1 = 0 cr2 = 0 cr3 = 0 cr4 = 0 float crp1 = 0 float crp2 = 0 float crp3 = 0 float crp4 = 0 complex tv1 = 0 complex tv2 = 0 complex tv3 = 0 complex tv4 = 0 complex seed = @txtr_SFBM_seed rotAngleFBM = exp(1i*pi/180*@txtr_SFBM_rot) if (@txtr_SFBM_scaledis == 4) ; min textureSFBM = 1e20 elseif (@txtr_SFBM_scaledis == 5) ; max textureSFBM = -1e20 endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; complex zSFBM = _zz zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale if (@txtr_SFBM_size != 0 && @txtr_SFBM_size != 1) zSFBM = zSFBM/@txtr_SFBM_size endif if (@reachThrough) _zz = zSFBM endif int iter3 = 0 complex ttmp = 0 while (iter3 < @txtr_SFBM_octaves) scale = @txtr_SFBM_magn^iter3 zSFBM = zSFBM*rotAngleFBM iter3 = iter3 + 1 if @txtr_SFBM_mod == 1 mod = sqrt(iter3) endif zc = round(scale*zSFBM)/scale zc1 = zc + (.5,.5)/scale zc2 = zc + (-.5,.5)/scale zc3 = zc + (.5,-.5)/scale zc4 = zc + (-.5,-.5)/scale ttmp = seed/(mod*zc1+124), cr1 = ttmp-floor(ttmp) ttmp = seed/(mod*zc2+124), cr2 = ttmp-floor(ttmp) ttmp = seed/(mod*zc3+124), cr3 = ttmp-floor(ttmp) ttmp = seed/(mod*zc4+124), cr4 = ttmp-floor(ttmp) if (@txtr_SFBM_mode == 0) tv1 = (zSFBM - zc1)*scale tv2 = (zSFBM - zc2)*scale tv3 = (zSFBM - zc3)*scale tv4 = (zSFBM - zc4)*scale crp1 = real(cr1)*real(tv1) + imag(cr1)*imag(tv1) crp2 = real(cr2)*real(tv2) + imag(cr2)*imag(tv2) crp3 = real(cr3)*real(tv3) + imag(cr3)*imag(tv3) crp4 = real(cr4)*real(tv4) + imag(cr4)*imag(tv4) endif ttmp = zSFBM - zc d1 = real(ttmp)*scale + 0.5 d2 = 1 - d1 d3 = imag(ttmp)*scale + 0.5 d4 = 1 - d3 if (@txtr_SFBM_power != 1) d1 = d1^@txtr_SFBM_power d2 = d2^@txtr_SFBM_power d3 = d3^@txtr_SFBM_power d4 = d4^@txtr_SFBM_power endif if @txtr_SFBM_mode == 0 nindex = 10 + crp1*d1*d3 + crp3*d1*d4 + crp2*d2*d3 + crp4*d2*d4 elseif @txtr_SFBM_mode == 1 nindex = cabs(cr1*d1*d3 + cr3*d1*d4 + cr2*d2*d3 + cr4*d2*d4) endif if (@txtr_SFBM_scaledis == 0) textureSFBM = textureSFBM + nindex/scale elseif (@txtr_SFBM_scaledis == 1) textureSFBM = textureSFBM + nindex/sqrt(scale) elseif (@txtr_SFBM_scaledis == 2) textureSFBM = textureSFBM + nindex/(scale^(1/scale)) elseif (@txtr_SFBM_scaledis == 3) textureSFBM = textureSFBM + nindex/iter3 elseif (@txtr_SFBM_scaledis == 4) if (nindex < textureSFBM) textureSFBM = nindex endif elseif (@txtr_SFBM_scaledis == 5) if (nindex > textureSFBM) textureSFBM = nindex endif endif endwhile if (@txtr_SFBM_limit != 0) textureSFBM = textureSFBM%@txtr_SFBM_limit endif to_index = to_index + @txtr_SFBM*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale if (@txtr_Primes_size != 0 && @txtr_Primes_size != 1) zPrimes = zPrimes/@txtr_Primes_size endif if (@reachThrough) _zz = zPrimes endif float texturePrimes = 0 float trz = 0 float tiz = 0 float t_rz = 0 float t_iz = 0 float tstartSnip = 10^@txtr_primes_where2start float tendOfSnip = 10^(@txtr_primes_where2start+@txtr_primes_lengthOfSnip) if (@txtr_primes_mode == 0) trz = |real(zPrimes)| tiz = |imag(zPrimes)| elseif (@txtr_primes_mode == 1) trz = |real(zPrimes)| tiz = trz elseif (@txtr_primes_mode == 2) tiz = |imag(zPrimes)| trz = tiz elseif (@txtr_primes_mode == 3) trz = |zPrimes| tiz = trz elseif (@txtr_primes_mode == 4) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = trz elseif (@txtr_primes_mode == 5) trz = real(atan(zPrimes)) if (trz < 0) trz = trz + 2*#pi endif tiz = imag(atan(zPrimes)) if (tiz < 0) tiz = tiz + 2*#pi endif elseif (@txtr_primes_mode == 6) trz = atan2(zPrimes) if (trz < 0) trz = trz + 2*#pi endif tiz = |zPrimes| endif t_rz = (trz - trunc(trz*tstartSnip)/tstartSnip)*tendOfSnip t_iz = (tiz - trunc(tiz*tstartSnip)/tstartSnip)*tendOfSnip if (@txtr_primes_withFinalTrunc) t_rz = trunc(t_rz) t_iz = trunc(t_iz) endif texturePrimes = 10*((t_rz%821) + (t_iz%823))/1644 if (@txtr_Primes_limit != 0) texturePrimes = texturePrimes%@txtr_Primes_limit endif to_index = to_index + @txtr_Primes*texturePrimes endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale if (@txtr_Gauss_size != 0 && @txtr_Gauss_size != 1) zGauss = zGauss/@txtr_Gauss_size endif if (@reachThrough) _zz = zGauss endif float textureGauss = 0 float t_d = cabs(zGauss) float t_r = real(zGauss) float t_i = imag(zGauss) if (@txtr_Gauss_type == 0) textureGauss = t_d elseif (@txtr_Gauss_type == 1) textureGauss = |t_r| elseif (@txtr_Gauss_type == 2) textureGauss = |t_i| elseif (@txtr_Gauss_type == 3) textureGauss = |t_i-t_r| elseif (@txtr_Gauss_type == 4) textureGauss = |t_i*t_r| elseif (@txtr_Gauss_type == 5) textureGauss = |t_i/t_r| elseif (@txtr_Gauss_type == 6) if (|t_i| < |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 7) if (|t_i| > |t_r|) textureGauss = |t_i| else textureGauss = |t_r| endif elseif (@txtr_Gauss_type == 8) textureGauss = atan2(zGauss)/(2*#pi) if textureGauss < 0 textureGauss = textureGauss + 1 endif elseif (@txtr_Gauss_type == 9) textureGauss = (|t_i|+|t_r|+t_d)/3 elseif (@txtr_Gauss_type == 10) textureGauss = (|t_i|*|t_r|*t_d)^(1/3) endif if (@txtr_Gauss_limit != 0) textureGauss = textureGauss%@txtr_Gauss_limit endif to_index = to_index + @txtr_Gauss*textureGauss endif #index = to_index endif ; no_mask else if (@spareMask) #solid = true endif endif ; no_spare default: title = "M Twangle #2 (Loop Version)" param watch caption = "Watch for Fixit" enum = "Twangle" "Twongle" "Twingle" "Twungle" \ "Min(r,i)" "Max(r,i)" "MinQuot" "MaxQuot" "Diff2" \ "Astro01" "Astro02" "Astro03" "Astro12" "Astro21" \ "Astro31" "Astro13" "Astro32" "Astro23" \ "Re+Im" "Re*Im" default = 0 endparam param fixit caption = "Fixit for Color by" enum = "Last Iter" "Last+Maxi" "Maxi+Last" default = 0 endparam param colorby caption = "Color By ..." enum = "Fiximum Distance" "Iteration@Fix" \ "Angle@Fix" "Angle@Calc" \ "Angel@Fix" "Angel@Calc" \ "Real+@Fix" "Real+@Calc" "Imag+@Fix" "Imag+@Calc" \ "RaTan@Fix" "RaTan@Calc" "IaTan@Fix" "IaTan@Calc" \ "réel^imag" "imag^réel" "Angle to trap" \ "Trapped Distance" "Iteration@Trap" \ "Angle@Trap" "AngleC@Trap" \ "Angel@Trap" "AngelC@Trap" default = 0 endparam param trapMode caption = "Trap Mode" enum = "None" "Distance" "Cabs" "Real" "Imag" "|Real|" "|Imag|" endparam param lowerTrap caption = "Lower Border for Trap" default = 1.0 min = 0.0 hint = "Only usefull with Traps" endparam param upperTrap caption = "Upper Border for Trap" default = 2.0 min = 0.0 hint = "Only usefull with Traps" endparam param skipMode caption = "Skip Mode: Skip..." enum = "None" \ "...first n" "...after n" \ "...every nth" "...but the nth" endparam param skipConst caption = "Skip Constant" default = 3 min = 1 endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param prec caption = "Pre Recip" hint = "Apply Recip First?" default = true endparam param meth caption = "Method" hint = "Method" enum = "Split" "Join" default = 0 hint = "To Apply Fuctions" endparam param widt caption = "Width" hint = "Degrees" default = 15.0 endparam param ang0 caption = "This Angle" hint = "Degrees" default = 0.0 endparam param ang1 caption = "This Angle Offset" hint = "Change This Angle" default = 0.0 endparam param imul caption = "This Multiplier" hint = "This Multiplier" default = (1.0, 0.0) endparam param amul caption = "That Multiplier" hint = "That Multiplier" default = (1.0, 0.0) endparam param whatIsOld caption = "What is old z?" enum = "Twangled z" "Transformed z" "#z" "Pixel" default = 0 endparam param joukOldZ caption = "Joukowskij old z" default = (0.0,0.0) endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" default = 0 endparam param lattFac1 caption = "Lattice Factor 1" default = (1.0,0.0) endparam param lattFac2 caption = "Lattice Factor 2" default = (1.0,1.0) endparam param colour_limit caption = "Colour Limitation" default = 0.0 min = 0.0 max = 400.0 endparam param init_z caption = "Z Initialisation" enum = "Always New" \ "Sum Up" "W-Sum Up" "W^2-Sum Up" \ "Summm" "Pixel" "Mixel" default = 0 endparam param turnMode caption = "L: Turnaround Mode" default = false endparam param turnScale caption = "L: Turn Scale" default = 1.0 min = 0.0 endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param base4txtr caption = "Texture Base" enum = "Z" "Pixel" "Mixel" "Diff(Z,Pixel)" "Dist(Z,Pixel)" default = 0 endparam param reachThrough caption = "T: Reach Through Scales" default = false hint = "Reaches the Scale and Pattern Size from one \ Texture to the next. Every Texture changes all \ that follow." endparam param txtr_gnarl caption = "T: Gnarl Texture" hint = "This adds a Gnarl texture the the coloring." default = 0.0 endparam param txtr_gnarl_type caption = "T: Gnarl Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_gnarl_scale caption = "T: Gnarl Scale" hint = "Scaling Factor for this Gnarl texture." default = 1.0 endparam param txtr_gnarl_size caption = "T: Gnarl Pattern Size" default = 1.0 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_gnarl_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param txtr_PopCorn_type caption = "T: PopCorn Type" enum = "x" "x/d" "x-y" "(x-y)/d" "(x+y)/2" "x*y/d" "Angle" "d" default = 0 endparam param txtr_PopCorn_scale caption = "T: PopCorn Scale" hint = "Scaling Factor for this PopCorn texture." default = 1.0 endparam param txtr_PopCorn_size caption = "T: PopCorn Pattern Size" default = 1.0 endparam param txtr_PopCorn_limit caption = "T: PopCorn Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn_octaves caption = "T: PopCorn Octaves" default = 5 min = 1 endparam param txtr_SFBM caption = "T: SFBM Texture" hint = "This adds a SFBM texture to the coloring." default = 0.0 endparam param txtr_SFBM_mode caption = "T: SFBM Noise type" default = 1 enum = "Perlin's" "Raw... (Sam's)" endparam param txtr_SFBM_scale caption = "T: SFBM Scale" hint = "Scaling Factor for this SFBM texture." default = 1.0 endparam param txtr_SFBM_scaledis caption = "T: SFBM Scale Distribution" default = 0 enum = "1/scale" "1/sqrt(scale)" "Fancy" "1/i" endparam param txtr_SFBM_size caption = "T: SFBM Pattern Size" default = 0.1 endparam param txtr_SFBM_magn caption = "T: SFBM Magnification Step" default = 1.2 endparam param txtr_SFBM_limit caption = "T: SFBM Limitation" default = 0.0 min = 0.0 endparam param txtr_SFBM_rot caption = "T: SFBM Rotation Step" default = 28.0 endparam param txtr_SFBM_power caption = "T: SFBM Power" default = 1.0 endparam param txtr_SFBM_mod caption = "Vary Random Numbers?" default = 1 enum = "No" "Use sqrt(i)" endparam param txtr_SFBM_seed caption = "T: SFBM Seed" default = 123094 endparam param txtr_SFBM_octaves caption = "T: SFBM Octaves" default = 5 min = 1 endparam param txtr_Primes caption = "T: Primes Texture" hint = "This adds a Primes texture to the coloring." default = 0.0 endparam param txtr_Primes_scale caption = "T: Primes Scale" hint = "Scaling Factor for this Primes texture." default = 1.0 endparam param txtr_Primes_size caption = "T: Primes Pattern Size" default = 0.5 endparam param txtr_primes_withFinalTrunc caption = "With Final Truncation" default = TRUE endparam param txtr_primes_where2start caption = "T: Start of Snip" default = 1 min = 0 endparam param txtr_primes_lengthOfSnip caption = "T: Length of Snip" default = 1 min = 1 endparam param txtr_primes_Mode caption = "T: Primes Mode" enum = "Real,Imag" "Real" "Imag" "|z|" "Angle" "Angel" "Polar" default = 5 endparam param txtr_primes_limit caption = "T: Primes Limitation" default = 0.0 min = 0.0 endparam param txtr_Gauss caption = "T: Gauss Texture" hint = "This adds a Gauss texture to the coloring." default = 0.0 endparam param txtr_Gauss_type caption = "T: Gauss Type" enum = "d" "x" "y" "x-y" "x*y" "y/x" "min x,y" "max x,y" "Angle" \ "Pyth. am" "Pyth. gm" default = 0 endparam param txtr_Gauss_scale caption = "T: Gauss Scale" hint = "Scaling Factor for this Gauss texture." default = 1.0 endparam param txtr_Gauss_size caption = "T: Gauss Pattern Size" default = 1.0 endparam param txtr_Gauss_limit caption = "T: Gauss Limitation" default = 0.0 min = 0.0 endparam param masking caption = "Masking" enum = "None" "Lower" "Upper" "Between" "Outside" default = 0 endparam param maskType caption = "Mask Type" enum = "Index" "Re z" "Im z" "Angle" "Iteration" \ "Re Mixel" "Im Mixel" "Abs Mixel" \ "Dist(z,Pixel)" "|z|" default = 0 endparam param threshold_l caption = "Lower Mask Threshold" default = 0.5 endparam param threshold_u caption = "Upper Mask Threshold" default = 1.0 endparam param spareMode caption = "Cut Out" enum = "None" "Upper" "Lower" \ "Left" "Right" \ "Upper + Left" "Upper + Right" "Lower + Left" "Lower + Right" \ "Upper & Left" "Upper & Right" "Lower & Left" "Lower & Right" \ "Inside Rectangle" "Outside Rectangle" \ "Between Vertical" "Outside Vertical" \ "Between Horizontal" "Outside Horizontal" \ "Inside Circle" "Outside Circle" default = 0 endparam param sparePoint caption = "Line of Cut, 1. Point" default = (0,0) endparam param sparePoint2 caption = "Add. Point/Line for Cut" default = (1,1) endparam param spareRot caption = "Rotate Cut" default = 0.0 min = -90.0 max = 90.0 endparam param spareMask caption = "Mask Cut" default = true endparam func this caption = "This Function" hint = "This Function" default = ident() endfunc func that caption = "That Function" hint = "That Function" default = ident() endfunc func startFct caption = "Start Function" default = ident() endfunc func oldFct caption = "Function for old z" default = ident() endfunc func fkt caption = "Additional Function" default = ident() hint = "Last Transfer to Index" endfunc }