comment { Coloring methods by Andreas Lober Last update on November 13, 2000, 21:00 For the latest version of this file go to: http://formulas.ultrafractal.com or mail to abmlober@t-online.de resp. andreas.lober@sap.com Many thanks go to my beta testers * Angela Wilczynski (Wizzle) * Bob Margolis * Edward M. Perry * Emily E. Garlick (Queri) * eva * Karen Trottier * Linda Allison * Peter Kubik (KPK) * Michèle Dessureault * Richard A. Molnar * Tina Oloyede and to * Bryan A. Smith * Linda Bucklin * Sarah Scotland Newest updates: all colourings got new options: * Cut Out is gone... It is now a mapping * Loop Barnsley Mode - a pendant to Loop Turnaround Mode * Loop Global Dither for a kind of tiling including its own sort of randomness * "Verlauf" for letting a texture increase or blending two or more textures: E.g. one texture may grow by amount from left to right the other from right to left. You define a region where both textures exist, outside this region only one of them exists except you made the Verlauf offset > 0. * new textures like Checker (including the Smileys) Pick153 (idea from a C. Pickover Book - chapter about 153) SumDiv (dto about Sum of Dividers) MLAB and Banana (Edward M. Perry) Elliptic Medial Cut from November 12, 2000: Truchet Tiling/fBm (Samuel Monnier) GCD (with a little help from Edward M. Perry's Orchard Real) * new texture lattice to apply a texture in different modes: None (like in MT's fBm Popcorn Trap or MDE's fBm Gauss) Normal (old and default) Modified (makes a tiled texture) Inverse Joukowskij Dither Hex * Disturb mode for the Fixit process * New Color-by: Iterations and different types for it It doesn't work with all the other parameters - try out. * Global Scale * Lattice offset and new lattice(s) * L: Noise Thanks to Damien M. Jones for his permission to use fBm * X- and Y-Waves * That's it for now. ################O#L#D##C#O#M#M#E#N#T#S############# * 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 additional input by Edward M. Perry's Banana * 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. } akl-pure_colorby { ; ; Comments are in the folder comments ; ; Andreas Lober, November 12, 2000 ; init: complex p = 0 float r = 0 float rfix = 0 float rtrap = 0 if (@fixit == 1) ; Minimum rfix = 1.0e20 elseif (@fixit == 2) ; Maximum rfix = -1.0e20 endif int iter = 0 float ifix = 0 float itrap = 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) float x = 0 float y = 0 complex zStart = 0 complex zfix = (0.0,0.0) complex cfix = (0.0,0.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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; float fbmSum = 0 float fbmAngle = 0 complex fbmDisturbPix = 0 if (@disturb_fbm > 0) float fbmAmplitude = 1.0 int i_fbm = 0 complex fbmPix = 0 if (@disturb_fbm_lattice) fbmPix = #pixel - round(#pixel*@disturb_fbm_scale)/@disturb_fbm_scale else fbmPix = #pixel*@disturb_fbm_scale endif while (i_fbm < @disturb_fbm_octaves) float fbmBx0 = floor(real(fbmPix)) float fbmBx1 = fbmBx0 + 1 float fbmRx0 = real(fbmPix) - floor(real(fbmPix)) float fbmRx1 = fbmRx0 - 1 float fbmBy0 = floor(imag(fbmPix)) float fbmBy1 = fbmBy0 + 1 float fbmRy0 = imag(fbmPix) - floor(imag(fbmPix)) float fbmRy1 = fbmRy0 - 1 if fbmBx0 < 0 fbmBx0 = fbmBx0 + 8192 endif if fbmBx1 < 0 fbmBx1 = fbmBx1 + 8192 endif if fbmBy0 < 0 fbmBy0 = fbmBy0 + 8192 endif if fbmBy1 < 0 fbmBy1 = fbmBy1 + 8192 endif float fbmTmp = 0 float fbmSX = fbmRx0 * fbmRx0 * (3 - 2 * fbmRx0) float fbmSY = fbmRy0 * fbmRy0 * (3 - 2 * fbmRy0) fbmTmp = fbmBx0^2*2473 % 65536 float b00 = (fbmTmp + fbmBy0)^2 % 65536 float b01 = (fbmTmp + fbmBy1)^2 % 65536 fbmTmp = fbmBx1^2*2473 % 65536 float b10 = (fbmTmp + fbmBy0)^2 % 65536 float b11 = (fbmTmp + fbmBy1)^2 % 65536 float fbmPoint000 = b00^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint010 = b01^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint100 = b10^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint110 = b11^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint001 = (b00 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint011 = (b01 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint101 = (b10 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint111 = (b11 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 fbmTmp = sqrt(fbmPoint000^2 + fbmPoint001^2) fbmPoint000 = fbmPoint000 / fbmTmp fbmPoint001 = fbmPoint001 / fbmTmp fbmTmp = sqrt(fbmPoint010^2 + fbmPoint011^2) fbmPoint010 = fbmPoint010 / fbmTmp fbmPoint011 = fbmPoint011 / fbmTmp fbmTmp = sqrt(fbmPoint100^2 + fbmPoint101^2) fbmPoint100 = fbmPoint100 / fbmTmp fbmPoint101 = fbmPoint101 / fbmTmp fbmTmp = sqrt(fbmPoint110^2 + fbmPoint111^2) fbmPoint110 = fbmPoint110 / fbmTmp fbmPoint111 = fbmPoint111 / fbmTmp float fbmU1 = fbmRx0 * fbmPoint000 + fbmRy0 * fbmPoint001 float fbmV1 = fbmRx1 * fbmPoint100 + fbmRy0 * fbmPoint101 float fbmPtX = fbmU1 + fbmSX * (fbmV1 - fbmU1) float fbmU2 = fbmRx0 * fbmPoint010 + fbmRy1 * fbmPoint011 float fbmV2 = fbmRx1 * fbmPoint110 + fbmRy1 * fbmPoint111 float fbmPtY = fbmU2 + fbmSY * (fbmV2 - fbmU2) fbmSum = fbmSum + fbmPtX + fbmSY*(fbmPtY - fbmPtX) * fbmAmplitude fbmAngle = atan2(fbmPtX+1i*fbmPtY)/(2*#pi) if (fbmAngle < 0) fbmAngle = fbmAngle + 1 endif fbmAmplitude = fbmAmplitude/2 fbmPix = fbmPix / 0.5 i_fbm = i_fbm + 1 if (@disturb_fbm_mode >= 2) fbmHelp = abs(fbmPtX + 1i*fbmPtY) if (@disturb_fbm_mode == 2) ; fBm Pixel only fbmDisturbPix = fbmHelp elseif (@disturb_fbm_mode == 3) ; fBm Pix*Sum fbmDisturbPix = fbmSum*fbmHelp elseif (@disturb_fbm_mode == 4) ; fBm Pixel added fbmDisturbPix = fbmDisturbPix + fbmHelp elseif (@disturb_fbm_mode == 5) ; fBm Pixel W-added fbmDisturbPix = fbmDisturbPix + fbmHelp/i_fbm elseif (@disturb_fbm_mode == 6) ; fBm Pix*Sum added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp elseif (@disturb_fbm_mode == 7) ; fBm Pix*Sum W-added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 8) ; fBm Pix*Angle fbmDisturbPix = fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 9) ; fBm Pix*Angle added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 10) ; fBm Pix*Angle W-added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 11) ; fBm Pix*Angle Avg fbmDisturbPix = (fbmDisturbPix + fbmAngle*fbmHelp)/fbmSum endif endif endwhile endif ; Variables for Verlauf float txtr_v_verlauf = 1 float txtr_v_hor1 = 0 float txtr_v_hor2 = 0 float txtr_v_bot = 0 float txtr_v_top = 0 float txtr_v_height = 0 float txtr_v_vert1 = 0 float txtr_v_vert2 = 0 float txtr_v_left = 0 float txtr_v_rigt = 0 float txtr_v_width = 0 float txtr_v_yPos = 0 float txtr_v_xPos = 0 ; Variables for Waves int l_waves = @wavesLoop int xWavesM = @xWaveMode int yWavesM = @yWaveMode float xWavesF = @xWaveFreq float yWavesF = @yWaveFreq loop: 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) 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; if (@globalScale != 0 && @globalScale != 1) zStart = zStart*@globalScale endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 0) if (@disturb_fbm_mode == 0) zStart = zStart*(1+@disturb_fbm*fbmSum) elseif (@disturb_fbm_mode == 1) zStart = zStart*(1+@disturb_fbm*fbmAngle) else zStart = zStart + @disturb_fbm*fbmDisturbPix endif endif if (@globalDither != 0) complex innerScaleZ = 0 complex innerOffset = 0 if (@inner_amount != 0 && zStart != 0) innerScaleZ = zStart*@inner_scale*@globalDither innerOffset = innerOffset + \ @inner_amount*round(innerScaleZ)/(innerScaleZ) endif if (@d_randomness != 0) innerOffset = innerOffset + @d_randomness*#random endif bool shapeCondition = true float ditherRadius = @radius/@globalDither if (@shape == 1) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) < ditherRadius) elseif (@shape == 2) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 3) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 4) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 5) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 6) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) > ditherRadius) elseif (@shape == 7) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 8) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 9) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) elseif (@shape == 10) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) endif if (shapeCondition) zStart = round(zStart*@globalDither + innerOffset)/@globalDither \ - innerOffset/@globalDither endif 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 ; complex zOffset = zStart-@lattOffset if (@lattice == 1) zStart = round(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zOffset) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 8) zStart = floor(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 10) zStart = abs(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*zOffset^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^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(zOffset) float imZ = imL1*imag(zOffset) 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 elseif (@lattice == 24) complex lzp = round(zOffset*@lattFac1) complex lzc = zOffset-(lzp/@lattFac2) float rlf = real(@lattFac1) if (round(imag(lzp))%3 == 0) lzc = (lzc+@lattFac2/2) if (abs(real(lzc)) > rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) < rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif elseif (round(real(lzp))%3 == 1) lzc = (lzc-@lattFac2/2) if (abs(imag(lzc)) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif else lzc = (lzc*@lattFac2*2) if (imag(lzc) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif endif endif ; lattices if (@turnMode) complex zRound = 0 complex zZ = zStart if (@turnScale != 0) if (@turnScaleMode == 0) zRound = round(zStart*@turnScale)/@turnScale elseif (@turnScaleMode == 1) zRound = round(cabs(zStart)*@turnScale)/@turnScale elseif (@turnScaleMode == 2) zRound = sqrt(|round(zStart*@turnScale)|)/@turnScale endif ; turnScaleMode 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 if (@barnMode > 0) float barnRe = real(@barnSeed) float barnIm = imag(@barnSeed) complex zRound = 0 complex zZ = zStart if (@barnScale != 0) if (@barnScaleMode == 0) zRound = round(zStart*@barnScale)/@barnScale elseif (@barnScaleMode == 1) zRound = round(cabs(zStart)*@barnScale)/@barnScale elseif (@barnScaleMode == 2) zRound = sqrt(|round(zStart*@barnScale)|)/@barnScale endif ; barnScaleMode complex zZ = zStart-zRound endif bool test = false if (@barnMode == 1) test = (real(zStart)*barnIm + barnRe*imag(zStart) >= 0) else test = (|real(zStart)*barnIm - barnRe*imag(zStart)| < .5) endif ; barnMode if (test) zStart = @barnFct1(zZ - @barnShift)*@barnSeed+zRound else zStart = @barnFct2(zZ + @barnShift)*@barnSeed+zRound endif ; test endif ; @barnMode > 0 if (@zJouk != 0 && zStart != 0) zStart = zStart + @zJouk/zStart endif ; calculate the "vector" x = real(zStart) y = imag(zStart) if (@vectorJouk != 0 && zStart != 0) zStart = zStart + @vectorJouk/zStart endif r=0.0 if (@startDistortion == 0) p = #z elseif (@startDistortion == 1) p = zStart elseif (@startDistortion == 2) p = #pixel elseif (@startDistortion == 3) p = (zStart+#pixel)/2 endif if (@minMax) float xm = -1 float ym = -1 if (x < y) xm = x ym = y else xm = y ym = x endif x = xm y = ym endif ; Wave stuff int loop_i = 0 while (loop_i < l_waves) loop_i = loop_i + 1 if (@wavesLoopMode == 1) ; cyclic xWavesM = (xWavesM+1)%5 yWavesM = (yWavesM+1)%5 endif if (xWavesM == 1) ; x*sin(x) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 2) ; x*cos(x) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 3) ; x*sin(y) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*y + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 4) ; x*cos(y) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*y + @xWaveOffset)^@xWaveExp) endif if (yWavesM == 1) ; y*sin(y) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 2) ; y*cos(y) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 3) ; y*sin(x) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*x + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 4) ; y*cos(x) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*x + @yWaveOffset)^@yWaveEyp) endif if (@wavesGrowFreq != 1) xWavesF = xWavesF*@wavesGrowFreq yWavesF = yWavesF*@wavesGrowFreq endif endwhile ; wave stuff if (@curveJouk != 0) if (x != 0) x = x + real(@curveJouk)/x endif if (y != 0) y = y + imag(@curveJouk)/y endif endif z = x + 1i*y float rz = |real(z)| float iz = |imag(z)| if (@watch == 0) ; real r = rz elseif (@watch == 1) ; imag r = iz elseif (@watch == 2) ; magn r = |z| elseif (@watch == 3) ; diff r = |rz-iz| 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 = |z-zStart| 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 float disturbFix = 0 if (@disturbFixFactor != 0) float dtmp = 1 if (@disturbMode == 0) ; Log dtmp = 1/log(iter) elseif (@disturbMode == 1) ; Sqrt dtmp = 1/sqrt(iter) elseif (@disturbMode == 2) ; Lin dtmp = 1/iter elseif (@disturbMode == 3) ; Sqr dtmp = 1/iter^2 elseif (@disturbMode == 4) ; AlterGeom dtmp = 1/(exp(-iter)*(-1)^iter) elseif (@disturbMode == 5) ; Geom dtmp = 1/(exp(-iter)*iter) elseif (@disturbMode == 6) ; Const dtmp = 1 elseif (@disturbMode == 7) ; Const dtmp = 1/|zstart| elseif (@disturbMode == 8) ; Const dtmp = 1/|real(zstart)| elseif (@disturbMode == 9) ; Const dtmp = 1/|imag(zstart)| elseif (@disturbMode == 10) ; Const dtmp = |zstart| elseif (@disturbMode == 11) ; Const dtmp = |real(zstart)| elseif (@disturbMode == 12) ; Const dtmp = |imag(zstart)| elseif (@disturbMode == 13) ; Const dtmp = 1/|real(zstart)-imag(zstart)| elseif (@disturbMode == 14) ; Const dtmp = |real(zstart)-imag(zstart)| endif disturbFix = @disturbFixFactor*dtmp endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 1) if (@disturb_fbm_mode == 0) disturbFix = @disturb_fbm*fbmSum elseif (@disturb_fbm_mode == 1) disturbFix = @disturb_fbm*fbmAngle else disturbFix = @disturb_fbm*cabs(fbmDisturbPix) endif endif if (@fixit == 0) ; Last rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix elseif (@fixit == 1) ; Minimum if (r < rfix) rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix endif elseif (@fixit == 2) ; Maximum if (r > rfix) rfix = r - disturbFix ifix = iter - disturbFix zfix = zStart - disturbFix cfix = p - disturbFix endif elseif (@fixit == 3) ; sum rfix = rfix + r + disturbFix ifix = ifix + iter + disturbFix zfix = zfix + zStart + disturbFix cfix = cfix + p + disturbFix elseif (@fixit == 4) ; w-sum rfix = rfix + r/iter + disturbFix ifix = (ifix + iter)/iter + disturbFix zfix = zfix + zStart/iter + disturbFix cfix = cfix + p/iter + disturbFix elseif (@fixit == 5) ; w2-sum float itmp = iter^2 rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 6) ; wS-sum float itmp = sqrt(iter) rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 7) ; g-sum float itmp = exp(-iter) rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 8) ; g'-sum float itmp = exp(-iter)*iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 9) ; ag-sum float itmp = exp(-iter)*(-1)^iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 10) ; l-sum rfix = rfix + log(r) + disturbFix ifix = ifix + log(iter) + disturbFix zfix = zfix + log(zStart) + disturbFix cfix = cfix + log(p) + disturbFix elseif (@fixit == 11) ; lw-sum rfix = rfix + log(r)/iter + disturbFix ifix = (ifix + log(iter))/iter + disturbFix zfix = zfix + log(zStart)/iter + disturbFix cfix = cfix + log(p)/iter + disturbFix elseif (@fixit == 12) ; lw-sum float itmp = iter^2 rfix = rfix + log(r)/itmp + disturbFix ifix = (ifix + log(iter))/itmp + disturbFix zfix = zfix + log(zStart)/itmp + disturbFix cfix = cfix + log(p)/itmp + disturbFix endif if (@rotDegree != 0) zfix = (zfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre cfix = (cfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre 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 (at the very beginning final: float temp = 0 if (@numIterMode == 1) ifix = #numiter elseif (@numIterMode == 2) ifix = ifix/#numiter elseif (@numIterMode == 3) ifix = #numiter-ifix elseif (@numIterMode == 4) ifix = (#numiter-ifix)/#numiter elseif (@numIterMode == 5) ifix = (#numiter+ifix)/2 endif ; @numIterMode if (@colorby == 0) ; Fiximum 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 elseif (@colorby == 23) temp = ifix endif ; colorby list 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) elseif (@maskType == 10) ; Index/|z| mask = temp/cabs(zStart) elseif (@maskType == 11) ; GoldenCut mask = |real(zStart)/imag(zStart) - imag(zStart)/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 (@colour_limit != 0) to_index = to_index%@colour_limit endif 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 (@f_rand_verlaufMode > 0 || \ @f_Gnarl_verlaufMode > 0 || \ @f_PopCorn_verlaufMode > 0 || \ @f_SFBM_verlaufMode > 0 || \ @f_Primes_verlaufMode > 0 || \ @f_Gauss_verlaufMode > 0 || \ @f_Turn_verlaufMode > 0 || \ @f_Check_verlaufMode > 0 || \ @f_Pick153_verlaufMode > 0 || \ @f_SumDiv_verlaufMode > 0 || \ @f_MLAB_verlaufMode > 0 || \ @f_Banana_verlaufMode > 0 || \ @f_Ell_verlaufMode > 0 || \ @f_MedialCut_verlaufMode > 0 \ ) txtr_v_hor1 = imag(@txtr_verlauf_Line1) txtr_v_hor2 = imag(@txtr_verlauf_Line2) if (txtr_v_hor1 < txtr_v_hor2) txtr_v_bot = txtr_v_hor1 txtr_v_top = txtr_v_hor2 else txtr_v_bot = txtr_v_hor2 txtr_v_top = txtr_v_hor1 endif txtr_v_height = txtr_v_top-txtr_v_bot txtr_v_vert1 = real(@txtr_verlauf_Line1) txtr_v_vert2 = real(@txtr_verlauf_Line2) if (txtr_v_vert1 < txtr_v_vert2) txtr_v_left = txtr_v_vert1 txtr_v_rigt = txtr_v_vert2 else txtr_v_left = txtr_v_vert2 txtr_v_rigt = txtr_v_vert1 endif txtr_v_width = txtr_v_rigt-txtr_v_left complex pixpix = #pixel if (@txtr_verlauf_Rot%360 != 0) complex rotCentre = @txtr_verlauf_RotCentre pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@txtr_verlauf_Rot/180) + rotCentre endif txtr_v_yPos = imag(pixpix) txtr_v_xPos = real(pixpix) else txtr_v_verlauf = 1 endif if (@f_randomness != 0) txtr_v_verlauf = 1 if (@f_rand_verlaufMode > 0) if (@f_rand_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) ;! txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height ;! endif elseif (@f_rand_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) ;! ;! txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width ;! endif elseif (@f_rand_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_rand_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_rand_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif endif to_index = to_index + @f_randomness*txtr_v_verlauf * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz if (@txtr_Gnarl_lattice == 0) zGnarl = zGnarl*@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 1) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 2) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale*10) elseif (@txtr_Gnarl_lattice == 3) zGnarl = zGnarl-trunc(@txtr_Gnarl_scale/zGnarl) elseif (@txtr_Gnarl_lattice == 4) zGnarl = zGnarl*@txtr_Gnarl_scale + @txtr_Gnarl_scale/zGnarl elseif (@txtr_Gnarl_lattice == 5) zGnarl = round(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 6) complex zp_Gnarl = round(zGnarl*@txtr_Gnarl_scale) complex zc_Gnarl = zGnarl - (zp_Gnarl/@txtr_Gnarl_scale) if (round(imag(zp_Gnarl))%3==0) zc_Gnarl = (zc_Gnarl + @txtr_Gnarl_scale/2) if (abs(real(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif elseif (round(real(zp_Gnarl))%3==1) zc_Gnarl = (zc_Gnarl - @txtr_Gnarl_scale/2) if (abs(imag(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif else zc_Gnarl = (zc_Gnarl*@txtr_Gnarl_scale*2) if (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gnarl_verlaufMode > 0) if (@f_Gnarl_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gnarl_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gnarl_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gnarl_verlaufOffset endif to_index = to_index + @txtr_gnarl*txtr_v_verlauf*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz if (@txtr_PopCorn_lattice == 0) zPopCorn = zPopCorn*@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 1) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 2) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale*10) elseif (@txtr_PopCorn_lattice == 3) zPopCorn = zPopCorn-trunc(@txtr_PopCorn_scale/zPopCorn) elseif (@txtr_PopCorn_lattice == 4) zPopCorn = zPopCorn*@txtr_PopCorn_scale + @txtr_PopCorn_scale/zPopCorn elseif (@txtr_PopCorn_lattice == 5) zPopCorn = round(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 6) complex zp_PopCorn = round(zPopCorn*@txtr_PopCorn_scale) complex zc_PopCorn = zPopCorn - (zp_PopCorn/@txtr_PopCorn_scale) if (round(imag(zp_PopCorn))%3==0) zc_PopCorn = (zc_PopCorn + @txtr_PopCorn_scale/2) if (abs(real(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif elseif (round(real(zp_PopCorn))%3==1) zc_PopCorn = (zc_PopCorn - @txtr_PopCorn_scale/2) if (abs(imag(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif else zc_PopCorn = (zc_PopCorn*@txtr_PopCorn_scale*2) if (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif endif endif ; txtr_popcorn_lattice 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 txtr_v_verlauf = 1 if (@f_PopCorn_verlaufMode > 0) if (@f_PopCorn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_PopCorn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_PopCorn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_PopCorn_verlaufOffset endif to_index = to_index + @txtr_PopCorn*txtr_v_verlauf*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 if (@txtr_SFBM_lattice == 0) zSFBM = zSFBM*@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 1) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 2) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale*10) elseif (@txtr_SFBM_lattice == 3) zSFBM = zSFBM-trunc(@txtr_SFBM_scale/zSFBM) elseif (@txtr_SFBM_lattice == 4) zSFBM = zSFBM*@txtr_SFBM_scale + @txtr_SFBM_scale/zSFBM elseif (@txtr_SFBM_lattice == 5) zSFBM = round(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 6) complex zp_SFBM = round(zSFBM*@txtr_SFBM_scale) complex zc_SFBM = zSFBM - (zp_SFBM/@txtr_SFBM_scale) if (round(imag(zp_SFBM))%3==0) zc_SFBM = (zc_SFBM + @txtr_SFBM_scale/2) if (abs(real(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif elseif (round(real(zp_SFBM))%3==1) zc_SFBM = (zc_SFBM - @txtr_SFBM_scale/2) if (abs(imag(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif else zc_SFBM = (zc_SFBM*@txtr_SFBM_scale*2) if (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif endif endif 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 ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_SFBM_verlaufMode > 0) if (@f_SFBM_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SFBM_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SFBM_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SFBM_verlaufOffset endif to_index = to_index + @txtr_SFBM*txtr_v_verlauf*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz if (@txtr_Primes_lattice == 0) ; none zPrimes = zPrimes*@txtr_Primes_scale elseif (@txtr_Primes_lattice == 1) ; normal zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 2) ; modified zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale*10) elseif (@txtr_Primes_lattice == 3) ; Inverse1 zPrimes = zPrimes-trunc(@txtr_Primes_scale/zPrimes) elseif (@txtr_Primes_lattice == 4) ; joukowskij zPrimes = zPrimes*@txtr_Primes_scale + @txtr_Primes_scale/zPrimes elseif (@txtr_Primes_lattice == 5) zPrimes = round(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 6) complex zp_Primes = round(zPrimes*@txtr_Primes_scale) complex zc_Primes = zPrimes - (zp_Primes/@txtr_Primes_scale) if (round(imag(zp_Primes))%3==0) zc_Primes = (zc_Primes + @txtr_Primes_scale/2) if (abs(real(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif elseif (round(real(zp_Primes))%3==1) zc_Primes = (zc_Primes - @txtr_Primes_scale/2) if (abs(imag(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif else zc_Primes = (zc_Primes*@txtr_Primes_scale*2) if (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif endif endif 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*txtr_v_verlauf*texturePrimes txtr_v_verlauf = 1 if (@f_Primes_verlaufMode > 0) if (@f_Primes_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Primes_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Primes_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Primes_verlaufOffset endif endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz if (@txtr_Gauss_lattice == 0) zGauss = zGauss*@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 1) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 2) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale*10) elseif (@txtr_Gauss_lattice == 3) zGauss = zGauss-trunc(@txtr_Gauss_scale/zGauss) elseif (@txtr_Gauss_lattice == 4) zGauss = zGauss*@txtr_Gauss_scale + @txtr_Gauss_scale/zGauss elseif (@txtr_Gauss_lattice == 5) zGauss = round(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 6) complex zp_Gauss = round(zGauss*@txtr_Gauss_scale) complex zc_Gauss = zGauss - (zp_Gauss/@txtr_Gauss_scale) if (round(imag(zp_Gauss))%3==0) zc_Gauss = (zc_Gauss + @txtr_Gauss_scale/2) if (abs(real(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif elseif (round(real(zp_Gauss))%3==1) zc_Gauss = (zc_Gauss - @txtr_Gauss_scale/2) if (abs(imag(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif else zc_Gauss = (zc_Gauss*@txtr_Gauss_scale*2) if (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gauss_verlaufMode > 0) if (@f_Gauss_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gauss_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gauss_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gauss_verlaufOffset endif to_index = to_index + @txtr_Gauss*txtr_v_verlauf*textureGauss endif if (@txtr_Turn!= 0) complex zTurn = _zz zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale if (@txtr_Turn_lattice == 0) zTurn = zTurn*@txtr_Turn_scale elseif (@txtr_Turn_lattice == 1) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 2) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale*10) elseif (@txtr_Turn_lattice == 3) zTurn = zTurn-trunc(@txtr_Turn_scale/zTurn) elseif (@txtr_Turn_lattice == 4) zTurn = zTurn*@txtr_Turn_scale + @txtr_Turn_scale/zTurn elseif (@txtr_Turn_lattice == 5) zTurn = round(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 6) complex zp_Turn = round(zTurn*@txtr_Turn_scale) complex zc_Turn = zTurn - (zp_Turn/@txtr_Turn_scale) if (round(imag(zp_Turn))%3==0) zc_Turn = (zc_Turn + @txtr_Turn_scale/2) if (abs(real(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif elseif (round(real(zp_Turn))%3==1) zc_Turn = (zc_Turn - @txtr_Turn_scale/2) if (abs(imag(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif else zc_Turn = (zc_Turn*@txtr_Turn_scale*2) if (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif endif endif complex zTurned = zTurn float txtr_testAngle1 = #pi/@txtr_Turn_corte1 float txtr_testAngle2 = 3*txtr_testAngle1 complex txtr_rotAngle1 = @txtr_Turn_corte2*1i*txtr_testAngle1 complex txtr_rotAngle2 = @txtr_Turn_corte2*1i*txtr_testAngle2 if (@txtr_Turn_size != 0 && @txtr_Turn_size != 1) zTurn = zTurn/@txtr_Turn_size endif if (@reachThrough) _zz = zTurn endif float textureTurn = 0 float txtr_arg = atan2(zTurn) ; "Turn around" part taken from Sam if (abs(txtr_arg) < txtr_testAngle1) zTurned = zTurn*exp(txtr_rotAngle1) elseif (abs(txtr_arg) > txtr_testAngle2) zTurned = zTurn*exp(txtr_rotAngle2) endif textureTurn = |zTurn-zTurned| if (@txtr_Turn_limit != 0) textureTurn = textureTurn%@txtr_Turn_limit endif txtr_v_verlauf = 1 if (@f_Turn_verlaufMode > 0) if (@f_Turn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Turn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Turn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Turn_verlaufOffset endif to_index = to_index + @txtr_Turn*txtr_v_verlauf*textureTurn endif if (@txtr_Check!= 0) complex zChecked = round(_zz*@txtr_Check_scale) float textureCheck = 0 int checkFlag = 0 int testCheck = 0 int reChecked = trunc(real(zChecked)) int imChecked = trunc(imag(zChecked)) if (@txtr_Check_test == 0) testCheck = reChecked + imChecked elseif (@txtr_Check_test == 1) testCheck = reChecked * imChecked endif complex zCheckShape = _zz*@txtr_Check_scale complex zShapedCheck = zChecked - zCheckShape float reShapedCheck = real(zShapedCheck) float imShapedCheck = imag(zShapedCheck) if (testCheck%@txtr_Checker == 0) ; Condition for the checkers if (@txtr_Check_shape == 0) ; Squares only checkFlag = 1 elseif (@txtr_Check_shape == 1) ; Circle if (|zShapedCheck| < .2*@txtr_Check_shConst) ; additional condition checkFlag = 1 ; for circles endif elseif (@txtr_Check_shape == 2) if (abs (|reShapedCheck| - |imShapedCheck|) > .1*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 3) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 endif elseif (@txtr_Check_shape == 4) if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; segments checkFlag = 1 endif elseif (@txtr_Check_shape == 5) checkFlag = 1 ; draw a square if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; cut out segments checkFlag = 0 endif elseif (@txtr_Check_shape == 6) checkFlag = 1 ; draw a square if (|reShapedCheck| > .05*@txtr_Check_shConst) ; cut out horizontal lines checkFlag = 0 endif elseif (@txtr_Check_shape == 7) checkFlag = 1 ; draw a square if (|imShapedCheck| > .05*@txtr_Check_shConst) ; cut out vertical lines checkFlag = 0 endif elseif (@txtr_Check_shape == 8) checkFlag = 1 ; draw a square if ( |sin(imChecked*2*#pi) - sin(imag(zCheckShape)*2*#pi)| < .5*@txtr_Check_shConst) checkFlag = 0 ; cut out many vertical lines endif elseif (@txtr_Check_shape == 9) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 0 ; cut out a circle if (|imShapedCheck| > .05*@txtr_Check_shConst) checkFlag = 1 ; fill in something endif endif elseif (@txtr_Check_shape == 10) if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 1 ; draw a circle if (|imShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 ; cut out horizontal if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 ; fill in vertical endif endif endif elseif (@txtr_Check_shape == 11) checkFlag = 1 if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 0 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 12) if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 1 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 endif endif elseif (@txtr_Check_shape == 13) float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 14) checkFlag = 1 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 15) checkFlag = 1 if (|zShapedCheck| > .1*@txtr_Check_shConst) checkFlag = 0 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 16) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |reShapedCheck| + |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 17) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 18) checkFlag = 1 if (abs(reShapedCheck) - abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(reShapedCheck) + abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 19) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.1*@txtr_Check_shConst && \ |reShapedCheck| + |imShapedCheck| > 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 20) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) < 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 21) if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 22) checkFlag = 1 if (|sin(reShapedCheck*2*#pi) - cos(imShapedCheck*2*#pi) | > 0.5*@txtr_Check_shConst || \ |imShapedCheck| < 0.01*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 23) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif elseif (@txtr_Check_shape == 24) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif elseif (@txtr_Check_shape == 25) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif endif elseif (@txtr_Check_shape == 26) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif endif elseif (@txtr_Check_shape == 27) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 1 endif endif endif endif endif elseif (@txtr_Check_shape == 28) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 0 endif endif endif endif endif elseif (@txtr_Check_shape == 29) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 1 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 1 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 0 endif endif endif endif elseif (@txtr_Check_shape == 30) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 0 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 0 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 1 endif endif endif endif endif if (@txtr_Check_divide == 1) if (reShapedCheck > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 2) if (|reShapedCheck| > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 3) if (cabs(reShapedCheck) > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 4) if (|reShapedCheck| > |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 5) if (reShapedCheck < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 6) if (|reShapedCheck| < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 7) if (cabs(reShapedCheck) < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 8) if (|reShapedCheck| < |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 9) if (|atan2(zShapedCheck)/#pi|%.15 > .03) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 10) if (cabs(zShapedCheck)%.1 > .03) checkFlag = 1 - checkFlag endif endif endif ; testCheck%@txtr_Checker == 0 if (@txtr_Check_invert) checkFlag = 1 - checkFlag endif textureCheck = checkFlag if (@txtr_Check_col == 1 || @txtr_Check_col == 3) textureCheck = textureCheck*|zChecked| endif if (@txtr_Check_col == 2 || @txtr_Check_col == 3) textureCheck = textureCheck*#numiter endif if (@txtr_Check_col == 4) textureCheck = textureCheck*|zShapedCheck| endif if (@txtr_Check_limit != 0) textureCheck = textureCheck%@txtr_Check_limit endif txtr_v_verlauf = 1 if (@f_Check_verlaufMode > 0) if (@f_Check_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Check_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Check_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Check_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Check_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Check_verlaufOffset endif to_index = to_index + @txtr_Check*txtr_v_verlauf*textureCheck endif if (@txtr_Pick153 != 0) complex zPick153 = _zz float reCalcPick153 = 0 float imCalcPick153 = 0 float reTestPick153 = 0 float imTestPick153 = 0 float rePick153_1 = 0 float rePick153_2 = 0 float rePick153_3 = 0 float imPick153_1 = 0 float imPick153_2 = 0 float imPick153_3 = 0 float rePick153_R = 0 float imPick153_R = 0 if (@txtr_Pick153_lattice == 0) zPick153 = zPick153*@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 1) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 2) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale*10) elseif (@txtr_Pick153_lattice == 3) zPick153 = zPick153-trunc(@txtr_Pick153_scale/zPick153) elseif (@txtr_Pick153_lattice == 4) zPick153 = zPick153*@txtr_Pick153_scale + @txtr_Pick153_scale/zPick153 elseif (@txtr_Pick153_lattice == 5) zPick153 = round(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 6) complex zp_Pick153 = round(zPick153*@txtr_Pick153_scale) complex zc_Pick153 = zPick153 - (zp_Pick153/@txtr_Pick153_scale) if (round(imag(zp_Pick153))%3==0) zc_Pick153 = (zc_Pick153 + @txtr_Pick153_scale/2) if (abs(real(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif elseif (round(real(zp_Pick153))%3==1) zc_Pick153 = (zc_Pick153 - @txtr_Pick153_scale/2) if (abs(imag(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif else zc_Pick153 = (zc_Pick153*@txtr_Pick153_scale*2) if (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif endif endif float texturePick153 = 0 float granulation153 = 1000*@txtr_scale153 zCalcPick153 = (trunc(zPick153*granulation153)/granulation153 - trunc(zPick153*@txtr_scale153)) * 1000 reCalcPick153 = real(zCalcPick153) imCalcPick153 = imag(zCalcPick153) int j = @txtr_numOfTestsPick153 while (j > 0) j = j-1 rePick153_1 = trunc(reCalcPick153/100) rePick153_2 = trunc(reCalcPick153/10 - rePick153_1*10) rePick153_3 = trunc(reCalcPick153/1 - rePick153_1*100 - rePick153_2*10) imPick153_1 = trunc(imCalcPick153/100) imPick153_2 = trunc(imCalcPick153/10 - imPick153_1*10) imPick153_3 = trunc(imCalcPick153/1 - imPick153_1*100 - imPick153_2*10) reTestPick153 = rePick153_1^3 + rePick153_2^3 + rePick153_3^2 imTestPick153 = imPick153_1^3 + imPick153_2^3 + imPick153_3^2 rePick153_R = reCalcPick153 - reTestPick153 imPick153_R = imCalcPick153 - imTestPick153 reCalcPick153 = reTestPick153 imCalcPick153 = imTestPick153 endwhile ; j > 0 if (@txtr_Pick153_col == 0) texturePick153 = abs(rePick153_R)/500 elseif (@txtr_Pick153_col == 1) texturePick153 = abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 2) texturePick153 = abs(rePick153_R+imPick153_R)/500 elseif (@txtr_Pick153_col == 3) texturePick153 = abs(rePick153_R)/500 + abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 4) texturePick153 = abs(imPick153_R-rePick153_R)/250 elseif (@txtr_Pick153_col == 5) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 6) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 7) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 8) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 9) texturePick153 = abs(rePick153_R*imPick153_R)/250000 elseif (@txtr_Pick153_col == 10) texturePick153 = abs(rePick153_R*imPick153_R)/abs((rePick153_R+imPick153_R)*500) elseif (@txtr_Pick153_col == 11) texturePick153 = (rePick153_R+imPick153_R)^2/abs(rePick153_R*imPick153_R) elseif (@txtr_Pick153_col == 12) texturePick153 = (rePick153_R-imPick153_R)^2/(rePick153_R+imPick153_R)^2 endif if (@txtr_Pick153_limit != 0) texturePick153 = texturePick153%@txtr_Pick153_limit endif if (texturePick153 < 0) texturePick153 = 0 endif txtr_v_verlauf = 1 if (@f_Pick153_verlaufMode > 0) if (@f_Pick153_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Pick153_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Pick153_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Pick153_verlaufOffset endif to_index = to_index + @txtr_Pick153*txtr_v_verlauf*texturePick153 endif if (@txtr_SumDiv != 0) complex zSumDiv = _zz float reCalcSumDiv = 0 float imCalcSumDiv = 0 float reSumDiv_R = 0 float imSumDiv_R = 0 if (@txtr_SumDiv_lattice == 0) zSumDiv = zSumDiv*@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 1) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 2) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale*10) elseif (@txtr_SumDiv_lattice == 3) zSumDiv = zSumDiv-trunc(@txtr_SumDiv_scale/zSumDiv) elseif (@txtr_SumDiv_lattice == 4) zSumDiv = zSumDiv*@txtr_SumDiv_scale + @txtr_SumDiv_scale/zSumDiv elseif (@txtr_SumDiv_lattice == 5) zSumDiv = round(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 6) complex zp_SumDiv = round(zSumDiv*@txtr_SumDiv_scale) complex zc_SumDiv = zSumDiv - (zp_SumDiv/@txtr_SumDiv_scale) if (round(imag(zp_SumDiv))%3==0) zc_SumDiv = (zc_SumDiv + @txtr_SumDiv_scale/2) if (abs(real(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif elseif (round(real(zp_SumDiv))%3==1) zc_SumDiv = (zc_SumDiv - @txtr_SumDiv_scale/2) if (abs(imag(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif else zc_SumDiv = (zc_SumDiv*@txtr_SumDiv_scale*2) if (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif endif endif float textureSumDiv = 0 float granulationSumDiv = 1000*@txtr_scaleSumDiv zCalcSumDiv = (trunc(zSumDiv*granulationSumDiv)/granulationSumDiv - trunc(zSumDiv*@txtr_scaleSumDiv)) * 1000 reCalcSumDiv = real(zCalcSumDiv) imCalcSumDiv = imag(zCalcSumDiv) if (@txtr_SumDiv_mode == 0) reSumDiv_R = 0 imSumDiv_R = 0 elseif (@txtr_SumDiv_mode == 1) reSumDiv_R = reCalcSumDiv imSumDiv_R = imCalcSumDiv endif int j = 0 while (j abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R)/500 else textureSumDiv = abs(reSumDiv_R)/500 endif elseif (@txtr_SumDiv_col == 7) if abs(imSumDiv_R) < abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 8) if abs(imSumDiv_R) > abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 9) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/250000 elseif (@txtr_SumDiv_col == 10) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/abs((reSumDiv_R+imSumDiv_R)*500) elseif (@txtr_SumDiv_col == 11) textureSumDiv = (reSumDiv_R+imSumDiv_R)^2/abs(reSumDiv_R*imSumDiv_R) elseif (@txtr_SumDiv_col == 12) textureSumDiv = (reSumDiv_R-imSumDiv_R)^2/(reSumDiv_R+imSumDiv_R)^2 endif if (@txtr_SumDiv_limit != 0) textureSumDiv = textureSumDiv%@txtr_SumDiv_limit endif if (textureSumDiv < 0) textureSumDiv = 0 endif txtr_v_verlauf = 1 if (@f_SumDiv_verlaufMode > 0) if (@f_SumDiv_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SumDiv_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SumDiv_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SumDiv_verlaufOffset endif to_index = to_index + @txtr_SumDiv*txtr_v_verlauf*textureSumDiv endif if (@txtr_MLAB!= 0) float txtrB_ux = 0.0 float txtrB_uy = 0.0 float txtrB_scax = 0.0 float txtrB_scay = 0.0 float txtrB_ax = 0.0 float txtrB_ay = 0.0 float txtrB_mx = 0.0 float txtrB_my = 0.0 float txtrB_mr = 0.0 int txtrB_i = 0 bool txtrB_done = false bool txtrB_ix = false bool txtrB_iy = false ;---------------------------------- complex zMLAB = _zz if (@txtr_MLAB_lattice == 0) zMLAB = zMLAB*@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 1) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 2) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale*10) elseif (@txtr_MLAB_lattice == 3) zMLAB = zMLAB-trunc(@txtr_MLAB_scale/zMLAB) elseif (@txtr_MLAB_lattice == 4) zMLAB = zMLAB*@txtr_MLAB_scale + @txtr_MLAB_scale/zMLAB elseif (@txtr_MLAB_lattice == 5) zMLAB = round(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 6) complex zp_MLAB = round(zMLAB*@txtr_MLAB_scale) complex zc_MLAB = zMLAB - (zp_MLAB/@txtr_MLAB_scale) if (round(imag(zp_MLAB))%3==0) zc_MLAB = (zc_MLAB + @txtr_MLAB_scale/2) if (abs(real(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif elseif (round(real(zp_MLAB))%3==1) zc_MLAB = (zc_MLAB - @txtr_MLAB_scale/2) if (abs(imag(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif else zc_MLAB = (zc_MLAB*@txtr_MLAB_scale*2) if (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif endif endif ;zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale if (@txtr_MLAB_size != 0 && @txtr_MLAB_size != 1) zMLAB = zMLAB/@txtr_MLAB_size endif if (@reachThrough) _zz = zMLAB endif float textureMLAB = 0 txtrB_ux = real(zMLAB)*@txtr_MLAB_scalo txtrB_uy = imag(zMLAB)*@txtr_MLAB_scalo txtrB_ax = floor(txtrB_ux) txtrB_ay = floor(txtrB_uy) txtrB_scax = .5 txtrB_scay = .5 while (!txtrB_done && txtrB_i < @txtr_MLAB_divi) txtrB_mx = txtrB_ax + txtrB_scax txtrB_my = txtrB_ay + txtrB_scay txtrB_mr = txtrB_mx * 3779 + txtrB_my * 9377 txtrB_mr = abs(sin(txtrB_mr)) * @txtr_MLAB_vari txtrB_mr = txtrB_mr - trunc(txtrB_mr) if (txtrB_mr < real(@txtr_MLAB_pro0)) txtrB_done = true else if (txtrB_mr < imag(@txtr_MLAB_pro0)) txtrB_scax = txtrB_scax / 2 txtrB_ix = true txtrB_iy = false elseif (txtrB_mr < real(@txtr_MLAB_pro1)) txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = true elseif (txtrB_mr < imag(@txtr_MLAB_pro1)) txtrB_scax = txtrB_scax / 2 txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = false endif if (txtrB_ux > txtrB_mx) txtrB_ax = txtrB_mx endif if (txtrB_uy > txtrB_my) txtrB_ay = txtrB_my endif txtrB_i = txtrB_i + 1 endif endwhile if (txtrB_ix) txtrB_scay = txtrB_scay / 2 endif if (txtrB_iy) txtrB_scax = txtrB_scax / 2 endif txtrB_ax = abs(txtrB_ax - txtrB_ux) if (txtrB_ax > (txtrB_scax)) txtrB_ax = 2 * txtrB_scax - txtrB_ax endif txtrB_ay = abs(txtrB_ay - txtrB_uy) if (txtrB_ay > (txtrB_scay)) txtrB_ay = 2 * txtrB_scay - txtrB_ay endif if (txtrB_ax < txtrB_ay) txtrB_mx = txtrB_ax else txtrB_mx = txtrB_ay endif txtrB_my = 1 / (2 ^ (@txtr_MLAB_divi + 1) * @txtr_MLAB_scalo) txtrB_mr = txtrB_mx / txtrB_my if (txtrB_mr < @txtr_MLAB_edge) else if (txtrB_scax < txtrB_scay) txtrB_mr = txtrB_scax / txtrB_scay else txtrB_mr = txtrB_scay / txtrB_scax endif endif textureMLAB = txtrB_mr if (@txtr_MLAB_limit != 0) textureMLAB = textureMLAB%@txtr_MLAB_limit endif txtr_v_verlauf = 1 if (@f_MLAB_verlaufMode > 0) if (@f_MLAB_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MLAB_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MLAB_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MLAB_verlaufOffset endif to_index = to_index + @txtr_MLAB*txtr_v_verlauf*textureMLAB endif if (@txtr_Banana != 0) float txtrBana_d0 = 0.0 float txtrBana_d1 = 0.0 float txtrBana_ux = 0.0 float txtrBana_uy = 0.0 float txtrBana_sxa = 0.0 float txtrBana_sya = 0.0 float txtrBana_sxb = 0.0 float txtrBana_sxc = 0.0 float txtrBana_syb = 0.0 float txtrBana_syc = 0.0 float txtrBana_ax = 0.0 float txtrBana_ay = 0.0 float txtrBana_bx = 0.0 float txtrBana_by = 0.0 float txtrBana_ex = 0.0 float txtrBana_mx = 0.0 float txtrBana_my = 0.0 float txtrBana_mr = 0.0 int txtrBana_i = 0 bool txtrBana_done = false ;---------------------------------- complex zBanana = _zz if (@txtr_Banana_lattice == 0) zBanana = zBanana*@txtr_Banana_scale elseif (@txtr_Banana_lattice == 1) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 2) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale*10) elseif (@txtr_Banana_lattice == 3) zBanana = zBanana-trunc(@txtr_Banana_scale/zBanana) elseif (@txtr_Banana_lattice == 4) zBanana = zBanana*@txtr_Banana_scale + @txtr_Banana_scale/zBanana elseif (@txtr_Banana_lattice == 5) zBanana = round(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 6) complex zp_Banana = round(zBanana*@txtr_Banana_scale) complex zc_Banana = zBanana - (zp_Banana/@txtr_Banana_scale) if (round(imag(zp_Banana))%3==0) zc_Banana = (zc_Banana + @txtr_Banana_scale/2) if (abs(real(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif elseif (round(real(zp_Banana))%3==1) zc_Banana = (zc_Banana - @txtr_Banana_scale/2) if (abs(imag(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif else zc_Banana = (zc_Banana*@txtr_Banana_scale*2) if (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif endif endif if (@txtr_Banana_size != 0 && @txtr_Banana_size != 1) zBanana = zBanana/@txtr_Banana_size endif if (@reachThrough) _zz = zBanana endif float textureBanana = 0 txtrBana_ux = real(zBanana)*@txtr_Banana_scalo txtrBana_uy = imag(zBanana)*@txtr_Banana_scalo txtrBana_ax = floor(txtrBana_ux) txtrBana_ay = floor(txtrBana_uy) txtrBana_bx = txtrBana_ax + 1 txtrBana_by = txtrBana_ay + 1 txtrBana_sxc = 1 txtrBana_sxa = real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa txtrBana_syc = 1 txtrBana_sya = imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya txtrBana_i = 0 while (!txtrBana_done && txtrBana_i < @txtr_Banana_divi) txtrBana_mx = txtrBana_ax + txtrBana_sxa txtrBana_my = txtrBana_ay + txtrBana_sya txtrBana_mr = txtrBana_mx * @txtr_Banana_seed0 + txtrBana_my * @txtr_Banana_seed1 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_mr = txtrBana_mr - trunc(txtrBana_mr) if (txtrBana_mr < real(@txtr_Banana_pro0)) ; -1- txtrBana_done = true else ; -1- if (txtrBana_mr < imag(@txtr_Banana_pro0)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa elseif (txtrBana_mr < real(@txtr_Banana_pro1)) if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya elseif (txtrBana_mr < imag(@txtr_Banana_pro1)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya endif endif ; -1- txtrBana_i = txtrBana_i + 1 endwhile txtrBana_ax = abs(txtrBana_ax - txtrBana_ux) txtrBana_ex = 0 txtrBana_ay = abs(txtrBana_ay - txtrBana_uy) txtrBana_bx = abs(txtrBana_bx - txtrBana_ux) txtrBana_by = abs(txtrBana_by - txtrBana_uy) if (txtrBana_ay < txtrBana_ax) txtrBana_ax = txtrBana_ay txtrBana_ex = .2 endif if (txtrBana_bx < txtrBana_ax) txtrBana_ax = txtrBana_bx txtrBana_ex = .4 endif if (txtrBana_by < txtrBana_ax) txtrBana_ax = txtrBana_by txtrBana_ex = .6 endif if (txtrBana_ax < @txtr_Banana_edge/@txtr_Banana_scalo) if (@txtr_Banana_otre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 1) txtrBana_d0 = txtrBana_ex txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 2) txtrBana_d0 = -1 txtrBana_d1 = 1 endif else if (@txtr_Banana_itre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 1) txtrBana_d0 = .8 txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 2) txtrBana_mr = txtrBana_mr * @txtr_Banana_seed0 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_d0 = txtrBana_mr - trunc(txtrBana_mr) txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 3) txtrBana_d0 = -1 txtrBana_d1 = 1 endif endif ;--------------------------------------- if (@txtr_Banana_type == 0) textureBanana = txtrBana_mr ; Polyominos elseif (@txtr_Banana_type >= 1 && @txtr_Banana_type <= 6) if (txtrBana_d0 < 0); Original #solid = true else if (txtrBana_d0 < txtrBana_d1) textureBanana = txtrBana_d0 / txtrBana_d1 else textureBanana = txtrBana_d1 / txtrBana_d0 endif endif if (@txtr_Banana_type == 2) ; Ori/Polyominos textureBanana = |textureBanana/txtrBana_mr| elseif (@txtr_Banana_type == 3) ; Ori + Polyominos textureBanana = |textureBanana + txtrBana_mr^2| elseif (@txtr_Banana_type == 4) ; Ori + InvPoly textureBanana = |textureBanana + 1/txtrBana_mr| elseif (@txtr_Banana_type == 5) ; Diff(Ori,Poly) textureBanana = |textureBanana - txtrBana_mr^2| elseif (@txtr_Banana_type == 6) ; ; Diff(Ori,InvPoly) textureBanana = |textureBanana - 1/txtrBana_mr^2| endif elseif (@txtr_Banana_type == 7) textureBanana = |txtrBana_d0 - txtrBana_d1|^2*txtrBana_mr ; Diff Banana elseif (@txtr_Banana_type == 8) textureBanana = |txtrBana_d1 / txtrBana_d0| ; Thoughtless endif if (@txtr_Banana_limit != 0) textureBanana = textureBanana%@txtr_Banana_limit endif txtr_v_verlauf = 1 if (@f_Banana_verlaufMode > 0) if (@f_Banana_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Banana_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Banana_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Banana_verlaufOffset endif to_index = to_index + @txtr_Banana*txtr_v_verlauf*textureBanana endif if (@txtr_Ell != 0) complex zElliptic = _zz if (@txtr_Ell_lattice == 0) zElliptic = zElliptic*@txtr_Ell_scale elseif (@txtr_Ell_lattice == 1) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 2) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale*10) elseif (@txtr_Ell_lattice == 3) zElliptic = zElliptic-trunc(@txtr_Ell_scale/zElliptic) elseif (@txtr_Ell_lattice == 4) zElliptic = zElliptic*@txtr_Ell_scale + @txtr_Ell_scale/zElliptic elseif (@txtr_Ell_lattice == 5) zElliptic = round(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 6) complex zp_Ell = round(zElliptic*@txtr_Ell_scale) complex zc_Ell = zElliptic - (zp_Ell/@txtr_Ell_scale) if (round(imag(zp_Ell))%3==0) zc_Ell = (zc_Ell + @txtr_Ell_scale/2) if (abs(real(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif elseif (round(real(zp_Ell))%3==1) zc_Ell = (zc_Ell - @txtr_Ell_scale/2) if (abs(imag(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif else zc_Ell = (zc_Ell*@txtr_Ell_scale*2) if (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif endif endif if (@txtr_Ell_size != 0 && @txtr_Ell_size != 1) zElliptic = zElliptic/@txtr_Ell_size endif if (@reachThrough) _zz = zElliptic endif float textureElliptic = 0 complex EllipticZ = 0 float t_r = real(zElliptic) float t_i = imag(zElliptic) float t_rr = 0 float t_ii = 0 ; ; transformation ; if (@txtr_Ell_pseudo) ; ; calculate the temp real t_rr ; if (@txtr_Ell_c * t_r + @txtr_Ell_d == 0) ; don't divide by 0!! t_rr = @txtr_Ell_a * t_r + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_rr = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_rr = (@txtr_Ell_a * (t_r-t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_rr = (@txtr_Ell_a * (t_r+t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_rr = (@txtr_Ell_a * (t_r*t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_rr = (@txtr_Ell_a * (t_r^t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif else t_rr = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif endif ; ; calculate the temp imag t_ii ; if (@txtr_Ell_c * t_i + @txtr_Ell_d == 0) ; don't divide by 0!! t_ii = @txtr_Ell_a * t_i + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_ii = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_ii = (@txtr_Ell_a * (t_i-t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_ii = (@txtr_Ell_a * (t_i+t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_ii = (@txtr_Ell_a * (t_i*t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_ii = (@txtr_Ell_a * (t_i^t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif else t_ii = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif endif EllipticZ = t_rr + 1i*t_ii else if (@txtr_Ell_c * zElliptic + @txtr_Ell_d == 0) ; don't divide by 0!! EllipticZ = @txtr_Ell_a * zElliptic + @txtr_Ell_b else EllipticZ = (@txtr_Ell_a * zElliptic + @txtr_Ell_b) / (@txtr_Ell_c * zElliptic + @txtr_Ell_d) endif endif if (@txtr_Ell_type == 0) textureElliptic = |EllipticZ-zElliptic| elseif (@txtr_Ell_type == 1) textureElliptic = |real(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 2) textureElliptic = |imag(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 3) textureElliptic = |atan(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 4) textureElliptic = atan2(EllipticZ-zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 5) textureElliptic = |EllipticZ/zElliptic| elseif (@txtr_Ell_type == 6) textureElliptic = |real(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 7) textureElliptic = |imag(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 8) textureElliptic = |atan(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 9) textureElliptic = atan2(EllipticZ/zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 10) textureElliptic = |zElliptic/EllipticZ| elseif (@txtr_Ell_type == 11) textureElliptic = |real(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 12) textureElliptic = |imag(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 13) textureElliptic = |atan(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 14) textureElliptic = atan2(zElliptic/EllipticZ)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 15) textureElliptic = |sin(zElliptic) + 1i*cos(EllipticZ)| elseif (@txtr_Ell_type == 16) textureElliptic = |real(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 17) textureElliptic = |imag(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 18) textureElliptic = |atan(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 19) textureElliptic = atan2(sin(zElliptic) + 1i*cos(EllipticZ))/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif endif if (@txtr_Ell_limit != 0) textureElliptic = textureElliptic%@txtr_Ell_limit endif ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_Ell_verlaufMode > 0) if (@f_Ell_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Ell_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Ell_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Ell_verlaufOffset endif to_index = to_index + @txtr_Ell*txtr_v_verlauf*textureElliptic endif if (@txtr_MedialCut != 0) complex zMedialCut = _zz if (@txtr_MedialCut_lattice == 0) zMedialCut = zMedialCut*@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 1) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 2) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale*10) elseif (@txtr_MedialCut_lattice == 3) zMedialCut = zMedialCut-trunc(@txtr_MedialCut_scale/zMedialCut) elseif (@txtr_MedialCut_lattice == 4) zMedialCut = zMedialCut*@txtr_MedialCut_scale + @txtr_MedialCut_scale/zMedialCut elseif (@txtr_MedialCut_lattice == 5) zMedialCut = round(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 6) complex zp_MedialCut = round(zMedialCut*@txtr_MedialCut_scale) complex zc_MedialCut = zMedialCut - (zp_MedialCut/@txtr_MedialCut_scale) if (round(imag(zp_MedialCut))%3==0) zc_MedialCut = (zc_MedialCut + @txtr_MedialCut_scale/2) if (abs(real(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif elseif (round(real(zp_MedialCut))%3==1) zc_MedialCut = (zc_MedialCut - @txtr_MedialCut_scale/2) if (abs(imag(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif else zc_MedialCut = (zc_MedialCut*@txtr_MedialCut_scale*2) if (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif endif endif if (@txtr_MedialCut_size != 0 && @txtr_MedialCut_size != 1) zMedialCut = zMedialCut/@txtr_MedialCut_size endif if (@reachThrough) _zz = zMedialCut endif float textureMedialCut = 0 float txtrMedCut_re1 = 0 float txtrMedCut_re2 = 0 float txtrMedCut_re3 = 0 float txtrMedCut_im1 = 0 float txtrMedCut_im2 = 0 float txtrMedCut_im3 = 0 float granulation = 1000*@txtr_MedialCut_calcScale zMedialCut = (round(zMedialCut*granulation)/granulation - round(zMedialCut*@txtr_MedialCut_calcScale)) * 1000 float txtrMedCut_reCalc = real(zMedialCut) float txtrMedCut_imCalc = imag(zMedialCut) txtrMedCut_re1 = trunc(txtrMedCut_reCalc/100) txtrMedCut_re2 = trunc(txtrMedCut_reCalc/10 - txtrMedCut_re1*10) txtrMedCut_re3 = trunc(txtrMedCut_reCalc/1 - txtrMedCut_re1*100 - txtrMedCut_re2*10) txtrMedCut_im1 = trunc(txtrMedCut_imCalc/100) txtrMedCut_im2 = trunc(txtrMedCut_imCalc/10 - txtrMedCut_im1*10) txtrMedCut_im3 = trunc(txtrMedCut_imCalc/1 - txtrMedCut_im1*100 - txtrMedCut_im2*10) float small = 0 float middl = 0 float large = 0 if (@txtr_MedialCut_type == 0) small = txtrMedCut_re1 middl = txtrMedCut_re2 large = txtrMedCut_re3 elseif (@txtr_MedialCut_type == 1) small = txtrMedCut_im1 middl = txtrMedCut_im2 large = txtrMedCut_im3 elseif (@txtr_MedialCut_type == 2) if (txtrMedCut_re1txtrMedCut_im1) small = txtrMedCut_re1 else small = txtrMedCut_im1 endif if (txtrMedCut_re2>txtrMedCut_im2) middl = txtrMedCut_re2 else middl = txtrMedCut_im2 endif if (txtrMedCut_re3>txtrMedCut_im3) large = txtrMedCut_re3 else large = txtrMedCut_im3 endif elseif (@txtr_MedialCut_type == 4) small = txtrMedCut_re1+txtrMedCut_im1 middl = txtrMedCut_re2+txtrMedCut_im2 large = txtrMedCut_re3+txtrMedCut_im3 elseif (@txtr_MedialCut_type == 5) small = txtrMedCut_re1*txtrMedCut_im1 middl = txtrMedCut_re2*txtrMedCut_im2 large = txtrMedCut_re3*txtrMedCut_im3 elseif (@txtr_MedialCut_type == 6) small = txtrMedCut_re1/txtrMedCut_im1 middl = txtrMedCut_re2/txtrMedCut_im2 large = txtrMedCut_re3/txtrMedCut_im3 elseif (@txtr_MedialCut_type == 7) small = txtrMedCut_im1/txtrMedCut_re1 middl = txtrMedCut_im2/txtrMedCut_re2 large = txtrMedCut_im3/txtrMedCut_re3 elseif (@txtr_MedialCut_type == 8) small = abs(txtrMedCut_im1-txtrMedCut_re1) middl = abs(txtrMedCut_im2-txtrMedCut_re2) large = abs(txtrMedCut_im3-txtrMedCut_re3) endif ; prevent those numbers from being zero: small = small + @txtr_MedialCut_smooth middl = middl + @txtr_MedialCut_smooth large = large + @txtr_MedialCut_smooth ;Golden Cut: small/large = large/whole float sm_mi = abs(small/middl) float mi_la = abs(middl/large) if (@txtr_MedialCut_watch == 0) textureMedialCut = abs(sm_mi-mi_la) elseif (@txtr_MedialCut_watch == 1) if (sm_mimi_la) textureMedialCut = sm_mi else textureMedialCut = mi_la endif elseif (@txtr_MedialCut_watch == 3) textureMedialCut = sm_mi + mi_la elseif (@txtr_MedialCut_watch == 4) textureMedialCut = 1/sm_mi + 1/mi_la elseif (@txtr_MedialCut_watch == 5) textureMedialCut = abs(1/sm_mi - 1/mi_la) endif if (@txtr_MedialCut_limit != 0) textureMedialCut = textureMedialCut%@txtr_MedialCut_limit endif txtr_v_verlauf = 1 if (@f_MedialCut_verlaufMode > 0) if (@f_MedialCut_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MedialCut_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MedialCut_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MedialCut_verlaufOffset endif to_index = to_index + @txtr_MedialCut*txtr_v_verlauf*textureMedialCut endif if (@txtr_Truchet != 0) complex zTruchet = _zz if (@txtr_Truchet_lattice == 0) zTruchet = zTruchet*@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 1) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 2) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale*10) elseif (@txtr_Truchet_lattice == 3) zTruchet = zTruchet-trunc(@txtr_Truchet_scale/zTruchet) elseif (@txtr_Truchet_lattice == 4) zTruchet = zTruchet*@txtr_Truchet_scale + @txtr_Truchet_scale/zTruchet elseif (@txtr_Truchet_lattice == 5) zTruchet = round(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 6) complex zp_Truchet = round(zTruchet*@txtr_Truchet_scale) complex zc_Truchet = zTruchet - (zp_Truchet/@txtr_Truchet_scale) if (round(imag(zp_Truchet))%3==0) zc_Truchet = (zc_Truchet + @txtr_Truchet_scale/2) if (abs(real(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif elseif (round(real(zp_Truchet))%3==1) zc_Truchet = (zc_Truchet - @txtr_Truchet_scale/2) if (abs(imag(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif else zc_Truchet = (zc_Truchet*@txtr_Truchet_scale*2) if (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif endif endif if (@reachThrough) _zz = zTruchet endif float textureTruchet = 0 if (@txtr_Truchet_fixit == 1) ; Minimum textureTruchet = 1.0e20 elseif (@txtr_Truchet_fixit == 2) ; Maximum textureTruchet = -1.0e20 endif complex zcTruchet = 0 complex zzTruchet = 0 complex crTruchet = 0 float truchD1 = 0 float truchD2 = 0 complex truchCorteX = @txtr_Truchet_corte + 1i*@txtr_Truchet_corte complex truchCorteY = @txtr_Truchet_corte - 1i*@txtr_Truchet_corte float reZZTRUCHET = 0 float imZZTRUCHET = 0 int truch_i = 0 while (truch_i < @txtr_Truchet_Iters) if (@txtr_Truchet_size != 0 && @txtr_Truchet_size != 1) zTruchet = zTruchet/@txtr_Truchet_size endif zTruchet = zTruchet*exp(1i*pi/180*@txtr_Truchet_rot) if (truch_i > 0) zTruchet = zTruchet*@txtr_Truchet_mst^truch_i ; *exp(1i*(truch_i)*180/pi*@txtr_Truchet_rotst) endif zcTruchet = round(zTruchet) zzTruchet = zTruchet - zcTruchet reZZTRUCHET = real(zzTruchet) imZZTRUCHET = imag(zzTruchet) crTruchet = 2*(@txtr_Truchet_seed/(zcTruchet+124+truch_i) - \ round(@txtr_Truchet_seed/(zcTruchet+124+truch_i))) if real(crTruchet) > 0 if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteX)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteX)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET - imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET - imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) -@txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif endif else if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteY)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteY)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET + imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) - @txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) + @txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif endif endif if truchD2 < truchD1 if (@txtr_Truchet_watch == 0) truchD1 = truchD2 elseif (@txtr_Truchet_watch == 1) truchD1 = abs(truchD1-truchD2) elseif (@txtr_Truchet_watch == 2) truchD1 = |truchD1-truchD2| elseif (@txtr_Truchet_watch == 3) truchD1 = (truchD1+truchD2)/2 elseif (@txtr_Truchet_watch == 4) truchD1 = truchD1/truchD2 endif endif truch_i = truch_i + 1 if (@txtr_Truchet_fixit == 0) ; last textureTruchet = truchD1 elseif (@txtr_Truchet_fixit == 1) ; min if (textureTruchet > truchD1) textureTruchet = abs(truchD1 - 1/(2^truch_i)) endif elseif (@txtr_Truchet_fixit == 2) ; max if (textureTruchet < truchD1) textureTruchet = truchD1 + 1/(2^truch_i) endif elseif (@txtr_Truchet_fixit == 3) ; sum textureTruchet = textureTruchet + truchD1 elseif (@txtr_Truchet_fixit == 4) ; w-sum textureTruchet = textureTruchet + truchD1/truch_i elseif (@txtr_Truchet_fixit == 5) ; g-sum textureTruchet = textureTruchet + truchD1/(2^truch_i) endif endwhile ; truch_i < @txtr_Truchet_Iters if (@txtr_Truchet_limit != 0) textureTruchet = textureTruchet%@txtr_Truchet_limit endif txtr_v_verlauf = 1 if (@f_Truchet_verlaufMode > 0) if (@f_Truchet_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Truchet_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Truchet_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Truchet_verlaufOffset endif to_index = to_index + @txtr_Truchet^@txtr_Truchet_thick*txtr_v_verlauf*textureTruchet endif if (@txtr_GCD != 0) complex zGCD = _zz if (@txtr_GCD_lattice == 0) zGCD = zGCD*@txtr_GCD_scale elseif (@txtr_GCD_lattice == 1) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 2) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale*10) elseif (@txtr_GCD_lattice == 3) zGCD = zGCD-trunc(@txtr_GCD_scale/zGCD) elseif (@txtr_GCD_lattice == 4) zGCD = zGCD*@txtr_GCD_scale + @txtr_GCD_scale/zGCD elseif (@txtr_GCD_lattice == 5) zGCD = round(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 6) complex zp_GCD = round(zGCD*@txtr_GCD_scale) complex zc_GCD = zGCD - (zp_GCD/@txtr_GCD_scale) if (round(imag(zp_GCD))%3==0) zc_GCD = (zc_GCD + @txtr_GCD_scale/2) if (abs(real(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif elseif (round(real(zp_GCD))%3==1) zc_GCD = (zc_GCD - @txtr_GCD_scale/2) if (abs(imag(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif else zc_GCD = (zc_GCD*@txtr_GCD_scale*2) if (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif endif endif if (@reachThrough) _zz = zGCD endif float textureGCD = 0 if (@txtr_GCD_fixit == 1) ; Minimum textureGCD = 1.0e20 elseif (@txtr_GCD_fixit == 2) ; Maximum textureGCD = -1.0e20 endif float granulation = 1000*@txtr_GCD_calcScale float reGCD = 0 float imGCD = 0 float __gcd = 0 float __chk = 0 float rGCD = 0 int gcd_i = 0 while (gcd_i < @txtr_GCD_Iters) if (@txtr_GCD_size != 0 && @txtr_GCD_size != 1) zGCD = zGCD/@txtr_GCD_size endif zGCD = (round(zGCD*granulation)/granulation - round(zGCD*@txtr_GCD_calcScale)) * 1000 reGCD = abs(real(zGCD)) imGCD = abs(imag(zGCD)) __chk = 2 while (__chk > 1) __gcd = round(reGCD/imGCD) __chk = reGCD - __gcd*imGCD if (__chk > 1) reGCD = imGCD imGCD = __gcd endif endwhile __gcd = __gcd + @txtr_GCD_smooth __chk = __chk + @txtr_GCD_smooth if (@txtr_GCD_watch == 0) ; gcd rGCD = __gcd elseif (@txtr_GCD_watch == 1) ; MinQ GCD/Iter if (__gcd < gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 2) ; MaxQ GCD/Iter if (__gcd > gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 3) ; DCG+Reti rGCD = 1/__gcd + 1/gcd_i elseif (@txtr_GCD_watch == 4) ; DCG-Reti rGCD = abs(1/__gcd - 1/gcd_i) elseif (@txtr_GCD_watch == 5) ; CHK rGCD = __chk elseif (@txtr_GCD_watch == 6) ; MinQ CHK/Iter if (__chk < gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 7) ; MaxQ CHK/Iter if (__chk > gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 8) ; CHK+Iter rGCD = __chk + gcd_i elseif (@txtr_GCD_watch == 9) ; KHC+Reti rGCD = 1/__chk + 1/gcd_i elseif (@txtr_GCD_watch == 10) ; KHC-Reti rGCD = abs(1/__chk - 1/gcd_i) elseif (@txtr_GCD_watch == 11) ; MinQ CHK/GCD if (__chk < __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 12) ; MaxQ CHK/GCD if (__chk > __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 13) ; CHK+GCD rGCD = __chk + __gcd elseif (@txtr_GCD_watch == 14) ; KHC+DCG rGCD = 1/__chk + 1/__gcd elseif (@txtr_GCD_watch == 15) rGCD = abs(1/__chk - 1/__gcd) ; KHC-DCG endif gcd_i = gcd_i + 1 if (@txtr_GCD_fixit == 0) ; last textureGCD = rGCD elseif (@txtr_GCD_fixit == 1) ; min if (textureGCD > rGCD) textureGCD = rGCD ; abs(rGCD - 1/(2^gcd_i)) endif elseif (@txtr_GCD_fixit == 2) ; max if (textureGCD < rGCD) textureGCD = rGCD ; + 1/(2^gcd_i) endif elseif (@txtr_GCD_fixit == 3) ; sum textureGCD = textureGCD + rGCD elseif (@txtr_GCD_fixit == 4) ; w-sum textureGCD = textureGCD + rGCD/gcd_i elseif (@txtr_GCD_fixit == 5) ; g-sum textureGCD = textureGCD + rGCD/(2^gcd_i) endif endwhile ; gcd_i < @txtr_GCD_Iters if (@txtr_GCD_limit != 0) textureGCD = textureGCD%@txtr_GCD_limit endif txtr_v_verlauf = 1 if (@f_GCD_verlaufMode > 0) if (@f_GCD_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_GCD_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_GCD_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_GCD_verlaufOffset endif to_index = to_index + @txtr_GCD*txtr_v_verlauf*textureGCD endif #index = to_index endif ; no_mask default: title = "T Pure Color-By" param watch caption = "Watch for Fixit" enum = "Real" "Imag" "Magn" "Diff" \ "Min(r,i)" "Max(r,i)" "MinQuot" "MaxQuot" "Diff2" \ "Astro01" "Astro02" "Astro03" "Astro12" "Astro21" \ "Astro31" "Astro13" "Astro32" "Astro23" \ "Re+Im" "Re*Im" default = 2 endparam param fixit caption = "Fixit for Color by" enum = "Last" "Minimum" "Maximum" "Sum" \ "W-Sum" "W^2-Sum" "WR-Sum" \ "G-Sum" "G'-Sum" "AG-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" default = 1 endparam param disturbFixFactor caption = "Fixit-Disturbance" default = 0.0 hint = "Disturbs the Fixit for Color By..." endparam param disturbMode caption = "Disturb Fixit Mode" enum = "Log" "Sqrt" "Lin" "Sqr" "AlterGeom" "Geom" "Const" "1/Magn" "1/Real" "1/Imag" "Magn" "Real" "Imag" "1/Diff" "Diff" 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" \ "Iterations" default = 0 endparam param numIterMode caption = "Fix Iterations" enum = "Normal" "#Numiter always" "Relative" "Difference" \ "Rel. Diff." "Average" 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 startDistortion caption = "Start Distortion" enum = "#z" "Transformed z" "Pixel" "Mixel" default = 0 endparam param minMax caption = "Min/Max" default = FALSE endparam param xWaveMode caption = "x-Wave Mode" enum = "None" "x*sin(x)" "x*cos(x)" "x*sin(y)" "x*cos(y)" default = 0 endparam param yWaveMode caption = "y-Wave Mode" enum = "None" "y*sin(y)" "y*cos(y)" "y*sin(x)" "y*cos(x)" default = 0 endparam param xWaveFreq caption = "x-Wave Frequency" default = 1.0 endparam param yWaveFreq caption = "y-Wave Frequencx" default = 1.0 endparam param xWaveWeight caption = "x-Wave Weight" default = 1.0 endparam param yWaveWeight caption = "y-Wave Weight" default = 1.0 endparam param xWaveConst caption = "x-Wave Const" default = 0.0 endparam param yWaveConst caption = "y-Wave Const" default = 0.0 endparam param xWaveOffset caption = "x-Wave Offset" default = 0.0 endparam param yWaveOffset caption = "y-Wave Offset" default = 0.0 endparam param xWaveExp caption = "x-Wave Exponent" default = 1.0 endparam param yWaveEyp caption = "y-Wave Eyponent" default = 1.0 endparam param wavesLoop caption = "# Waves Loops" default = 1 min = 1 endparam param wavesLoopMode caption = "Mode Waves Loops" enum = "Static" "Dynamic" default = 0 endparam param wavesGrowFreq caption = "Waves: FreqGrowth" default = 1.0 min = 1e-99 endparam param rotDegree caption = "Degré de Rotation" default = 0.0 min = -359.99999 max = 359.99999 hint = "Does not work with Color by Fiximum Distance" endparam param rotCentre caption = "Centre de Rotation" default = (0.0,0.0) endparam param zJouk caption = "Joukowskij: Constant" default = (0.0,0.0) endparam param vectorJouk caption = "Joukowskij: Vector " default = (0.0,0.0) endparam param curveJouk caption = "Joukowskij Curvature" default = (0.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" "Hex" 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 lattOffset caption = "Lattice Offset" default = (0.0,0.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 globalScale caption = "Global Scale" default = 0.0 min = 0.0 endparam param globalDither caption = "L: Global Dither (GD) Scale" default = 0.0 hint = "Choose 1, 10, 50, 100 as experimental values and then start fine tuning." endparam param shape caption = "L: GD: Shape" enum = "None" "Circle" "Real" "Imag" "Diamond" "Skew" \ "!Circle" "!Real" "!Imag" "!Diamond" "!Skew" endparam param radius caption = "L: GD: Radius for Shapes" default = 0.5 endparam param inner_scale caption = "L: GD: Inner Scale" default = 3.0 hint = "Choose 1, 10, 50, 100 as experimental values \ and then start fine tuning." endparam param inner_amount caption = "L: GD: Inner Amount" default = 0.0 endparam param d_randomness caption = "L: GD-Randomness" hint = "This adds a randomness in the outlines." default = 0.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 turnScaleMode caption = "L: ScaleMode Turnaround" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Turnaround Scale > 0" endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param barnMode caption = "L: Barnsley Mode" enum = "None" "First" "Second" default = 0 endparam param barnScale caption = "L: Barnsley Scale" default = 0.0 min = 0.0 endparam param barnScaleMode caption = "L: ScaleMode Barnsley" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Barnsley Scale > 0" endparam param barnSeed caption = "L: Barnsley Seed" default = (0.6, 1.1) endparam param barnShift caption = "L: Barnsley Shift" default = 1.0 endparam param disturb_fbm caption = "L: Noise Strength" default = 0.0 min = 0.0 endparam param disturb_fbm_mode caption = "L: Noise Mode" enum = "Sum only" "Angle only" "fBm Pixel only" \ "fBm Pix*Sum" \ "fBm Pixel added" "fBm Pixel W-added" "fBm Pix*Sum added" \ "fBm Pix*Sum W-added" \ "fBm Pix*Angle" "fBm Pix*Angle added" "fBm Pix*Angle W-added" "fBm Pix*Angle Avg" default = 0 endparam param disturb_fbm_apply caption = "L: Noise Apply" enum = "Pixel" "Fixit" default = 0 endparam param disturb_fbm_scale caption = "L: Noise Scale" default = 1.0 endparam param disturb_fbm_octaves caption = "L: Noise Loops" default = 9 endparam param disturb_fbm_lattice caption = "L: Noise Lattice" default = false endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param txtr_verlauf_Line1 caption = "T: Bottom, Left, or Center" default = (0.0,0.0) hint = "First line for growth calculation. Might be the bottom in TB mode, \ might be the left border in LR mode, IS the center in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Line2 caption = "T: Top, Right, or Radius" default = (1.0,1.0) hint = "Second line for growth calculation. Might be the top in TB mode, \ might be the right border in LR mode, IS the radius in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_exponent caption = "T: Txtr Exponent" default = 1.5 hint = "Choose 1 for linear growth, 1.5-2 for (smoother) *quadratic* growth, \ other values to your free fun experiments... \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Rot caption = "T: Txtr Rotation" default = 0.0 min = -45.0 max = 45.0 endparam param txtr_verlauf_RotCentre caption = "T: Txtr Rot Centre" default = (0.0, 0.0) endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param f_rand_verlaufMode caption = "T: Random Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 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 f_Gnarl_verlaufMode caption = "T: Gnarl Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gnarl_verlaufOffset caption = "T: Gnarl V-Offset" default = 0.0 min = 0.0 endparam param txtr_gnarl_lattice caption = "T: Gnarl Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param f_PopCorn_verlaufMode caption = "T: PopCorn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_PopCorn_verlaufOffset caption = "T: PopCorn V-Offset" default = 0.0 min = 0.0 endparam param txtr_PopCorn_lattice caption = "T: PopCorn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_SFBM_verlaufMode caption = "T: SFBM Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SFBM_verlaufOffset caption = "T: SFBM V-Offset" default = 0.0 min = 0.0 endparam param txtr_SFBM_lattice caption = "T: SFBM Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Primes_verlaufMode caption = "T: Primes Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Primes_verlaufOffset caption = "T: Primes V-Offset" default = 0.0 min = 0.0 endparam param txtr_Primes_lattice caption = "T: Primes Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Gauss_verlaufMode caption = "T: Gauss Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gauss_verlaufOffset caption = "T: Gauss V-Offset" default = 0.0 min = 0.0 endparam param txtr_Gauss_lattice caption = "T: Gauss Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 txtr_Turn caption = "T: Turn Texture" hint = "This adds a Turn texture to the coloring." default = 0.0 endparam param f_Turn_verlaufMode caption = "T: Turn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Turn_verlaufOffset caption = "T: Turn V-Offset" default = 0.0 min = 0.0 endparam param txtr_Turn_lattice caption = "T: Turn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Turn_scale caption = "T: Turn Scale" hint = "Scaling Factor for this Turn texture." default = 1.0 endparam param txtr_Turn_size caption = "T: Turn Pattern Size" default = 1.0 endparam param txtr_Turn_limit caption = "T: Turn Limitation" default = 0.0 min = 0.0 endparam param txtr_Turn_corte1 caption = "T: Turnaround #1" default = 4.0 endparam param txtr_Turn_corte2 caption = "T: Turnaround #2" default = 2.0 endparam param txtr_Check caption = "T: Checker Texture" hint = "This adds a Check texture to the coloring." default = 0.0 endparam param f_Check_verlaufMode caption = "T: Checker Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Check_verlaufOffset caption = "T: Checker V-Offset" default = 0.0 min = 0.0 endparam param txtr_Check_scale caption = "T: Checker Scale" hint = "Scaling Factor for this Check texture." default = 1.0 endparam param txtr_Checker caption = "T: Checker Modulus" default = 2 min = 2 endparam param txtr_Check_test caption = "T: Checker Test Mode" enum = "Sum" "Prod" default = 1 endparam param txtr_Check_shape caption = "T: Checker Shape" enum = "Square" "Circle" \ "Square in Circle" "Circle in Square" \ "Segment" "Time" \ "H Bricks" "V Bricks" \ "I Ging" "I Went" \ "Broken Circle" \ "Cross" "Anti-Cross" \ "Bite" "Anti-Bite" "Mooon" "Trianguli" "Nose" \ "Broken Square" "BonBon" "Quizzle" "Hipster" "Broken Net" \ "New Moon" "Ti Moon" "Moon and Venus" "Venus and Moon" \ "Smiley" "Inv Smiley" "Frowney" "Inv Frowney" default = 0 endparam param txtr_Check_shConst caption = "T: Chk-Sh-Const" default = 1.0 endparam param txtr_Check_col caption = "T: Checker Color Mode" enum = "Flag" "Magn" "Iter" "Magn*Iter" "Dist Center" default = 0 endparam param txtr_Check_invert caption = "T: Inverse Checkers?" default = false endparam param txtr_Check_divide caption = "T: Divide Checkers?" enum = "None" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" default = 0 endparam param txtr_Check_limit caption = "T: Checker Limitation" default = 0.0 min = 0.0 endparam param txtr_Pick153 caption = "T: Pick153 Texture" hint = "This adds a Pick153 texture to the coloring." default = 0.0 endparam param f_Pick153_verlaufMode caption = "T: Pick153 Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Pick153_verlaufOffset caption = "T: Pick153 V-Offset" default = 0.0 min = 0.0 endparam param txtr_Pick153_lattice caption = "T: Pick153 Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Pick153_scale caption = "T: Pick153 Scale" hint = "Scaling Factor for this Pick153 texture." default = 1.0 endparam param txtr_scale153 caption = "T: Calc Scale 153" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_numOfTestsPick153 caption = "T: Pick153 Tests" hint = "Pick153 texture." default = 1 endparam param txtr_Pick153_col caption = "T: Pick153 Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_Pick153_limit caption = "T: Pick153 Limitation" default = 0.0 min = 0.0 endparam param txtr_SumDiv caption = "T: SumDiv Texture" hint = "This adds a SumDiv texture to the coloring." default = 0.0 endparam param f_SumDiv_verlaufMode caption = "T: SumDiv Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SumDiv_verlaufOffset caption = "T: SumDiv V-Offset" default = 0.0 min = 0.0 endparam param txtr_SumDiv_lattice caption = "T: SumDiv Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_SumDiv_scale caption = "T: SumDiv Scale" hint = "Scaling Factor for this SumDiv texture." default = 1.0 endparam param txtr_scaleSumDiv caption = "T: SumDiv Pattern Size" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_SumDiv_col caption = "T: SumDiv Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_SumDiv_mode caption = "T: SumDiv Calc Mode" enum = "Sum" "Quot" default = 0 endparam param txtr_SumDiv_limit caption = "T: SumDiv Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB caption = "T: MLAB Texture" hint = "This adds a MLAB texture to the coloring." default = 0.0 endparam param f_MLAB_verlaufMode caption = "T: MLAB Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MLAB_verlaufOffset caption = "T: MLAB V-Offset" default = 0.0 min = 0.0 endparam param txtr_MLAB_lattice caption = "T: MLAB Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MLAB_scale caption = "T: MLAB Scale" hint = "Scaling Factor for this MLAB texture." default = 1.0 endparam param txtr_MLAB_size caption = "T: MLAB Pattern Size" default = 1.0 endparam param txtr_MLAB_limit caption = "T: MLAB Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB_scalo caption = "T: MLAB CalcScale" default = 1.0 endparam param txtr_MLAB_divi caption = "T: MLAB Divisions" default = 4 endparam param txtr_MLAB_edge caption = "T: MLAB Edge" default = .8 endparam param txtr_MLAB_pro0 caption = "T: MLAB Prob-ty 0" default = (.25, .5) endparam param txtr_MLAB_pro1 caption = "T: MLAB Prob-ty 1" default = (.75, 1) endparam param txtr_MLAB_vari caption = "T: MLAB Variance" default = 1024.0 endparam param txtr_Banana caption = "T: Banana Texture" hint = "This adds a Banana texture to the coloring." default = 0.0 endparam param txtr_Banana_type caption = "T: Banana Type" enum = "Polyominos" \ "Original" "Ori/Polyominos" "Ori + Polyominos" "Ori + InvPoly" \ "Diff(Ori,Poly)" "Diff(Ori,InvPoly)" \ "Diff Banana" "Thoughtless" default = 1 endparam param f_Banana_verlaufMode caption = "T: Banana Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Banana_verlaufOffset caption = "T: Banana V-Offset" default = 0.0 min = 0.0 endparam param txtr_Banana_lattice caption = "T: Banana Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Banana_scale caption = "T: Banana Scale" hint = "Scaling Factor for this Banana texture." default = 1.0 endparam param txtr_Banana_size caption = "T: Banana Pattern Size" default = 1.0 endparam param txtr_Banana_limit caption = "T: Banana Limitation" default = 0.0 min = 0.0 endparam param txtr_Banana_scalo caption = "T: Banana CalcScale" default = 1.0 endparam param txtr_Banana_divi caption = "T: Banana Divisions" default = 4 endparam param txtr_Banana_ratio caption = "T: Ratio" default = (.5, .5) endparam param txtr_Banana_edge caption = "T: Banana Edge" default = .8 endparam param txtr_Banana_itre caption = "T: Inside" enum = "Continuous" "Solid" "Random" "Clear" default = 0 endparam param txtr_Banana_otre caption = "T: Outside" enum = "Continuous" "Solid" "Clear" default = 0 endparam param txtr_Banana_pro0 caption = "T: Banana Prob-ty 0" default = (.25, .5) endparam param txtr_Banana_pro1 caption = "T: Banana Prob-ty 1" default = (.75, 1) endparam param txtr_Banana_vari caption = "T: Banana Variance" default = 1024.0 endparam param txtr_Banana_seed0 caption = "T: Seed 0" default = 3779 endparam param txtr_Banana_seed1 caption = "T: Seed 1" default = 9377 endparam param txtr_Ell caption = "T: Elliptic Texture" hint = "This adds a Elliptic texture to the coloring." default = 0.0 endparam param txtr_Ell_type caption = "T: Elliptic Type" enum = "Magn Diff" "Real Diff" "Imag Diff" "Angel Diff" "Angle Diff" \ "Magn Quot" "Real Quot" "Imag Quot" "Angel Quot" "Angle Quot" \ "Magn Qout" "Real Qout" "Imag Qout" "Angel Qout" "Angle Qout" \ "Magn Pola" "Real Pola" "Imag Pola" "Angel Pola" "Angle Pola" default = 0 endparam param f_Ell_verlaufMode caption = "T: Elliptic Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Ell_verlaufOffset caption = "T: Elliptic V-Offset" default = 0.0 min = 0.0 endparam param txtr_Ell_lattice caption = "T: Elliptic Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Ell_scale caption = "T: Elliptic Scale" hint = "Scaling Factor for this Elliptic texture." default = 1.0 endparam param txtr_Ell_size caption = "T: Elliptic Pattern Size" default = 1.0 endparam param txtr_Ell_a caption = "T: Elliptic a" default = -1 endparam param txtr_Ell_b caption = "T: Elliptic b" default = -1 endparam param txtr_Ell_c caption = "T: Elliptic c" default = 1 endparam param txtr_Ell_d caption = "T: Elliptic d" default = 0 endparam param txtr_Ell_pseudo caption = "T: Pseudo Elliptic" default = true hint = "separate transforming real and imag" endparam param txtr_Ell_pseudoMix caption = "T: Pseudo Mix Real and Imag" default = false hint = "only in use with Pseudo Elliptic" endparam param txtr_Ell_mixMode caption = "T: Mix Mode for Pseudo Mix" enum = "Normal" "Difference" "Sum" "Product" "Exponent" endparam param txtr_Ell_limit caption = "T: Elliptic Limitation" default = 0.0 min = 0.0 endparam param txtr_MedialCut caption = "T: MedialCut Texture" hint = "This adds a MedialCut texture to the coloring." default = 0.0 endparam param f_MedialCut_verlaufMode caption = "T: MedialCut Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MedialCut_verlaufOffset caption = "T: MedialCut V-Offset" default = 0.0 min = 0.0 endparam param txtr_MedialCut_lattice caption = "T: MedialCut Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MedialCut_type caption = "T: MedialCut Type" enum = "Real" "Imag" "Min(Real,Imag)" "Max(Real,Imag)" \ "Sum" "Prod" "Real/Imag" "Imag/Real" "Diff" endparam param txtr_MedialCut_watch caption = "T: MedialCut Watch for Calc" enum = "Diff" "Min" "Max" "Sum" "Recip Sum" "Recip Diff" default = 0 endparam param txtr_MedialCut_scale caption = "T: MedialCut Scale" hint = "Scaling Factor for this MedialCut texture." default = 1.0 endparam param txtr_MedialCut_size caption = "T: MedialCut Pattern Size" default = 1.0 endparam param txtr_MedialCut_calcScale caption = "T: MedialCut Calc Scale" default = 1.0 min = 0 endparam param txtr_MedialCut_smooth caption = "T: MedialCut Smooth" default = 0.1 min = 1e-99 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_MedialCut_limit caption = "T: MedialCut Limitation" default = 0.0 min = 0.0 endparam param txtr_Truchet caption = "T: Truchet Texture" hint = "This adds a Truchet texture to the coloring." default = 0.0 endparam param f_Truchet_verlaufMode caption = "T: Truchet Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Truchet_verlaufOffset caption = "T: Truchet V-Offset" default = 0.0 min = 0.0 endparam param txtr_Truchet_lattice caption = "T: Truchet Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Truchet_mode caption = "T: Truchet Mode" default = 0 enum = "Roundy" "Squarry" "Worry" "Wyrry" "Harry" "Kirre" "Sally" endparam param txtr_Truchet_watch caption = "T: Truchet Watch" default = 0 enum = "Truchet" "Trechut" "Techtur" "Tuchter" "RetChut" endparam param txtr_Truchet_fixit caption = "T: Truchet Fixit" default = 0 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_Truchet_scale caption = "T: Truchet Scale" hint = "Scaling Factor for this Truchet texture." default = 1.0 endparam param txtr_Truchet_size caption = "T: Truchet Pat Size" default = 1.0 endparam param txtr_Truchet_corte caption = "T: Truchet Cutting Edges" default = .5 endparam param txtr_Truchet_rot caption = "T: Truchet Rotation" default = 0.0 endparam param txtr_Truchet_mst caption = "T: Truchet Magn Step" default = 2.0 endparam param txtr_Truchet_thick caption = "T: Truchet Thickness" default = 0.1 endparam param txtr_Truchet_Iters caption = "T: Truchet Iterations" default = 1 endparam param txtr_Truchet_seed caption = "T: Truchet Seed" default = 1234567890 endparam param txtr_Truchet_limit caption = "T: Truchet Limitation" default = 0.0 min = 0.0 endparam param txtr_GCD caption = "T: GCD Texture" hint = "This adds a GCD texture to the coloring." default = 0.0 endparam param f_GCD_verlaufMode caption = "T: GCD Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_GCD_verlaufOffset caption = "T: GCD V-Offset" default = 0.0 min = 0.0 endparam param txtr_GCD_lattice caption = "T: GCD Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_GCD_watch caption = "T: GCD Watch" enum = "GCD" "MinQ GCD/Iter" "MaxQ GCD/Iter" "DCG+Reti" "DCG-Reti" \ "CHK" "MinQ CHK/Iter" "MaxQ CHK/Iter" "CHK+Iter" "KHC+Reti" "KHC-Reti" \ "MinQ CHK/GCD" "MaxQ CHK/GCD" "CHK+GCD" "KHC+DCG" "KHC-DCG" default = 0 endparam param txtr_GCD_fixit caption = "T: GCD Fixit" default = 1 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_GCD_scale caption = "T: GCD Scale" hint = "Scaling Factor for this GCD texture." default = 1.0 endparam param txtr_GCD_size caption = "T: GCD Pattern Size" default = 1.0 endparam param txtr_GCD_calcScale caption = "T: GCD Calc Scale" default = 0.003 endparam param txtr_GCD_Iters caption = "T: GCD Iterations" default = 2 endparam param txtr_GCD_smooth caption = "T: GCD Smooth" default = 1e-10 min = 0.0 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_GCD_limit caption = "T: GCD 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 func startFct caption = "Start Function" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc func barnFct1 caption = "Barnsley Fnctn 1" default = flip() endfunc func barnFct2 caption = "Barnsley Fnctn 2" default = flip() endfunc } akl-coconut { ; ; Comments are in the folder comments ; ; Andreas Lober, November 12, 2000 ; init: complex oldOldOldOldZ = 0 complex oldOldOldZ = 0 complex oldOldZ = 0 complex oldZ = 0 complex z = 0 complex p = 0 complex vector1 = 0 float r = 0 float rfix = 0 float rtrap = 0 if (@fixit == 1) ; Minimum rfix = 1.0e20 elseif (@fixit == 2) ; Maximum rfix = -1.0e20 endif int iter = 0 float ifix = 0 float itrap = 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) float x = 0 float y = 0 complex zStart = 0 complex zfix = (0.0,0.0) complex cfix = (0.0,0.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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; float fbmSum = 0 float fbmAngle = 0 complex fbmDisturbPix = 0 if (@disturb_fbm > 0) float fbmAmplitude = 1.0 int i_fbm = 0 complex fbmPix = 0 if (@disturb_fbm_lattice) fbmPix = #pixel - round(#pixel*@disturb_fbm_scale)/@disturb_fbm_scale else fbmPix = #pixel*@disturb_fbm_scale endif while (i_fbm < @disturb_fbm_octaves) float fbmBx0 = floor(real(fbmPix)) float fbmBx1 = fbmBx0 + 1 float fbmRx0 = real(fbmPix) - floor(real(fbmPix)) float fbmRx1 = fbmRx0 - 1 float fbmBy0 = floor(imag(fbmPix)) float fbmBy1 = fbmBy0 + 1 float fbmRy0 = imag(fbmPix) - floor(imag(fbmPix)) float fbmRy1 = fbmRy0 - 1 if fbmBx0 < 0 fbmBx0 = fbmBx0 + 8192 endif if fbmBx1 < 0 fbmBx1 = fbmBx1 + 8192 endif if fbmBy0 < 0 fbmBy0 = fbmBy0 + 8192 endif if fbmBy1 < 0 fbmBy1 = fbmBy1 + 8192 endif float fbmTmp = 0 float fbmSX = fbmRx0 * fbmRx0 * (3 - 2 * fbmRx0) float fbmSY = fbmRy0 * fbmRy0 * (3 - 2 * fbmRy0) fbmTmp = fbmBx0^2*2473 % 65536 float b00 = (fbmTmp + fbmBy0)^2 % 65536 float b01 = (fbmTmp + fbmBy1)^2 % 65536 fbmTmp = fbmBx1^2*2473 % 65536 float b10 = (fbmTmp + fbmBy0)^2 % 65536 float b11 = (fbmTmp + fbmBy1)^2 % 65536 float fbmPoint000 = b00^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint010 = b01^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint100 = b10^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint110 = b11^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint001 = (b00 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint011 = (b01 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint101 = (b10 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint111 = (b11 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 fbmTmp = sqrt(fbmPoint000^2 + fbmPoint001^2) fbmPoint000 = fbmPoint000 / fbmTmp fbmPoint001 = fbmPoint001 / fbmTmp fbmTmp = sqrt(fbmPoint010^2 + fbmPoint011^2) fbmPoint010 = fbmPoint010 / fbmTmp fbmPoint011 = fbmPoint011 / fbmTmp fbmTmp = sqrt(fbmPoint100^2 + fbmPoint101^2) fbmPoint100 = fbmPoint100 / fbmTmp fbmPoint101 = fbmPoint101 / fbmTmp fbmTmp = sqrt(fbmPoint110^2 + fbmPoint111^2) fbmPoint110 = fbmPoint110 / fbmTmp fbmPoint111 = fbmPoint111 / fbmTmp float fbmU1 = fbmRx0 * fbmPoint000 + fbmRy0 * fbmPoint001 float fbmV1 = fbmRx1 * fbmPoint100 + fbmRy0 * fbmPoint101 float fbmPtX = fbmU1 + fbmSX * (fbmV1 - fbmU1) float fbmU2 = fbmRx0 * fbmPoint010 + fbmRy1 * fbmPoint011 float fbmV2 = fbmRx1 * fbmPoint110 + fbmRy1 * fbmPoint111 float fbmPtY = fbmU2 + fbmSY * (fbmV2 - fbmU2) fbmSum = fbmSum + fbmPtX + fbmSY*(fbmPtY - fbmPtX) * fbmAmplitude fbmAngle = atan2(fbmPtX+1i*fbmPtY)/(2*#pi) if (fbmAngle < 0) fbmAngle = fbmAngle + 1 endif fbmAmplitude = fbmAmplitude/2 fbmPix = fbmPix / 0.5 i_fbm = i_fbm + 1 if (@disturb_fbm_mode >= 2) fbmHelp = abs(fbmPtX + 1i*fbmPtY) if (@disturb_fbm_mode == 2) ; fBm Pixel only fbmDisturbPix = fbmHelp elseif (@disturb_fbm_mode == 3) ; fBm Pix*Sum fbmDisturbPix = fbmSum*fbmHelp elseif (@disturb_fbm_mode == 4) ; fBm Pixel added fbmDisturbPix = fbmDisturbPix + fbmHelp elseif (@disturb_fbm_mode == 5) ; fBm Pixel W-added fbmDisturbPix = fbmDisturbPix + fbmHelp/i_fbm elseif (@disturb_fbm_mode == 6) ; fBm Pix*Sum added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp elseif (@disturb_fbm_mode == 7) ; fBm Pix*Sum W-added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 8) ; fBm Pix*Angle fbmDisturbPix = fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 9) ; fBm Pix*Angle added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 10) ; fBm Pix*Angle W-added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 11) ; fBm Pix*Angle Avg fbmDisturbPix = (fbmDisturbPix + fbmAngle*fbmHelp)/fbmSum endif endif endwhile endif ;Variables for Verlauf float txtr_v_verlauf = 1 float txtr_v_hor1 = 0 float txtr_v_hor2 = 0 float txtr_v_bot = 0 float txtr_v_top = 0 float txtr_v_height = 0 float txtr_v_vert1 = 0 float txtr_v_vert2 = 0 float txtr_v_left = 0 float txtr_v_rigt = 0 float txtr_v_width = 0 float txtr_v_yPos = 0 float txtr_v_xPos = 0 ; Variables for Waves int l_waves = @wavesLoop int xWavesM = @xWaveMode int yWavesM = @yWaveMode float xWavesF = @xWaveFreq float yWavesF = @yWaveFreq loop: 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) oldOldOldOldZ = oldOldOldZ oldOldOldZ = oldOldZ oldOldZ = oldZ oldZ = zStart 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; if (@globalScale != 0 && @globalScale != 1) zStart = zStart*@globalScale endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 0) if (@disturb_fbm_mode == 0) zStart = zStart*(1+@disturb_fbm*fbmSum) elseif (@disturb_fbm_mode == 1) zStart = zStart*(1+@disturb_fbm*fbmAngle) else zStart = zStart + @disturb_fbm*fbmDisturbPix endif endif if (@globalDither != 0) complex innerScaleZ = 0 complex innerOffset = 0 if (@inner_amount != 0 && zStart != 0) innerScaleZ = zStart*@inner_scale*@globalDither innerOffset = innerOffset + \ @inner_amount*round(innerScaleZ)/(innerScaleZ) endif if (@d_randomness != 0) innerOffset = innerOffset + @d_randomness*#random endif bool shapeCondition = true float ditherRadius = @radius/@globalDither if (@shape == 1) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) < ditherRadius) elseif (@shape == 2) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 3) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 4) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 5) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 6) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) > ditherRadius) elseif (@shape == 7) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 8) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 9) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) elseif (@shape == 10) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) endif if (shapeCondition) zStart = round(zStart*@globalDither + innerOffset)/@globalDither \ - innerOffset/@globalDither endif 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 ; complex zOffset = zStart-@lattOffset if (@lattice == 1) zStart = round(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zOffset) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 8) zStart = floor(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 10) zStart = abs(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*zOffset^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^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(zOffset) float imZ = imL1*imag(zOffset) 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 elseif (@lattice == 24) complex lzp = round(zOffset*@lattFac1) complex lzc = zOffset-(lzp/@lattFac2) float rlf = real(@lattFac1) if (round(imag(lzp))%3 == 0) lzc = (lzc+@lattFac2/2) if (abs(real(lzc)) > rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) < rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif elseif (round(real(lzp))%3 == 1) lzc = (lzc-@lattFac2/2) if (abs(imag(lzc)) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif else lzc = (lzc*@lattFac2*2) if (imag(lzc) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif endif endif ; lattices if (@turnMode) complex zRound = 0 complex zZ = zStart if (@turnScale != 0) if (@turnScaleMode == 0) zRound = round(zStart*@turnScale)/@turnScale elseif (@turnScaleMode == 1) zRound = round(cabs(zStart)*@turnScale)/@turnScale elseif (@turnScaleMode == 2) zRound = sqrt(|round(zStart*@turnScale)|)/@turnScale endif ; turnScaleMode 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 if (@barnMode > 0) float barnRe = real(@barnSeed) float barnIm = imag(@barnSeed) complex zRound = 0 complex zZ = zStart if (@barnScale != 0) if (@barnScaleMode == 0) zRound = round(zStart*@barnScale)/@barnScale elseif (@barnScaleMode == 1) zRound = round(cabs(zStart)*@barnScale)/@barnScale elseif (@barnScaleMode == 2) zRound = sqrt(|round(zStart*@barnScale)|)/@barnScale endif ; barnScaleMode complex zZ = zStart-zRound endif bool test = false if (@barnMode == 1) test = (real(zStart)*barnIm + barnRe*imag(zStart) >= 0) else test = (|real(zStart)*barnIm - barnRe*imag(zStart)| < .5) endif ; barnMode if (test) zStart = @barnFct1(zZ - @barnShift)*@barnSeed+zRound else zStart = @barnFct2(zZ + @barnShift)*@barnSeed+zRound endif ; test endif ; @barnMode > 0 if (@zJouk != 0 && zStart != 0) zStart = zStart + @zJouk/zStart endif ; calculate the "vector" x = real(zStart) y = imag(zStart) if (@vectorJouk != 0 && zStart != 0) zStart = zStart + @vectorJouk/zStart endif if (iter >= @startColouring) r=0.0 if (@startDistortion == 0) p = #z elseif (@startDistortion == 1) p = zStart elseif (@startDistortion == 2) p = #pixel elseif (@startDistortion == 3) p = (zStart+#pixel)/2 endif if (@minMax) float xm = -1 float ym = -1 if (x < y) xm = x ym = y else xm = y ym = x endif x = xm y = ym endif ; Wave stuff int loop_i = 0 while (loop_i < l_waves) loop_i = loop_i + 1 if (@wavesLoopMode == 1) ; cyclic xWavesM = (xWavesM+1)%5 yWavesM = (yWavesM+1)%5 endif if (xWavesM == 1) ; x*sin(x) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 2) ; x*cos(x) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 3) ; x*sin(y) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*y + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 4) ; x*cos(y) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*y + @xWaveOffset)^@xWaveExp) endif if (yWavesM == 1) ; y*sin(y) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 2) ; y*cos(y) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 3) ; y*sin(x) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*x + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 4) ; y*cos(x) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*x + @yWaveOffset)^@yWaveEyp) endif if (@wavesGrowFreq != 1) xWavesF = xWavesF*@wavesGrowFreq yWavesF = yWavesF*@wavesGrowFreq endif endwhile ; wave stuff if (@curveJouk != 0) if (x != 0) x = x + real(@curveJouk)/x endif if (y != 0) y = y + imag(@curveJouk)/y endif endif z = x + 1i*y if (@projSmooth == 0) vector1 = z-oldZ elseif (@projSmooth == 1) vector1 = (z+oldZ)/2 elseif (@projSmooth == 2) vector1 = (z+oldZ)/2-oldOldZ elseif (@projSmooth == 3) vector1 = oldZ-oldOldZ elseif (@projSmooth == 4) vector1 = (oldZ+oldOldZ)/2 elseif (@projSmooth == 5) vector1 = (oldZ+oldOldZ)/2-oldOldOldZ elseif (@projSmooth == 6) vector1 = oldOldZ-oldOldOldZ elseif (@projSmooth == 7) vector1 = (oldOldZ+oldOldOldZ)/2 elseif (@projSmooth == 8) vector1 = (oldOldZ+oldOldOldZ)/2-oldOldOldOldZ elseif (@projSmooth == 9) vector1 = oldOldOldZ-oldOldOldOldZ elseif (@projSmooth == 10) vector1 = (oldOldOldZ+oldOldOldOldZ)/2 elseif (@projSmooth == 11) vector1 = (oldOldOldZ+oldOldOldOldZ)/2-z elseif (@projSmooth == 12) vector1 = oldOldOldOldZ-z elseif (@projSmooth == 13) vector1 = (oldOldOldOldZ+z)/2 elseif (@projSmooth == 14) vector1 = (oldOldOldOldZ+z)/2-oldZ endif ; projection of zStart on vector1 vector1 = (real(z)*real(vector1) + imag(z)*imag(vector1))/|vector1|*vector1 vector1 = @ProjFct1(vector1) complex ZAT = 0 if (@projectionStart == 0) ZAT = z elseif (@projectionStart == 1) ZAT = #pixel endif ZAT = @ProjFct2(ZAT) if (@projectionMode == 0) z = vector1 elseif (@projectionMode == 1) z = vector1 - ZAT elseif (@projectionMode == 2) z = vector1 / ZAT elseif (@projectionMode == 3) z = vector1 + ZAT elseif (@projectionMode == 4) z = ZAT / vector1 elseif (@projectionMode == 5) z = real(ZAT)*real(vector1) + 1i*imag(ZAT)*imag(vector1) elseif (@projectionMode == 6) z = real(ZAT)*imag(vector1) + 1i*imag(ZAT)*real(vector1) elseif (@projectionMode == 7) z = real(ZAT)*imag(vector1) + 1i*imag(ZAT)*real(vector1) endif z = @projFct3(z) float rz = |real(z)| float iz = |imag(z)| if (@watch == 0) ; real r = rz elseif (@watch == 1) ; imag r = iz elseif (@watch == 2) ; magn r = |z| elseif (@watch == 3) ; diff r = |rz-iz| 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 = |z-zStart| 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 float disturbFix = 0 if (@disturbFixFactor != 0) float dtmp = 1 if (@disturbMode == 0) ; Log dtmp = 1/log(iter) elseif (@disturbMode == 1) ; Sqrt dtmp = 1/sqrt(iter) elseif (@disturbMode == 2) ; Lin dtmp = 1/iter elseif (@disturbMode == 3) ; Sqr dtmp = 1/iter^2 elseif (@disturbMode == 4) ; AlterGeom dtmp = 1/(exp(-iter)*(-1)^iter) elseif (@disturbMode == 5) ; Geom dtmp = 1/(exp(-iter)*iter) elseif (@disturbMode == 6) ; Const dtmp = 1 elseif (@disturbMode == 7) ; Const dtmp = 1/|zstart| elseif (@disturbMode == 8) ; Const dtmp = 1/|real(zstart)| elseif (@disturbMode == 9) ; Const dtmp = 1/|imag(zstart)| elseif (@disturbMode == 10) ; Const dtmp = |zstart| elseif (@disturbMode == 11) ; Const dtmp = |real(zstart)| elseif (@disturbMode == 12) ; Const dtmp = |imag(zstart)| elseif (@disturbMode == 13) ; Const dtmp = 1/|real(zstart)-imag(zstart)| elseif (@disturbMode == 14) ; Const dtmp = |real(zstart)-imag(zstart)| endif disturbFix = @disturbFixFactor*dtmp endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 1) if (@disturb_fbm_mode == 0) disturbFix = @disturb_fbm*fbmSum elseif (@disturb_fbm_mode == 1) disturbFix = @disturb_fbm*fbmAngle else disturbFix = @disturb_fbm*cabs(fbmDisturbPix) endif endif if (@fixit == 0) ; Last rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix elseif (@fixit == 1) ; Minimum if (r < rfix) rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix endif elseif (@fixit == 2) ; Maximum if (r > rfix) rfix = r - disturbFix ifix = iter - disturbFix zfix = zStart - disturbFix cfix = p - disturbFix endif elseif (@fixit == 3) ; sum rfix = rfix + r + disturbFix ifix = ifix + iter + disturbFix zfix = zfix + zStart + disturbFix cfix = cfix + p + disturbFix elseif (@fixit == 4) ; w-sum rfix = rfix + r/iter + disturbFix ifix = (ifix + iter)/iter + disturbFix zfix = zfix + zStart/iter + disturbFix cfix = cfix + p/iter + disturbFix elseif (@fixit == 5) ; w2-sum float itmp = iter^2 rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 6) ; wS-sum float itmp = sqrt(iter) rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 7) ; g-sum float itmp = exp(-iter) rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 8) ; g'-sum float itmp = exp(-iter)*iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 9) ; ag-sum float itmp = exp(-iter)*(-1)^iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 10) ; l-sum rfix = rfix + log(r) + disturbFix ifix = ifix + log(iter) + disturbFix zfix = zfix + log(zStart) + disturbFix cfix = cfix + log(p) + disturbFix elseif (@fixit == 11) ; lw-sum rfix = rfix + log(r)/iter + disturbFix ifix = (ifix + log(iter))/iter + disturbFix zfix = zfix + log(zStart)/iter + disturbFix cfix = cfix + log(p)/iter + disturbFix elseif (@fixit == 12) ; lw-sum float itmp = iter^2 rfix = rfix + log(r)/itmp + disturbFix ifix = (ifix + log(iter))/itmp + disturbFix zfix = zfix + log(zStart)/itmp + disturbFix cfix = cfix + log(p)/itmp + disturbFix endif if (@rotDegree != 0) zfix = (zfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre cfix = (cfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre 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 ; iter > @startcolouring endif ; do_loop (at the very beginning final: float temp = 0 if (@numIterMode == 1) ifix = #numiter elseif (@numIterMode == 2) ifix = ifix/#numiter elseif (@numIterMode == 3) ifix = #numiter-ifix elseif (@numIterMode == 4) ifix = (#numiter-ifix)/#numiter elseif (@numIterMode == 5) ifix = (#numiter+ifix)/2 endif ; @numIterMode if (@colorby == 0) ; Fiximum 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 elseif (@colorby == 23) temp = ifix endif ; colorby list 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) elseif (@maskType == 10) ; Index/|z| mask = temp/cabs(zStart) elseif (@maskType == 11) ; GoldenCut mask = |real(zStart)/imag(zStart) - imag(zStart)/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)) if (@colour_limit != 0) to_index = to_index%@colour_limit endif 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 (@f_rand_verlaufMode > 0 || \ @f_Gnarl_verlaufMode > 0 || \ @f_PopCorn_verlaufMode > 0 || \ @f_SFBM_verlaufMode > 0 || \ @f_Primes_verlaufMode > 0 || \ @f_Gauss_verlaufMode > 0 || \ @f_Turn_verlaufMode > 0 || \ @f_Check_verlaufMode > 0 || \ @f_Pick153_verlaufMode > 0 || \ @f_SumDiv_verlaufMode > 0 || \ @f_MLAB_verlaufMode > 0 || \ @f_Banana_verlaufMode > 0 || \ @f_Ell_verlaufMode > 0 || \ @f_MedialCut_verlaufMode > 0 \ ) txtr_v_hor1 = imag(@txtr_verlauf_Line1) txtr_v_hor2 = imag(@txtr_verlauf_Line2) if (txtr_v_hor1 < txtr_v_hor2) txtr_v_bot = txtr_v_hor1 txtr_v_top = txtr_v_hor2 else txtr_v_bot = txtr_v_hor2 txtr_v_top = txtr_v_hor1 endif txtr_v_height = txtr_v_top-txtr_v_bot txtr_v_vert1 = real(@txtr_verlauf_Line1) txtr_v_vert2 = real(@txtr_verlauf_Line2) if (txtr_v_vert1 < txtr_v_vert2) txtr_v_left = txtr_v_vert1 txtr_v_rigt = txtr_v_vert2 else txtr_v_left = txtr_v_vert2 txtr_v_rigt = txtr_v_vert1 endif txtr_v_width = txtr_v_rigt-txtr_v_left complex pixpix = #pixel if (@txtr_verlauf_Rot%360 != 0) complex rotCentre = @txtr_verlauf_RotCentre pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@txtr_verlauf_Rot/180) + rotCentre endif txtr_v_yPos = imag(pixpix) txtr_v_xPos = real(pixpix) else txtr_v_verlauf = 1 endif if (@f_randomness != 0) txtr_v_verlauf = 1 if (@f_rand_verlaufMode > 0) if (@f_rand_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) ;! txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height ;! endif elseif (@f_rand_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) ;! ;! txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width ;! endif elseif (@f_rand_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_rand_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_rand_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif endif to_index = to_index + @f_randomness*txtr_v_verlauf * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz if (@txtr_Gnarl_lattice == 0) zGnarl = zGnarl*@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 1) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 2) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale*10) elseif (@txtr_Gnarl_lattice == 3) zGnarl = zGnarl-trunc(@txtr_Gnarl_scale/zGnarl) elseif (@txtr_Gnarl_lattice == 4) zGnarl = zGnarl*@txtr_Gnarl_scale + @txtr_Gnarl_scale/zGnarl elseif (@txtr_Gnarl_lattice == 5) zGnarl = round(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 6) complex zp_Gnarl = round(zGnarl*@txtr_Gnarl_scale) complex zc_Gnarl = zGnarl - (zp_Gnarl/@txtr_Gnarl_scale) if (round(imag(zp_Gnarl))%3==0) zc_Gnarl = (zc_Gnarl + @txtr_Gnarl_scale/2) if (abs(real(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif elseif (round(real(zp_Gnarl))%3==1) zc_Gnarl = (zc_Gnarl - @txtr_Gnarl_scale/2) if (abs(imag(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif else zc_Gnarl = (zc_Gnarl*@txtr_Gnarl_scale*2) if (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gnarl_verlaufMode > 0) if (@f_Gnarl_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gnarl_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gnarl_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gnarl_verlaufOffset endif to_index = to_index + @txtr_gnarl*txtr_v_verlauf*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz if (@txtr_PopCorn_lattice == 0) zPopCorn = zPopCorn*@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 1) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 2) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale*10) elseif (@txtr_PopCorn_lattice == 3) zPopCorn = zPopCorn-trunc(@txtr_PopCorn_scale/zPopCorn) elseif (@txtr_PopCorn_lattice == 4) zPopCorn = zPopCorn*@txtr_PopCorn_scale + @txtr_PopCorn_scale/zPopCorn elseif (@txtr_PopCorn_lattice == 5) zPopCorn = round(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 6) complex zp_PopCorn = round(zPopCorn*@txtr_PopCorn_scale) complex zc_PopCorn = zPopCorn - (zp_PopCorn/@txtr_PopCorn_scale) if (round(imag(zp_PopCorn))%3==0) zc_PopCorn = (zc_PopCorn + @txtr_PopCorn_scale/2) if (abs(real(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif elseif (round(real(zp_PopCorn))%3==1) zc_PopCorn = (zc_PopCorn - @txtr_PopCorn_scale/2) if (abs(imag(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif else zc_PopCorn = (zc_PopCorn*@txtr_PopCorn_scale*2) if (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif endif endif ; txtr_popcorn_lattice 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 txtr_v_verlauf = 1 if (@f_PopCorn_verlaufMode > 0) if (@f_PopCorn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_PopCorn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_PopCorn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_PopCorn_verlaufOffset endif to_index = to_index + @txtr_PopCorn*txtr_v_verlauf*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 if (@txtr_SFBM_lattice == 0) zSFBM = zSFBM*@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 1) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 2) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale*10) elseif (@txtr_SFBM_lattice == 3) zSFBM = zSFBM-trunc(@txtr_SFBM_scale/zSFBM) elseif (@txtr_SFBM_lattice == 4) zSFBM = zSFBM*@txtr_SFBM_scale + @txtr_SFBM_scale/zSFBM elseif (@txtr_SFBM_lattice == 5) zSFBM = round(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 6) complex zp_SFBM = round(zSFBM*@txtr_SFBM_scale) complex zc_SFBM = zSFBM - (zp_SFBM/@txtr_SFBM_scale) if (round(imag(zp_SFBM))%3==0) zc_SFBM = (zc_SFBM + @txtr_SFBM_scale/2) if (abs(real(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif elseif (round(real(zp_SFBM))%3==1) zc_SFBM = (zc_SFBM - @txtr_SFBM_scale/2) if (abs(imag(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif else zc_SFBM = (zc_SFBM*@txtr_SFBM_scale*2) if (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif endif endif 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 ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_SFBM_verlaufMode > 0) if (@f_SFBM_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SFBM_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SFBM_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SFBM_verlaufOffset endif to_index = to_index + @txtr_SFBM*txtr_v_verlauf*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz if (@txtr_Primes_lattice == 0) ; none zPrimes = zPrimes*@txtr_Primes_scale elseif (@txtr_Primes_lattice == 1) ; normal zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 2) ; modified zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale*10) elseif (@txtr_Primes_lattice == 3) ; Inverse1 zPrimes = zPrimes-trunc(@txtr_Primes_scale/zPrimes) elseif (@txtr_Primes_lattice == 4) ; joukowskij zPrimes = zPrimes*@txtr_Primes_scale + @txtr_Primes_scale/zPrimes elseif (@txtr_Primes_lattice == 5) zPrimes = round(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 6) complex zp_Primes = round(zPrimes*@txtr_Primes_scale) complex zc_Primes = zPrimes - (zp_Primes/@txtr_Primes_scale) if (round(imag(zp_Primes))%3==0) zc_Primes = (zc_Primes + @txtr_Primes_scale/2) if (abs(real(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif elseif (round(real(zp_Primes))%3==1) zc_Primes = (zc_Primes - @txtr_Primes_scale/2) if (abs(imag(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif else zc_Primes = (zc_Primes*@txtr_Primes_scale*2) if (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif endif endif 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*txtr_v_verlauf*texturePrimes txtr_v_verlauf = 1 if (@f_Primes_verlaufMode > 0) if (@f_Primes_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Primes_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Primes_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Primes_verlaufOffset endif endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz if (@txtr_Gauss_lattice == 0) zGauss = zGauss*@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 1) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 2) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale*10) elseif (@txtr_Gauss_lattice == 3) zGauss = zGauss-trunc(@txtr_Gauss_scale/zGauss) elseif (@txtr_Gauss_lattice == 4) zGauss = zGauss*@txtr_Gauss_scale + @txtr_Gauss_scale/zGauss elseif (@txtr_Gauss_lattice == 5) zGauss = round(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 6) complex zp_Gauss = round(zGauss*@txtr_Gauss_scale) complex zc_Gauss = zGauss - (zp_Gauss/@txtr_Gauss_scale) if (round(imag(zp_Gauss))%3==0) zc_Gauss = (zc_Gauss + @txtr_Gauss_scale/2) if (abs(real(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif elseif (round(real(zp_Gauss))%3==1) zc_Gauss = (zc_Gauss - @txtr_Gauss_scale/2) if (abs(imag(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif else zc_Gauss = (zc_Gauss*@txtr_Gauss_scale*2) if (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gauss_verlaufMode > 0) if (@f_Gauss_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gauss_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gauss_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gauss_verlaufOffset endif to_index = to_index + @txtr_Gauss*txtr_v_verlauf*textureGauss endif if (@txtr_Turn!= 0) complex zTurn = _zz zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale if (@txtr_Turn_lattice == 0) zTurn = zTurn*@txtr_Turn_scale elseif (@txtr_Turn_lattice == 1) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 2) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale*10) elseif (@txtr_Turn_lattice == 3) zTurn = zTurn-trunc(@txtr_Turn_scale/zTurn) elseif (@txtr_Turn_lattice == 4) zTurn = zTurn*@txtr_Turn_scale + @txtr_Turn_scale/zTurn elseif (@txtr_Turn_lattice == 5) zTurn = round(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 6) complex zp_Turn = round(zTurn*@txtr_Turn_scale) complex zc_Turn = zTurn - (zp_Turn/@txtr_Turn_scale) if (round(imag(zp_Turn))%3==0) zc_Turn = (zc_Turn + @txtr_Turn_scale/2) if (abs(real(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif elseif (round(real(zp_Turn))%3==1) zc_Turn = (zc_Turn - @txtr_Turn_scale/2) if (abs(imag(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif else zc_Turn = (zc_Turn*@txtr_Turn_scale*2) if (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif endif endif complex zTurned = zTurn float txtr_testAngle1 = #pi/@txtr_Turn_corte1 float txtr_testAngle2 = 3*txtr_testAngle1 complex txtr_rotAngle1 = @txtr_Turn_corte2*1i*txtr_testAngle1 complex txtr_rotAngle2 = @txtr_Turn_corte2*1i*txtr_testAngle2 if (@txtr_Turn_size != 0 && @txtr_Turn_size != 1) zTurn = zTurn/@txtr_Turn_size endif if (@reachThrough) _zz = zTurn endif float textureTurn = 0 float txtr_arg = atan2(zTurn) ; "Turn around" part taken from Sam if (abs(txtr_arg) < txtr_testAngle1) zTurned = zTurn*exp(txtr_rotAngle1) elseif (abs(txtr_arg) > txtr_testAngle2) zTurned = zTurn*exp(txtr_rotAngle2) endif textureTurn = |zTurn-zTurned| if (@txtr_Turn_limit != 0) textureTurn = textureTurn%@txtr_Turn_limit endif txtr_v_verlauf = 1 if (@f_Turn_verlaufMode > 0) if (@f_Turn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Turn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Turn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Turn_verlaufOffset endif to_index = to_index + @txtr_Turn*txtr_v_verlauf*textureTurn endif if (@txtr_Check!= 0) complex zChecked = round(_zz*@txtr_Check_scale) float textureCheck = 0 int checkFlag = 0 int testCheck = 0 int reChecked = trunc(real(zChecked)) int imChecked = trunc(imag(zChecked)) if (@txtr_Check_test == 0) testCheck = reChecked + imChecked elseif (@txtr_Check_test == 1) testCheck = reChecked * imChecked endif complex zCheckShape = _zz*@txtr_Check_scale complex zShapedCheck = zChecked - zCheckShape float reShapedCheck = real(zShapedCheck) float imShapedCheck = imag(zShapedCheck) if (testCheck%@txtr_Checker == 0) ; Condition for the checkers if (@txtr_Check_shape == 0) ; Squares only checkFlag = 1 elseif (@txtr_Check_shape == 1) ; Circle if (|zShapedCheck| < .2*@txtr_Check_shConst) ; additional condition checkFlag = 1 ; for circles endif elseif (@txtr_Check_shape == 2) if (abs (|reShapedCheck| - |imShapedCheck|) > .1*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 3) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 endif elseif (@txtr_Check_shape == 4) if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; segments checkFlag = 1 endif elseif (@txtr_Check_shape == 5) checkFlag = 1 ; draw a square if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; cut out segments checkFlag = 0 endif elseif (@txtr_Check_shape == 6) checkFlag = 1 ; draw a square if (|reShapedCheck| > .05*@txtr_Check_shConst) ; cut out horizontal lines checkFlag = 0 endif elseif (@txtr_Check_shape == 7) checkFlag = 1 ; draw a square if (|imShapedCheck| > .05*@txtr_Check_shConst) ; cut out vertical lines checkFlag = 0 endif elseif (@txtr_Check_shape == 8) checkFlag = 1 ; draw a square if ( |sin(imChecked*2*#pi) - sin(imag(zCheckShape)*2*#pi)| < .5*@txtr_Check_shConst) checkFlag = 0 ; cut out many vertical lines endif elseif (@txtr_Check_shape == 9) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 0 ; cut out a circle if (|imShapedCheck| > .05*@txtr_Check_shConst) checkFlag = 1 ; fill in something endif endif elseif (@txtr_Check_shape == 10) if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 1 ; draw a circle if (|imShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 ; cut out horizontal if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 ; fill in vertical endif endif endif elseif (@txtr_Check_shape == 11) checkFlag = 1 if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 0 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 12) if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 1 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 endif endif elseif (@txtr_Check_shape == 13) float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 14) checkFlag = 1 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 15) checkFlag = 1 if (|zShapedCheck| > .1*@txtr_Check_shConst) checkFlag = 0 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 16) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |reShapedCheck| + |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 17) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 18) checkFlag = 1 if (abs(reShapedCheck) - abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(reShapedCheck) + abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 19) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.1*@txtr_Check_shConst && \ |reShapedCheck| + |imShapedCheck| > 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 20) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) < 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 21) if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 22) checkFlag = 1 if (|sin(reShapedCheck*2*#pi) - cos(imShapedCheck*2*#pi) | > 0.5*@txtr_Check_shConst || \ |imShapedCheck| < 0.01*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 23) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif elseif (@txtr_Check_shape == 24) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif elseif (@txtr_Check_shape == 25) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif endif elseif (@txtr_Check_shape == 26) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif endif elseif (@txtr_Check_shape == 27) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 1 endif endif endif endif endif elseif (@txtr_Check_shape == 28) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 0 endif endif endif endif endif elseif (@txtr_Check_shape == 29) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 1 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 1 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 0 endif endif endif endif elseif (@txtr_Check_shape == 30) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 0 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 0 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 1 endif endif endif endif endif if (@txtr_Check_divide == 1) if (reShapedCheck > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 2) if (|reShapedCheck| > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 3) if (cabs(reShapedCheck) > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 4) if (|reShapedCheck| > |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 5) if (reShapedCheck < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 6) if (|reShapedCheck| < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 7) if (cabs(reShapedCheck) < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 8) if (|reShapedCheck| < |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 9) if (|atan2(zShapedCheck)/#pi|%.15 > .03) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 10) if (cabs(zShapedCheck)%.1 > .03) checkFlag = 1 - checkFlag endif endif endif ; testCheck%@txtr_Checker == 0 if (@txtr_Check_invert) checkFlag = 1 - checkFlag endif textureCheck = checkFlag if (@txtr_Check_col == 1 || @txtr_Check_col == 3) textureCheck = textureCheck*|zChecked| endif if (@txtr_Check_col == 2 || @txtr_Check_col == 3) textureCheck = textureCheck*#numiter endif if (@txtr_Check_col == 4) textureCheck = textureCheck*|zShapedCheck| endif if (@txtr_Check_limit != 0) textureCheck = textureCheck%@txtr_Check_limit endif txtr_v_verlauf = 1 if (@f_Check_verlaufMode > 0) if (@f_Check_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Check_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Check_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Check_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Check_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Check_verlaufOffset endif to_index = to_index + @txtr_Check*txtr_v_verlauf*textureCheck endif if (@txtr_Pick153 != 0) complex zPick153 = _zz float reCalcPick153 = 0 float imCalcPick153 = 0 float reTestPick153 = 0 float imTestPick153 = 0 float rePick153_1 = 0 float rePick153_2 = 0 float rePick153_3 = 0 float imPick153_1 = 0 float imPick153_2 = 0 float imPick153_3 = 0 float rePick153_R = 0 float imPick153_R = 0 if (@txtr_Pick153_lattice == 0) zPick153 = zPick153*@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 1) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 2) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale*10) elseif (@txtr_Pick153_lattice == 3) zPick153 = zPick153-trunc(@txtr_Pick153_scale/zPick153) elseif (@txtr_Pick153_lattice == 4) zPick153 = zPick153*@txtr_Pick153_scale + @txtr_Pick153_scale/zPick153 elseif (@txtr_Pick153_lattice == 5) zPick153 = round(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 6) complex zp_Pick153 = round(zPick153*@txtr_Pick153_scale) complex zc_Pick153 = zPick153 - (zp_Pick153/@txtr_Pick153_scale) if (round(imag(zp_Pick153))%3==0) zc_Pick153 = (zc_Pick153 + @txtr_Pick153_scale/2) if (abs(real(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif elseif (round(real(zp_Pick153))%3==1) zc_Pick153 = (zc_Pick153 - @txtr_Pick153_scale/2) if (abs(imag(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif else zc_Pick153 = (zc_Pick153*@txtr_Pick153_scale*2) if (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif endif endif float texturePick153 = 0 float granulation153 = 1000*@txtr_scale153 zCalcPick153 = (trunc(zPick153*granulation153)/granulation153 - trunc(zPick153*@txtr_scale153)) * 1000 reCalcPick153 = real(zCalcPick153) imCalcPick153 = imag(zCalcPick153) int j = @txtr_numOfTestsPick153 while (j > 0) j = j-1 rePick153_1 = trunc(reCalcPick153/100) rePick153_2 = trunc(reCalcPick153/10 - rePick153_1*10) rePick153_3 = trunc(reCalcPick153/1 - rePick153_1*100 - rePick153_2*10) imPick153_1 = trunc(imCalcPick153/100) imPick153_2 = trunc(imCalcPick153/10 - imPick153_1*10) imPick153_3 = trunc(imCalcPick153/1 - imPick153_1*100 - imPick153_2*10) reTestPick153 = rePick153_1^3 + rePick153_2^3 + rePick153_3^2 imTestPick153 = imPick153_1^3 + imPick153_2^3 + imPick153_3^2 rePick153_R = reCalcPick153 - reTestPick153 imPick153_R = imCalcPick153 - imTestPick153 reCalcPick153 = reTestPick153 imCalcPick153 = imTestPick153 endwhile ; j > 0 if (@txtr_Pick153_col == 0) texturePick153 = abs(rePick153_R)/500 elseif (@txtr_Pick153_col == 1) texturePick153 = abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 2) texturePick153 = abs(rePick153_R+imPick153_R)/500 elseif (@txtr_Pick153_col == 3) texturePick153 = abs(rePick153_R)/500 + abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 4) texturePick153 = abs(imPick153_R-rePick153_R)/250 elseif (@txtr_Pick153_col == 5) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 6) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 7) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 8) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 9) texturePick153 = abs(rePick153_R*imPick153_R)/250000 elseif (@txtr_Pick153_col == 10) texturePick153 = abs(rePick153_R*imPick153_R)/abs((rePick153_R+imPick153_R)*500) elseif (@txtr_Pick153_col == 11) texturePick153 = (rePick153_R+imPick153_R)^2/abs(rePick153_R*imPick153_R) elseif (@txtr_Pick153_col == 12) texturePick153 = (rePick153_R-imPick153_R)^2/(rePick153_R+imPick153_R)^2 endif if (@txtr_Pick153_limit != 0) texturePick153 = texturePick153%@txtr_Pick153_limit endif if (texturePick153 < 0) texturePick153 = 0 endif txtr_v_verlauf = 1 if (@f_Pick153_verlaufMode > 0) if (@f_Pick153_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Pick153_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Pick153_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Pick153_verlaufOffset endif to_index = to_index + @txtr_Pick153*txtr_v_verlauf*texturePick153 endif if (@txtr_SumDiv != 0) complex zSumDiv = _zz float reCalcSumDiv = 0 float imCalcSumDiv = 0 float reSumDiv_R = 0 float imSumDiv_R = 0 if (@txtr_SumDiv_lattice == 0) zSumDiv = zSumDiv*@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 1) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 2) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale*10) elseif (@txtr_SumDiv_lattice == 3) zSumDiv = zSumDiv-trunc(@txtr_SumDiv_scale/zSumDiv) elseif (@txtr_SumDiv_lattice == 4) zSumDiv = zSumDiv*@txtr_SumDiv_scale + @txtr_SumDiv_scale/zSumDiv elseif (@txtr_SumDiv_lattice == 5) zSumDiv = round(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 6) complex zp_SumDiv = round(zSumDiv*@txtr_SumDiv_scale) complex zc_SumDiv = zSumDiv - (zp_SumDiv/@txtr_SumDiv_scale) if (round(imag(zp_SumDiv))%3==0) zc_SumDiv = (zc_SumDiv + @txtr_SumDiv_scale/2) if (abs(real(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif elseif (round(real(zp_SumDiv))%3==1) zc_SumDiv = (zc_SumDiv - @txtr_SumDiv_scale/2) if (abs(imag(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif else zc_SumDiv = (zc_SumDiv*@txtr_SumDiv_scale*2) if (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif endif endif float textureSumDiv = 0 float granulationSumDiv = 1000*@txtr_scaleSumDiv zCalcSumDiv = (trunc(zSumDiv*granulationSumDiv)/granulationSumDiv - trunc(zSumDiv*@txtr_scaleSumDiv)) * 1000 reCalcSumDiv = real(zCalcSumDiv) imCalcSumDiv = imag(zCalcSumDiv) if (@txtr_SumDiv_mode == 0) reSumDiv_R = 0 imSumDiv_R = 0 elseif (@txtr_SumDiv_mode == 1) reSumDiv_R = reCalcSumDiv imSumDiv_R = imCalcSumDiv endif int j = 0 while (j abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R)/500 else textureSumDiv = abs(reSumDiv_R)/500 endif elseif (@txtr_SumDiv_col == 7) if abs(imSumDiv_R) < abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 8) if abs(imSumDiv_R) > abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 9) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/250000 elseif (@txtr_SumDiv_col == 10) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/abs((reSumDiv_R+imSumDiv_R)*500) elseif (@txtr_SumDiv_col == 11) textureSumDiv = (reSumDiv_R+imSumDiv_R)^2/abs(reSumDiv_R*imSumDiv_R) elseif (@txtr_SumDiv_col == 12) textureSumDiv = (reSumDiv_R-imSumDiv_R)^2/(reSumDiv_R+imSumDiv_R)^2 endif if (@txtr_SumDiv_limit != 0) textureSumDiv = textureSumDiv%@txtr_SumDiv_limit endif if (textureSumDiv < 0) textureSumDiv = 0 endif txtr_v_verlauf = 1 if (@f_SumDiv_verlaufMode > 0) if (@f_SumDiv_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SumDiv_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SumDiv_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SumDiv_verlaufOffset endif to_index = to_index + @txtr_SumDiv*txtr_v_verlauf*textureSumDiv endif if (@txtr_MLAB!= 0) float txtrB_ux = 0.0 float txtrB_uy = 0.0 float txtrB_scax = 0.0 float txtrB_scay = 0.0 float txtrB_ax = 0.0 float txtrB_ay = 0.0 float txtrB_mx = 0.0 float txtrB_my = 0.0 float txtrB_mr = 0.0 int txtrB_i = 0 bool txtrB_done = false bool txtrB_ix = false bool txtrB_iy = false ;---------------------------------- complex zMLAB = _zz if (@txtr_MLAB_lattice == 0) zMLAB = zMLAB*@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 1) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 2) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale*10) elseif (@txtr_MLAB_lattice == 3) zMLAB = zMLAB-trunc(@txtr_MLAB_scale/zMLAB) elseif (@txtr_MLAB_lattice == 4) zMLAB = zMLAB*@txtr_MLAB_scale + @txtr_MLAB_scale/zMLAB elseif (@txtr_MLAB_lattice == 5) zMLAB = round(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 6) complex zp_MLAB = round(zMLAB*@txtr_MLAB_scale) complex zc_MLAB = zMLAB - (zp_MLAB/@txtr_MLAB_scale) if (round(imag(zp_MLAB))%3==0) zc_MLAB = (zc_MLAB + @txtr_MLAB_scale/2) if (abs(real(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif elseif (round(real(zp_MLAB))%3==1) zc_MLAB = (zc_MLAB - @txtr_MLAB_scale/2) if (abs(imag(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif else zc_MLAB = (zc_MLAB*@txtr_MLAB_scale*2) if (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif endif endif ;zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale if (@txtr_MLAB_size != 0 && @txtr_MLAB_size != 1) zMLAB = zMLAB/@txtr_MLAB_size endif if (@reachThrough) _zz = zMLAB endif float textureMLAB = 0 txtrB_ux = real(zMLAB)*@txtr_MLAB_scalo txtrB_uy = imag(zMLAB)*@txtr_MLAB_scalo txtrB_ax = floor(txtrB_ux) txtrB_ay = floor(txtrB_uy) txtrB_scax = .5 txtrB_scay = .5 while (!txtrB_done && txtrB_i < @txtr_MLAB_divi) txtrB_mx = txtrB_ax + txtrB_scax txtrB_my = txtrB_ay + txtrB_scay txtrB_mr = txtrB_mx * 3779 + txtrB_my * 9377 txtrB_mr = abs(sin(txtrB_mr)) * @txtr_MLAB_vari txtrB_mr = txtrB_mr - trunc(txtrB_mr) if (txtrB_mr < real(@txtr_MLAB_pro0)) txtrB_done = true else if (txtrB_mr < imag(@txtr_MLAB_pro0)) txtrB_scax = txtrB_scax / 2 txtrB_ix = true txtrB_iy = false elseif (txtrB_mr < real(@txtr_MLAB_pro1)) txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = true elseif (txtrB_mr < imag(@txtr_MLAB_pro1)) txtrB_scax = txtrB_scax / 2 txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = false endif if (txtrB_ux > txtrB_mx) txtrB_ax = txtrB_mx endif if (txtrB_uy > txtrB_my) txtrB_ay = txtrB_my endif txtrB_i = txtrB_i + 1 endif endwhile if (txtrB_ix) txtrB_scay = txtrB_scay / 2 endif if (txtrB_iy) txtrB_scax = txtrB_scax / 2 endif txtrB_ax = abs(txtrB_ax - txtrB_ux) if (txtrB_ax > (txtrB_scax)) txtrB_ax = 2 * txtrB_scax - txtrB_ax endif txtrB_ay = abs(txtrB_ay - txtrB_uy) if (txtrB_ay > (txtrB_scay)) txtrB_ay = 2 * txtrB_scay - txtrB_ay endif if (txtrB_ax < txtrB_ay) txtrB_mx = txtrB_ax else txtrB_mx = txtrB_ay endif txtrB_my = 1 / (2 ^ (@txtr_MLAB_divi + 1) * @txtr_MLAB_scalo) txtrB_mr = txtrB_mx / txtrB_my if (txtrB_mr < @txtr_MLAB_edge) else if (txtrB_scax < txtrB_scay) txtrB_mr = txtrB_scax / txtrB_scay else txtrB_mr = txtrB_scay / txtrB_scax endif endif textureMLAB = txtrB_mr if (@txtr_MLAB_limit != 0) textureMLAB = textureMLAB%@txtr_MLAB_limit endif txtr_v_verlauf = 1 if (@f_MLAB_verlaufMode > 0) if (@f_MLAB_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MLAB_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MLAB_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MLAB_verlaufOffset endif to_index = to_index + @txtr_MLAB*txtr_v_verlauf*textureMLAB endif if (@txtr_Banana != 0) float txtrBana_d0 = 0.0 float txtrBana_d1 = 0.0 float txtrBana_ux = 0.0 float txtrBana_uy = 0.0 float txtrBana_sxa = 0.0 float txtrBana_sya = 0.0 float txtrBana_sxb = 0.0 float txtrBana_sxc = 0.0 float txtrBana_syb = 0.0 float txtrBana_syc = 0.0 float txtrBana_ax = 0.0 float txtrBana_ay = 0.0 float txtrBana_bx = 0.0 float txtrBana_by = 0.0 float txtrBana_ex = 0.0 float txtrBana_mx = 0.0 float txtrBana_my = 0.0 float txtrBana_mr = 0.0 int txtrBana_i = 0 bool txtrBana_done = false ;---------------------------------- complex zBanana = _zz if (@txtr_Banana_lattice == 0) zBanana = zBanana*@txtr_Banana_scale elseif (@txtr_Banana_lattice == 1) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 2) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale*10) elseif (@txtr_Banana_lattice == 3) zBanana = zBanana-trunc(@txtr_Banana_scale/zBanana) elseif (@txtr_Banana_lattice == 4) zBanana = zBanana*@txtr_Banana_scale + @txtr_Banana_scale/zBanana elseif (@txtr_Banana_lattice == 5) zBanana = round(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 6) complex zp_Banana = round(zBanana*@txtr_Banana_scale) complex zc_Banana = zBanana - (zp_Banana/@txtr_Banana_scale) if (round(imag(zp_Banana))%3==0) zc_Banana = (zc_Banana + @txtr_Banana_scale/2) if (abs(real(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif elseif (round(real(zp_Banana))%3==1) zc_Banana = (zc_Banana - @txtr_Banana_scale/2) if (abs(imag(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif else zc_Banana = (zc_Banana*@txtr_Banana_scale*2) if (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif endif endif if (@txtr_Banana_size != 0 && @txtr_Banana_size != 1) zBanana = zBanana/@txtr_Banana_size endif if (@reachThrough) _zz = zBanana endif float textureBanana = 0 txtrBana_ux = real(zBanana)*@txtr_Banana_scalo txtrBana_uy = imag(zBanana)*@txtr_Banana_scalo txtrBana_ax = floor(txtrBana_ux) txtrBana_ay = floor(txtrBana_uy) txtrBana_bx = txtrBana_ax + 1 txtrBana_by = txtrBana_ay + 1 txtrBana_sxc = 1 txtrBana_sxa = real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa txtrBana_syc = 1 txtrBana_sya = imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya txtrBana_i = 0 while (!txtrBana_done && txtrBana_i < @txtr_Banana_divi) txtrBana_mx = txtrBana_ax + txtrBana_sxa txtrBana_my = txtrBana_ay + txtrBana_sya txtrBana_mr = txtrBana_mx * @txtr_Banana_seed0 + txtrBana_my * @txtr_Banana_seed1 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_mr = txtrBana_mr - trunc(txtrBana_mr) if (txtrBana_mr < real(@txtr_Banana_pro0)) ; -1- txtrBana_done = true else ; -1- if (txtrBana_mr < imag(@txtr_Banana_pro0)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa elseif (txtrBana_mr < real(@txtr_Banana_pro1)) if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya elseif (txtrBana_mr < imag(@txtr_Banana_pro1)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya endif endif ; -1- txtrBana_i = txtrBana_i + 1 endwhile txtrBana_ax = abs(txtrBana_ax - txtrBana_ux) txtrBana_ex = 0 txtrBana_ay = abs(txtrBana_ay - txtrBana_uy) txtrBana_bx = abs(txtrBana_bx - txtrBana_ux) txtrBana_by = abs(txtrBana_by - txtrBana_uy) if (txtrBana_ay < txtrBana_ax) txtrBana_ax = txtrBana_ay txtrBana_ex = .2 endif if (txtrBana_bx < txtrBana_ax) txtrBana_ax = txtrBana_bx txtrBana_ex = .4 endif if (txtrBana_by < txtrBana_ax) txtrBana_ax = txtrBana_by txtrBana_ex = .6 endif if (txtrBana_ax < @txtr_Banana_edge/@txtr_Banana_scalo) if (@txtr_Banana_otre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 1) txtrBana_d0 = txtrBana_ex txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 2) txtrBana_d0 = -1 txtrBana_d1 = 1 endif else if (@txtr_Banana_itre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 1) txtrBana_d0 = .8 txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 2) txtrBana_mr = txtrBana_mr * @txtr_Banana_seed0 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_d0 = txtrBana_mr - trunc(txtrBana_mr) txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 3) txtrBana_d0 = -1 txtrBana_d1 = 1 endif endif ;--------------------------------------- if (@txtr_Banana_type == 0) textureBanana = txtrBana_mr ; Polyominos elseif (@txtr_Banana_type >= 1 && @txtr_Banana_type <= 6) if (txtrBana_d0 < 0); Original #solid = true else if (txtrBana_d0 < txtrBana_d1) textureBanana = txtrBana_d0 / txtrBana_d1 else textureBanana = txtrBana_d1 / txtrBana_d0 endif endif if (@txtr_Banana_type == 2) ; Ori/Polyominos textureBanana = |textureBanana/txtrBana_mr| elseif (@txtr_Banana_type == 3) ; Ori + Polyominos textureBanana = |textureBanana + txtrBana_mr^2| elseif (@txtr_Banana_type == 4) ; Ori + InvPoly textureBanana = |textureBanana + 1/txtrBana_mr| elseif (@txtr_Banana_type == 5) ; Diff(Ori,Poly) textureBanana = |textureBanana - txtrBana_mr^2| elseif (@txtr_Banana_type == 6) ; ; Diff(Ori,InvPoly) textureBanana = |textureBanana - 1/txtrBana_mr^2| endif elseif (@txtr_Banana_type == 7) textureBanana = |txtrBana_d0 - txtrBana_d1|^2*txtrBana_mr ; Diff Banana elseif (@txtr_Banana_type == 8) textureBanana = |txtrBana_d1 / txtrBana_d0| ; Thoughtless endif if (@txtr_Banana_limit != 0) textureBanana = textureBanana%@txtr_Banana_limit endif txtr_v_verlauf = 1 if (@f_Banana_verlaufMode > 0) if (@f_Banana_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Banana_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Banana_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Banana_verlaufOffset endif to_index = to_index + @txtr_Banana*txtr_v_verlauf*textureBanana endif if (@txtr_Ell != 0) complex zElliptic = _zz if (@txtr_Ell_lattice == 0) zElliptic = zElliptic*@txtr_Ell_scale elseif (@txtr_Ell_lattice == 1) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 2) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale*10) elseif (@txtr_Ell_lattice == 3) zElliptic = zElliptic-trunc(@txtr_Ell_scale/zElliptic) elseif (@txtr_Ell_lattice == 4) zElliptic = zElliptic*@txtr_Ell_scale + @txtr_Ell_scale/zElliptic elseif (@txtr_Ell_lattice == 5) zElliptic = round(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 6) complex zp_Ell = round(zElliptic*@txtr_Ell_scale) complex zc_Ell = zElliptic - (zp_Ell/@txtr_Ell_scale) if (round(imag(zp_Ell))%3==0) zc_Ell = (zc_Ell + @txtr_Ell_scale/2) if (abs(real(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif elseif (round(real(zp_Ell))%3==1) zc_Ell = (zc_Ell - @txtr_Ell_scale/2) if (abs(imag(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif else zc_Ell = (zc_Ell*@txtr_Ell_scale*2) if (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif endif endif if (@txtr_Ell_size != 0 && @txtr_Ell_size != 1) zElliptic = zElliptic/@txtr_Ell_size endif if (@reachThrough) _zz = zElliptic endif float textureElliptic = 0 complex EllipticZ = 0 float t_r = real(zElliptic) float t_i = imag(zElliptic) float t_rr = 0 float t_ii = 0 ; ; transformation ; if (@txtr_Ell_pseudo) ; ; calculate the temp real t_rr ; if (@txtr_Ell_c * t_r + @txtr_Ell_d == 0) ; don't divide by 0!! t_rr = @txtr_Ell_a * t_r + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_rr = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_rr = (@txtr_Ell_a * (t_r-t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_rr = (@txtr_Ell_a * (t_r+t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_rr = (@txtr_Ell_a * (t_r*t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_rr = (@txtr_Ell_a * (t_r^t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif else t_rr = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif endif ; ; calculate the temp imag t_ii ; if (@txtr_Ell_c * t_i + @txtr_Ell_d == 0) ; don't divide by 0!! t_ii = @txtr_Ell_a * t_i + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_ii = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_ii = (@txtr_Ell_a * (t_i-t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_ii = (@txtr_Ell_a * (t_i+t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_ii = (@txtr_Ell_a * (t_i*t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_ii = (@txtr_Ell_a * (t_i^t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif else t_ii = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif endif EllipticZ = t_rr + 1i*t_ii else if (@txtr_Ell_c * zElliptic + @txtr_Ell_d == 0) ; don't divide by 0!! EllipticZ = @txtr_Ell_a * zElliptic + @txtr_Ell_b else EllipticZ = (@txtr_Ell_a * zElliptic + @txtr_Ell_b) / (@txtr_Ell_c * zElliptic + @txtr_Ell_d) endif endif if (@txtr_Ell_type == 0) textureElliptic = |EllipticZ-zElliptic| elseif (@txtr_Ell_type == 1) textureElliptic = |real(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 2) textureElliptic = |imag(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 3) textureElliptic = |atan(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 4) textureElliptic = atan2(EllipticZ-zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 5) textureElliptic = |EllipticZ/zElliptic| elseif (@txtr_Ell_type == 6) textureElliptic = |real(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 7) textureElliptic = |imag(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 8) textureElliptic = |atan(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 9) textureElliptic = atan2(EllipticZ/zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 10) textureElliptic = |zElliptic/EllipticZ| elseif (@txtr_Ell_type == 11) textureElliptic = |real(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 12) textureElliptic = |imag(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 13) textureElliptic = |atan(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 14) textureElliptic = atan2(zElliptic/EllipticZ)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 15) textureElliptic = |sin(zElliptic) + 1i*cos(EllipticZ)| elseif (@txtr_Ell_type == 16) textureElliptic = |real(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 17) textureElliptic = |imag(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 18) textureElliptic = |atan(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 19) textureElliptic = atan2(sin(zElliptic) + 1i*cos(EllipticZ))/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif endif if (@txtr_Ell_limit != 0) textureElliptic = textureElliptic%@txtr_Ell_limit endif ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_Ell_verlaufMode > 0) if (@f_Ell_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Ell_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Ell_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Ell_verlaufOffset endif to_index = to_index + @txtr_Ell*txtr_v_verlauf*textureElliptic endif if (@txtr_MedialCut != 0) complex zMedialCut = _zz if (@txtr_MedialCut_lattice == 0) zMedialCut = zMedialCut*@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 1) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 2) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale*10) elseif (@txtr_MedialCut_lattice == 3) zMedialCut = zMedialCut-trunc(@txtr_MedialCut_scale/zMedialCut) elseif (@txtr_MedialCut_lattice == 4) zMedialCut = zMedialCut*@txtr_MedialCut_scale + @txtr_MedialCut_scale/zMedialCut elseif (@txtr_MedialCut_lattice == 5) zMedialCut = round(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 6) complex zp_MedialCut = round(zMedialCut*@txtr_MedialCut_scale) complex zc_MedialCut = zMedialCut - (zp_MedialCut/@txtr_MedialCut_scale) if (round(imag(zp_MedialCut))%3==0) zc_MedialCut = (zc_MedialCut + @txtr_MedialCut_scale/2) if (abs(real(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif elseif (round(real(zp_MedialCut))%3==1) zc_MedialCut = (zc_MedialCut - @txtr_MedialCut_scale/2) if (abs(imag(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif else zc_MedialCut = (zc_MedialCut*@txtr_MedialCut_scale*2) if (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif endif endif if (@txtr_MedialCut_size != 0 && @txtr_MedialCut_size != 1) zMedialCut = zMedialCut/@txtr_MedialCut_size endif if (@reachThrough) _zz = zMedialCut endif float textureMedialCut = 0 float txtrMedCut_re1 = 0 float txtrMedCut_re2 = 0 float txtrMedCut_re3 = 0 float txtrMedCut_im1 = 0 float txtrMedCut_im2 = 0 float txtrMedCut_im3 = 0 float granulation = 1000*@txtr_MedialCut_calcScale zMedialCut = (round(zMedialCut*granulation)/granulation - round(zMedialCut*@txtr_MedialCut_calcScale)) * 1000 float txtrMedCut_reCalc = real(zMedialCut) float txtrMedCut_imCalc = imag(zMedialCut) txtrMedCut_re1 = trunc(txtrMedCut_reCalc/100) txtrMedCut_re2 = trunc(txtrMedCut_reCalc/10 - txtrMedCut_re1*10) txtrMedCut_re3 = trunc(txtrMedCut_reCalc/1 - txtrMedCut_re1*100 - txtrMedCut_re2*10) txtrMedCut_im1 = trunc(txtrMedCut_imCalc/100) txtrMedCut_im2 = trunc(txtrMedCut_imCalc/10 - txtrMedCut_im1*10) txtrMedCut_im3 = trunc(txtrMedCut_imCalc/1 - txtrMedCut_im1*100 - txtrMedCut_im2*10) float small = 0 float middl = 0 float large = 0 if (@txtr_MedialCut_type == 0) small = txtrMedCut_re1 middl = txtrMedCut_re2 large = txtrMedCut_re3 elseif (@txtr_MedialCut_type == 1) small = txtrMedCut_im1 middl = txtrMedCut_im2 large = txtrMedCut_im3 elseif (@txtr_MedialCut_type == 2) if (txtrMedCut_re1txtrMedCut_im1) small = txtrMedCut_re1 else small = txtrMedCut_im1 endif if (txtrMedCut_re2>txtrMedCut_im2) middl = txtrMedCut_re2 else middl = txtrMedCut_im2 endif if (txtrMedCut_re3>txtrMedCut_im3) large = txtrMedCut_re3 else large = txtrMedCut_im3 endif elseif (@txtr_MedialCut_type == 4) small = txtrMedCut_re1+txtrMedCut_im1 middl = txtrMedCut_re2+txtrMedCut_im2 large = txtrMedCut_re3+txtrMedCut_im3 elseif (@txtr_MedialCut_type == 5) small = txtrMedCut_re1*txtrMedCut_im1 middl = txtrMedCut_re2*txtrMedCut_im2 large = txtrMedCut_re3*txtrMedCut_im3 elseif (@txtr_MedialCut_type == 6) small = txtrMedCut_re1/txtrMedCut_im1 middl = txtrMedCut_re2/txtrMedCut_im2 large = txtrMedCut_re3/txtrMedCut_im3 elseif (@txtr_MedialCut_type == 7) small = txtrMedCut_im1/txtrMedCut_re1 middl = txtrMedCut_im2/txtrMedCut_re2 large = txtrMedCut_im3/txtrMedCut_re3 elseif (@txtr_MedialCut_type == 8) small = abs(txtrMedCut_im1-txtrMedCut_re1) middl = abs(txtrMedCut_im2-txtrMedCut_re2) large = abs(txtrMedCut_im3-txtrMedCut_re3) endif ; prevent those numbers from being zero: small = small + @txtr_MedialCut_smooth middl = middl + @txtr_MedialCut_smooth large = large + @txtr_MedialCut_smooth ;Golden Cut: small/large = large/whole float sm_mi = abs(small/middl) float mi_la = abs(middl/large) if (@txtr_MedialCut_watch == 0) textureMedialCut = abs(sm_mi-mi_la) elseif (@txtr_MedialCut_watch == 1) if (sm_mimi_la) textureMedialCut = sm_mi else textureMedialCut = mi_la endif elseif (@txtr_MedialCut_watch == 3) textureMedialCut = sm_mi + mi_la elseif (@txtr_MedialCut_watch == 4) textureMedialCut = 1/sm_mi + 1/mi_la elseif (@txtr_MedialCut_watch == 5) textureMedialCut = abs(1/sm_mi - 1/mi_la) endif if (@txtr_MedialCut_limit != 0) textureMedialCut = textureMedialCut%@txtr_MedialCut_limit endif txtr_v_verlauf = 1 if (@f_MedialCut_verlaufMode > 0) if (@f_MedialCut_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MedialCut_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MedialCut_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MedialCut_verlaufOffset endif to_index = to_index + @txtr_MedialCut*txtr_v_verlauf*textureMedialCut endif if (@txtr_Truchet != 0) complex zTruchet = _zz if (@txtr_Truchet_lattice == 0) zTruchet = zTruchet*@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 1) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 2) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale*10) elseif (@txtr_Truchet_lattice == 3) zTruchet = zTruchet-trunc(@txtr_Truchet_scale/zTruchet) elseif (@txtr_Truchet_lattice == 4) zTruchet = zTruchet*@txtr_Truchet_scale + @txtr_Truchet_scale/zTruchet elseif (@txtr_Truchet_lattice == 5) zTruchet = round(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 6) complex zp_Truchet = round(zTruchet*@txtr_Truchet_scale) complex zc_Truchet = zTruchet - (zp_Truchet/@txtr_Truchet_scale) if (round(imag(zp_Truchet))%3==0) zc_Truchet = (zc_Truchet + @txtr_Truchet_scale/2) if (abs(real(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif elseif (round(real(zp_Truchet))%3==1) zc_Truchet = (zc_Truchet - @txtr_Truchet_scale/2) if (abs(imag(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif else zc_Truchet = (zc_Truchet*@txtr_Truchet_scale*2) if (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif endif endif if (@reachThrough) _zz = zTruchet endif float textureTruchet = 0 if (@txtr_Truchet_fixit == 1) ; Minimum textureTruchet = 1.0e20 elseif (@txtr_Truchet_fixit == 2) ; Maximum textureTruchet = -1.0e20 endif complex zcTruchet = 0 complex zzTruchet = 0 complex crTruchet = 0 float truchD1 = 0 float truchD2 = 0 complex truchCorteX = @txtr_Truchet_corte + 1i*@txtr_Truchet_corte complex truchCorteY = @txtr_Truchet_corte - 1i*@txtr_Truchet_corte float reZZTRUCHET = 0 float imZZTRUCHET = 0 int truch_i = 0 while (truch_i < @txtr_Truchet_Iters) if (@txtr_Truchet_size != 0 && @txtr_Truchet_size != 1) zTruchet = zTruchet/@txtr_Truchet_size endif zTruchet = zTruchet*exp(1i*pi/180*@txtr_Truchet_rot) if (truch_i > 0) zTruchet = zTruchet*@txtr_Truchet_mst^truch_i ; *exp(1i*(truch_i)*180/pi*@txtr_Truchet_rotst) endif zcTruchet = round(zTruchet) zzTruchet = zTruchet - zcTruchet reZZTRUCHET = real(zzTruchet) imZZTRUCHET = imag(zzTruchet) crTruchet = 2*(@txtr_Truchet_seed/(zcTruchet+124+truch_i) - \ round(@txtr_Truchet_seed/(zcTruchet+124+truch_i))) if real(crTruchet) > 0 if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteX)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteX)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET - imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET - imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) -@txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif endif else if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteY)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteY)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET + imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) - @txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) + @txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif endif endif if truchD2 < truchD1 if (@txtr_Truchet_watch == 0) truchD1 = truchD2 elseif (@txtr_Truchet_watch == 1) truchD1 = abs(truchD1-truchD2) elseif (@txtr_Truchet_watch == 2) truchD1 = |truchD1-truchD2| elseif (@txtr_Truchet_watch == 3) truchD1 = (truchD1+truchD2)/2 elseif (@txtr_Truchet_watch == 4) truchD1 = truchD1/truchD2 endif endif truch_i = truch_i + 1 if (@txtr_Truchet_fixit == 0) ; last textureTruchet = truchD1 elseif (@txtr_Truchet_fixit == 1) ; min if (textureTruchet > truchD1) textureTruchet = abs(truchD1 - 1/(2^truch_i)) endif elseif (@txtr_Truchet_fixit == 2) ; max if (textureTruchet < truchD1) textureTruchet = truchD1 + 1/(2^truch_i) endif elseif (@txtr_Truchet_fixit == 3) ; sum textureTruchet = textureTruchet + truchD1 elseif (@txtr_Truchet_fixit == 4) ; w-sum textureTruchet = textureTruchet + truchD1/truch_i elseif (@txtr_Truchet_fixit == 5) ; g-sum textureTruchet = textureTruchet + truchD1/(2^truch_i) endif endwhile ; truch_i < @txtr_Truchet_Iters if (@txtr_Truchet_limit != 0) textureTruchet = textureTruchet%@txtr_Truchet_limit endif txtr_v_verlauf = 1 if (@f_Truchet_verlaufMode > 0) if (@f_Truchet_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Truchet_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Truchet_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Truchet_verlaufOffset endif to_index = to_index + @txtr_Truchet^@txtr_Truchet_thick*txtr_v_verlauf*textureTruchet endif if (@txtr_GCD != 0) complex zGCD = _zz if (@txtr_GCD_lattice == 0) zGCD = zGCD*@txtr_GCD_scale elseif (@txtr_GCD_lattice == 1) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 2) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale*10) elseif (@txtr_GCD_lattice == 3) zGCD = zGCD-trunc(@txtr_GCD_scale/zGCD) elseif (@txtr_GCD_lattice == 4) zGCD = zGCD*@txtr_GCD_scale + @txtr_GCD_scale/zGCD elseif (@txtr_GCD_lattice == 5) zGCD = round(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 6) complex zp_GCD = round(zGCD*@txtr_GCD_scale) complex zc_GCD = zGCD - (zp_GCD/@txtr_GCD_scale) if (round(imag(zp_GCD))%3==0) zc_GCD = (zc_GCD + @txtr_GCD_scale/2) if (abs(real(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif elseif (round(real(zp_GCD))%3==1) zc_GCD = (zc_GCD - @txtr_GCD_scale/2) if (abs(imag(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif else zc_GCD = (zc_GCD*@txtr_GCD_scale*2) if (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif endif endif if (@reachThrough) _zz = zGCD endif float textureGCD = 0 if (@txtr_GCD_fixit == 1) ; Minimum textureGCD = 1.0e20 elseif (@txtr_GCD_fixit == 2) ; Maximum textureGCD = -1.0e20 endif float granulation = 1000*@txtr_GCD_calcScale float reGCD = 0 float imGCD = 0 float __gcd = 0 float __chk = 0 float rGCD = 0 int gcd_i = 0 while (gcd_i < @txtr_GCD_Iters) if (@txtr_GCD_size != 0 && @txtr_GCD_size != 1) zGCD = zGCD/@txtr_GCD_size endif zGCD = (round(zGCD*granulation)/granulation - round(zGCD*@txtr_GCD_calcScale)) * 1000 reGCD = abs(real(zGCD)) imGCD = abs(imag(zGCD)) __chk = 2 while (__chk > 1) __gcd = round(reGCD/imGCD) __chk = reGCD - __gcd*imGCD if (__chk > 1) reGCD = imGCD imGCD = __gcd endif endwhile __gcd = __gcd + @txtr_GCD_smooth __chk = __chk + @txtr_GCD_smooth if (@txtr_GCD_watch == 0) ; gcd rGCD = __gcd elseif (@txtr_GCD_watch == 1) ; MinQ GCD/Iter if (__gcd < gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 2) ; MaxQ GCD/Iter if (__gcd > gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 3) ; DCG+Reti rGCD = 1/__gcd + 1/gcd_i elseif (@txtr_GCD_watch == 4) ; DCG-Reti rGCD = abs(1/__gcd - 1/gcd_i) elseif (@txtr_GCD_watch == 5) ; CHK rGCD = __chk elseif (@txtr_GCD_watch == 6) ; MinQ CHK/Iter if (__chk < gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 7) ; MaxQ CHK/Iter if (__chk > gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 8) ; CHK+Iter rGCD = __chk + gcd_i elseif (@txtr_GCD_watch == 9) ; KHC+Reti rGCD = 1/__chk + 1/gcd_i elseif (@txtr_GCD_watch == 10) ; KHC-Reti rGCD = abs(1/__chk - 1/gcd_i) elseif (@txtr_GCD_watch == 11) ; MinQ CHK/GCD if (__chk < __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 12) ; MaxQ CHK/GCD if (__chk > __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 13) ; CHK+GCD rGCD = __chk + __gcd elseif (@txtr_GCD_watch == 14) ; KHC+DCG rGCD = 1/__chk + 1/__gcd elseif (@txtr_GCD_watch == 15) rGCD = abs(1/__chk - 1/__gcd) ; KHC-DCG endif gcd_i = gcd_i + 1 if (@txtr_GCD_fixit == 0) ; last textureGCD = rGCD elseif (@txtr_GCD_fixit == 1) ; min if (textureGCD > rGCD) textureGCD = rGCD ; abs(rGCD - 1/(2^gcd_i)) endif elseif (@txtr_GCD_fixit == 2) ; max if (textureGCD < rGCD) textureGCD = rGCD ; + 1/(2^gcd_i) endif elseif (@txtr_GCD_fixit == 3) ; sum textureGCD = textureGCD + rGCD elseif (@txtr_GCD_fixit == 4) ; w-sum textureGCD = textureGCD + rGCD/gcd_i elseif (@txtr_GCD_fixit == 5) ; g-sum textureGCD = textureGCD + rGCD/(2^gcd_i) endif endwhile ; gcd_i < @txtr_GCD_Iters if (@txtr_GCD_limit != 0) textureGCD = textureGCD%@txtr_GCD_limit endif txtr_v_verlauf = 1 if (@f_GCD_verlaufMode > 0) if (@f_GCD_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_GCD_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_GCD_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_GCD_verlaufOffset endif to_index = to_index + @txtr_GCD*txtr_v_verlauf*textureGCD endif #index = to_index endif ; no_mask default: title = "T Coconut Projection" param projectionStart caption = "Take Zat?" enum = "Zat" "Pix" default = 0 endparam param projSmooth caption = "Projection Smooth" enum = "Old0-Old1" "Old0+Old1" "Old0+Old1-Old2" \ "Old1-Old2" "Old1+Old2" "Old1+Old2-Old3" \ "Old2-Old3" "Old2+Old3" "Old2+Old3-Old4" \ "Old3-Old4" "Old3+Old4" "Old3+Old4-Old0" \ "Old4-Old0" "Old4+Old0" "Old4+Old0-Old1" default = 1 endparam param projectionMode caption = "Projection" enum = "None" "Normal" "Quot" "Add" "Inverse" "Scalar" "Scalar Mix1" default = 1 endparam param watch caption = "Watch for Fixit" enum = "Real" "Imag" "Magn" "Diff" \ "Min(r,i)" "Max(r,i)" "MinQuot" "MaxQuot" "Diff2" \ "Astro01" "Astro02" "Astro03" "Astro12" "Astro21" \ "Astro31" "Astro13" "Astro32" "Astro23" \ "Re+Im" "Re*Im" default = 2 endparam param fixit caption = "Fixit for Color by" enum = "Last" "Minimum" "Maximum" "Sum" \ "W-Sum" "W^2-Sum" "WR-Sum" \ "G-Sum" "G'-Sum" "AG-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" default = 1 endparam param disturbFixFactor caption = "Fixit-Disturbance" default = 0.0 hint = "Disturbs the Fixit for Color By..." endparam param disturbMode caption = "Disturb Fixit Mode" enum = "Log" "Sqrt" "Lin" "Sqr" "AlterGeom" "Geom" "Const" "1/Magn" "1/Real" "1/Imag" "Magn" "Real" "Imag" "1/Diff" "Diff" 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" \ "Iterations" default = 0 endparam param numIterMode caption = "Fix Iterations" enum = "Normal" "#Numiter always" "Relative" "Difference" \ "Rel. Diff." "Average" 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 startColouring caption = "Start Colouring with i=" default = 0 min = 0 hint = "Different from Skip Mode. \ Calculations for the colourings start after this iteration, \ but the calculation of the different smooth points is not affected." endparam param startDistortion caption = "Start Distortion" enum = "#z" "Transformed z" "Pixel" "Mixel" default = 0 endparam param minMax caption = "Min/Max" default = FALSE endparam param xWaveMode caption = "x-Wave Mode" enum = "None" "x*sin(x)" "x*cos(x)" "x*sin(y)" "x*cos(y)" default = 0 endparam param yWaveMode caption = "y-Wave Mode" enum = "None" "y*sin(y)" "y*cos(y)" "y*sin(x)" "y*cos(x)" default = 0 endparam param xWaveFreq caption = "x-Wave Frequency" default = 1.0 endparam param yWaveFreq caption = "y-Wave Frequencx" default = 1.0 endparam param xWaveWeight caption = "x-Wave Weight" default = 1.0 endparam param yWaveWeight caption = "y-Wave Weight" default = 1.0 endparam param xWaveConst caption = "x-Wave Const" default = 0.0 endparam param yWaveConst caption = "y-Wave Const" default = 0.0 endparam param xWaveOffset caption = "x-Wave Offset" default = 0.0 endparam param yWaveOffset caption = "y-Wave Offset" default = 0.0 endparam param xWaveExp caption = "x-Wave Exponent" default = 1.0 endparam param yWaveEyp caption = "y-Wave Eyponent" default = 1.0 endparam param wavesLoop caption = "# Waves Loops" default = 1 min = 1 endparam param wavesLoopMode caption = "Mode Waves Loops" enum = "Static" "Dynamic" default = 0 endparam param wavesGrowFreq caption = "Waves: FreqGrowth" default = 1.0 min = 1e-99 endparam param rotDegree caption = "Degré de Rotation" default = 0.0 min = -359.99999 max = 359.99999 hint = "Does not work with Color by Fiximum Distance" endparam param rotDegree caption = "Degré de Rotation" default = 0.0 min = -359.99999 max = 359.99999 hint = "Does not work with Color by Fiximum Distance" endparam param rotCentre caption = "Centre de Rotation" default = (0.0,0.0) endparam param zJouk caption = "Joukowskij: Constant" default = (0.0,0.0) endparam param vectorJouk caption = "Joukowskij: Vector " default = (0.0,0.0) endparam param curveJouk caption = "Joukowskij Curvature" default = (0.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" "Hex" 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 lattOffset caption = "Lattice Offset" default = (0.0,0.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 globalScale caption = "Global Scale" default = 0.0 min = 0.0 endparam param globalDither caption = "L: Global Dither (GD) Scale" default = 0.0 hint = "Choose 1, 10, 50, 100 as experimental values and then start fine tuning." endparam param shape caption = "L: GD: Shape" enum = "None" "Circle" "Real" "Imag" "Diamond" "Skew" \ "!Circle" "!Real" "!Imag" "!Diamond" "!Skew" endparam param radius caption = "L: GD: Radius for Shapes" default = 0.5 endparam param inner_scale caption = "L: GD: Inner Scale" default = 3.0 hint = "Choose 1, 10, 50, 100 as experimental values \ and then start fine tuning." endparam param inner_amount caption = "L: GD: Inner Amount" default = 0.0 endparam param d_randomness caption = "L: GD-Randomness" hint = "This adds a randomness in the outlines." default = 0.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 turnScaleMode caption = "L: ScaleMode Turnaround" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Turnaround Scale > 0" endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param barnMode caption = "L: Barnsley Mode" enum = "None" "First" "Second" default = 0 endparam param barnScale caption = "L: Barnsley Scale" default = 0.0 min = 0.0 endparam param barnScaleMode caption = "L: ScaleMode Barnsley" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Barnsley Scale > 0" endparam param barnSeed caption = "L: Barnsley Seed" default = (0.6, 1.1) endparam param barnShift caption = "L: Barnsley Shift" default = 1.0 endparam param disturb_fbm caption = "L: Noise Strength" default = 0.0 min = 0.0 endparam param disturb_fbm_mode caption = "L: Noise Mode" enum = "Sum only" "Angle only" "fBm Pixel only" \ "fBm Pix*Sum" \ "fBm Pixel added" "fBm Pixel W-added" "fBm Pix*Sum added" \ "fBm Pix*Sum W-added" \ "fBm Pix*Angle" "fBm Pix*Angle added" "fBm Pix*Angle W-added" "fBm Pix*Angle Avg" default = 0 endparam param disturb_fbm_apply caption = "L: Noise Apply" enum = "Pixel" "Fixit" default = 0 endparam param disturb_fbm_scale caption = "L: Noise Scale" default = 1.0 endparam param disturb_fbm_octaves caption = "L: Noise Loops" default = 9 endparam param disturb_fbm_lattice caption = "L: Noise Lattice" default = false endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param txtr_verlauf_Line1 caption = "T: Bottom, Left, or Center" default = (0.0,0.0) hint = "First line for growth calculation. Might be the bottom in TB mode, \ might be the left border in LR mode, IS the center in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Line2 caption = "T: Top, Right, or Radius" default = (1.0,1.0) hint = "Second line for growth calculation. Might be the top in TB mode, \ might be the right border in LR mode, IS the radius in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_exponent caption = "T: Txtr Exponent" default = 1.5 hint = "Choose 1 for linear growth, 1.5-2 for (smoother) *quadratic* growth, \ other values to your free fun experiments... \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Rot caption = "T: Txtr Rotation" default = 0.0 min = -45.0 max = 45.0 endparam param txtr_verlauf_RotCentre caption = "T: Txtr Rot Centre" default = (0.0, 0.0) endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param f_rand_verlaufMode caption = "T: Random Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 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 f_Gnarl_verlaufMode caption = "T: Gnarl Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gnarl_verlaufOffset caption = "T: Gnarl V-Offset" default = 0.0 min = 0.0 endparam param txtr_gnarl_lattice caption = "T: Gnarl Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param f_PopCorn_verlaufMode caption = "T: PopCorn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_PopCorn_verlaufOffset caption = "T: PopCorn V-Offset" default = 0.0 min = 0.0 endparam param txtr_PopCorn_lattice caption = "T: PopCorn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_SFBM_verlaufMode caption = "T: SFBM Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SFBM_verlaufOffset caption = "T: SFBM V-Offset" default = 0.0 min = 0.0 endparam param txtr_SFBM_lattice caption = "T: SFBM Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Primes_verlaufMode caption = "T: Primes Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Primes_verlaufOffset caption = "T: Primes V-Offset" default = 0.0 min = 0.0 endparam param txtr_Primes_lattice caption = "T: Primes Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Gauss_verlaufMode caption = "T: Gauss Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gauss_verlaufOffset caption = "T: Gauss V-Offset" default = 0.0 min = 0.0 endparam param txtr_Gauss_lattice caption = "T: Gauss Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 txtr_Turn caption = "T: Turn Texture" hint = "This adds a Turn texture to the coloring." default = 0.0 endparam param f_Turn_verlaufMode caption = "T: Turn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Turn_verlaufOffset caption = "T: Turn V-Offset" default = 0.0 min = 0.0 endparam param txtr_Turn_lattice caption = "T: Turn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Turn_scale caption = "T: Turn Scale" hint = "Scaling Factor for this Turn texture." default = 1.0 endparam param txtr_Turn_size caption = "T: Turn Pattern Size" default = 1.0 endparam param txtr_Turn_limit caption = "T: Turn Limitation" default = 0.0 min = 0.0 endparam param txtr_Turn_corte1 caption = "T: Turnaround #1" default = 4.0 endparam param txtr_Turn_corte2 caption = "T: Turnaround #2" default = 2.0 endparam param txtr_Check caption = "T: Checker Texture" hint = "This adds a Check texture to the coloring." default = 0.0 endparam param f_Check_verlaufMode caption = "T: Checker Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Check_verlaufOffset caption = "T: Checker V-Offset" default = 0.0 min = 0.0 endparam param txtr_Check_scale caption = "T: Checker Scale" hint = "Scaling Factor for this Check texture." default = 1.0 endparam param txtr_Checker caption = "T: Checker Modulus" default = 2 min = 2 endparam param txtr_Check_test caption = "T: Checker Test Mode" enum = "Sum" "Prod" default = 1 endparam param txtr_Check_shape caption = "T: Checker Shape" enum = "Square" "Circle" \ "Square in Circle" "Circle in Square" \ "Segment" "Time" \ "H Bricks" "V Bricks" \ "I Ging" "I Went" \ "Broken Circle" \ "Cross" "Anti-Cross" \ "Bite" "Anti-Bite" "Mooon" "Trianguli" "Nose" \ "Broken Square" "BonBon" "Quizzle" "Hipster" "Broken Net" \ "New Moon" "Ti Moon" "Moon and Venus" "Venus and Moon" \ "Smiley" "Inv Smiley" "Frowney" "Inv Frowney" default = 0 endparam param txtr_Check_shConst caption = "T: Chk-Sh-Const" default = 1.0 endparam param txtr_Check_col caption = "T: Checker Color Mode" enum = "Flag" "Magn" "Iter" "Magn*Iter" "Dist Center" default = 0 endparam param txtr_Check_invert caption = "T: Inverse Checkers?" default = false endparam param txtr_Check_divide caption = "T: Divide Checkers?" enum = "None" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" default = 0 endparam param txtr_Check_limit caption = "T: Checker Limitation" default = 0.0 min = 0.0 endparam param txtr_Pick153 caption = "T: Pick153 Texture" hint = "This adds a Pick153 texture to the coloring." default = 0.0 endparam param f_Pick153_verlaufMode caption = "T: Pick153 Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Pick153_verlaufOffset caption = "T: Pick153 V-Offset" default = 0.0 min = 0.0 endparam param txtr_Pick153_lattice caption = "T: Pick153 Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Pick153_scale caption = "T: Pick153 Scale" hint = "Scaling Factor for this Pick153 texture." default = 1.0 endparam param txtr_scale153 caption = "T: Calc Scale 153" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_numOfTestsPick153 caption = "T: Pick153 Tests" hint = "Pick153 texture." default = 1 endparam param txtr_Pick153_col caption = "T: Pick153 Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_Pick153_limit caption = "T: Pick153 Limitation" default = 0.0 min = 0.0 endparam param txtr_SumDiv caption = "T: SumDiv Texture" hint = "This adds a SumDiv texture to the coloring." default = 0.0 endparam param f_SumDiv_verlaufMode caption = "T: SumDiv Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SumDiv_verlaufOffset caption = "T: SumDiv V-Offset" default = 0.0 min = 0.0 endparam param txtr_SumDiv_lattice caption = "T: SumDiv Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_SumDiv_scale caption = "T: SumDiv Scale" hint = "Scaling Factor for this SumDiv texture." default = 1.0 endparam param txtr_scaleSumDiv caption = "T: SumDiv Pattern Size" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_SumDiv_col caption = "T: SumDiv Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_SumDiv_mode caption = "T: SumDiv Calc Mode" enum = "Sum" "Quot" default = 0 endparam param txtr_SumDiv_limit caption = "T: SumDiv Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB caption = "T: MLAB Texture" hint = "This adds a MLAB texture to the coloring." default = 0.0 endparam param f_MLAB_verlaufMode caption = "T: MLAB Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MLAB_verlaufOffset caption = "T: MLAB V-Offset" default = 0.0 min = 0.0 endparam param txtr_MLAB_lattice caption = "T: MLAB Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MLAB_scale caption = "T: MLAB Scale" hint = "Scaling Factor for this MLAB texture." default = 1.0 endparam param txtr_MLAB_size caption = "T: MLAB Pattern Size" default = 1.0 endparam param txtr_MLAB_limit caption = "T: MLAB Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB_scalo caption = "T: MLAB CalcScale" default = 1.0 endparam param txtr_MLAB_divi caption = "T: MLAB Divisions" default = 4 endparam param txtr_MLAB_edge caption = "T: MLAB Edge" default = .8 endparam param txtr_MLAB_pro0 caption = "T: MLAB Prob-ty 0" default = (.25, .5) endparam param txtr_MLAB_pro1 caption = "T: MLAB Prob-ty 1" default = (.75, 1) endparam param txtr_MLAB_vari caption = "T: MLAB Variance" default = 1024.0 endparam param txtr_Banana caption = "T: Banana Texture" hint = "This adds a Banana texture to the coloring." default = 0.0 endparam param txtr_Banana_type caption = "T: Banana Type" enum = "Polyominos" \ "Original" "Ori/Polyominos" "Ori + Polyominos" "Ori + InvPoly" \ "Diff(Ori,Poly)" "Diff(Ori,InvPoly)" \ "Diff Banana" "Thoughtless" default = 1 endparam param f_Banana_verlaufMode caption = "T: Banana Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Banana_verlaufOffset caption = "T: Banana V-Offset" default = 0.0 min = 0.0 endparam param txtr_Banana_lattice caption = "T: Banana Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Banana_scale caption = "T: Banana Scale" hint = "Scaling Factor for this Banana texture." default = 1.0 endparam param txtr_Banana_size caption = "T: Banana Pattern Size" default = 1.0 endparam param txtr_Banana_limit caption = "T: Banana Limitation" default = 0.0 min = 0.0 endparam param txtr_Banana_scalo caption = "T: Banana CalcScale" default = 1.0 endparam param txtr_Banana_divi caption = "T: Banana Divisions" default = 4 endparam param txtr_Banana_ratio caption = "T: Ratio" default = (.5, .5) endparam param txtr_Banana_edge caption = "T: Banana Edge" default = .8 endparam param txtr_Banana_itre caption = "T: Inside" enum = "Continuous" "Solid" "Random" "Clear" default = 0 endparam param txtr_Banana_otre caption = "T: Outside" enum = "Continuous" "Solid" "Clear" default = 0 endparam param txtr_Banana_pro0 caption = "T: Banana Prob-ty 0" default = (.25, .5) endparam param txtr_Banana_pro1 caption = "T: Banana Prob-ty 1" default = (.75, 1) endparam param txtr_Banana_vari caption = "T: Banana Variance" default = 1024.0 endparam param txtr_Banana_seed0 caption = "T: Seed 0" default = 3779 endparam param txtr_Banana_seed1 caption = "T: Seed 1" default = 9377 endparam param txtr_Ell caption = "T: Elliptic Texture" hint = "This adds a Elliptic texture to the coloring." default = 0.0 endparam param txtr_Ell_type caption = "T: Elliptic Type" enum = "Magn Diff" "Real Diff" "Imag Diff" "Angel Diff" "Angle Diff" \ "Magn Quot" "Real Quot" "Imag Quot" "Angel Quot" "Angle Quot" \ "Magn Qout" "Real Qout" "Imag Qout" "Angel Qout" "Angle Qout" \ "Magn Pola" "Real Pola" "Imag Pola" "Angel Pola" "Angle Pola" default = 0 endparam param f_Ell_verlaufMode caption = "T: Elliptic Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Ell_verlaufOffset caption = "T: Elliptic V-Offset" default = 0.0 min = 0.0 endparam param txtr_Ell_lattice caption = "T: Elliptic Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Ell_scale caption = "T: Elliptic Scale" hint = "Scaling Factor for this Elliptic texture." default = 1.0 endparam param txtr_Ell_size caption = "T: Elliptic Pattern Size" default = 1.0 endparam param txtr_Ell_a caption = "T: Elliptic a" default = -1 endparam param txtr_Ell_b caption = "T: Elliptic b" default = -1 endparam param txtr_Ell_c caption = "T: Elliptic c" default = 1 endparam param txtr_Ell_d caption = "T: Elliptic d" default = 0 endparam param txtr_Ell_pseudo caption = "T: Pseudo Elliptic" default = true hint = "separate transforming real and imag" endparam param txtr_Ell_pseudoMix caption = "T: Pseudo Mix Real and Imag" default = false hint = "only in use with Pseudo Elliptic" endparam param txtr_Ell_mixMode caption = "T: Mix Mode for Pseudo Mix" enum = "Normal" "Difference" "Sum" "Product" "Exponent" endparam param txtr_Ell_limit caption = "T: Elliptic Limitation" default = 0.0 min = 0.0 endparam param txtr_MedialCut caption = "T: MedialCut Texture" hint = "This adds a MedialCut texture to the coloring." default = 0.0 endparam param f_MedialCut_verlaufMode caption = "T: MedialCut Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MedialCut_verlaufOffset caption = "T: MedialCut V-Offset" default = 0.0 min = 0.0 endparam param txtr_MedialCut_lattice caption = "T: MedialCut Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MedialCut_type caption = "T: MedialCut Type" enum = "Real" "Imag" "Min(Real,Imag)" "Max(Real,Imag)" \ "Sum" "Prod" "Real/Imag" "Imag/Real" "Diff" endparam param txtr_MedialCut_watch caption = "T: MedialCut Watch for Calc" enum = "Diff" "Min" "Max" "Sum" "Recip Sum" "Recip Diff" default = 0 endparam param txtr_MedialCut_scale caption = "T: MedialCut Scale" hint = "Scaling Factor for this MedialCut texture." default = 1.0 endparam param txtr_MedialCut_size caption = "T: MedialCut Pattern Size" default = 1.0 endparam param txtr_MedialCut_calcScale caption = "T: MedialCut Calc Scale" default = 1.0 min = 0 endparam param txtr_MedialCut_smooth caption = "T: MedialCut Smooth" default = 0.1 min = 1e-99 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_MedialCut_limit caption = "T: MedialCut Limitation" default = 0.0 min = 0.0 endparam param txtr_Truchet caption = "T: Truchet Texture" hint = "This adds a Truchet texture to the coloring." default = 0.0 endparam param f_Truchet_verlaufMode caption = "T: Truchet Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Truchet_verlaufOffset caption = "T: Truchet V-Offset" default = 0.0 min = 0.0 endparam param txtr_Truchet_lattice caption = "T: Truchet Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Truchet_mode caption = "T: Truchet Mode" default = 0 enum = "Roundy" "Squarry" "Worry" "Wyrry" "Harry" "Kirre" "Sally" endparam param txtr_Truchet_watch caption = "T: Truchet Watch" default = 0 enum = "Truchet" "Trechut" "Techtur" "Tuchter" "RetChut" endparam param txtr_Truchet_fixit caption = "T: Truchet Fixit" default = 0 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_Truchet_scale caption = "T: Truchet Scale" hint = "Scaling Factor for this Truchet texture." default = 1.0 endparam param txtr_Truchet_size caption = "T: Truchet Pat Size" default = 1.0 endparam param txtr_Truchet_corte caption = "T: Truchet Cutting Edges" default = .5 endparam param txtr_Truchet_rot caption = "T: Truchet Rotation" default = 0.0 endparam param txtr_Truchet_mst caption = "T: Truchet Magn Step" default = 2.0 endparam param txtr_Truchet_thick caption = "T: Truchet Thickness" default = 0.1 endparam param txtr_Truchet_Iters caption = "T: Truchet Iterations" default = 1 endparam param txtr_Truchet_seed caption = "T: Truchet Seed" default = 1234567890 endparam param txtr_Truchet_limit caption = "T: Truchet Limitation" default = 0.0 min = 0.0 endparam param txtr_GCD caption = "T: GCD Texture" hint = "This adds a GCD texture to the coloring." default = 0.0 endparam param f_GCD_verlaufMode caption = "T: GCD Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_GCD_verlaufOffset caption = "T: GCD V-Offset" default = 0.0 min = 0.0 endparam param txtr_GCD_lattice caption = "T: GCD Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_GCD_watch caption = "T: GCD Watch" enum = "GCD" "MinQ GCD/Iter" "MaxQ GCD/Iter" "DCG+Reti" "DCG-Reti" \ "CHK" "MinQ CHK/Iter" "MaxQ CHK/Iter" "CHK+Iter" "KHC+Reti" "KHC-Reti" \ "MinQ CHK/GCD" "MaxQ CHK/GCD" "CHK+GCD" "KHC+DCG" "KHC-DCG" default = 0 endparam param txtr_GCD_fixit caption = "T: GCD Fixit" default = 1 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_GCD_scale caption = "T: GCD Scale" hint = "Scaling Factor for this GCD texture." default = 1.0 endparam param txtr_GCD_size caption = "T: GCD Pattern Size" default = 1.0 endparam param txtr_GCD_calcScale caption = "T: GCD Calc Scale" default = 0.003 endparam param txtr_GCD_Iters caption = "T: GCD Iterations" default = 2 endparam param txtr_GCD_smooth caption = "T: GCD Smooth" default = 1e-10 min = 0.0 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_GCD_limit caption = "T: GCD 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|" "Index/|z|" "Proportions" 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 func startFct caption = "Start Function" default = ident() endfunc func ProjFct1 caption = "Projection 1" default = log() endfunc func ProjFct2 caption = "Projection 2" default = ident() endfunc func ProjFct3 caption = "Projection 3" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc func barnFct1 caption = "Barnsley Fnctn 1" default = flip() endfunc func barnFct2 caption = "Barnsley Fnctn 2" default = flip() endfunc } akl-MedialSmooth { ; ; Comments are in the folder comments ; ; Andreas Lober, November 12, 2000 ; init: complex zOld = 0 complex zOldOld = 0 float small = 0 float large = 0 float whole = 0 complex p = 0 float r = 0 float rfix = 0 float rtrap = 0 if (@fixit == 1) ; Min float rfix = 1e20 elseif (@fixit == 2) ; Max float rfix = -1e20 endif int iter = 0 float ifix = 0 float itrap = 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) float x = 0 float y = 0 complex zStart = 0 complex zfix = (0.0,0.0) complex cfix = (0.0,0.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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; float fbmSum = 0 float fbmAngle = 0 complex fbmDisturbPix = 0 if (@disturb_fbm > 0) float fbmAmplitude = 1.0 int i_fbm = 0 complex fbmPix = 0 if (@disturb_fbm_lattice) fbmPix = #pixel - round(#pixel*@disturb_fbm_scale)/@disturb_fbm_scale else fbmPix = #pixel*@disturb_fbm_scale endif while (i_fbm < @disturb_fbm_octaves) float fbmBx0 = floor(real(fbmPix)) float fbmBx1 = fbmBx0 + 1 float fbmRx0 = real(fbmPix) - floor(real(fbmPix)) float fbmRx1 = fbmRx0 - 1 float fbmBy0 = floor(imag(fbmPix)) float fbmBy1 = fbmBy0 + 1 float fbmRy0 = imag(fbmPix) - floor(imag(fbmPix)) float fbmRy1 = fbmRy0 - 1 if fbmBx0 < 0 fbmBx0 = fbmBx0 + 8192 endif if fbmBx1 < 0 fbmBx1 = fbmBx1 + 8192 endif if fbmBy0 < 0 fbmBy0 = fbmBy0 + 8192 endif if fbmBy1 < 0 fbmBy1 = fbmBy1 + 8192 endif float fbmTmp = 0 float fbmSX = fbmRx0 * fbmRx0 * (3 - 2 * fbmRx0) float fbmSY = fbmRy0 * fbmRy0 * (3 - 2 * fbmRy0) fbmTmp = fbmBx0^2*2473 % 65536 float b00 = (fbmTmp + fbmBy0)^2 % 65536 float b01 = (fbmTmp + fbmBy1)^2 % 65536 fbmTmp = fbmBx1^2*2473 % 65536 float b10 = (fbmTmp + fbmBy0)^2 % 65536 float b11 = (fbmTmp + fbmBy1)^2 % 65536 float fbmPoint000 = b00^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint010 = b01^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint100 = b10^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint110 = b11^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint001 = (b00 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint011 = (b01 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint101 = (b10 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint111 = (b11 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 fbmTmp = sqrt(fbmPoint000^2 + fbmPoint001^2) fbmPoint000 = fbmPoint000 / fbmTmp fbmPoint001 = fbmPoint001 / fbmTmp fbmTmp = sqrt(fbmPoint010^2 + fbmPoint011^2) fbmPoint010 = fbmPoint010 / fbmTmp fbmPoint011 = fbmPoint011 / fbmTmp fbmTmp = sqrt(fbmPoint100^2 + fbmPoint101^2) fbmPoint100 = fbmPoint100 / fbmTmp fbmPoint101 = fbmPoint101 / fbmTmp fbmTmp = sqrt(fbmPoint110^2 + fbmPoint111^2) fbmPoint110 = fbmPoint110 / fbmTmp fbmPoint111 = fbmPoint111 / fbmTmp float fbmU1 = fbmRx0 * fbmPoint000 + fbmRy0 * fbmPoint001 float fbmV1 = fbmRx1 * fbmPoint100 + fbmRy0 * fbmPoint101 float fbmPtX = fbmU1 + fbmSX * (fbmV1 - fbmU1) float fbmU2 = fbmRx0 * fbmPoint010 + fbmRy1 * fbmPoint011 float fbmV2 = fbmRx1 * fbmPoint110 + fbmRy1 * fbmPoint111 float fbmPtY = fbmU2 + fbmSY * (fbmV2 - fbmU2) fbmSum = fbmSum + fbmPtX + fbmSY*(fbmPtY - fbmPtX) * fbmAmplitude fbmAngle = atan2(fbmPtX+1i*fbmPtY)/(2*#pi) if (fbmAngle < 0) fbmAngle = fbmAngle + 1 endif fbmAmplitude = fbmAmplitude/2 fbmPix = fbmPix / 0.5 i_fbm = i_fbm + 1 if (@disturb_fbm_mode >= 2) fbmHelp = abs(fbmPtX + 1i*fbmPtY) if (@disturb_fbm_mode == 2) ; fBm Pixel only fbmDisturbPix = fbmHelp elseif (@disturb_fbm_mode == 3) ; fBm Pix*Sum fbmDisturbPix = fbmSum*fbmHelp elseif (@disturb_fbm_mode == 4) ; fBm Pixel added fbmDisturbPix = fbmDisturbPix + fbmHelp elseif (@disturb_fbm_mode == 5) ; fBm Pixel W-added fbmDisturbPix = fbmDisturbPix + fbmHelp/i_fbm elseif (@disturb_fbm_mode == 6) ; fBm Pix*Sum added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp elseif (@disturb_fbm_mode == 7) ; fBm Pix*Sum W-added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 8) ; fBm Pix*Angle fbmDisturbPix = fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 9) ; fBm Pix*Angle added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 10) ; fBm Pix*Angle W-added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 11) ; fBm Pix*Angle Avg fbmDisturbPix = (fbmDisturbPix + fbmAngle*fbmHelp)/fbmSum endif endif endwhile endif ; Variables for Verlauf float txtr_v_verlauf = 1 float txtr_v_hor1 = 0 float txtr_v_hor2 = 0 float txtr_v_bot = 0 float txtr_v_top = 0 float txtr_v_height = 0 float txtr_v_vert1 = 0 float txtr_v_vert2 = 0 float txtr_v_left = 0 float txtr_v_rigt = 0 float txtr_v_width = 0 float txtr_v_yPos = 0 float txtr_v_xPos = 0 ; Variables for Waves int l_waves = @wavesLoop int xWavesM = @xWaveMode int yWavesM = @yWaveMode float xWavesF = @xWaveFreq float yWavesF = @yWaveFreq loop: 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) zOldOld = zOld zOld = zStart 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; if (@globalScale != 0 && @globalScale != 1) zStart = zStart*@globalScale endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 0) if (@disturb_fbm_mode == 0) zStart = zStart*(1+@disturb_fbm*fbmSum) elseif (@disturb_fbm_mode == 1) zStart = zStart*(1+@disturb_fbm*fbmAngle) else zStart = zStart + @disturb_fbm*fbmDisturbPix endif endif if (@globalDither != 0) complex innerScaleZ = 0 complex innerOffset = 0 if (@inner_amount != 0 && zStart != 0) innerScaleZ = zStart*@inner_scale*@globalDither innerOffset = innerOffset + \ @inner_amount*round(innerScaleZ)/(innerScaleZ) endif if (@d_randomness != 0) innerOffset = innerOffset + @d_randomness*#random endif bool shapeCondition = true float ditherRadius = @radius/@globalDither if (@shape == 1) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) < ditherRadius) elseif (@shape == 2) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 3) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 4) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 5) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 6) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) > ditherRadius) elseif (@shape == 7) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 8) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 9) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) elseif (@shape == 10) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) endif if (shapeCondition) zStart = round(zStart*@globalDither + innerOffset)/@globalDither \ - innerOffset/@globalDither endif 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 ; complex zOffset = zStart-@lattOffset if (@lattice == 1) zStart = round(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zOffset) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 8) zStart = floor(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 10) zStart = abs(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*zOffset^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^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(zOffset) float imZ = imL1*imag(zOffset) 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 elseif (@lattice == 24) complex lzp = round(zOffset*@lattFac1) complex lzc = zOffset-(lzp/@lattFac2) float rlf = real(@lattFac1) if (round(imag(lzp))%3 == 0) lzc = (lzc+@lattFac2/2) if (abs(real(lzc)) > rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) < rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif elseif (round(real(lzp))%3 == 1) lzc = (lzc-@lattFac2/2) if (abs(imag(lzc)) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif else lzc = (lzc*@lattFac2*2) if (imag(lzc) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif endif endif ; lattices if (@turnMode) complex zRound = 0 complex zZ = zStart if (@turnScale != 0) if (@turnScaleMode == 0) zRound = round(zStart*@turnScale)/@turnScale elseif (@turnScaleMode == 1) zRound = round(cabs(zStart)*@turnScale)/@turnScale elseif (@turnScaleMode == 2) zRound = sqrt(|round(zStart*@turnScale)|)/@turnScale endif ; turnScaleMode 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 if (@barnMode > 0) float barnRe = real(@barnSeed) float barnIm = imag(@barnSeed) complex zRound = 0 complex zZ = zStart if (@barnScale != 0) if (@barnScaleMode == 0) zRound = round(zStart*@barnScale)/@barnScale elseif (@barnScaleMode == 1) zRound = round(cabs(zStart)*@barnScale)/@barnScale elseif (@barnScaleMode == 2) zRound = sqrt(|round(zStart*@barnScale)|)/@barnScale endif ; barnScaleMode complex zZ = zStart-zRound endif bool test = false if (@barnMode == 1) test = (real(zStart)*barnIm + barnRe*imag(zStart) >= 0) else test = (|real(zStart)*barnIm - barnRe*imag(zStart)| < .5) endif ; barnMode if (test) zStart = @barnFct1(zZ - @barnShift)*@barnSeed+zRound else zStart = @barnFct2(zZ + @barnShift)*@barnSeed+zRound endif ; test endif ; @barnMode > 0 if (@zJouk != 0 && zStart != 0) zStart = zStart + @zJouk/zStart endif if (iter > 2) if (@calculate == 0) small = abs(real(zOldOld)) large = abs(real(zOld)) whole = abs(real(zStart)) elseif (@calculate == 1) small = abs(imag(zOldOld)) large = abs(imag(zOld)) whole = abs(imag(zStart)) elseif (@calculate == 2) small = cabs(zOldOld) large = cabs(zOld) whole = cabs(zStart) elseif (@calculate == 3) float zwo_pi = 2*#pi small = atan2(zOldOld) large = atan2(zOld) whole = atan2(zStart) if (small <= 0) small = small+zwo_pi endif if (large <= 0) large = large+zwo_pi endif if (whole <= 0) whole = whole+zwo_pi endif elseif (@calculate == 4) small = cabs(atan(zOldOld)) large = cabs(atan(zOld)) whole = cabs(atan(zStart)) endif ; prevent those numbers from being zero: small = small + @smooth large = large + @smooth whole = whole + @smooth float sm_la = small/large float la_wh = large/whole if (sm_la < 0) sm_la = sm_la + iter endif if (la_wh < 0) la_wh = la_wh + iter endif ; calculate the "vector" x = sm_la y = la_wh if (@vectorJouk != 0 && zStart != 0) zStart = zStart + @vectorJouk/zStart endif r=0.0 if (@startDistortion == 0) p = #z elseif (@startDistortion == 1) p = zStart elseif (@startDistortion == 2) p = #pixel elseif (@startDistortion == 3) p = (zStart+#pixel)/2 endif if (@minMax) float xm = -1 float ym = -1 if (x < y) xm = x ym = y else xm = y ym = x endif x = xm y = ym endif ; Wave stuff int loop_i = 0 while (loop_i < l_waves) loop_i = loop_i + 1 if (@wavesLoopMode == 1) ; cyclic xWavesM = (xWavesM+1)%5 yWavesM = (yWavesM+1)%5 endif if (xWavesM == 1) ; x*sin(x) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 2) ; x*cos(x) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 3) ; x*sin(y) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*y + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 4) ; x*cos(y) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*y + @xWaveOffset)^@xWaveExp) endif if (yWavesM == 1) ; y*sin(y) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 2) ; y*cos(y) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 3) ; y*sin(x) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*x + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 4) ; y*cos(x) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*x + @yWaveOffset)^@yWaveEyp) endif if (@wavesGrowFreq != 1) xWavesF = xWavesF*@wavesGrowFreq yWavesF = yWavesF*@wavesGrowFreq endif endwhile ; wave stuff if (@curveJouk != 0) if (x != 0) x = x + real(@curveJouk)/x endif if (y != 0) y = y + imag(@curveJouk)/y endif endif z = x + 1i*y float rz = |real(z)| float iz = |imag(z)| if (@watch == 0) ; real r = rz elseif (@watch == 1) ; imag r = iz elseif (@watch == 2) ; magn r = |z| elseif (@watch == 3) ; diff r = |rz-iz| 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 = |z-zStart| 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 float disturbFix = 0 if (@disturbFixFactor != 0) float dtmp = 1 if (@disturbMode == 0) ; Log dtmp = 1/log(iter) elseif (@disturbMode == 1) ; Sqrt dtmp = 1/sqrt(iter) elseif (@disturbMode == 2) ; Lin dtmp = 1/iter elseif (@disturbMode == 3) ; Sqr dtmp = 1/iter^2 elseif (@disturbMode == 4) ; AlterGeom dtmp = 1/(exp(-iter)*(-1)^iter) elseif (@disturbMode == 5) ; Geom dtmp = 1/(exp(-iter)*iter) elseif (@disturbMode == 6) ; Const dtmp = 1 elseif (@disturbMode == 7) ; Const dtmp = 1/|zstart| elseif (@disturbMode == 8) ; Const dtmp = 1/|real(zstart)| elseif (@disturbMode == 9) ; Const dtmp = 1/|imag(zstart)| elseif (@disturbMode == 10) ; Const dtmp = |zstart| elseif (@disturbMode == 11) ; Const dtmp = |real(zstart)| elseif (@disturbMode == 12) ; Const dtmp = |imag(zstart)| elseif (@disturbMode == 13) ; Const dtmp = 1/|real(zstart)-imag(zstart)| elseif (@disturbMode == 14) ; Const dtmp = |real(zstart)-imag(zstart)| endif disturbFix = @disturbFixFactor*dtmp endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 1) if (@disturb_fbm_mode == 0) disturbFix = @disturb_fbm*fbmSum elseif (@disturb_fbm_mode == 1) disturbFix = @disturb_fbm*fbmAngle else disturbFix = @disturb_fbm*cabs(fbmDisturbPix) endif endif if (@fixit == 0) ; Last rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix elseif (@fixit == 1) ; Minimum if (r < rfix) rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix endif elseif (@fixit == 2) ; Maximum if (r > rfix) rfix = r - disturbFix ifix = iter - disturbFix zfix = zStart - disturbFix cfix = p - disturbFix endif elseif (@fixit == 3) ; sum rfix = rfix + r + disturbFix ifix = ifix + iter + disturbFix zfix = zfix + zStart + disturbFix cfix = cfix + p + disturbFix elseif (@fixit == 4) ; w-sum rfix = rfix + r/iter + disturbFix ifix = (ifix + iter)/iter + disturbFix zfix = zfix + zStart/iter + disturbFix cfix = cfix + p/iter + disturbFix elseif (@fixit == 5) ; w2-sum float itmp = iter^2 rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 6) ; wS-sum float itmp = sqrt(iter) rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 7) ; g-sum float itmp = exp(-iter) rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 8) ; g'-sum float itmp = exp(-iter)*iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 9) ; ag-sum float itmp = exp(-iter)*(-1)^iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 10) ; l-sum rfix = rfix + log(r) + disturbFix ifix = ifix + log(iter) + disturbFix zfix = zfix + log(zStart) + disturbFix cfix = cfix + log(p) + disturbFix elseif (@fixit == 11) ; lw-sum rfix = rfix + log(r)/iter + disturbFix ifix = (ifix + log(iter))/iter + disturbFix zfix = zfix + log(zStart)/iter + disturbFix cfix = cfix + log(p)/iter + disturbFix elseif (@fixit == 12) ; lw-sum float itmp = iter^2 rfix = rfix + log(r)/itmp + disturbFix ifix = (ifix + log(iter))/itmp + disturbFix zfix = zfix + log(zStart)/itmp + disturbFix cfix = cfix + log(p)/itmp + disturbFix endif if (@rotDegree != 0) zfix = (zfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre cfix = (cfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre 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 ; (iter > 2) endif ; do_loop (at the very beginning final: float temp = 0 if (@numIterMode == 1) ifix = #numiter elseif (@numIterMode == 2) ifix = ifix/#numiter elseif (@numIterMode == 3) ifix = #numiter-ifix elseif (@numIterMode == 4) ifix = (#numiter-ifix)/#numiter elseif (@numIterMode == 5) ifix = (#numiter+ifix)/2 endif ; @numIterMode if (@colorby == 0) ; Fiximum 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 elseif (@colorby == 23) temp = ifix endif ; colorby list 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) elseif (@maskType == 10) ; Index/|z| mask = temp/cabs(zStart) elseif (@maskType == 11) ; GoldenCut mask = |real(zStart)/imag(zStart) - imag(zStart)/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 (@colour_limit != 0) to_index = to_index%@colour_limit endif 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 (@f_rand_verlaufMode > 0 || \ @f_Gnarl_verlaufMode > 0 || \ @f_PopCorn_verlaufMode > 0 || \ @f_SFBM_verlaufMode > 0 || \ @f_Primes_verlaufMode > 0 || \ @f_Gauss_verlaufMode > 0 || \ @f_Turn_verlaufMode > 0 || \ @f_Check_verlaufMode > 0 || \ @f_Pick153_verlaufMode > 0 || \ @f_SumDiv_verlaufMode > 0 || \ @f_MLAB_verlaufMode > 0 || \ @f_Banana_verlaufMode > 0 || \ @f_Ell_verlaufMode > 0 || \ @f_MedialCut_verlaufMode > 0 \ ) txtr_v_hor1 = imag(@txtr_verlauf_Line1) txtr_v_hor2 = imag(@txtr_verlauf_Line2) if (txtr_v_hor1 < txtr_v_hor2) txtr_v_bot = txtr_v_hor1 txtr_v_top = txtr_v_hor2 else txtr_v_bot = txtr_v_hor2 txtr_v_top = txtr_v_hor1 endif txtr_v_height = txtr_v_top-txtr_v_bot txtr_v_vert1 = real(@txtr_verlauf_Line1) txtr_v_vert2 = real(@txtr_verlauf_Line2) if (txtr_v_vert1 < txtr_v_vert2) txtr_v_left = txtr_v_vert1 txtr_v_rigt = txtr_v_vert2 else txtr_v_left = txtr_v_vert2 txtr_v_rigt = txtr_v_vert1 endif txtr_v_width = txtr_v_rigt-txtr_v_left complex pixpix = #pixel if (@txtr_verlauf_Rot%360 != 0) complex rotCentre = @txtr_verlauf_RotCentre pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@txtr_verlauf_Rot/180) + rotCentre endif txtr_v_yPos = imag(pixpix) txtr_v_xPos = real(pixpix) else txtr_v_verlauf = 1 endif if (@f_randomness != 0) txtr_v_verlauf = 1 if (@f_rand_verlaufMode > 0) if (@f_rand_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) ;! txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height ;! endif elseif (@f_rand_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) ;! ;! txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width ;! endif elseif (@f_rand_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_rand_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_rand_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif endif to_index = to_index + @f_randomness*txtr_v_verlauf * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz if (@txtr_Gnarl_lattice == 0) zGnarl = zGnarl*@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 1) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 2) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale*10) elseif (@txtr_Gnarl_lattice == 3) zGnarl = zGnarl-trunc(@txtr_Gnarl_scale/zGnarl) elseif (@txtr_Gnarl_lattice == 4) zGnarl = zGnarl*@txtr_Gnarl_scale + @txtr_Gnarl_scale/zGnarl elseif (@txtr_Gnarl_lattice == 5) zGnarl = round(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 6) complex zp_Gnarl = round(zGnarl*@txtr_Gnarl_scale) complex zc_Gnarl = zGnarl - (zp_Gnarl/@txtr_Gnarl_scale) if (round(imag(zp_Gnarl))%3==0) zc_Gnarl = (zc_Gnarl + @txtr_Gnarl_scale/2) if (abs(real(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif elseif (round(real(zp_Gnarl))%3==1) zc_Gnarl = (zc_Gnarl - @txtr_Gnarl_scale/2) if (abs(imag(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif else zc_Gnarl = (zc_Gnarl*@txtr_Gnarl_scale*2) if (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gnarl_verlaufMode > 0) if (@f_Gnarl_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gnarl_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gnarl_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gnarl_verlaufOffset endif to_index = to_index + @txtr_gnarl*txtr_v_verlauf*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz if (@txtr_PopCorn_lattice == 0) zPopCorn = zPopCorn*@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 1) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 2) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale*10) elseif (@txtr_PopCorn_lattice == 3) zPopCorn = zPopCorn-trunc(@txtr_PopCorn_scale/zPopCorn) elseif (@txtr_PopCorn_lattice == 4) zPopCorn = zPopCorn*@txtr_PopCorn_scale + @txtr_PopCorn_scale/zPopCorn elseif (@txtr_PopCorn_lattice == 5) zPopCorn = round(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 6) complex zp_PopCorn = round(zPopCorn*@txtr_PopCorn_scale) complex zc_PopCorn = zPopCorn - (zp_PopCorn/@txtr_PopCorn_scale) if (round(imag(zp_PopCorn))%3==0) zc_PopCorn = (zc_PopCorn + @txtr_PopCorn_scale/2) if (abs(real(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif elseif (round(real(zp_PopCorn))%3==1) zc_PopCorn = (zc_PopCorn - @txtr_PopCorn_scale/2) if (abs(imag(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif else zc_PopCorn = (zc_PopCorn*@txtr_PopCorn_scale*2) if (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif endif endif ; txtr_popcorn_lattice 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 txtr_v_verlauf = 1 if (@f_PopCorn_verlaufMode > 0) if (@f_PopCorn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_PopCorn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_PopCorn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_PopCorn_verlaufOffset endif to_index = to_index + @txtr_PopCorn*txtr_v_verlauf*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 if (@txtr_SFBM_lattice == 0) zSFBM = zSFBM*@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 1) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 2) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale*10) elseif (@txtr_SFBM_lattice == 3) zSFBM = zSFBM-trunc(@txtr_SFBM_scale/zSFBM) elseif (@txtr_SFBM_lattice == 4) zSFBM = zSFBM*@txtr_SFBM_scale + @txtr_SFBM_scale/zSFBM elseif (@txtr_SFBM_lattice == 5) zSFBM = round(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 6) complex zp_SFBM = round(zSFBM*@txtr_SFBM_scale) complex zc_SFBM = zSFBM - (zp_SFBM/@txtr_SFBM_scale) if (round(imag(zp_SFBM))%3==0) zc_SFBM = (zc_SFBM + @txtr_SFBM_scale/2) if (abs(real(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif elseif (round(real(zp_SFBM))%3==1) zc_SFBM = (zc_SFBM - @txtr_SFBM_scale/2) if (abs(imag(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif else zc_SFBM = (zc_SFBM*@txtr_SFBM_scale*2) if (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif endif endif 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 ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_SFBM_verlaufMode > 0) if (@f_SFBM_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SFBM_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SFBM_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SFBM_verlaufOffset endif to_index = to_index + @txtr_SFBM*txtr_v_verlauf*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz if (@txtr_Primes_lattice == 0) ; none zPrimes = zPrimes*@txtr_Primes_scale elseif (@txtr_Primes_lattice == 1) ; normal zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 2) ; modified zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale*10) elseif (@txtr_Primes_lattice == 3) ; Inverse1 zPrimes = zPrimes-trunc(@txtr_Primes_scale/zPrimes) elseif (@txtr_Primes_lattice == 4) ; joukowskij zPrimes = zPrimes*@txtr_Primes_scale + @txtr_Primes_scale/zPrimes elseif (@txtr_Primes_lattice == 5) zPrimes = round(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 6) complex zp_Primes = round(zPrimes*@txtr_Primes_scale) complex zc_Primes = zPrimes - (zp_Primes/@txtr_Primes_scale) if (round(imag(zp_Primes))%3==0) zc_Primes = (zc_Primes + @txtr_Primes_scale/2) if (abs(real(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif elseif (round(real(zp_Primes))%3==1) zc_Primes = (zc_Primes - @txtr_Primes_scale/2) if (abs(imag(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif else zc_Primes = (zc_Primes*@txtr_Primes_scale*2) if (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif endif endif 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*txtr_v_verlauf*texturePrimes txtr_v_verlauf = 1 if (@f_Primes_verlaufMode > 0) if (@f_Primes_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Primes_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Primes_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Primes_verlaufOffset endif endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz if (@txtr_Gauss_lattice == 0) zGauss = zGauss*@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 1) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 2) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale*10) elseif (@txtr_Gauss_lattice == 3) zGauss = zGauss-trunc(@txtr_Gauss_scale/zGauss) elseif (@txtr_Gauss_lattice == 4) zGauss = zGauss*@txtr_Gauss_scale + @txtr_Gauss_scale/zGauss elseif (@txtr_Gauss_lattice == 5) zGauss = round(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 6) complex zp_Gauss = round(zGauss*@txtr_Gauss_scale) complex zc_Gauss = zGauss - (zp_Gauss/@txtr_Gauss_scale) if (round(imag(zp_Gauss))%3==0) zc_Gauss = (zc_Gauss + @txtr_Gauss_scale/2) if (abs(real(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif elseif (round(real(zp_Gauss))%3==1) zc_Gauss = (zc_Gauss - @txtr_Gauss_scale/2) if (abs(imag(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif else zc_Gauss = (zc_Gauss*@txtr_Gauss_scale*2) if (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gauss_verlaufMode > 0) if (@f_Gauss_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gauss_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gauss_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gauss_verlaufOffset endif to_index = to_index + @txtr_Gauss*txtr_v_verlauf*textureGauss endif if (@txtr_Turn!= 0) complex zTurn = _zz zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale if (@txtr_Turn_lattice == 0) zTurn = zTurn*@txtr_Turn_scale elseif (@txtr_Turn_lattice == 1) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 2) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale*10) elseif (@txtr_Turn_lattice == 3) zTurn = zTurn-trunc(@txtr_Turn_scale/zTurn) elseif (@txtr_Turn_lattice == 4) zTurn = zTurn*@txtr_Turn_scale + @txtr_Turn_scale/zTurn elseif (@txtr_Turn_lattice == 5) zTurn = round(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 6) complex zp_Turn = round(zTurn*@txtr_Turn_scale) complex zc_Turn = zTurn - (zp_Turn/@txtr_Turn_scale) if (round(imag(zp_Turn))%3==0) zc_Turn = (zc_Turn + @txtr_Turn_scale/2) if (abs(real(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif elseif (round(real(zp_Turn))%3==1) zc_Turn = (zc_Turn - @txtr_Turn_scale/2) if (abs(imag(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif else zc_Turn = (zc_Turn*@txtr_Turn_scale*2) if (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif endif endif complex zTurned = zTurn float txtr_testAngle1 = #pi/@txtr_Turn_corte1 float txtr_testAngle2 = 3*txtr_testAngle1 complex txtr_rotAngle1 = @txtr_Turn_corte2*1i*txtr_testAngle1 complex txtr_rotAngle2 = @txtr_Turn_corte2*1i*txtr_testAngle2 if (@txtr_Turn_size != 0 && @txtr_Turn_size != 1) zTurn = zTurn/@txtr_Turn_size endif if (@reachThrough) _zz = zTurn endif float textureTurn = 0 float txtr_arg = atan2(zTurn) ; "Turn around" part taken from Sam if (abs(txtr_arg) < txtr_testAngle1) zTurned = zTurn*exp(txtr_rotAngle1) elseif (abs(txtr_arg) > txtr_testAngle2) zTurned = zTurn*exp(txtr_rotAngle2) endif textureTurn = |zTurn-zTurned| if (@txtr_Turn_limit != 0) textureTurn = textureTurn%@txtr_Turn_limit endif txtr_v_verlauf = 1 if (@f_Turn_verlaufMode > 0) if (@f_Turn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Turn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Turn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Turn_verlaufOffset endif to_index = to_index + @txtr_Turn*txtr_v_verlauf*textureTurn endif if (@txtr_Check!= 0) complex zChecked = round(_zz*@txtr_Check_scale) float textureCheck = 0 int checkFlag = 0 int testCheck = 0 int reChecked = trunc(real(zChecked)) int imChecked = trunc(imag(zChecked)) if (@txtr_Check_test == 0) testCheck = reChecked + imChecked elseif (@txtr_Check_test == 1) testCheck = reChecked * imChecked endif complex zCheckShape = _zz*@txtr_Check_scale complex zShapedCheck = zChecked - zCheckShape float reShapedCheck = real(zShapedCheck) float imShapedCheck = imag(zShapedCheck) if (testCheck%@txtr_Checker == 0) ; Condition for the checkers if (@txtr_Check_shape == 0) ; Squares only checkFlag = 1 elseif (@txtr_Check_shape == 1) ; Circle if (|zShapedCheck| < .2*@txtr_Check_shConst) ; additional condition checkFlag = 1 ; for circles endif elseif (@txtr_Check_shape == 2) if (abs (|reShapedCheck| - |imShapedCheck|) > .1*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 3) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 endif elseif (@txtr_Check_shape == 4) if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; segments checkFlag = 1 endif elseif (@txtr_Check_shape == 5) checkFlag = 1 ; draw a square if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; cut out segments checkFlag = 0 endif elseif (@txtr_Check_shape == 6) checkFlag = 1 ; draw a square if (|reShapedCheck| > .05*@txtr_Check_shConst) ; cut out horizontal lines checkFlag = 0 endif elseif (@txtr_Check_shape == 7) checkFlag = 1 ; draw a square if (|imShapedCheck| > .05*@txtr_Check_shConst) ; cut out vertical lines checkFlag = 0 endif elseif (@txtr_Check_shape == 8) checkFlag = 1 ; draw a square if ( |sin(imChecked*2*#pi) - sin(imag(zCheckShape)*2*#pi)| < .5*@txtr_Check_shConst) checkFlag = 0 ; cut out many vertical lines endif elseif (@txtr_Check_shape == 9) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 0 ; cut out a circle if (|imShapedCheck| > .05*@txtr_Check_shConst) checkFlag = 1 ; fill in something endif endif elseif (@txtr_Check_shape == 10) if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 1 ; draw a circle if (|imShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 ; cut out horizontal if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 ; fill in vertical endif endif endif elseif (@txtr_Check_shape == 11) checkFlag = 1 if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 0 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 12) if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 1 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 endif endif elseif (@txtr_Check_shape == 13) float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 14) checkFlag = 1 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 15) checkFlag = 1 if (|zShapedCheck| > .1*@txtr_Check_shConst) checkFlag = 0 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 16) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |reShapedCheck| + |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 17) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 18) checkFlag = 1 if (abs(reShapedCheck) - abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(reShapedCheck) + abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 19) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.1*@txtr_Check_shConst && \ |reShapedCheck| + |imShapedCheck| > 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 20) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) < 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 21) if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 22) checkFlag = 1 if (|sin(reShapedCheck*2*#pi) - cos(imShapedCheck*2*#pi) | > 0.5*@txtr_Check_shConst || \ |imShapedCheck| < 0.01*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 23) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif elseif (@txtr_Check_shape == 24) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif elseif (@txtr_Check_shape == 25) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif endif elseif (@txtr_Check_shape == 26) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif endif elseif (@txtr_Check_shape == 27) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 1 endif endif endif endif endif elseif (@txtr_Check_shape == 28) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 0 endif endif endif endif endif elseif (@txtr_Check_shape == 29) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 1 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 1 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 0 endif endif endif endif elseif (@txtr_Check_shape == 30) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 0 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 0 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 1 endif endif endif endif endif if (@txtr_Check_divide == 1) if (reShapedCheck > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 2) if (|reShapedCheck| > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 3) if (cabs(reShapedCheck) > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 4) if (|reShapedCheck| > |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 5) if (reShapedCheck < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 6) if (|reShapedCheck| < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 7) if (cabs(reShapedCheck) < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 8) if (|reShapedCheck| < |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 9) if (|atan2(zShapedCheck)/#pi|%.15 > .03) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 10) if (cabs(zShapedCheck)%.1 > .03) checkFlag = 1 - checkFlag endif endif endif ; testCheck%@txtr_Checker == 0 if (@txtr_Check_invert) checkFlag = 1 - checkFlag endif textureCheck = checkFlag if (@txtr_Check_col == 1 || @txtr_Check_col == 3) textureCheck = textureCheck*|zChecked| endif if (@txtr_Check_col == 2 || @txtr_Check_col == 3) textureCheck = textureCheck*#numiter endif if (@txtr_Check_col == 4) textureCheck = textureCheck*|zShapedCheck| endif if (@txtr_Check_limit != 0) textureCheck = textureCheck%@txtr_Check_limit endif txtr_v_verlauf = 1 if (@f_Check_verlaufMode > 0) if (@f_Check_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Check_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Check_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Check_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Check_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Check_verlaufOffset endif to_index = to_index + @txtr_Check*txtr_v_verlauf*textureCheck endif if (@txtr_Pick153 != 0) complex zPick153 = _zz float reCalcPick153 = 0 float imCalcPick153 = 0 float reTestPick153 = 0 float imTestPick153 = 0 float rePick153_1 = 0 float rePick153_2 = 0 float rePick153_3 = 0 float imPick153_1 = 0 float imPick153_2 = 0 float imPick153_3 = 0 float rePick153_R = 0 float imPick153_R = 0 if (@txtr_Pick153_lattice == 0) zPick153 = zPick153*@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 1) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 2) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale*10) elseif (@txtr_Pick153_lattice == 3) zPick153 = zPick153-trunc(@txtr_Pick153_scale/zPick153) elseif (@txtr_Pick153_lattice == 4) zPick153 = zPick153*@txtr_Pick153_scale + @txtr_Pick153_scale/zPick153 elseif (@txtr_Pick153_lattice == 5) zPick153 = round(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 6) complex zp_Pick153 = round(zPick153*@txtr_Pick153_scale) complex zc_Pick153 = zPick153 - (zp_Pick153/@txtr_Pick153_scale) if (round(imag(zp_Pick153))%3==0) zc_Pick153 = (zc_Pick153 + @txtr_Pick153_scale/2) if (abs(real(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif elseif (round(real(zp_Pick153))%3==1) zc_Pick153 = (zc_Pick153 - @txtr_Pick153_scale/2) if (abs(imag(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif else zc_Pick153 = (zc_Pick153*@txtr_Pick153_scale*2) if (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif endif endif float texturePick153 = 0 float granulation153 = 1000*@txtr_scale153 zCalcPick153 = (trunc(zPick153*granulation153)/granulation153 - trunc(zPick153*@txtr_scale153)) * 1000 reCalcPick153 = real(zCalcPick153) imCalcPick153 = imag(zCalcPick153) int j = @txtr_numOfTestsPick153 while (j > 0) j = j-1 rePick153_1 = trunc(reCalcPick153/100) rePick153_2 = trunc(reCalcPick153/10 - rePick153_1*10) rePick153_3 = trunc(reCalcPick153/1 - rePick153_1*100 - rePick153_2*10) imPick153_1 = trunc(imCalcPick153/100) imPick153_2 = trunc(imCalcPick153/10 - imPick153_1*10) imPick153_3 = trunc(imCalcPick153/1 - imPick153_1*100 - imPick153_2*10) reTestPick153 = rePick153_1^3 + rePick153_2^3 + rePick153_3^2 imTestPick153 = imPick153_1^3 + imPick153_2^3 + imPick153_3^2 rePick153_R = reCalcPick153 - reTestPick153 imPick153_R = imCalcPick153 - imTestPick153 reCalcPick153 = reTestPick153 imCalcPick153 = imTestPick153 endwhile ; j > 0 if (@txtr_Pick153_col == 0) texturePick153 = abs(rePick153_R)/500 elseif (@txtr_Pick153_col == 1) texturePick153 = abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 2) texturePick153 = abs(rePick153_R+imPick153_R)/500 elseif (@txtr_Pick153_col == 3) texturePick153 = abs(rePick153_R)/500 + abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 4) texturePick153 = abs(imPick153_R-rePick153_R)/250 elseif (@txtr_Pick153_col == 5) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 6) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 7) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 8) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 9) texturePick153 = abs(rePick153_R*imPick153_R)/250000 elseif (@txtr_Pick153_col == 10) texturePick153 = abs(rePick153_R*imPick153_R)/abs((rePick153_R+imPick153_R)*500) elseif (@txtr_Pick153_col == 11) texturePick153 = (rePick153_R+imPick153_R)^2/abs(rePick153_R*imPick153_R) elseif (@txtr_Pick153_col == 12) texturePick153 = (rePick153_R-imPick153_R)^2/(rePick153_R+imPick153_R)^2 endif if (@txtr_Pick153_limit != 0) texturePick153 = texturePick153%@txtr_Pick153_limit endif if (texturePick153 < 0) texturePick153 = 0 endif txtr_v_verlauf = 1 if (@f_Pick153_verlaufMode > 0) if (@f_Pick153_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Pick153_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Pick153_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Pick153_verlaufOffset endif to_index = to_index + @txtr_Pick153*txtr_v_verlauf*texturePick153 endif if (@txtr_SumDiv != 0) complex zSumDiv = _zz float reCalcSumDiv = 0 float imCalcSumDiv = 0 float reSumDiv_R = 0 float imSumDiv_R = 0 if (@txtr_SumDiv_lattice == 0) zSumDiv = zSumDiv*@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 1) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 2) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale*10) elseif (@txtr_SumDiv_lattice == 3) zSumDiv = zSumDiv-trunc(@txtr_SumDiv_scale/zSumDiv) elseif (@txtr_SumDiv_lattice == 4) zSumDiv = zSumDiv*@txtr_SumDiv_scale + @txtr_SumDiv_scale/zSumDiv elseif (@txtr_SumDiv_lattice == 5) zSumDiv = round(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 6) complex zp_SumDiv = round(zSumDiv*@txtr_SumDiv_scale) complex zc_SumDiv = zSumDiv - (zp_SumDiv/@txtr_SumDiv_scale) if (round(imag(zp_SumDiv))%3==0) zc_SumDiv = (zc_SumDiv + @txtr_SumDiv_scale/2) if (abs(real(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif elseif (round(real(zp_SumDiv))%3==1) zc_SumDiv = (zc_SumDiv - @txtr_SumDiv_scale/2) if (abs(imag(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif else zc_SumDiv = (zc_SumDiv*@txtr_SumDiv_scale*2) if (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif endif endif float textureSumDiv = 0 float granulationSumDiv = 1000*@txtr_scaleSumDiv zCalcSumDiv = (trunc(zSumDiv*granulationSumDiv)/granulationSumDiv - trunc(zSumDiv*@txtr_scaleSumDiv)) * 1000 reCalcSumDiv = real(zCalcSumDiv) imCalcSumDiv = imag(zCalcSumDiv) if (@txtr_SumDiv_mode == 0) reSumDiv_R = 0 imSumDiv_R = 0 elseif (@txtr_SumDiv_mode == 1) reSumDiv_R = reCalcSumDiv imSumDiv_R = imCalcSumDiv endif int j = 0 while (j abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R)/500 else textureSumDiv = abs(reSumDiv_R)/500 endif elseif (@txtr_SumDiv_col == 7) if abs(imSumDiv_R) < abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 8) if abs(imSumDiv_R) > abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 9) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/250000 elseif (@txtr_SumDiv_col == 10) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/abs((reSumDiv_R+imSumDiv_R)*500) elseif (@txtr_SumDiv_col == 11) textureSumDiv = (reSumDiv_R+imSumDiv_R)^2/abs(reSumDiv_R*imSumDiv_R) elseif (@txtr_SumDiv_col == 12) textureSumDiv = (reSumDiv_R-imSumDiv_R)^2/(reSumDiv_R+imSumDiv_R)^2 endif if (@txtr_SumDiv_limit != 0) textureSumDiv = textureSumDiv%@txtr_SumDiv_limit endif if (textureSumDiv < 0) textureSumDiv = 0 endif txtr_v_verlauf = 1 if (@f_SumDiv_verlaufMode > 0) if (@f_SumDiv_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SumDiv_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SumDiv_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SumDiv_verlaufOffset endif to_index = to_index + @txtr_SumDiv*txtr_v_verlauf*textureSumDiv endif if (@txtr_MLAB!= 0) float txtrB_ux = 0.0 float txtrB_uy = 0.0 float txtrB_scax = 0.0 float txtrB_scay = 0.0 float txtrB_ax = 0.0 float txtrB_ay = 0.0 float txtrB_mx = 0.0 float txtrB_my = 0.0 float txtrB_mr = 0.0 int txtrB_i = 0 bool txtrB_done = false bool txtrB_ix = false bool txtrB_iy = false ;---------------------------------- complex zMLAB = _zz if (@txtr_MLAB_lattice == 0) zMLAB = zMLAB*@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 1) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 2) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale*10) elseif (@txtr_MLAB_lattice == 3) zMLAB = zMLAB-trunc(@txtr_MLAB_scale/zMLAB) elseif (@txtr_MLAB_lattice == 4) zMLAB = zMLAB*@txtr_MLAB_scale + @txtr_MLAB_scale/zMLAB elseif (@txtr_MLAB_lattice == 5) zMLAB = round(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 6) complex zp_MLAB = round(zMLAB*@txtr_MLAB_scale) complex zc_MLAB = zMLAB - (zp_MLAB/@txtr_MLAB_scale) if (round(imag(zp_MLAB))%3==0) zc_MLAB = (zc_MLAB + @txtr_MLAB_scale/2) if (abs(real(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif elseif (round(real(zp_MLAB))%3==1) zc_MLAB = (zc_MLAB - @txtr_MLAB_scale/2) if (abs(imag(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif else zc_MLAB = (zc_MLAB*@txtr_MLAB_scale*2) if (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif endif endif ;zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale if (@txtr_MLAB_size != 0 && @txtr_MLAB_size != 1) zMLAB = zMLAB/@txtr_MLAB_size endif if (@reachThrough) _zz = zMLAB endif float textureMLAB = 0 txtrB_ux = real(zMLAB)*@txtr_MLAB_scalo txtrB_uy = imag(zMLAB)*@txtr_MLAB_scalo txtrB_ax = floor(txtrB_ux) txtrB_ay = floor(txtrB_uy) txtrB_scax = .5 txtrB_scay = .5 while (!txtrB_done && txtrB_i < @txtr_MLAB_divi) txtrB_mx = txtrB_ax + txtrB_scax txtrB_my = txtrB_ay + txtrB_scay txtrB_mr = txtrB_mx * 3779 + txtrB_my * 9377 txtrB_mr = abs(sin(txtrB_mr)) * @txtr_MLAB_vari txtrB_mr = txtrB_mr - trunc(txtrB_mr) if (txtrB_mr < real(@txtr_MLAB_pro0)) txtrB_done = true else if (txtrB_mr < imag(@txtr_MLAB_pro0)) txtrB_scax = txtrB_scax / 2 txtrB_ix = true txtrB_iy = false elseif (txtrB_mr < real(@txtr_MLAB_pro1)) txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = true elseif (txtrB_mr < imag(@txtr_MLAB_pro1)) txtrB_scax = txtrB_scax / 2 txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = false endif if (txtrB_ux > txtrB_mx) txtrB_ax = txtrB_mx endif if (txtrB_uy > txtrB_my) txtrB_ay = txtrB_my endif txtrB_i = txtrB_i + 1 endif endwhile if (txtrB_ix) txtrB_scay = txtrB_scay / 2 endif if (txtrB_iy) txtrB_scax = txtrB_scax / 2 endif txtrB_ax = abs(txtrB_ax - txtrB_ux) if (txtrB_ax > (txtrB_scax)) txtrB_ax = 2 * txtrB_scax - txtrB_ax endif txtrB_ay = abs(txtrB_ay - txtrB_uy) if (txtrB_ay > (txtrB_scay)) txtrB_ay = 2 * txtrB_scay - txtrB_ay endif if (txtrB_ax < txtrB_ay) txtrB_mx = txtrB_ax else txtrB_mx = txtrB_ay endif txtrB_my = 1 / (2 ^ (@txtr_MLAB_divi + 1) * @txtr_MLAB_scalo) txtrB_mr = txtrB_mx / txtrB_my if (txtrB_mr < @txtr_MLAB_edge) else if (txtrB_scax < txtrB_scay) txtrB_mr = txtrB_scax / txtrB_scay else txtrB_mr = txtrB_scay / txtrB_scax endif endif textureMLAB = txtrB_mr if (@txtr_MLAB_limit != 0) textureMLAB = textureMLAB%@txtr_MLAB_limit endif txtr_v_verlauf = 1 if (@f_MLAB_verlaufMode > 0) if (@f_MLAB_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MLAB_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MLAB_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MLAB_verlaufOffset endif to_index = to_index + @txtr_MLAB*txtr_v_verlauf*textureMLAB endif if (@txtr_Banana != 0) float txtrBana_d0 = 0.0 float txtrBana_d1 = 0.0 float txtrBana_ux = 0.0 float txtrBana_uy = 0.0 float txtrBana_sxa = 0.0 float txtrBana_sya = 0.0 float txtrBana_sxb = 0.0 float txtrBana_sxc = 0.0 float txtrBana_syb = 0.0 float txtrBana_syc = 0.0 float txtrBana_ax = 0.0 float txtrBana_ay = 0.0 float txtrBana_bx = 0.0 float txtrBana_by = 0.0 float txtrBana_ex = 0.0 float txtrBana_mx = 0.0 float txtrBana_my = 0.0 float txtrBana_mr = 0.0 int txtrBana_i = 0 bool txtrBana_done = false ;---------------------------------- complex zBanana = _zz if (@txtr_Banana_lattice == 0) zBanana = zBanana*@txtr_Banana_scale elseif (@txtr_Banana_lattice == 1) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 2) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale*10) elseif (@txtr_Banana_lattice == 3) zBanana = zBanana-trunc(@txtr_Banana_scale/zBanana) elseif (@txtr_Banana_lattice == 4) zBanana = zBanana*@txtr_Banana_scale + @txtr_Banana_scale/zBanana elseif (@txtr_Banana_lattice == 5) zBanana = round(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 6) complex zp_Banana = round(zBanana*@txtr_Banana_scale) complex zc_Banana = zBanana - (zp_Banana/@txtr_Banana_scale) if (round(imag(zp_Banana))%3==0) zc_Banana = (zc_Banana + @txtr_Banana_scale/2) if (abs(real(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif elseif (round(real(zp_Banana))%3==1) zc_Banana = (zc_Banana - @txtr_Banana_scale/2) if (abs(imag(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif else zc_Banana = (zc_Banana*@txtr_Banana_scale*2) if (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif endif endif if (@txtr_Banana_size != 0 && @txtr_Banana_size != 1) zBanana = zBanana/@txtr_Banana_size endif if (@reachThrough) _zz = zBanana endif float textureBanana = 0 txtrBana_ux = real(zBanana)*@txtr_Banana_scalo txtrBana_uy = imag(zBanana)*@txtr_Banana_scalo txtrBana_ax = floor(txtrBana_ux) txtrBana_ay = floor(txtrBana_uy) txtrBana_bx = txtrBana_ax + 1 txtrBana_by = txtrBana_ay + 1 txtrBana_sxc = 1 txtrBana_sxa = real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa txtrBana_syc = 1 txtrBana_sya = imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya txtrBana_i = 0 while (!txtrBana_done && txtrBana_i < @txtr_Banana_divi) txtrBana_mx = txtrBana_ax + txtrBana_sxa txtrBana_my = txtrBana_ay + txtrBana_sya txtrBana_mr = txtrBana_mx * @txtr_Banana_seed0 + txtrBana_my * @txtr_Banana_seed1 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_mr = txtrBana_mr - trunc(txtrBana_mr) if (txtrBana_mr < real(@txtr_Banana_pro0)) ; -1- txtrBana_done = true else ; -1- if (txtrBana_mr < imag(@txtr_Banana_pro0)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa elseif (txtrBana_mr < real(@txtr_Banana_pro1)) if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya elseif (txtrBana_mr < imag(@txtr_Banana_pro1)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya endif endif ; -1- txtrBana_i = txtrBana_i + 1 endwhile txtrBana_ax = abs(txtrBana_ax - txtrBana_ux) txtrBana_ex = 0 txtrBana_ay = abs(txtrBana_ay - txtrBana_uy) txtrBana_bx = abs(txtrBana_bx - txtrBana_ux) txtrBana_by = abs(txtrBana_by - txtrBana_uy) if (txtrBana_ay < txtrBana_ax) txtrBana_ax = txtrBana_ay txtrBana_ex = .2 endif if (txtrBana_bx < txtrBana_ax) txtrBana_ax = txtrBana_bx txtrBana_ex = .4 endif if (txtrBana_by < txtrBana_ax) txtrBana_ax = txtrBana_by txtrBana_ex = .6 endif if (txtrBana_ax < @txtr_Banana_edge/@txtr_Banana_scalo) if (@txtr_Banana_otre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 1) txtrBana_d0 = txtrBana_ex txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 2) txtrBana_d0 = -1 txtrBana_d1 = 1 endif else if (@txtr_Banana_itre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 1) txtrBana_d0 = .8 txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 2) txtrBana_mr = txtrBana_mr * @txtr_Banana_seed0 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_d0 = txtrBana_mr - trunc(txtrBana_mr) txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 3) txtrBana_d0 = -1 txtrBana_d1 = 1 endif endif ;--------------------------------------- if (@txtr_Banana_type == 0) textureBanana = txtrBana_mr ; Polyominos elseif (@txtr_Banana_type >= 1 && @txtr_Banana_type <= 6) if (txtrBana_d0 < 0); Original #solid = true else if (txtrBana_d0 < txtrBana_d1) textureBanana = txtrBana_d0 / txtrBana_d1 else textureBanana = txtrBana_d1 / txtrBana_d0 endif endif if (@txtr_Banana_type == 2) ; Ori/Polyominos textureBanana = |textureBanana/txtrBana_mr| elseif (@txtr_Banana_type == 3) ; Ori + Polyominos textureBanana = |textureBanana + txtrBana_mr^2| elseif (@txtr_Banana_type == 4) ; Ori + InvPoly textureBanana = |textureBanana + 1/txtrBana_mr| elseif (@txtr_Banana_type == 5) ; Diff(Ori,Poly) textureBanana = |textureBanana - txtrBana_mr^2| elseif (@txtr_Banana_type == 6) ; ; Diff(Ori,InvPoly) textureBanana = |textureBanana - 1/txtrBana_mr^2| endif elseif (@txtr_Banana_type == 7) textureBanana = |txtrBana_d0 - txtrBana_d1|^2*txtrBana_mr ; Diff Banana elseif (@txtr_Banana_type == 8) textureBanana = |txtrBana_d1 / txtrBana_d0| ; Thoughtless endif if (@txtr_Banana_limit != 0) textureBanana = textureBanana%@txtr_Banana_limit endif txtr_v_verlauf = 1 if (@f_Banana_verlaufMode > 0) if (@f_Banana_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Banana_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Banana_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Banana_verlaufOffset endif to_index = to_index + @txtr_Banana*txtr_v_verlauf*textureBanana endif if (@txtr_Ell != 0) complex zElliptic = _zz if (@txtr_Ell_lattice == 0) zElliptic = zElliptic*@txtr_Ell_scale elseif (@txtr_Ell_lattice == 1) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 2) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale*10) elseif (@txtr_Ell_lattice == 3) zElliptic = zElliptic-trunc(@txtr_Ell_scale/zElliptic) elseif (@txtr_Ell_lattice == 4) zElliptic = zElliptic*@txtr_Ell_scale + @txtr_Ell_scale/zElliptic elseif (@txtr_Ell_lattice == 5) zElliptic = round(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 6) complex zp_Ell = round(zElliptic*@txtr_Ell_scale) complex zc_Ell = zElliptic - (zp_Ell/@txtr_Ell_scale) if (round(imag(zp_Ell))%3==0) zc_Ell = (zc_Ell + @txtr_Ell_scale/2) if (abs(real(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif elseif (round(real(zp_Ell))%3==1) zc_Ell = (zc_Ell - @txtr_Ell_scale/2) if (abs(imag(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif else zc_Ell = (zc_Ell*@txtr_Ell_scale*2) if (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif endif endif if (@txtr_Ell_size != 0 && @txtr_Ell_size != 1) zElliptic = zElliptic/@txtr_Ell_size endif if (@reachThrough) _zz = zElliptic endif float textureElliptic = 0 complex EllipticZ = 0 float t_r = real(zElliptic) float t_i = imag(zElliptic) float t_rr = 0 float t_ii = 0 ; ; transformation ; if (@txtr_Ell_pseudo) ; ; calculate the temp real t_rr ; if (@txtr_Ell_c * t_r + @txtr_Ell_d == 0) ; don't divide by 0!! t_rr = @txtr_Ell_a * t_r + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_rr = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_rr = (@txtr_Ell_a * (t_r-t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_rr = (@txtr_Ell_a * (t_r+t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_rr = (@txtr_Ell_a * (t_r*t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_rr = (@txtr_Ell_a * (t_r^t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif else t_rr = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif endif ; ; calculate the temp imag t_ii ; if (@txtr_Ell_c * t_i + @txtr_Ell_d == 0) ; don't divide by 0!! t_ii = @txtr_Ell_a * t_i + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_ii = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_ii = (@txtr_Ell_a * (t_i-t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_ii = (@txtr_Ell_a * (t_i+t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_ii = (@txtr_Ell_a * (t_i*t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_ii = (@txtr_Ell_a * (t_i^t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif else t_ii = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif endif EllipticZ = t_rr + 1i*t_ii else if (@txtr_Ell_c * zElliptic + @txtr_Ell_d == 0) ; don't divide by 0!! EllipticZ = @txtr_Ell_a * zElliptic + @txtr_Ell_b else EllipticZ = (@txtr_Ell_a * zElliptic + @txtr_Ell_b) / (@txtr_Ell_c * zElliptic + @txtr_Ell_d) endif endif if (@txtr_Ell_type == 0) textureElliptic = |EllipticZ-zElliptic| elseif (@txtr_Ell_type == 1) textureElliptic = |real(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 2) textureElliptic = |imag(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 3) textureElliptic = |atan(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 4) textureElliptic = atan2(EllipticZ-zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 5) textureElliptic = |EllipticZ/zElliptic| elseif (@txtr_Ell_type == 6) textureElliptic = |real(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 7) textureElliptic = |imag(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 8) textureElliptic = |atan(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 9) textureElliptic = atan2(EllipticZ/zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 10) textureElliptic = |zElliptic/EllipticZ| elseif (@txtr_Ell_type == 11) textureElliptic = |real(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 12) textureElliptic = |imag(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 13) textureElliptic = |atan(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 14) textureElliptic = atan2(zElliptic/EllipticZ)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 15) textureElliptic = |sin(zElliptic) + 1i*cos(EllipticZ)| elseif (@txtr_Ell_type == 16) textureElliptic = |real(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 17) textureElliptic = |imag(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 18) textureElliptic = |atan(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 19) textureElliptic = atan2(sin(zElliptic) + 1i*cos(EllipticZ))/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif endif if (@txtr_Ell_limit != 0) textureElliptic = textureElliptic%@txtr_Ell_limit endif ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_Ell_verlaufMode > 0) if (@f_Ell_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Ell_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Ell_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Ell_verlaufOffset endif to_index = to_index + @txtr_Ell*txtr_v_verlauf*textureElliptic endif if (@txtr_MedialCut != 0) complex zMedialCut = _zz if (@txtr_MedialCut_lattice == 0) zMedialCut = zMedialCut*@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 1) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 2) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale*10) elseif (@txtr_MedialCut_lattice == 3) zMedialCut = zMedialCut-trunc(@txtr_MedialCut_scale/zMedialCut) elseif (@txtr_MedialCut_lattice == 4) zMedialCut = zMedialCut*@txtr_MedialCut_scale + @txtr_MedialCut_scale/zMedialCut elseif (@txtr_MedialCut_lattice == 5) zMedialCut = round(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 6) complex zp_MedialCut = round(zMedialCut*@txtr_MedialCut_scale) complex zc_MedialCut = zMedialCut - (zp_MedialCut/@txtr_MedialCut_scale) if (round(imag(zp_MedialCut))%3==0) zc_MedialCut = (zc_MedialCut + @txtr_MedialCut_scale/2) if (abs(real(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif elseif (round(real(zp_MedialCut))%3==1) zc_MedialCut = (zc_MedialCut - @txtr_MedialCut_scale/2) if (abs(imag(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif else zc_MedialCut = (zc_MedialCut*@txtr_MedialCut_scale*2) if (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif endif endif if (@txtr_MedialCut_size != 0 && @txtr_MedialCut_size != 1) zMedialCut = zMedialCut/@txtr_MedialCut_size endif if (@reachThrough) _zz = zMedialCut endif float textureMedialCut = 0 float txtrMedCut_re1 = 0 float txtrMedCut_re2 = 0 float txtrMedCut_re3 = 0 float txtrMedCut_im1 = 0 float txtrMedCut_im2 = 0 float txtrMedCut_im3 = 0 float granulation = 1000*@txtr_MedialCut_calcScale zMedialCut = (round(zMedialCut*granulation)/granulation - round(zMedialCut*@txtr_MedialCut_calcScale)) * 1000 float txtrMedCut_reCalc = real(zMedialCut) float txtrMedCut_imCalc = imag(zMedialCut) txtrMedCut_re1 = trunc(txtrMedCut_reCalc/100) txtrMedCut_re2 = trunc(txtrMedCut_reCalc/10 - txtrMedCut_re1*10) txtrMedCut_re3 = trunc(txtrMedCut_reCalc/1 - txtrMedCut_re1*100 - txtrMedCut_re2*10) txtrMedCut_im1 = trunc(txtrMedCut_imCalc/100) txtrMedCut_im2 = trunc(txtrMedCut_imCalc/10 - txtrMedCut_im1*10) txtrMedCut_im3 = trunc(txtrMedCut_imCalc/1 - txtrMedCut_im1*100 - txtrMedCut_im2*10) float small = 0 float middl = 0 float large = 0 if (@txtr_MedialCut_type == 0) small = txtrMedCut_re1 middl = txtrMedCut_re2 large = txtrMedCut_re3 elseif (@txtr_MedialCut_type == 1) small = txtrMedCut_im1 middl = txtrMedCut_im2 large = txtrMedCut_im3 elseif (@txtr_MedialCut_type == 2) if (txtrMedCut_re1txtrMedCut_im1) small = txtrMedCut_re1 else small = txtrMedCut_im1 endif if (txtrMedCut_re2>txtrMedCut_im2) middl = txtrMedCut_re2 else middl = txtrMedCut_im2 endif if (txtrMedCut_re3>txtrMedCut_im3) large = txtrMedCut_re3 else large = txtrMedCut_im3 endif elseif (@txtr_MedialCut_type == 4) small = txtrMedCut_re1+txtrMedCut_im1 middl = txtrMedCut_re2+txtrMedCut_im2 large = txtrMedCut_re3+txtrMedCut_im3 elseif (@txtr_MedialCut_type == 5) small = txtrMedCut_re1*txtrMedCut_im1 middl = txtrMedCut_re2*txtrMedCut_im2 large = txtrMedCut_re3*txtrMedCut_im3 elseif (@txtr_MedialCut_type == 6) small = txtrMedCut_re1/txtrMedCut_im1 middl = txtrMedCut_re2/txtrMedCut_im2 large = txtrMedCut_re3/txtrMedCut_im3 elseif (@txtr_MedialCut_type == 7) small = txtrMedCut_im1/txtrMedCut_re1 middl = txtrMedCut_im2/txtrMedCut_re2 large = txtrMedCut_im3/txtrMedCut_re3 elseif (@txtr_MedialCut_type == 8) small = abs(txtrMedCut_im1-txtrMedCut_re1) middl = abs(txtrMedCut_im2-txtrMedCut_re2) large = abs(txtrMedCut_im3-txtrMedCut_re3) endif ; prevent those numbers from being zero: small = small + @txtr_MedialCut_smooth middl = middl + @txtr_MedialCut_smooth large = large + @txtr_MedialCut_smooth ;Golden Cut: small/large = large/whole float sm_mi = abs(small/middl) float mi_la = abs(middl/large) if (@txtr_MedialCut_watch == 0) textureMedialCut = abs(sm_mi-mi_la) elseif (@txtr_MedialCut_watch == 1) if (sm_mimi_la) textureMedialCut = sm_mi else textureMedialCut = mi_la endif elseif (@txtr_MedialCut_watch == 3) textureMedialCut = sm_mi + mi_la elseif (@txtr_MedialCut_watch == 4) textureMedialCut = 1/sm_mi + 1/mi_la elseif (@txtr_MedialCut_watch == 5) textureMedialCut = abs(1/sm_mi - 1/mi_la) endif if (@txtr_MedialCut_limit != 0) textureMedialCut = textureMedialCut%@txtr_MedialCut_limit endif txtr_v_verlauf = 1 if (@f_MedialCut_verlaufMode > 0) if (@f_MedialCut_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MedialCut_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MedialCut_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MedialCut_verlaufOffset endif to_index = to_index + @txtr_MedialCut*txtr_v_verlauf*textureMedialCut endif if (@txtr_Truchet != 0) complex zTruchet = _zz if (@txtr_Truchet_lattice == 0) zTruchet = zTruchet*@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 1) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 2) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale*10) elseif (@txtr_Truchet_lattice == 3) zTruchet = zTruchet-trunc(@txtr_Truchet_scale/zTruchet) elseif (@txtr_Truchet_lattice == 4) zTruchet = zTruchet*@txtr_Truchet_scale + @txtr_Truchet_scale/zTruchet elseif (@txtr_Truchet_lattice == 5) zTruchet = round(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 6) complex zp_Truchet = round(zTruchet*@txtr_Truchet_scale) complex zc_Truchet = zTruchet - (zp_Truchet/@txtr_Truchet_scale) if (round(imag(zp_Truchet))%3==0) zc_Truchet = (zc_Truchet + @txtr_Truchet_scale/2) if (abs(real(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif elseif (round(real(zp_Truchet))%3==1) zc_Truchet = (zc_Truchet - @txtr_Truchet_scale/2) if (abs(imag(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif else zc_Truchet = (zc_Truchet*@txtr_Truchet_scale*2) if (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif endif endif if (@reachThrough) _zz = zTruchet endif float textureTruchet = 0 if (@txtr_Truchet_fixit == 1) ; Minimum textureTruchet = 1.0e20 elseif (@txtr_Truchet_fixit == 2) ; Maximum textureTruchet = -1.0e20 endif complex zcTruchet = 0 complex zzTruchet = 0 complex crTruchet = 0 float truchD1 = 0 float truchD2 = 0 complex truchCorteX = @txtr_Truchet_corte + 1i*@txtr_Truchet_corte complex truchCorteY = @txtr_Truchet_corte - 1i*@txtr_Truchet_corte float reZZTRUCHET = 0 float imZZTRUCHET = 0 int truch_i = 0 while (truch_i < @txtr_Truchet_Iters) if (@txtr_Truchet_size != 0 && @txtr_Truchet_size != 1) zTruchet = zTruchet/@txtr_Truchet_size endif zTruchet = zTruchet*exp(1i*pi/180*@txtr_Truchet_rot) if (truch_i > 0) zTruchet = zTruchet*@txtr_Truchet_mst^truch_i ; *exp(1i*(truch_i)*180/pi*@txtr_Truchet_rotst) endif zcTruchet = round(zTruchet) zzTruchet = zTruchet - zcTruchet reZZTRUCHET = real(zzTruchet) imZZTRUCHET = imag(zzTruchet) crTruchet = 2*(@txtr_Truchet_seed/(zcTruchet+124+truch_i) - \ round(@txtr_Truchet_seed/(zcTruchet+124+truch_i))) if real(crTruchet) > 0 if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteX)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteX)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET - imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET - imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) -@txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif endif else if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteY)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteY)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET + imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) - @txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) + @txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif endif endif if truchD2 < truchD1 if (@txtr_Truchet_watch == 0) truchD1 = truchD2 elseif (@txtr_Truchet_watch == 1) truchD1 = abs(truchD1-truchD2) elseif (@txtr_Truchet_watch == 2) truchD1 = |truchD1-truchD2| elseif (@txtr_Truchet_watch == 3) truchD1 = (truchD1+truchD2)/2 elseif (@txtr_Truchet_watch == 4) truchD1 = truchD1/truchD2 endif endif truch_i = truch_i + 1 if (@txtr_Truchet_fixit == 0) ; last textureTruchet = truchD1 elseif (@txtr_Truchet_fixit == 1) ; min if (textureTruchet > truchD1) textureTruchet = abs(truchD1 - 1/(2^truch_i)) endif elseif (@txtr_Truchet_fixit == 2) ; max if (textureTruchet < truchD1) textureTruchet = truchD1 + 1/(2^truch_i) endif elseif (@txtr_Truchet_fixit == 3) ; sum textureTruchet = textureTruchet + truchD1 elseif (@txtr_Truchet_fixit == 4) ; w-sum textureTruchet = textureTruchet + truchD1/truch_i elseif (@txtr_Truchet_fixit == 5) ; g-sum textureTruchet = textureTruchet + truchD1/(2^truch_i) endif endwhile ; truch_i < @txtr_Truchet_Iters if (@txtr_Truchet_limit != 0) textureTruchet = textureTruchet%@txtr_Truchet_limit endif txtr_v_verlauf = 1 if (@f_Truchet_verlaufMode > 0) if (@f_Truchet_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Truchet_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Truchet_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Truchet_verlaufOffset endif to_index = to_index + @txtr_Truchet^@txtr_Truchet_thick*txtr_v_verlauf*textureTruchet endif if (@txtr_GCD != 0) complex zGCD = _zz if (@txtr_GCD_lattice == 0) zGCD = zGCD*@txtr_GCD_scale elseif (@txtr_GCD_lattice == 1) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 2) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale*10) elseif (@txtr_GCD_lattice == 3) zGCD = zGCD-trunc(@txtr_GCD_scale/zGCD) elseif (@txtr_GCD_lattice == 4) zGCD = zGCD*@txtr_GCD_scale + @txtr_GCD_scale/zGCD elseif (@txtr_GCD_lattice == 5) zGCD = round(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 6) complex zp_GCD = round(zGCD*@txtr_GCD_scale) complex zc_GCD = zGCD - (zp_GCD/@txtr_GCD_scale) if (round(imag(zp_GCD))%3==0) zc_GCD = (zc_GCD + @txtr_GCD_scale/2) if (abs(real(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif elseif (round(real(zp_GCD))%3==1) zc_GCD = (zc_GCD - @txtr_GCD_scale/2) if (abs(imag(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif else zc_GCD = (zc_GCD*@txtr_GCD_scale*2) if (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif endif endif if (@reachThrough) _zz = zGCD endif float textureGCD = 0 if (@txtr_GCD_fixit == 1) ; Minimum textureGCD = 1.0e20 elseif (@txtr_GCD_fixit == 2) ; Maximum textureGCD = -1.0e20 endif float granulation = 1000*@txtr_GCD_calcScale float reGCD = 0 float imGCD = 0 float __gcd = 0 float __chk = 0 float rGCD = 0 int gcd_i = 0 while (gcd_i < @txtr_GCD_Iters) if (@txtr_GCD_size != 0 && @txtr_GCD_size != 1) zGCD = zGCD/@txtr_GCD_size endif zGCD = (round(zGCD*granulation)/granulation - round(zGCD*@txtr_GCD_calcScale)) * 1000 reGCD = abs(real(zGCD)) imGCD = abs(imag(zGCD)) __chk = 2 while (__chk > 1) __gcd = round(reGCD/imGCD) __chk = reGCD - __gcd*imGCD if (__chk > 1) reGCD = imGCD imGCD = __gcd endif endwhile __gcd = __gcd + @txtr_GCD_smooth __chk = __chk + @txtr_GCD_smooth if (@txtr_GCD_watch == 0) ; gcd rGCD = __gcd elseif (@txtr_GCD_watch == 1) ; MinQ GCD/Iter if (__gcd < gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 2) ; MaxQ GCD/Iter if (__gcd > gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 3) ; DCG+Reti rGCD = 1/__gcd + 1/gcd_i elseif (@txtr_GCD_watch == 4) ; DCG-Reti rGCD = abs(1/__gcd - 1/gcd_i) elseif (@txtr_GCD_watch == 5) ; CHK rGCD = __chk elseif (@txtr_GCD_watch == 6) ; MinQ CHK/Iter if (__chk < gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 7) ; MaxQ CHK/Iter if (__chk > gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 8) ; CHK+Iter rGCD = __chk + gcd_i elseif (@txtr_GCD_watch == 9) ; KHC+Reti rGCD = 1/__chk + 1/gcd_i elseif (@txtr_GCD_watch == 10) ; KHC-Reti rGCD = abs(1/__chk - 1/gcd_i) elseif (@txtr_GCD_watch == 11) ; MinQ CHK/GCD if (__chk < __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 12) ; MaxQ CHK/GCD if (__chk > __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 13) ; CHK+GCD rGCD = __chk + __gcd elseif (@txtr_GCD_watch == 14) ; KHC+DCG rGCD = 1/__chk + 1/__gcd elseif (@txtr_GCD_watch == 15) rGCD = abs(1/__chk - 1/__gcd) ; KHC-DCG endif gcd_i = gcd_i + 1 if (@txtr_GCD_fixit == 0) ; last textureGCD = rGCD elseif (@txtr_GCD_fixit == 1) ; min if (textureGCD > rGCD) textureGCD = rGCD ; abs(rGCD - 1/(2^gcd_i)) endif elseif (@txtr_GCD_fixit == 2) ; max if (textureGCD < rGCD) textureGCD = rGCD ; + 1/(2^gcd_i) endif elseif (@txtr_GCD_fixit == 3) ; sum textureGCD = textureGCD + rGCD elseif (@txtr_GCD_fixit == 4) ; w-sum textureGCD = textureGCD + rGCD/gcd_i elseif (@txtr_GCD_fixit == 5) ; g-sum textureGCD = textureGCD + rGCD/(2^gcd_i) endif endwhile ; gcd_i < @txtr_GCD_Iters if (@txtr_GCD_limit != 0) textureGCD = textureGCD%@txtr_GCD_limit endif txtr_v_verlauf = 1 if (@f_GCD_verlaufMode > 0) if (@f_GCD_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_GCD_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_GCD_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_GCD_verlaufOffset endif to_index = to_index + @txtr_GCD*txtr_v_verlauf*textureGCD endif #index = to_index endif ; no_mask default: title = "T Medial Smooth" param calculate caption = "Type of Medial Smooth" enum = "Real" "Imag" "Magn" "Angle" "Angel" default = 2 endparam param smooth caption = "Smooth" default = 0.0 min = 0.0 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param watch caption = "Watch for Fixit" enum = "Real" "Imag" "Magn" "Diff" \ "Min(r,i)" "Max(r,i)" "MinQuot" "MaxQuot" "Diff2" \ "Astro01" "Astro02" "Astro03" "Astro12" "Astro21" \ "Astro31" "Astro13" "Astro32" "Astro23" \ "Re+Im" "Re*Im" default = 2 endparam param fixit caption = "Fixit for Color by" enum = "Last" "Minimum" "Maximum" "Sum" \ "W-Sum" "W^2-Sum" "WR-Sum" \ "G-Sum" "G'-Sum" "AG-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" default = 1 endparam param disturbFixFactor caption = "Fixit-Disturbance" default = 0.0 hint = "Disturbs the Fixit for Color By..." endparam param disturbMode caption = "Disturb Fixit Mode" enum = "Log" "Sqrt" "Lin" "Sqr" "AlterGeom" "Geom" "Const" "1/Magn" "1/Real" "1/Imag" "Magn" "Real" "Imag" "1/Diff" "Diff" 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" \ "Iterations" default = 0 endparam param numIterMode caption = "Fix Iterations" enum = "Normal" "#Numiter always" "Relative" "Difference" \ "Rel. Diff." "Average" 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 startDistortion caption = "Start Distortion" enum = "#z" "Transformed z" "Pixel" "Mixel" default = 0 endparam param minMax caption = "Min/Max" default = FALSE endparam param xWaveMode caption = "x-Wave Mode" enum = "None" "x*sin(x)" "x*cos(x)" "x*sin(y)" "x*cos(y)" default = 0 endparam param yWaveMode caption = "y-Wave Mode" enum = "None" "y*sin(y)" "y*cos(y)" "y*sin(x)" "y*cos(x)" default = 0 endparam param xWaveFreq caption = "x-Wave Frequency" default = 1.0 endparam param yWaveFreq caption = "y-Wave Frequencx" default = 1.0 endparam param xWaveWeight caption = "x-Wave Weight" default = 1.0 endparam param yWaveWeight caption = "y-Wave Weight" default = 1.0 endparam param xWaveConst caption = "x-Wave Const" default = 0.0 endparam param yWaveConst caption = "y-Wave Const" default = 0.0 endparam param xWaveOffset caption = "x-Wave Offset" default = 0.0 endparam param yWaveOffset caption = "y-Wave Offset" default = 0.0 endparam param xWaveExp caption = "x-Wave Exponent" default = 1.0 endparam param yWaveEyp caption = "y-Wave Eyponent" default = 1.0 endparam param wavesLoop caption = "# Waves Loops" default = 1 min = 1 endparam param wavesLoopMode caption = "Mode Waves Loops" enum = "Static" "Dynamic" default = 0 endparam param wavesGrowFreq caption = "Waves: FreqGrowth" default = 1.0 min = 1e-99 endparam param rotDegree caption = "Degré de Rotation" default = 0.0 min = -359.99999 max = 359.99999 hint = "Does not work with Color by Fiximum Distance" endparam param rotCentre caption = "Centre de Rotation" default = (0.0,0.0) endparam param zJouk caption = "Joukowskij: Constant" default = (0.0,0.0) endparam param vectorJouk caption = "Joukowskij: Vector " default = (0.0,0.0) endparam param curveJouk caption = "Joukowskij Curvature" default = (0.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" "Hex" 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 lattOffset caption = "Lattice Offset" default = (0.0,0.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 globalScale caption = "Global Scale" default = 0.0 min = 0.0 endparam param globalDither caption = "L: Global Dither (GD) Scale" default = 0.0 hint = "Choose 1, 10, 50, 100 as experimental values and then start fine tuning." endparam param shape caption = "L: GD: Shape" enum = "None" "Circle" "Real" "Imag" "Diamond" "Skew" \ "!Circle" "!Real" "!Imag" "!Diamond" "!Skew" endparam param radius caption = "L: GD: Radius for Shapes" default = 0.5 endparam param inner_scale caption = "L: GD: Inner Scale" default = 3.0 hint = "Choose 1, 10, 50, 100 as experimental values \ and then start fine tuning." endparam param inner_amount caption = "L: GD: Inner Amount" default = 0.0 endparam param d_randomness caption = "L: GD-Randomness" hint = "This adds a randomness in the outlines." default = 0.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 turnScaleMode caption = "L: ScaleMode Turnaround" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Turnaround Scale > 0" endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param barnMode caption = "L: Barnsley Mode" enum = "None" "First" "Second" default = 0 endparam param barnScale caption = "L: Barnsley Scale" default = 0.0 min = 0.0 endparam param barnScaleMode caption = "L: ScaleMode Barnsley" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Barnsley Scale > 0" endparam param barnSeed caption = "L: Barnsley Seed" default = (0.6, 1.1) endparam param barnShift caption = "L: Barnsley Shift" default = 1.0 endparam param disturb_fbm caption = "L: Noise Strength" default = 0.0 min = 0.0 endparam param disturb_fbm_mode caption = "L: Noise Mode" enum = "Sum only" "Angle only" "fBm Pixel only" \ "fBm Pix*Sum" \ "fBm Pixel added" "fBm Pixel W-added" "fBm Pix*Sum added" \ "fBm Pix*Sum W-added" \ "fBm Pix*Angle" "fBm Pix*Angle added" "fBm Pix*Angle W-added" "fBm Pix*Angle Avg" default = 0 endparam param disturb_fbm_apply caption = "L: Noise Apply" enum = "Pixel" "Fixit" default = 0 endparam param disturb_fbm_scale caption = "L: Noise Scale" default = 1.0 endparam param disturb_fbm_octaves caption = "L: Noise Loops" default = 9 endparam param disturb_fbm_lattice caption = "L: Noise Lattice" default = false endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param txtr_verlauf_Line1 caption = "T: Bottom, Left, or Center" default = (0.0,0.0) hint = "First line for growth calculation. Might be the bottom in TB mode, \ might be the left border in LR mode, IS the center in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Line2 caption = "T: Top, Right, or Radius" default = (1.0,1.0) hint = "Second line for growth calculation. Might be the top in TB mode, \ might be the right border in LR mode, IS the radius in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_exponent caption = "T: Txtr Exponent" default = 1.5 hint = "Choose 1 for linear growth, 1.5-2 for (smoother) *quadratic* growth, \ other values to your free fun experiments... \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Rot caption = "T: Txtr Rotation" default = 0.0 min = -45.0 max = 45.0 endparam param txtr_verlauf_RotCentre caption = "T: Txtr Rot Centre" default = (0.0, 0.0) endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param f_rand_verlaufMode caption = "T: Random Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 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 f_Gnarl_verlaufMode caption = "T: Gnarl Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gnarl_verlaufOffset caption = "T: Gnarl V-Offset" default = 0.0 min = 0.0 endparam param txtr_gnarl_lattice caption = "T: Gnarl Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param f_PopCorn_verlaufMode caption = "T: PopCorn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_PopCorn_verlaufOffset caption = "T: PopCorn V-Offset" default = 0.0 min = 0.0 endparam param txtr_PopCorn_lattice caption = "T: PopCorn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_SFBM_verlaufMode caption = "T: SFBM Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SFBM_verlaufOffset caption = "T: SFBM V-Offset" default = 0.0 min = 0.0 endparam param txtr_SFBM_lattice caption = "T: SFBM Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Primes_verlaufMode caption = "T: Primes Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Primes_verlaufOffset caption = "T: Primes V-Offset" default = 0.0 min = 0.0 endparam param txtr_Primes_lattice caption = "T: Primes Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Gauss_verlaufMode caption = "T: Gauss Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gauss_verlaufOffset caption = "T: Gauss V-Offset" default = 0.0 min = 0.0 endparam param txtr_Gauss_lattice caption = "T: Gauss Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 txtr_Turn caption = "T: Turn Texture" hint = "This adds a Turn texture to the coloring." default = 0.0 endparam param f_Turn_verlaufMode caption = "T: Turn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Turn_verlaufOffset caption = "T: Turn V-Offset" default = 0.0 min = 0.0 endparam param txtr_Turn_lattice caption = "T: Turn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Turn_scale caption = "T: Turn Scale" hint = "Scaling Factor for this Turn texture." default = 1.0 endparam param txtr_Turn_size caption = "T: Turn Pattern Size" default = 1.0 endparam param txtr_Turn_limit caption = "T: Turn Limitation" default = 0.0 min = 0.0 endparam param txtr_Turn_corte1 caption = "T: Turnaround #1" default = 4.0 endparam param txtr_Turn_corte2 caption = "T: Turnaround #2" default = 2.0 endparam param txtr_Check caption = "T: Checker Texture" hint = "This adds a Check texture to the coloring." default = 0.0 endparam param f_Check_verlaufMode caption = "T: Checker Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Check_verlaufOffset caption = "T: Checker V-Offset" default = 0.0 min = 0.0 endparam param txtr_Check_scale caption = "T: Checker Scale" hint = "Scaling Factor for this Check texture." default = 1.0 endparam param txtr_Checker caption = "T: Checker Modulus" default = 2 min = 2 endparam param txtr_Check_test caption = "T: Checker Test Mode" enum = "Sum" "Prod" default = 1 endparam param txtr_Check_shape caption = "T: Checker Shape" enum = "Square" "Circle" \ "Square in Circle" "Circle in Square" \ "Segment" "Time" \ "H Bricks" "V Bricks" \ "I Ging" "I Went" \ "Broken Circle" \ "Cross" "Anti-Cross" \ "Bite" "Anti-Bite" "Mooon" "Trianguli" "Nose" \ "Broken Square" "BonBon" "Quizzle" "Hipster" "Broken Net" \ "New Moon" "Ti Moon" "Moon and Venus" "Venus and Moon" \ "Smiley" "Inv Smiley" "Frowney" "Inv Frowney" default = 0 endparam param txtr_Check_shConst caption = "T: Chk-Sh-Const" default = 1.0 endparam param txtr_Check_col caption = "T: Checker Color Mode" enum = "Flag" "Magn" "Iter" "Magn*Iter" "Dist Center" default = 0 endparam param txtr_Check_invert caption = "T: Inverse Checkers?" default = false endparam param txtr_Check_divide caption = "T: Divide Checkers?" enum = "None" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" default = 0 endparam param txtr_Check_limit caption = "T: Checker Limitation" default = 0.0 min = 0.0 endparam param txtr_Pick153 caption = "T: Pick153 Texture" hint = "This adds a Pick153 texture to the coloring." default = 0.0 endparam param f_Pick153_verlaufMode caption = "T: Pick153 Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Pick153_verlaufOffset caption = "T: Pick153 V-Offset" default = 0.0 min = 0.0 endparam param txtr_Pick153_lattice caption = "T: Pick153 Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Pick153_scale caption = "T: Pick153 Scale" hint = "Scaling Factor for this Pick153 texture." default = 1.0 endparam param txtr_scale153 caption = "T: Calc Scale 153" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_numOfTestsPick153 caption = "T: Pick153 Tests" hint = "Pick153 texture." default = 1 endparam param txtr_Pick153_col caption = "T: Pick153 Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_Pick153_limit caption = "T: Pick153 Limitation" default = 0.0 min = 0.0 endparam param txtr_SumDiv caption = "T: SumDiv Texture" hint = "This adds a SumDiv texture to the coloring." default = 0.0 endparam param f_SumDiv_verlaufMode caption = "T: SumDiv Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SumDiv_verlaufOffset caption = "T: SumDiv V-Offset" default = 0.0 min = 0.0 endparam param txtr_SumDiv_lattice caption = "T: SumDiv Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_SumDiv_scale caption = "T: SumDiv Scale" hint = "Scaling Factor for this SumDiv texture." default = 1.0 endparam param txtr_scaleSumDiv caption = "T: SumDiv Pattern Size" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_SumDiv_col caption = "T: SumDiv Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_SumDiv_mode caption = "T: SumDiv Calc Mode" enum = "Sum" "Quot" default = 0 endparam param txtr_SumDiv_limit caption = "T: SumDiv Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB caption = "T: MLAB Texture" hint = "This adds a MLAB texture to the coloring." default = 0.0 endparam param f_MLAB_verlaufMode caption = "T: MLAB Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MLAB_verlaufOffset caption = "T: MLAB V-Offset" default = 0.0 min = 0.0 endparam param txtr_MLAB_lattice caption = "T: MLAB Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MLAB_scale caption = "T: MLAB Scale" hint = "Scaling Factor for this MLAB texture." default = 1.0 endparam param txtr_MLAB_size caption = "T: MLAB Pattern Size" default = 1.0 endparam param txtr_MLAB_limit caption = "T: MLAB Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB_scalo caption = "T: MLAB CalcScale" default = 1.0 endparam param txtr_MLAB_divi caption = "T: MLAB Divisions" default = 4 endparam param txtr_MLAB_edge caption = "T: MLAB Edge" default = .8 endparam param txtr_MLAB_pro0 caption = "T: MLAB Prob-ty 0" default = (.25, .5) endparam param txtr_MLAB_pro1 caption = "T: MLAB Prob-ty 1" default = (.75, 1) endparam param txtr_MLAB_vari caption = "T: MLAB Variance" default = 1024.0 endparam param txtr_Banana caption = "T: Banana Texture" hint = "This adds a Banana texture to the coloring." default = 0.0 endparam param txtr_Banana_type caption = "T: Banana Type" enum = "Polyominos" \ "Original" "Ori/Polyominos" "Ori + Polyominos" "Ori + InvPoly" \ "Diff(Ori,Poly)" "Diff(Ori,InvPoly)" \ "Diff Banana" "Thoughtless" default = 1 endparam param f_Banana_verlaufMode caption = "T: Banana Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Banana_verlaufOffset caption = "T: Banana V-Offset" default = 0.0 min = 0.0 endparam param txtr_Banana_lattice caption = "T: Banana Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Banana_scale caption = "T: Banana Scale" hint = "Scaling Factor for this Banana texture." default = 1.0 endparam param txtr_Banana_size caption = "T: Banana Pattern Size" default = 1.0 endparam param txtr_Banana_limit caption = "T: Banana Limitation" default = 0.0 min = 0.0 endparam param txtr_Banana_scalo caption = "T: Banana CalcScale" default = 1.0 endparam param txtr_Banana_divi caption = "T: Banana Divisions" default = 4 endparam param txtr_Banana_ratio caption = "T: Ratio" default = (.5, .5) endparam param txtr_Banana_edge caption = "T: Banana Edge" default = .8 endparam param txtr_Banana_itre caption = "T: Inside" enum = "Continuous" "Solid" "Random" "Clear" default = 0 endparam param txtr_Banana_otre caption = "T: Outside" enum = "Continuous" "Solid" "Clear" default = 0 endparam param txtr_Banana_pro0 caption = "T: Banana Prob-ty 0" default = (.25, .5) endparam param txtr_Banana_pro1 caption = "T: Banana Prob-ty 1" default = (.75, 1) endparam param txtr_Banana_vari caption = "T: Banana Variance" default = 1024.0 endparam param txtr_Banana_seed0 caption = "T: Seed 0" default = 3779 endparam param txtr_Banana_seed1 caption = "T: Seed 1" default = 9377 endparam param txtr_Ell caption = "T: Elliptic Texture" hint = "This adds a Elliptic texture to the coloring." default = 0.0 endparam param txtr_Ell_type caption = "T: Elliptic Type" enum = "Magn Diff" "Real Diff" "Imag Diff" "Angel Diff" "Angle Diff" \ "Magn Quot" "Real Quot" "Imag Quot" "Angel Quot" "Angle Quot" \ "Magn Qout" "Real Qout" "Imag Qout" "Angel Qout" "Angle Qout" \ "Magn Pola" "Real Pola" "Imag Pola" "Angel Pola" "Angle Pola" default = 0 endparam param f_Ell_verlaufMode caption = "T: Elliptic Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Ell_verlaufOffset caption = "T: Elliptic V-Offset" default = 0.0 min = 0.0 endparam param txtr_Ell_lattice caption = "T: Elliptic Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Ell_scale caption = "T: Elliptic Scale" hint = "Scaling Factor for this Elliptic texture." default = 1.0 endparam param txtr_Ell_size caption = "T: Elliptic Pattern Size" default = 1.0 endparam param txtr_Ell_a caption = "T: Elliptic a" default = -1 endparam param txtr_Ell_b caption = "T: Elliptic b" default = -1 endparam param txtr_Ell_c caption = "T: Elliptic c" default = 1 endparam param txtr_Ell_d caption = "T: Elliptic d" default = 0 endparam param txtr_Ell_pseudo caption = "T: Pseudo Elliptic" default = true hint = "separate transforming real and imag" endparam param txtr_Ell_pseudoMix caption = "T: Pseudo Mix Real and Imag" default = false hint = "only in use with Pseudo Elliptic" endparam param txtr_Ell_mixMode caption = "T: Mix Mode for Pseudo Mix" enum = "Normal" "Difference" "Sum" "Product" "Exponent" endparam param txtr_Ell_limit caption = "T: Elliptic Limitation" default = 0.0 min = 0.0 endparam param txtr_MedialCut caption = "T: MedialCut Texture" hint = "This adds a MedialCut texture to the coloring." default = 0.0 endparam param f_MedialCut_verlaufMode caption = "T: MedialCut Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MedialCut_verlaufOffset caption = "T: MedialCut V-Offset" default = 0.0 min = 0.0 endparam param txtr_MedialCut_lattice caption = "T: MedialCut Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MedialCut_type caption = "T: MedialCut Type" enum = "Real" "Imag" "Min(Real,Imag)" "Max(Real,Imag)" \ "Sum" "Prod" "Real/Imag" "Imag/Real" "Diff" endparam param txtr_MedialCut_watch caption = "T: MedialCut Watch for Calc" enum = "Diff" "Min" "Max" "Sum" "Recip Sum" "Recip Diff" default = 0 endparam param txtr_MedialCut_scale caption = "T: MedialCut Scale" hint = "Scaling Factor for this MedialCut texture." default = 1.0 endparam param txtr_MedialCut_size caption = "T: MedialCut Pattern Size" default = 1.0 endparam param txtr_MedialCut_calcScale caption = "T: MedialCut Calc Scale" default = 1.0 min = 0 endparam param txtr_MedialCut_smooth caption = "T: MedialCut Smooth" default = 0.1 min = 1e-99 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_MedialCut_limit caption = "T: MedialCut Limitation" default = 0.0 min = 0.0 endparam param txtr_Truchet caption = "T: Truchet Texture" hint = "This adds a Truchet texture to the coloring." default = 0.0 endparam param f_Truchet_verlaufMode caption = "T: Truchet Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Truchet_verlaufOffset caption = "T: Truchet V-Offset" default = 0.0 min = 0.0 endparam param txtr_Truchet_lattice caption = "T: Truchet Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Truchet_mode caption = "T: Truchet Mode" default = 0 enum = "Roundy" "Squarry" "Worry" "Wyrry" "Harry" "Kirre" "Sally" endparam param txtr_Truchet_watch caption = "T: Truchet Watch" default = 0 enum = "Truchet" "Trechut" "Techtur" "Tuchter" "RetChut" endparam param txtr_Truchet_fixit caption = "T: Truchet Fixit" default = 0 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_Truchet_scale caption = "T: Truchet Scale" hint = "Scaling Factor for this Truchet texture." default = 1.0 endparam param txtr_Truchet_size caption = "T: Truchet Pat Size" default = 1.0 endparam param txtr_Truchet_corte caption = "T: Truchet Cutting Edges" default = .5 endparam param txtr_Truchet_rot caption = "T: Truchet Rotation" default = 0.0 endparam param txtr_Truchet_mst caption = "T: Truchet Magn Step" default = 2.0 endparam param txtr_Truchet_thick caption = "T: Truchet Thickness" default = 0.1 endparam param txtr_Truchet_Iters caption = "T: Truchet Iterations" default = 1 endparam param txtr_Truchet_seed caption = "T: Truchet Seed" default = 1234567890 endparam param txtr_Truchet_limit caption = "T: Truchet Limitation" default = 0.0 min = 0.0 endparam param txtr_GCD caption = "T: GCD Texture" hint = "This adds a GCD texture to the coloring." default = 0.0 endparam param f_GCD_verlaufMode caption = "T: GCD Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_GCD_verlaufOffset caption = "T: GCD V-Offset" default = 0.0 min = 0.0 endparam param txtr_GCD_lattice caption = "T: GCD Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_GCD_watch caption = "T: GCD Watch" enum = "GCD" "MinQ GCD/Iter" "MaxQ GCD/Iter" "DCG+Reti" "DCG-Reti" \ "CHK" "MinQ CHK/Iter" "MaxQ CHK/Iter" "CHK+Iter" "KHC+Reti" "KHC-Reti" \ "MinQ CHK/GCD" "MaxQ CHK/GCD" "CHK+GCD" "KHC+DCG" "KHC-DCG" default = 0 endparam param txtr_GCD_fixit caption = "T: GCD Fixit" default = 1 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_GCD_scale caption = "T: GCD Scale" hint = "Scaling Factor for this GCD texture." default = 1.0 endparam param txtr_GCD_size caption = "T: GCD Pattern Size" default = 1.0 endparam param txtr_GCD_calcScale caption = "T: GCD Calc Scale" default = 0.003 endparam param txtr_GCD_Iters caption = "T: GCD Iterations" default = 2 endparam param txtr_GCD_smooth caption = "T: GCD Smooth" default = 1e-10 min = 0.0 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_GCD_limit caption = "T: GCD 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 func startFct caption = "Start Function" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc func barnFct1 caption = "Barnsley Fnctn 1" default = flip() endfunc func barnFct2 caption = "Barnsley Fnctn 2" default = flip() endfunc } GCD { ; ; Created November 13, 2000, 21:00 ; ; with a little help from Edward's Orchard Real ; init: complex p = 0 float r = 0 float rfix = 0 float rtrap = 0 if (@fixit == 1) ; Minimum rfix = 1.0e20 elseif (@fixit == 2) ; Maximum rfix = -1.0e20 endif int iter = 0 float ifix = 0 float itrap = 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) float x = 0 float y = 0 complex zStart = 0 complex zfix = (0.0,0.0) complex cfix = (0.0,0.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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; float fbmSum = 0 float fbmAngle = 0 complex fbmDisturbPix = 0 if (@disturb_fbm > 0) float fbmAmplitude = 1.0 int i_fbm = 0 complex fbmPix = 0 if (@disturb_fbm_lattice) fbmPix = #pixel - round(#pixel*@disturb_fbm_scale)/@disturb_fbm_scale else fbmPix = #pixel*@disturb_fbm_scale endif while (i_fbm < @disturb_fbm_octaves) float fbmBx0 = floor(real(fbmPix)) float fbmBx1 = fbmBx0 + 1 float fbmRx0 = real(fbmPix) - floor(real(fbmPix)) float fbmRx1 = fbmRx0 - 1 float fbmBy0 = floor(imag(fbmPix)) float fbmBy1 = fbmBy0 + 1 float fbmRy0 = imag(fbmPix) - floor(imag(fbmPix)) float fbmRy1 = fbmRy0 - 1 if fbmBx0 < 0 fbmBx0 = fbmBx0 + 8192 endif if fbmBx1 < 0 fbmBx1 = fbmBx1 + 8192 endif if fbmBy0 < 0 fbmBy0 = fbmBy0 + 8192 endif if fbmBy1 < 0 fbmBy1 = fbmBy1 + 8192 endif float fbmTmp = 0 float fbmSX = fbmRx0 * fbmRx0 * (3 - 2 * fbmRx0) float fbmSY = fbmRy0 * fbmRy0 * (3 - 2 * fbmRy0) fbmTmp = fbmBx0^2*2473 % 65536 float b00 = (fbmTmp + fbmBy0)^2 % 65536 float b01 = (fbmTmp + fbmBy1)^2 % 65536 fbmTmp = fbmBx1^2*2473 % 65536 float b10 = (fbmTmp + fbmBy0)^2 % 65536 float b11 = (fbmTmp + fbmBy1)^2 % 65536 float fbmPoint000 = b00^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint010 = b01^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint100 = b10^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint110 = b11^2 * 5381 % 65536 / 4 % 16384 - 8192 float fbmPoint001 = (b00 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint011 = (b01 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint101 = (b10 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 float fbmPoint111 = (b11 + 1)^2 * 79997 % 65536 / 4 % 16384 - 8192 fbmTmp = sqrt(fbmPoint000^2 + fbmPoint001^2) fbmPoint000 = fbmPoint000 / fbmTmp fbmPoint001 = fbmPoint001 / fbmTmp fbmTmp = sqrt(fbmPoint010^2 + fbmPoint011^2) fbmPoint010 = fbmPoint010 / fbmTmp fbmPoint011 = fbmPoint011 / fbmTmp fbmTmp = sqrt(fbmPoint100^2 + fbmPoint101^2) fbmPoint100 = fbmPoint100 / fbmTmp fbmPoint101 = fbmPoint101 / fbmTmp fbmTmp = sqrt(fbmPoint110^2 + fbmPoint111^2) fbmPoint110 = fbmPoint110 / fbmTmp fbmPoint111 = fbmPoint111 / fbmTmp float fbmU1 = fbmRx0 * fbmPoint000 + fbmRy0 * fbmPoint001 float fbmV1 = fbmRx1 * fbmPoint100 + fbmRy0 * fbmPoint101 float fbmPtX = fbmU1 + fbmSX * (fbmV1 - fbmU1) float fbmU2 = fbmRx0 * fbmPoint010 + fbmRy1 * fbmPoint011 float fbmV2 = fbmRx1 * fbmPoint110 + fbmRy1 * fbmPoint111 float fbmPtY = fbmU2 + fbmSY * (fbmV2 - fbmU2) fbmSum = fbmSum + fbmPtX + fbmSY*(fbmPtY - fbmPtX) * fbmAmplitude fbmAngle = atan2(fbmPtX+1i*fbmPtY)/(2*#pi) if (fbmAngle < 0) fbmAngle = fbmAngle + 1 endif fbmAmplitude = fbmAmplitude/2 fbmPix = fbmPix / 0.5 i_fbm = i_fbm + 1 if (@disturb_fbm_mode >= 2) fbmHelp = abs(fbmPtX + 1i*fbmPtY) if (@disturb_fbm_mode == 2) ; fBm Pixel only fbmDisturbPix = fbmHelp elseif (@disturb_fbm_mode == 3) ; fBm Pix*Sum fbmDisturbPix = fbmSum*fbmHelp elseif (@disturb_fbm_mode == 4) ; fBm Pixel added fbmDisturbPix = fbmDisturbPix + fbmHelp elseif (@disturb_fbm_mode == 5) ; fBm Pixel W-added fbmDisturbPix = fbmDisturbPix + fbmHelp/i_fbm elseif (@disturb_fbm_mode == 6) ; fBm Pix*Sum added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp elseif (@disturb_fbm_mode == 7) ; fBm Pix*Sum W-added fbmDisturbPix = fbmDisturbPix + fbmSum*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 8) ; fBm Pix*Angle fbmDisturbPix = fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 9) ; fBm Pix*Angle added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp elseif (@disturb_fbm_mode == 10) ; fBm Pix*Angle W-added fbmDisturbPix = fbmDisturbPix + fbmAngle*fbmHelp/i_fbm elseif (@disturb_fbm_mode == 11) ; fBm Pix*Angle Avg fbmDisturbPix = (fbmDisturbPix + fbmAngle*fbmHelp)/fbmSum endif endif endwhile endif ; Variables for Verlauf float txtr_v_verlauf = 1 float txtr_v_hor1 = 0 float txtr_v_hor2 = 0 float txtr_v_bot = 0 float txtr_v_top = 0 float txtr_v_height = 0 float txtr_v_vert1 = 0 float txtr_v_vert2 = 0 float txtr_v_left = 0 float txtr_v_rigt = 0 float txtr_v_width = 0 float txtr_v_yPos = 0 float txtr_v_xPos = 0 ; Variables for Waves int l_waves = @wavesLoop int xWavesM = @xWaveMode int yWavesM = @yWaveMode float xWavesF = @xWaveFreq float yWavesF = @yWaveFreq float granulation = 1000*@scale float gcd = 0 float chk = 0 float tst = 0 complex zCalc = 0 float reCalc = 0 float imCalc = 0 loop: 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) ;zOldOld = zOld ;zOld = zStart 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; if (@globalScale != 0 && @globalScale != 1) zStart = zStart*@globalScale endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 0) if (@disturb_fbm_mode == 0) zStart = zStart*(1+@disturb_fbm*fbmSum) elseif (@disturb_fbm_mode == 1) zStart = zStart*(1+@disturb_fbm*fbmAngle) else zStart = zStart + @disturb_fbm*fbmDisturbPix endif endif if (@globalDither != 0) complex innerScaleZ = 0 complex innerOffset = 0 if (@inner_amount != 0 && zStart != 0) innerScaleZ = zStart*@inner_scale*@globalDither innerOffset = innerOffset + \ @inner_amount*round(innerScaleZ)/(innerScaleZ) endif if (@d_randomness != 0) innerOffset = innerOffset + @d_randomness*#random endif bool shapeCondition = true float ditherRadius = @radius/@globalDither if (@shape == 1) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) < ditherRadius) elseif (@shape == 2) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 3) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < .5*ditherRadius) elseif (@shape == 4) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 5) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) < ditherRadius) elseif (@shape == 6) shapeCondition = (cabs(round(zStart*@globalDither)/@globalDither - zStart) > ditherRadius) elseif (@shape == 7) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 8) shapeCondition = (abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > .5*ditherRadius) elseif (@shape == 9) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart)) + \ abs(imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) elseif (@shape == 10) shapeCondition = (abs(real(round(zStart*@globalDither)/@globalDither - zStart) + \ imag(round(zStart*@globalDither)/@globalDither - zStart)) > ditherRadius) endif if (shapeCondition) zStart = round(zStart*@globalDither + innerOffset)/@globalDither \ - innerOffset/@globalDither endif 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 ; complex zOffset = zStart-@lattOffset if (@lattice == 1) zStart = round(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 2) zStart = trunc(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 3) zStart = floor(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 4) zStart = ceil(@lattFac1*zOffset) - @lattFac2*zStart elseif (@lattice == 5) zStart = abs(@lattFac1*zOffset) - @lattFac2*zStart^2 elseif (@lattice == 6) zStart = round(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 7) zStart = trunc(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 8) zStart = floor(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 9) zStart = ceil(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 10) zStart = abs(@lattFac1*zOffset) \ - @lattFac2*sqrt(real(zOffset)*imag(zOffset)) elseif (@lattice == 11) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 12) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 13) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 14) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*zOffset)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 15) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*zOffset^2)^2) \ - @lattFac2*zStart^2 elseif (@lattice == 16) zStart = round((round(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 17) zStart = trunc((trunc(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 18) zStart = floor((floor(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 19) zStart = ceil((ceil(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^2) \ - @lattFac2*zStart^2 elseif (@lattice == 20) zStart = abs((abs(@lattFac1*zOffset) \ - @lattFac1*sqrt(real(zOffset)*imag(zOffset)))^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(zOffset) float imZ = imL1*imag(zOffset) 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 elseif (@lattice == 24) complex lzp = round(zOffset*@lattFac1) complex lzc = zOffset-(lzp/@lattFac2) float rlf = real(@lattFac1) if (round(imag(lzp))%3 == 0) lzc = (lzc+@lattFac2/2) if (abs(real(lzc)) > rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) < rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif elseif (round(real(lzp))%3 == 1) lzc = (lzc-@lattFac2/2) if (abs(imag(lzc)) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif else lzc = (lzc*@lattFac2*2) if (imag(lzc) > rlf) zStart = lzc+@lattFac2+zOffset elseif (imag(lzc) < rlf) zStart = lzc-@lattFac2+zOffset elseif (real(lzc) > rlf) zStart = lzc+@lattFac2-zOffset elseif (real(lzc) < rlf) zStart = lzc-@lattFac2-zOffset endif endif endif ; lattices if (@turnMode) complex zRound = 0 complex zZ = zStart if (@turnScale != 0) if (@turnScaleMode == 0) zRound = round(zStart*@turnScale)/@turnScale elseif (@turnScaleMode == 1) zRound = round(cabs(zStart)*@turnScale)/@turnScale elseif (@turnScaleMode == 2) zRound = sqrt(|round(zStart*@turnScale)|)/@turnScale endif ; turnScaleMode 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 if (@barnMode > 0) float barnRe = real(@barnSeed) float barnIm = imag(@barnSeed) complex zRound = 0 complex zZ = zStart if (@barnScale != 0) if (@barnScaleMode == 0) zRound = round(zStart*@barnScale)/@barnScale elseif (@barnScaleMode == 1) zRound = round(cabs(zStart)*@barnScale)/@barnScale elseif (@barnScaleMode == 2) zRound = sqrt(|round(zStart*@barnScale)|)/@barnScale endif ; barnScaleMode complex zZ = zStart-zRound endif bool test = false if (@barnMode == 1) test = (real(zStart)*barnIm + barnRe*imag(zStart) >= 0) else test = (|real(zStart)*barnIm - barnRe*imag(zStart)| < .5) endif ; barnMode if (test) zStart = @barnFct1(zZ - @barnShift)*@barnSeed+zRound else zStart = @barnFct2(zZ + @barnShift)*@barnSeed+zRound endif ; test endif ; @barnMode > 0 if (@zJouk != 0 && zStart != 0) zStart = zStart + @zJouk/zStart endif zCalc = (round(zStart*granulation)/granulation - round(zStart*@scale)) * 1000 reCalc = abs(real(zCalc)) imCalc = abs(imag(zCalc)) chk = 2 tst = 0 while (chk > 1) tst = tst + 1 gcd = round(reCalc/imCalc) chk = reCalc - gcd*imCalc if (chk > 1) reCalc = imCalc imCalc = gcd endif endwhile gcd = gcd + @smooth chk = chk + @smooth ; calculate the "vector" if (@type == 0) ; GCD,Iter x = gcd y = tst elseif (@type == 1) ; DCG,Reti x = 1/gcd y = 1/tst elseif (@type == 2) ; CHK,Iter x = chk y = tst elseif (@type == 3) ; KHC,Reti x = 1/chk y = 1/tst elseif (@type == 4) ; GCD,CHK x = gcd y = chk elseif (@type == 5) ; DCG,KHC x = 1/gcd y = 1/chk endif if (@vectorJouk != 0 && zStart != 0) zStart = zStart + @vectorJouk/zStart endif r=0.0 if (@startDistortion == 0) p = #z elseif (@startDistortion == 1) p = zStart elseif (@startDistortion == 2) p = #pixel elseif (@startDistortion == 3) p = (zStart+#pixel)/2 endif if (@minMax) float xm = -1 float ym = -1 if (x < y) xm = x ym = y else xm = y ym = x endif x = xm y = ym endif ; Wave stuff int loop_i = 0 while (loop_i < l_waves) loop_i = loop_i + 1 if (@wavesLoopMode == 1) ; cyclic xWavesM = (xWavesM+1)%5 yWavesM = (yWavesM+1)%5 endif if (xWavesM == 1) ; x*sin(x) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 2) ; x*cos(x) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*x + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 3) ; x*sin(y) x = x*(@xWaveConst + @xWaveWeight*sin(xWavesF*y + @xWaveOffset)^@xWaveExp) elseif (xWavesM == 4) ; x*cos(y) x = x*(@xWaveConst + @xWaveWeight*cos(xWavesF*y + @xWaveOffset)^@xWaveExp) endif if (yWavesM == 1) ; y*sin(y) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 2) ; y*cos(y) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*y + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 3) ; y*sin(x) y = y*(@yWaveConst + @yWaveWeight*sin(yWavesF*x + @yWaveOffset)^@yWaveEyp) elseif (yWavesM == 4) ; y*cos(x) y = y*(@yWaveConst + @yWaveWeight*cos(yWavesF*x + @yWaveOffset)^@yWaveEyp) endif if (@wavesGrowFreq != 1) xWavesF = xWavesF*@wavesGrowFreq yWavesF = yWavesF*@wavesGrowFreq endif endwhile ; wave stuff if (@curveJouk != 0) if (x != 0) x = x + real(@curveJouk)/x endif if (y != 0) y = y + imag(@curveJouk)/y endif endif z = x + 1i*y float rz = |real(z)| float iz = |imag(z)| if (@watch == 0) ; real r = rz elseif (@watch == 1) ; imag r = iz elseif (@watch == 2) ; magn r = |z| elseif (@watch == 3) ; diff r = |rz-iz| 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 = |z-zStart| 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 float disturbFix = 0 if (@disturbFixFactor != 0) float dtmp = 1 if (@disturbMode == 0) ; Log dtmp = 1/log(iter) elseif (@disturbMode == 1) ; Sqrt dtmp = 1/sqrt(iter) elseif (@disturbMode == 2) ; Lin dtmp = 1/iter elseif (@disturbMode == 3) ; Sqr dtmp = 1/iter^2 elseif (@disturbMode == 4) ; AlterGeom dtmp = 1/(exp(-iter)*(-1)^iter) elseif (@disturbMode == 5) ; Geom dtmp = 1/(exp(-iter)*iter) elseif (@disturbMode == 6) ; Const dtmp = 1 elseif (@disturbMode == 7) ; Const dtmp = 1/|zstart| elseif (@disturbMode == 8) ; Const dtmp = 1/|real(zstart)| elseif (@disturbMode == 9) ; Const dtmp = 1/|imag(zstart)| elseif (@disturbMode == 10) ; Const dtmp = |zstart| elseif (@disturbMode == 11) ; Const dtmp = |real(zstart)| elseif (@disturbMode == 12) ; Const dtmp = |imag(zstart)| elseif (@disturbMode == 13) ; Const dtmp = 1/|real(zstart)-imag(zstart)| elseif (@disturbMode == 14) ; Const dtmp = |real(zstart)-imag(zstart)| endif disturbFix = @disturbFixFactor*dtmp endif if (@disturb_fbm > 0 && @disturb_fbm_apply == 1) if (@disturb_fbm_mode == 0) disturbFix = @disturb_fbm*fbmSum elseif (@disturb_fbm_mode == 1) disturbFix = @disturb_fbm*fbmAngle else disturbFix = @disturb_fbm*cabs(fbmDisturbPix) endif endif if (@fixit == 0) ; Last rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix elseif (@fixit == 1) ; Minimum if (r < rfix) rfix = r + disturbFix ifix = iter + disturbFix zfix = zStart + disturbFix cfix = p + disturbFix endif elseif (@fixit == 2) ; Maximum if (r > rfix) rfix = r - disturbFix ifix = iter - disturbFix zfix = zStart - disturbFix cfix = p - disturbFix endif elseif (@fixit == 3) ; sum rfix = rfix + r + disturbFix ifix = ifix + iter + disturbFix zfix = zfix + zStart + disturbFix cfix = cfix + p + disturbFix elseif (@fixit == 4) ; w-sum rfix = rfix + r/iter + disturbFix ifix = (ifix + iter)/iter + disturbFix zfix = zfix + zStart/iter + disturbFix cfix = cfix + p/iter + disturbFix elseif (@fixit == 5) ; w2-sum float itmp = iter^2 rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 6) ; wS-sum float itmp = sqrt(iter) rfix = rfix + r/itmp + disturbFix ifix = (ifix + iter)/itmp + disturbFix zfix = zfix + zStart/itmp + disturbFix cfix = cfix + p/itmp + disturbFix elseif (@fixit == 7) ; g-sum float itmp = exp(-iter) rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 8) ; g'-sum float itmp = exp(-iter)*iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 9) ; ag-sum float itmp = exp(-iter)*(-1)^iter rfix = rfix + r*itmp + disturbFix ifix = (ifix + iter)*itmp + disturbFix zfix = zfix + zStart*itmp + disturbFix cfix = cfix + p*itmp + disturbFix elseif (@fixit == 10) ; l-sum rfix = rfix + log(r) + disturbFix ifix = ifix + log(iter) + disturbFix zfix = zfix + log(zStart) + disturbFix cfix = cfix + log(p) + disturbFix elseif (@fixit == 11) ; lw-sum rfix = rfix + log(r)/iter + disturbFix ifix = (ifix + log(iter))/iter + disturbFix zfix = zfix + log(zStart)/iter + disturbFix cfix = cfix + log(p)/iter + disturbFix elseif (@fixit == 12) ; lw-sum float itmp = iter^2 rfix = rfix + log(r)/itmp + disturbFix ifix = (ifix + log(iter))/itmp + disturbFix zfix = zfix + log(zStart)/itmp + disturbFix cfix = cfix + log(p)/itmp + disturbFix endif if (@rotDegree != 0) zfix = (zfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre cfix = (cfix-@rotCentre)*exp(iter*1i*#pi/180*@rotDegree) + @rotCentre 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 (at the very beginning final: float temp = 0 if (@numIterMode == 1) ifix = #numiter elseif (@numIterMode == 2) ifix = ifix/#numiter elseif (@numIterMode == 3) ifix = #numiter-ifix elseif (@numIterMode == 4) ifix = (#numiter-ifix)/#numiter elseif (@numIterMode == 5) ifix = (#numiter+ifix)/2 endif ; @numIterMode if (@colorby == 0) ; Fiximum 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 elseif (@colorby == 23) temp = ifix endif ; colorby list 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) elseif (@maskType == 10) ; Index/|z| mask = temp/cabs(zStart) elseif (@maskType == 11) ; GoldenCut mask = |real(zStart)/imag(zStart) - imag(zStart)/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 (@colour_limit != 0) to_index = to_index%@colour_limit endif 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 (@f_rand_verlaufMode > 0 || \ @f_Gnarl_verlaufMode > 0 || \ @f_PopCorn_verlaufMode > 0 || \ @f_SFBM_verlaufMode > 0 || \ @f_Primes_verlaufMode > 0 || \ @f_Gauss_verlaufMode > 0 || \ @f_Turn_verlaufMode > 0 || \ @f_Check_verlaufMode > 0 || \ @f_Pick153_verlaufMode > 0 || \ @f_SumDiv_verlaufMode > 0 || \ @f_MLAB_verlaufMode > 0 || \ @f_Banana_verlaufMode > 0 || \ @f_Ell_verlaufMode > 0 || \ @f_MedialCut_verlaufMode > 0 \ ) txtr_v_hor1 = imag(@txtr_verlauf_Line1) txtr_v_hor2 = imag(@txtr_verlauf_Line2) if (txtr_v_hor1 < txtr_v_hor2) txtr_v_bot = txtr_v_hor1 txtr_v_top = txtr_v_hor2 else txtr_v_bot = txtr_v_hor2 txtr_v_top = txtr_v_hor1 endif txtr_v_height = txtr_v_top-txtr_v_bot txtr_v_vert1 = real(@txtr_verlauf_Line1) txtr_v_vert2 = real(@txtr_verlauf_Line2) if (txtr_v_vert1 < txtr_v_vert2) txtr_v_left = txtr_v_vert1 txtr_v_rigt = txtr_v_vert2 else txtr_v_left = txtr_v_vert2 txtr_v_rigt = txtr_v_vert1 endif txtr_v_width = txtr_v_rigt-txtr_v_left complex pixpix = #pixel if (@txtr_verlauf_Rot%360 != 0) complex rotCentre = @txtr_verlauf_RotCentre pixpix = (pixpix-rotCentre)*exp(-1i*#pi*@txtr_verlauf_Rot/180) + rotCentre endif txtr_v_yPos = imag(pixpix) txtr_v_xPos = real(pixpix) else txtr_v_verlauf = 1 endif if (@f_randomness != 0) txtr_v_verlauf = 1 if (@f_rand_verlaufMode > 0) if (@f_rand_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) ;! txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height ;! endif elseif (@f_rand_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_rand_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) ;! ;! txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) ;! txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width ;! endif elseif (@f_rand_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_rand_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_rand_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_rand_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif endif to_index = to_index + @f_randomness*txtr_v_verlauf * real(#random) endif if (@txtr_gnarl != 0) complex zGnarl = _zz if (@txtr_Gnarl_lattice == 0) zGnarl = zGnarl*@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 1) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 2) zGnarl = zGnarl-trunc(zGnarl*@txtr_Gnarl_scale*10) elseif (@txtr_Gnarl_lattice == 3) zGnarl = zGnarl-trunc(@txtr_Gnarl_scale/zGnarl) elseif (@txtr_Gnarl_lattice == 4) zGnarl = zGnarl*@txtr_Gnarl_scale + @txtr_Gnarl_scale/zGnarl elseif (@txtr_Gnarl_lattice == 5) zGnarl = round(zGnarl*@txtr_Gnarl_scale)/@txtr_Gnarl_scale elseif (@txtr_Gnarl_lattice == 6) complex zp_Gnarl = round(zGnarl*@txtr_Gnarl_scale) complex zc_Gnarl = zGnarl - (zp_Gnarl/@txtr_Gnarl_scale) if (round(imag(zp_Gnarl))%3==0) zc_Gnarl = (zc_Gnarl + @txtr_Gnarl_scale/2) if (abs(real(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif elseif (round(real(zp_Gnarl))%3==1) zc_Gnarl = (zc_Gnarl - @txtr_Gnarl_scale/2) if (abs(imag(zc_Gnarl)) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif else zc_Gnarl = (zc_Gnarl*@txtr_Gnarl_scale*2) if (imag(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale + zGnarl elseif (imag(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale + zGnarl elseif (real(zc_Gnarl) > @txtr_Gnarl_scale) zGnarl = zc_Gnarl + @txtr_Gnarl_scale - zGnarl elseif (real(zc_Gnarl) < @txtr_Gnarl_scale) zGnarl = zc_Gnarl - @txtr_Gnarl_scale - zGnarl endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gnarl_verlaufMode > 0) if (@f_Gnarl_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gnarl_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gnarl_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gnarl_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gnarl_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gnarl_verlaufOffset endif to_index = to_index + @txtr_gnarl*txtr_v_verlauf*textureGnarl endif if (@txtr_PopCorn != 0) complex zPopCorn = _zz if (@txtr_PopCorn_lattice == 0) zPopCorn = zPopCorn*@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 1) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 2) zPopCorn = zPopCorn-trunc(zPopCorn*@txtr_PopCorn_scale*10) elseif (@txtr_PopCorn_lattice == 3) zPopCorn = zPopCorn-trunc(@txtr_PopCorn_scale/zPopCorn) elseif (@txtr_PopCorn_lattice == 4) zPopCorn = zPopCorn*@txtr_PopCorn_scale + @txtr_PopCorn_scale/zPopCorn elseif (@txtr_PopCorn_lattice == 5) zPopCorn = round(zPopCorn*@txtr_PopCorn_scale)/@txtr_PopCorn_scale elseif (@txtr_PopCorn_lattice == 6) complex zp_PopCorn = round(zPopCorn*@txtr_PopCorn_scale) complex zc_PopCorn = zPopCorn - (zp_PopCorn/@txtr_PopCorn_scale) if (round(imag(zp_PopCorn))%3==0) zc_PopCorn = (zc_PopCorn + @txtr_PopCorn_scale/2) if (abs(real(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif elseif (round(real(zp_PopCorn))%3==1) zc_PopCorn = (zc_PopCorn - @txtr_PopCorn_scale/2) if (abs(imag(zc_PopCorn)) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif else zc_PopCorn = (zc_PopCorn*@txtr_PopCorn_scale*2) if (imag(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale + zPopCorn elseif (imag(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale + zPopCorn elseif (real(zc_PopCorn) > @txtr_PopCorn_scale) zPopCorn = zc_PopCorn + @txtr_PopCorn_scale - zPopCorn elseif (real(zc_PopCorn) < @txtr_PopCorn_scale) zPopCorn = zc_PopCorn - @txtr_PopCorn_scale - zPopCorn endif endif endif ; txtr_popcorn_lattice 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 txtr_v_verlauf = 1 if (@f_PopCorn_verlaufMode > 0) if (@f_PopCorn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_PopCorn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_PopCorn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_PopCorn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_PopCorn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_PopCorn_verlaufOffset endif to_index = to_index + @txtr_PopCorn*txtr_v_verlauf*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 if (@txtr_SFBM_lattice == 0) zSFBM = zSFBM*@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 1) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 2) zSFBM = zSFBM-trunc(zSFBM*@txtr_SFBM_scale*10) elseif (@txtr_SFBM_lattice == 3) zSFBM = zSFBM-trunc(@txtr_SFBM_scale/zSFBM) elseif (@txtr_SFBM_lattice == 4) zSFBM = zSFBM*@txtr_SFBM_scale + @txtr_SFBM_scale/zSFBM elseif (@txtr_SFBM_lattice == 5) zSFBM = round(zSFBM*@txtr_SFBM_scale)/@txtr_SFBM_scale elseif (@txtr_SFBM_lattice == 6) complex zp_SFBM = round(zSFBM*@txtr_SFBM_scale) complex zc_SFBM = zSFBM - (zp_SFBM/@txtr_SFBM_scale) if (round(imag(zp_SFBM))%3==0) zc_SFBM = (zc_SFBM + @txtr_SFBM_scale/2) if (abs(real(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif elseif (round(real(zp_SFBM))%3==1) zc_SFBM = (zc_SFBM - @txtr_SFBM_scale/2) if (abs(imag(zc_SFBM)) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif else zc_SFBM = (zc_SFBM*@txtr_SFBM_scale*2) if (imag(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale + zSFBM elseif (imag(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale + zSFBM elseif (real(zc_SFBM) > @txtr_SFBM_scale) zSFBM = zc_SFBM + @txtr_SFBM_scale - zSFBM elseif (real(zc_SFBM) < @txtr_SFBM_scale) zSFBM = zc_SFBM - @txtr_SFBM_scale - zSFBM endif endif endif 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 ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_SFBM_verlaufMode > 0) if (@f_SFBM_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SFBM_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SFBM_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SFBM_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SFBM_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SFBM_verlaufOffset endif to_index = to_index + @txtr_SFBM*txtr_v_verlauf*textureSFBM endif if (@txtr_primes != 0) complex zPrimes = _zz if (@txtr_Primes_lattice == 0) ; none zPrimes = zPrimes*@txtr_Primes_scale elseif (@txtr_Primes_lattice == 1) ; normal zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 2) ; modified zPrimes = zPrimes-trunc(zPrimes*@txtr_Primes_scale*10) elseif (@txtr_Primes_lattice == 3) ; Inverse1 zPrimes = zPrimes-trunc(@txtr_Primes_scale/zPrimes) elseif (@txtr_Primes_lattice == 4) ; joukowskij zPrimes = zPrimes*@txtr_Primes_scale + @txtr_Primes_scale/zPrimes elseif (@txtr_Primes_lattice == 5) zPrimes = round(zPrimes*@txtr_Primes_scale)/@txtr_Primes_scale elseif (@txtr_Primes_lattice == 6) complex zp_Primes = round(zPrimes*@txtr_Primes_scale) complex zc_Primes = zPrimes - (zp_Primes/@txtr_Primes_scale) if (round(imag(zp_Primes))%3==0) zc_Primes = (zc_Primes + @txtr_Primes_scale/2) if (abs(real(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif elseif (round(real(zp_Primes))%3==1) zc_Primes = (zc_Primes - @txtr_Primes_scale/2) if (abs(imag(zc_Primes)) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif else zc_Primes = (zc_Primes*@txtr_Primes_scale*2) if (imag(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale + zPrimes elseif (imag(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale + zPrimes elseif (real(zc_Primes) > @txtr_Primes_scale) zPrimes = zc_Primes + @txtr_Primes_scale - zPrimes elseif (real(zc_Primes) < @txtr_Primes_scale) zPrimes = zc_Primes - @txtr_Primes_scale - zPrimes endif endif endif 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*txtr_v_verlauf*texturePrimes txtr_v_verlauf = 1 if (@f_Primes_verlaufMode > 0) if (@f_Primes_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Primes_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Primes_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Primes_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Primes_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Primes_verlaufOffset endif endif ; @txtr_primes != 0 if (@txtr_Gauss != 0) complex zGauss = _zz if (@txtr_Gauss_lattice == 0) zGauss = zGauss*@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 1) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 2) zGauss = zGauss-trunc(zGauss*@txtr_Gauss_scale*10) elseif (@txtr_Gauss_lattice == 3) zGauss = zGauss-trunc(@txtr_Gauss_scale/zGauss) elseif (@txtr_Gauss_lattice == 4) zGauss = zGauss*@txtr_Gauss_scale + @txtr_Gauss_scale/zGauss elseif (@txtr_Gauss_lattice == 5) zGauss = round(zGauss*@txtr_Gauss_scale)/@txtr_Gauss_scale elseif (@txtr_Gauss_lattice == 6) complex zp_Gauss = round(zGauss*@txtr_Gauss_scale) complex zc_Gauss = zGauss - (zp_Gauss/@txtr_Gauss_scale) if (round(imag(zp_Gauss))%3==0) zc_Gauss = (zc_Gauss + @txtr_Gauss_scale/2) if (abs(real(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif elseif (round(real(zp_Gauss))%3==1) zc_Gauss = (zc_Gauss - @txtr_Gauss_scale/2) if (abs(imag(zc_Gauss)) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif else zc_Gauss = (zc_Gauss*@txtr_Gauss_scale*2) if (imag(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale + zGauss elseif (imag(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale + zGauss elseif (real(zc_Gauss) > @txtr_Gauss_scale) zGauss = zc_Gauss + @txtr_Gauss_scale - zGauss elseif (real(zc_Gauss) < @txtr_Gauss_scale) zGauss = zc_Gauss - @txtr_Gauss_scale - zGauss endif endif endif 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 txtr_v_verlauf = 1 if (@f_Gauss_verlaufMode > 0) if (@f_Gauss_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Gauss_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Gauss_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Gauss_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Gauss_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Gauss_verlaufOffset endif to_index = to_index + @txtr_Gauss*txtr_v_verlauf*textureGauss endif if (@txtr_Turn!= 0) complex zTurn = _zz zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale if (@txtr_Turn_lattice == 0) zTurn = zTurn*@txtr_Turn_scale elseif (@txtr_Turn_lattice == 1) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 2) zTurn = zTurn-trunc(zTurn*@txtr_Turn_scale*10) elseif (@txtr_Turn_lattice == 3) zTurn = zTurn-trunc(@txtr_Turn_scale/zTurn) elseif (@txtr_Turn_lattice == 4) zTurn = zTurn*@txtr_Turn_scale + @txtr_Turn_scale/zTurn elseif (@txtr_Turn_lattice == 5) zTurn = round(zTurn*@txtr_Turn_scale)/@txtr_Turn_scale elseif (@txtr_Turn_lattice == 6) complex zp_Turn = round(zTurn*@txtr_Turn_scale) complex zc_Turn = zTurn - (zp_Turn/@txtr_Turn_scale) if (round(imag(zp_Turn))%3==0) zc_Turn = (zc_Turn + @txtr_Turn_scale/2) if (abs(real(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif elseif (round(real(zp_Turn))%3==1) zc_Turn = (zc_Turn - @txtr_Turn_scale/2) if (abs(imag(zc_Turn)) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif else zc_Turn = (zc_Turn*@txtr_Turn_scale*2) if (imag(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale + zTurn elseif (imag(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale + zTurn elseif (real(zc_Turn) > @txtr_Turn_scale) zTurn = zc_Turn + @txtr_Turn_scale - zTurn elseif (real(zc_Turn) < @txtr_Turn_scale) zTurn = zc_Turn - @txtr_Turn_scale - zTurn endif endif endif complex zTurned = zTurn float txtr_testAngle1 = #pi/@txtr_Turn_corte1 float txtr_testAngle2 = 3*txtr_testAngle1 complex txtr_rotAngle1 = @txtr_Turn_corte2*1i*txtr_testAngle1 complex txtr_rotAngle2 = @txtr_Turn_corte2*1i*txtr_testAngle2 if (@txtr_Turn_size != 0 && @txtr_Turn_size != 1) zTurn = zTurn/@txtr_Turn_size endif if (@reachThrough) _zz = zTurn endif float textureTurn = 0 float txtr_arg = atan2(zTurn) ; "Turn around" part taken from Sam if (abs(txtr_arg) < txtr_testAngle1) zTurned = zTurn*exp(txtr_rotAngle1) elseif (abs(txtr_arg) > txtr_testAngle2) zTurned = zTurn*exp(txtr_rotAngle2) endif textureTurn = |zTurn-zTurned| if (@txtr_Turn_limit != 0) textureTurn = textureTurn%@txtr_Turn_limit endif txtr_v_verlauf = 1 if (@f_Turn_verlaufMode > 0) if (@f_Turn_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Turn_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Turn_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Turn_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Turn_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Turn_verlaufOffset endif to_index = to_index + @txtr_Turn*txtr_v_verlauf*textureTurn endif if (@txtr_Check!= 0) complex zChecked = round(_zz*@txtr_Check_scale) float textureCheck = 0 int checkFlag = 0 int testCheck = 0 int reChecked = trunc(real(zChecked)) int imChecked = trunc(imag(zChecked)) if (@txtr_Check_test == 0) testCheck = reChecked + imChecked elseif (@txtr_Check_test == 1) testCheck = reChecked * imChecked endif complex zCheckShape = _zz*@txtr_Check_scale complex zShapedCheck = zChecked - zCheckShape float reShapedCheck = real(zShapedCheck) float imShapedCheck = imag(zShapedCheck) if (testCheck%@txtr_Checker == 0) ; Condition for the checkers if (@txtr_Check_shape == 0) ; Squares only checkFlag = 1 elseif (@txtr_Check_shape == 1) ; Circle if (|zShapedCheck| < .2*@txtr_Check_shConst) ; additional condition checkFlag = 1 ; for circles endif elseif (@txtr_Check_shape == 2) if (abs (|reShapedCheck| - |imShapedCheck|) > .1*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 3) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 endif elseif (@txtr_Check_shape == 4) if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; segments checkFlag = 1 endif elseif (@txtr_Check_shape == 5) checkFlag = 1 ; draw a square if (|reShapedCheck| - |imShapedCheck| > .05*@txtr_Check_shConst) ; cut out segments checkFlag = 0 endif elseif (@txtr_Check_shape == 6) checkFlag = 1 ; draw a square if (|reShapedCheck| > .05*@txtr_Check_shConst) ; cut out horizontal lines checkFlag = 0 endif elseif (@txtr_Check_shape == 7) checkFlag = 1 ; draw a square if (|imShapedCheck| > .05*@txtr_Check_shConst) ; cut out vertical lines checkFlag = 0 endif elseif (@txtr_Check_shape == 8) checkFlag = 1 ; draw a square if ( |sin(imChecked*2*#pi) - sin(imag(zCheckShape)*2*#pi)| < .5*@txtr_Check_shConst) checkFlag = 0 ; cut out many vertical lines endif elseif (@txtr_Check_shape == 9) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 0 ; cut out a circle if (|imShapedCheck| > .05*@txtr_Check_shConst) checkFlag = 1 ; fill in something endif endif elseif (@txtr_Check_shape == 10) if (|zShapedCheck| < .2*@txtr_Check_shConst) checkFlag = 1 ; draw a circle if (|imShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 ; cut out horizontal if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 ; fill in vertical endif endif endif elseif (@txtr_Check_shape == 11) checkFlag = 1 if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 0 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 12) if (|imShapedCheck| > .01*@txtr_Check_shConst) checkFlag = 1 if (|reShapedCheck| < .01*@txtr_Check_shConst) checkFlag = 0 endif endif elseif (@txtr_Check_shape == 13) float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 14) checkFlag = 1 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 15) checkFlag = 1 if (|zShapedCheck| > .1*@txtr_Check_shConst) checkFlag = 0 float txtr_arg = atan2(zShapedCheck)/(2*#pi) if (txtr_arg < 0) txtr_arg = txtr_arg + 1 endif if (abs(txtr_arg) < .25*#pi/@txtr_Check_shConst) checkFlag = 1 endif endif elseif (@txtr_Check_shape == 16) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |reShapedCheck| + |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 17) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 18) checkFlag = 1 if (abs(reShapedCheck) - abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(reShapedCheck) + abs(imShapedCheck) > 0.1*@txtr_Check_shConst && \ abs(imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 19) checkFlag = 1 if (|reShapedCheck| - |imShapedCheck| < 0.1*@txtr_Check_shConst && \ |reShapedCheck| + |imShapedCheck| > 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 20) checkFlag = 1 if ((reShapedCheck) - (imShapedCheck) > 0.1*@txtr_Check_shConst && \ (reShapedCheck) + (imShapedCheck) < 0.1*@txtr_Check_shConst && \ (imShapedCheck) < 0.1*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 21) if (|reShapedCheck| - |imShapedCheck| < 0.005*@txtr_Check_shConst || \ |imShapedCheck| < 0.005*@txtr_Check_shConst) checkFlag = 1 endif elseif (@txtr_Check_shape == 22) checkFlag = 1 if (|sin(reShapedCheck*2*#pi) - cos(imShapedCheck*2*#pi) | > 0.5*@txtr_Check_shConst || \ |imShapedCheck| < 0.01*@txtr_Check_shConst) checkFlag = 0 endif elseif (@txtr_Check_shape == 23) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif elseif (@txtr_Check_shape == 24) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif elseif (@txtr_Check_shape == 25) if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 endif endif endif elseif (@txtr_Check_shape == 26) checkFlag = 1 ; draw a square if (|zShapedCheck| < .2*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.2| < .15*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if (|zShapedCheck-.3| < .0125*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 endif endif endif elseif (@txtr_Check_shape == 27) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 1 endif endif endif endif endif elseif (@txtr_Check_shape == 28) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck-.01| < .17*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck-.1| < .2*@txtr_Check_shConst) ; fill in another circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst)) checkFlag = 0 endif endif endif endif endif elseif (@txtr_Check_shape == 29) if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 1 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 1 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 0 endif endif endif endif elseif (@txtr_Check_shape == 30) checkFlag = 1 if (|zShapedCheck| < .25*@txtr_Check_shConst) ; cut out a circle checkFlag = 0 if (|zShapedCheck| < .22*@txtr_Check_shConst) ; cut out a circle checkFlag = 1 if ((|zShapedCheck-(.16,.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.16,-.2)| < .0055*@txtr_Check_shConst) \ || (|zShapedCheck-(.05,-.2)| < .001*@txtr_Check_shConst) \ ) checkFlag = 0 endif if (|zShapedCheck+.5| < .17*@txtr_Check_shConst) ; cut out a circle!! checkFlag = 0 if (|zShapedCheck+.6| < .22*@txtr_Check_shConst) ; fill in another circle!! checkFlag = 1 endif endif endif endif endif if (@txtr_Check_divide == 1) if (reShapedCheck > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 2) if (|reShapedCheck| > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 3) if (cabs(reShapedCheck) > imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 4) if (|reShapedCheck| > |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 5) if (reShapedCheck < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 6) if (|reShapedCheck| < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 7) if (cabs(reShapedCheck) < imShapedCheck) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 8) if (|reShapedCheck| < |imShapedCheck|) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 9) if (|atan2(zShapedCheck)/#pi|%.15 > .03) checkFlag = 1 - checkFlag endif elseif (@txtr_Check_divide == 10) if (cabs(zShapedCheck)%.1 > .03) checkFlag = 1 - checkFlag endif endif endif ; testCheck%@txtr_Checker == 0 if (@txtr_Check_invert) checkFlag = 1 - checkFlag endif textureCheck = checkFlag if (@txtr_Check_col == 1 || @txtr_Check_col == 3) textureCheck = textureCheck*|zChecked| endif if (@txtr_Check_col == 2 || @txtr_Check_col == 3) textureCheck = textureCheck*#numiter endif if (@txtr_Check_col == 4) textureCheck = textureCheck*|zShapedCheck| endif if (@txtr_Check_limit != 0) textureCheck = textureCheck%@txtr_Check_limit endif txtr_v_verlauf = 1 if (@f_Check_verlaufMode > 0) if (@f_Check_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Check_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Check_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Check_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Check_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Check_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Check_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Check_verlaufOffset endif to_index = to_index + @txtr_Check*txtr_v_verlauf*textureCheck endif if (@txtr_Pick153 != 0) complex zPick153 = _zz float reCalcPick153 = 0 float imCalcPick153 = 0 float reTestPick153 = 0 float imTestPick153 = 0 float rePick153_1 = 0 float rePick153_2 = 0 float rePick153_3 = 0 float imPick153_1 = 0 float imPick153_2 = 0 float imPick153_3 = 0 float rePick153_R = 0 float imPick153_R = 0 if (@txtr_Pick153_lattice == 0) zPick153 = zPick153*@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 1) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 2) zPick153 = zPick153-trunc(zPick153*@txtr_Pick153_scale*10) elseif (@txtr_Pick153_lattice == 3) zPick153 = zPick153-trunc(@txtr_Pick153_scale/zPick153) elseif (@txtr_Pick153_lattice == 4) zPick153 = zPick153*@txtr_Pick153_scale + @txtr_Pick153_scale/zPick153 elseif (@txtr_Pick153_lattice == 5) zPick153 = round(zPick153*@txtr_Pick153_scale)/@txtr_Pick153_scale elseif (@txtr_Pick153_lattice == 6) complex zp_Pick153 = round(zPick153*@txtr_Pick153_scale) complex zc_Pick153 = zPick153 - (zp_Pick153/@txtr_Pick153_scale) if (round(imag(zp_Pick153))%3==0) zc_Pick153 = (zc_Pick153 + @txtr_Pick153_scale/2) if (abs(real(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif elseif (round(real(zp_Pick153))%3==1) zc_Pick153 = (zc_Pick153 - @txtr_Pick153_scale/2) if (abs(imag(zc_Pick153)) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif else zc_Pick153 = (zc_Pick153*@txtr_Pick153_scale*2) if (imag(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale + zPick153 elseif (imag(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale + zPick153 elseif (real(zc_Pick153) > @txtr_Pick153_scale) zPick153 = zc_Pick153 + @txtr_Pick153_scale - zPick153 elseif (real(zc_Pick153) < @txtr_Pick153_scale) zPick153 = zc_Pick153 - @txtr_Pick153_scale - zPick153 endif endif endif float texturePick153 = 0 float granulation153 = 1000*@txtr_scale153 zCalcPick153 = (trunc(zPick153*granulation153)/granulation153 - trunc(zPick153*@txtr_scale153)) * 1000 reCalcPick153 = real(zCalcPick153) imCalcPick153 = imag(zCalcPick153) int j = @txtr_numOfTestsPick153 while (j > 0) j = j-1 rePick153_1 = trunc(reCalcPick153/100) rePick153_2 = trunc(reCalcPick153/10 - rePick153_1*10) rePick153_3 = trunc(reCalcPick153/1 - rePick153_1*100 - rePick153_2*10) imPick153_1 = trunc(imCalcPick153/100) imPick153_2 = trunc(imCalcPick153/10 - imPick153_1*10) imPick153_3 = trunc(imCalcPick153/1 - imPick153_1*100 - imPick153_2*10) reTestPick153 = rePick153_1^3 + rePick153_2^3 + rePick153_3^2 imTestPick153 = imPick153_1^3 + imPick153_2^3 + imPick153_3^2 rePick153_R = reCalcPick153 - reTestPick153 imPick153_R = imCalcPick153 - imTestPick153 reCalcPick153 = reTestPick153 imCalcPick153 = imTestPick153 endwhile ; j > 0 if (@txtr_Pick153_col == 0) texturePick153 = abs(rePick153_R)/500 elseif (@txtr_Pick153_col == 1) texturePick153 = abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 2) texturePick153 = abs(rePick153_R+imPick153_R)/500 elseif (@txtr_Pick153_col == 3) texturePick153 = abs(rePick153_R)/500 + abs(imPick153_R)/500 elseif (@txtr_Pick153_col == 4) texturePick153 = abs(imPick153_R-rePick153_R)/250 elseif (@txtr_Pick153_col == 5) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 6) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R)/500 else texturePick153 = abs(rePick153_R)/500 endif elseif (@txtr_Pick153_col == 7) if abs(imPick153_R) < abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 8) if abs(imPick153_R) > abs(rePick153_R) texturePick153 = abs(imPick153_R/rePick153_R) else texturePick153 = abs(rePick153_R/imPick153_R) endif elseif (@txtr_Pick153_col == 9) texturePick153 = abs(rePick153_R*imPick153_R)/250000 elseif (@txtr_Pick153_col == 10) texturePick153 = abs(rePick153_R*imPick153_R)/abs((rePick153_R+imPick153_R)*500) elseif (@txtr_Pick153_col == 11) texturePick153 = (rePick153_R+imPick153_R)^2/abs(rePick153_R*imPick153_R) elseif (@txtr_Pick153_col == 12) texturePick153 = (rePick153_R-imPick153_R)^2/(rePick153_R+imPick153_R)^2 endif if (@txtr_Pick153_limit != 0) texturePick153 = texturePick153%@txtr_Pick153_limit endif if (texturePick153 < 0) texturePick153 = 0 endif txtr_v_verlauf = 1 if (@f_Pick153_verlaufMode > 0) if (@f_Pick153_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Pick153_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Pick153_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Pick153_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Pick153_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Pick153_verlaufOffset endif to_index = to_index + @txtr_Pick153*txtr_v_verlauf*texturePick153 endif if (@txtr_SumDiv != 0) complex zSumDiv = _zz float reCalcSumDiv = 0 float imCalcSumDiv = 0 float reSumDiv_R = 0 float imSumDiv_R = 0 if (@txtr_SumDiv_lattice == 0) zSumDiv = zSumDiv*@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 1) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 2) zSumDiv = zSumDiv-trunc(zSumDiv*@txtr_SumDiv_scale*10) elseif (@txtr_SumDiv_lattice == 3) zSumDiv = zSumDiv-trunc(@txtr_SumDiv_scale/zSumDiv) elseif (@txtr_SumDiv_lattice == 4) zSumDiv = zSumDiv*@txtr_SumDiv_scale + @txtr_SumDiv_scale/zSumDiv elseif (@txtr_SumDiv_lattice == 5) zSumDiv = round(zSumDiv*@txtr_SumDiv_scale)/@txtr_SumDiv_scale elseif (@txtr_SumDiv_lattice == 6) complex zp_SumDiv = round(zSumDiv*@txtr_SumDiv_scale) complex zc_SumDiv = zSumDiv - (zp_SumDiv/@txtr_SumDiv_scale) if (round(imag(zp_SumDiv))%3==0) zc_SumDiv = (zc_SumDiv + @txtr_SumDiv_scale/2) if (abs(real(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif elseif (round(real(zp_SumDiv))%3==1) zc_SumDiv = (zc_SumDiv - @txtr_SumDiv_scale/2) if (abs(imag(zc_SumDiv)) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif else zc_SumDiv = (zc_SumDiv*@txtr_SumDiv_scale*2) if (imag(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale + zSumDiv elseif (imag(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale + zSumDiv elseif (real(zc_SumDiv) > @txtr_SumDiv_scale) zSumDiv = zc_SumDiv + @txtr_SumDiv_scale - zSumDiv elseif (real(zc_SumDiv) < @txtr_SumDiv_scale) zSumDiv = zc_SumDiv - @txtr_SumDiv_scale - zSumDiv endif endif endif float textureSumDiv = 0 float granulationSumDiv = 1000*@txtr_scaleSumDiv zCalcSumDiv = (trunc(zSumDiv*granulationSumDiv)/granulationSumDiv - trunc(zSumDiv*@txtr_scaleSumDiv)) * 1000 reCalcSumDiv = real(zCalcSumDiv) imCalcSumDiv = imag(zCalcSumDiv) if (@txtr_SumDiv_mode == 0) reSumDiv_R = 0 imSumDiv_R = 0 elseif (@txtr_SumDiv_mode == 1) reSumDiv_R = reCalcSumDiv imSumDiv_R = imCalcSumDiv endif int j = 0 while (j abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R)/500 else textureSumDiv = abs(reSumDiv_R)/500 endif elseif (@txtr_SumDiv_col == 7) if abs(imSumDiv_R) < abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 8) if abs(imSumDiv_R) > abs(reSumDiv_R) textureSumDiv = abs(imSumDiv_R/reSumDiv_R) else textureSumDiv = abs(reSumDiv_R/imSumDiv_R) endif elseif (@txtr_SumDiv_col == 9) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/250000 elseif (@txtr_SumDiv_col == 10) textureSumDiv = abs(reSumDiv_R*imSumDiv_R)/abs((reSumDiv_R+imSumDiv_R)*500) elseif (@txtr_SumDiv_col == 11) textureSumDiv = (reSumDiv_R+imSumDiv_R)^2/abs(reSumDiv_R*imSumDiv_R) elseif (@txtr_SumDiv_col == 12) textureSumDiv = (reSumDiv_R-imSumDiv_R)^2/(reSumDiv_R+imSumDiv_R)^2 endif if (@txtr_SumDiv_limit != 0) textureSumDiv = textureSumDiv%@txtr_SumDiv_limit endif if (textureSumDiv < 0) textureSumDiv = 0 endif txtr_v_verlauf = 1 if (@f_SumDiv_verlaufMode > 0) if (@f_SumDiv_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_SumDiv_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_SumDiv_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_SumDiv_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_SumDiv_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_SumDiv_verlaufOffset endif to_index = to_index + @txtr_SumDiv*txtr_v_verlauf*textureSumDiv endif if (@txtr_MLAB!= 0) float txtrB_ux = 0.0 float txtrB_uy = 0.0 float txtrB_scax = 0.0 float txtrB_scay = 0.0 float txtrB_ax = 0.0 float txtrB_ay = 0.0 float txtrB_mx = 0.0 float txtrB_my = 0.0 float txtrB_mr = 0.0 int txtrB_i = 0 bool txtrB_done = false bool txtrB_ix = false bool txtrB_iy = false ;---------------------------------- complex zMLAB = _zz if (@txtr_MLAB_lattice == 0) zMLAB = zMLAB*@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 1) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 2) zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale*10) elseif (@txtr_MLAB_lattice == 3) zMLAB = zMLAB-trunc(@txtr_MLAB_scale/zMLAB) elseif (@txtr_MLAB_lattice == 4) zMLAB = zMLAB*@txtr_MLAB_scale + @txtr_MLAB_scale/zMLAB elseif (@txtr_MLAB_lattice == 5) zMLAB = round(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale elseif (@txtr_MLAB_lattice == 6) complex zp_MLAB = round(zMLAB*@txtr_MLAB_scale) complex zc_MLAB = zMLAB - (zp_MLAB/@txtr_MLAB_scale) if (round(imag(zp_MLAB))%3==0) zc_MLAB = (zc_MLAB + @txtr_MLAB_scale/2) if (abs(real(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif elseif (round(real(zp_MLAB))%3==1) zc_MLAB = (zc_MLAB - @txtr_MLAB_scale/2) if (abs(imag(zc_MLAB)) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif else zc_MLAB = (zc_MLAB*@txtr_MLAB_scale*2) if (imag(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale + zMLAB elseif (imag(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale + zMLAB elseif (real(zc_MLAB) > @txtr_MLAB_scale) zMLAB = zc_MLAB + @txtr_MLAB_scale - zMLAB elseif (real(zc_MLAB) < @txtr_MLAB_scale) zMLAB = zc_MLAB - @txtr_MLAB_scale - zMLAB endif endif endif ;zMLAB = zMLAB-trunc(zMLAB*@txtr_MLAB_scale)/@txtr_MLAB_scale if (@txtr_MLAB_size != 0 && @txtr_MLAB_size != 1) zMLAB = zMLAB/@txtr_MLAB_size endif if (@reachThrough) _zz = zMLAB endif float textureMLAB = 0 txtrB_ux = real(zMLAB)*@txtr_MLAB_scalo txtrB_uy = imag(zMLAB)*@txtr_MLAB_scalo txtrB_ax = floor(txtrB_ux) txtrB_ay = floor(txtrB_uy) txtrB_scax = .5 txtrB_scay = .5 while (!txtrB_done && txtrB_i < @txtr_MLAB_divi) txtrB_mx = txtrB_ax + txtrB_scax txtrB_my = txtrB_ay + txtrB_scay txtrB_mr = txtrB_mx * 3779 + txtrB_my * 9377 txtrB_mr = abs(sin(txtrB_mr)) * @txtr_MLAB_vari txtrB_mr = txtrB_mr - trunc(txtrB_mr) if (txtrB_mr < real(@txtr_MLAB_pro0)) txtrB_done = true else if (txtrB_mr < imag(@txtr_MLAB_pro0)) txtrB_scax = txtrB_scax / 2 txtrB_ix = true txtrB_iy = false elseif (txtrB_mr < real(@txtr_MLAB_pro1)) txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = true elseif (txtrB_mr < imag(@txtr_MLAB_pro1)) txtrB_scax = txtrB_scax / 2 txtrB_scay = txtrB_scay / 2 txtrB_ix = false txtrB_iy = false endif if (txtrB_ux > txtrB_mx) txtrB_ax = txtrB_mx endif if (txtrB_uy > txtrB_my) txtrB_ay = txtrB_my endif txtrB_i = txtrB_i + 1 endif endwhile if (txtrB_ix) txtrB_scay = txtrB_scay / 2 endif if (txtrB_iy) txtrB_scax = txtrB_scax / 2 endif txtrB_ax = abs(txtrB_ax - txtrB_ux) if (txtrB_ax > (txtrB_scax)) txtrB_ax = 2 * txtrB_scax - txtrB_ax endif txtrB_ay = abs(txtrB_ay - txtrB_uy) if (txtrB_ay > (txtrB_scay)) txtrB_ay = 2 * txtrB_scay - txtrB_ay endif if (txtrB_ax < txtrB_ay) txtrB_mx = txtrB_ax else txtrB_mx = txtrB_ay endif txtrB_my = 1 / (2 ^ (@txtr_MLAB_divi + 1) * @txtr_MLAB_scalo) txtrB_mr = txtrB_mx / txtrB_my if (txtrB_mr < @txtr_MLAB_edge) else if (txtrB_scax < txtrB_scay) txtrB_mr = txtrB_scax / txtrB_scay else txtrB_mr = txtrB_scay / txtrB_scax endif endif textureMLAB = txtrB_mr if (@txtr_MLAB_limit != 0) textureMLAB = textureMLAB%@txtr_MLAB_limit endif txtr_v_verlauf = 1 if (@f_MLAB_verlaufMode > 0) if (@f_MLAB_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MLAB_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MLAB_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MLAB_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MLAB_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MLAB_verlaufOffset endif to_index = to_index + @txtr_MLAB*txtr_v_verlauf*textureMLAB endif if (@txtr_Banana != 0) float txtrBana_d0 = 0.0 float txtrBana_d1 = 0.0 float txtrBana_ux = 0.0 float txtrBana_uy = 0.0 float txtrBana_sxa = 0.0 float txtrBana_sya = 0.0 float txtrBana_sxb = 0.0 float txtrBana_sxc = 0.0 float txtrBana_syb = 0.0 float txtrBana_syc = 0.0 float txtrBana_ax = 0.0 float txtrBana_ay = 0.0 float txtrBana_bx = 0.0 float txtrBana_by = 0.0 float txtrBana_ex = 0.0 float txtrBana_mx = 0.0 float txtrBana_my = 0.0 float txtrBana_mr = 0.0 int txtrBana_i = 0 bool txtrBana_done = false ;---------------------------------- complex zBanana = _zz if (@txtr_Banana_lattice == 0) zBanana = zBanana*@txtr_Banana_scale elseif (@txtr_Banana_lattice == 1) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 2) zBanana = zBanana-trunc(zBanana*@txtr_Banana_scale*10) elseif (@txtr_Banana_lattice == 3) zBanana = zBanana-trunc(@txtr_Banana_scale/zBanana) elseif (@txtr_Banana_lattice == 4) zBanana = zBanana*@txtr_Banana_scale + @txtr_Banana_scale/zBanana elseif (@txtr_Banana_lattice == 5) zBanana = round(zBanana*@txtr_Banana_scale)/@txtr_Banana_scale elseif (@txtr_Banana_lattice == 6) complex zp_Banana = round(zBanana*@txtr_Banana_scale) complex zc_Banana = zBanana - (zp_Banana/@txtr_Banana_scale) if (round(imag(zp_Banana))%3==0) zc_Banana = (zc_Banana + @txtr_Banana_scale/2) if (abs(real(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif elseif (round(real(zp_Banana))%3==1) zc_Banana = (zc_Banana - @txtr_Banana_scale/2) if (abs(imag(zc_Banana)) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif else zc_Banana = (zc_Banana*@txtr_Banana_scale*2) if (imag(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale + zBanana elseif (imag(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale + zBanana elseif (real(zc_Banana) > @txtr_Banana_scale) zBanana = zc_Banana + @txtr_Banana_scale - zBanana elseif (real(zc_Banana) < @txtr_Banana_scale) zBanana = zc_Banana - @txtr_Banana_scale - zBanana endif endif endif if (@txtr_Banana_size != 0 && @txtr_Banana_size != 1) zBanana = zBanana/@txtr_Banana_size endif if (@reachThrough) _zz = zBanana endif float textureBanana = 0 txtrBana_ux = real(zBanana)*@txtr_Banana_scalo txtrBana_uy = imag(zBanana)*@txtr_Banana_scalo txtrBana_ax = floor(txtrBana_ux) txtrBana_ay = floor(txtrBana_uy) txtrBana_bx = txtrBana_ax + 1 txtrBana_by = txtrBana_ay + 1 txtrBana_sxc = 1 txtrBana_sxa = real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa txtrBana_syc = 1 txtrBana_sya = imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya txtrBana_i = 0 while (!txtrBana_done && txtrBana_i < @txtr_Banana_divi) txtrBana_mx = txtrBana_ax + txtrBana_sxa txtrBana_my = txtrBana_ay + txtrBana_sya txtrBana_mr = txtrBana_mx * @txtr_Banana_seed0 + txtrBana_my * @txtr_Banana_seed1 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_mr = txtrBana_mr - trunc(txtrBana_mr) if (txtrBana_mr < real(@txtr_Banana_pro0)) ; -1- txtrBana_done = true else ; -1- if (txtrBana_mr < imag(@txtr_Banana_pro0)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa elseif (txtrBana_mr < real(@txtr_Banana_pro1)) if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya elseif (txtrBana_mr < imag(@txtr_Banana_pro1)) if (txtrBana_ux > txtrBana_mx) txtrBana_ax = txtrBana_mx txtrBana_sxc = txtrBana_sxb else txtrBana_bx = txtrBana_mx txtrBana_sxc = txtrBana_sxa endif txtrBana_sxa = txtrBana_sxc * real(@txtr_Banana_ratio) txtrBana_sxb = txtrBana_sxc - txtrBana_sxa if (txtrBana_uy > txtrBana_my) txtrBana_ay = txtrBana_my txtrBana_syc = txtrBana_syb else txtrBana_by = txtrBana_my txtrBana_syc = txtrBana_sya endif txtrBana_sya = txtrBana_syc * imag(@txtr_Banana_ratio) txtrBana_syb = txtrBana_syc - txtrBana_sya endif endif ; -1- txtrBana_i = txtrBana_i + 1 endwhile txtrBana_ax = abs(txtrBana_ax - txtrBana_ux) txtrBana_ex = 0 txtrBana_ay = abs(txtrBana_ay - txtrBana_uy) txtrBana_bx = abs(txtrBana_bx - txtrBana_ux) txtrBana_by = abs(txtrBana_by - txtrBana_uy) if (txtrBana_ay < txtrBana_ax) txtrBana_ax = txtrBana_ay txtrBana_ex = .2 endif if (txtrBana_bx < txtrBana_ax) txtrBana_ax = txtrBana_bx txtrBana_ex = .4 endif if (txtrBana_by < txtrBana_ax) txtrBana_ax = txtrBana_by txtrBana_ex = .6 endif if (txtrBana_ax < @txtr_Banana_edge/@txtr_Banana_scalo) if (@txtr_Banana_otre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 1) txtrBana_d0 = txtrBana_ex txtrBana_d1 = 1 elseif (@txtr_Banana_otre == 2) txtrBana_d0 = -1 txtrBana_d1 = 1 endif else if (@txtr_Banana_itre == 0) txtrBana_d0 = txtrBana_ax*@txtr_Banana_scalo/@txtr_Banana_edge txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 1) txtrBana_d0 = .8 txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 2) txtrBana_mr = txtrBana_mr * @txtr_Banana_seed0 txtrBana_mr = abs(sin(txtrBana_mr)) * @txtr_Banana_vari txtrBana_d0 = txtrBana_mr - trunc(txtrBana_mr) txtrBana_d1 = 1 elseif (@txtr_Banana_itre == 3) txtrBana_d0 = -1 txtrBana_d1 = 1 endif endif ;--------------------------------------- if (@txtr_Banana_type == 0) textureBanana = txtrBana_mr ; Polyominos elseif (@txtr_Banana_type >= 1 && @txtr_Banana_type <= 6) if (txtrBana_d0 < 0); Original #solid = true else if (txtrBana_d0 < txtrBana_d1) textureBanana = txtrBana_d0 / txtrBana_d1 else textureBanana = txtrBana_d1 / txtrBana_d0 endif endif if (@txtr_Banana_type == 2) ; Ori/Polyominos textureBanana = |textureBanana/txtrBana_mr| elseif (@txtr_Banana_type == 3) ; Ori + Polyominos textureBanana = |textureBanana + txtrBana_mr^2| elseif (@txtr_Banana_type == 4) ; Ori + InvPoly textureBanana = |textureBanana + 1/txtrBana_mr| elseif (@txtr_Banana_type == 5) ; Diff(Ori,Poly) textureBanana = |textureBanana - txtrBana_mr^2| elseif (@txtr_Banana_type == 6) ; ; Diff(Ori,InvPoly) textureBanana = |textureBanana - 1/txtrBana_mr^2| endif elseif (@txtr_Banana_type == 7) textureBanana = |txtrBana_d0 - txtrBana_d1|^2*txtrBana_mr ; Diff Banana elseif (@txtr_Banana_type == 8) textureBanana = |txtrBana_d1 / txtrBana_d0| ; Thoughtless endif if (@txtr_Banana_limit != 0) textureBanana = textureBanana%@txtr_Banana_limit endif txtr_v_verlauf = 1 if (@f_Banana_verlaufMode > 0) if (@f_Banana_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Banana_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Banana_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Banana_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Banana_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Banana_verlaufOffset endif to_index = to_index + @txtr_Banana*txtr_v_verlauf*textureBanana endif if (@txtr_Ell != 0) complex zElliptic = _zz if (@txtr_Ell_lattice == 0) zElliptic = zElliptic*@txtr_Ell_scale elseif (@txtr_Ell_lattice == 1) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 2) zElliptic = zElliptic-trunc(zElliptic*@txtr_Ell_scale*10) elseif (@txtr_Ell_lattice == 3) zElliptic = zElliptic-trunc(@txtr_Ell_scale/zElliptic) elseif (@txtr_Ell_lattice == 4) zElliptic = zElliptic*@txtr_Ell_scale + @txtr_Ell_scale/zElliptic elseif (@txtr_Ell_lattice == 5) zElliptic = round(zElliptic*@txtr_Ell_scale)/@txtr_Ell_scale elseif (@txtr_Ell_lattice == 6) complex zp_Ell = round(zElliptic*@txtr_Ell_scale) complex zc_Ell = zElliptic - (zp_Ell/@txtr_Ell_scale) if (round(imag(zp_Ell))%3==0) zc_Ell = (zc_Ell + @txtr_Ell_scale/2) if (abs(real(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif elseif (round(real(zp_Ell))%3==1) zc_Ell = (zc_Ell - @txtr_Ell_scale/2) if (abs(imag(zc_Ell)) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif else zc_Ell = (zc_Ell*@txtr_Ell_scale*2) if (imag(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale + zElliptic elseif (imag(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale + zElliptic elseif (real(zc_Ell) > @txtr_Ell_scale) zElliptic = zc_Ell + @txtr_Ell_scale - zElliptic elseif (real(zc_Ell) < @txtr_Ell_scale) zElliptic = zc_Ell - @txtr_Ell_scale - zElliptic endif endif endif if (@txtr_Ell_size != 0 && @txtr_Ell_size != 1) zElliptic = zElliptic/@txtr_Ell_size endif if (@reachThrough) _zz = zElliptic endif float textureElliptic = 0 complex EllipticZ = 0 float t_r = real(zElliptic) float t_i = imag(zElliptic) float t_rr = 0 float t_ii = 0 ; ; transformation ; if (@txtr_Ell_pseudo) ; ; calculate the temp real t_rr ; if (@txtr_Ell_c * t_r + @txtr_Ell_d == 0) ; don't divide by 0!! t_rr = @txtr_Ell_a * t_r + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_rr = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_rr = (@txtr_Ell_a * (t_r-t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_rr = (@txtr_Ell_a * (t_r+t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_rr = (@txtr_Ell_a * (t_r*t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_rr = (@txtr_Ell_a * (t_r^t_i)+ @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif else t_rr = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_r + @txtr_Ell_d) endif endif ; ; calculate the temp imag t_ii ; if (@txtr_Ell_c * t_i + @txtr_Ell_d == 0) ; don't divide by 0!! t_ii = @txtr_Ell_a * t_i + @txtr_Ell_b else if (@txtr_Ell_pseudoMix) if (@txtr_Ell_mixMode == 0) ; normal mix t_ii = (@txtr_Ell_a * t_r + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 1) ; diff mix t_ii = (@txtr_Ell_a * (t_i-t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 2) ; sum mix t_ii = (@txtr_Ell_a * (t_i+t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 3) ; prod mix t_ii = (@txtr_Ell_a * (t_i*t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) elseif (@txtr_Ell_mixMode == 4) ; prod mix t_ii = (@txtr_Ell_a * (t_i^t_r) + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif else t_ii = (@txtr_Ell_a * t_i + @txtr_Ell_b) / (@txtr_Ell_c * t_i + @txtr_Ell_d) endif endif EllipticZ = t_rr + 1i*t_ii else if (@txtr_Ell_c * zElliptic + @txtr_Ell_d == 0) ; don't divide by 0!! EllipticZ = @txtr_Ell_a * zElliptic + @txtr_Ell_b else EllipticZ = (@txtr_Ell_a * zElliptic + @txtr_Ell_b) / (@txtr_Ell_c * zElliptic + @txtr_Ell_d) endif endif if (@txtr_Ell_type == 0) textureElliptic = |EllipticZ-zElliptic| elseif (@txtr_Ell_type == 1) textureElliptic = |real(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 2) textureElliptic = |imag(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 3) textureElliptic = |atan(EllipticZ-zElliptic)| elseif (@txtr_Ell_type == 4) textureElliptic = atan2(EllipticZ-zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 5) textureElliptic = |EllipticZ/zElliptic| elseif (@txtr_Ell_type == 6) textureElliptic = |real(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 7) textureElliptic = |imag(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 8) textureElliptic = |atan(EllipticZ/zElliptic)| elseif (@txtr_Ell_type == 9) textureElliptic = atan2(EllipticZ/zElliptic)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 10) textureElliptic = |zElliptic/EllipticZ| elseif (@txtr_Ell_type == 11) textureElliptic = |real(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 12) textureElliptic = |imag(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 13) textureElliptic = |atan(zElliptic/EllipticZ)| elseif (@txtr_Ell_type == 14) textureElliptic = atan2(zElliptic/EllipticZ)/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif elseif (@txtr_Ell_type == 15) textureElliptic = |sin(zElliptic) + 1i*cos(EllipticZ)| elseif (@txtr_Ell_type == 16) textureElliptic = |real(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 17) textureElliptic = |imag(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 18) textureElliptic = |atan(sin(zElliptic) + 1i*cos(EllipticZ))| elseif (@txtr_Ell_type == 19) textureElliptic = atan2(sin(zElliptic) + 1i*cos(EllipticZ))/(2*#pi) if (textureElliptic < 0) textureElliptic = textureElliptic+1 endif endif if (@txtr_Ell_limit != 0) textureElliptic = textureElliptic%@txtr_Ell_limit endif ; here starts the verlauf! txtr_v_verlauf = 1 if (@f_Ell_verlaufMode > 0) if (@f_Ell_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Ell_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Ell_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Ell_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Ell_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Ell_verlaufOffset endif to_index = to_index + @txtr_Ell*txtr_v_verlauf*textureElliptic endif if (@txtr_MedialCut != 0) complex zMedialCut = _zz if (@txtr_MedialCut_lattice == 0) zMedialCut = zMedialCut*@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 1) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 2) zMedialCut = zMedialCut-trunc(zMedialCut*@txtr_MedialCut_scale*10) elseif (@txtr_MedialCut_lattice == 3) zMedialCut = zMedialCut-trunc(@txtr_MedialCut_scale/zMedialCut) elseif (@txtr_MedialCut_lattice == 4) zMedialCut = zMedialCut*@txtr_MedialCut_scale + @txtr_MedialCut_scale/zMedialCut elseif (@txtr_MedialCut_lattice == 5) zMedialCut = round(zMedialCut*@txtr_MedialCut_scale)/@txtr_MedialCut_scale elseif (@txtr_MedialCut_lattice == 6) complex zp_MedialCut = round(zMedialCut*@txtr_MedialCut_scale) complex zc_MedialCut = zMedialCut - (zp_MedialCut/@txtr_MedialCut_scale) if (round(imag(zp_MedialCut))%3==0) zc_MedialCut = (zc_MedialCut + @txtr_MedialCut_scale/2) if (abs(real(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif elseif (round(real(zp_MedialCut))%3==1) zc_MedialCut = (zc_MedialCut - @txtr_MedialCut_scale/2) if (abs(imag(zc_MedialCut)) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif else zc_MedialCut = (zc_MedialCut*@txtr_MedialCut_scale*2) if (imag(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale + zMedialCut elseif (imag(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale + zMedialCut elseif (real(zc_MedialCut) > @txtr_MedialCut_scale) zMedialCut = zc_MedialCut + @txtr_MedialCut_scale - zMedialCut elseif (real(zc_MedialCut) < @txtr_MedialCut_scale) zMedialCut = zc_MedialCut - @txtr_MedialCut_scale - zMedialCut endif endif endif if (@txtr_MedialCut_size != 0 && @txtr_MedialCut_size != 1) zMedialCut = zMedialCut/@txtr_MedialCut_size endif if (@reachThrough) _zz = zMedialCut endif float textureMedialCut = 0 float txtrMedCut_re1 = 0 float txtrMedCut_re2 = 0 float txtrMedCut_re3 = 0 float txtrMedCut_im1 = 0 float txtrMedCut_im2 = 0 float txtrMedCut_im3 = 0 float granulation = 1000*@txtr_MedialCut_calcScale zMedialCut = (round(zMedialCut*granulation)/granulation - round(zMedialCut*@txtr_MedialCut_calcScale)) * 1000 float txtrMedCut_reCalc = real(zMedialCut) float txtrMedCut_imCalc = imag(zMedialCut) txtrMedCut_re1 = trunc(txtrMedCut_reCalc/100) txtrMedCut_re2 = trunc(txtrMedCut_reCalc/10 - txtrMedCut_re1*10) txtrMedCut_re3 = trunc(txtrMedCut_reCalc/1 - txtrMedCut_re1*100 - txtrMedCut_re2*10) txtrMedCut_im1 = trunc(txtrMedCut_imCalc/100) txtrMedCut_im2 = trunc(txtrMedCut_imCalc/10 - txtrMedCut_im1*10) txtrMedCut_im3 = trunc(txtrMedCut_imCalc/1 - txtrMedCut_im1*100 - txtrMedCut_im2*10) float small = 0 float middl = 0 float large = 0 if (@txtr_MedialCut_type == 0) small = txtrMedCut_re1 middl = txtrMedCut_re2 large = txtrMedCut_re3 elseif (@txtr_MedialCut_type == 1) small = txtrMedCut_im1 middl = txtrMedCut_im2 large = txtrMedCut_im3 elseif (@txtr_MedialCut_type == 2) if (txtrMedCut_re1txtrMedCut_im1) small = txtrMedCut_re1 else small = txtrMedCut_im1 endif if (txtrMedCut_re2>txtrMedCut_im2) middl = txtrMedCut_re2 else middl = txtrMedCut_im2 endif if (txtrMedCut_re3>txtrMedCut_im3) large = txtrMedCut_re3 else large = txtrMedCut_im3 endif elseif (@txtr_MedialCut_type == 4) small = txtrMedCut_re1+txtrMedCut_im1 middl = txtrMedCut_re2+txtrMedCut_im2 large = txtrMedCut_re3+txtrMedCut_im3 elseif (@txtr_MedialCut_type == 5) small = txtrMedCut_re1*txtrMedCut_im1 middl = txtrMedCut_re2*txtrMedCut_im2 large = txtrMedCut_re3*txtrMedCut_im3 elseif (@txtr_MedialCut_type == 6) small = txtrMedCut_re1/txtrMedCut_im1 middl = txtrMedCut_re2/txtrMedCut_im2 large = txtrMedCut_re3/txtrMedCut_im3 elseif (@txtr_MedialCut_type == 7) small = txtrMedCut_im1/txtrMedCut_re1 middl = txtrMedCut_im2/txtrMedCut_re2 large = txtrMedCut_im3/txtrMedCut_re3 elseif (@txtr_MedialCut_type == 8) small = abs(txtrMedCut_im1-txtrMedCut_re1) middl = abs(txtrMedCut_im2-txtrMedCut_re2) large = abs(txtrMedCut_im3-txtrMedCut_re3) endif ; prevent those numbers from being zero: small = small + @txtr_MedialCut_smooth middl = middl + @txtr_MedialCut_smooth large = large + @txtr_MedialCut_smooth ;Golden Cut: small/large = large/whole float sm_mi = abs(small/middl) float mi_la = abs(middl/large) if (@txtr_MedialCut_watch == 0) textureMedialCut = abs(sm_mi-mi_la) elseif (@txtr_MedialCut_watch == 1) if (sm_mimi_la) textureMedialCut = sm_mi else textureMedialCut = mi_la endif elseif (@txtr_MedialCut_watch == 3) textureMedialCut = sm_mi + mi_la elseif (@txtr_MedialCut_watch == 4) textureMedialCut = 1/sm_mi + 1/mi_la elseif (@txtr_MedialCut_watch == 5) textureMedialCut = abs(1/sm_mi - 1/mi_la) endif if (@txtr_MedialCut_limit != 0) textureMedialCut = textureMedialCut%@txtr_MedialCut_limit endif txtr_v_verlauf = 1 if (@f_MedialCut_verlaufMode > 0) if (@f_MedialCut_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_MedialCut_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_MedialCut_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_MedialCut_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_MedialCut_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_MedialCut_verlaufOffset endif to_index = to_index + @txtr_MedialCut*txtr_v_verlauf*textureMedialCut endif if (@txtr_Truchet != 0) complex zTruchet = _zz if (@txtr_Truchet_lattice == 0) zTruchet = zTruchet*@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 1) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 2) zTruchet = zTruchet-trunc(zTruchet*@txtr_Truchet_scale*10) elseif (@txtr_Truchet_lattice == 3) zTruchet = zTruchet-trunc(@txtr_Truchet_scale/zTruchet) elseif (@txtr_Truchet_lattice == 4) zTruchet = zTruchet*@txtr_Truchet_scale + @txtr_Truchet_scale/zTruchet elseif (@txtr_Truchet_lattice == 5) zTruchet = round(zTruchet*@txtr_Truchet_scale)/@txtr_Truchet_scale elseif (@txtr_Truchet_lattice == 6) complex zp_Truchet = round(zTruchet*@txtr_Truchet_scale) complex zc_Truchet = zTruchet - (zp_Truchet/@txtr_Truchet_scale) if (round(imag(zp_Truchet))%3==0) zc_Truchet = (zc_Truchet + @txtr_Truchet_scale/2) if (abs(real(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif elseif (round(real(zp_Truchet))%3==1) zc_Truchet = (zc_Truchet - @txtr_Truchet_scale/2) if (abs(imag(zc_Truchet)) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif else zc_Truchet = (zc_Truchet*@txtr_Truchet_scale*2) if (imag(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale + zTruchet elseif (imag(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale + zTruchet elseif (real(zc_Truchet) > @txtr_Truchet_scale) zTruchet = zc_Truchet + @txtr_Truchet_scale - zTruchet elseif (real(zc_Truchet) < @txtr_Truchet_scale) zTruchet = zc_Truchet - @txtr_Truchet_scale - zTruchet endif endif endif if (@reachThrough) _zz = zTruchet endif float textureTruchet = 0 if (@txtr_Truchet_fixit == 1) ; Minimum textureTruchet = 1.0e20 elseif (@txtr_Truchet_fixit == 2) ; Maximum textureTruchet = -1.0e20 endif complex zcTruchet = 0 complex zzTruchet = 0 complex crTruchet = 0 float truchD1 = 0 float truchD2 = 0 complex truchCorteX = @txtr_Truchet_corte + 1i*@txtr_Truchet_corte complex truchCorteY = @txtr_Truchet_corte - 1i*@txtr_Truchet_corte float reZZTRUCHET = 0 float imZZTRUCHET = 0 int truch_i = 0 while (truch_i < @txtr_Truchet_Iters) if (@txtr_Truchet_size != 0 && @txtr_Truchet_size != 1) zTruchet = zTruchet/@txtr_Truchet_size endif zTruchet = zTruchet*exp(1i*pi/180*@txtr_Truchet_rot) if (truch_i > 0) zTruchet = zTruchet*@txtr_Truchet_mst^truch_i ; *exp(1i*(truch_i)*180/pi*@txtr_Truchet_rotst) endif zcTruchet = round(zTruchet) zzTruchet = zTruchet - zcTruchet reZZTRUCHET = real(zzTruchet) imZZTRUCHET = imag(zzTruchet) crTruchet = 2*(@txtr_Truchet_seed/(zcTruchet+124+truch_i) - \ round(@txtr_Truchet_seed/(zcTruchet+124+truch_i))) if real(crTruchet) > 0 if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteX)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteX)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET - imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET - imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) -@txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) + abs(imZZTRUCHET) +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(imZZTRUCHET + @txtr_Truchet_corte) endif endif else if (@txtr_Truchet_mode == 0) truchD1 = abs(cabs(zzTruchet+truchCorteY)-@txtr_Truchet_corte) truchD2 = abs(cabs(zzTruchet-truchCorteY)-@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 1) truchD1 = abs(reZZTRUCHET + imZZTRUCHET -@txtr_Truchet_corte) truchD2 = abs(reZZTRUCHET + imZZTRUCHET +@txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 2) truchD1 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) - @txtr_Truchet_corte) truchD2 = abs(abs(reZZTRUCHET) - abs(imZZTRUCHET) + @txtr_Truchet_corte) elseif (@txtr_Truchet_mode == 3) if abs(reZZTRUCHET) < abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 4) if abs(reZZTRUCHET) > abs(imZZTRUCHET) truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 5) if abs(reZZTRUCHET-imZZTRUCHET) < @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif elseif (@txtr_Truchet_mode == 6) if reZZTRUCHET-imZZTRUCHET > @txtr_Truchet_corte truchD1 = abs(-reZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-reZZTRUCHET + @txtr_Truchet_corte) else truchD1 = abs(-imZZTRUCHET - @txtr_Truchet_corte) truchD2 = abs(-imZZTRUCHET + @txtr_Truchet_corte) endif endif endif if truchD2 < truchD1 if (@txtr_Truchet_watch == 0) truchD1 = truchD2 elseif (@txtr_Truchet_watch == 1) truchD1 = abs(truchD1-truchD2) elseif (@txtr_Truchet_watch == 2) truchD1 = |truchD1-truchD2| elseif (@txtr_Truchet_watch == 3) truchD1 = (truchD1+truchD2)/2 elseif (@txtr_Truchet_watch == 4) truchD1 = truchD1/truchD2 endif endif truch_i = truch_i + 1 if (@txtr_Truchet_fixit == 0) ; last textureTruchet = truchD1 elseif (@txtr_Truchet_fixit == 1) ; min if (textureTruchet > truchD1) textureTruchet = abs(truchD1 - 1/(2^truch_i)) endif elseif (@txtr_Truchet_fixit == 2) ; max if (textureTruchet < truchD1) textureTruchet = truchD1 + 1/(2^truch_i) endif elseif (@txtr_Truchet_fixit == 3) ; sum textureTruchet = textureTruchet + truchD1 elseif (@txtr_Truchet_fixit == 4) ; w-sum textureTruchet = textureTruchet + truchD1/truch_i elseif (@txtr_Truchet_fixit == 5) ; g-sum textureTruchet = textureTruchet + truchD1/(2^truch_i) endif endwhile ; truch_i < @txtr_Truchet_Iters if (@txtr_Truchet_limit != 0) textureTruchet = textureTruchet%@txtr_Truchet_limit endif txtr_v_verlauf = 1 if (@f_Truchet_verlaufMode > 0) if (@f_Truchet_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_Truchet_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_Truchet_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_Truchet_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_Truchet_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_Truchet_verlaufOffset endif to_index = to_index + @txtr_Truchet^@txtr_Truchet_thick*txtr_v_verlauf*textureTruchet endif if (@txtr_GCD != 0) complex zGCD = _zz if (@txtr_GCD_lattice == 0) zGCD = zGCD*@txtr_GCD_scale elseif (@txtr_GCD_lattice == 1) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 2) zGCD = zGCD-trunc(zGCD*@txtr_GCD_scale*10) elseif (@txtr_GCD_lattice == 3) zGCD = zGCD-trunc(@txtr_GCD_scale/zGCD) elseif (@txtr_GCD_lattice == 4) zGCD = zGCD*@txtr_GCD_scale + @txtr_GCD_scale/zGCD elseif (@txtr_GCD_lattice == 5) zGCD = round(zGCD*@txtr_GCD_scale)/@txtr_GCD_scale elseif (@txtr_GCD_lattice == 6) complex zp_GCD = round(zGCD*@txtr_GCD_scale) complex zc_GCD = zGCD - (zp_GCD/@txtr_GCD_scale) if (round(imag(zp_GCD))%3==0) zc_GCD = (zc_GCD + @txtr_GCD_scale/2) if (abs(real(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif elseif (round(real(zp_GCD))%3==1) zc_GCD = (zc_GCD - @txtr_GCD_scale/2) if (abs(imag(zc_GCD)) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif else zc_GCD = (zc_GCD*@txtr_GCD_scale*2) if (imag(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale + zGCD elseif (imag(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale + zGCD elseif (real(zc_GCD) > @txtr_GCD_scale) zGCD = zc_GCD + @txtr_GCD_scale - zGCD elseif (real(zc_GCD) < @txtr_GCD_scale) zGCD = zc_GCD - @txtr_GCD_scale - zGCD endif endif endif if (@reachThrough) _zz = zGCD endif float textureGCD = 0 if (@txtr_GCD_fixit == 1) ; Minimum textureGCD = 1.0e20 elseif (@txtr_GCD_fixit == 2) ; Maximum textureGCD = -1.0e20 endif float granulation = 1000*@txtr_GCD_calcScale float reGCD = 0 float imGCD = 0 float __gcd = 0 float __chk = 0 float rGCD = 0 int gcd_i = 0 while (gcd_i < @txtr_GCD_Iters) if (@txtr_GCD_size != 0 && @txtr_GCD_size != 1) zGCD = zGCD/@txtr_GCD_size endif zGCD = (round(zGCD*granulation)/granulation - round(zGCD*@txtr_GCD_calcScale)) * 1000 reGCD = abs(real(zGCD)) imGCD = abs(imag(zGCD)) __chk = 2 while (__chk > 1) __gcd = round(reGCD/imGCD) __chk = reGCD - __gcd*imGCD if (__chk > 1) reGCD = imGCD imGCD = __gcd endif endwhile __gcd = __gcd + @txtr_GCD_smooth __chk = __chk + @txtr_GCD_smooth if (@txtr_GCD_watch == 0) ; gcd rGCD = __gcd elseif (@txtr_GCD_watch == 1) ; MinQ GCD/Iter if (__gcd < gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 2) ; MaxQ GCD/Iter if (__gcd > gcd_i) rGCD = __gcd/gcd_i else rGCD = gcd_i/__gcd endif elseif (@txtr_GCD_watch == 3) ; DCG+Reti rGCD = 1/__gcd + 1/gcd_i elseif (@txtr_GCD_watch == 4) ; DCG-Reti rGCD = abs(1/__gcd - 1/gcd_i) elseif (@txtr_GCD_watch == 5) ; CHK rGCD = __chk elseif (@txtr_GCD_watch == 6) ; MinQ CHK/Iter if (__chk < gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 7) ; MaxQ CHK/Iter if (__chk > gcd_i) rGCD = __chk/gcd_i else rGCD = gcd_i/__chk endif elseif (@txtr_GCD_watch == 8) ; CHK+Iter rGCD = __chk + gcd_i elseif (@txtr_GCD_watch == 9) ; KHC+Reti rGCD = 1/__chk + 1/gcd_i elseif (@txtr_GCD_watch == 10) ; KHC-Reti rGCD = abs(1/__chk - 1/gcd_i) elseif (@txtr_GCD_watch == 11) ; MinQ CHK/GCD if (__chk < __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 12) ; MaxQ CHK/GCD if (__chk > __gcd) rGCD = __chk/__gcd else rGCD = __gcd/__chk endif elseif (@txtr_GCD_watch == 13) ; CHK+GCD rGCD = __chk + __gcd elseif (@txtr_GCD_watch == 14) ; KHC+DCG rGCD = 1/__chk + 1/__gcd elseif (@txtr_GCD_watch == 15) rGCD = abs(1/__chk - 1/__gcd) ; KHC-DCG endif gcd_i = gcd_i + 1 if (@txtr_GCD_fixit == 0) ; last textureGCD = rGCD elseif (@txtr_GCD_fixit == 1) ; min if (textureGCD > rGCD) textureGCD = rGCD ; abs(rGCD - 1/(2^gcd_i)) endif elseif (@txtr_GCD_fixit == 2) ; max if (textureGCD < rGCD) textureGCD = rGCD ; + 1/(2^gcd_i) endif elseif (@txtr_GCD_fixit == 3) ; sum textureGCD = textureGCD + rGCD elseif (@txtr_GCD_fixit == 4) ; w-sum textureGCD = textureGCD + rGCD/gcd_i elseif (@txtr_GCD_fixit == 5) ; g-sum textureGCD = textureGCD + rGCD/(2^gcd_i) endif endwhile ; gcd_i < @txtr_GCD_Iters if (@txtr_GCD_limit != 0) textureGCD = textureGCD%@txtr_GCD_limit endif txtr_v_verlauf = 1 if (@f_GCD_verlaufMode > 0) if (@f_GCD_verlaufMode == 1) ; Bottom to Top if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 0 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_yPos-txtr_v_bot)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 2) ; Top to Bottom if (txtr_v_yPos<=txtr_v_bot) txtr_v_verlauf = 1 elseif (txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 3) ; Between Top&Bottom float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 0 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_top-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 4) ; Mirror TB float txtr_v_center = (txtr_v_top+txtr_v_bot)/2 if (txtr_v_yPos<=txtr_v_bot || txtr_v_yPos>=txtr_v_top) txtr_v_verlauf = 1 elseif (txtr_v_yPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_yPos)/txtr_v_height endif elseif (@f_GCD_verlaufMode == 5) ; Left to Right if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 0 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 else txtr_v_verlauf = (txtr_v_xPos-txtr_v_left)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 6) ; Right to Left if (txtr_v_xPos<=txtr_v_left) txtr_v_verlauf = 1 elseif (txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 else txtr_v_verlauf = (txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 7) ; Between Left&Right float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 0 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_rigt-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 8) ; Mirror LR float txtr_v_center = (txtr_v_rigt+txtr_v_left)/2 if (txtr_v_xPos<=txtr_v_left || txtr_v_xPos>=txtr_v_rigt) txtr_v_verlauf = 1 elseif (txtr_v_xPostxtr_v_center) ; above center txtr_v_verlauf = 2*(txtr_v_center-txtr_v_xPos)/txtr_v_width endif elseif (@f_GCD_verlaufMode == 9) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 0 else txtr_v_verlauf = 1-txtr_v_dist_pnt/txtr_v_dist_out endif elseif (@f_GCD_verlaufMode == 10) ; Circle 1 float txtr_v_dist_out = cabs(@txtr_verlauf_Line1-@txtr_verlauf_Line2) float txtr_v_dist_pnt = cabs(@txtr_verlauf_Line1-#pixel) if (txtr_v_dist_pnt >= txtr_v_dist_out) txtr_v_verlauf = 1 else txtr_v_verlauf = txtr_v_dist_pnt/txtr_v_dist_out endif endif ; @f_GCD_verlaufMode txtr_v_verlauf = abs(txtr_v_verlauf) if (@txtr_verlauf_exponent != 1) txtr_v_verlauf = txtr_v_verlauf^@txtr_verlauf_exponent endif txtr_v_verlauf = txtr_v_verlauf + @f_GCD_verlaufOffset endif to_index = to_index + @txtr_GCD*txtr_v_verlauf*textureGCD endif #index = to_index endif ; no_mask default: title = "T GCD" param type caption = "GCD Type" default = 0 enum = "GCD,Iter" "DCG,Reti" "CHK,Iter" "KHC,Reti" "GCD,CHK" "DCG,KHC" endparam param scale caption = "Kind of Scale" default = 0.03 min = 0 endparam param smooth caption = "Smooth" default = 1e-10 min = 0.0 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param watch caption = "Watch for Fixit" enum = "Real" "Imag" "Magn" "Diff" \ "Min(r,i)" "Max(r,i)" "MinQuot" "MaxQuot" "Diff2" \ "Astro01" "Astro02" "Astro03" "Astro12" "Astro21" \ "Astro31" "Astro13" "Astro32" "Astro23" \ "Re+Im" "Re*Im" default = 2 endparam param fixit caption = "Fixit for Color by" enum = "Last" "Minimum" "Maximum" "Sum" \ "W-Sum" "W^2-Sum" "WR-Sum" \ "G-Sum" "G'-Sum" "AG-Sum" \ "L-Sum" "LW-Sum" "LW^2-Sum" default = 1 endparam param disturbFixFactor caption = "Fixit-Disturbance" default = 0.0 hint = "Disturbs the Fixit for Color By..." endparam param disturbMode caption = "Disturb Fixit Mode" enum = "Log" "Sqrt" "Lin" "Sqr" "AlterGeom" "Geom" "Const" "1/Magn" "1/Real" "1/Imag" "Magn" "Real" "Imag" "1/Diff" "Diff" 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" \ "Iterations" default = 0 endparam param numIterMode caption = "Fix Iterations" enum = "Normal" "#Numiter always" "Relative" "Difference" \ "Rel. Diff." "Average" 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 startDistortion caption = "Start Distortion" enum = "#z" "Transformed z" "Pixel" "Mixel" default = 0 endparam param minMax caption = "Min/Max" default = FALSE endparam param xWaveMode caption = "x-Wave Mode" enum = "None" "x*sin(x)" "x*cos(x)" "x*sin(y)" "x*cos(y)" default = 0 endparam param yWaveMode caption = "y-Wave Mode" enum = "None" "y*sin(y)" "y*cos(y)" "y*sin(x)" "y*cos(x)" default = 0 endparam param xWaveFreq caption = "x-Wave Frequency" default = 1.0 endparam param yWaveFreq caption = "y-Wave Frequencx" default = 1.0 endparam param xWaveWeight caption = "x-Wave Weight" default = 1.0 endparam param yWaveWeight caption = "y-Wave Weight" default = 1.0 endparam param xWaveConst caption = "x-Wave Const" default = 0.0 endparam param yWaveConst caption = "y-Wave Const" default = 0.0 endparam param xWaveOffset caption = "x-Wave Offset" default = 0.0 endparam param yWaveOffset caption = "y-Wave Offset" default = 0.0 endparam param xWaveExp caption = "x-Wave Exponent" default = 1.0 endparam param yWaveEyp caption = "y-Wave Eyponent" default = 1.0 endparam param wavesLoop caption = "# Waves Loops" default = 1 min = 1 endparam param wavesLoopMode caption = "Mode Waves Loops" enum = "Static" "Dynamic" default = 0 endparam param wavesGrowFreq caption = "Waves: FreqGrowth" default = 1.0 min = 1e-99 endparam param rotDegree caption = "Degré de Rotation" default = 0.0 min = -359.99999 max = 359.99999 hint = "Does not work with Color by Fiximum Distance" endparam param rotCentre caption = "Centre de Rotation" default = (0.0,0.0) endparam param zJouk caption = "Joukowskij: Constant" default = (0.0,0.0) endparam param vectorJouk caption = "Joukowskij: Vector " default = (0.0,0.0) endparam param curveJouk caption = "Joukowskij Curvature" default = (0.0,0.0) endparam param coord caption = "Coordinates" enum = "Rectangular" \ "Polar" "PolarH" "aPolar" "aPolarH" \ "sin/cos" "sinh/cosh" "asin/acos" "asinh/acosh" \ "z/inv(z)" "z/conj(z)" "z/flip(z)" \ "?sin/cos" "?sin/i*cos" "?asin/acos" "?asin/i*acos" \ "?sinh/cosh" "?sinh/i*cosh" "?asinh/acosh" "?asinh/i*acosh" default = 0 endparam param coordLoop caption = "# Coord Loops" default = 1 min = 1 endparam param coordMode caption = "Mode Coord Loop" enum = "Static" "Dynamic" default = 0 endparam param lattice caption = "Lattice Type" enum = "None" \ "round" "trunc" "floor" "ceil" "abs" \ "r-round" "r-trunc" "r-floor" "r-ceil" "r-abs" \ "round^2" "trunc^2" "floor^2" "ceil^2" "abs^2" \ "r-round^2" "r-trunc^2" "r-floor^2" "r-ceil^2" "r-abs^2" \ "Modulo" "Mod Quot" "Mod Inv" "Hex" 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 lattOffset caption = "Lattice Offset" default = (0.0,0.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 globalScale caption = "Global Scale" default = 0.0 min = 0.0 endparam param globalDither caption = "L: Global Dither (GD) Scale" default = 0.0 hint = "Choose 1, 10, 50, 100 as experimental values and then start fine tuning." endparam param shape caption = "L: GD: Shape" enum = "None" "Circle" "Real" "Imag" "Diamond" "Skew" \ "!Circle" "!Real" "!Imag" "!Diamond" "!Skew" endparam param radius caption = "L: GD: Radius for Shapes" default = 0.5 endparam param inner_scale caption = "L: GD: Inner Scale" default = 3.0 hint = "Choose 1, 10, 50, 100 as experimental values \ and then start fine tuning." endparam param inner_amount caption = "L: GD: Inner Amount" default = 0.0 endparam param d_randomness caption = "L: GD-Randomness" hint = "This adds a randomness in the outlines." default = 0.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 turnScaleMode caption = "L: ScaleMode Turnaround" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Turnaround Scale > 0" endparam param corte1 caption = "L: Turnaround #1" default = 4.0 endparam param corte2 caption = "L: Turnaround #2" default = 2.0 endparam param barnMode caption = "L: Barnsley Mode" enum = "None" "First" "Second" default = 0 endparam param barnScale caption = "L: Barnsley Scale" default = 0.0 min = 0.0 endparam param barnScaleMode caption = "L: ScaleMode Barnsley" enum = "Round" "Magn1" "Magn2" default = 0 hint = "Effective only with Barnsley Scale > 0" endparam param barnSeed caption = "L: Barnsley Seed" default = (0.6, 1.1) endparam param barnShift caption = "L: Barnsley Shift" default = 1.0 endparam param disturb_fbm caption = "L: Noise Strength" default = 0.0 min = 0.0 endparam param disturb_fbm_mode caption = "L: Noise Mode" enum = "Sum only" "Angle only" "fBm Pixel only" \ "fBm Pix*Sum" \ "fBm Pixel added" "fBm Pixel W-added" "fBm Pix*Sum added" \ "fBm Pix*Sum W-added" \ "fBm Pix*Angle" "fBm Pix*Angle added" "fBm Pix*Angle W-added" "fBm Pix*Angle Avg" default = 0 endparam param disturb_fbm_apply caption = "L: Noise Apply" enum = "Pixel" "Fixit" default = 0 endparam param disturb_fbm_scale caption = "L: Noise Scale" default = 1.0 endparam param disturb_fbm_octaves caption = "L: Noise Loops" default = 9 endparam param disturb_fbm_lattice caption = "L: Noise Lattice" default = false endparam param l_randomness caption = "L: Randomness" hint = "This adds a randomness in the outlines." default = 0.0 endparam param txtr_verlauf_Line1 caption = "T: Bottom, Left, or Center" default = (0.0,0.0) hint = "First line for growth calculation. Might be the bottom in TB mode, \ might be the left border in LR mode, IS the center in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Line2 caption = "T: Top, Right, or Radius" default = (1.0,1.0) hint = "Second line for growth calculation. Might be the top in TB mode, \ might be the right border in LR mode, IS the radius in circle mode. \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_exponent caption = "T: Txtr Exponent" default = 1.5 hint = "Choose 1 for linear growth, 1.5-2 for (smoother) *quadratic* growth, \ other values to your free fun experiments... \ This is a global setting for all textures using *Verlauf*." endparam param txtr_verlauf_Rot caption = "T: Txtr Rotation" default = 0.0 min = -45.0 max = 45.0 endparam param txtr_verlauf_RotCentre caption = "T: Txtr Rot Centre" default = (0.0, 0.0) endparam param f_randomness caption = "T: Random Texture" hint = "This adds a random texture the the coloring." default = 0.0 endparam param f_rand_verlaufMode caption = "T: Random Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 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 f_Gnarl_verlaufMode caption = "T: Gnarl Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gnarl_verlaufOffset caption = "T: Gnarl V-Offset" default = 0.0 min = 0.0 endparam param txtr_gnarl_lattice caption = "T: Gnarl Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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_octaves caption = "T: Gnarl Octaves" default = 5 min = 1 endparam param txtr_gnarl_limit caption = "T: Gnarl Limitation" default = 0.0 min = 0.0 endparam param txtr_PopCorn caption = "T: PopCorn Texture" hint = "This adds a PopCorn texture the the coloring." default = 0.0 endparam param f_PopCorn_verlaufMode caption = "T: PopCorn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_PopCorn_verlaufOffset caption = "T: PopCorn V-Offset" default = 0.0 min = 0.0 endparam param txtr_PopCorn_lattice caption = "T: PopCorn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_SFBM_verlaufMode caption = "T: SFBM Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SFBM_verlaufOffset caption = "T: SFBM V-Offset" default = 0.0 min = 0.0 endparam param txtr_SFBM_lattice caption = "T: SFBM Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Primes_verlaufMode caption = "T: Primes Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Primes_verlaufOffset caption = "T: Primes V-Offset" default = 0.0 min = 0.0 endparam param txtr_Primes_lattice caption = "T: Primes Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 f_Gauss_verlaufMode caption = "T: Gauss Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Gauss_verlaufOffset caption = "T: Gauss V-Offset" default = 0.0 min = 0.0 endparam param txtr_Gauss_lattice caption = "T: Gauss Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 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 txtr_Turn caption = "T: Turn Texture" hint = "This adds a Turn texture to the coloring." default = 0.0 endparam param f_Turn_verlaufMode caption = "T: Turn Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Turn_verlaufOffset caption = "T: Turn V-Offset" default = 0.0 min = 0.0 endparam param txtr_Turn_lattice caption = "T: Turn Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Turn_scale caption = "T: Turn Scale" hint = "Scaling Factor for this Turn texture." default = 1.0 endparam param txtr_Turn_size caption = "T: Turn Pattern Size" default = 1.0 endparam param txtr_Turn_limit caption = "T: Turn Limitation" default = 0.0 min = 0.0 endparam param txtr_Turn_corte1 caption = "T: Turnaround #1" default = 4.0 endparam param txtr_Turn_corte2 caption = "T: Turnaround #2" default = 2.0 endparam param txtr_Check caption = "T: Checker Texture" hint = "This adds a Check texture to the coloring." default = 0.0 endparam param f_Check_verlaufMode caption = "T: Checker Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Check_verlaufOffset caption = "T: Checker V-Offset" default = 0.0 min = 0.0 endparam param txtr_Check_scale caption = "T: Checker Scale" hint = "Scaling Factor for this Check texture." default = 1.0 endparam param txtr_Checker caption = "T: Checker Modulus" default = 2 min = 2 endparam param txtr_Check_test caption = "T: Checker Test Mode" enum = "Sum" "Prod" default = 1 endparam param txtr_Check_shape caption = "T: Checker Shape" enum = "Square" "Circle" \ "Square in Circle" "Circle in Square" \ "Segment" "Time" \ "H Bricks" "V Bricks" \ "I Ging" "I Went" \ "Broken Circle" \ "Cross" "Anti-Cross" \ "Bite" "Anti-Bite" "Mooon" "Trianguli" "Nose" \ "Broken Square" "BonBon" "Quizzle" "Hipster" "Broken Net" \ "New Moon" "Ti Moon" "Moon and Venus" "Venus and Moon" \ "Smiley" "Inv Smiley" "Frowney" "Inv Frowney" default = 0 endparam param txtr_Check_shConst caption = "T: Chk-Sh-Const" default = 1.0 endparam param txtr_Check_col caption = "T: Checker Color Mode" enum = "Flag" "Magn" "Iter" "Magn*Iter" "Dist Center" default = 0 endparam param txtr_Check_invert caption = "T: Inverse Checkers?" default = false endparam param txtr_Check_divide caption = "T: Divide Checkers?" enum = "None" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" default = 0 endparam param txtr_Check_limit caption = "T: Checker Limitation" default = 0.0 min = 0.0 endparam param txtr_Pick153 caption = "T: Pick153 Texture" hint = "This adds a Pick153 texture to the coloring." default = 0.0 endparam param f_Pick153_verlaufMode caption = "T: Pick153 Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Pick153_verlaufOffset caption = "T: Pick153 V-Offset" default = 0.0 min = 0.0 endparam param txtr_Pick153_lattice caption = "T: Pick153 Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Pick153_scale caption = "T: Pick153 Scale" hint = "Scaling Factor for this Pick153 texture." default = 1.0 endparam param txtr_scale153 caption = "T: Calc Scale 153" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_numOfTestsPick153 caption = "T: Pick153 Tests" hint = "Pick153 texture." default = 1 endparam param txtr_Pick153_col caption = "T: Pick153 Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_Pick153_limit caption = "T: Pick153 Limitation" default = 0.0 min = 0.0 endparam param txtr_SumDiv caption = "T: SumDiv Texture" hint = "This adds a SumDiv texture to the coloring." default = 0.0 endparam param f_SumDiv_verlaufMode caption = "T: SumDiv Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_SumDiv_verlaufOffset caption = "T: SumDiv V-Offset" default = 0.0 min = 0.0 endparam param txtr_SumDiv_lattice caption = "T: SumDiv Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_SumDiv_scale caption = "T: SumDiv Scale" hint = "Scaling Factor for this SumDiv texture." default = 1.0 endparam param txtr_scaleSumDiv caption = "T: SumDiv Pattern Size" hint = "Scaling Factor for Calculation." default = 1.0 endparam param txtr_SumDiv_col caption = "T: SumDiv Color Mode" enum = "Real" "Imag" "Sum" "Abs Sum" "Diff" "Min" "Max" "MinQuot" "MaxQuot" "Prod" "Prod/Sum" "11" "12" "13" default = 2 endparam param txtr_SumDiv_mode caption = "T: SumDiv Calc Mode" enum = "Sum" "Quot" default = 0 endparam param txtr_SumDiv_limit caption = "T: SumDiv Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB caption = "T: MLAB Texture" hint = "This adds a MLAB texture to the coloring." default = 0.0 endparam param f_MLAB_verlaufMode caption = "T: MLAB Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MLAB_verlaufOffset caption = "T: MLAB V-Offset" default = 0.0 min = 0.0 endparam param txtr_MLAB_lattice caption = "T: MLAB Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MLAB_scale caption = "T: MLAB Scale" hint = "Scaling Factor for this MLAB texture." default = 1.0 endparam param txtr_MLAB_size caption = "T: MLAB Pattern Size" default = 1.0 endparam param txtr_MLAB_limit caption = "T: MLAB Limitation" default = 0.0 min = 0.0 endparam param txtr_MLAB_scalo caption = "T: MLAB CalcScale" default = 1.0 endparam param txtr_MLAB_divi caption = "T: MLAB Divisions" default = 4 endparam param txtr_MLAB_edge caption = "T: MLAB Edge" default = .8 endparam param txtr_MLAB_pro0 caption = "T: MLAB Prob-ty 0" default = (.25, .5) endparam param txtr_MLAB_pro1 caption = "T: MLAB Prob-ty 1" default = (.75, 1) endparam param txtr_MLAB_vari caption = "T: MLAB Variance" default = 1024.0 endparam param txtr_Banana caption = "T: Banana Texture" hint = "This adds a Banana texture to the coloring." default = 0.0 endparam param txtr_Banana_type caption = "T: Banana Type" enum = "Polyominos" \ "Original" "Ori/Polyominos" "Ori + Polyominos" "Ori + InvPoly" \ "Diff(Ori,Poly)" "Diff(Ori,InvPoly)" \ "Diff Banana" "Thoughtless" default = 1 endparam param f_Banana_verlaufMode caption = "T: Banana Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Banana_verlaufOffset caption = "T: Banana V-Offset" default = 0.0 min = 0.0 endparam param txtr_Banana_lattice caption = "T: Banana Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Banana_scale caption = "T: Banana Scale" hint = "Scaling Factor for this Banana texture." default = 1.0 endparam param txtr_Banana_size caption = "T: Banana Pattern Size" default = 1.0 endparam param txtr_Banana_limit caption = "T: Banana Limitation" default = 0.0 min = 0.0 endparam param txtr_Banana_scalo caption = "T: Banana CalcScale" default = 1.0 endparam param txtr_Banana_divi caption = "T: Banana Divisions" default = 4 endparam param txtr_Banana_ratio caption = "T: Ratio" default = (.5, .5) endparam param txtr_Banana_edge caption = "T: Banana Edge" default = .8 endparam param txtr_Banana_itre caption = "T: Inside" enum = "Continuous" "Solid" "Random" "Clear" default = 0 endparam param txtr_Banana_otre caption = "T: Outside" enum = "Continuous" "Solid" "Clear" default = 0 endparam param txtr_Banana_pro0 caption = "T: Banana Prob-ty 0" default = (.25, .5) endparam param txtr_Banana_pro1 caption = "T: Banana Prob-ty 1" default = (.75, 1) endparam param txtr_Banana_vari caption = "T: Banana Variance" default = 1024.0 endparam param txtr_Banana_seed0 caption = "T: Seed 0" default = 3779 endparam param txtr_Banana_seed1 caption = "T: Seed 1" default = 9377 endparam param txtr_Ell caption = "T: Elliptic Texture" hint = "This adds a Elliptic texture to the coloring." default = 0.0 endparam param txtr_Ell_type caption = "T: Elliptic Type" enum = "Magn Diff" "Real Diff" "Imag Diff" "Angel Diff" "Angle Diff" \ "Magn Quot" "Real Quot" "Imag Quot" "Angel Quot" "Angle Quot" \ "Magn Qout" "Real Qout" "Imag Qout" "Angel Qout" "Angle Qout" \ "Magn Pola" "Real Pola" "Imag Pola" "Angel Pola" "Angle Pola" default = 0 endparam param f_Ell_verlaufMode caption = "T: Elliptic Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Ell_verlaufOffset caption = "T: Elliptic V-Offset" default = 0.0 min = 0.0 endparam param txtr_Ell_lattice caption = "T: Elliptic Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Ell_scale caption = "T: Elliptic Scale" hint = "Scaling Factor for this Elliptic texture." default = 1.0 endparam param txtr_Ell_size caption = "T: Elliptic Pattern Size" default = 1.0 endparam param txtr_Ell_a caption = "T: Elliptic a" default = -1 endparam param txtr_Ell_b caption = "T: Elliptic b" default = -1 endparam param txtr_Ell_c caption = "T: Elliptic c" default = 1 endparam param txtr_Ell_d caption = "T: Elliptic d" default = 0 endparam param txtr_Ell_pseudo caption = "T: Pseudo Elliptic" default = true hint = "separate transforming real and imag" endparam param txtr_Ell_pseudoMix caption = "T: Pseudo Mix Real and Imag" default = false hint = "only in use with Pseudo Elliptic" endparam param txtr_Ell_mixMode caption = "T: Mix Mode for Pseudo Mix" enum = "Normal" "Difference" "Sum" "Product" "Exponent" endparam param txtr_Ell_limit caption = "T: Elliptic Limitation" default = 0.0 min = 0.0 endparam param txtr_MedialCut caption = "T: MedialCut Texture" hint = "This adds a MedialCut texture to the coloring." default = 0.0 endparam param f_MedialCut_verlaufMode caption = "T: MedialCut Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_MedialCut_verlaufOffset caption = "T: MedialCut V-Offset" default = 0.0 min = 0.0 endparam param txtr_MedialCut_lattice caption = "T: MedialCut Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_MedialCut_type caption = "T: MedialCut Type" enum = "Real" "Imag" "Min(Real,Imag)" "Max(Real,Imag)" \ "Sum" "Prod" "Real/Imag" "Imag/Real" "Diff" endparam param txtr_MedialCut_watch caption = "T: MedialCut Watch for Calc" enum = "Diff" "Min" "Max" "Sum" "Recip Sum" "Recip Diff" default = 0 endparam param txtr_MedialCut_scale caption = "T: MedialCut Scale" hint = "Scaling Factor for this MedialCut texture." default = 1.0 endparam param txtr_MedialCut_size caption = "T: MedialCut Pattern Size" default = 1.0 endparam param txtr_MedialCut_calcScale caption = "T: MedialCut Calc Scale" default = 1.0 min = 0 endparam param txtr_MedialCut_smooth caption = "T: MedialCut Smooth" default = 0.1 min = 1e-99 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_MedialCut_limit caption = "T: MedialCut Limitation" default = 0.0 min = 0.0 endparam param txtr_Truchet caption = "T: Truchet Texture" hint = "This adds a Truchet texture to the coloring." default = 0.0 endparam param f_Truchet_verlaufMode caption = "T: Truchet Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_Truchet_verlaufOffset caption = "T: Truchet V-Offset" default = 0.0 min = 0.0 endparam param txtr_Truchet_lattice caption = "T: Truchet Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_Truchet_mode caption = "T: Truchet Mode" default = 0 enum = "Roundy" "Squarry" "Worry" "Wyrry" "Harry" "Kirre" "Sally" endparam param txtr_Truchet_watch caption = "T: Truchet Watch" default = 0 enum = "Truchet" "Trechut" "Techtur" "Tuchter" "RetChut" endparam param txtr_Truchet_fixit caption = "T: Truchet Fixit" default = 0 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_Truchet_scale caption = "T: Truchet Scale" hint = "Scaling Factor for this Truchet texture." default = 1.0 endparam param txtr_Truchet_size caption = "T: Truchet Pat Size" default = 1.0 endparam param txtr_Truchet_corte caption = "T: Truchet Cutting Edges" default = .5 endparam param txtr_Truchet_rot caption = "T: Truchet Rotation" default = 0.0 endparam param txtr_Truchet_mst caption = "T: Truchet Magn Step" default = 2.0 endparam param txtr_Truchet_thick caption = "T: Truchet Thickness" default = 0.1 endparam param txtr_Truchet_Iters caption = "T: Truchet Iterations" default = 1 endparam param txtr_Truchet_seed caption = "T: Truchet Seed" default = 1234567890 endparam param txtr_Truchet_limit caption = "T: Truchet Limitation" default = 0.0 min = 0.0 endparam param txtr_GCD caption = "T: GCD Texture" hint = "This adds a GCD texture to the coloring." default = 0.0 endparam param f_GCD_verlaufMode caption = "T: GCD Verlauf" enum = "None" "Bottom to Top" "Top to Bottom" "Between Top&Bottom" "Mirror TB" \ "Left to Right" "Right to Left" "Between Left&Right" "Mirror LR" \ "Circle 1" "Circle 2" default = 0 endparam param f_GCD_verlaufOffset caption = "T: GCD V-Offset" default = 0.0 min = 0.0 endparam param txtr_GCD_lattice caption = "T: GCD Lattice" enum = "None" "Normal" "Modified" "Inverse" "Joukowskij" "Dither" "Hex" default = 1 endparam param txtr_GCD_watch caption = "T: GCD Watch" enum = "GCD" "MinQ GCD/Iter" "MaxQ GCD/Iter" "DCG+Reti" "DCG-Reti" \ "CHK" "MinQ CHK/Iter" "MaxQ CHK/Iter" "CHK+Iter" "KHC+Reti" "KHC-Reti" \ "MinQ CHK/GCD" "MaxQ CHK/GCD" "CHK+GCD" "KHC+DCG" "KHC-DCG" default = 0 endparam param txtr_GCD_fixit caption = "T: GCD Fixit" default = 1 enum = "Last" "Min" "Max" "Sum" "W-Sum" "G-Sum" endparam param txtr_GCD_scale caption = "T: GCD Scale" hint = "Scaling Factor for this GCD texture." default = 1.0 endparam param txtr_GCD_size caption = "T: GCD Pattern Size" default = 1.0 endparam param txtr_GCD_calcScale caption = "T: GCD Calc Scale" default = 0.003 endparam param txtr_GCD_Iters caption = "T: GCD Iterations" default = 2 endparam param txtr_GCD_smooth caption = "T: GCD Smooth" default = 1e-10 min = 0.0 hint = "Prevents from Division by Zero. \ Values between 1.99 and 2.01 might give bad effects, \ but don't ask me why..." endparam param txtr_GCD_limit caption = "T: GCD 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 func startFct caption = "Start Function" default = ident() endfunc func fkt caption = "Additional Function" default = ident() endfunc func barnFct1 caption = "Barnsley Fnctn 1" default = flip() endfunc func barnFct2 caption = "Barnsley Fnctn 2" default = flip() endfunc } ; GCD