color-1 { ;Variation on example UF init: float closest = 1e20 loop: float d = |#z| if d < closest closest = d endif final: #index = 3^(0.01 * #numiter + 0.1 * closest) default: title = "color-1" } color-2 { ;Variation on example UF. init: float closest = 1e20 int i = #maxiter loop: float d = |#z| if d < closest closest = d endif final: #index = i^(0.01 * #numiter + 0.1 * closest) default: title = "color-2" } color-3 { ;Variation on example UF. init: float closest = 1e20 int i = #maxiter loop: float d = |#z| if d < closest closest = d endif final: #index = i/(0.01 * #numiter + 0.1 * closest) default: title = "color-3" } color-4 { ;Variation on example UF. init: float closest = 1e20 int i = #maxiter loop: float d = |#z| if d < closest closest = d endif final: #index = i*(0.01 * #numiter + 0.1 * closest) default: title = "color-4" } color-5 { ;Variation on example UF. init: float closest = 1e20 int i = #maxiter loop: float d = |#z| if d < closest closest = d endif final: #index = i-(0.01 * #numiter + 0.1 * closest) default: title = "color-5" } color-6 { ;Variation on example UF. init: float closest = 1e20 int i = #maxiter loop: float d = |#z| if d < closest closest = d endif final: #index = i+(0.01 * #numiter + 0.1 * closest) default: title = "color-6" } Looms+A { ; By Jos Leys May 2002 ; Use with the Pixel formula in the Mt directory ; See a collection at http://users.pandora.be/jos.leys/ ; for further information check out Clifford A. Pickover's page ; at http://sprott.physics.wisc.edu/pickover/mygal.html ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Modification Andre Vandergoten Oct. 2002 ; Can be used with different formulas and Pixel ; Zoom with param radius init: float r = @radius float h = 0.0 float hh = 0.0 float hhh = 0.0 float h2 = 0.0 float test1 = 0.0 float iter = 0.0 complex test2 = 0.0 complex pt1 =0.0 complex pt2 =0.0 complex i= (0.0,1.0) float a=@a float b=@b float c=0.0 loop: final: iter=360*@n IF (iter >0) Repeat h=iter*#pi^@modif if @var==0 pt1=r*(cos(h)+i*sin(h)) pt2=r*(cos(h*a)+i*sin(h*b)) endif if @var==1 h2=h*a hh=trunc( (h +#pi/4-2*#pi*trunc( (h +#pi/4)/(#pi*2)) ) /(#pi/2) ) hhh=trunc((h2+#pi/4-2*#pi*trunc( (h2+#pi/4)/(#pi*2)) ) /(#pi/2) ) if (hh==0||hh==4) pt1=r*(1+tan(h)*i) elseif hh==1 pt1 =r*(tan(#pi/2-h)+1*i) elseif hh==2 pt1= r*(-1+tan(#pi-h)*i) elseif hh==3 pt1=r*(tan(h-3*#pi/2)-1*i) endif if (hhh==0||hhh==4) pt2=r*(1+tan(h2)*i) elseif hhh==1 pt2 =r*(tan(#pi/2-h2)+1*i) elseif hhh==2 pt2= r*(-1+tan(#pi-h2)*i) elseif hhh==3 pt2=r*(tan(h2-3*#pi/2)-1*i) endif endif test2 = (#z-pt2)^fn1(pt1-pt2) test1 = imag(test2)*(sqrt(|pt1-pt2|)) IF (test2 > 0 && test2 <1 && abs(test1) < @dikte ) test1=(@dikte-test1)*.5 c = test1/(@dikte) #index=c iter=@ang ENDIF iter=iter-@ang until iter == 0 ENDIF IF c == 0 IF @sol #solid = true ENDIF ENDIF default: title = "Looms+A" param modif caption = " modif " default = 3.0 endparam param radius caption = "radius " default = 0.69 endparam param ang caption = "Degrees betw.lines " default = 1.0 endparam param a caption = "Parameter1" default = 2.0 endparam param b caption = "Parameter2" hint="Does nothing with Square" default = 2.0 endparam param Var caption = "Shape " enum = "Circle" "Square" default = 0 endparam param n caption = "Go round x times" default = 1.0 endparam param dikte Caption = "Line thickness" Default = 0.005 endparam param sol caption="Solid background?" default= FALSE endparam } Looms+A2 { ; By Jos Leys May 2002 ; See a collection at http://users.pandora.be/jos.leys/ ; for further information check out Clifford A. Pickover's page ; at http://sprott.physics.wisc.edu/pickover/mygal.html ;****************************************************** ; Modification Andre Vandergoten - October 2002 ; avandergoten@skynet.be ; Add functions , param and extract Circle and Square. ; Add headings and default info. ; Can be used with normal formulas and pixel. init: float r = @radius float h = 0.0 float hh = 0.0 float hhh = 0.0 float h2 = 0.0 float test1 = 0.0 float iter = 0.0 complex test2 = 0.0 complex pt1 =0.0 complex pt2 =0.0 complex i= (0.0,1.0) float a=@a float b=@b float c=0.0 loop: final: iter=0 while iter<360*@n h=iter*#pi/@modif if @var==0 pt1=r*(fn2(h)+i*fn3(h)) pt2=r*(fn4(h*a)+i*sin(h*b)) endif if @var==1 h2=h*a hh=trunc( (h +#pi/4-2*#pi*trunc( (h +#pi/4)/(#pi*2)) ) /(#pi/2) ) hhh=trunc((h2+#pi/4-2*#pi*trunc( (h2+#pi/4)/(#pi*2)) ) /(#pi/2) ) if (hh==0||hh==4) pt1=r*(1+tan(h)*i) elseif hh==1 pt1 =r*(tan(#pi/2-h)+1*i) elseif hh==2 pt1= r*(-1+tan(#pi-h)*i) elseif hh==3 pt1=r*(tan(h-3*#pi/2)-1*i) endif if (hhh==0||hhh==4) pt2=r*(1+tan(h2)*i) elseif hhh==1 pt2 =r*(tan(#pi/2-h2)+1*i) elseif hhh==2 pt2= r*(-1+tan(#pi-h2)*i) elseif hhh==3 pt2=r*(tan(h2-3*#pi/2)-1*i) endif endif if @var==0 || @var==1 test2 = (#z-pt2)^fn1(pt1+pt2) test1 = imag(test2)*sqrt(|pt1+pt2|) IF (test2 > 0 && test2 <1 && abs(test1) < @dikte ) test1=(@dikte-test1)*@vartest1 c = test1/(@dikte) #index=c iter=360*@n endif endif iter=iter+@ang endwhile IF c == 0 IF @sol #solid = true ENDIF ENDIF default: title = "Looms+A2" ;============================ heading caption = " CHOICE " endheading param var caption = "Shape " enum = "Circle" "Square" default = 0 endparam ;============================ heading caption = " CIRCLE+SQUARE " endheading param radius caption = "radius=1.9 " default = 1.9 endparam param modif caption = "modif=180 " default = 180 endparam func fn1 caption = " fn1=sin " default = sin() endfunc param a caption = "Param1=2.0" default = 2.0 endparam param ang caption = "Degrees betw.lines=1.0 " default = 1.0 endparam param n caption = "Go round x times=1.0" default = 1.0 endparam param dikte Caption = "Line thickness=0.005" Default = 0.005 endparam param vartest1 caption = " vartest1=0.5 " default = 0.5 endparam ;=============================== heading caption = " CIRCLE ONLY " endheading func fn2 caption = " fn2-cos " default = cos() endfunc func fn3 caption = " fn3-sin " default = sin() endfunc func fn4 caption = " fn4-cos " default = cos() endfunc param b caption = "Param2=2.0" enabled = @var== "Circle" hint="Does nothing with Square " default = 2.0 endparam ;=============================== param sol caption="Solid background?" default= FALSE endparam } *************************************** GrafColor { ;Date: January 2003 - Andre Vandergoten init: float pix_x = real(#screenpixel) float pix_y = imag(#screenpixel) piks = #pixel complex a = 0 loop: a = fn1((cos(@te * (pix_x * (@pi_x))))^( sin(@te * (pix_y * (@pi_y)))) * piks) final: #index =( 0.01 + #numiter +0.1) ^ cabs(a) default: title = " GrafColor " float param te caption = " te " default = 1.1 endparam float param pi_x caption = " pi_x " default = - 3.141592653589793 endparam float param pi_y caption = " pi_y " default = - 3.141592653589793 endparam } ;***************************************************** Kameleon-II { ; Andre Vandergoten ; January 2005 ; Version : #index ; http://www.artdigits.org ; Nothing is perfect, but this one can be used by ; most UFM's of the D.Base , thus useful... ; I will not change nor modify Kameleon in the future. ; Copy and paste in the UF directory. ; 3 important points: 1)FuncStart - FuncChoice ; 2)Choice 0 & 1 and 3)both the valors VALors & VALOrs. ; Enjoy !! ; Thanks to Lilliane Rosschaert , Jos Boogen & ; Jos Leys for testing. init: complex A = (0,0) complex r1 = (0,0) complex g1 = (0,0) complex b1 = (0,0) complex A2 = (0,0) complex A3 = (0,0) complex A22 = (0,0) complex A33 = (0,0) float h1 = 0 float s1 = 0 float l1 = 0 float aT1 = 0 float h = 0 float s = 0 float l = 0 float aT = 0 loop: A =@funcstart(#z) if (@choice == 0) A2 = @AA12(real(A)) A3 = @AA13(imag(A)) A22 = 1/real(A) A33 = 1/imag(A) if (|A2| <= |A3|)&&(|A2|<=|A22|)&&(|A2|<=|A33|) A2 = (A2 * A22)*(#pi/@PI1)*(@VAL1A-@VAL1B) elseif (|A2| >= |A3|)&&(|A2| >= |A22|)&&(|A2| >= |A33|) A2 = (A2 * A33)*(#pi/@PI2)*(@VAL2A-@VAL2B) endif r1 = @rF((A2+A3+A22+A33) * @piR/#pi) g1 = @gF((A2+A3+A22+A33) * @piG/#pi) b1 = @bF((A2+A3+A22+A33) * @piB/#pi) float h = cabs(@funcchoice(r1)*@Select1) float s = cabs(@funcchoice(g1)*@Select2) float l = cabs(@funcchoice(b1)*@Select3) float aT = cabs(@Select4) elseif (@choice == 1) A2 = @AA12(real(A)) A3 = @AA13(imag(A)) A22 = 1/real(A) A33 = 1/imag(A) if (|A2| <= |A3|)&&(|A2|<=|A22|)&&(|A2|<=|A33|) A2 = (A2 * A22)*(#pi/@PI1) elseif (|A2| >= |A3|)&&(|A2| >= |A22|)&&(|A2| >= |A33|) A2 = (A2 * A33)*(#pi/@PI2) endif r1 = @rF((A2+A3+A22+A33) * @piR/#pi) g1 = @gF((A2+A3+A22+A33) * @piG/#pi) b1 = @bF((A2+A3+A22+A33) * @piB/#pi) float h1 = cabs(@funcchoice(r1)*@Select1) float s1 = cabs(@funcchoice(g1)*@Select2) float l1 = cabs(@funcchoice(b1)*@Select3) float aT1 = cabs(@Select4) h = (@VALO1A-@VALO1B)*h1 s = (@VALO2A-@VALO2B)*s1 l = (@VALO3A-@VALO3B)*l1 aT = (@VALO4A-@VALO4B)*aT1 endif final: #index = 0.01*#numiter+0.1*h*s*l*aT default: title = "Kameleon-II" ;****************************************** heading caption = "Start Kameleon from #z ,filtering" endheading heading caption = "through functions.Go to CHOICE 0 or 1 " endheading ;****************************************** func funcstart caption = "FuncStart" default = log() endfunc func funcchoice caption = "Funcchoice" default = log() endfunc ;**************************** heading caption = "VALors CHOICE 0" endheading heading caption = "By pair 1A/1B . 2A/2B..etc.." endheading ;**************************** param VAL1A caption = "VAL1A" default = 0.15 endparam param VAL1B caption = "VAL1B" default = 0.10 endparam param VAL2A caption = "VAL2A" default = 0.15 endparam param VAL2B caption = "VAL2B" default = 0.10 endparam ;******************************* heading caption = "VALOrs CHOICE 1" endheading heading caption = "By pair as in choice 0" endheading ;******************************* param VALO1A caption = "VALO1A" default = 0.13 endparam param VALO1B caption = "VALO1B" default = 0.10 endparam param VALO2A caption = "VALO2A" default = 1.15 endparam param VALO2B caption = "VALO2B" default = 0.10 endparam param VALO3A caption = "VALO3A" default = 0.15 endparam param VALO3B caption = "VALO3B" default = 10.0 endparam param VALO4A caption = "VALO4A" default = 0.15 endparam param VALO4B caption = "VALO4B" default = 10.0 endparam ;********************************* heading caption = "PARAMS PI-1,PI-2" endheading heading caption = "Part of IF statements" endheading heading caption = "of CHOICE 0 and 1" endheading ;********************************* param PI1 caption = "PI-1" default = 0.50 endparam param PI2 caption = "PI-2" default = 0.80 endparam ;**************************** heading caption = "MODIFICATIONS" endheading heading caption = "On cabs operations" endheading ;**************************** param Select1 caption = "Select-1" default = 1.0 endparam param Select2 caption = "Select-2" default = 1.0 endparam param Select3 caption = "Select-3" default = 1.0 endparam param Select4 caption = "Select-4" default = 1.0 endparam ;************************************************** heading caption = "CHOICE" endheading heading caption = "Choice 0 -> go to VAL CHOICE 0" endheading heading caption = "Choice 1 -> go to VAL CHOICE 1" endheading ;*************************************************** param choice caption = "Choice" enum = "0""1" default = 0 endparam ;************************************* heading caption = "FUNCTIONS ON COMPLEX R/I AA" endheading heading caption = "...on real and imag #z" endheading ;************************************* func AA12 caption = "AA12" default = ident() endfunc func AA13 caption = "AA13" default = ident() endfunc ;*********************************************** heading caption = "FUNCTIONS ON A2,A3....." endheading heading caption = "Last function on IF statements" endheading ;*********************************************** func rF caption = "rF" default = sin() endfunc func gF caption = "gF" default = sin() endfunc func bF caption = "bF" default = cosh() endfunc ;************************* heading caption = "PARAMS ON A2,A3..." endheading heading caption = "Last params on IF statements" endheading ;************************* float param piR caption = "PiR/Pi" default = 1.0 endparam float param piG caption = "PiG/Pi" default = 6.0 endparam float param piB caption = "PiB/Pi" default = 3.0 endparam ;************************* } ;**************************************************************** Ray-tek { ;Andre Vandergoten March 2005 ;To use with Raytrace formulas ;or others. final: if @choice==0 complex A = real(#z)*@valor #index = cabs(@fn1(A)) elseif @choice==1 complex A = 1/real(#z)*@valor #index = cabs(@fn1(A)) endif default: title = "Ray-tek" func fn1 caption = "FN1" default = atanh() endfunc param valor caption = "VALOR" default = (1.12345,0.08) endparam param choice caption = "CHOICE" default = 0 enum = "0""1" endparam } ;******************************************************************