SlopeHyperDistortion { ; HyperComplex 4 Dimensional formula based on distortion method. ; Presents many possibilities also to change Hyper and Julibrot Planes. ; Phoenix and Fibonacci distortion method. ; Andrea Spinozzi(Giugno 2022) Init: ;----------------------------Initialize Variables------------------------------- complex z1=z2=z3=0.0 complex zz1=zz2=zz3=0.0 complex cc1=cc2=cc3=0.0 complex tempa1=tempa2=tempa3=0.0 complex tempb1=tempb2=tempb3=0.0 complex zr1=zr2=zr3=zi1=zi2=zi3=0.0 complex cr1=cr2=cr3=ci1=ci2=ci3=0.0 complex wr1=wr2=wr3=wi1=wi2=wi3=0.0 complex cwr1=cwr2=cwr3=cwi1=cwi2=cwi3=0.0 complex ya1=ya2=ya3=0.0 complex yb1=yb2=yb3=0.0 complex za1=za2=za3=0.0 complex zb1=zb2=zb3=0.0 complex zf1=zf2=zf3=0.0 complex w1=w2=w3=0.0 complex cw1=cw2=cw3=@hyp1 ;-----------Julibrot Plane and Mandelbrot Mode---------------------------------- if (@plane==0) zz1=real(@startseed)+flip(imag(@startseed)) zz2=real(@startseed)+flip(imag(@startseed)) zz3=real(@startseed)+flip(imag(@startseed)) cc1=real(#pixel)+flip(imag(#pixel)) cc2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) cc3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) elseif (@plane==1) zz1=real(#pixel)+flip(real(@startseed)) zz2=real(#pixel+@offset)+flip(real(@startseed)) zz3=real(#pixel+flip(@offset))+flip(real(@startseed)) cc1=flip(imag(#pixel))+imag(@startseed) cc2=flip(imag(#pixel+@offset))+imag(@startseed) cc3=flip(imag(#pixel+flip(@offset)))+imag(@startseed) elseif (@plane==2) zz1=real(#pixel)+flip(real(@startseed)) zz2=real(#pixel+@offset)+flip(real(@startseed)) zz3=real(#pixel+flip(@offset))+flip(real(@startseed)) cc1=imag(#pixel)+flip(imag(@startseed)) cc2=imag(#pixel+@offset)+flip(imag(@startseed)) cc3=imag(#pixel+flip(@offset))+flip(imag(@startseed)) elseif (@plane==3) zz1=flip(real(#pixel))+real(@startseed) zz2=flip(real(#pixel+@offset))+real(@startseed) zz3=flip(real(#pixel+flip(@offset)))+real(@startseed) cc1=flip(imag(#pixel))+imag(@startseed) cc2=flip(imag(#pixel+@offset))+imag(@startseed) cc3=flip(imag(#pixel+flip(@offset)))+imag(@startseed) elseif (@plane==4) zz1=flip(real(#pixel))+real(@startseed) zz2=flip(real(#pixel+@offset))+real(@startseed) zz3=flip(real(#pixel+flip(@offset)))+real(@startseed) cc1=imag(#pixel)+flip(imag(@startseed)) cc2=imag(#pixel+@offset)+flip(imag(@startseed)) cc3=imag(#pixel+flip(@offset))+flip(imag(@startseed)) endif ;--------------------------Julia Mode------------------------------------------- if (@mode=="Julia") if (@plane==0) zz1=real(#pixel)+flip(imag(#pixel)) zz2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) zz3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) cc1=real(@startseed)+flip(imag(@startseed)) cc2=real(@startseed)+flip(imag(@startseed)) cc3=real(@startseed)+flip(imag(@startseed)) elseif (@plane==1) zz1=real(#pixel)+flip(real(@startseed)) zz2=real(#pixel+@offset)+flip(real(@startseed)) zz3=real(#pixel+flip(@offset))+flip(real(@startseed)) cc1=flip(imag(#pixel))+imag(@startseed) cc2=flip(imag(#pixel+@offset))+imag(@startseed) cc3=flip(imag(#pixel+flip(@offset)))+imag(@startseed) elseif (@plane==2) zz1=real(#pixel)+flip(real(@startseed)) zz2=real(#pixel+@offset)+flip(real(@startseed)) zz3=real(#pixel+flip(@offset))+flip(real(@startseed)) cc1=imag(#pixel)+flip(imag(@startseed)) cc2=imag(#pixel+@offset)+flip(imag(@startseed)) cc3=imag(#pixel+flip(@offset))+flip(imag(@startseed)) elseif (@plane==3) zz1=flip(real(#pixel))+real(@startseed) zz2=flip(real(#pixel+@offset))+real(@startseed) zz3=flip(real(#pixel+flip(@offset)))+real(@startseed) cc1=flip(imag(#pixel))+imag(@startseed) cc2=flip(imag(#pixel+@offset))+imag(@startseed) cc3=flip(imag(#pixel+flip(@offset)))+imag(@startseed) elseif (@plane==4) zz1=flip(real(#pixel))+real(@startseed) zz2=flip(real(#pixel+@offset))+real(@startseed) zz3=flip(real(#pixel+flip(@offset)))+real(@startseed) cc1=imag(#pixel)+flip(imag(@startseed)) cc2=imag(#pixel+@offset)+flip(imag(@startseed)) cc3=imag(#pixel+flip(@offset))+flip(imag(@startseed)) endif w1=w2=w3=@hyp2 cw1=cw2=cw3=@hyp1 endif ;--------------------Define HyperComplex variables and planes------------------- if (@planevar==0) cr1=real(cc1) cr2=real(cc2) cr3=real(cc3) ci1=imag(cc1) ci2=imag(cc2) ci3=imag(cc3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) zr1=real(zz1) zr2=real(zz2) zr3=real(zz3) zi1=imag(zz1) zi2=imag(zz2) zi3=imag(zz3) wr1=real(w1) wr2=real(w2) wr3=real(w3) wi1=imag(w1) wi2=imag(w2) wi3=imag(w3) elseif (@planevar==1) cr1=real(cw1) cr2=real(cw2) cr3=real(cw3) ci1=imag(cw1) ci2=imag(cw2) ci3=imag(cw3) cwr1=real(cc1) cwr2=real(cc2) cwr3=real(cc3) cwi1=imag(cc1) cwi2=imag(cc2) cwi3=imag(cc3) zr1=real(w1) zr2=real(w2) zr3=real(w3) zi1=imag(w1) zi2=imag(w2) zi3=imag(w3) wr1=real(zz1) wr2=real(zz2) wr3=real(zz3) wi1=imag(zz1) wi2=imag(zz2) wi3=imag(zz3) elseif (@planevar==2) cr1=real(cc1) cr2=real(cc2) cr3=real(cc3) ci1=imag(cw1) ci2=imag(cw2) ci3=imag(cw3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cc1) cwi2=imag(cc2) cwi3=imag(cc3) zr1=real(zz1) zr2=real(zz2) zr3=real(zz3) zi1=imag(w1) zi2=imag(w2) zi3=imag(w3) wr1=real(w1) wr2=real(w2) wr3=real(w3) wi1=imag(zz1) wi2=imag(zz2) wi3=imag(zz3) elseif (@planevar==3) cr1=real(cw1) cr2=real(cw2) cr3=real(cw3) ci1=imag(cc1) ci2=imag(cc2) ci3=imag(cc3) cwr1=real(cc1) cwr2=real(cc2) cwr3=real(cc3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) zr1=real(w1) zr2=real(w2) zr3=real(w3) zi1=imag(zz1) zi2=imag(zz2) zi3=imag(zz3) wr1=real(zz1) wr2=real(zz2) wr3=real(zz3) wi1=imag(w1) wi2=imag(w2) wi3=imag(w3) endif ;----------------------------Rotations Mandelbrot and Julia--------------------- ;----------------------------MANDELBROT MODE------------------------------------ ;----------------------------(yz plane rotation)-------------------------------- ry1 = ci1*cos(#pi*@rotx/180) - cwr1*sin(#pi*@rotx/180) ry2 = ci2*cos(#pi*@rotx/180) - cwr2*sin(#pi*@rotx/180) ry3 = ci3*cos(#pi*@rotx/180) - cwr3*sin(#pi*@rotx/180) rz1 = ci1*sin(#pi*@rotx/180) + cwr1*cos(#pi*@rotx/180) rz2 = ci2*sin(#pi*@rotx/180) + cwr2*cos(#pi*@rotx/180) rz3 = ci3*sin(#pi*@rotx/180) + cwr3*cos(#pi*@rotx/180) ci1 = ry1 ci2 = ry2 ci3 = ry3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xz plane rotation)-------------------------------- rx1 = cwr1*sin(#pi*@roty/180) + cr1*cos(#pi*@roty/180) rx2 = cwr2*sin(#pi*@roty/180) + cr2*cos(#pi*@roty/180) rx3 = cwr3*sin(#pi*@roty/180) + cr3*cos(#pi*@roty/180) rz1 = cwr1*cos(#pi*@roty/180) - cr1*sin(#pi*@roty/180) rz2 = cwr2*cos(#pi*@roty/180) - cr2*sin(#pi*@roty/180) rz3 = cwr3*cos(#pi*@roty/180) - cr3*sin(#pi*@roty/180) cr1 = rx1 cr2 = rx2 cr3 = rx3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xy plane rotation)-------------------------------- rx1 = cr1*cos(#pi*@rotz/180) - ci1*sin(#pi*@rotz/180) rx2 = cr2*cos(#pi*@rotz/180) - ci2*sin(#pi*@rotz/180) rx3 = cr3*cos(#pi*@rotz/180) - ci3*sin(#pi*@rotz/180) ry1 = cr1*sin(#pi*@rotz/180) + ci1*cos(#pi*@rotz/180) ry2 = cr2*sin(#pi*@rotz/180) + ci2*cos(#pi*@rotz/180) ry3 = cr3*sin(#pi*@rotz/180) + ci3*cos(#pi*@rotz/180) cr1 = rx1 cr2 = rx2 cr3 = rx3 ci1 = ry1 ci2 = ry2 ci3 = ry3 ;----------------------------(xw plane rotation)-------------------------------- rx1=cr1*sin(#pi*@rotw/180)+cwi1*cos(#pi*@rotw/180) rx2=cr2*sin(#pi*@rotw/180)+cwi2*cos(#pi*@rotw/180) rx3=cr3*sin(#pi*@rotw/180)+cwi3*cos(#pi*@rotw/180) rw1=cr1*cos(#pi*@rotw/180)-cwi1*sin(#pi*@rotw/180) rw2=cr2*cos(#pi*@rotw/180)-cwi2*sin(#pi*@rotw/180) rw3=cr3*cos(#pi*@rotw/180)-cwi3*sin(#pi*@rotw/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 cr1=rw1 cr2=rw2 cr3=rw3 ;-------------------------(yw plane rotation)----------------------------------- rx1=ci1*sin(#pi*@rotwy/180)+cwi1*cos(#pi*@rotwy/180) rx2=ci2*sin(#pi*@rotwy/180)+cwi2*cos(#pi*@rotwy/180) rx3=ci3*sin(#pi*@rotwy/180)+cwi3*cos(#pi*@rotwy/180) rw1=ci1*cos(#pi*@rotwy/180)-cwi1*sin(#pi*@rotwy/180) rw2=ci2*cos(#pi*@rotwy/180)-cwi2*sin(#pi*@rotwy/180) rw3=ci3*cos(#pi*@rotwy/180)-cwi3*sin(#pi*@rotwy/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 ci1=rw1 ci2=rw2 ci3=rw3 if (@mode=="julia");-------------Julia Rotations----------------------------- ;---------------------------------JULIA MODE------------------------------------ ;---------------------------(yz plane rotation)--------------------------------- ry1 = zi1*cos(#pi*@rotx/180) - wr1*sin(#pi*@rotx/180) ry2 = zi2*cos(#pi*@rotx/180) - wr2*sin(#pi*@rotx/180) ry3 = zi3*cos(#pi*@rotx/180) - wr3*sin(#pi*@rotx/180) rz1 = zi1*sin(#pi*@rotx/180) + wr1*cos(#pi*@rotx/180) rz2 = zi2*sin(#pi*@rotx/180) + wr2*cos(#pi*@rotx/180) rz3 = zi3*sin(#pi*@rotx/180) + wr3*cos(#pi*@rotx/180) zi1 = ry1 zi2 = ry2 zi3 = ry3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;-------------------------(xz plane rotation)----------------------------------- rx1 = wr1*sin(#pi*@roty/180) + zr1*cos(#pi*@roty/180) rx2 = wr2*sin(#pi*@roty/180) + zr2*cos(#pi*@roty/180) rx3 = wr3*sin(#pi*@roty/180) + zr3*cos(#pi*@roty/180) rz1 = wr1*cos(#pi*@roty/180) - zr1*sin(#pi*@roty/180) rz2 = wr2*cos(#pi*@roty/180) - zr2*sin(#pi*@roty/180) rz3 = wr3*cos(#pi*@roty/180) - zr3*sin(#pi*@roty/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;---------------------(xy plane rotation)--------------------------------------- rx1 = zr1*cos(#pi*@rotz/180) - zi1*sin(#pi*@rotz/180) rx2 = zr2*cos(#pi*@rotz/180) - zi2*sin(#pi*@rotz/180) rx3 = zr3*cos(#pi*@rotz/180) - zi3*sin(#pi*@rotz/180) ry1 = zr1*sin(#pi*@rotz/180) + zi1*cos(#pi*@rotz/180) ry2 = zr2*sin(#pi*@rotz/180) + zi2*cos(#pi*@rotz/180) ry3 = zr3*sin(#pi*@rotz/180) + zi3*cos(#pi*@rotz/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 zi1 = ry1 zi2 = ry2 zi3 = ry3 ;---------------------(xw plane rotation)--------------------------------------- rx1=zr1*sin(#pi*@rotw/180)+wi1*cos(#pi*@rotw/180) rx2=zr2*sin(#pi*@rotw/180)+wi2*cos(#pi*@rotw/180) rx3=zr3*sin(#pi*@rotw/180)+wi3*cos(#pi*@rotw/180) rw1=zr1*cos(#pi*@rotw/180)-wi1*sin(#pi*@rotw/180) rw2=zr2*cos(#pi*@rotw/180)-wi2*sin(#pi*@rotw/180) rw3=zr3*cos(#pi*@rotw/180)-wi3*sin(#pi*@rotw/180) wi1=rx1 wi2=rx2 wi3=rx3 zr1=rw1 zr2=rw2 zr3=rw3 ;---------------------(yw plane rotation)--------------------------------------- rx1=zi1*sin(#pi*@rotwy/180)+wi1*cos(#pi*@rotwy/180) rx2=zi2*sin(#pi*@rotwy/180)+wi2*cos(#pi*@rotwy/180) rx3=zi3*sin(#pi*@rotwy/180)+wi3*cos(#pi*@rotwy/180) rw1=zi1*cos(#pi*@rotwy/180)-wi1*sin(#pi*@rotwy/180) rw2=zi2*cos(#pi*@rotwy/180)-wi2*sin(#pi*@rotwy/180) rw3=zi3*cos(#pi*@rotwy/180)-wi3*sin(#pi*@rotwy/180) wi1=rx1 wi2=rx2 wi3=rx3 zi1=rw1 zi2=rw2 zi3=rw3 endif ;------------------------------Define C=pixel and Julia Dimension-------------- ca1=cr1-cwi1+flip(ci1+cwr1) ca2=cr2-cwi2+flip(ci2+cwr2) ca3=cr3-cwi3+flip(ci3+cwr3) cb1=cr1+cwi1+flip(ci1-cwr1) cb2=cr2+cwi2+flip(ci2-cwr2) cb3=cr3+cwi3+flip(ci3-cwr3) ;------------------------------------------------------------------------------- ;------------------------------Initialize sequence C---------------------------- int iter=0 int modby=@seq+2 ;--------------------------Initialize slope variables--------------------------- int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 Loop: ;----------------Define the C sequence method----------------------------------- int method=iter%modby ;-----------------------Define Z and hyper (cj,ck)------------------------------ a1=zr1-wi1+flip(zi1+wr1) a2=zr2-wi2+flip(zi2+wr2) a3=zr3-wi3+flip(zi3+wr3) b1=zr1+wi1+flip(zi1-wr1) b2=zr2+wi2+flip(zi2-wr2) b3=zr3+wi3+flip(zi3-wr3) if (method==0) ;--------------Factors for sequence-------------------------- appca1=@fnfact1(ca1)*@fact3+@fact1 appca2=@fnfact1(ca2)*@fact3+@fact1 appca3=@fnfact1(ca3)*@fact3+@fact1 appcb1=@fnfact1(cb1)*@fact3+@fact1 appcb2=@fnfact1(cb2)*@fact3+@fact1 appcb3=@fnfact1(cb3)*@fact3+@fact1 else appca1=@fnfact2(ca1)*@fact4+@fact2 appca2=@fnfact2(ca2)*@fact4+@fact2 appca3=@fnfact2(ca3)*@fact4+@fact2 appcb1=@fnfact2(cb1)*@fact4+@fact2 appcb2=@fnfact2(cb2)*@fact4+@fact2 appcb3=@fnfact2(cb3)*@fact4+@fact2 endif ;--------------------------------Func Global C----------------------------------- appca1=@fnc(appca1) appca2=@fnc(appca2) appca3=@fnc(appca3) appcb1=@fnc(appcb1) appcb2=@fnc(appcb2) appcb3=@fnc(appcb3) ;-----------------------------------Define First distortion--------------------- znewa1=@fnz(a1)^@ex1+@mdis*ya1 znewa2=@fnz(a2)^@ex1+@mdis*ya2 znewa3=@fnz(a3)^@ex1+@mdis*ya3 znewb1=@fnz(b1)^@ex1+@mdis*yb1 znewb2=@fnz(b2)^@ex1+@mdis*yb2 znewb3=@fnz(b3)^@ex1+@mdis*yb3 aa1=( @fndis1(a1)^@exdis1*@mult1+@fndis3(appca1)*@cdis1 )+@add1*a1 aa2=( @fndis1(a2)^@exdis1*@mult1+@fndis3(appca2)*@cdis1 )+@add1*a2 aa3=( @fndis1(a3)^@exdis1*@mult1+@fndis3(appca3)*@cdis1 )+@add1*a3 ab1=( @fndis1(b1)^@exdis1*@mult1+@fndis3(appcb1)*@cdis1 )+@add1*b1 ab2=( @fndis1(b2)^@exdis1*@mult1+@fndis3(appcb2)*@cdis1 )+@add1*b2 ab3=( @fndis1(b3)^@exdis1*@mult1+@fndis3(appcb3)*@cdis1 )+@add1*b3 ba1=( @fndis2(a1)^@exdis2*@mult2+@fndis4(appca1)*@cdis2 )+@add2*a1 ba2=( @fndis2(a2)^@exdis2*@mult2+@fndis4(appca2)*@cdis2 )+@add2*a2 ba3=( @fndis2(a3)^@exdis2*@mult2+@fndis4(appca3)*@cdis2 )+@add2*a3 bb1=( @fndis2(b1)^@exdis2*@mult2+@fndis4(appcb1)*@cdis2 )+@add2*b1 bb2=( @fndis2(b2)^@exdis2*@mult2+@fndis4(appcb2)*@cdis2 )+@add2*b2 bb3=( @fndis2(b3)^@exdis2*@mult2+@fndis4(appcb3)*@cdis2 )+@add2*b3 if (@opdis==0) ya1=@mdis1*aa1+@mdis2*ba1 ya2=@mdis1*aa2+@mdis2*ba2 ya3=@mdis1*aa3+@mdis2*ba3 yb1=@mdis1*ab1+@mdis2*bb1 yb2=@mdis1*ab2+@mdis2*bb2 yb3=@mdis1*ab3+@mdis2*bb3 elseif (@opdis==1) ya1=@mdis1*aa1-@mdis2*ba1 ya2=@mdis1*aa2-@mdis2*ba2 ya3=@mdis1*aa3-@mdis2*ba3 yb1=@mdis1*ab1-@mdis2*bb1 yb2=@mdis1*ab2-@mdis2*bb2 yb3=@mdis1*ab3-@mdis2*bb3 elseif (@opdis==2) ya1=@mdis1*aa1*@mdis2*ba1 ya2=@mdis1*aa2*@mdis2*ba2 ya3=@mdis1*aa3*@mdis2*ba3 yb1=@mdis1*ab1*@mdis2*bb1 yb2=@mdis1*ab2*@mdis2*bb2 yb3=@mdis1*ab3*@mdis2*bb3 elseif (@opdis==3) ya1=@mdis1*aa1/@mdis2*ba1 ya2=@mdis1*aa2/@mdis2*ba2 ya3=@mdis1*aa3/@mdis2*ba3 yb1=@mdis1*ab1/@mdis2*bb1 yb2=@mdis1*ab2/@mdis2*bb2 yb3=@mdis1*ab3/@mdis2*bb3 endif ;------------------Now define Z for Sets---------------------------------------- if (@select==0);-----------------------Mandelbrot----------------------------- za1=@fnm1(znewa1)^@power+@fnm3(appca1) + @mand3/(znewa1-appca1) + @mand1*(@fnm2(znewa1)^@mand2)^(-@mand2) za2=@fnm1(znewa2)^@power+@fnm3(appca2) + @mand3/(znewa2-appca2) + @mand1*(@fnm2(znewa2)^@mand2)^(-@mand2) za3=@fnm1(znewa3)^@power+@fnm3(appca3) + @mand3/(znewa3-appca3) + @mand1*(@fnm2(znewa3)^@mand2)^(-@mand2) zb1=@fnm1(znewb1)^@power+@fnm3(appcb1) + @mand3/(znewb1-appcb1) + @mand1*(@fnm2(znewb1)^@mand2)^(-@mand2) zb2=@fnm1(znewb2)^@power+@fnm3(appcb2) + @mand3/(znewb2-appcb2) + @mand1*(@fnm2(znewb2)^@mand2)^(-@mand2) zb3=@fnm1(znewb3)^@power+@fnm3(appcb3) + @mand3/(znewb3-appcb3) + @mand1*(@fnm2(znewb3)^@mand2)^(-@mand2) elseif (@select==1);------------------Ikenaga--------------------------------- za1=@ike4*@fnik1(znewa1)^@ike3+(@fnik3(appca1)-@ike1)*@fnik2(znewa1)*@ike2-@fnik4(appca1) za2=@ike4*@fnik1(znewa2)^@ike3+(@fnik3(appca2)-@ike1)*@fnik2(znewa2)*@ike2-@fnik4(appca2) za3=@ike4*@fnik1(znewa3)^@ike3+(@fnik3(appca3)-@ike1)*@fnik2(znewa3)*@ike2-@fnik4(appca3) zb1=@ike4*@fnik1(znewb1)^@ike3+(@fnik3(appcb1)-@ike1)*@fnik2(znewb1)*@ike2-@fnik4(appcb1) zb2=@ike4*@fnik1(znewb2)^@ike3+(@fnik3(appcb2)-@ike1)*@fnik2(znewb2)*@ike2-@fnik4(appcb2) zb3=@ike4*@fnik1(znewb3)^@ike3+(@fnik3(appcb3)-@ike1)*@fnik2(znewb3)*@ike2-@fnik4(appcb3) elseif (@select==2);------------------Barnsley-------------------------------- if real(a1)>0 za1=(@fnb1(znewa1)-@bar1)*@fnb3(appca1)*@bar3 za2=(@fnb1(znewa2)-@bar1)*@fnb3(appca2)*@bar3 za3=(@fnb1(znewa3)-@bar1)*@fnb3(appca3)*@bar3 else za1=(@fnb2(znewa1)+@bar2)*@fnb4(appca1)*@bar4 za2=(@fnb2(znewa2)+@bar2)*@fnb4(appca2)*@bar4 za3=(@fnb2(znewa3)+@bar2)*@fnb4(appca3)*@bar4 endif if real(b1)>0 zb1=(@fnb1(znewb1)-@bar1)*@fnb3(appcb1)*@bar3 zb2=(@fnb1(znewb2)-@bar1)*@fnb3(appcb2)*@bar3 zb3=(@fnb1(znewb3)-@bar1)*@fnb3(appcb3)*@bar3 else zb1=(@fnb2(znewb1)+@bar2)*@fnb4(appcb1)*@bar4 zb2=(@fnb2(znewb2)+@bar2)*@fnb4(appcb2)*@bar4 zb3=(@fnb2(znewb3)+@bar2)*@fnb4(appcb3)*@bar4 endif elseif (@select==3);------------------FGZ------------------------------------- fga11=(@fngz1(znewa1)^@exfgz1+@fngzc1(appca1)*@fgzc1) fga12=(@fngz1(znewa2)^@exfgz1+@fngzc1(appca2)*@fgzc1) fga13=(@fngz1(znewa3)^@exfgz1+@fngzc1(appca3)*@fgzc1) fgb11=(@fngz1(znewb1)^@exfgz1+@fngzc1(appcb1)*@fgzc1) fgb12=(@fngz1(znewb2)^@exfgz1+@fngzc1(appcb2)*@fgzc1) fgb13=(@fngz1(znewb3)^@exfgz1+@fngzc1(appcb3)*@fgzc1) fga21=(@fngz2(znewa1)^@exfgz2+@fngzc2(appca1)*@fgzc2) fga22=(@fngz2(znewa2)^@exfgz2+@fngzc2(appca2)*@fgzc2) fga23=(@fngz2(znewa3)^@exfgz2+@fngzc2(appca3)*@fgzc2) fgb21=(@fngz2(znewb1)^@exfgz2+@fngzc2(appcb1)*@fgzc2) fgb22=(@fngz2(znewb2)^@exfgz2+@fngzc2(appcb2)*@fgzc2) fgb23=(@fngz2(znewb3)^@exfgz2+@fngzc2(appcb3)*@fgzc2) fga31=(@fngz3(znewa1)^@exfgz3+@fngzc3(appca1)*@fgzc3) fga32=(@fngz3(znewa2)^@exfgz3+@fngzc3(appca2)*@fgzc3) fga33=(@fngz3(znewa3)^@exfgz3+@fngzc3(appca3)*@fgzc3) fgb31=(@fngz3(znewb1)^@exfgz3+@fngzc3(appcb1)*@fgzc3) fgb32=(@fngz3(znewb2)^@exfgz3+@fngzc3(appcb2)*@fgzc3) fgb33=(@fngz3(znewb3)^@exfgz3+@fngzc3(appcb3)*@fgzc3) za1=@fgz3+(@fgz1*fga11*fga21)/(@fgz4+(fga31+@fgz2))+@fngzc4(appca1)*@fgzc4 za2=@fgz3+(@fgz1*fga12*fga22)/(@fgz4+(fga32+@fgz2))+@fngzc4(appca2)*@fgzc4 za3=@fgz3+(@fgz1*fga13*fga23)/(@fgz4+(fga33+@fgz2))+@fngzc4(appca3)*@fgzc4 zb1=@fgz3+(@fgz1*fgb11*fgb21)/(@fgz4+(fgb31+@fgz2))+@fngzc4(appcb1)*@fgzc4 zb2=@fgz3+(@fgz1*fgb12*fgb22)/(@fgz4+(fgb32+@fgz2))+@fngzc4(appcb2)*@fgzc4 zb3=@fgz3+(@fgz1*fgb13*fgb23)/(@fgz4+(fgb33+@fgz2))+@fngzc4(appcb3)*@fgzc4 elseif (@select==4);------------------CplxSpirals--------------------------- if (@selcplx==0) za1=( (@fncp1(znewa1)*@fncp2(znewa1)^@excplx2+(@fncpc1(appca1)-@cplx1))/(@fncpc2(appca1)/(@fncp3(znewa1)^@excplx3+@cplx4)+(@fncpc3(appca1)-@cplx2)) )^@excplx1-@cplx3 za2=( (@fncp1(znewa2)*@fncp2(znewa2)^@excplx2+(@fncpc1(appca2)-@cplx1))/(@fncpc2(appca2)/(@fncp3(znewa2)^@excplx3+@cplx4)+(@fncpc3(appca2)-@cplx2)) )^@excplx1-@cplx3 za3=( (@fncp1(znewa3)*@fncp2(znewa3)^@excplx2+(@fncpc1(appca3)-@cplx1))/(@fncpc2(appca3)/(@fncp3(znewa3)^@excplx3+@cplx4)+(@fncpc3(appca3)-@cplx2)) )^@excplx1-@cplx3 zb1=( (@fncp1(znewb1)*@fncp2(znewb1)^@excplx2+(@fncpc1(appcb1)-@cplx1))/(@fncpc2(appcb1)/(@fncp3(znewb1)^@excplx3+@cplx4)+(@fncpc3(appcb1)-@cplx2)) )^@excplx1-@cplx3 zb2=( (@fncp1(znewb2)*@fncp2(znewb2)^@excplx2+(@fncpc1(appcb2)-@cplx1))/(@fncpc2(appcb2)/(@fncp3(znewb2)^@excplx3+@cplx4)+(@fncpc3(appcb2)-@cplx2)) )^@excplx1-@cplx3 zb3=( (@fncp1(znewb3)*@fncp2(znewb3)^@excplx2+(@fncpc1(appcb3)-@cplx1))/(@fncpc2(appcb3)/(@fncp3(znewb3)^@excplx3+@cplx4)+(@fncpc3(appcb3)-@cplx2)) )^@excplx1-@cplx3 elseif (@selcplx==1) za1=( (@fncp1(znewa1)*@fncp2(znewa1)^@excplx2+(@fncpc1(appca1)-@cplx1))/(@fncpc2(appca1)*(@fncp3(znewa1)^@excplx3+@cplx4)+(@fncpc3(appca1)-@cplx2)) )^@excplx1-@cplx3 za2=( (@fncp1(znewa2)*@fncp2(znewa2)^@excplx2+(@fncpc1(appca2)-@cplx1))/(@fncpc2(appca2)*(@fncp3(znewa2)^@excplx3+@cplx4)+(@fncpc3(appca2)-@cplx2)) )^@excplx1-@cplx3 za3=( (@fncp1(znewa3)*@fncp2(znewa3)^@excplx2+(@fncpc1(appca3)-@cplx1))/(@fncpc2(appca3)*(@fncp3(znewa3)^@excplx3+@cplx4)+(@fncpc3(appca3)-@cplx2)) )^@excplx1-@cplx3 zb1=( (@fncp1(znewb1)*@fncp2(znewb1)^@excplx2+(@fncpc1(appcb1)-@cplx1))/(@fncpc2(appcb1)*(@fncp3(znewb1)^@excplx3+@cplx4)+(@fncpc3(appcb1)-@cplx2)) )^@excplx1-@cplx3 zb2=( (@fncp1(znewb2)*@fncp2(znewb2)^@excplx2+(@fncpc1(appcb2)-@cplx1))/(@fncpc2(appcb2)*(@fncp3(znewb2)^@excplx3+@cplx4)+(@fncpc3(appcb2)-@cplx2)) )^@excplx1-@cplx3 zb3=( (@fncp1(znewb3)*@fncp2(znewb3)^@excplx2+(@fncpc1(appcb3)-@cplx1))/(@fncpc2(appcb3)*(@fncp3(znewb3)^@excplx3+@cplx4)+(@fncpc3(appcb3)-@cplx2)) )^@excplx1-@cplx3 elseif (@selcplx==2) za1=( (@fncp1(znewa1)*@fncp2(znewa1)^@excplx2+(@fncpc1(appca1)-@cplx1))/(@cplx5*@fncp3(znewa1)^@excplx3+(@fncpc2(appca1)-@cplx2)) )^@excplx1-@cplx3*@fncp4(znewa1)+@cplx4 za2=( (@fncp1(znewa2)*@fncp2(znewa2)^@excplx2+(@fncpc1(appca2)-@cplx1))/(@cplx5*@fncp3(znewa2)^@excplx3+(@fncpc2(appca2)-@cplx2)) )^@excplx1-@cplx3*@fncp4(znewa2)+@cplx4 za3=( (@fncp1(znewa3)*@fncp2(znewa3)^@excplx2+(@fncpc1(appca3)-@cplx1))/(@cplx5*@fncp3(znewa3)^@excplx3+(@fncpc2(appca3)-@cplx2)) )^@excplx1-@cplx3*@fncp4(znewa3)+@cplx4 zb1=( (@fncp1(znewb1)*@fncp2(znewb1)^@excplx2+(@fncpc1(appcb1)-@cplx1))/(@cplx5*@fncp3(znewb1)^@excplx3+(@fncpc2(appcb1)-@cplx2)) )^@excplx1-@cplx3*@fncp4(znewb1)+@cplx4 zb2=( (@fncp1(znewb2)*@fncp2(znewb2)^@excplx2+(@fncpc1(appcb2)-@cplx1))/(@cplx5*@fncp3(znewb2)^@excplx3+(@fncpc2(appcb2)-@cplx2)) )^@excplx1-@cplx3*@fncp4(znewb2)+@cplx4 zb3=( (@fncp1(znewb3)*@fncp2(znewb3)^@excplx2+(@fncpc1(appcb3)-@cplx1))/(@cplx5*@fncp3(znewb3)^@excplx3+(@fncpc2(appcb3)-@cplx2)) )^@excplx1-@cplx3*@fncp4(znewb3)+@cplx4 endif elseif (@select==5);------------------Mandelbrot Qud-------------------------- za1=@qud1*(@fnqud1(znewa1)^@exqud1)+@qud3*@fnqud2(znewa1)^@exqud2+@fnqud4(appca1)+real(@qud2)*@fnqud3(znewa1)^imag(@qud2) za2=@qud1*(@fnqud1(znewa2)^@exqud1)+@qud3*@fnqud2(znewa2)^@exqud2+@fnqud4(appca2)+real(@qud2)*@fnqud3(znewa2)^imag(@qud2) za3=@qud1*(@fnqud1(znewa3)^@exqud1)+@qud3*@fnqud2(znewa3)^@exqud2+@fnqud4(appca3)+real(@qud2)*@fnqud3(znewa3)^imag(@qud2) zb1=@qud1*(@fnqud1(znewb1)^@exqud1)+@qud3*@fnqud2(znewb1)^@exqud2+@fnqud4(appcb1)+real(@qud2)*@fnqud3(znewb1)^imag(@qud2) zb2=@qud1*(@fnqud1(znewb2)^@exqud1)+@qud3*@fnqud2(znewb2)^@exqud2+@fnqud4(appcb2)+real(@qud2)*@fnqud3(znewb2)^imag(@qud2) zb3=@qud1*(@fnqud1(znewb3)^@exqud1)+@qud3*@fnqud2(znewb3)^@exqud2+@fnqud4(appcb3)+real(@qud2)*@fnqud3(znewb3)^imag(@qud2) elseif (@select==6);------------------Magnet---------------------------------- zna1=@fnmag1(znewa1) zna2=@fnmag1(znewa2) zna3=@fnmag1(znewa3) znb1=@fnmag1(znewb1) znb2=@fnmag1(znewb2) znb3=@fnmag1(znewb3) cna1=@fnmag2(appca1) cna2=@fnmag2(appca2) cna3=@fnmag2(appca3) cnb1=@fnmag2(appcb1) cnb2=@fnmag2(appcb2) cnb3=@fnmag2(appcb3) za1=( (zna1^@exmag1+cna1)/(@mag1*zna1^@exmag2-1) )-( (@mag2*cna1+@mag3) )/( @mag4*(real(@exmag3)*(zna1))^imag(@exmag3)+@mag5+@mag6*cna1 ) za2=( (zna2^@exmag1+cna2)/(@mag1*zna2^@exmag2-1) )-( (@mag2*cna2+@mag3) )/( @mag4*(real(@exmag3)*(zna2))^imag(@exmag3)+@mag5+@mag6*cna2 ) za3=( (zna3^@exmag1+cna3)/(@mag1*zna3^@exmag2-1) )-( (@mag2*cna3+@mag3) )/( @mag4*(real(@exmag3)*(zna3))^imag(@exmag3)+@mag5+@mag6*cna3 ) zb1=( (znb1^@exmag1+cnb1)/(@mag1*znb1^@exmag2-1) )-( (@mag2*cnb1+@mag3) )/( @mag4*(real(@exmag3)*(znb1))^imag(@exmag3)+@mag5+@mag6*cnb1 ) zb2=( (znb2^@exmag1+cnb2)/(@mag1*znb2^@exmag2-1) )-( (@mag2*cnb2+@mag3) )/( @mag4*(real(@exmag3)*(znb2))^imag(@exmag3)+@mag5+@mag6*cnb2 ) zb3=( (znb3^@exmag1+cnb3)/(@mag1*znb3^@exmag2-1) )-( (@mag2*cnb3+@mag3) )/( @mag4*(real(@exmag3)*(znb3))^imag(@exmag3)+@mag5+@mag6*cnb3 ) endif ;------------------------------------Define Second Distortion------------------- za1=za1+@mdis3*(@fnzdis(a1)*@fntemp(tempa1))^real(@m3z)*imag(@m3z) za2=za2+@mdis3*(@fnzdis(a2)*@fntemp(tempa2))^real(@m3z)*imag(@m3z) za3=za3+@mdis3*(@fnzdis(a3)*@fntemp(tempa3))^real(@m3z)*imag(@m3z) zb1=zb1+@mdis3*(@fnzdis(b1)*@fntemp(tempb1))^real(@m3z)*imag(@m3z) zb2=zb2+@mdis3*(@fnzdis(b2)*@fntemp(tempb2))^real(@m3z)*imag(@m3z) zb3=zb3+@mdis3*(@fnzdis(b3)*@fntemp(tempb3))^real(@m3z)*imag(@m3z) tempa1=znewa1+appca1*@m2c tempa2=znewa2+appca2*@m2c tempa3=znewa3+appca3*@m2c tempb1=znewb1+appcb1*@m2c tempb2=znewb2+appcb2*@m2c tempb3=znewb3+appcb3*@m2c ;---------------------------Global Z Parameters--------------------------------- za1=@fnglo(za1)^@glo1 za2=@fnglo(za2)^@glo1 za3=@fnglo(za3)^@glo1 zb1=@fnglo(zb1)^@glo1 zb2=@fnglo(zb2)^@glo1 zb3=@fnglo(zb3)^@glo1 ;-------------------------------Hypercomplex Result----------------------------- zr1=(real(za1)+real(zb1))/2 zr2=(real(za2)+real(zb2))/2 zr3=(real(za3)+real(zb3))/2 zi1=(imag(za1)+imag(zb1))/2 zi2=(imag(za2)+imag(zb2))/2 zi3=(imag(za3)+imag(zb3))/2 wr1=(imag(za1)-imag(zb1))/2 wr2=(imag(za2)-imag(zb2))/2 wr3=(imag(za3)-imag(zb3))/2 wi1=(real(zb1)-real(za1))/2 wi2=(real(zb2)-real(za2))/2 wi3=(real(zb3)-real(za3))/2 ;-------------------------------Z, W-------------------------------------------- zf1=zr1+flip(zi1) zf2=zr2+flip(zi2) zf3=zr3+flip(zi3) w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) ;--------------------------Flavor----------------------------------------------- z1=@fnfl1(zf1)*@fl1+@fl2 z2=@fnfl1(zf2)*@fl1+@fl2 z3=@fnfl1(zf3)*@fl1+@fl2 ;---------------Slope Section--------------------------------------------------- if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zf1|+|w1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else z = z1 endif if ( @bailout < |zf1|+|w1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done > 0 Default: Title="SlopeHyperDistortion" maxiter=250 periodicity=0 method=multipass Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="current Mode" default=0 enum="Mandelbrot""Julia" visible=false endparam param switchmode caption="Switch Mode" default=1 enum="Mandelbrot""Julia" visible=false endparam Heading caption="Bailout and Planes" Endheading param bailout caption="Bailout Value" default=128.0 min=0.0 endparam param plane caption="Select JuliBrot Plane" enum="xy""xw""xz""yw""yz" default=0 endparam param planevar caption="Variation Hyper Plane" enum="xy""zw""xw""yz" default=0 endparam param startseed caption="Start|Seed Value" default=(0.0,0.0) endparam Heading caption="Flavor" show=false Endheading param fl1 caption="Mult. Z Flavor" default=(1.0,0.0) endparam param fl2 caption="Add. Z Flavor" default=(0.0,0.0) endparam func fnfl1 caption="Func. Flavor Z" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading float param offset caption="Orbit Separation" default=1.0e-8 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." endparam Heading caption="Rotations" show=false Endheading param rotx caption="Rotation YZ" default=0 min=-360 max=360 endparam param roty caption="Rotation XZ" default=0 min=-360 max=360 endparam param rotw caption="Rotation XW" default=0 min=-360 max=360 endparam param rotwy caption="Rotation YW" default=0 min=-360 max=360 endparam param rotz caption="Rotation XY" default=0 min=-360 max=360 endparam Heading caption="C Sequence" show=false Endheading param seq caption="Sequence" enum="1""2""3" default=0 endparam param fact1 caption="Factor 1" default=(0.0,0.0) endparam param fact2 caption="Factor 2" default=(0.0,0.0) endparam param fact3 caption="Factor 3" default=(1.0,0.0) endparam param fact4 caption="Factor 4" default=(1.0,0.0) endparam func fnfact1 caption="Func. Factor 1" default=ident() endfunc func fnfact2 caption="Func. Factor 2" default=ident() endfunc Heading caption="Set" Endheading param select caption="Select Formula" enum="Mandelbrot""Ikenaga""Barnsley""Fgz""CplxSpirals""MandelbrotQud""Magnet" default=0 endparam param hyp1 caption="Hyper" default=(0.0,0.0) endparam param hyp2 caption="JuliaDim" default=(0.0,0.0) visible=(@mode=="Julia") endparam param ex1 caption="1st. Exp" default=(1.0,0.0) endparam Heading caption="Mandelbrot" visible=(@select==0) Endheading param power caption="Exponent Mandelbrot" default=(2.0,0.0) visible=(@select==0) endparam param mand3 caption="Mandelbrot Param." default=(0.0,0.0) visible=(@select==0) endparam param mand1 caption="Start Double Exp." default=(0.0,0.0) visible=(@select==0) endparam param mand2 caption="Double Exp." default=(0.5,0.0) visible=(@select==0) enabled=(@mand1!=0) endparam func fnm1 caption="Func. 1Z" default=ident() visible=(@select==0) endfunc func fnm2 caption="Func. 2Z" default=ident() visible=(@select==0)&&(@mand1!=0) endfunc func fnm3 caption="Func. C" default=ident() visible=(@select==0) endfunc Heading caption="Ikenaga" visible=(@select==1) Endheading param ike1 caption="Ikenaga 1" default=(1.0,0.0) visible=(@select==1) endparam param ike2 caption="Ikenaga 2" default=(1.0,0.0) visible=(@select==1) endparam param ike4 caption="Ikenaga 3" default=(1.0,0.0) visible=(@select==1) endparam param ike3 caption="Exp. Ikenaga" default=(3.0,0.0) visible=(@select==1) endparam func fnik1 caption="Func. 1Z" default=ident() visible=(@select==1) endfunc func fnik2 caption="Func. 2Z" default=ident() visible=(@select==1) endfunc func fnik3 caption="Func. 1C" default=ident() visible=(@select==1) endfunc func fnik4 caption="Func. 2C" default=ident() visible=(@select==1) endfunc Heading caption="Barnsley" visible=(@select==2) Endheading param bar1 caption="Barnsley 1" default=(1.0,0.0) visible=(@select==2) endparam param bar2 caption="Barnsley 2" default=(1.0,0.0) visible=(@select==2) endparam param bar3 caption="Barnsley 3" default=(1.0,0.0) visible=(@select==2) endparam param bar4 caption="Barnsley 4" default=(1.0,0.0) visible=(@select==2) endparam func fnb1 caption="Func. 1Z" default=ident() visible=(@select==2) endfunc func fnb2 caption="Func. 2Z" default=ident() visible=(@select==2) endfunc func fnb3 caption="Func. 1C" default=ident() visible=(@select==2) endfunc func fnb4 caption="Func. 2C" default=ident() visible=(@select==2) endfunc Heading caption="Fgz" visible=(@select==3) Endheading param exfgz1 caption="Fgz Exp. 1" default=(2.0,0.0) visible=(@select==3) endparam param exfgz2 caption="Fgz Exp. 2" default=(2.0,0.0) visible=(@select==3) endparam param exfgz3 caption="Fgz Exp. 3" default=(2.0,0.0) visible=(@select==3) endparam param fgz1 caption="Fgz Param. 1" default=(3.0,0.0) visible=(@select==3) endparam param fgz2 caption="Fgz Param. 2" default=(3.0,0.0) visible=(@select==3) endparam param fgz3 caption="Fgz Param. 3" default=(0.0,0.0) visible=(@select==3) endparam param fgz4 caption="Fgz Param. 4" default=(0.0,0.0) visible=(@select==3) endparam param fgzc1 caption="Fgz Param. 1C" default=(1.0,0.0) visible=(@select==3) endparam param fgzc2 caption="Fgz Param. 2C" default=(1.0,0.0) visible=(@select==3) endparam param fgzc3 caption="Fgz Param. 3C" default=(1.0,0.0) visible=(@select==3) endparam param fgzc4 caption="Fgz Param. 4C" default=(1.0,0.0) visible=(@select==3) endparam func fngz1 caption="Func. 1Z" default=ident() visible=(@select==3) endfunc func fngz2 caption="Func. 2Z" default=ident() visible=(@select==3) endfunc func fngz3 caption="Func. 3Z" default=ident() visible=(@select==3) endfunc func fngzc1 caption="Func. 1C" default=ident() visible=(@select==3) endfunc func fngzc2 caption="Func. 2C" default=ident() visible=(@select==3) endfunc func fngzc3 caption="Func. 3C" default=ident() visible=(@select==3) endfunc func fngzc4 caption="Func. 4C" default=ident() visible=(@select==3) endfunc Heading caption="CplxSpirals" visible=(@select==4) Endheading param selcplx caption="Select Formula" enum="Cplx Spirals""Cplx Spirals 2""Mini Mand" default=0 visible=(@select==4) endparam param cplx1 caption="Cplx Param. 1" default=(1.0,0.0) visible=(@select==4) endparam param cplx2 caption="Cplx Param. 2" default=(2.0,0.0) visible=(@select==4) endparam param cplx3 caption="Cplx Param. 3" default=(2.0,0.0) visible=(@select==4) endparam param cplx4 caption="Cplx Param. 4" default=(1.0,0.0) visible=(@select==4) endparam param cplx5 caption="Cplx Param. 5" default=(2.0,0.0) visible=(@select==4)&&(@selcplx==2) endparam param excplx1 caption="Cplx Exp. 1" default=(2.0,0.0) visible=(@select==4) endparam param excplx2 caption="Cplx Exp. 2" default=(1.0,0.0) visible=(@select==4) endparam param excplx3 caption="Cplx Exp. 3" default=(1.0,0.0) visible=(@select==4) endparam func fncp1 caption="Func. 1Z" default=ident() visible=(@select==4) endfunc func fncp2 caption="Func. 2Z" default=ident() visible=(@select==4) endfunc func fncp3 caption="Func. 3Z" default=ident() visible=(@select==4) endfunc func fncp4 caption="Func. 4Z" default=ident() visible=(@select==4)&&(@selcplx==2) endfunc func fncpc1 caption="Func. 1C" default=ident() visible=(@select==4) endfunc func fncpc2 caption="Func. 2C" default=ident() visible=(@select==4) endfunc func fncpc3 caption="Func. 3C" default=ident() visible=(@select==4)&&(@selcplx!=2) endfunc Heading caption="MandelbrotQud" visible=(@select==5) Endheading param qud1 caption="MQud. 1" default=(0.2,0.0) visible=(@select==5) endparam param qud2 caption="MQud. 2" default=(0.0,0.0) visible=(@select==5) endparam param qud3 caption="MQud. 3" default=(1.0,0.0) visible=(@select==5) endparam param exqud1 caption="Exp. Qud. 1" default=(3.0,0.0) visible=(@select==5) endparam param exqud2 caption="Exp. Qud. 2" default=(2.0,0.0) visible=(@select==5) endparam func fnqud1 caption="Func. 1Z" default=ident() visible=(@select==5) endfunc func fnqud2 caption="Func. 2Z" default=ident() visible=(@select==5) endfunc func fnqud3 caption="Func. 3Z" default=ident() visible=(@select==5) endfunc func fnqud4 caption="Func. 1C" default=ident() visible=(@select==5) endfunc Heading caption="Magnet" visible=(@select==6) Endheading param mag1 caption="Magnet 1" default=(1.0,0.0) visible=(@select==6) endparam param mag2 caption="Magnet 2" default=(1.0,0.0) visible=(@select==6) endparam param mag3 caption="Magnet 3" default=(1.0,0.0) visible=(@select==6) endparam param mag4 caption="Magnet 4" default=(1.0,0.0) visible=(@select==6) endparam param mag5 caption="Magnet 5" default=(1.0,0.0) visible=(@select==6) endparam param mag6 caption="Magnet 6" default=(0.0,0.0) visible=(@select==6) endparam param exmag1 caption="Exp. Magnet 1" default=(1.0,0.0) visible=(@select==6) endparam param exmag2 caption="Exp. Magnet 2" default=(1.0,0.0) visible=(@select==6) endparam param exmag3 caption="Param. Magnet" default=(1.0,1.0) visible=(@select==6) endparam func fnmag1 caption="Func. 1Z" default=ident() visible=(@select==6) endfunc func fnmag2 caption="Func. 1C" default=ident() visible=(@select==6) endfunc Heading caption="First Method Distortion" Endheading param opdis caption="Operator Dist" enum="First + Second""First - Second""First * Second""First / Second" default=0 enabled=(@mdis!=0.0) endparam param mdis caption="Start 1st. Dist." default=(0.0,0.0) endparam param mdis1 caption="Mult. First Equation" default=(0.5,0.0) enabled=(@mdis!=0.0) endparam param mdis2 caption="Mult. Second Equation" default=(-0.3,0.0) enabled=(@mdis!=0.0) endparam Heading caption="First Equation Distortion 'Z^exp+C+Z'" Endheading param exdis1 caption="Exp. Dist 1st." default=(1.0,0.0) enabled=(@mdis!=0.0) endparam param mult1 caption="Mult. Z" default=(1.0,0.0) enabled=(@mdis!=0.0) endparam param cdis1 caption="Mult. C" default=(1.0,0.0) enabled=(@mdis!=0.0) endparam param add1 caption="Add. Z" default=(0.0,0.0) enabled=(@mdis!=0.0) endparam func fndis1 caption="Func.Dist 1Z" default=ident() enabled=(@mdis!=0.0) endfunc func fndis3 caption="Func.Dist 1C" default=ident() enabled=(@mdis!=0.0) endfunc Heading caption="Second Equation Distortion 'Z^exp+C+Z'" Endheading param exdis2 caption="Exp. Dist 2nd." default=(1.0,0.0) enabled=(@mdis!=0.0) endparam param mult2 caption="Mult. Z" default=(1.0,0.0) enabled=(@mdis!=0.0) endparam param cdis2 caption="Mult. C" default=(1.0,0.0) enabled=(@mdis!=0.0) endparam param add2 caption="Add. Z" default=(0.0,0.0) enabled=(@mdis!=0.0) endparam func fndis2 caption="Func.Dist 2Z" default=ident() enabled=(@mdis!=0.0) endfunc func fndis4 caption="Func.Dist 2C" default=ident() enabled=(@mdis!=0.0) endfunc Heading caption="Second Method Distortion" Endheading param mdis3 caption="Start 2nd. Dist." default=(0.0,0.0) endparam param m3z caption="Parameter" default=(1.0,1.0) enabled=(@mdis3!=0) endparam param m2c caption="Mult. C" default=(0.0,0.0) enabled=(@mdis3!=0) endparam func fnzdis caption="Func. Z" default=ident() enabled=(@mdis3!=0) endfunc func fntemp caption="Func. Temp." default=ident() enabled=(@mdis3!=0) endfunc Heading caption="Global Section" Endheading param glo1 caption="Exponent" default=(1.0,0.0) endparam func fnz caption="Start Func. Z" default=ident() endfunc func fnc caption="Start Func. C" default=ident() endfunc func fnglo caption="Func. Global" default=ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperDistortion" @startseed=#pixel mode=@switchmode switchmode=@mode bailout=@bailout plane=@plane planevar=@planevar fl1=@fl1 fl2=@fl2 fnfl1=@fnfl1 select=@select seq=@seq fact1=@fact1 fact2=@fact2 fact3=@fact3 fact4=@fact4 fnfact1=@fnfact1 fnfact2=@fnfact2 opdis=@opdis hyp1=@hyp1 hyp2=@hyp2 ex1=@ex1 ex2=@ex2 ike1=@ike1 ike2=@ike2 ike3=@ike3 ike4=@ike4 bar1=@bar1 bar2=@bar2 bar3=@bar3 bar4=@bar4 exfgz1=@exfgz1 exfgz2=@exfgz2 exfgz3=@exfgz3 fgz1=@fgz1 fgz2=@fgz2 fgz3=@fgz3 fgz4=@fgz4 fgzc1=@fgzc1 fgzc2=@fgzc2 fgzc3=@fgzc3 fgzc4=@fgzc4 selcplx=@selcplx cplx1=@cplx1 cplx2=@cplx2 cplx3=@cplx3 cplx4=@cplx4 cplx5=@cplx5 excplx1=@excplx1 excplx2=@excplx2 excplx3=@excplx3 qud1=@qud1 qud2=@qud2 qud3=@qud3 exqud1=@exqud1 exqud2=@exqud2 fnqud1=@fnqud1 fnqud2=@fnqud2 fnqud3=@fnqud3 fnqud4=@fnqud4 mag1=@mag1 mag2=@mag2 mag3=@mag3 mag4=@mag4 mag5=@mag5 mag6=@mag6 exmag1=@exmag1 exmag2=@exmag2 exmag3=@exmag3 fnmag1=@fnmag1 fnmag2=@fnmag2 exdis1=@exdis1 exdis2=@exdis2 power=@power mand1=@mand1 mand2=@mand2 mand3=@mand3 glo1=@glo1 mdis=@mdis mdis1=@mdis1 mdis2=@mdis2 mdis3=@mdis3 cdis1=@cdis1 cdis2=@cdis2 mult1=@mult1 mult2=@mult2 add1=@add1 add2=@add2 m2c=@m2c m3z=@m3z rotx=@rotx roty=@roty rotw=@rotw rotz=@rotz rotwy=@rotwy fndis1=@fndis1 fndis2=@fndis2 fndis3=@fndis3 fndis4=@fndis4 fnzdis=@fnzdis fntemp=@fntemp fnz=@fnz fnc=@fnc fnglo=@fnglo fnm1=@fnm1 fnm2=@fnm2 fnm3=@fnm3 fnik1=@fnik1 fnik2=@fnik2 fnik3=@fnik3 fnik4=@fnik4 fnb1=@fnb1 fnb2=@fnb2 fnb3=@fnb3 fnb4=@fnb4 fngz1=@fngz1 fngz2=@fngz2 fngz3=@fngz3 fngzc1=@fngzc1 fngzc2=@fngzc2 fngzc3=@fngzc3 fngzc4=@fngzc4 fncp1=@fncp1 fncp2=@fncp2 fncp3=@fncp3 fncp4=@fncp4 fncpc1=@fncpc1 fncpc2=@fncpc2 fncpc3=@fncpc3 version=@version offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperDistortionScenario { ; Hypercomplex Mandelbrot, Phoenix and Barnsley set. ; With the "Select Scenario" you can modulate the set, if "modBy" > "Compare" are able both Param1, 2, 3, 4 in "Parameters Sections" or Phoenix 2 in Distortion Section ; try for example modby = 1.1 or 3 or 4 or 1.6 ; but look that working with modby and modcompare you can also run into the default result, so try to change modby ; and ModCompare with decimals or also (modby 4 , compare 2) but for example using modby=4 modCompare=3 is the default result ; so are able only params 1 and 3 in default. ; Remeber to play also with modulated parameter and all the scenario section. ; There are distortion sections based on Phoenix and Barnsley ; and from the basic Mandelbrot you can change the sets using Phoenix or Barnsley for example. ; For basic Phoenix set use: ; From the default parameters must change, ; In "Distortion" section : "Phoenix1" = (0.5,0.0) ; For basic Barnsley set use: ; From the default parameters must change : ; In "Parameters" section : "Exp" = (1.0,0.0) and "Param1" = (0.0,0.0) ; In "Distortion" section : "Start Barnsley" = (1.0,0.0) and "Mix Barnsley" = (0.0,0.0) ; or you can start only with the distortion of Barnsley for example from the starting point change only Start Barnsley = 1.0 in Distortion Section ; Compound with Mandelbrot Bc3 of Mr. Jim Muth ; Andrea Spinozzi(Giugno 2022) Init: z1=z2=z3=0.0 zz1=zz2=zz3=0.0 w1=w2=w3=0.0 za1=za2=za3=0.0 zb1=zb2=zb3=0.0 cca1=cca2=cca3=0.0 ccb1=ccb2=ccb3=0.0 ya1=ya2=ya3=0.0 yb1=yb2=yb3=0.0 cc1=#pixel cc2=cc1+@offset cc3=cc1+flip(@offset) cw1=cw2=cw3=@hyp1 if (@mode=="Julia") zz1=#pixel zz2=zz1+@offset zz3=zz1+flip(@offset) cc1=cc2=cc3=@seed w1=w2=w3=@hyp2 cw1=cw2=cw3=@hyp1 endif ;---------------------------Define the HyperComplex planes---------------------- cr1=real(cc1) cr2=real(cc2) cr3=real(cc3) ci1=imag(cc1) ci2=imag(cc2) ci3=imag(cc3) zr1=real(zz1) zr2=real(zz2) zr3=real(zz3) zi1=imag(zz1) zi2=imag(zz2) zi3=imag(zz3) wr1=real(w1) wr2=real(w2) wr3=real(w3) wi1=imag(w1) wi2=imag(w2) wi3=imag(w3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) ca1= cr1-cwi1+flip(ci1+cwr1) ca2= cr2-cwi2+flip(ci2+cwr2) ca3= cr3-cwi3+flip(ci3+cwr3) cb1= cr1+cwi1+flip(ci1-cwr1) cb2= cr2+cwi2+flip(ci2-cwr2) cb3= cr3+cwi3+flip(ci3-cwr3) ;----------------------C Sequence e Scenario------------------------------------ int modby=@seq+2 int iter=0 float iter1=0 ;----------------Function Double Exp Modified----------------------------------- complex func doubleExp1(const complex x1) f1=x1^@exp+x1*@mult return (@arg0*((f1^@arg1)^(-@arg1))) endfunc complex func doubleExp2(const complex x2) f2=x2^@exp+x2*@mult return (@arg0*((f2^@arg1)^(-@arg1))) endfunc complex func doubleExp3(const complex x3) f3=x3^@exp+x3*@mult return (@arg0*((f3^@arg1)^(-@arg1))) endfunc ;----------------------Initialize the Slope parameters and vectors-------------- int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 Loop: int method=iter%modby float iter1=iter1+@addIter modulation=abs(iter1%@modulated) a1=zr1-wi1+flip(zi1+wr1) a2=zr2-wi2+flip(zi2+wr2) a3=zr3-wi3+flip(zi3+wr3) b1=zr1+wi1+flip(zi1-wr1) b2=zr2+wi2+flip(zi2-wr2) b3=zr3+wi3+flip(zi3-wr3) a1=@fnz0(a1) a2=@fnz0(a2) a3=@fnz0(a3) b1=@fnz0(b1) b2=@fnz0(b2) b3=@fnz0(b3) ca1=@fnc0(ca1) ca2=@fnc0(ca2) ca3=@fnc0(ca3) cb1=@fnc0(cb1) cb2=@fnc0(cb2) cb3=@fnc0(cb3) if method==0 cca1=(@fnc1(ca1)+@pc3)*@pc1 cca2=(@fnc1(ca2)+@pc3)*@pc1 cca3=(@fnc1(ca3)+@pc3)*@pc1 ccb1=(@fnc1(cb1)+@pc3)*@pc1 ccb2=(@fnc1(cb2)+@pc3)*@pc1 ccb3=(@fnc1(cb3)+@pc3)*@pc1 elseif method==1 cca1=(@fnc2(ca1)+@pc4)*@pc2 cca2=(@fnc2(ca2)+@pc4)*@pc2 cca3=(@fnc2(ca3)+@pc4)*@pc2 ccb1=(@fnc2(cb1)+@pc4)*@pc2 ccb2=(@fnc2(cb2)+@pc4)*@pc2 ccb3=(@fnc2(cb3)+@pc4)*@pc2 endif olda1=a1 olda2=a2 olda3=a3 oldb1=b1 oldb2=b2 oldb3=b3 if (iter1%@modby)<=@modcomp za1=(@fnz1(a1))^@expM+doubleExp1(a1)+@p5+@fnc3(cca1)*@p1+ya1*@p3 za2=(@fnz1(a2))^@expM+doubleExp2(a2)+@p5+@fnc3(cca2)*@p1+ya2*@p3 za3=(@fnz1(a3))^@expM+doubleExp3(a3)+@p5+@fnc3(cca3)*@p1+ya3*@p3 zb1=(@fnz1(b1))^@expM+doubleExp1(b1)+@p5+@fnc3(ccb1)*@p1+yb1*@p3 zb2=(@fnz1(b2))^@expM+doubleExp2(b2)+@p5+@fnc3(ccb2)*@p1+yb2*@p3 zb3=(@fnz1(b3))^@expM+doubleExp3(b3)+@p5+@fnc3(ccb3)*@p1+yb3*@p3 elseif (iter1%@modby)>@modcomp za1=(@fnz2(a1))^@expM+doubleExp1(a1)+@p6-@fnc4(cca1)*@p2+ya1*@p4 za2=(@fnz2(a2))^@expM+doubleExp2(a2)+@p6-@fnc4(cca2)*@p2+ya2*@p4 za3=(@fnz2(a3))^@expM+doubleExp3(a3)+@p6-@fnc4(cca3)*@p2+ya3*@p4 zb1=(@fnz2(b1))^@expM+doubleExp1(b1)+@p6-@fnc4(ccb1)*@p2+yb1*@p4 zb2=(@fnz2(b2))^@expM+doubleExp2(b2)+@p6-@fnc4(ccb2)*@p2+yb2*@p4 zb3=(@fnz2(b3))^@expM+doubleExp3(b3)+@p6-@fnc4(ccb3)*@p2+yb3*@p4 endif if (real(a1)<|iter1|) a1=za1-modulation*@skip a2=za2-modulation*@skip a3=za3-modulation*@skip else a1=za1+modulation*@skip a2=za2+modulation*@skip a3=za3+modulation*@skip endif if (real(b1)<|iter1|) b1=zb1-modulation*@skip b2=zb2-modulation*@skip b3=zb3-modulation*@skip else b1=zb1+modulation*@skip b2=zb2+modulation*@skip b3=zb3+modulation*@skip endif ya1=@fndist(olda1) ya2=@fndist(olda2) ya3=@fndist(olda3) yb1=@fndist(oldb1) yb2=@fndist(oldb2) yb3=@fndist(oldb3) if real(a1)>=0 aBarn1=((a1-@bar1)*cca1)*@barnsley1 aBarn2=((a2-@bar1)*cca2)*@barnsley1 aBarn3=((a3-@bar1)*cca3)*@barnsley1 else aBarn1=((a1+@bar2)*cca1)*@barnsley2 aBarn2=((a2+@bar2)*cca2)*@barnsley2 aBarn3=((a3+@bar2)*cca3)*@barnsley2 endif if real(b1)>=0 bBarn1=((b1-@bar1)*ccb1)*@barnsley1 bBarn2=((b2-@bar1)*ccb2)*@barnsley1 bBarn3=((b3-@bar1)*ccb3)*@barnsley1 else bBarn1=((b1+@bar2)*ccb1)*@barnsley2 bBarn2=((b2+@bar2)*ccb2)*@barnsley2 bBarn3=((b3+@bar2)*ccb3)*@barnsley2 endif a1=@mixBarn*a1+@pbarn1*aBarn1 a2=@mixBarn*a2+@pbarn1*aBarn2 a3=@mixBarn*a3+@pbarn1*aBarn3 b1=@mixBarn*b1+@pbarn1*bBarn1 b2=@mixBarn*b2+@pbarn1*bBarn2 b3=@mixBarn*b3+@pbarn1*bBarn3 zr1=(real(a1)+real(b1))/2 zr2=(real(a2)+real(b2))/2 zr3=(real(a3)+real(b3))/2 zi1=(imag(a1)+imag(b1))/2 zi2=(imag(a2)+imag(b2))/2 zi3=(imag(a3)+imag(b3))/2 wr1=((imag(a1)-imag(b1))/2) wr2=((imag(a2)-imag(b2))/2) wr3=((imag(a3)-imag(b3))/2) wi1=((real(b1)-real(a1))/2) wi2=((real(b2)-real(a2))/2) wi3=((real(b3)-real(a3))/2) zf1=zr1+flip(zi1) zf2=zr2+flip(zi2) zf3=zr3+flip(zi3) w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) z1=@fnflav(zf1+@flav1)*@flav2 z2=@fnflav(zf2+@flav1)*@flav2 z3=@fnflav(zf3+@flav1)*@flav2 ;------------------Start the loop slope section--------------------------------- if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zf1|+|w1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else z = z1 endif if ( @bailout < |zf1|+|w1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done > 0 Default: title="SlopeHyperDistortionScenario" maxiter=250 periodicity=0 method=multipass Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param Bailout caption="Bailout Value" default=128.0 endparam param seed caption="Seed Value" default=(1.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param flav1 caption="Flavor 1" default=(0.0,0.0) endparam param flav2 caption="Flavor 2" default=(1.0,0.0) endparam func fnflav caption="Function Flavor" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading float param offset caption="Orbit Separation" default=1.0e-8 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." endparam Heading caption="C Sequence" show=false Endheading param seq caption="Lenght" enum="1""2""3" default=0 endparam param pc1 caption="Factor 1" default=(1.0,0.0) endparam param pc2 caption="Factor 2" default=(1.0,0.0) endparam param pc3 caption="Factor 3" default=(0.0,0.0) endparam param pc4 caption="Factor 4" default=(0.0,0.0) endparam func fnc1 caption="Func factor 1" default=ident() endfunc func fnc2 caption="Func factor 2" default=ident() endfunc Heading caption="Select Scenario" Endheading param addIter caption="Start Modulation" default=1.0 endparam param skip caption="Skip Modulation" default=1.0 endparam param modulated caption="modulated" default=1.0 endparam param modby caption="modBy" default=1.0 endparam param modcomp caption="Compare" default=1.0 endparam Heading caption="Hyper Parameters" Endheading param hyp1 caption="Hyper" default=(0.0,0.0) endparam param hyp2 caption="Julia Dimension" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Function Double Exp" Endheading param arg0 caption="Start Double Exp." default=(0.0,0.0) endparam param exp caption="Exp." default=(1.0,0.0) endparam param mult caption="Mult." default=(1.0,0.0) endparam param arg1 caption="Double Exp." default=(0.5,0.0) endparam Heading caption="Parameters Section" Endheading param expM caption="Exp." default=(2.0,0.0) endparam param p1 caption="Param. 1" default=(1.0,0.0) endparam param p2 caption="Param. 2" default=(1.0,0.0) endparam param p5 caption="Param. 3" default=(0.0,0.0) endparam param p6 caption="Param. 4" default=(0.0,0.0) endparam Heading caption="Distortion Section" endheading param p3 caption="Phoenix 1" default=(0.0,0.0) endparam param p4 caption="Phoenix 2" default=(0.0,0.0) endparam param pbarn1 caption="Start Barnsley" default=(0.0,0.0) endparam param mixBarn caption="Mix Barnsley" default=(1.0,0.0) visible=(@pbarn1!=0.0) endparam param bar1 caption="Def. Barnsley 1" default=(1.0,0.0) visible=(@pbarn1!=0.0) endparam param bar2 caption="Def. Barnsley 2" default=(1.0,0.0) visible=(@pbarn1!=0.0) endparam param barnsley1 caption="Barnsley 1" default=(1.0,0.0) visible=(@pbarn1!=0.0) endparam param barnsley2 caption="Barnsley 2" default=(1.0,0.0) visible=(@pbarn1!=0.0) endparam func fndist caption="Function Distortion" default=ident() endfunc Heading caption="Functions" Endheading func fnz0 caption="Function 1Z" default=ident() endfunc func fnz1 caption="Function 2Z" default=ident() endfunc func fnz2 caption="Function 3Z" default=ident() endfunc func fnc0 caption="Function 1C" default=ident() endfunc func fnc3 caption="Function 2C" default=ident() endfunc func fnc4 caption="Function 3C" default=ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperDistortionScenario" mode=@switchmode switchmode=@mode seed=#pixel modby=@modby modcomp=@modcomp modulated=@modulated skip=@skip addIter=@addIter exp=@exp mult=@mult arg0=@arg0 arg1=@arg1 hyp1=@hyp1 hyp2=@hyp2 expM=@expM p1=@p1 p2=@p2 p3=@p3 p4=@p4 p5=@p5 p6=@p6 mixBarn=@mixBarn pbarn1=@pbarn1 bar1=@bar1 bar2=@bar2 barnsley1=@barnsley1 barnsley2=@barnsley2 seq=@seq pc1=@pc1 pc2=@pc2 pc3=@pc3 pc4=@pc4 fnc0=@fnc0 fnc1=@fnc1 fnc2=@fnc2 fnc3=@fnc3 fnc4=@fnc4 fnz0=@fnz0 fnz1=@fnz1 fnz2=@fnz2 fndist=@fndist flav1=@flav1 flav2=@flav2 fnflav=@fnflav version=@version offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperDoubleExp { ; Slope Hypercomplex DoubleExp modification, the formula is based on a classic ; Mandelbrot set with double exp idea of Mr.Jim Muth but with a Phoenix iteration and distortion. ; If you use some sets like as add Z = ^Z and Final Op = * in Parameters Section remeber to change for example Final Mult. Distortion = 0.4 ; always in parameters section. ; AndreaSpinozzi(Giugno 2022) Global: complex rota[2] complex rota[0]=(0,1)^(@rota0/90) complex rota[1]=(0,1)^(@rota1/90) Init: aa1=aa2=aa3=bb1=bb2=bb3=0.0 aaa1=aaa2=aaa3=bbb1=bbb2=bbb3=0.0 appca1=appca2=appca3=appcb1=appcb2=appcb3=0.0 zz1=@rd1*real(#pixel)*rota[0]+flip(imag(#pixel)*rota[1]*@rd2) zz2=@rd1*real(#pixel+@offset)*rota[0]+flip(imag(#pixel+@offset)*rota[1]*@rd2) zz3=@rd1*real(#pixel+flip(@offset))*rota[0]+flip(imag(#pixel+flip(@offset))*rota[1]*@rd2) cz1=@rd3+@rd2*real(#pixel)*rota[0]+flip(imag(#pixel)*rota[1]*@rd1) cz2=@rd3+@rd2*real(#pixel+@offset)*rota[0]+flip(imag(#pixel+@offset)*rota[1]*@rd1) cz3=@rd3+@rd2*real(#pixel+flip(@offset))*rota[0]+flip(imag(#pixel+flip(@offset))*rota[1]*@rd1) w1=w2=w3=cw1=cw2=cw3=p1 if (@mode=="Julia") zz1=@rd1*real(#pixel)*rota[0]+flip(imag(#pixel)*rota[1]*@rd2) zz2=@rd1*real(#pixel+@offset)*rota[0]+flip(imag(#pixel+@offset)*rota[1]*@rd2) zz3=@rd1*real(#pixel+flip(@offset))*rota[0]+flip(imag(#pixel+flip(@offset))*rota[1]*@rd2) cz1=@rd3+@rd2*real(@seed)*rota[0]+flip(imag(@seed)*rota[1]*@rd1) cz2=@rd3+@rd2*real(@seed)*rota[0]+flip(imag(@seed)*rota[1]*@rd1) cz3=@rd3+@rd2*real(@seed)*rota[0]+flip(imag(@seed)*rota[1]*@rd1) w1=w2=w3=p2 cw1=cw2=cw3=p1 endif czr1=real(cz1) czr2=real(cz2) czr3=real(cz3) czi1=imag(cz1) czi2=imag(cz2) czi3=imag(cz3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) ca1=czr1-cwi1+flip(czi1+cwr1) ca2=czr2-cwi2+flip(czi2+cwr2) ca3=czr3-cwi3+flip(czi3+cwr3) cb1=czr1+cwi1+flip(czi1-cwr1) cb2=czr2+cwi2+flip(czi2-cwr2) cb3=czr3+cwi3+flip(czi3-cwr3) ;;; slope stuff int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 int modby=@seq+2 int iter=0 Loop: int method=iter%modby a1=real(zz1)-imag(w1)+flip(imag(zz1)+real(w1)) a2=real(zz2)-imag(w2)+flip(imag(zz2)+real(w2)) a3=real(zz3)-imag(w3)+flip(imag(zz3)+real(w3)) b1=real(zz1)+imag(w1)+flip(imag(zz1)-real(w1)) b2=real(zz2)+imag(w2)+flip(imag(zz2)-real(w2)) b3=real(zz3)+imag(w3)+flip(imag(zz3)-real(w3)) a1=@fnz(a1)^@expz*@mulz a2=@fnz(a2)^@expz*@mulz a3=@fnz(a3)^@expz*@mulz b1=@fnz(b1)^@expz*@mulz b2=@fnz(b2)^@expz*@mulz b3=@fnz(b3)^@expz*@mulz appca1=@fnc(ca1)^@expc*@mulc appca2=@fnc(ca2)^@expc*@mulc appca3=@fnc(ca3)^@expc*@mulc appcb1=@fnc(cb1)^@expc*@mulc appcb2=@fnc(cb2)^@expc*@mulc appcb3=@fnc(cb3)^@expc*@mulc if (method==0) appca1=@fnfact1(appca1+@factor)*@factor2 appca2=@fnfact1(appca2+@factor)*@factor2 appca3=@fnfact1(appca3+@factor)*@factor2 appcb1=@fnfact1(appcb1+@factor)*@factor2 appcb2=@fnfact1(appcb2+@factor)*@factor2 appcb3=@fnfact1(appcb3+@factor)*@factor2 else appca1=@fnfact2(appca1-@factor1)*@factor3 appca2=@fnfact2(appca2-@factor1)*@factor3 appca3=@fnfact2(appca3-@factor1)*@factor3 appcb1=@fnfact2(appcb1-@factor1)*@factor3 appcb2=@fnfact2(appcb2-@factor1)*@factor3 appcb3=@fnfact2(appcb3-@factor1)*@factor3 endif if (@select2==0) if (@select1==0) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)+fn2(appca1) aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)+fn2(appca2) aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)+fn2(appca3) bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)+fn2(appcb1) bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)+fn2(appcb2) bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)+fn2(appcb3) elseif (@select1==1) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)*fn2(appca1) aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)*fn2(appca2) aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)*fn2(appca3) bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)*fn2(appcb1) bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)*fn2(appcb2) bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)*fn2(appcb3) elseif (@select1==2) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)/fn2(appca1) aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)/fn2(appca2) aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)/fn2(appca3) bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)/fn2(appcb1) bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)/fn2(appcb2) bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)/fn2(appcb3) elseif (@select1==3) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)^fn2(appca1) aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)^fn2(appca2) aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)^fn2(appca3) bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)^fn2(appcb1) bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)^fn2(appcb2) bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)^fn2(appcb3) endif elseif (@select2==1) if (@select1==0) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)+fn2(appca1)+fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)+fn2(appca2)+fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)+fn2(appca3)+fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)+fn2(appcb1)+fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)+fn2(appcb2)+fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)+fn2(appcb3)+fn3(b3^@exp3)*@mult1 elseif (@select1==1) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)*fn2(appca1)+fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)*fn2(appca2)+fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)*fn2(appca3)+fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)*fn2(appcb1)+fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)*fn2(appcb2)+fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)*fn2(appcb3)+fn3(b3^@exp3)*@mult1 elseif (@select1==2) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)/fn2(appca1)+fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)/fn2(appca2)+fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)/fn2(appca3)+fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)/fn2(appcb1)+fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)/fn2(appcb2)+fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)/fn2(appcb3)+fn3(b3^@exp3)*@mult1 elseif (@select1==3) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)^fn2(appca1)+fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)^fn2(appca2)+fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)^fn2(appca3)+fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)^fn2(appcb1)+fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)^fn2(appcb2)+fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)^fn2(appcb3)+fn3(b3^@exp3)*@mult1 endif elseif (@select2==2) if (@select1==0) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)+fn2(appca1)*fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)+fn2(appca2)*fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)+fn2(appca3)*fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)+fn2(appcb1)*fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)+fn2(appcb2)*fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)+fn2(appcb3)*fn3(b3^@exp3)*@mult1 elseif (@select1==1) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)*fn2(appca1)*fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)*fn2(appca2)*fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)*fn2(appca3)*fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)*fn2(appcb1)*fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)*fn2(appcb2)*fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)*fn2(appcb3)*fn3(b3^@exp3)*@mult1 elseif (@select1==2) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)/fn2(appca1)*fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)/fn2(appca2)*fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)/fn2(appca3)*fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)/fn2(appcb1)*fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)/fn2(appcb2)*fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)/fn2(appcb3)*fn3(b3^@exp3)*@mult1 elseif (@select1==3) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)^fn2(appca1)*fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)^fn2(appca2)*fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)^fn2(appca3)*fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)^fn2(appcb1)*fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)^fn2(appcb2)*fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)^fn2(appcb3)*fn3(b3^@exp3)*@mult1 endif elseif (@select2==3) if (@select1==0) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)+fn2(appca1)/fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)+fn2(appca2)/fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)+fn2(appca3)/fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)+fn2(appcb1)/fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)+fn2(appcb2)/fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)+fn2(appcb3)/fn3(b3^@exp3)*@mult1 elseif (@select1==1) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)*fn2(appca1)/fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)*fn2(appca2)/fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)*fn2(appca3)/fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)*fn2(appcb1)/fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)*fn2(appcb2)/fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)*fn2(appcb3)/fn3(b3^@exp3)*@mult1 elseif (@select1==2) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)/fn2(appca1)/fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)/fn2(appca2)/fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)/fn2(appca3)/fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)/fn2(appcb1)/fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)/fn2(appcb2)/fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)/fn2(appcb3)/fn3(b3^@exp3)*@mult1 elseif (@select1==3) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)^fn2(appca1)/fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)^fn2(appca2)/fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)^fn2(appca3)/fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)^fn2(appcb1)/fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)^fn2(appcb2)/fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)^fn2(appcb3)/fn3(b3^@exp3)*@mult1 endif elseif (@select2==4) if (@select1==0) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)+fn2(appca1)^fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)+fn2(appca2)^fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)+fn2(appca3)^fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)+fn2(appcb1)^fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)+fn2(appcb2)^fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)+fn2(appcb3)^fn3(b3^@exp3)*@mult1 elseif (@select1==1) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)*fn2(appca1)^fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)*fn2(appca2)^fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)*fn2(appca3)^fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)*fn2(appcb1)^fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)*fn2(appcb2)^fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)*fn2(appcb3)^fn3(b3^@exp3)*@mult1 elseif (@select1==2) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)/fn2(appca1)^fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)/fn2(appca2)^fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)/fn2(appca3)^fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)/fn2(appcb1)^fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)/fn2(appcb2)^fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)/fn2(appcb3)^fn3(b3^@exp3)*@mult1 elseif (@select1==3) aa1=fn1(a1)^@exp1+(p3*(a1^@exp2)^(-@exp2))+@distor*@fndis1(aaa1)^fn2(appca1)^fn3(a1^@exp3)*@mult1 aa2=fn1(a2)^@exp1+(p3*(a2^@exp2)^(-@exp2))+@distor*@fndis1(aaa2)^fn2(appca2)^fn3(a2^@exp3)*@mult1 aa3=fn1(a3)^@exp1+(p3*(a3^@exp2)^(-@exp2))+@distor*@fndis1(aaa3)^fn2(appca3)^fn3(a3^@exp3)*@mult1 bb1=fn1(b1)^@exp1+(p3*(b1^@exp2)^(-@exp2))+@distor*@fndis1(bbb1)^fn2(appcb1)^fn3(b1^@exp3)*@mult1 bb2=fn1(b2)^@exp1+(p3*(b2^@exp2)^(-@exp2))+@distor*@fndis1(bbb2)^fn2(appcb2)^fn3(b2^@exp3)*@mult1 bb3=fn1(b3)^@exp1+(p3*(b3^@exp2)^(-@exp2))+@distor*@fndis1(bbb3)^fn2(appcb3)^fn3(b3^@exp3)*@mult1 endif endif if (@select==0) aaa1=@muld*(@fndis(a1)^@exdis+@move)+@move1+@fndisc(appca1) aaa2=@muld*(@fndis(a2)^@exdis+@move)+@move1+@fndisc(appca2) aaa3=@muld*(@fndis(a3)^@exdis+@move)+@move1+@fndisc(appca3) bbb1=@muld*(@fndis(b1)^@exdis+@move)+@move1+@fndisc(appcb1) bbb2=@muld*(@fndis(b2)^@exdis+@move)+@move1+@fndisc(appcb2) bbb3=@muld*(@fndis(b3)^@exdis+@move)+@move1+@fndisc(appcb3) elseif (@select==1) aaa1=@muld*(@fndis(a1)^@exdis+@move)+@move1-@fndisc(appca1) aaa2=@muld*(@fndis(a2)^@exdis+@move)+@move1-@fndisc(appca2) aaa3=@muld*(@fndis(a3)^@exdis+@move)+@move1-@fndisc(appca3) bbb1=@muld*(@fndis(b1)^@exdis+@move)+@move1-@fndisc(appcb1) bbb2=@muld*(@fndis(b2)^@exdis+@move)+@move1-@fndisc(appcb2) bbb3=@muld*(@fndis(b3)^@exdis+@move)+@move1-@fndisc(appcb3) elseif (@select==2) aaa1=@muld*(@fndis(a1)^@exdis+@move)+@move1*@fndisc(appca1) aaa2=@muld*(@fndis(a2)^@exdis+@move)+@move1*@fndisc(appca2) aaa3=@muld*(@fndis(a3)^@exdis+@move)+@move1*@fndisc(appca3) bbb1=@muld*(@fndis(b1)^@exdis+@move)+@move1*@fndisc(appcb1) bbb2=@muld*(@fndis(b2)^@exdis+@move)+@move1*@fndisc(appcb2) bbb3=@muld*(@fndis(b3)^@exdis+@move)+@move1*@fndisc(appcb3) elseif (@select==3) aaa1=@muld*(@fndis(a1)^@exdis+@move)*@fndisc(appca1)+@move1 aaa2=@muld*(@fndis(a2)^@exdis+@move)*@fndisc(appca2)+@move1 aaa3=@muld*(@fndis(a3)^@exdis+@move)*@fndisc(appca3)+@move1 bbb1=@muld*(@fndis(b1)^@exdis+@move)*@fndisc(appcb1)+@move1 bbb2=@muld*(@fndis(b2)^@exdis+@move)*@fndisc(appcb2)+@move1 bbb3=@muld*(@fndis(b3)^@exdis+@move)*@fndisc(appcb3)+@move1 elseif (@select==4) aaa1=@muld*(@fndis(a1)^@exdis+@move)+@move1/@fndisc(appca1) aaa2=@muld*(@fndis(a2)^@exdis+@move)+@move1/@fndisc(appca2) aaa3=@muld*(@fndis(a3)^@exdis+@move)+@move1/@fndisc(appca3) bbb1=@muld*(@fndis(b1)^@exdis+@move)+@move1/@fndisc(appcb1) bbb2=@muld*(@fndis(b2)^@exdis+@move)+@move1/@fndisc(appcb2) bbb3=@muld*(@fndis(b3)^@exdis+@move)+@move1/@fndisc(appcb3) elseif (@select==5) aaa1=@muld*(@fndis(a1)^@exdis+@move)/@fndisc(appca1)+@move1 aaa2=@muld*(@fndis(a2)^@exdis+@move)/@fndisc(appca2)+@move1 aaa3=@muld*(@fndis(a3)^@exdis+@move)/@fndisc(appca3)+@move1 bbb1=@muld*(@fndis(b1)^@exdis+@move)/@fndisc(appcb1)+@move1 bbb2=@muld*(@fndis(b2)^@exdis+@move)/@fndisc(appcb2)+@move1 bbb3=@muld*(@fndis(b3)^@exdis+@move)/@fndisc(appcb3)+@move1 elseif (@select==6) aaa1=@muld*(@fndis(a1)^@exdis+@move)^@fndisc(appca1)+@move1 aaa2=@muld*(@fndis(a2)^@exdis+@move)^@fndisc(appca2)+@move1 aaa3=@muld*(@fndis(a3)^@exdis+@move)^@fndisc(appca3)+@move1 bbb1=@muld*(@fndis(b1)^@exdis+@move)^@fndisc(appcb1)+@move1 bbb2=@muld*(@fndis(b2)^@exdis+@move)^@fndisc(appcb2)+@move1 bbb3=@muld*(@fndis(b3)^@exdis+@move)^@fndisc(appcb3)+@move1 elseif (@select==7) aaa1=@muld*(@fndis(a1)^@exdis+@move)+@move1^@fndisc(appca1) aaa2=@muld*(@fndis(a2)^@exdis+@move)+@move1^@fndisc(appca2) aaa3=@muld*(@fndis(a3)^@exdis+@move)+@move1^@fndisc(appca3) bbb1=@muld*(@fndis(b1)^@exdis+@move)+@move1^@fndisc(appcb1) bbb2=@muld*(@fndis(b2)^@exdis+@move)+@move1^@fndisc(appcb2) bbb3=@muld*(@fndis(b3)^@exdis+@move)+@move1^@fndisc(appcb3) endif if (@final==0) a1=(@mand1*aa1)+(@mand2*aaa1) a2=(@mand1*aa2)+(@mand2*aaa2) a3=(@mand1*aa3)+(@mand2*aaa3) b1=(@mand1*bb1)+(@mand2*bbb1) b2=(@mand1*bb2)+(@mand2*bbb2) b3=(@mand1*bb3)+(@mand2*bbb3) elseif (@final==1) a1=(@mand1*aa1)*(@mand2*aaa1) a2=(@mand1*aa2)*(@mand2*aaa2) a3=(@mand1*aa3)*(@mand2*aaa3) b1=(@mand1*bb1)*(@mand2*bbb1) b2=(@mand1*bb2)*(@mand2*bbb2) b3=(@mand1*bb3)*(@mand2*bbb3) endif zr1=(real(a1)+real(b1))/2 zr2=(real(a2)+real(b2))/2 zr3=(real(a3)+real(b3))/2 zi1=(imag(a1)+imag(b1))/2 zi2=(imag(a2)+imag(b2))/2 zi3=(imag(a3)+imag(b3))/2 wr1=(imag(a1)-imag(b1))/2 wr2=(imag(a2)-imag(b2))/2 wr3=(imag(a3)-imag(b3))/2 wi1=(real(b1)-real(a1))/2 wi2=(real(b2)-real(a2))/2 wi3=(real(b3)-real(a3))/2 zz1=zr1+flip(zi1) zz2=zr2+flip(zi2) zz3=zr3+flip(zi3) w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) z1=@fnfl(zz1+@fl1)*@fl2 z2=@fnfl(zz2+@fl1)*@fl2 z3=@fnfl(zz3+@fl1)*@fl2 if (@slope == true) ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zz1|+|w1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |zz1|+|w1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done>0 Default: title="SlopeHyperDoubleExp" maxiter=500 method=multipass periodicity=0 Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param Bailout caption="Bailout Value" default=1000.0 endparam param seed caption="Seed Value" default=(1.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param fl1 caption="Add Flavor" default=(0.0,0.0) endparam param fl2 caption="Mult. Flavor" default=(1.0,0.0) endparam func fnfl caption="Func. Flavor" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=0.00000001 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="Rotations" show=false Endheading param @rota0 caption="Rotation1" default=0 endparam param @rota1 caption="Rotation2" default=0 endparam Heading caption="3R Dimension" show=false Endheading param rd1 caption="3RDim.1" default=(1.0,0.0) endparam param rd2 caption="3RDim.2" default=(1.0,0.0) endparam param rd3 caption="3RDim.3" default=(0.0,0.0) endparam Heading caption="C Sequence" show=false Endheading param seq caption="C Method" enum="1""2""3" default=0 endparam param factor caption="Factor 1" default=(0.0,0.0) endparam param factor1 caption="Factor 2" default=(0.0,0.0) endparam param factor2 caption="Factor 3" default=(1.0,0.0) endparam param factor3 caption="Factor 4" default=(1.0,0.0) endparam func fnfact1 caption="Function Factor 1" default=ident() endfunc func fnfact2 caption="Function Factor 2" default=ident() endfunc Heading caption="Parameters" Endheading param select1 caption="Op. C" enum="+""*""/""^" default=0 endparam param select2 caption="Add. Z" enum="Normal""+Z""*Z""/Z""^Z" default=0 endparam param final caption="Final Op." enum="+""*" default=0 endparam param p1 caption="HyperComplex" default=(0.0,0.0) endparam param p2 caption="JuliaDimension" default=(0.0,0.0) visible=(@mode=="Julia") endparam param expz caption="Start Exp.Z" default=(1.0,0.0) endparam param mulz caption="Start Mult.Z" default=(1.0,0.0) endparam param expc caption="Start Exp.C" default=(1.0,0.0) endparam param mulc caption="Start Mult.C" default=(1.0,0.0) endparam param exp3 caption="2nd. Power" default=(1.0,0.0) visible=(@select2!=0) endparam param mult1 caption="2nd. Mult.Z" default=(1.0,0.0) visible=(@select2!=0) endparam param mand1 caption="Final Mult." default=(1.0,0.0) endparam param mand2 caption="Final Mult.Distortion" default=(0.0,0.0) endparam Heading caption="Distortion" Endheading param select caption="Op. Distortion" enum="1""2""3""4""5""6""7""8" default=0 endparam param distor caption="Start Distortion" default=(0.0,0.0) endparam param move caption="Movement Distortion 1" default=(0.0,0.0) endparam param move1 caption="Movement Distortion 2" default=(1.0,0.0) endparam param muld caption="Mult. Distortion" default=(1.0,0.0) endparam param exdis caption="Exp. Distortion" default=(1.0,0.0) endparam func fndis caption="Func. Distortion1" default=ident() endfunc func fndis1 caption="Func. Distortion2" default=ident() endfunc func fndisc caption="Func. Distortion3" default=ident() endfunc Heading caption="Mandelbrot DoubleExp" Endheading param p3 caption="StartDoubleExp" default=(0.0,0.0) endparam param exp2 caption="DoubleExponent" default=(1.0,0.0) enabled=(@p3!=0) endparam param exp1 caption="Power" default=(2.0,0.0) endparam Heading caption="Functions" Endheading func fnz caption="Start Z" default=ident() endfunc func fnc caption="Start C" default=ident() endfunc func fn1 caption="Function 1Z" default=ident() endfunc func fn3 caption="Function 2Z" default=ident() visible=(@select2!=0) endfunc func fn2 caption="Function C" default=ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperDoubleExp" bailout=@bailout seed=#pixel mode=@switchmode switchmode=@mode rota0=@rota0 rota1=@rota1 fl1=@fl1 fl2=@fl2 fnfl=@fnfl rd1=@rd1 rd2=@rd2 rd3=@rd3 seq=@seq mand1=@mand1 mand2=@mand2 factor=@factor factor1=@factor1 factor2=@factor2 factor3=@factor3 fnfact1=@fnfact1 fnfact2=@fnfact2 p1=@p1 p2=@p2 p3=@p3 exp1=@exp1 exp2=@exp2 exp3=@exp3 fn1=@fn1 fn2=@fn2 fn3=@fn3 fnz=@fnz fnc=@fnc fndis=@fndis fndis1=@fndis1 fndisc=@fndisc expz=@expz expc=@expc mulz=@mulz mulc=@mulc muld=@muld mult1=@mult1 exdis=@exdis final=@final select=@select select1=@select1 select2=@select2 distor=@distor move=@move move1=@move1 version=@version slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperElliptic { ; Modification of Elliptic2 formula in the orgform collection under "_e.frm" ; Generic and basic hypercomplex method for Z and W.(cj,ck). ; AndreaSpinozzi(Giugno 2022) Init: z1=(0.0,0.0) z2=(0.0,0.0) z3=(0.0,0.0) za1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) za2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) za3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(#pixel)+flip(imag(#pixel)*@rd1) cz2=@rd3+@rd2*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd1) cz3=@rd3+@rd2*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd1) w1=w2=w3=cw1=cw2=cw3=p1 if (@mode=="Julia") za1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) za2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) za3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz2=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz3=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) w1=w2=w3=p2 cw1=cw2=cw3=p1 endif czr1=real(cz1) ; Init variables for HyperComplex Method czr2=real(cz2) czr3=real(cz3) czi1=imag(cz1) czi2=imag(cz2) czi3=imag(cz3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) ca1=czr1-cwi1+flip(czi1+cwr1) ca2=czr2-cwi2+flip(czi2+cwr2) ca3=czr3-cwi3+flip(czi3+cwr3) cb1=czr1+cwi1+flip(czi1-cwr1) cb2=czr2+cwi2+flip(czi2-cwr2) cb3=czr3+cwi3+flip(czi3-cwr3) ;;; slope stuff int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 int modby=@seq+2 ;Init variables for C sequence and Scenario int iter=0 int iter1=0 Loop: bool scenario = false int method=iter%modby iter1=iter1+1 if ( @seq1 == 1 ) ; First scenario scenario = true elseif ( @seq1 == 2 ) ; Second scenario scenario = false elseif ( iter1 % @modBy < @modCmp ); Modulation scenario = true endif a1=real(za1)-imag(w1)+flip(imag(za1)+real(w1)) a2=real(za2)-imag(w2)+flip(imag(za2)+real(w2)) a3=real(za3)-imag(w3)+flip(imag(za3)+real(w3)) b1=real(za1)+imag(w1)+flip(imag(za1)-real(w1)) b2=real(za2)+imag(w2)+flip(imag(za2)-real(w2)) b3=real(za3)+imag(w3)+flip(imag(za3)-real(w3)) a1=(@fnz(a1)^@expz)*@mulz a2=(@fnz(a2)^@expz)*@mulz a3=(@fnz(a3)^@expz)*@mulz b1=(@fnz(b1)^@expz)*@mulz b2=(@fnz(b2)^@expz)*@mulz b3=(@fnz(b3)^@expz)*@mulz appca1=(@fnc(ca1)^@expc)*@mulc appca2=(@fnc(ca2)^@expc)*@mulc appca3=(@fnc(ca3)^@expc)*@mulc appcb1=(@fnc(cb1)^@expc)*@mulc appcb2=(@fnc(cb2)^@expc)*@mulc appcb3=(@fnc(cb3)^@expc)*@mulc if (method==0) ;C Sequence appca1=@fnfact1(appca1+@factor)*@factor2 appca2=@fnfact1(appca2+@factor)*@factor2 appca3=@fnfact1(appca3+@factor)*@factor2 appcb1=@fnfact1(appcb1+@factor)*@factor2 appcb2=@fnfact1(appcb2+@factor)*@factor2 appcb3=@fnfact1(appcb3+@factor)*@factor2 else appca1=@fnfact2(appca1-@factor1)*@factor3 appca2=@fnfact2(appca2-@factor1)*@factor3 appca3=@fnfact2(appca3-@factor1)*@factor3 appcb1=@fnfact2(appcb1-@factor1)*@factor3 appcb2=@fnfact2(appcb2-@factor1)*@factor3 appcb3=@fnfact2(appcb3-@factor1)*@factor3 endif if(scenario == true) ;Define scenario that must be used if (@select==0) a1=appca1+(p3-fn1(a1)*fn2(a1)*(p4+fn3(a1)*fn4(a1)*(p5+@fn5(a1)*@fn6(a1)*(p6+@fn7(a1)*@fn8(a1)*@p7)))) a2=appca2+(p3-fn1(a2)*fn2(a2)*(p4+fn3(a2)*fn4(a2)*(p5+@fn5(a2)*@fn6(a2)*(p6+@fn7(a2)*@fn8(a2)*@p7)))) a3=appca3+(p3-fn1(a3)*fn2(a3)*(p4+fn3(a3)*fn4(a3)*(p5+@fn5(a3)*@fn6(a3)*(p6+@fn7(a3)*@fn8(a3)*@p7)))) b1=appcb1+(p3-fn1(b1)*fn2(b1)*(p4+fn3(b1)*fn4(b1)*(p5+@fn5(b1)*@fn6(b1)*(p6+@fn7(b1)*@fn8(b1)*@p7)))) b2=appcb2+(p3-fn1(b2)*fn2(b2)*(p4+fn3(b2)*fn4(b2)*(p5+@fn5(b2)*@fn6(b2)*(p6+@fn7(b2)*@fn8(b2)*@p7)))) b3=appcb3+(p3-fn1(b3)*fn2(b3)*(p4+fn3(b3)*fn4(b3)*(p5+@fn5(b3)*@fn6(b3)*(p6+@fn7(b3)*@fn8(b3)*@p7)))) elseif (@select==1) a1=appca1*(p3-fn1(a1)*fn2(a1)*(p4+fn3(a1)*fn4(a1)*(p5+@fn5(a1)*@fn6(a1)*(p6+@fn7(a1)*@fn8(a1)*@p7)))) a2=appca2*(p3-fn1(a2)*fn2(a2)*(p4+fn3(a2)*fn4(a2)*(p5+@fn5(a2)*@fn6(a2)*(p6+@fn7(a2)*@fn8(a2)*@p7)))) a3=appca3*(p3-fn1(a3)*fn2(a3)*(p4+fn3(a3)*fn4(a3)*(p5+@fn5(a3)*@fn6(a3)*(p6+@fn7(a3)*@fn8(a3)*@p7)))) b1=appcb1*(p3-fn1(b1)*fn2(b1)*(p4+fn3(b1)*fn4(b1)*(p5+@fn5(b1)*@fn6(b1)*(p6+@fn7(b1)*@fn8(b1)*@p7)))) b2=appcb2*(p3-fn1(b2)*fn2(b2)*(p4+fn3(b2)*fn4(b2)*(p5+@fn5(b2)*@fn6(b2)*(p6+@fn7(b2)*@fn8(b2)*@p7)))) b3=appcb3*(p3-fn1(b3)*fn2(b3)*(p4+fn3(b3)*fn4(b3)*(p5+@fn5(b3)*@fn6(b3)*(p6+@fn7(b3)*@fn8(b3)*@p7)))) elseif (@select==2) a1=(p3-fn1(a1)*fn2(a1)*(p4+fn3(a1)*fn4(a1)*(p5+@fn5(a1)*@fn6(a1)*(p6+@fn7(a1)*@fn8(a1)*@p7))))/appca1 a2=(p3-fn1(a2)*fn2(a2)*(p4+fn3(a2)*fn4(a2)*(p5+@fn5(a2)*@fn6(a2)*(p6+@fn7(a2)*@fn8(a2)*@p7))))/appca2 a3=(p3-fn1(a3)*fn2(a3)*(p4+fn3(a3)*fn4(a3)*(p5+@fn5(a3)*@fn6(a3)*(p6+@fn7(a3)*@fn8(a3)*@p7))))/appca3 b1=(p3-fn1(b1)*fn2(b1)*(p4+fn3(b1)*fn4(b1)*(p5+@fn5(b1)*@fn6(b1)*(p6+@fn7(b1)*@fn8(b1)*@p7))))/appcb1 b2=(p3-fn1(b2)*fn2(b2)*(p4+fn3(b2)*fn4(b2)*(p5+@fn5(b2)*@fn6(b2)*(p6+@fn7(b2)*@fn8(b2)*@p7))))/appcb2 b3=(p3-fn1(b3)*fn2(b3)*(p4+fn3(b3)*fn4(b3)*(p5+@fn5(b3)*@fn6(b3)*(p6+@fn7(b3)*@fn8(b3)*@p7))))/appcb3 endif a1=(@fngl(a1)^@exp)*@mult a2=(@fngl(a2)^@exp)*@mult a3=(@fngl(a3)^@exp)*@mult b1=(@fngl(b1)^@exp)*@mult b2=(@fngl(b2)^@exp)*@mult b3=(@fngl(b3)^@exp)*@mult else ; Second Scenario if (@select==0) a1=appca1+(@p31-@fn11(a1)*@fn21(a1)*(@p41+@fn31(a1)*@fn41(a1)*(@p51+@fn51(a1)*@fn61(a1)*(@p61+@fn71(a1)*@fn81(a1)*@p71)))) a2=appca2+(@p31-@fn11(a2)*@fn21(a2)*(@p41+@fn31(a2)*@fn41(a2)*(@p51+@fn51(a2)*@fn61(a2)*(@p61+@fn71(a2)*@fn81(a2)*@p71)))) a3=appca3+(@p31-@fn11(a3)*@fn21(a3)*(@p41+@fn31(a3)*@fn41(a3)*(@p51+@fn51(a3)*@fn61(a3)*(@p61+@fn71(a3)*@fn81(a3)*@p71)))) b1=appcb1+(@p31-@fn11(b1)*@fn21(b1)*(@p41+@fn31(b1)*@fn41(b1)*(@p51+@fn51(b1)*@fn61(b1)*(@p61+@fn71(b1)*@fn81(b1)*@p71)))) b2=appcb2+(@p31-@fn11(b2)*@fn21(b2)*(@p41+@fn31(b2)*@fn41(b2)*(@p51+@fn51(b2)*@fn61(b2)*(@p61+@fn71(b2)*@fn81(b2)*@p71)))) b3=appcb3+(@p31-@fn11(b3)*@fn21(b3)*(@p41+@fn31(b3)*@fn41(b3)*(@p51+@fn51(b3)*@fn61(b3)*(@p61+@fn71(b3)*@fn81(b3)*@p71)))) elseif (@select==1) a1=appca1*(@p31-@fn11(a1)*@fn21(a1)*(@p41+@fn31(a1)*@fn41(a1)*(@p51+@fn51(a1)*@fn61(a1)*(@p61+@fn71(a1)*@fn81(a1)*@p71)))) a2=appca2*(@p31-@fn11(a2)*@fn21(a2)*(@p41+@fn31(a2)*@fn41(a2)*(@p51+@fn51(a2)*@fn61(a2)*(@p61+@fn71(a2)*@fn81(a2)*@p71)))) a3=appca3*(@p31-@fn11(a3)*@fn21(a3)*(@p41+@fn31(a3)*@fn41(a3)*(@p51+@fn51(a3)*@fn61(a3)*(@p61+@fn71(a3)*@fn81(a3)*@p71)))) b1=appcb1*(@p31-@fn11(b1)*@fn21(b1)*(@p41+@fn31(b1)*@fn41(b1)*(@p51+@fn51(b1)*@fn61(b1)*(@p61+@fn71(b1)*@fn81(b1)*@p71)))) b2=appcb2*(@p31-@fn11(b2)*@fn21(b2)*(@p41+@fn31(b2)*@fn41(b2)*(@p51+@fn51(b2)*@fn61(b2)*(@p61+@fn71(b2)*@fn81(b2)*@p71)))) b3=appcb3*(@p31-@fn11(b3)*@fn21(b3)*(@p41+@fn31(b3)*@fn41(b3)*(@p51+@fn51(b3)*@fn61(b3)*(@p61+@fn71(b3)*@fn81(b3)*@p71)))) elseif (@select==2) a1=(@p31-@fn11(a1)*@fn21(a1)*(@p41+@fn31(a1)*@fn41(a1)*(@p51+@fn51(a1)*@fn61(a1)*(@p61+@fn71(a1)*@fn81(a1)*@p71))))/appca1 a2=(@p31-@fn11(a2)*@fn21(a2)*(@p41+@fn31(a2)*@fn41(a2)*(@p51+@fn51(a2)*@fn61(a2)*(@p61+@fn71(a2)*@fn81(a2)*@p71))))/appca2 a3=(@p31-@fn11(a3)*@fn21(a3)*(@p41+@fn31(a3)*@fn41(a3)*(@p51+@fn51(a3)*@fn61(a3)*(@p61+@fn71(a3)*@fn81(a3)*@p71))))/appca3 b1=(@p31-@fn11(b1)*@fn21(b1)*(@p41+@fn31(b1)*@fn41(b1)*(@p51+@fn51(b1)*@fn61(b1)*(@p61+@fn71(b1)*@fn81(b1)*@p71))))/appcb1 b2=(@p31-@fn11(b2)*@fn21(b2)*(@p41+@fn31(b2)*@fn41(b2)*(@p51+@fn51(b2)*@fn61(b2)*(@p61+@fn71(b2)*@fn81(b2)*@p71))))/appcb2 b3=(@p31-@fn11(b3)*@fn21(b3)*(@p41+@fn31(b3)*@fn41(b3)*(@p51+@fn51(b3)*@fn61(b3)*(@p61+@fn71(b3)*@fn81(b3)*@p71))))/appcb3 endif a1=(@fngl1(a1)^@exp1)*@mult1 a2=(@fngl1(a2)^@exp1)*@mult1 a3=(@fngl1(a3)^@exp1)*@mult1 b1=(@fngl1(b1)^@exp1)*@mult1 b2=(@fngl1(b2)^@exp1)*@mult1 b3=(@fngl1(b3)^@exp1)*@mult1 endif zr1=(real(a1)+real(b1))/2 ; HyperComplex Z,W zr2=(real(a2)+real(b2))/2 zr3=(real(a3)+real(b3))/2 zi1=(imag(a1)+imag(b1))/2 zi2=(imag(a2)+imag(b2))/2 zi3=(imag(a3)+imag(b3))/2 wr1=(imag(a1)-imag(b1))/2 wr2=(imag(a2)-imag(b2))/2 wr3=(imag(a3)-imag(b3))/2 wi1=(real(b1)-real(a1))/2 wi2=(real(b2)-real(a2))/2 wi3=(real(b3)-real(a3))/2 za1=zr1+flip(zi1) za2=zr2+flip(zi2) za3=zr3+flip(zi3) z1=@fnfl(za1+@fl1)*@fl2 z2=@fnfl(za2+@fl1)*@fl2 z3=@fnfl(za3+@fl1)*@fl2 w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) if (@slope == true) ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |za1|+|w1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |za1|+|w1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done>0 Default: title="SlopeHyperElliptic" maxiter=500 method=multipass periodicity=0 Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param bailout caption="Bailout Value" default=1000.0 min=0.0 endparam param seed caption="Seed Value" default=(1.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param fl1 caption="Flavor 1" default=(0.0,0.0) endparam param fl2 caption="Flavor 2" default=(1.0,0.0) endparam func fnfl caption="Func.Flavor" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=0.00000001 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="3R Dimension" show=false Endheading param rd1 caption="3RDim.1" default=(1.0,0.0) endparam param rd2 caption="3RDim.2" default=(1.0,0.0) endparam param rd3 caption="3RDim.3" default=(0.0,0.0) endparam Heading caption="C Sequence" show=false Endheading param seq caption="C Method" enum="1""2""3" default=0 endparam param factor caption="Factor 1" default=(0.0,0.0) endparam param factor1 caption="Factor 2" default=(0.0,0.0) endparam param factor2 caption="Factor 3" default=(1.0,0.0) endparam param factor3 caption="Factor 4" default=(1.0,0.0) endparam func fnfact1 caption="Function Factor 1" default=ident() endfunc func fnfact2 caption="Function Factor 2" default=ident() endfunc Heading caption="Parameters Z|C" show=false Endheading param expz caption="Start Exp.Z" default=(1.0,0.0) endparam param mulz caption="Start Mult.Z" default=(1.0,0.0) endparam param expc caption="Start Exp.C" default=(1.0,0.0) endparam param mulc caption="Start Mult.C" default=(-1.0,0.0) endparam func fnz caption="Start Z" default=ident() endfunc func fnc caption="Start C" default=ident() endfunc Heading caption="Parameters" Endheading param select caption="Select Method" enum="+""*""/" default=0 endparam param p1 caption="HyperComplex(cj,ck)" default=(0.0,0.0) endparam param p2 caption="Julia Dimension" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Scenario" Endheading param seq1 caption="Select Scenario" enum="Modulation" "First Scenario" "Second Scenario" default=1 endparam param modBy default=10 caption="Mod By" enabled=(@seq1==0) endparam param modCmp default=5 caption="Mod Compare" enabled=(@seq1==0) endparam Heading caption="1st. Scenario" visible=(@seq1!=2) Endheading param p3 caption="Param.1" default=(0.0,0.0) visible=(@seq1!=2) endparam param p4 caption="Param.2" default=(1.0,0.0) visible=(@seq1!=2) endparam param p5 caption="Param.3" default=(0.0,0.0) visible=(@seq1!=2) endparam param p6 caption="Param.4" default=(0.0,0.0) visible=(@seq1!=2) endparam param p7 caption="Param.5" default=(0.0,0.0) visible=(@seq1!=2) endparam param exp caption="Global Exp." default=(1.0,0.0) visible=(@seq1!=2) endparam param mult caption="Global Mult." default=(1.0,0.0) visible=(@seq1!=2) endparam Heading caption="Functions 1st. Scenario" visible=(@seq1!=2) Endheading func fn1 caption="Func.1" default=ident() visible=(@seq1!=2) endfunc func fn2 caption="Func.2" default=ident() visible=(@seq1!=2) endfunc func fn3 caption="Func.3" default=ident() visible=(@seq1!=2) endfunc func fn4 caption="Func.4" default=ident() visible=(@seq1!=2) endfunc func fn5 caption="Func.5" default=ident() visible=(@seq1!=2) endfunc func fn6 caption="Func.6" default=ident() visible=(@seq1!=2) endfunc func fn7 caption="Func.7" default=ident() visible=(@seq1!=2) endfunc func fn8 caption="Func.8" default=ident() visible=(@seq1!=2) endfunc func fngl caption="Global Func." default=ident() visible=(@seq1!=2) endfunc Heading caption="2nd. Scenario" visible=(@seq1!=1) Endheading param p31 caption="Param.1" default=(0.7,0.0) visible=(@seq1!=1) endparam param p41 caption="Param.2" default=(0.4,0.0) visible=(@seq1!=1) endparam param p51 caption="Param.3" default=(0.2,0.0) visible=(@seq1!=1) endparam param p61 caption="Param.4" default=(0.03,0.0) visible=(@seq1!=1) endparam param p71 caption="Param.5" default=(0.01,0.0) visible=(@seq1!=1) endparam param exp1 caption="Global Exp." default=(1.0,0.0) visible=(@seq1!=1) endparam param mult1 caption="Global Mult." default=(1.0,0.0) visible=(@seq1!=1) endparam Heading caption="Functions 2nd. Scenario" visible=(@seq1!=1) Endheading func fn11 caption="Func.1" default=ident() visible=(@seq1!=1) endfunc func fn21 caption="Func.2" default=ident() visible=(@seq1!=1) endfunc func fn31 caption="Func.3" default=ident() visible=(@seq1!=1) endfunc func fn41 caption="Func.4" default=ident() visible=(@seq1!=1) endfunc func fn51 caption="Func.5" default=ident() visible=(@seq1!=1) endfunc func fn61 caption="Func.6" default=ident() visible=(@seq1!=1) endfunc func fn71 caption="Func.7" default=ident() visible=(@seq1!=1) endfunc func fn81 caption="Func.8" default=ident() visible=(@seq1!=1) endfunc func fngl1 caption="Global Func." default=ident() visible=(@seq1!=1) endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperElliptic" modBy=@modBy modCmp=@modCmp bailout=@bailout @seed=#pixel rd1=@rd1 rd2=@rd2 rd3=@rd3 seq=@seq seq1=@seq1 factor=@factor factor1=@factor1 factor2=@factor2 factor3=@factor3 fnfact1=@fnfact1 fnfact2=@fnfact2 fl1=@fl1 fl2=@fl2 fnfl=@fnfl p1=@p1 p2=@p2 p3=@p3 p4=@p4 p5=@p5 p6=@p6 p7=@p7 p31=@p31 p41=@p41 p51=@p51 p61=@p61 p71=@p71 expz=@expz expc=@expc mulz=@mulz mulc=@mulc exp=@exp mult=@mult exp1=@exp1 mult1=@mult1 fngl=@fngl fngl1=@fngl1 fn1=@fn1 fn2=@fn2 fn3=@fn3 fn4=@fn4 fn5=@fn5 fn6=@fn6 fn7=@fn7 fn8=@fn8 fn11=@fn11 fn21=@fn21 fn31=@fn31 fn41=@fn41 fn51=@fn51 fn61=@fn61 fn71=@fn71 fn81=@fn81 fnz=@fnz fnc=@fnc select=@select mode=@switchmode switchmode=@mode version=@version slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperFunny { ; Questa formula è nata casualmente. ; La logica si basa su due equazioni ipercomplesse ZA e ZB che rappresentano due sets ipercomplessi diversi, di conseguenza ; vengono mescolati due sets ipercomplessi nel risultato finale z=za+zb dove, ad esempio za=z^2+c e zb=z*(c+z^2). ; Queste due sezioni, ZA e ZB, sono completamente indipendenti ed hanno tutti i rispettivi parametri per modificare ; x, y, c, za, zb , z etc.. che andranno a creare i sets. ; Ci sono inoltre funzioni e parametri globali per ogni set e tutte le rispettive equazioni. ; Per usare solamente l'equazione di ZA basta andare nella global ZB section (che sarebbero i parametri finali di zb) e mettere ; "multiply ZB = 0" oppure "function final zb=zero", la stessa cosa se si vuole usare solo l'equazione di zb, si va nella global ZA section e si mette "multiply ZA = 0" ; oppure "function final ZA=zero" ; Ovviamente il punto di partenza di questa formula è z=z^2+c + z quindi il primo set di ZB è uguale a Z e basta senza C , tutte le ; equazioni sono scritte all'interno delle sezioni di za e zb quindi si capisce quale equazione si sta usando ed è possibile ; cambiare ed inizializzare qualsiasi punto della formula. ; La formula è molto maneggevole e lavora bene e si possono creare sets ipercomplessi veramente interessanti andandosi a costruire l'equazione finale. ; Si può quindi intervenire in ogni punto della formula e modificare parametri in modo da costruirsi mandelbrot ipercomplessi molto interessanti e julia molto interessanti, ; inoltre è presente sia il flavor di Z che è molto utile con i colori UCL ed inoltre è possibile intervenire anche nell'equazione finale ed usare z= zb-za o za*zb etc.., ; la formula è completamente personalizzabile punto per punto. ; Ovviamente bisogna tenere in considerazione l'equazione che si sta usando, ad esempio, se mettiamo z=zb/za con i set di partenza vorrebbe dire z / (z^2+c) ed in questo caso è ; utile inserire nella "Global parameters newx newy result of ZA" "Exp Set = -1". ; Si possono costruire equazioni come vogliamo. Ci sono tantissimi set, ho creato 20 sets per za e 20 per zb tra alcuni noti ed alcuni studiati per la formula. ; Nelle sezioni di "change X|Y" oppure nella sezione "Global Parameters for newx newy...." sia di ZA che ZB ho inserito anche un metodo "splitted" non standard. ; Nel metodo standard un parametro è applicato sia ad X che Y (A e B ipercomplesso) , ed è il metodo standard, ma splittando i parametri, ; quindi aggiungendo un parametro ad X ed un altro diverso ad Y, si creano effetti molto interessanti e Julia molto interessanti anche se non è un ; metodo standard. ; Ovviamente se nello splitted method si usano ad esempio due parametri ADD o MULT con lo stesso valore sarebbe uguale che usare il ; valore ADD o MULT nel metodo standard, il metodo standard presenta 1 parametro per X|Y(A|B) mentre il metodo splitted presenta 2 parametri ; uno per X(A) e uno Y(B). ; Per esempio, aprendo la formula ed andando nella sezione di ZA in "Globals Parameters newx newy creating ZA" se nel metodo standard usiamo un add set=0.5 ; questo è lo stesso che mettere "Splitted" ed usare Add New X=0.5 e Add New Y=0.5 ; Questa formula mescola due equazioni o anche una sola e presenta tutti i parametri e funzioni per potersi crostruire il set a piacimento ; con la possibilità di intervenire in ogni punto dell'equazione sia nella init section che nel set, sono presenti anche tutte le funzioni ; all'interno di ogni set ed inoltre anche parametri globali a fine equazione. ; In questa formula sono presenti tantissime combinazioni, la formula lavora bene, ma io suggerisco di pensare alle modifiche che si fanno e non di cambiare parametri ; a caso, perchè con pochissimi cambiamenti si creano set interessantissimi. ; I parametri come Mult Set. sono molto utili perchè possono anche zummare il set, sono utili anche i parametri di addizione, ovviamente bisogna tenere in considerazione l'equazione che si sta ; usando in ZA e l'equazione che si sta usando in ZB( è tutto scritto) perchè queste due equazioni vengono sommate nella Z Result section, quindi, quando si cambiano i parametri bisogna riflettere ; dove si sta intervenendo, in che punto della formula, io ho diviso tutte le sezioni e per ogni sets ho inserito il nome dei parametri in modo da far capire dove sono applicati, ad esempio, ; Add 2 Z set 2 vuol dire che c'è un parametro di addizione alla seconda Z di equazione del secondo set, in questo modo l'utente riesce a capire dove sono applicati i parametri. ; È una formula molto dinamica che mescola due sets ipercomplessi, si può partire da un solo set e poi aggiungerne un altro di zb oppure si può lavorare con i due sets che si mescolano e si può ; scegliere se sommarli, sottrarli, e così via...Ci si può costruire un impercomplesso a piacimento. ; Andrea Spinozzi(Giugno 2022) Init: z1=z2=z3=(0.0,0.0) x1=x2=x3=x11=x12=x13=x21=x22=x23=(0.0,0.0) y1=y2=y3=y11=y12=y13=y21=y22=y23=(0.0,0.0) newx1=newx2=newx3=newy1=newy2=newy3=(0.0,0.0) newx11=newx12=newx13=newy11=newy12=newy13=(0.0,0.0) zax1=zax2=zax3=zay1=zay2=zay3=(0.0,0.0) zbx1=zbx2=zbx3=zby1=zby2=zby3=(0.0,0.0) zf1=zf2=zf3=0.0 ;---------------------------Mandelbrot Mode------------------------------------- zz1=real(#pixel)+flip(imag(#pixel)) zz2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) zz3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) cz1=real(#pixel)+flip(imag(#pixel)) cz2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) cz3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) w1=w2=w3=@ph1 cw1=cw2=cw3=@ph1 ;---------------------------Julia Mode------------------------------------------ if (@mode=="Julia") zz1=real(#pixel)+flip(imag(#pixel)) zz2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) zz3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) cz1=real(@seed)+flip(imag(@seed)) cz2=real(@seed)+flip(imag(@seed)) cz3=real(@seed)+flip(imag(@seed)) w1=w2=w3=@ph2 cw1=cw2=cw3=@ph1 endif ;--------------------Define HyperComplex variables and planes------------------- if (@selectPlane==0) cr1=real(cz1) cr2=real(cz2) cr3=real(cz3) ci1=imag(cz1) ci2=imag(cz2) ci3=imag(cz3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) zr1=real(zz1) zr2=real(zz2) zr3=real(zz3) zi1=imag(zz1) zi2=imag(zz2) zi3=imag(zz3) wr1=real(w1) wr2=real(w2) wr3=real(w3) wi1=imag(w1) wi2=imag(w2) wi3=imag(w3) elseif (@selectPlane==1) cr1=real(cw1) cr2=real(cw2) cr3=real(cw3) ci1=imag(cw1) ci2=imag(cw2) ci3=imag(cw3) cwr1=real(cz1) cwr2=real(cz2) cwr3=real(cz3) cwi1=imag(cz1) cwi2=imag(cz2) cwi3=imag(cz3) zr1=real(w1) zr2=real(w2) zr3=real(w3) zi1=imag(w1) zi2=imag(w2) zi3=imag(w3) wr1=real(zz1) wr2=real(zz2) wr3=real(zz3) wi1=imag(zz1) wi2=imag(zz2) wi3=imag(zz3) elseif (@selectPlane==2) cr1=real(cz1) cr2=real(cz2) cr3=real(cz3) ci1=imag(cw1) ci2=imag(cw2) ci3=imag(cw3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cz1) cwi2=imag(cz2) cwi3=imag(cz3) zr1=real(zz1) zr2=real(zz2) zr3=real(zz3) zi1=imag(w1) zi2=imag(w2) zi3=imag(w3) wr1=real(w1) wr2=real(w2) wr3=real(w3) wi1=imag(zz1) wi2=imag(zz2) wi3=imag(zz3) elseif (@selectPlane==3) cr1=real(cw1) cr2=real(cw2) cr3=real(cw3) ci1=imag(cz1) ci2=imag(cz2) ci3=imag(cz3) cwr1=real(cz1) cwr2=real(cz2) cwr3=real(cz3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) zr1=real(w1) zr2=real(w2) zr3=real(w3) zi1=imag(zz1) zi2=imag(zz2) zi3=imag(zz3) wr1=real(zz1) wr2=real(zz2) wr3=real(zz3) wi1=imag(w1) wi2=imag(w2) wi3=imag(w3) endif ;----------------------------Rotations Mandelbrot and Julia--------------------- ;----------------------------MANDELBROT MODE------------------------------------ ;----------------------------(yz plane rotation)-------------------------------- ry1 = ci1*cos(#pi*@rotx/180) - cwr1*sin(#pi*@rotx/180) ry2 = ci2*cos(#pi*@rotx/180) - cwr2*sin(#pi*@rotx/180) ry3 = ci3*cos(#pi*@rotx/180) - cwr3*sin(#pi*@rotx/180) rz1 = ci1*sin(#pi*@rotx/180) + cwr1*cos(#pi*@rotx/180) rz2 = ci2*sin(#pi*@rotx/180) + cwr2*cos(#pi*@rotx/180) rz3 = ci3*sin(#pi*@rotx/180) + cwr3*cos(#pi*@rotx/180) ci1 = ry1 ci2 = ry2 ci3 = ry3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xz plane rotation)-------------------------------- rx1 = cwr1*sin(#pi*@roty/180) + cr1*cos(#pi*@roty/180) rx2 = cwr2*sin(#pi*@roty/180) + cr2*cos(#pi*@roty/180) rx3 = cwr3*sin(#pi*@roty/180) + cr3*cos(#pi*@roty/180) rz1 = cwr1*cos(#pi*@roty/180) - cr1*sin(#pi*@roty/180) rz2 = cwr2*cos(#pi*@roty/180) - cr2*sin(#pi*@roty/180) rz3 = cwr3*cos(#pi*@roty/180) - cr3*sin(#pi*@roty/180) cr1 = rx1 cr2 = rx2 cr3 = rx3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xy plane rotation)-------------------------------- rx1 = cr1*cos(#pi*@rotz/180) - ci1*sin(#pi*@rotz/180) rx2 = cr2*cos(#pi*@rotz/180) - ci2*sin(#pi*@rotz/180) rx3 = cr3*cos(#pi*@rotz/180) - ci3*sin(#pi*@rotz/180) ry1 = cr1*sin(#pi*@rotz/180) + ci1*cos(#pi*@rotz/180) ry2 = cr2*sin(#pi*@rotz/180) + ci2*cos(#pi*@rotz/180) ry3 = cr3*sin(#pi*@rotz/180) + ci3*cos(#pi*@rotz/180) cr1 = rx1 cr2 = rx2 cr3 = rx3 ci1 = ry1 ci2 = ry2 ci3 = ry3 ;----------------------------(xw plane rotation)-------------------------------- rx1=cr1*sin(#pi*@rotw/180)+cwi1*cos(#pi*@rotw/180) rx2=cr2*sin(#pi*@rotw/180)+cwi2*cos(#pi*@rotw/180) rx3=cr3*sin(#pi*@rotw/180)+cwi3*cos(#pi*@rotw/180) rw1=cr1*cos(#pi*@rotw/180)-cwi1*sin(#pi*@rotw/180) rw2=cr2*cos(#pi*@rotw/180)-cwi2*sin(#pi*@rotw/180) rw3=cr3*cos(#pi*@rotw/180)-cwi3*sin(#pi*@rotw/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 cr1=rw1 cr2=rw2 cr3=rw3 ;-------------------------(yw plane rotation)----------------------------------- rx1=ci1*sin(#pi*@rotwy/180)+cwi1*cos(#pi*@rotwy/180) rx2=ci2*sin(#pi*@rotwy/180)+cwi2*cos(#pi*@rotwy/180) rx3=ci3*sin(#pi*@rotwy/180)+cwi3*cos(#pi*@rotwy/180) rw1=ci1*cos(#pi*@rotwy/180)-cwi1*sin(#pi*@rotwy/180) rw2=ci2*cos(#pi*@rotwy/180)-cwi2*sin(#pi*@rotwy/180) rw3=ci3*cos(#pi*@rotwy/180)-cwi3*sin(#pi*@rotwy/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 ci1=rw1 ci2=rw2 ci3=rw3 if (@mode=="Julia");-------------Julia Rotations-------------------------------- ;---------------------------------JULIA MODE------------------------------------ ;---------------------------(yz plane rotation)--------------------------------- ry1 = zi1*cos(#pi*@rotx/180) - wr1*sin(#pi*@rotx/180) ry2 = zi2*cos(#pi*@rotx/180) - wr2*sin(#pi*@rotx/180) ry3 = zi3*cos(#pi*@rotx/180) - wr3*sin(#pi*@rotx/180) rz1 = zi1*sin(#pi*@rotx/180) + wr1*cos(#pi*@rotx/180) rz2 = zi2*sin(#pi*@rotx/180) + wr2*cos(#pi*@rotx/180) rz3 = zi3*sin(#pi*@rotx/180) + wr3*cos(#pi*@rotx/180) zi1 = ry1 zi2 = ry2 zi3 = ry3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;-------------------------(xz plane rotation)----------------------------------- rx1 = wr1*sin(#pi*@roty/180) + zr1*cos(#pi*@roty/180) rx2 = wr2*sin(#pi*@roty/180) + zr2*cos(#pi*@roty/180) rx3 = wr3*sin(#pi*@roty/180) + zr3*cos(#pi*@roty/180) rz1 = wr1*cos(#pi*@roty/180) - zr1*sin(#pi*@roty/180) rz2 = wr2*cos(#pi*@roty/180) - zr2*sin(#pi*@roty/180) rz3 = wr3*cos(#pi*@roty/180) - zr3*sin(#pi*@roty/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;---------------------(xy plane rotation)--------------------------------------- rx1 = zr1*cos(#pi*@rotz/180) - zi1*sin(#pi*@rotz/180) rx2 = zr2*cos(#pi*@rotz/180) - zi2*sin(#pi*@rotz/180) rx3 = zr3*cos(#pi*@rotz/180) - zi3*sin(#pi*@rotz/180) ry1 = zr1*sin(#pi*@rotz/180) + zi1*cos(#pi*@rotz/180) ry2 = zr2*sin(#pi*@rotz/180) + zi2*cos(#pi*@rotz/180) ry3 = zr3*sin(#pi*@rotz/180) + zi3*cos(#pi*@rotz/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 zi1 = ry1 zi2 = ry2 zi3 = ry3 ;---------------------(xw plane rotation)--------------------------------------- rx1=zr1*sin(#pi*@rotw/180)+wi1*cos(#pi*@rotw/180) rx2=zr2*sin(#pi*@rotw/180)+wi2*cos(#pi*@rotw/180) rx3=zr3*sin(#pi*@rotw/180)+wi3*cos(#pi*@rotw/180) rw1=zr1*cos(#pi*@rotw/180)-wi1*sin(#pi*@rotw/180) rw2=zr2*cos(#pi*@rotw/180)-wi2*sin(#pi*@rotw/180) rw3=zr3*cos(#pi*@rotw/180)-wi3*sin(#pi*@rotw/180) wi1=rx1 wi2=rx2 wi3=rx3 zr1=rw1 zr2=rw2 zr3=rw3 ;---------------------(yw plane rotation)--------------------------------------- rx1=zi1*sin(#pi*@rotwy/180)+wi1*cos(#pi*@rotwy/180) rx2=zi2*sin(#pi*@rotwy/180)+wi2*cos(#pi*@rotwy/180) rx3=zi3*sin(#pi*@rotwy/180)+wi3*cos(#pi*@rotwy/180) rw1=zi1*cos(#pi*@rotwy/180)-wi1*sin(#pi*@rotwy/180) rw2=zi2*cos(#pi*@rotwy/180)-wi2*sin(#pi*@rotwy/180) rw3=zi3*cos(#pi*@rotwy/180)-wi3*sin(#pi*@rotwy/180) wi1=rx1 wi2=rx2 wi3=rx3 zi1=rw1 zi2=rw2 zi3=rw3 endif ;---------------------------Define the HyperComplex C planes-------------------- ca1 = cr1-cwi1+flip(ci1+cwr1) ca2 = cr2-cwi2+flip(ci2+cwr2) ca3 = cr3-cwi3+flip(ci3+cwr3) cb1 = cr1+cwi1+flip(ci1-cwr1) cb2 = cr2+cwi2+flip(ci2-cwr2) cb3 = cr3+cwi3+flip(ci3-cwr3) ;-----------------------Add init param to C------------------------------------- crr1=@prcm*(@fncr(ca1+@prc))^@prce crr2=@prcm*(@fncr(ca2+@prc))^@prce crr3=@prcm*(@fncr(ca3+@prc))^@prce cii1=@picm*(@fnci(cb1+@pic))^@pice cii2=@picm*(@fnci(cb2+@pic))^@pice cii3=@picm*(@fnci(cb3+@pic))^@pice ;;;slope stuff int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 ;--------------Init C Sequence------------------------------------------------- int iter=0 int modby=@seq+2 Loop: ;------------------Define Iteration for C Sequence------------------------------ int method=iter%modby ;---------------------------------Define X|Y of hyper complex ZA---------------- x1=zr1-wi1+flip(zi1+wr1) x2=zr2-wi2+flip(zi2+wr2) x3=zr3-wi3+flip(zi3+wr3) y1=zr1+wi1+flip(zi1-wr1) y2=zr2+wi2+flip(zi2-wr2) y3=zr3+wi3+flip(zi3-wr3) ;-----------------Add parameters and Functions also in splitted mode------------ ;-----------------exp or div are not splitted for a more correct use------------ if (@opXY==0) x11 = @mx0*@fnxx0(x1+@ax0)^@ex0 x12 = @mx0*@fnxx0(x2+@ax0)^@ex0 x13 = @mx0*@fnxx0(x3+@ax0)^@ex0 y11 = @mx0*@fnxx0(y1+@ax0)^@ex0 y12 = @mx0*@fnxx0(y2+@ax0)^@ex0 y13 = @mx0*@fnxx0(y3+@ax0)^@ex0 elseif (@opXY==1) x11 = @mx*@fnxx(x1+@ax)^@ex x12 = @mx*@fnxx(x2+@ax)^@ex x13 = @mx*@fnxx(x3+@ax)^@ex y11 = @my*@fnyy(y1+@ay)^@ex y12 = @my*@fnyy(y2+@ay)^@ex y13 = @my*@fnyy(y3+@ay)^@ex endif ;-------------------------Factors for C Sequence ------------------------------- if (method==0) car1 = @fnfact1(crr1)*@fact1+@fact2 car2 = @fnfact1(crr2)*@fact1+@fact2 car3 = @fnfact1(crr3)*@fact1+@fact2 cai1 = @fnfact1(cii1)*@fact1+@fact2 cai2 = @fnfact1(cii2)*@fact1+@fact2 cai3 = @fnfact1(cii3)*@fact1+@fact2 else car1 = @fnfact2(crr1)*@fact3+@fact4 car2 = @fnfact2(crr2)*@fact3+@fact4 car3 = @fnfact2(crr3)*@fact3+@fact4 cai1 = @fnfact2(cii1)*@fact3+@fact4 cai2 = @fnfact2(cii2)*@fact3+@fact4 cai3 = @fnfact2(cii3)*@fact3+@fact4 endif ;----------------------Add parameters to C-------------------------------------- car11 = (car1+@pcc)*@pcc1 car12 = (car2+@pcc)*@pcc1 car13 = (car3+@pcc)*@pcc1 cai11 = (cai1+@pcc2)*@pcc3 cai12 = (cai2+@pcc2)*@pcc3 cai13 = (cai3+@pcc2)*@pcc3 ;----------------------Define newx|newy for ZA---------------------------------- if (@variation==0) ; Mandelbrot z^2 + c newx1 = @v1p1*(@fnv1p1(x11)+@v1p2)^@v1p3+@fnv1p2(car11)*@v1p4 newx2 = @v1p1*(@fnv1p1(x12)+@v1p2)^@v1p3+@fnv1p2(car12)*@v1p4 newx3 = @v1p1*(@fnv1p1(x13)+@v1p2)^@v1p3+@fnv1p2(car13)*@v1p4 newy1 = @v1p1*(@fnv1p1(y11)+@v1p2)^@v1p3+@fnv1p2(cai11)*@v1p4 newy2 = @v1p1*(@fnv1p1(y12)+@v1p2)^@v1p3+@fnv1p2(cai12)*@v1p4 newy3 = @v1p1*(@fnv1p1(y13)+@v1p2)^@v1p3+@fnv1p2(cai13)*@v1p4 elseif (@variation==1) ; Num Dump 015 1.5*(1.5+(z*z+c-1)^2/(-1+(2*z+c-1))-0.7) newx1 = @v2p8*( @v2p5+( @fnv2p1(x11+@v2p9)*(x11+@v2p10)+@fnv2p2(car11-@v2p1) )^@v2p3/( @v2p6+(@v2p4*@fnv2p4(x11+@v2p11)+@fnv2p3(car11-@v2p2)) )+@v2p7 ) newx2 = @v2p8*( @v2p5+( @fnv2p1(x12+@v2p9)*(x12+@v2p10)+@fnv2p2(car12-@v2p1) )^@v2p3/( @v2p6+(@v2p4*@fnv2p4(x12+@v2p11)+@fnv2p3(car12-@v2p2)) )+@v2p7 ) newx3 = @v2p8*( @v2p5+( @fnv2p1(x13+@v2p9)*(x13+@v2p10)+@fnv2p2(car13-@v2p1) )^@v2p3/( @v2p6+(@v2p4*@fnv2p4(x13+@v2p11)+@fnv2p3(car13-@v2p2)) )+@v2p7 ) newy1 = @v2p8*( @v2p5+( @fnv2p1(y11+@v2p9)*(y11+@v2p10)+@fnv2p2(cai11-@v2p1) )^@v2p3/( @v2p6+(@v2p4*@fnv2p4(y11+@v2p11)+@fnv2p3(cai11-@v2p2)) )+@v2p7 ) newy2 = @v2p8*( @v2p5+( @fnv2p1(y12+@v2p9)*(y12+@v2p10)+@fnv2p2(cai12-@v2p1) )^@v2p3/( @v2p6+(@v2p4*@fnv2p4(y12+@v2p11)+@fnv2p3(cai12-@v2p2)) )+@v2p7 ) newy3 = @v2p8*( @v2p5+( @fnv2p1(y13+@v2p9)*(y13+@v2p10)+@fnv2p2(cai13-@v2p1) )^@v2p3/( @v2p6+(@v2p4*@fnv2p4(y13+@v2p11)+@fnv2p3(cai13-@v2p2)) )+@v2p7 ) elseif (@variation==2) ; 0.5+sqr(z)*z*c/(2+c*z) newx1 = @v3p1+@v3p3*sqr(@fnv3p1(x11+@v3p5))*@fnv3p2(x11+@v3p6)*@fnv3p3(car11)/(@v3p2+@fnv3p4(car11)*@fnv3p5(x11+@v3p7))*@v3p4 newx2 = @v3p1+@v3p3*sqr(@fnv3p1(x12+@v3p5))*@fnv3p2(x12+@v3p6)*@fnv3p3(car12)/(@v3p2+@fnv3p4(car12)*@fnv3p5(x12+@v3p7))*@v3p4 newx3 = @v3p1+@v3p3*sqr(@fnv3p1(x13+@v3p5))*@fnv3p2(x13+@v3p6)*@fnv3p3(car13)/(@v3p2+@fnv3p4(car13)*@fnv3p5(x13+@v3p7))*@v3p4 newy1 = @v3p1+@v3p3*sqr(@fnv3p1(y11+@v3p5))*@fnv3p2(y11+@v3p6)*@fnv3p3(cai11)/(@v3p2+@fnv3p4(cai11)*@fnv3p5(y11+@v3p7))*@v3p4 newy2 = @v3p1+@v3p3*sqr(@fnv3p1(y12+@v3p5))*@fnv3p2(y12+@v3p6)*@fnv3p3(cai12)/(@v3p2+@fnv3p4(cai12)*@fnv3p5(y12+@v3p7))*@v3p4 newy3 = @v3p1+@v3p3*sqr(@fnv3p1(y13+@v3p5))*@fnv3p2(y13+@v3p6)*@fnv3p3(cai13)/(@v3p2+@fnv3p4(cai13)*@fnv3p5(y13+@v3p7))*@v3p4 elseif (@variation==3) ; (z^2+z)*c newx1 = @v4p1+(@fnv4p1(x11)^@v4p3+@v4p4*@fnv4p2(x11))*@v4p2*@fnv4p3(car11) newx2 = @v4p1+(@fnv4p1(x12)^@v4p3+@v4p4*@fnv4p2(x12))*@v4p2*@fnv4p3(car12) newx3 = @v4p1+(@fnv4p1(x13)^@v4p3+@v4p4*@fnv4p2(x13))*@v4p2*@fnv4p3(car13) newy1 = @v4p1+(@fnv4p1(y11)^@v4p3+@v4p4*@fnv4p2(y11))*@v4p2*@fnv4p3(cai11) newy2 = @v4p1+(@fnv4p1(y12)^@v4p3+@v4p4*@fnv4p2(y12))*@v4p2*@fnv4p3(cai12) newy3 = @v4p1+(@fnv4p1(y13)^@v4p3+@v4p4*@fnv4p2(y13))*@v4p2*@fnv4p3(cai13) elseif (@variation==4) ; Mandelbrot Qud sqr(z)+(0.2*z^3)+z+z+c newx1 = sqr(@fnv5p1(x11)) + ( @v5p1*(@fnv5p2(x11)^@v5p3) )+( @v5p2*(x11^@v5p4) )+ ( @v5p5*@fnv5p3(x11^@v5p6) )+ @fnv5p4(car11) newx2 = sqr(@fnv5p1(x12)) + ( @v5p1*(@fnv5p2(x12)^@v5p3) )+( @v5p2*(x12^@v5p4) )+ ( @v5p5*@fnv5p3(x12^@v5p6) )+ @fnv5p4(car12) newx3 = sqr(@fnv5p1(x13)) + ( @v5p1*(@fnv5p2(x13)^@v5p3) )+( @v5p2*(x13^@v5p4) )+ ( @v5p5*@fnv5p3(x13^@v5p6) )+ @fnv5p4(car13) newy1 = sqr(@fnv5p1(y11)) + ( @v5p1*(@fnv5p2(y11)^@v5p3) )+( @v5p2*(y11^@v5p4) )+ ( @v5p5*@fnv5p3(y11^@v5p6) )+ @fnv5p4(cai11) newy2 = sqr(@fnv5p1(y12)) + ( @v5p1*(@fnv5p2(y12)^@v5p3) )+( @v5p2*(y12^@v5p4) )+ ( @v5p5*@fnv5p3(y12^@v5p6) )+ @fnv5p4(cai12) newy3 = sqr(@fnv5p1(y13)) + ( @v5p1*(@fnv5p2(y13)^@v5p3) )+( @v5p2*(y13^@v5p4) )+ ( @v5p5*@fnv5p3(y13^@v5p6) )+ @fnv5p4(cai13) elseif (@variation==5) ; Flattop (z-0.2)^2 + (c*z)/(z-0.1) newx1 = (@fnv6p1(x11+@v6p1)^@v6p3) + (@v6p4*(car11+@v6p5)*@fnv6p2(x11)) / (@fnv6p3(x11)-@v6p2) newx2 = (@fnv6p1(x12+@v6p1)^@v6p3) + (@v6p4*(car12+@v6p5)*@fnv6p2(x12)) / (@fnv6p3(x12)-@v6p2) newx3 = (@fnv6p1(x13+@v6p1)^@v6p3) + (@v6p4*(car13+@v6p5)*@fnv6p2(x13)) / (@fnv6p3(x13)-@v6p2) newy1 = (@fnv6p1(y11+@v6p1)^@v6p3) + (@v6p4*(cai11+@v6p5)*@fnv6p2(y11)) / (@fnv6p3(y11)-@v6p2) newy2 = (@fnv6p1(y12+@v6p1)^@v6p3) + (@v6p4*(cai12+@v6p5)*@fnv6p2(y12)) / (@fnv6p3(y12)-@v6p2) newy3 = (@fnv6p1(y13+@v6p1)^@v6p3) + (@v6p4*(cai13+@v6p5)*@fnv6p2(y13)) / (@fnv6p3(y13)-@v6p2) elseif (@variation==6) ; (z+z)*c-z^2 newx1 = @v7p1+( @fnv7p1(x11)+@fnv7p2(x11) )*@v7p2*@fnv7p3(car11-@v7p5) - @v7p4*@fnv7p4(x11)^@v7p3 newx2 = @v7p1+( @fnv7p1(x12)+@fnv7p2(x12) )*@v7p2*@fnv7p3(car12-@v7p5) - @v7p4*@fnv7p4(x12)^@v7p3 newx3 = @v7p1+( @fnv7p1(x13)+@fnv7p2(x13) )*@v7p2*@fnv7p3(car13-@v7p5) - @v7p4*@fnv7p4(x13)^@v7p3 newy1 = @v7p1+( @fnv7p1(y11)+@fnv7p2(y11) )*@v7p2*@fnv7p3(cai11-@v7p5) - @v7p4*@fnv7p4(y11)^@v7p3 newy2 = @v7p1+( @fnv7p1(y12)+@fnv7p2(y12) )*@v7p2*@fnv7p3(cai12-@v7p5) - @v7p4*@fnv7p4(y12)^@v7p3 newy3 = @v7p1+( @fnv7p1(y13)+@fnv7p2(y13) )*@v7p2*@fnv7p3(cai13-@v7p5) - @v7p4*@fnv7p4(y13)^@v7p3 elseif (@variation==7) ; z^2*z+c newx1 = @fnv8p1(x11+@v8p1)^@v8p3*@v8p2*@fnv8p2(x11+@v8p6)+@fnv8p3(car11-@v8p5)*@v8p4 newx2 = @fnv8p1(x12+@v8p1)^@v8p3*@v8p2*@fnv8p2(x12+@v8p6)+@fnv8p3(car12-@v8p5)*@v8p4 newx3 = @fnv8p1(x13+@v8p1)^@v8p3*@v8p2*@fnv8p2(x13+@v8p6)+@fnv8p3(car13-@v8p5)*@v8p4 newy1 = @fnv8p1(y11+@v8p1)^@v8p3*@v8p2*@fnv8p2(y11+@v8p6)+@fnv8p3(cai11-@v8p5)*@v8p4 newy2 = @fnv8p1(y12+@v8p1)^@v8p3*@v8p2*@fnv8p2(y12+@v8p6)+@fnv8p3(cai12-@v8p5)*@v8p4 newy3 = @fnv8p1(y13+@v8p1)^@v8p3*@v8p2*@fnv8p2(y13+@v8p6)+@fnv8p3(cai13-@v8p5)*@v8p4 elseif (@variation==8) ; (z+c)^2+(z*c)^2 newx1 = @v9p12*( @v9p1*( @fnv9p1(x11+@v9p4)*@v9p5+@fnv9p3(car11+@v9p6)*@v9p7 )^@v9p2 + ( @fnv9p2(x11+@v9p8)*@v9p9*@fnv9p4(car11+@v9p10)*@v9p11 )^@v9p3 ) newx2 = @v9p12*( @v9p1*( @fnv9p1(x12+@v9p4)*@v9p5+@fnv9p3(car12+@v9p6)*@v9p7 )^@v9p2 + ( @fnv9p2(x12+@v9p8)*@v9p9*@fnv9p4(car12+@v9p10)*@v9p11 )^@v9p3 ) newx3 = @v9p12*( @v9p1*( @fnv9p1(x13+@v9p4)*@v9p5+@fnv9p3(car13+@v9p6)*@v9p7 )^@v9p2 + ( @fnv9p2(x13+@v9p8)*@v9p9*@fnv9p4(car13+@v9p10)*@v9p11 )^@v9p3 ) newy1 = @v9p12*( @v9p1*( @fnv9p1(y11+@v9p4)*@v9p5+@fnv9p3(cai11+@v9p6)*@v9p7 )^@v9p2 + ( @fnv9p2(y11+@v9p8)*@v9p9*@fnv9p4(cai11+@v9p10)*@v9p11 )^@v9p3 ) newy2 = @v9p12*( @v9p1*( @fnv9p1(y12+@v9p4)*@v9p5+@fnv9p3(cai12+@v9p6)*@v9p7 )^@v9p2 + ( @fnv9p2(y12+@v9p8)*@v9p9*@fnv9p4(cai12+@v9p10)*@v9p11 )^@v9p3 ) newy3 = @v9p12*( @v9p1*( @fnv9p1(y13+@v9p4)*@v9p5+@fnv9p3(cai13+@v9p6)*@v9p7 )^@v9p2 + ( @fnv9p2(y13+@v9p8)*@v9p9*@fnv9p4(cai13+@v9p10)*@v9p11 )^@v9p3 ) elseif (@variation==9) ; (z^2+z)*c+z*c newx1 = (@fnv10p1(x11)^@v10p3+@fnv10p2(x11+@v10p1)*@v10p5)*@fnv10p3(car11+@v10p6)+@v10p4*@fnv10p4(x11)+@v10p2*@fnv10p5(car11+@v10p7) newx2 = (@fnv10p1(x12)^@v10p3+@fnv10p2(x12+@v10p1)*@v10p5)*@fnv10p3(car12+@v10p6)+@v10p4*@fnv10p4(x12)+@v10p2*@fnv10p5(car12+@v10p7) newx3 = (@fnv10p1(x13)^@v10p3+@fnv10p2(x13+@v10p1)*@v10p5)*@fnv10p3(car13+@v10p6)+@v10p4*@fnv10p4(x13)+@v10p2*@fnv10p5(car13+@v10p7) newy1 = (@fnv10p1(y11)^@v10p3+@fnv10p2(y11+@v10p1)*@v10p5)*@fnv10p3(cai11+@v10p6)+@v10p4*@fnv10p4(y11)+@v10p2*@fnv10p5(cai11+@v10p7) newy2 = (@fnv10p1(y12)^@v10p3+@fnv10p2(y12+@v10p1)*@v10p5)*@fnv10p3(cai12+@v10p6)+@v10p4*@fnv10p4(y12)+@v10p2*@fnv10p5(cai12+@v10p7) newy3 = (@fnv10p1(y13)^@v10p3+@fnv10p2(y13+@v10p1)*@v10p5)*@fnv10p3(cai13+@v10p6)+@v10p4*@fnv10p4(y13)+@v10p2*@fnv10p5(cai13+@v10p7) elseif (@variation==10) ; Mandelvar ((z*c)/(z*c+2)+(z))^2+c newx1 = ( (@fnv11p1(x11+@v11p1)*@fnv11p3(car11)) / (@fnv11p2(x11-@v11p4)*@fnv11p4(car11)+@v11p2)+@fnv11p5(x11) )^@v11p3+car11 newx2 = ( (@fnv11p1(x12+@v11p1)*@fnv11p3(car12)) / (@fnv11p2(x12-@v11p4)*@fnv11p4(car12)+@v11p2)+@fnv11p5(x12) )^@v11p3+car12 newx3 = ( (@fnv11p1(x13+@v11p1)*@fnv11p3(car13)) / (@fnv11p2(x13-@v11p4)*@fnv11p4(car13)+@v11p2)+@fnv11p5(x13) )^@v11p3+car13 newy1 = ( (@fnv11p1(y11+@v11p1)*@fnv11p3(cai11)) / (@fnv11p2(y11-@v11p4)*@fnv11p4(cai11)+@v11p2)+@fnv11p5(y11) )^@v11p3+cai11 newy2 = ( (@fnv11p1(y12+@v11p1)*@fnv11p3(cai12)) / (@fnv11p2(y12-@v11p4)*@fnv11p4(cai12)+@v11p2)+@fnv11p5(y12) )^@v11p3+cai12 newy3 = ( (@fnv11p1(y13+@v11p1)*@fnv11p3(cai13)) / (@fnv11p2(y13-@v11p4)*@fnv11p4(cai13)+@v11p2)+@fnv11p5(y13) )^@v11p3+cai13 elseif (@variation==11) ; 1/(z-3*c)+(2*z*c)+(sqr(z)+c) newx1 = @v12p1/(@v12p4+real(@v12p6)*@fnv12p1(x11)^imag(@v12p6)-@v12p9*@fnv12p3(car11)*@v12p3)*(@v12p7*@fnv12p2(x11)*@fnv12p5(car11)+@v12p8)+(sqr(@fnv12p4(x11))*@v12p2+@fnv12p6(car11)*@v12p5) newx2 = @v12p1/(@v12p4+real(@v12p6)*@fnv12p1(x12)^imag(@v12p6)-@v12p9*@fnv12p3(car12)*@v12p3)*(@v12p7*@fnv12p2(x12)*@fnv12p5(car12)+@v12p8)+(sqr(@fnv12p4(x12))*@v12p2+@fnv12p6(car12)*@v12p5) newx3 = @v12p1/(@v12p4+real(@v12p6)*@fnv12p1(x13)^imag(@v12p6)-@v12p9*@fnv12p3(car13)*@v12p3)*(@v12p7*@fnv12p2(x13)*@fnv12p5(car13)+@v12p8)+(sqr(@fnv12p4(x13))*@v12p2+@fnv12p6(car13)*@v12p5) newy1 = @v12p1/(@v12p4+real(@v12p6)*@fnv12p1(y11)^imag(@v12p6)-@v12p9*@fnv12p3(cai11)*@v12p3)*(@v12p7*@fnv12p2(y11)*@fnv12p5(cai11)+@v12p8)+(sqr(@fnv12p4(y11))*@v12p2+@fnv12p6(cai11)*@v12p5) newy2 = @v12p1/(@v12p4+real(@v12p6)*@fnv12p1(y12)^imag(@v12p6)-@v12p9*@fnv12p3(cai12)*@v12p3)*(@v12p7*@fnv12p2(y12)*@fnv12p5(cai12)+@v12p8)+(sqr(@fnv12p4(y12))*@v12p2+@fnv12p6(cai12)*@v12p5) newy3 = @v12p1/(@v12p4+real(@v12p6)*@fnv12p1(y13)^imag(@v12p6)-@v12p9*@fnv12p3(cai13)*@v12p3)*(@v12p7*@fnv12p2(y13)*@fnv12p5(cai13)+@v12p8)+(sqr(@fnv12p4(y13))*@v12p2+@fnv12p6(cai13)*@v12p5) elseif (@variation==12) ;z*sqr(z)+c*(1+z-sqr(z)) newx1 = @fnv13p1(x11+@v13p1)*sqr(@fnv13p2(x11+@v13p2)*@v13p3)+@v13p4*@fnv13p3(car11+@v13p5)*(@fnv13p4(x11+@v13p6)-sqr(@fnv13p5(x11+@v13p7))) newx2 = @fnv13p1(x12+@v13p1)*sqr(@fnv13p2(x12+@v13p2)*@v13p3)+@v13p4*@fnv13p3(car12+@v13p5)*(@fnv13p4(x12+@v13p6)-sqr(@fnv13p5(x12+@v13p7))) newx3 = @fnv13p1(x13+@v13p1)*sqr(@fnv13p2(x13+@v13p2)*@v13p3)+@v13p4*@fnv13p3(car13+@v13p5)*(@fnv13p4(x13+@v13p6)-sqr(@fnv13p5(x13+@v13p7))) newy1 = @fnv13p1(y11+@v13p1)*sqr(@fnv13p2(y11+@v13p2)*@v13p3)+@v13p4*@fnv13p3(cai11+@v13p5)*(@fnv13p4(y11+@v13p6)-sqr(@fnv13p5(y11+@v13p7))) newy2 = @fnv13p1(y12+@v13p1)*sqr(@fnv13p2(y12+@v13p2)*@v13p3)+@v13p4*@fnv13p3(cai12+@v13p5)*(@fnv13p4(y12+@v13p6)-sqr(@fnv13p5(y12+@v13p7))) newy3 = @fnv13p1(y13+@v13p1)*sqr(@fnv13p2(y13+@v13p2)*@v13p3)+@v13p4*@fnv13p3(cai13+@v13p5)*(@fnv13p4(y13+@v13p6)-sqr(@fnv13p5(y13+@v13p7))) elseif (@variation==13) ; FGZ a=z*z+c ; z=(0.5*a*a)/( a+0.5)+c a1 = x11 * x11 + car11 a2 = x12 * x12 + car12 a3 = x13 * x13 + car13 b1 = y11 * y11 + cai11 b2 = y12 * y12 + cai12 b3 = y13 * y13 + cai13 newx1 = (@v14p1 * @fnv14p1(a1+@v14p2) * @fnv14p2(a1+@v14p3)) / @fnv14p3(a1 + @v14p4)*@v14p6 + @fnv14p4(car11+@v14p5) newx2 = (@v14p1 * @fnv14p1(a2+@v14p2) * @fnv14p2(a2+@v14p3)) / @fnv14p3(a2 + @v14p4)*@v14p6 + @fnv14p4(car12+@v14p5) newx3 = (@v14p1 * @fnv14p1(a3+@v14p2) * @fnv14p2(a3+@v14p3)) / @fnv14p3(a3 + @v14p4)*@v14p6 + @fnv14p4(car13+@v14p5) newy1 = (@v14p1 * @fnv14p1(b1+@v14p2) * @fnv14p2(b1+@v14p3)) / @fnv14p3(b1 + @v14p4)*@v14p6 + @fnv14p4(cai11+@v14p5) newy2 = (@v14p1 * @fnv14p1(b2+@v14p2) * @fnv14p2(b2+@v14p3)) / @fnv14p3(b2 + @v14p4)*@v14p6 + @fnv14p4(cai12+@v14p5) newy3 = (@v14p1 * @fnv14p1(b3+@v14p2) * @fnv14p2(b3+@v14p3)) / @fnv14p3(b3 + @v14p4)*@v14p6 + @fnv14p4(cai13+@v14p5) elseif (@variation==14) ; newx1 = @fnv15p1(x11+@v15p1)^@v15p3*@fnv15p3(car11+@v15p4)+@fnv15p4(car11+@v15p5)+@fnv15p2(x11+@v15p6)*@v15p2 newx2 = @fnv15p1(x12+@v15p1)^@v15p3*@fnv15p3(car12+@v15p4)+@fnv15p4(car12+@v15p5)+@fnv15p2(x12+@v15p6)*@v15p2 newx3 = @fnv15p1(x13+@v15p1)^@v15p3*@fnv15p3(car13+@v15p4)+@fnv15p4(car13+@v15p5)+@fnv15p2(x13+@v15p6)*@v15p2 newy1 = @fnv15p1(y11+@v15p1)^@v15p3*@fnv15p3(cai11+@v15p4)+@fnv15p4(cai11+@v15p5)+@fnv15p2(y11+@v15p6)*@v15p2 newy2 = @fnv15p1(y12+@v15p1)^@v15p3*@fnv15p3(cai12+@v15p4)+@fnv15p4(cai12+@v15p5)+@fnv15p2(y12+@v15p6)*@v15p2 newy3 = @fnv15p1(y13+@v15p1)^@v15p3*@fnv15p3(cai13+@v15p4)+@fnv15p4(cai13+@v15p5)+@fnv15p2(y13+@v15p6)*@v15p2 elseif (@variation==15) ; N9 z=2/sinh(1/(z*c))+c newx1 = @v16p1/@fnv16p1(@v16p2/(@fnv16p2(x11+@v16p4)*@fnv16p3(car11+@v16p5)*@v16p3))+@fnv16p4(car11+@v16p6) newx2 = @v16p1/@fnv16p1(@v16p2/(@fnv16p2(x12+@v16p4)*@fnv16p3(car12+@v16p5)*@v16p3))+@fnv16p4(car12+@v16p6) newx3 = @v16p1/@fnv16p1(@v16p2/(@fnv16p2(x13+@v16p4)*@fnv16p3(car13+@v16p5)*@v16p3))+@fnv16p4(car13+@v16p6) newy1 = @v16p1/@fnv16p1(@v16p2/(@fnv16p2(y11+@v16p4)*@fnv16p3(cai11+@v16p5)*@v16p3))+@fnv16p4(cai11+@v16p6) newy2 = @v16p1/@fnv16p1(@v16p2/(@fnv16p2(y12+@v16p4)*@fnv16p3(cai12+@v16p5)*@v16p3))+@fnv16p4(cai12+@v16p6) newy3 = @v16p1/@fnv16p1(@v16p2/(@fnv16p2(y13+@v16p4)*@fnv16p3(cai13+@v16p5)*@v16p3))+@fnv16p4(cai13+@v16p6) elseif (@variation==16) ; Mod. carr (z*1/c)+z^2*c newx1 = (@fnv17p1(x11+@v17p5)*@v17p1/@fnv17p3(car11+@v17p7)*@v17p8)+@fnv17p2(x11+@v17p6)^@v17p3*@fnv17p4(car11+@v17p2)*@v17p4 newx2 = (@fnv17p1(x12+@v17p5)*@v17p1/@fnv17p3(car12+@v17p7)*@v17p8)+@fnv17p2(x12+@v17p6)^@v17p3*@fnv17p4(car12+@v17p2)*@v17p4 newx3 = (@fnv17p1(x13+@v17p5)*@v17p1/@fnv17p3(car13+@v17p7)*@v17p8)+@fnv17p2(x13+@v17p6)^@v17p3*@fnv17p4(car13+@v17p2)*@v17p4 newy1 = (@fnv17p1(y11+@v17p5)*@v17p1/@fnv17p3(cai11+@v17p7)*@v17p8)+@fnv17p2(y11+@v17p6)^@v17p3*@fnv17p4(cai11+@v17p2)*@v17p4 newy2 = (@fnv17p1(y12+@v17p5)*@v17p1/@fnv17p3(cai12+@v17p7)*@v17p8)+@fnv17p2(y12+@v17p6)^@v17p3*@fnv17p4(cai12+@v17p2)*@v17p4 newy3 = (@fnv17p1(y13+@v17p5)*@v17p1/@fnv17p3(cai13+@v17p7)*@v17p8)+@fnv17p2(y13+@v17p6)^@v17p3*@fnv17p4(cai13+@v17p2)*@v17p4 elseif (@variation==17) ; (z/1*c)^2+c+z*c newx1 = @v18p4*(@fnv18p1(x11+@v18p2)/@v18p1*@fnv18p3(car11+@v18p7))^@v18p3+@fnv18p4(car11+@v18p5)+@fnv18p2(x11+@v18p6)*@fnv18p5(car11-@v18p8) newx2 = @v18p4*(@fnv18p1(x12+@v18p2)/@v18p1*@fnv18p3(car12+@v18p7))^@v18p3+@fnv18p4(car12+@v18p5)+@fnv18p2(x12+@v18p6)*@fnv18p5(car12-@v18p8) newx3 = @v18p4*(@fnv18p1(x13+@v18p2)/@v18p1*@fnv18p3(car13+@v18p7))^@v18p3+@fnv18p4(car13+@v18p5)+@fnv18p2(x13+@v18p6)*@fnv18p5(car13-@v18p8) newy1 = @v18p4*(@fnv18p1(y11+@v18p2)/@v18p1*@fnv18p3(cai11+@v18p7))^@v18p3+@fnv18p4(cai11+@v18p5)+@fnv18p2(y11+@v18p6)*@fnv18p5(cai11-@v18p8) newy2 = @v18p4*(@fnv18p1(y12+@v18p2)/@v18p1*@fnv18p3(cai12+@v18p7))^@v18p3+@fnv18p4(cai12+@v18p5)+@fnv18p2(y12+@v18p6)*@fnv18p5(cai12-@v18p8) newy3 = @v18p4*(@fnv18p1(y13+@v18p2)/@v18p1*@fnv18p3(cai13+@v18p7))^@v18p3+@fnv18p4(cai13+@v18p5)+@fnv18p2(y13+@v18p6)*@fnv18p5(cai13-@v18p8) elseif (@variation==18) ;z^2+c^2*z/(c+z) newx1 = @v19p4*@fnv19p1(x11+@v19p1)^@v19p3+@fnv19p3(car11+@v19p5)^2*@fnv19p2(x11+@v19p2)/(@fnv19p4(car11+@v19p6)+@fnv19p5(x11+@v19p8)*@v19p7) newx2 = @v19p4*@fnv19p1(x12+@v19p1)^@v19p3+@fnv19p3(car12+@v19p5)^2*@fnv19p2(x12+@v19p2)/(@fnv19p4(car12+@v19p6)+@fnv19p5(x12+@v19p8)*@v19p7) newx3 = @v19p4*@fnv19p1(x13+@v19p1)^@v19p3+@fnv19p3(car13+@v19p5)^2*@fnv19p2(x13+@v19p2)/(@fnv19p4(car13+@v19p6)+@fnv19p5(x13+@v19p8)*@v19p7) newy1 = @v19p4*@fnv19p1(y11+@v19p1)^@v19p3+@fnv19p3(cai11+@v19p5)^2*@fnv19p2(y11+@v19p2)/(@fnv19p4(cai11+@v19p6)+@fnv19p5(y11+@v19p8)*@v19p7) newy2 = @v19p4*@fnv19p1(y12+@v19p1)^@v19p3+@fnv19p3(cai12+@v19p5)^2*@fnv19p2(y12+@v19p2)/(@fnv19p4(cai12+@v19p6)+@fnv19p5(y12+@v19p8)*@v19p7) newy3 = @v19p4*@fnv19p1(y13+@v19p1)^@v19p3+@fnv19p3(cai13+@v19p5)^2*@fnv19p2(y13+@v19p2)/(@fnv19p4(cai13+@v19p6)+@fnv19p5(y13+@v19p8)*@v19p7) elseif (@variation==19) ; (z*z+c)/(c/z+c) newx1 = @v20p6*( (@fnv20p1(x11+@v20p4)*@v20p11*@fnv20p2(x11+@v20p8)*@v20p12+@fnv20p4(car11-@v20p1)) / ( @fnv20p5(car11+@v20p10)/@fnv20p3(x11+@v20p9)*@v20p2+@fnv20p6(car11-@v20p5) )*@v20p7 )^@v20p3-1 newx2 = @v20p6*( (@fnv20p1(x12+@v20p4)*@v20p11*@fnv20p2(x12+@v20p8)*@v20p12+@fnv20p4(car12-@v20p1)) / ( @fnv20p5(car12+@v20p10)/@fnv20p3(x12+@v20p9)*@v20p2+@fnv20p6(car12-@v20p5) )*@v20p7 )^@v20p3-1 newx3 = @v20p6*( (@fnv20p1(x13+@v20p4)*@v20p11*@fnv20p2(x13+@v20p8)*@v20p12+@fnv20p4(car13-@v20p1)) / ( @fnv20p5(car13+@v20p10)/@fnv20p3(x13+@v20p9)*@v20p2+@fnv20p6(car13-@v20p5) )*@v20p7 )^@v20p3-1 newy1 = @v20p6*( (@fnv20p1(y11+@v20p4)*@v20p11*@fnv20p2(y11+@v20p8)*@v20p12+@fnv20p4(cai11-@v20p1)) / ( @fnv20p5(cai11+@v20p10)/@fnv20p3(y11+@v20p9)*@v20p2+@fnv20p6(cai11-@v20p5) )*@v20p7 )^@v20p3-1 newy2 = @v20p6*( (@fnv20p1(y12+@v20p4)*@v20p11*@fnv20p2(y12+@v20p8)*@v20p12+@fnv20p4(cai12-@v20p1)) / ( @fnv20p5(cai12+@v20p10)/@fnv20p3(y12+@v20p9)*@v20p2+@fnv20p6(cai12-@v20p5) )*@v20p7 )^@v20p3-1 newy3 = @v20p6*( (@fnv20p1(y13+@v20p4)*@v20p11*@fnv20p2(y13+@v20p8)*@v20p12+@fnv20p4(cai13-@v20p1)) / ( @fnv20p5(cai13+@v20p10)/@fnv20p3(y13+@v20p9)*@v20p2+@fnv20p6(cai13-@v20p5) )*@v20p7 )^@v20p3-1 endif ;-----------Add parameters to final newx newy also in splitted mode------------- ;-----------exp or div are not splitted----------------------------------------- if (@finalZA==0) zax1 = (@pn10*(newx1+@pn20)^@pn30)/@pn40 zax2 = (@pn10*(newx2+@pn20)^@pn30)/@pn40 zax3 = (@pn10*(newx3+@pn20)^@pn30)/@pn40 zay1 = (@pn10*(newy1+@pn20)^@pn30)/@pn40 zay2 = (@pn10*(newy2+@pn20)^@pn30)/@pn40 zay3 = (@pn10*(newy3+@pn20)^@pn30)/@pn40 elseif (@finalZA==1) zax1 = (@pnx1*(newx1+@pnx2)^@pn3)/@pn4 zax2 = (@pnx1*(newx2+@pnx2)^@pn3)/@pn4 zax3 = (@pnx1*(newx3+@pnx2)^@pn3)/@pn4 zay1 = (@pny1*(newy1+@pny2)^@pn3)/@pn4 zay2 = (@pny1*(newy2+@pny2)^@pn3)/@pn4 zay3 = (@pny1*(newy3+@pny2)^@pn3)/@pn4 endif ;------------------------Add globals function and parameters to ZA-------------- zax1 = @fnza((zax1+@p11)*@p10)^@p12 zax2 = @fnza((zax2+@p11)*@p10)^@p12 zax3 = @fnza((zax3+@p11)*@p10)^@p12 zay1 = @fnza((zay1+@p11)*@p10)^@p12 zay2 = @fnza((zay2+@p11)*@p10)^@p12 zay3 = @fnza((zay3+@p11)*@p10)^@p12 ;-----------------------------ZB SECTION---------------------------------------- ;-----------------------------Define X|Y of hyper Complex ZB-------------------- x21=zr1-wi1+flip(zi1+wr1) x22=zr2-wi2+flip(zi2+wr2) x23=zr3-wi3+flip(zi3+wr3) y21=zr1+wi1+flip(zi1-wr1) y22=zr2+wi2+flip(zi2-wr2) y23=zr3+wi3+flip(zi3-wr3) ;---------------Add parameters and Functions also in splitted mode-------------- ;---------------exp or div are not splitted------------------------------------- if (@opXYZB==0) x21 = @mxzb0*@fnxzb0(x21+@axzb0)^@exzb0 x22 = @mxzb0*@fnxzb0(x22+@axzb0)^@exzb0 x23 = @mxzb0*@fnxzb0(x23+@axzb0)^@exzb0 y21 = @mxzb0*@fnxzb0(y21+@axzb0)^@exzb0 y22 = @mxzb0*@fnxzb0(y22+@axzb0)^@exzb0 y23 = @mxzb0*@fnxzb0(y23+@axzb0)^@exzb0 elseif (@opXYZB==1) x21 = @mxzb*@fnxzb(x21+@axzb)^@exzb x22 = @mxzb*@fnxzb(x22+@axzb)^@exzb x23 = @mxzb*@fnxzb(x23+@axzb)^@exzb y21 = @myzb*@fnyzb(y21+@ayzb)^@exzb y22 = @myzb*@fnyzb(y22+@ayzb)^@exzb y23 = @myzb*@fnyzb(y23+@ayzb)^@exzb endif ;----------------------Define newx|newy for ZB---------------------------------- if (@opzb==0) ; z newx11 = @fnzb1p1((x21+@zb1p1)^@zb1p3)*@zb1p2 newx12 = @fnzb1p1((x22+@zb1p1)^@zb1p3)*@zb1p2 newx13 = @fnzb1p1((x23+@zb1p1)^@zb1p3)*@zb1p2 newy11 = @fnzb1p1((y21+@zb1p1)^@zb1p3)*@zb1p2 newy12 = @fnzb1p1((y22+@zb1p1)^@zb1p3)*@zb1p2 newy13 = @fnzb1p1((y23+@zb1p1)^@zb1p3)*@zb1p2 elseif (@opzb==1) ; z*(c+z^2) newx11 = @fnzb2p1(x21+@zb2p1)*(@fnzb2p3(car11+@zb2p4)*@zb2p5+@fnzb2p2(x21+@zb2p2)^@zb2p3) newx12 = @fnzb2p1(x22+@zb2p1)*(@fnzb2p3(car12+@zb2p4)*@zb2p5+@fnzb2p2(x22+@zb2p2)^@zb2p3) newx13 = @fnzb2p1(x23+@zb2p1)*(@fnzb2p3(car13+@zb2p4)*@zb2p5+@fnzb2p2(x23+@zb2p2)^@zb2p3) newy11 = @fnzb2p1(y21+@zb2p1)*(@fnzb2p3(cai11+@zb2p4)*@zb2p5+@fnzb2p2(y21+@zb2p2)^@zb2p3) newy12 = @fnzb2p1(y22+@zb2p1)*(@fnzb2p3(cai12+@zb2p4)*@zb2p5+@fnzb2p2(y22+@zb2p2)^@zb2p3) newy13 = @fnzb2p1(y23+@zb2p1)*(@fnzb2p3(cai13+@zb2p4)*@zb2p5+@fnzb2p2(y23+@zb2p2)^@zb2p3) elseif (@opzb==2) ; z+c*z^2+c*z newx11 = @fnzb3p1(x21+@zb3p1)+@fnzb3p3(car11)*@fnzb3p2(x21+@zb3p2)^@zb3p3+@fnzb3p5(car11)*@fnzb3p4(x21+@zb3p4) newx12 = @fnzb3p1(x22+@zb3p1)+@fnzb3p3(car12)*@fnzb3p2(x22+@zb3p2)^@zb3p3+@fnzb3p5(car12)*@fnzb3p4(x22+@zb3p4) newx13 = @fnzb3p1(x23+@zb3p1)+@fnzb3p3(car13)*@fnzb3p2(x23+@zb3p2)^@zb3p3+@fnzb3p5(car13)*@fnzb3p4(x23+@zb3p4) newy11 = @fnzb3p1(y21+@zb3p1)+@fnzb3p3(cai11)*@fnzb3p2(y21+@zb3p2)^@zb3p3+@fnzb3p5(cai11)*@fnzb3p4(y21+@zb3p4) newy12 = @fnzb3p1(y22+@zb3p1)+@fnzb3p3(cai12)*@fnzb3p2(y22+@zb3p2)^@zb3p3+@fnzb3p5(cai12)*@fnzb3p4(y22+@zb3p4) newy13 = @fnzb3p1(y23+@zb3p1)+@fnzb3p3(cai13)*@fnzb3p2(y23+@zb3p2)^@zb3p3+@fnzb3p5(cai13)*@fnzb3p4(y23+@zb3p4) elseif (@opzb==3) ; z^c*c newx11 = @fnzb4p1(x21+@zb4p1)^@fnzb4p2(car11+@zb4p2)*@fnzb4p3(car11+@zb4p3)*@zb4p4 newx12 = @fnzb4p1(x22+@zb4p1)^@fnzb4p2(car12+@zb4p2)*@fnzb4p3(car12+@zb4p3)*@zb4p4 newx13 = @fnzb4p1(x23+@zb4p1)^@fnzb4p2(car13+@zb4p2)*@fnzb4p3(car13+@zb4p3)*@zb4p4 newy11 = @fnzb4p1(y21+@zb4p1)^@fnzb4p2(cai11+@zb4p2)*@fnzb4p3(cai11+@zb4p3)*@zb4p4 newy12 = @fnzb4p1(y22+@zb4p1)^@fnzb4p2(cai12+@zb4p2)*@fnzb4p3(cai12+@zb4p3)*@zb4p4 newy13 = @fnzb4p1(y23+@zb4p1)^@fnzb4p2(cai13+@zb4p2)*@fnzb4p3(cai13+@zb4p3)*@zb4p4 elseif (@opzb==4) ; z*z+cos(z)+c newx11 = @zb5p2*(@fnzb5p1(x21+@zb5p1)*@fnzb5p2(x21+@zb5p5))^@zb5p3+@fnzb5p4(x21+@zb5p6) newx12 = @zb5p2*(@fnzb5p1(x22+@zb5p1)*@fnzb5p2(x22+@zb5p5))^@zb5p3+@fnzb5p4(x22+@zb5p6) newx13 = @zb5p2*(@fnzb5p1(x23+@zb5p1)*@fnzb5p2(x23+@zb5p5))^@zb5p3+@fnzb5p4(x23+@zb5p6) newy11 = @zb5p2*(@fnzb5p1(y21+@zb5p1)*@fnzb5p2(y21+@zb5p5))^@zb5p3+@fnzb5p4(y21+@zb5p6) newy12 = @zb5p2*(@fnzb5p1(y22+@zb5p1)*@fnzb5p2(y22+@zb5p5))^@zb5p3+@fnzb5p4(y22+@zb5p6) newy13 = @zb5p2*(@fnzb5p1(y23+@zb5p1)*@fnzb5p2(y23+@zb5p5))^@zb5p3+@fnzb5p4(y23+@zb5p6) newx11 = @zb5p8*(@fnzb5p5(newx11+@zb5p7))+@fnzb5p3(car11+@zb5p4) newx12 = @zb5p8*(@fnzb5p5(newx12+@zb5p7))+@fnzb5p3(car12+@zb5p4) newx13 = @zb5p8*(@fnzb5p5(newx13+@zb5p7))+@fnzb5p3(car13+@zb5p4) newy11 = @zb5p8*(@fnzb5p5(newy11+@zb5p7))+@fnzb5p3(cai11+@zb5p4) newy12 = @zb5p8*(@fnzb5p5(newy12+@zb5p7))+@fnzb5p3(cai12+@zb5p4) newy13 = @zb5p8*(@fnzb5p5(newy13+@zb5p7))+@fnzb5p3(cai13+@zb5p4) elseif (@opzb==5) ; (z+z/(c-1))*c newx11 = (@fnzb6p1(@zb6p5*x21+@zb6p1)^@zb6p3+@fnzb6p2(@zb6p6*x21+@zb6p2)/(@fnzb6p3(car11+@zb6p4)))*@fnzb6p4(car11) newx12 = (@fnzb6p1(@zb6p5*x22+@zb6p1)^@zb6p3+@fnzb6p2(@zb6p6*x22+@zb6p2)/(@fnzb6p3(car12+@zb6p4)))*@fnzb6p4(car12) newx13 = (@fnzb6p1(@zb6p5*x23+@zb6p1)^@zb6p3+@fnzb6p2(@zb6p6*x23+@zb6p2)/(@fnzb6p3(car13+@zb6p4)))*@fnzb6p4(car13) newy11 = (@fnzb6p1(@zb6p5*y21+@zb6p1)^@zb6p3+@fnzb6p2(@zb6p6*y21+@zb6p2)/(@fnzb6p3(cai11+@zb6p4)))*@fnzb6p4(cai11) newy12 = (@fnzb6p1(@zb6p5*y22+@zb6p1)^@zb6p3+@fnzb6p2(@zb6p6*y22+@zb6p2)/(@fnzb6p3(cai12+@zb6p4)))*@fnzb6p4(cai12) newy13 = (@fnzb6p1(@zb6p5*y23+@zb6p1)^@zb6p3+@fnzb6p2(@zb6p6*y23+@zb6p2)/(@fnzb6p3(cai13+@zb6p4)))*@fnzb6p4(cai13) elseif (@opzb==6) ;z^3*c*c newx11 = @fnzb7p1(x21+@zb7p1)^@zb7p3*@fnzb7p2(car11)*@fnzb7p3(car11)*@zb7p2 newx12 = @fnzb7p1(x22+@zb7p1)^@zb7p3*@fnzb7p2(car12)*@fnzb7p3(car12)*@zb7p2 newx13 = @fnzb7p1(x23+@zb7p1)^@zb7p3*@fnzb7p2(car13)*@fnzb7p3(car13)*@zb7p2 newy11 = @fnzb7p1(y21+@zb7p1)^@zb7p3*@fnzb7p2(cai11)*@fnzb7p3(cai11)*@zb7p2 newy12 = @fnzb7p1(y22+@zb7p1)^@zb7p3*@fnzb7p2(cai12)*@fnzb7p3(cai12)*@zb7p2 newy13 = @fnzb7p1(y23+@zb7p1)^@zb7p3*@fnzb7p2(cai13)*@fnzb7p3(cai13)*@zb7p2 elseif (@opzb==7) ; (z+c)^2*(z-c) newx11 = @zb8p4*(@fnzb8p1(x21+@zb8p1)+@fnzb8p3(car11))^@zb8p3*(@zb8p5*@fnzb8p2(x21+@zb8p2)-@fnzb8p4(car11)) newx12 = @zb8p4*(@fnzb8p1(x22+@zb8p1)+@fnzb8p3(car12))^@zb8p3*(@zb8p5*@fnzb8p2(x22+@zb8p2)-@fnzb8p4(car12)) newx13 = @zb8p4*(@fnzb8p1(x23+@zb8p1)+@fnzb8p3(car13))^@zb8p3*(@zb8p5*@fnzb8p2(x23+@zb8p2)-@fnzb8p4(car13)) newy11 = @zb8p4*(@fnzb8p1(y21+@zb8p1)+@fnzb8p3(cai11))^@zb8p3*(@zb8p5*@fnzb8p2(y21+@zb8p2)-@fnzb8p4(cai11)) newy12 = @zb8p4*(@fnzb8p1(y22+@zb8p1)+@fnzb8p3(cai12))^@zb8p3*(@zb8p5*@fnzb8p2(y22+@zb8p2)-@fnzb8p4(cai12)) newy13 = @zb8p4*(@fnzb8p1(y23+@zb8p1)+@fnzb8p3(cai13))^@zb8p3*(@zb8p5*@fnzb8p2(y23+@zb8p2)-@fnzb8p4(cai13)) elseif (@opzb==8) ; z^3+c*z+(z)^3*z newx11 = @fnzb9p1(x21+@zb9p1)^@zb9p3+@fnzb9p3(car11+@zb9p8)*@fnzb9p2(x21+@zb9p5)*@zb9p2+@fnzb9p4(x21+@zb9p6)^@zb9p4*@fnzb9p5(x21+@zb9p7) newx12 = @fnzb9p1(x22+@zb9p1)^@zb9p3+@fnzb9p3(car12+@zb9p8)*@fnzb9p2(x22+@zb9p5)*@zb9p2+@fnzb9p4(x22+@zb9p6)^@zb9p4*@fnzb9p5(x22+@zb9p7) newx13 = @fnzb9p1(x23+@zb9p1)^@zb9p3+@fnzb9p3(car13+@zb9p8)*@fnzb9p2(x23+@zb9p5)*@zb9p2+@fnzb9p4(x23+@zb9p6)^@zb9p4*@fnzb9p5(x23+@zb9p7) newy11 = @fnzb9p1(y21+@zb9p1)^@zb9p3+@fnzb9p3(cai11+@zb9p8)*@fnzb9p2(y21+@zb9p5)*@zb9p2+@fnzb9p4(y21+@zb9p6)^@zb9p4*@fnzb9p5(y21+@zb9p7) newy12 = @fnzb9p1(y22+@zb9p1)^@zb9p3+@fnzb9p3(cai12+@zb9p8)*@fnzb9p2(y22+@zb9p5)*@zb9p2+@fnzb9p4(y22+@zb9p6)^@zb9p4*@fnzb9p5(y22+@zb9p7) newy13 = @fnzb9p1(y23+@zb9p1)^@zb9p3+@fnzb9p3(cai13+@zb9p8)*@fnzb9p2(y23+@zb9p5)*@zb9p2+@fnzb9p4(y23+@zb9p6)^@zb9p4*@fnzb9p5(y23+@zb9p7) elseif (@opzb==9) ; z*c*z+c*z newx11 = @zb10p6*@fnzb10p1(x21+@zb10p1)^@zb10p3*@fnzb10p3(car11+@zb10p5)*@fnzb10p2(x21+@zb10p2)+@fnzb10p5(car11)*@fnzb10p4(x21+@zb10p4) newx12 = @zb10p6*@fnzb10p1(x22+@zb10p1)^@zb10p3*@fnzb10p3(car12+@zb10p5)*@fnzb10p2(x22+@zb10p2)+@fnzb10p5(car12)*@fnzb10p4(x22+@zb10p4) newx13 = @zb10p6*@fnzb10p1(x23+@zb10p1)^@zb10p3*@fnzb10p3(car13+@zb10p5)*@fnzb10p2(x23+@zb10p2)+@fnzb10p5(car13)*@fnzb10p4(x23+@zb10p4) newy11 = @zb10p6*@fnzb10p1(y21+@zb10p1)^@zb10p3*@fnzb10p3(cai11+@zb10p5)*@fnzb10p2(y21+@zb10p2)+@fnzb10p5(cai11)*@fnzb10p4(y21+@zb10p4) newy12 = @zb10p6*@fnzb10p1(y22+@zb10p1)^@zb10p3*@fnzb10p3(cai12+@zb10p5)*@fnzb10p2(y22+@zb10p2)+@fnzb10p5(cai12)*@fnzb10p4(y22+@zb10p4) newy13 = @zb10p6*@fnzb10p1(y23+@zb10p1)^@zb10p3*@fnzb10p3(cai13+@zb10p5)*@fnzb10p2(y23+@zb10p2)+@fnzb10p5(cai13)*@fnzb10p4(y23+@zb10p4) elseif (@opzb==10) ; z/3*(-1.5*z^2+c) newx11 = @fnzb11p1(x21+@zb11p6)/@zb11p4*(@zb11p2*@fnzb11p2(x21+@zb11p5)^@zb11p3+@fnzb11p3(car11*@zb11p1)) newx12 = @fnzb11p1(x22+@zb11p6)/@zb11p4*(@zb11p2*@fnzb11p2(x22+@zb11p5)^@zb11p3+@fnzb11p3(car12*@zb11p1)) newx13 = @fnzb11p1(x23+@zb11p6)/@zb11p4*(@zb11p2*@fnzb11p2(x23+@zb11p5)^@zb11p3+@fnzb11p3(car13*@zb11p1)) newy11 = @fnzb11p1(y21+@zb11p6)/@zb11p4*(@zb11p2*@fnzb11p2(y21+@zb11p5)^@zb11p3+@fnzb11p3(cai11*@zb11p1)) newy12 = @fnzb11p1(y22+@zb11p6)/@zb11p4*(@zb11p2*@fnzb11p2(y22+@zb11p5)^@zb11p3+@fnzb11p3(cai12*@zb11p1)) newy13 = @fnzb11p1(y23+@zb11p6)/@zb11p4*(@zb11p2*@fnzb11p2(y23+@zb11p5)^@zb11p3+@fnzb11p3(cai13*@zb11p1)) elseif (@opzb==11) ; z*z^2*c newx11 = @zb12p5*@fnzb12p1(x21+@zb12p1)*@fnzb12p2(x21+@zb12p2)^@zb12p3*@fnzb12p3(car11*@zb12p4) newx12 = @zb12p5*@fnzb12p1(x22+@zb12p1)*@fnzb12p2(x22+@zb12p2)^@zb12p3*@fnzb12p3(car12*@zb12p4) newx13 = @zb12p5*@fnzb12p1(x23+@zb12p1)*@fnzb12p2(x23+@zb12p2)^@zb12p3*@fnzb12p3(car13*@zb12p4) newy11 = @zb12p5*@fnzb12p1(y21+@zb12p1)*@fnzb12p2(y21+@zb12p2)^@zb12p3*@fnzb12p3(cai11*@zb12p4) newy12 = @zb12p5*@fnzb12p1(y22+@zb12p1)*@fnzb12p2(y22+@zb12p2)^@zb12p3*@fnzb12p3(cai12*@zb12p4) newy13 = @zb12p5*@fnzb12p1(y23+@zb12p1)*@fnzb12p2(y23+@zb12p2)^@zb12p3*@fnzb12p3(cai13*@zb12p4) elseif (@opzb==12) ; -0.5*Z^2+C newx11 = @zb13p2*@fnzb13p1(x21+@zb13p1)^@zb13p3+@fnzb13p2(car11+@zb13p4) newx12 = @zb13p2*@fnzb13p1(x22+@zb13p1)^@zb13p3+@fnzb13p2(car12+@zb13p4) newx13 = @zb13p2*@fnzb13p1(x23+@zb13p1)^@zb13p3+@fnzb13p2(car13+@zb13p4) newy11 = @zb13p2*@fnzb13p1(y21+@zb13p1)^@zb13p3+@fnzb13p2(cai11+@zb13p4) newy12 = @zb13p2*@fnzb13p1(y22+@zb13p1)^@zb13p3+@fnzb13p2(cai12+@zb13p4) newy13 = @zb13p2*@fnzb13p1(y23+@zb13p1)^@zb13p3+@fnzb13p2(cai13+@zb13p4) elseif (@opzb==13) ; sqr(z)^2+c newx11 = sqr(@fnzb14p1(x21+@zb14p1))^@zb14p3+@fnzb14p2(car11*@zb14p2) newx12 = sqr(@fnzb14p1(x22+@zb14p1))^@zb14p3+@fnzb14p2(car12*@zb14p2) newx13 = sqr(@fnzb14p1(x23+@zb14p1))^@zb14p3+@fnzb14p2(car13*@zb14p2) newy11 = sqr(@fnzb14p1(y21+@zb14p1))^@zb14p3+@fnzb14p2(cai11*@zb14p2) newy12 = sqr(@fnzb14p1(y22+@zb14p1))^@zb14p3+@fnzb14p2(cai12*@zb14p2) newy13 = sqr(@fnzb14p1(y23+@zb14p1))^@zb14p3+@fnzb14p2(cai13*@zb14p2) elseif (@opzb==14) ; sqr(z)^2*c newx11 = @zb15p2*sqr(@zb15p5*@fnzb15p1(x21+@zb15p1))^@zb15p3*@fnzb15p2(car11*@zb15p4) newx12 = @zb15p2*sqr(@zb15p5*@fnzb15p1(x22+@zb15p1))^@zb15p3*@fnzb15p2(car12*@zb15p4) newx13 = @zb15p2*sqr(@zb15p5*@fnzb15p1(x23+@zb15p1))^@zb15p3*@fnzb15p2(car13*@zb15p4) newy11 = @zb15p2*sqr(@zb15p5*@fnzb15p1(y21+@zb15p1))^@zb15p3*@fnzb15p2(cai11*@zb15p4) newy12 = @zb15p2*sqr(@zb15p5*@fnzb15p1(y22+@zb15p1))^@zb15p3*@fnzb15p2(cai12*@zb15p4) newy13 = @zb15p2*sqr(@zb15p5*@fnzb15p1(y23+@zb15p1))^@zb15p3*@fnzb15p2(cai13*@zb15p4) elseif (@opzb==15) ; 0.5*z*z^2+c+z*c newx11 = @zb16p2*@fnzb16p1(x21+@zb16p1)*@fnzb16p2(x21+@zb16p4)^@zb16p3+@fnzb16p3(car11)+@fnzb16p4(x21+@zb16p5)*@zb16p6*@fnzb16p5(car11) newx12 = @zb16p2*@fnzb16p1(x22+@zb16p1)*@fnzb16p2(x22+@zb16p4)^@zb16p3+@fnzb16p3(car12)+@fnzb16p4(x22+@zb16p5)*@zb16p6*@fnzb16p5(car12) newx13 = @zb16p2*@fnzb16p1(x23+@zb16p1)*@fnzb16p2(x23+@zb16p4)^@zb16p3+@fnzb16p3(car13)+@fnzb16p4(x23+@zb16p5)*@zb16p6*@fnzb16p5(car13) newy11 = @zb16p2*@fnzb16p1(y21+@zb16p1)*@fnzb16p2(y21+@zb16p4)^@zb16p3+@fnzb16p3(cai11)+@fnzb16p4(y21+@zb16p5)*@zb16p6*@fnzb16p5(cai11) newy12 = @zb16p2*@fnzb16p1(y22+@zb16p1)*@fnzb16p2(y22+@zb16p4)^@zb16p3+@fnzb16p3(cai12)+@fnzb16p4(y22+@zb16p5)*@zb16p6*@fnzb16p5(cai12) newy13 = @zb16p2*@fnzb16p1(y23+@zb16p1)*@fnzb16p2(y23+@zb16p4)^@zb16p3+@fnzb16p3(cai13)+@fnzb16p4(y23+@zb16p5)*@zb16p6*@fnzb16p5(cai13) elseif (@opzb==16) ; z^2*c^2/z*c newx11 = @zb17p5*@fnzb17p1(x21+@zb17p1)^@zb17p3*@fnzb17p3(car11)^@zb17p6/@fnzb17p2(x21+@zb17p4)*@fnzb17p4(car11)*@zb17p2 newx12 = @zb17p5*@fnzb17p1(x22+@zb17p1)^@zb17p3*@fnzb17p3(car12)^@zb17p6/@fnzb17p2(x22+@zb17p4)*@fnzb17p4(car12)*@zb17p2 newx13 = @zb17p5*@fnzb17p1(x23+@zb17p1)^@zb17p3*@fnzb17p3(car13)^@zb17p6/@fnzb17p2(x23+@zb17p4)*@fnzb17p4(car13)*@zb17p2 newy11 = @zb17p5*@fnzb17p1(y21+@zb17p1)^@zb17p3*@fnzb17p3(cai11)^@zb17p6/@fnzb17p2(y21+@zb17p4)*@fnzb17p4(cai11)*@zb17p2 newy12 = @zb17p5*@fnzb17p1(y22+@zb17p1)^@zb17p3*@fnzb17p3(cai12)^@zb17p6/@fnzb17p2(y22+@zb17p4)*@fnzb17p4(cai12)*@zb17p2 newy13 = @zb17p5*@fnzb17p1(y23+@zb17p1)^@zb17p3*@fnzb17p3(cai13)^@zb17p6/@fnzb17p2(y23+@zb17p4)*@fnzb17p4(cai13)*@zb17p2 elseif (@opzb==17) ; z*z^2+c+z*c newx11 = @zb18p6*@fnzb18p1(x21+@zb18p1)*@fnzb18p2(x21+@zb18p4)^@zb18p3+@fnzb18p3(car11)+@fnzb18p4(x21+@zb18p5)*@fnzb18p5(car11)*@zb18p2 newx12 = @zb18p6*@fnzb18p1(x22+@zb18p1)*@fnzb18p2(x22+@zb18p4)^@zb18p3+@fnzb18p3(car12)+@fnzb18p4(x22+@zb18p5)*@fnzb18p5(car12)*@zb18p2 newx13 = @zb18p6*@fnzb18p1(x23+@zb18p1)*@fnzb18p2(x23+@zb18p4)^@zb18p3+@fnzb18p3(car13)+@fnzb18p4(x23+@zb18p5)*@fnzb18p5(car13)*@zb18p2 newy11 = @zb18p6*@fnzb18p1(y21+@zb18p1)*@fnzb18p2(y21+@zb18p4)^@zb18p3+@fnzb18p3(cai11)+@fnzb18p4(y21+@zb18p5)*@fnzb18p5(cai11)*@zb18p2 newy12 = @zb18p6*@fnzb18p1(y22+@zb18p1)*@fnzb18p2(y22+@zb18p4)^@zb18p3+@fnzb18p3(cai12)+@fnzb18p4(y22+@zb18p5)*@fnzb18p5(cai12)*@zb18p2 newy13 = @zb18p6*@fnzb18p1(y23+@zb18p1)*@fnzb18p2(y23+@zb18p4)^@zb18p3+@fnzb18p3(cai13)+@fnzb18p4(y23+@zb18p5)*@fnzb18p5(cai13)*@zb18p2 elseif (@opzb==18) ; FGZ (p1*(z^2+c)*(z^2+c))/((z^2+c)+p1)+c newx11=(@zb19p1*(@fnzb19p1(x21+@zb19p6)^@zb19p2+car11)*(@fnzb19p2(x21+@zb19p7)^@zb19p3+car11))/((@fnzb19p3(x21+@zb19p8)^@zb19p4+car11)+@zb19p1)+@fnzb19p4(car11)*@zb19p5 newx12=(@zb19p1*(@fnzb19p1(x22+@zb19p6)^@zb19p2+car12)*(@fnzb19p2(x22+@zb19p7)^@zb19p3+car12))/((@fnzb19p3(x22+@zb19p8)^@zb19p4+car12)+@zb19p1)+@fnzb19p4(car12)*@zb19p5 newx13=(@zb19p1*(@fnzb19p1(x23+@zb19p6)^@zb19p2+car13)*(@fnzb19p2(x23+@zb19p7)^@zb19p3+car13))/((@fnzb19p3(x23+@zb19p8)^@zb19p4+car13)+@zb19p1)+@fnzb19p4(car13)*@zb19p5 newy11=(@zb19p1*(@fnzb19p1(y21+@zb19p6)^@zb19p2+cai11)*(@fnzb19p2(y21+@zb19p7)^@zb19p3+cai11))/((@fnzb19p3(y21+@zb19p8)^@zb19p4+cai11)+@zb19p1)+@fnzb19p4(cai11)*@zb19p5 newy12=(@zb19p1*(@fnzb19p1(y22+@zb19p6)^@zb19p2+cai12)*(@fnzb19p2(y22+@zb19p7)^@zb19p3+cai12))/((@fnzb19p3(y22+@zb19p8)^@zb19p4+cai12)+@zb19p1)+@fnzb19p4(cai12)*@zb19p5 newy13=(@zb19p1*(@fnzb19p1(y23+@zb19p6)^@zb19p2+cai13)*(@fnzb19p2(y23+@zb19p7)^@zb19p3+cai13))/((@fnzb19p3(y23+@zb19p8)^@zb19p4+cai13)+@zb19p1)+@fnzb19p4(cai13)*@zb19p5 elseif (@opzb==19) ; (z-c)^2*z newx11 = (@fnzb20p1(x21+@zb20p1)-@fnzb20p3(car11))^@zb20p3*@fnzb20p2(x21+@zb20p2)*@zb20p4 newx12 = (@fnzb20p1(x22+@zb20p1)-@fnzb20p3(car12))^@zb20p3*@fnzb20p2(x22+@zb20p2)*@zb20p4 newx13 = (@fnzb20p1(x23+@zb20p1)-@fnzb20p3(car13))^@zb20p3*@fnzb20p2(x23+@zb20p2)*@zb20p4 newy11 = (@fnzb20p1(y21+@zb20p1)-@fnzb20p3(cai11))^@zb20p3*@fnzb20p2(y21+@zb20p2)*@zb20p4 newy12 = (@fnzb20p1(y22+@zb20p1)-@fnzb20p3(cai12))^@zb20p3*@fnzb20p2(y22+@zb20p2)*@zb20p4 newy13 = (@fnzb20p1(y23+@zb20p1)-@fnzb20p3(cai13))^@zb20p3*@fnzb20p2(y23+@zb20p2)*@zb20p4 endif ;-------Add parameters to final newx newy of ZB also in splitted mode----------- ;---------------exp or div are not splitted------------------------------------- if (@finalZB==0) zbx1 = (@pnzb10*(newx11+@pnzb20)^@pnzb30)/@pnzb40 zbx2 = (@pnzb10*(newx12+@pnzb20)^@pnzb30)/@pnzb40 zbx3 = (@pnzb10*(newx13+@pnzb20)^@pnzb30)/@pnzb40 zby1 = (@pnzb10*(newy11+@pnzb20)^@pnzb30)/@pnzb40 zby2 = (@pnzb10*(newy12+@pnzb20)^@pnzb30)/@pnzb40 zby3 = (@pnzb10*(newy13+@pnzb20)^@pnzb30)/@pnzb40 elseif (@finalZB==1) zbx1 = (@pnzbx1*(newx11+@pnzbx2)^@pnzb3)/@pnzb4 zbx2 = (@pnzbx1*(newx12+@pnzbx2)^@pnzb3)/@pnzb4 zbx3 = (@pnzbx1*(newx13+@pnzbx2)^@pnzb3)/@pnzb4 zby1 = (@pnzby1*(newy11+@pnzby2)^@pnzb3)/@pnzb4 zby2 = (@pnzby1*(newy12+@pnzby2)^@pnzb3)/@pnzb4 zby3 = (@pnzby1*(newy13+@pnzby2)^@pnzb3)/@pnzb4 endif ;------------------------Add globals function and parameters to ZB-------------- zbx1 = @fnzb((zbx1+@p8)*@p7)^@p9 zbx2 = @fnzb((zbx2+@p8)*@p7)^@p9 zbx3 = @fnzb((zbx3+@p8)*@p7)^@p9 zby1 = @fnzb((zby1+@p8)*@p7)^@p9 zby2 = @fnzb((zby2+@p8)*@p7)^@p9 zby3 = @fnzb((zby3+@p8)*@p7)^@p9 ;------------------------Z result ZA+ZB----------------------------------------- if (@opFinalZ==0) zxfin1 = zax1+zbx1 zxfin2 = zax2+zbx2 zxfin3 = zax3+zbx3 zyfin1 = zay1+zby1 zyfin2 = zay2+zby2 zyfin3 = zay3+zby3 elseif (@opFinalZ==1) zxfin1 = zax1-zbx1 zxfin2 = zax2-zbx2 zxfin3 = zax3-zbx3 zyfin1 = zay1-zby1 zyfin2 = zay2-zby2 zyfin3 = zay3-zby3 elseif (@opFinalZ==2) zxfin1 = zax1*zbx1 zxfin2 = zax2*zbx2 zxfin3 = zax3*zbx3 zyfin1 = zay1*zby1 zyfin2 = zay2*zby2 zyfin3 = zay3*zby3 elseif (@opFinalZ==3) zxfin1 = zbx1-zax1 zxfin2 = zbx2-zax2 zxfin3 = zbx3-zax3 zyfin1 = zby1-zay1 zyfin2 = zby2-zay2 zyfin3 = zby3-zay3 elseif (@opFinalZ==4) zxfin1 = zax1/zbx1 zxfin2 = zax2/zbx2 zxfin3 = zax3/zbx3 zyfin1 = zay1/zby1 zyfin2 = zay2/zby2 zyfin3 = zay3/zby3 elseif (@opFinalZ==5) zxfin1 = zbx1/zax1 zxfin2 = zbx2/zax2 zxfin3 = zbx3/zax3 zyfin1 = zby1/zay1 zyfin2 = zby2/zay2 zyfin3 = zby3/zay3 endif ;----------------------Hyper complex Planes Result------------------------------ zr1=(real(zxfin1)+real(zyfin1))/2 zr2=(real(zxfin2)+real(zyfin2))/2 zr3=(real(zxfin3)+real(zyfin3))/2 zi1=(imag(zxfin1)+imag(zyfin1))/2 zi2=(imag(zxfin2)+imag(zyfin2))/2 zi3=(imag(zxfin3)+imag(zyfin3))/2 wr1=((imag(zxfin1)-imag(zyfin1))/2) wr2=((imag(zxfin2)-imag(zyfin2))/2) wr3=((imag(zxfin3)-imag(zyfin3))/2) wi1=((real(zyfin1)-real(zxfin1))/2) wi2=((real(zyfin2)-real(zxfin2))/2) wi3=((real(zyfin3)-real(zxfin3))/2) ;------------------------Final result ZFinal= realZ+flip(imageZ)---------------- zf1=zr1+flip(zi1) zf2=zr2+flip(zi2) zf3=zr3+flip(zi3) ;------------------------Flavor------------------------------------------------- z1=@fnz(zf1+@addz)*@multz z2=@fnz(zf2+@addz)*@multz z3=@fnz(zf3+@addz)*@multz ;-----------------------Hyper Complex W----------------------------------------- w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) ;-----------------------Slope Section------------------------------------------- if (@slope == true) ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zf1|+|w1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |zf1|+|w1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done > 0 Default: title="SlopeHyperFunny" center=(0.0,0.0) angle=0 magn=1.0 maxiter=250 periodicity=0 method=multipass Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param bailout caption="Bailout Value" default=256.0 min=0.0 endparam param seed caption="Seed Value" default=(0.0,0.0) visible=@mode==1 endparam Heading caption="Plane and Rotations" show=false Endheading param selectPlane caption="Variation Plane" enum="xy""zw""xw""yz" default=0 endparam param rotx caption="Rotation YZ" default=0 min=-360 max=360 endparam param roty caption="Rotation XZ" default=0 min=-360 max=360 endparam param rotw caption="Rotation XW" default=0 min=-360 max=360 endparam param rotwy caption="Rotation YW" default=0 min=-360 max=360 endparam param rotz caption="Rotation XY" default=0 min=-360 max=360 endparam Heading caption="Slope Parameters" expanded=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=0.00000001 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="Flavor Z" show=false Endheading param addz caption="Flavor 1" default=(0.0,0.0) endparam param multz caption="Flavor 2" default=(1.0,0.0) endparam func fnz caption="Func. Flavor" default=ident() endfunc Heading caption="Init C" expanded=false Endheading param prc caption="Add Real C" default=(0.0,0.0) endparam param prcm caption="Multiply Real C" default=(1.0,0.0) endparam param prce caption="Power Real C" default=(1.0,0.0) endparam param pic caption="Add Image C" default=(0.0,0.0) endparam param picm caption="Multiply Image C" default=(1.0,0.0) endparam param pice caption="Power Image C" default=(1.0,0.0) endparam func fncr caption="Function Real C" default = ident() endfunc func fnci caption="Function Image C" default = ident() endfunc Heading caption="Loop C Sequence" expanded=false Endheading param seq caption="Sequence" enum="1""2""3" default=0 endparam param fact1 caption="Factor 1" default=(1.0,0.0) endparam param fact2 caption="Factor 2" default=(0.0,0.0) endparam param fact3 caption="Factor 3" default=(1.0,0.0) endparam param fact4 caption="Factor 4" default=(0.0,0.0) endparam param pcc caption="Add cr" default=(0.0,0.0) endparam param pcc1 caption="Multiply cr" default=(1.0,0.0) endparam param pcc2 caption="Add ci" default=(0.0,0.0) endparam param pcc3 caption="Multiply ci" default=(1.0,0.0) endparam func fnfact1 caption="Func. Factor 1" default=ident() endfunc func fnfact2 caption="Func. Factor 2" default=ident() endfunc Heading caption="Z Result" Endheading param opFinalZ caption="Select Final Result" enum="z=za+zb""z=za-zb""z=za*zb""z=zb-za""z=za/zb""z=zb/za" default=0 endparam Heading caption="Hyper Complex" expanded=true Endheading param ph1 caption="Hyper Complex" default=(0.0,0.0) endparam param ph2 caption="Julia Dimension" default=(0.0,0.0) visible=(@mode==1) endparam Heading caption="ZA SECTION" Endheading Heading caption="Change x|y to use in newx newy creating ZA" extended=false Endheading param opXY caption="Select Methos" enum="Standard""Splitted" default=0 endparam param ax0 caption="Add Set" default=(0.0,0.0) visible=@opXY==0 endparam param mx0 caption="Mult. Set" default=(1.0,0.0) visible=@opXY==0 endparam param ex0 caption="Exp. Set" default=(1.0,0.0) visible=@opXY==0 endparam func fnxx0 caption="Function " default = ident() visible=@opXY==0 endfunc param ax caption="Add X" default=(0.0,0.0) visible=@opXY==1 endparam param ay caption="Add Y" default=(0.0,0.0) visible=@opXY==1 endparam param mx caption="Mult. X" default=(1.0,0.0) visible=@opXY==1 endparam param my caption="Mult. Y" default=(1.0,0.0) visible=@opXY==1 endparam param ex caption="Power" default=(1.0,0.0) visible=@opXY==1 endparam func fnxx caption="Function X" default = ident() visible=@opXY==1 endfunc func fnyy caption="Function Y" default = ident() visible=@opXY==1 endfunc Heading caption="Operators and Parameters newx newy creating ZA" expanded=true Endheading param variation caption="Select ZA Set" enum= "1 Mandelbrot : z^2+c""2 Num Dup : 1.5*(1.5+(z*z+c+1)^2/(-1+(2*z+c-1))-0.7)""3 Funny : 0.5+(z*z*z)*c/(2+c*z)""4 Funny : (z^2+z)*c" \ "5 Mandelbrot Qud : sqr(z)+(0.2*z^3)+z+z+c""6 Flattop : (z-0.2)^2 + (c*z)/(z-0.1)" "7 Funny : (z+z)*c-z^2""8 Funny : z^2*z+c" \ "9 Funny : (z+c)^2+(z*c)^2""10 Funny : (z^2+z)*c+z*c""11 Mandelvar : ((z*c)/(z*c+2)+(z))^2+c""12 Funny : 1/(z-2.6*c)*(2*z*c)+(sqr(z)+c)" \ "13 Funny : z*sqr(z)+c*(1+z-sqr(z))""14 FGZ : a=z*z+c ; z=(0.5*a*a)/( a+0.5)+c""15 Funny : z^2*c+c+z""16 N9 : 2/sinh(1/(z*c))+c" \ "17 : Mod. carr ((z+0.5)*0.5/c)+(z+0.2)^2*c""18 Funny : (z/1*c)^2+c+z*c""19 Funny : z^2+c^2*z/(c+z)""20 Complex Spirals : (z*z+c)/(c/z+c)" default=0 endparam Heading caption="Parameters Set 1" visible = (@variation==0) Endheading param v1p2 caption="Add Z Set 1" default=(0.0,0.0) visible = (@variation==0) endparam param v1p1 caption="Mult. Z Set 1" default=(1.0,0.0) visible = (@variation==0) endparam param v1p4 caption="Mult. C Set 1" default=(1.0,0.0) visible = (@variation==0) endparam param v1p3 caption="Exp. Z Set 1" default=(2.0,0.0) visible = (@variation==0) endparam func fnv1p1 caption="Function Z" default=ident() visible = (@variation==0) endfunc func fnv1p2 caption="Function C" default=ident() visible = (@variation==0) endfunc Heading caption="Parameters Set 2" visible = (@variation==1) Endheading param v2p7 caption="Add General Set 2" default=(-0.7,0.0) visible = (@variation==1) endparam param v2p8 caption="Mult. General Set 2" default=(1.5,0.0) visible = (@variation==1) endparam param v2p5 caption="Add. 1 Num. Set 2" default=(1.5,0.0) visible = (@variation==1) endparam param v2p6 caption="Add. 2 Den. Set 2" default=(-1.0,0.0) visible = (@variation==1) endparam param v2p9 caption="Add. 1 Z Set 2" default=(0.0,0.0) visible = (@variation==1) endparam param v2p10 caption="Add. 2 Z Set 2" default=(0.0,0.0) visible = (@variation==1) endparam param v2p11 caption="Add. 3 Z Set 2" default=(0.0,0.0) visible = (@variation==1) endparam param v2p1 caption="Add 1 C Set 2" default=(1.0,0.0) visible = (@variation==1) endparam param v2p2 caption="Add. 2 C Set 2" default=(1.0,0.0) visible = (@variation==1) endparam param v2p4 caption="Mult. 1 Z Set 2" default=(2.0,0.0) visible = (@variation==1) endparam param v2p3 caption="Exp. 1 Set 2" default=(2.0,0.0) visible = (@variation==1) endparam func fnv2p1 caption="Function 1 Z" default=ident() visible = (@variation==1) endfunc func fnv2p4 caption="Function 2 Z" default=ident() visible = (@variation==1) endfunc func fnv2p2 caption="Function 1 C" default=ident() visible = (@variation==1) endfunc func fnv2p3 caption="Function 2 C" default=ident() visible = (@variation==1) endfunc Heading caption="Parameters Set 3" visible = (@variation==2) Endheading param v3p1 caption="Add 1 Set 3" default=(0.5,0.0) visible = (@variation==2) endparam param v3p5 caption="Add 1 Z Set 3" default=(0.0,0.0) visible = (@variation==2) endparam param v3p6 caption="Add 2 Z Set 3" default=(0.0,0.0) visible = (@variation==2) endparam param v3p7 caption="Add 3 Z Set 3" default=(0.0,0.0) visible = (@variation==2) endparam param v3p2 caption="Add 1 C Set 3" default=(2.0,0.0) visible = (@variation==2) endparam param v3p3 caption="Mult. 1 Z Set 3" default=(1.0,0.0) visible = (@variation==2) endparam param v3p4 caption="Mult. 2 Z Set 3" default=(1.0,0.0) visible = (@variation==2) endparam func fnv3p1 caption="Function 1 Z" default=ident() visible = (@variation==2) endfunc func fnv3p2 caption="Function 2 Z" default=ident() visible = (@variation==2) endfunc func fnv3p5 caption="Function 3 Z" default=ident() visible = (@variation==2) endfunc func fnv3p3 caption="Function 1 C" default=ident() visible = (@variation==2) endfunc func fnv3p4 caption="Function 2 C" default=ident() visible = (@variation==2) endfunc Heading caption="Parameters Set 4" visible = (@variation==3) Endheading param v4p1 caption="Add Z Set 4" default=(0.2,0.0) visible = (@variation==3) endparam param v4p2 caption="Mult. 1 Z Set 4" default=(1.0,0.0) visible = (@variation==3) endparam param v4p4 caption="Mult. 2 Z Set 4" default=(2.0,0.0) visible = (@variation==3) endparam param v4p3 caption="Exp. Z Set 4" default=(2.0,0.0) visible = (@variation==3) endparam func fnv4p1 caption="Function 1 Z" default=ident() visible = (@variation==3) endfunc func fnv4p2 caption="Function 2 Z" default=ident() visible = (@variation==3) endfunc func fnv4p3 caption="Function C" default=ident() visible = (@variation==3) endfunc Heading caption="Parameters Set 5" visible = (@variation==4) Endheading param v5p3 caption="Exp. 1 Set 5" default=(3.0,0.0) visible = (@variation==4) endparam param v5p4 caption="Exp. 2 Set 5" default=(0.0,0.0) visible = (@variation==4) endparam param v5p6 caption="Exp 3 Set 5" default=(1.0,0.0) visible = (@variation==4) endparam param v5p1 caption="Mult. 1 Z Set 5" default=(0.2,0.0) visible = (@variation==4) endparam param v5p2 caption="Mult. 2 Z Set 5" default=(0.0,0.0) visible = (@variation==4) endparam param v5p5 caption="Mult. 3 Z Set 5" default=(-1.0,0.0) visible = (@variation==4) endparam func fnv5p1 caption="Function 1 Z" default=ident() visible = (@variation==4) endfunc func fnv5p2 caption="Function 2 Z" default=ident() visible = (@variation==4) endfunc func fnv5p3 caption="Function 3 Z" default=ident() visible = (@variation==4) endfunc func fnv5p4 caption="Function C" default=ident() visible = (@variation==4) endfunc Heading caption="Parameters Set 6" visible = (@variation==5) Endheading param v6p1 caption="Add 1 Z Set 6" default=(-0.2,0.0) visible = (@variation==5) endparam param v6p2 caption="Add. 2 Z Set 6" default=(-0.1,0.0) visible = (@variation==5) endparam param v6p5 caption="Add C Set 6" default=(0.0,0.0) visible = (@variation==5) endparam param v6p4 caption="Mult. 1 Z|C Set 6" default=(1.0,0.0) visible = (@variation==5) endparam param v6p3 caption="Exp. 1 Z Set 6" default=(2.0,0.0) visible = (@variation==5) endparam func fnv6p1 caption="Function 1 Z" default=ident() visible = (@variation==5) endfunc func fnv6p2 caption="Function 2 Z" default=ident() visible = (@variation==5) endfunc func fnv6p3 caption="Function 3 Z" default=ident() visible = (@variation==5) endfunc Heading caption="Parameters Set 7" visible = (@variation==6) Endheading param v7p1 caption="Add 1 Z Set 7" default=(1.0,0.0) visible = (@variation==6) endparam param v7p5 caption="Add 1 C Set 7" default=(0.5,0.0) visible = (@variation==6) endparam param v7p2 caption="Mult. 1 Z Set 7" default=(1.0,0.0) visible = (@variation==6) endparam param v7p4 caption="Mult. 2 Z Set 7" default=(0.3,0.0) visible = (@variation==6) endparam param v7p3 caption="Exp. 3 Z Set 7" default=(2.0,0.0) visible = (@variation==6) endparam func fnv7p1 caption="Function 1 Z" default=ident() visible = (@variation==6) endfunc func fnv7p2 caption="Function 2 Z" default=ident() visible = (@variation==6) endfunc func fnv7p4 caption="Function 3 Z" default=ident() visible = (@variation==6) endfunc func fnv7p3 caption="Function C" default=ident() visible = (@variation==6) endfunc Heading caption="Parameters Set 8" visible = (@variation==7) Endheading param v8p1 caption="Add 1 Z Set 8" default=(0.0,0.0) visible = (@variation==7) endparam param v8p6 caption="Add 2 Z Set 8" default=(0.0,0.0) visible = (@variation==7) endparam param v8p5 caption="Add 1 C Set 8" default=(0.0,0.0) visible = (@variation==7) endparam param v8p2 caption="Mult. 1 Z Set 8" default=(1.0,0.0) visible = (@variation==7) endparam param v8p4 caption="Mult. 1 C Set 8" default=(1.0,0.0) visible = (@variation==7) endparam param v8p3 caption="Exp. 1 Z Set 8" default=(2.0,0.0) visible = (@variation==7) endparam func fnv8p1 caption="Function 1 Z" default=ident() visible = (@variation==7) endfunc func fnv8p2 caption="Function 2 Z" default=ident() visible = (@variation==7) endfunc func fnv8p3 caption="Function C" default=ident() visible = (@variation==7) endfunc Heading caption="Parameters Set 9" visible = (@variation==8) Endheading param v9p12 caption="Mult. Global C Set 9" default=(1.0,0.0) visible = (@variation==8) endparam param v9p4 caption="Add 1 Z Set 9" default=(0.0,0.0) visible = (@variation==8) endparam param v9p8 caption="Add 2 Z Set 9" default=(0.0,0.0) visible = (@variation==8) endparam param v9p1 caption="Mult. 1 Z Set 9" default=(-0.5,0.0) visible = (@variation==8) endparam param v9p5 caption="Mult. 2 Z Set 9" default=(1.0,0.0) visible = (@variation==8) endparam param v9p9 caption="Mult. 3 Z Set 9" default=(-0.6,0.0) visible = (@variation==8) endparam param v9p6 caption="Add 1 C Set 9" default=(0.0,0.0) visible = (@variation==8) endparam param v9p10 caption="Add 2 C Set 9" default=(1.0,0.0) visible = (@variation==8) endparam param v9p7 caption="Mult. 1 C Set 9" default=(1.0,0.0) visible = (@variation==8) endparam param v9p11 caption="Mult. 2 C Set 9" default=(1.0,0.0) visible = (@variation==8) endparam param v9p2 caption="Exp. 1 Set 9" default=(2.0,0.0) visible = (@variation==8) endparam param v9p3 caption="Exp. 2 Set 9" default=(2.0,0.0) visible = (@variation==8) endparam func fnv9p1 caption="Function 1 Z" default=ident() visible = (@variation==8) endfunc func fnv9p2 caption="Function 2 Z" default=ident() visible = (@variation==8) endfunc func fnv9p3 caption="Function 1 C" default=ident() visible = (@variation==8) endfunc func fnv9p4 caption="Function 2 C" default=ident() visible = (@variation==8) endfunc Heading caption="Parameters Set 10" visible = (@variation==9) Endheading param v10p1 caption="Add 1 Z Set 10" default=(1.0,0.0) visible = (@variation==9) endparam param v10p6 caption="Add 1 C Set 10" default=(0.0,0.0) visible = (@variation==9) endparam param v10p7 caption="Add 2 C Set 10" default=(0.0,0.0) visible = (@variation==9) endparam param v10p4 caption="Mult. 1 Z Set 10" default=(-1.0,0.0) visible = (@variation==9) endparam param v10p5 caption="Mult. 2 Z Set 10" default=(1.0,0.0) visible = (@variation==9) endparam param v10p2 caption="Mult. 1 C Set 10" default=(1.0,0.0) visible = (@variation==9) endparam param v10p3 caption="Exp. 1 Z Set 10" default=(2.0,0.0) visible = (@variation==9) endparam func fnv10p1 caption="Function 1 Z" default=ident() visible = (@variation==9) endfunc func fnv10p2 caption="Function 2 Z" default=ident() visible = (@variation==9) endfunc func fnv10p4 caption="Function 3 Z" default=ident() visible = (@variation==9) endfunc func fnv10p3 caption="Function 1 C" default=ident() visible = (@variation==9) endfunc func fnv10p5 caption="Function 2 C" default=ident() visible = (@variation==9) endfunc Heading caption="Parameters Set 11" visible = (@variation==10) Endheading param v11p1 caption="Add 1 Z Set 11" default=(0.0,0.0) visible = (@variation==10) endparam param v11p4 caption="Add 2 Z Set 11" default=(0.0,0.0) visible = (@variation==10) endparam param v11p2 caption="Add 1 C Set 11" default=(2.0,0.0) visible = (@variation==10) endparam param v11p3 caption="Exp. Set 11" default=(2.0,0.0) visible = (@variation==10) endparam func fnv11p1 caption="Function 1 Z" default=ident() visible = (@variation==10) endfunc func fnv11p2 caption="Function 2 Z" default=ident() visible = (@variation==10) endfunc func fnv11p5 caption="Function 3 Z" default=ident() visible = (@variation==10) endfunc func fnv11p3 caption="Function 1 C" default=ident() visible = (@variation==10) endfunc func fnv11p4 caption="Function 2 C" default=ident() visible = (@variation==10) endfunc Heading caption="Parameters Set 12" visible = (@variation==11) Endheading param v12p1 caption="Div. Set 12" default=(1.0,0.0) visible = (@variation==11) endparam param v12p6 caption="Wheel 1 Z Set 12" default=(1.0,1.0) visible = (@variation==11) endparam param v12p4 caption="Add 1 Z Set 12" default=(0.0,0.0) visible = (@variation==11) endparam param v12p8 caption="Add 1 Z|C Set 12" default=(0.0,0.0) visible = (@variation==11) endparam param v12p7 caption="Mult. 1 Z|C Set 12" default=(2.0,0.0) visible = (@variation==11) endparam param v12p2 caption="Mult. 1 Z Set 12" default=(1.0,0.0) visible = (@variation==11) endparam param v12p9 caption="Mult. 1 C Set 12" default=(2.6,0.0) visible = (@variation==11) endparam param v12p3 caption="Mult. 2 C Set 12" default=(1.0,0.0) visible = (@variation==11) endparam param v12p5 caption="Mult. 2 C Set 12" default=(1.0,0.0) visible = (@variation==11) endparam func fnv12p1 caption="Function 1 Z" default=ident() visible = (@variation==11) endfunc func fnv12p2 caption="Function 2 Z" default=ident() visible = (@variation==11) endfunc func fnv12p4 caption="Function 3 Z" default=ident() visible = (@variation==11) endfunc func fnv12p3 caption="Function 1 C" default=ident() visible = (@variation==11) endfunc func fnv12p5 caption="Function 2 C" default=ident() visible = (@variation==11) endfunc func fnv12p6 caption="Function 3 C" default=ident() visible = (@variation==11) endfunc Heading caption="Parameters Set 13" visible = (@variation==12) Endheading param v13p1 caption="Add 1 Z Set 13" default=(0.0,0.0) visible = (@variation==12) endparam param v13p2 caption="Add 2 Z Set 13" default=(0.0,0.0) visible = (@variation==12) endparam param v13p6 caption="Add 3 Z Set 13" default=(0.5,0.0) visible = (@variation==12) endparam param v13p7 caption="Add 4 Z Set 13" default=(0.0,0.0) visible = (@variation==12) endparam param v13p5 caption="Add 1 C Set 13" default=(0.0,0.0) visible = (@variation==12) endparam param v13p3 caption="Mult. 1 Z Set 13" default=(1.0,0.0) visible = (@variation==12) endparam param v13p4 caption="Mult. 1 C Set 13" default=(1.0,0.0) visible = (@variation==12) endparam func fnv13p1 caption="Function 1 Z" default=ident() visible = (@variation==12) endfunc func fnv13p2 caption="Function 2 Z" default=ident() visible = (@variation==12) endfunc func fnv13p4 caption="Function 3 Z" default=ident() visible = (@variation==12) endfunc func fnv13p5 caption="Function 4 Z" default=ident() visible = (@variation==12) endfunc func fnv13p3 caption="Function C" default=ident() visible = (@variation==12) endfunc Heading caption="Parameters Set 14" visible = (@variation==13) Endheading param v14p2 caption="Add 1 A Set 14" default=(0.0,0.0) visible = (@variation==13) endparam param v14p3 caption="Add 2 A Set 14" default=(0.0,0.0) visible = (@variation==13) endparam param v14p4 caption="Add 3 A Set 14" default=(0.5,0.0) visible = (@variation==13) endparam param v14p5 caption="Add 1 C Set 14" default=(0.0,0.0) visible = (@variation==13) endparam param v14p1 caption="Mult. 1 A Set 14" default=(0.5,0.0) visible = (@variation==13) endparam param v14p6 caption="Mult. 2 A Set 14" default=(1.0,0.0) visible = (@variation==13) endparam func fnv14p1 caption="Function 1 A" default=ident() visible = (@variation==13) endfunc func fnv14p2 caption="Function 2 A" default=ident() visible = (@variation==13) endfunc func fnv14p3 caption="Function 3 A" default=ident() visible = (@variation==13) endfunc func fnv14p4 caption="Function 1 C" default=ident() visible = (@variation==13) endfunc Heading caption="Parameters Set 15" visible = (@variation==14) Endheading param v15p1 caption="Add 1 Z Set 15" default=(0.5,0.0) visible = (@variation==14) endparam param v15p6 caption="Add 2 Z Set 15" default=(0.0,0.0) visible = (@variation==14) endparam param v15p4 caption="Add 1 C Set 15" default=(0.0,0.0) visible = (@variation==14) endparam param v15p5 caption="Add 2 C Set 15" default=(0.0,0.0) visible = (@variation==14) endparam param v15p2 caption="Mult. 1 Z Set 15" default=(-2.0,0.0) visible = (@variation==14) endparam param v15p3 caption="Exp. 1 Z Set 15" default=(2.0,0.0) visible = (@variation==14) endparam func fnv15p1 caption="Function 1 Z" default=ident() visible = (@variation==14) endfunc func fnv15p2 caption="Function 2 Z" default=ident() visible = (@variation==14) endfunc func fnv15p3 caption="Function 1 C" default=ident() visible = (@variation==14) endfunc func fnv15p4 caption="Function 2 C" default=ident() visible = (@variation==14) endfunc Heading caption="Parameters Set 16" visible = (@variation==15) Endheading param v16p1 caption="Div. 1 Set 16" default=(2.0,0.0) visible = (@variation==15) endparam param v16p2 caption="Div. 2 Set 16" default=(1.0,0.0) visible = (@variation==15) endparam param v16p4 caption="Add 1 Z Set 16" default=(0.0,0.0) visible = (@variation==15) endparam param v16p5 caption="Add 1 C Set 16" default=(0.0,0.0) visible = (@variation==15) endparam param v16p6 caption="Add 2 C Set 16" default=(0.0,0.0) visible = (@variation==15) endparam param v16p3 caption="Mult. 1 C Set 16" default=(1.0,0.0) visible = (@variation==15) endparam func fnv16p1 caption="Function 1 Z" default=sinh() visible = (@variation==15) endfunc func fnv16p2 caption="Function 2 Z" default=ident() visible = (@variation==15) endfunc func fnv16p3 caption="Function 1 C" default=ident() visible = (@variation==15) endfunc func fnv16p4 caption="Function 2 C" default=ident() visible = (@variation==15) endfunc Heading caption="Parameters Set 17" visible = (@variation==16) Endheading param v17p1 caption="Mult/Div 1 Set 17" default=(0.5,0.0) visible = (@variation==16) endparam param v17p5 caption="Add 1 Z Set 17" default=(0.5,0.0) visible = (@variation==16) endparam param v17p6 caption="Add 2 Z Set 17" default=(0.2,0.0) visible = (@variation==16) endparam param v17p7 caption="Add 1 C Set 17" default=(0.0,0.0) visible = (@variation==16) endparam param v17p2 caption="Add 2 C Set 17" default=(0.0,0.0) visible = (@variation==16) endparam param v17p8 caption="Mult. 1 C Set 17" default=(1.0,0.0) visible = (@variation==16) endparam param v17p4 caption="Mult. 2 C Set 17" default=(1.0,0.0) visible = (@variation==16) endparam param v17p3 caption="Exp. Set 17" default=(2.0,0.0) visible = (@variation==16) endparam func fnv17p1 caption="Function 1 Z" default=ident() visible = (@variation==16) endfunc func fnv17p2 caption="Function 2 Z" default=ident() visible = (@variation==16) endfunc func fnv17p3 caption="Function 1 C" default=ident() visible = (@variation==16) endfunc func fnv17p4 caption="Function 2 C" default=ident() visible = (@variation==16) endfunc Heading caption="Parameters Set 18" visible = (@variation==17) Endheading param v18p4 caption="Mult. 1 Z|C Set 18" default=(1.0,0.0) visible = (@variation==17) endparam param v18p2 caption="Add 1 Z Set 18" default=(0.0,0.0) visible = (@variation==17) endparam param v18p6 caption="Add 2 Z Set 18" default=(0.0,0.0) visible = (@variation==17) endparam param v18p5 caption="Add 1 C Set 18" default=(0.0,0.0) visible = (@variation==17) endparam param v18p7 caption="Add 2 C Set 18" default=(0.0,0.0) visible = (@variation==17) endparam param v18p8 caption="Add 3 C Set 18" default=(0.0,0.0) visible = (@variation==17) endparam param v18p1 caption="Mult. 1 C Set 18" default=(1.0,0.0) visible = (@variation==17) endparam param v18p3 caption="Exp. Set 18" default=(2.0,0.0) visible = (@variation==17) endparam func fnv18p1 caption="Function 1 Z" default=ident() visible = (@variation==17) endfunc func fnv18p2 caption="Function 2 Z" default=ident() visible = (@variation==17) endfunc func fnv18p3 caption="Function 1 C" default=ident() visible = (@variation==17) endfunc func fnv18p4 caption="Function 2 C" default=ident() visible = (@variation==17) endfunc func fnv18p5 caption="Function 3 C" default=ident() visible = (@variation==17) endfunc Heading caption="Parameters Set 19" visible = (@variation==18) Endheading param v19p1 caption="Add 1 Z Set 19" default=(0.0,0.0) visible = (@variation==18) endparam param v19p2 caption="Add 2 Z Set 19" default=(0.0,0.0) visible = (@variation==18) endparam param v19p8 caption="Add 3 Z Set 19" default=(0.0,0.0) visible = (@variation==18) endparam param v19p5 caption="Add 1 C Set 19" default=(0.0,0.0) visible = (@variation==18) endparam param v19p6 caption="Add 2 C Set 19" default=(0.0,0.0) visible = (@variation==18) endparam param v19p4 caption="Mult. 1 Z Set 19" default=(1.0,0.0) visible = (@variation==18) endparam param v19p7 caption="Mult. 2 Z Set 19" default=(1.0,0.0) visible = (@variation==18) endparam param v19p3 caption="Exp. Set 19" default=(2.0,0.0) visible = (@variation==18) endparam func fnv19p1 caption="Function 1 Z" default=ident() visible = (@variation==18) endfunc func fnv19p2 caption="Function 2 Z" default=ident() visible = (@variation==18) endfunc func fnv19p5 caption="Function 3 Z" default=ident() visible = (@variation==18) endfunc func fnv19p3 caption="Function 1 C" default=ident() visible = (@variation==18) endfunc func fnv19p4 caption="Function 2 C" default=ident() visible = (@variation==18) endfunc Heading caption="Parameters Set 20" visible = (@variation==19) Endheading param v20p6 caption="Global Mult 1 Num. Set 20" default=(1.0,0.0) visible = (@variation==19) endparam param v20p7 caption="Global Mult 2 Den. Set 20" default=(1.0,0.0) visible = (@variation==19) endparam param v20p4 caption="Add 1 Z Set 20" default=(0.0,0.0) visible = (@variation==19) endparam param v20p8 caption="Add 2 Z Set 20" default=(0.0,0.0) visible = (@variation==19) endparam param v20p9 caption="Add 3 Z Set 20" default=(0.0,0.0) visible = (@variation==19) endparam param v20p1 caption="Add 1 C Set 20" default=(1.0,0.0) visible = (@variation==19) endparam param v20p10 caption="Add 2 C Set 20" default=(0.0,0.0) visible = (@variation==19) endparam param v20p5 caption="Add 3 C Set 20" default=(2.0,0.0) visible = (@variation==19) endparam param v20p11 caption="Mult. 1 Z Set 20" default=(1.0,0.0) visible = (@variation==19) endparam param v20p12 caption="Mult. 2 Z Set 20" default=(1.0,0.0) visible = (@variation==19) endparam param v20p2 caption="Mult. 3 Z Set 20" default=(-5.0,0.0) visible = (@variation==19) endparam param v20p3 caption="Exp. Set 20" default=(2.0,0.0) visible = (@variation==19) endparam func fnv20p1 caption="Function 1 Z" default=ident() visible = (@variation==19) endfunc func fnv20p2 caption="Function 2 Z" default=ident() visible = (@variation==19) endfunc func fnv20p3 caption="Function 3 Z" default=ident() visible = (@variation==19) endfunc func fnv20p4 caption="Function 1 C" default=ident() visible = (@variation==19) endfunc func fnv20p5 caption="Function 2 C" default=ident() visible = (@variation==19) endfunc func fnv20p6 caption="Function 3 C" default=ident() visible = (@variation==19) endfunc Heading caption="Globals parameters for newx newy result of ZA" expanded=false Endheading param finalZA caption ="Select Mode" enum="Standard""Splitted" default=0 endparam param pn20 caption="Add Set" default=(0.0,0.0) visible = (@finalZA==0) endparam param pn10 caption="Mult. Set" default=(1.0,0.0) visible = (@finalZA==0) endparam param pn30 caption="Exp. Set" default=(1.0,0.0) visible = (@finalZA==0) endparam param pn40 caption="Divider Set" default=(1.0,0.0) visible = (@finalZA==0) endparam param pnx2 caption="Add new X" default=(0.0,0.0) visible = (@finalZA==1) endparam param pny2 caption="Add new Y" default=(0.0,0.0) visible = (@finalZA==1) endparam param pnx1 caption="Multiply new X" default=(1.0,0.0) visible = (@finalZA==1) endparam param pny1 caption="Multiply new Y" default=(1.0,0.0) visible = (@finalZA==1) endparam param pn3 caption="Exp. newX|newY" default=(1.0,0.0) visible = (@finalZA==1) endparam param pn4 caption="Divider newX|newY" default=(1.0,0.0) visible = (@finalZA==1) endparam Heading caption="Global ZA Section" expanded=false Endheading param p11 caption="Add ZA" default=(0.0,0.0) endparam param p10 caption="Multiply ZA" default=(1.0,0.0) endparam param p12 caption="Power ZA" default=(1.0,0.0) endparam func fnza caption="Function ZA" default = ident() endfunc Heading caption="ZB SECTION" Endheading Heading caption="Change x|y to use in newx newy creating ZB" expanded=false Endheading param opXYZB caption="Select Method" enum="Standard""Splitted" default=0 endparam param axzb0 caption="Add Set" default=(0.0,0.0) visible=@opXYZB==0 endparam param mxzb0 caption="Mult. Set" default=(1.0,0.0) visible=@opXYZB==0 endparam param exzb0 caption="Exp. Set" default=(1.0,0.0) visible=@opXYZB==0 endparam func fnxzb0 caption="Function" default = ident() visible=@opXYZB==0 endfunc param axzb caption="Add X" default=(0.0,0.0) visible=@opXYZB==1 endparam param ayzb caption="Add Y" default=(0.0,0.0) visible=@opXYZB==1 endparam param mxzb caption="Mult. X" default=(1.0,0.0) visible=@opXYZB==1 endparam param myzb caption="Mult. Y" default=(1.0,0.0) visible=@opXYZB==1 endparam param exzb caption="Power" default=(1.0,0.0) visible=@opXYZB==1 endparam func fnxzb caption="Function X" default = ident() visible=@opXYZB==1 endfunc func fnyzb caption="Function Y" default = ident() visible=@opXYZB==1 endfunc Heading caption="Operators and Parameters newx newy creating ZB" Endheading param opzb caption="Select ZB Set" enum = "1 Funny : z""2 Funny : z*(c+z^2)""3 Funny : z+c*z^2+c*z""4 Jm 01 : z^c*c""5 Num 018 : z*z+cos(z)+c""6 Funny : (z+z/(c-1))*c" \ "7 Funny : z^3*c*c""8 Funny : (z+c)^2*(z-c)""9 Cubic Funny : z^3+c*z+(z)^3*z""10 Funny : z*c*z+c*z""11 Funny : z/3*(-1.5*z^2+c)" \ "12 Funny : z*z^2*c""13 Funny : -0.5*z^2+c""14 Funny : sqr(z)^2+c""15 Funny : -0.5*sqr(z)^2*c""16 Funny : 0.5*z*z^2+c+c*z"\ "17 Funny : z^2*c^2/z*c""18 Funny Ikenaga : z*z^2+c+z*c""19 FGZ : (p1*(z^2+c)*(z^2+c))/((z^2+c)+p1)+c""20 Funny : (z-c)^2*z" default=0 endparam Heading caption="Parameters Set 1" visible = (@opzb==0) Endheading param zb1p1 caption="Add 1 Z Set 1" default=(0.0,0.0) visible = (@opzb==0) endparam param zb1p2 caption="Mult. 1 Z Set 1" default=(1.0,0.0) visible = (@opzb==0) endparam param zb1p3 caption="Exp. 1 Z Set 1" default=(1.0,0.0) visible = (@opzb==0) endparam func fnzb1p1 caption="Function Z" default=ident() visible = (@opzb==0) endfunc Heading caption="Parameters Set 2" visible = (@opzb==1) Endheading param zb2p1 caption="Add 1 Z Set 2" default=(0.0,0.0) visible = (@opzb==1) endparam param zb2p2 caption="Add 2 Z Set 2" default=(0.0,0.0) visible = (@opzb==1) endparam param zb2p4 caption="Add 1 C Set 2" default=(0.0,0.0) visible = (@opzb==1) endparam param zb2p5 caption="Mult. 1 C Set 2" default=(1.0,0.0) visible = (@opzb==1) endparam param zb2p3 caption="Exp. 2 Z Set 2" default=(2.0,0.0) visible = (@opzb==1) endparam func fnzb2p1 caption="Function 1 Z" default=ident() visible = (@opzb==1) endfunc func fnzb2p2 caption="Function 2 Z" default=ident() visible = (@opzb==1) endfunc func fnzb2p3 caption="Function C" default=ident() visible = (@opzb==1) endfunc Heading caption="Parameters Set 3" visible = (@opzb==2) Endheading param zb3p1 caption="Add 1 Z Set 3" default=(0.0,0.0) visible = (@opzb==2) endparam param zb3p2 caption="Add 2 Z Set 3" default=(0.0,0.0) visible = (@opzb==2) endparam param zb3p4 caption="Add 3 Z Set 3" default=(0.0,0.0) visible = (@opzb==2) endparam param zb3p3 caption="Exp. 2 Z Set 3" default=(2.0,0.0) visible = (@opzb==2) endparam func fnzb3p1 caption="Function 1 Z" default=ident() visible = (@opzb==2) endfunc func fnzb3p2 caption="Function 2 Z" default=ident() visible = (@opzb==2) endfunc func fnzb3p4 caption="Function 3 Z" default=ident() visible = (@opzb==2) endfunc func fnzb3p3 caption="Function 1 C" default=ident() visible = (@opzb==2) endfunc func fnzb3p5 caption="Function 2 C" default=ident() visible = (@opzb==2) endfunc Heading caption="Parameters Set 4" visible = (@opzb==3) Endheading param zb4p1 caption="Add 1 Z Set 4" default=(0.0,0.0) visible = (@opzb==3) endparam param zb4p2 caption="Add 1 C Set 4" default=(0.0,0.0) visible = (@opzb==3) endparam param zb4p3 caption="Add 2 C Set 4" default=(0.0,0.0) visible = (@opzb==3) endparam param zb4p4 caption="Mult. 2 C Set 4" default=(1.0,0.0) visible = (@opzb==3) endparam func fnzb4p1 caption="Function 1 Z" default=ident() visible = (@opzb==3) endfunc func fnzb4p2 caption="Function 1 C" default=ident() visible = (@opzb==3) endfunc func fnzb4p3 caption="Function 2 C" default=ident() visible = (@opzb==3) endfunc Heading caption="Parameters Set 5" visible = (@opzb==4) Endheading param zb5p1 caption="Add 1 Z Set 5" default=(0.0,0.0) visible = (@opzb==4) endparam param zb5p5 caption="Add 2 Z Set 5" default=(0.0,0.0) visible = (@opzb==4) endparam param zb5p6 caption="Add 3 Z Set 5" default=(-1.0,0.0) visible = (@opzb==4) endparam param zb5p4 caption="Add 1 C Set 5" default=(0.0,0.0) visible = (@opzb==4) endparam param zb5p2 caption="Mult. 1 Z Set 5" default=(-0.5,0.0) visible = (@opzb==4) endparam param zb5p3 caption="Exp. 1 Z Set 5" default=(1.0,0.0) visible = (@opzb==4) endparam param zb5p7 caption="Global Add Z Set 5" default=(0.0,0.0) visible = (@opzb==4) endparam param zb5p8 caption="Global Mult. Z Set 5" default=(1.0,0.0) visible = (@opzb==4) endparam func fnzb5p1 caption="Function 1 Z" default=ident() visible = (@opzb==4) endfunc func fnzb5p2 caption="Function 2 Z" default=ident() visible = (@opzb==4) endfunc func fnzb5p4 caption="Function 3 Z" default=cos() visible = (@opzb==4) endfunc func fnzb5p5 caption="Function Global" default=ident() visible = (@opzb==4) endfunc func fnzb5p3 caption="Function 1 C" default=ident() visible = (@opzb==4) endfunc Heading caption="Parameters Set 6" visible = (@opzb==5) Endheading param zb6p1 caption="Add 1 Z Set 6" default=(0.0,0.0) visible = (@opzb==5) endparam param zb6p2 caption="Add 2 Z Set 6" default=(0.0,0.0) visible = (@opzb==5) endparam param zb6p4 caption="Add 1 C Set 6" default=(-1.0,0.0) visible = (@opzb==5) endparam param zb6p6 caption="Mult. 1 Z Set 6" default=(1.0,0.0) visible = (@opzb==5) endparam param zb6p5 caption="Mult 2 Z Set 6" default=(1.0,0.0) visible = (@opzb==5) endparam param zb6p3 caption="Exp. 1 Z Set 6" default=(1.0,0.0) visible = (@opzb==5) endparam func fnzb6p1 caption="Function 1 Z" default=ident() visible = (@opzb==5) endfunc func fnzb6p2 caption="Function 2 Z" default=ident() visible = (@opzb==5) endfunc func fnzb6p3 caption="Function 1 C" default=ident() visible = (@opzb==5) endfunc func fnzb6p4 caption="Function 2 C" default=ident() visible = (@opzb==5) endfunc Heading caption="Parameters Set 7" visible = (@opzb==6) Endheading param zb7p1 caption="Add 1 Z Set 7" default=(0.0,0.0) visible = (@opzb==6) endparam param zb7p2 caption="Mult. 2 C Set 7" default=(1.0,0.0) visible = (@opzb==6) endparam param zb7p3 caption="Exp. Set 7" default=(3.0,0.0) visible = (@opzb==6) endparam func fnzb7p1 caption="Function Z" default=ident() visible = (@opzb==6) endfunc func fnzb7p2 caption="Function 1 C" default=ident() visible = (@opzb==6) endfunc func fnzb7p3 caption="Function 2 C" default=ident() visible = (@opzb==6) endfunc Heading caption="Parameters Set 8" visible = (@opzb==7) Endheading param zb8p1 caption="Add 1 Z Set 8" default=(0.0,0.0) visible = (@opzb==7) endparam param zb8p2 caption="Add. 2 Z Set 8" default=(0.0,0.0) visible = (@opzb==7) endparam param zb8p4 caption="Mult. 1 Z Set 8" default=(1.0,0.0) visible = (@opzb==7) endparam param zb8p5 caption="Mult. 2 Z Set 8" default=(1.0,0.0) visible = (@opzb==7) endparam param zb8p3 caption="Exp. 1 Set 8" default=(2.0,0.0) visible = (@opzb==7) endparam func fnzb8p1 caption="Function 1 Z" default=ident() visible = (@opzb==7) endfunc func fnzb8p2 caption="Function 2 Z" default=ident() visible = (@opzb==7) endfunc func fnzb8p3 caption="Function 1 C" default=ident() visible = (@opzb==7) endfunc func fnzb8p4 caption="Function 2 C" default=ident() visible = (@opzb==7) endfunc Heading caption="Parameters Set 9" visible = (@opzb==8) Endheading param zb9p1 caption="Add 1 Z Set 9" default=(0.0,0.0) visible = (@opzb==8) endparam param zb9p5 caption="Add 2 Z Set 9" default=(0.0,0.0) visible = (@opzb==8) endparam param zb9p6 caption="Add 3 Z Set 9" default=(0.5,0.0) visible = (@opzb==8) endparam param zb9p7 caption="Add 4 Z Set 9" default=(0.0,0.0) visible = (@opzb==8) endparam param zb9p8 caption="Add 1 C Set 9" default=(0.0,0.0) visible = (@opzb==8) endparam param zb9p2 caption="Mult. 2 Z Set 9" default=(1.0,0.0) visible = (@opzb==8) endparam param zb9p3 caption="Exp. 1 Z Set 9" default=(3.0,0.0) visible = (@opzb==8) endparam param zb9p4 caption="Exp. 2 Z Set 9" default=(3.0,0.0) visible = (@opzb==8) endparam func fnzb9p1 caption="Function 1 Z" default=ident() visible = (@opzb==8) endfunc func fnzb9p2 caption="Function 2 Z" default=ident() visible = (@opzb==8) endfunc func fnzb9p4 caption="Function 3 Z" default=ident() visible = (@opzb==8) endfunc func fnzb9p5 caption="Function 4 Z" default=ident() visible = (@opzb==8) endfunc func fnzb9p3 caption="Function C" default=ident() visible = (@opzb==8) endfunc Heading caption="Parameters Set 10" visible = (@opzb==9) Endheading param zb10p1 caption="Add 1 Z Set 10" default=(0.0,0.0) visible = (@opzb==9) endparam param zb10p2 caption="Add 2 Z Set 10" default=(0.0,0.0) visible = (@opzb==9) endparam param zb10p4 caption="Add 3 Z Set 10" default=(0.0,0.0) visible = (@opzb==9) endparam param zb10p5 caption="Add 1 C Set 10" default=(0.0,0.0) visible = (@opzb==9) endparam param zb10p6 caption="Mult. 1 Z Set 10" default=(1.0,0.0) visible = (@opzb==9) endparam param zb10p3 caption="Exp. 1 Z Set 10" default=(1.0,0.0) visible = (@opzb==9) endparam func fnzb10p1 caption="Function 1 Z" default=ident() visible = (@opzb==9) endfunc func fnzb10p2 caption="Function 2 Z" default=ident() visible = (@opzb==9) endfunc func fnzb10p4 caption="Function 3 Z" default=ident() visible = (@opzb==9) endfunc func fnzb10p3 caption="Function 1 C" default=ident() visible = (@opzb==9) endfunc func fnzb10p5 caption="Function 1 C" default=ident() visible = (@opzb==9) endfunc Heading caption="Parameters Set 11" visible = (@opzb==10) Endheading param zb11p4 caption="Div. 1 Z Set 11" default=(3.0,0.0) visible = (@opzb==10) endparam param zb11p6 caption="Add 1 Z Set 11" default=(0.0,0.0) visible = (@opzb==10) endparam param zb11p5 caption="Add 2 Z Set 11" default=(0.0,0.0) visible = (@opzb==10) endparam param zb11p2 caption="Mult. 2 Z Set 11" default=(-1.5,0.0) visible = (@opzb==10) endparam param zb11p1 caption="Mult. 1 C Set 11" default=(1.0,0.0) visible = (@opzb==10) endparam param zb11p3 caption="Exp. 2 Z Set 11" default=(2.0,0.0) visible = (@opzb==10) endparam func fnzb11p1 caption="Function 1 Z" default=ident() visible = (@opzb==10) endfunc func fnzb11p2 caption="Function 2 Z" default=ident() visible = (@opzb==10) endfunc func fnzb11p3 caption="Function C" default=ident() visible = (@opzb==10) endfunc Heading caption="Parameters Set 12" visible = (@opzb==11) Endheading param zb12p1 caption="Add 1 Z Set 12" default=(0.0,0.0) visible = (@opzb==11) endparam param zb12p2 caption="Add 2 Z Set 12" default=(0.0,0.0) visible = (@opzb==11) endparam param zb12p5 caption="Mult 1 Z Set 12" default=(1.0,0.0) visible = (@opzb==11) endparam param zb12p4 caption="Mult 1 C Set 12" default=(-0.5,0.0) visible = (@opzb==11) endparam param zb12p3 caption="Exp. 2 Z Set 12" default=(2.0,0.0) visible = (@opzb==11) endparam func fnzb12p1 caption="Function 1 Z" default=ident() visible = (@opzb==11) endfunc func fnzb12p2 caption="Function 2 Z" default=ident() visible = (@opzb==11) endfunc func fnzb12p3 caption="Function C" default=ident() visible = (@opzb==11) endfunc Heading caption="Parameters Set 13" visible = (@opzb==12) Endheading param zb13p1 caption="Add 1 Z Set 13" default=(0.0,0.0) visible = (@opzb==12) endparam param zb13p4 caption="Add 1 C Set 13" default=(0.0,0.0) visible = (@opzb==12) endparam param zb13p2 caption="Mult. 1 Z Set 13" default=(-0.5,0.0) visible = (@opzb==12) endparam param zb13p3 caption="Exp. 1 Z Set 13" default=(2.0,0.0) visible = (@opzb==12) endparam func fnzb13p1 caption="Function Z" default=ident() visible = (@opzb==12) endfunc func fnzb13p2 caption="Function C" default=ident() visible = (@opzb==12) endfunc Heading caption="Parameters Set 14" visible = (@opzb==13) Endheading param zb14p1 caption="Add 1 Z Set 14" default=(0.0,0.0) visible = (@opzb==13) endparam param zb14p2 caption="Mult. 1 C Set 14" default=(1.0,0.0) visible = (@opzb==13) endparam param zb14p3 caption="Exp. 1 Z Set 14" default=(2.0,0.0) visible = (@opzb==13) endparam func fnzb14p1 caption="Function Z" default=ident() visible = (@opzb==13) endfunc func fnzb14p2 caption="Function C" default=ident() visible = (@opzb==13) endfunc Heading caption="Parameters Set 15" visible = (@opzb==14) Endheading param zb15p2 caption="Mult. Global Set 15" default=(-0.5,0.0) visible = (@opzb==14) endparam param zb15p1 caption="Add 1 Z Set 15" default=(0.0,0.0) visible = (@opzb==14) endparam param zb15p5 caption="Mult. 1 Z Set 15" default=(1.0,0.0) visible = (@opzb==14) endparam param zb15p4 caption="Mult. 1 C Set 15" default=(1.0,0.0) visible = (@opzb==14) endparam param zb15p3 caption="Exp. 1 Z Set 15" default=(2.0,0.0) visible = (@opzb==14) endparam func fnzb15p1 caption="Function Z" default=ident() visible = (@opzb==14) endfunc func fnzb15p2 caption="Function C" default=ident() visible = (@opzb==14) endfunc Heading caption="Parameters Set 16" visible = (@opzb==15) Endheading param zb16p1 caption="Add 1 Z Set 16" default=(0.0,0.0) visible = (@opzb==15) endparam param zb16p4 caption="Add 2 Z Set 16" default=(0.0,0.0) visible = (@opzb==15) endparam param zb16p5 caption="Add 3 Z Set 16" default=(0.0,0.0) visible = (@opzb==15) endparam param zb16p2 caption="Mult. 1 Z Set 16" default=(0.5,0.0) visible = (@opzb==15) endparam param zb16p6 caption="Mult. 2 Z Set 16" default=(1.0,0.0) visible = (@opzb==15) endparam param zb16p3 caption="Exp. 2 Z Set 16" default=(2.0,0.0) visible = (@opzb==15) endparam func fnzb16p1 caption="Function 1 Z" default=ident() visible = (@opzb==15) endfunc func fnzb16p2 caption="Function 2 Z" default=ident() visible = (@opzb==15) endfunc func fnzb16p4 caption="Function 3 Z" default=ident() visible = (@opzb==15) endfunc func fnzb16p3 caption="Function 1 C" default=ident() visible = (@opzb==15) endfunc func fnzb16p5 caption="Function 2 C" default=ident() visible = (@opzb==15) endfunc Heading caption="Parameters Set 17" visible = (@opzb==16) Endheading param zb17p1 caption="Add 1 Z Set 17" default=(1.0,0.0) visible = (@opzb==16) endparam param zb17p4 caption="Add 2 Z Set 17" default=(0.0,0.0) visible = (@opzb==16) endparam param zb17p5 caption="Mult. 1 Z Set 17" default=(1.0,0.0) visible = (@opzb==16) endparam param zb17p2 caption="Mult. 2 C Set 17" default=(1.0,0.0) visible = (@opzb==16) endparam param zb17p3 caption="Exp. 1 Z Set 17" default=(2.0,0.0) visible = (@opzb==16) endparam param zb17p6 caption="Exp. 1 C Set 17" default=(2.0,0.0) visible = (@opzb==16) endparam func fnzb17p1 caption="Function 1 Z" default=ident() visible = (@opzb==16) endfunc func fnzb17p2 caption="Function 2 Z" default=ident() visible = (@opzb==16) endfunc func fnzb17p3 caption="Function 1 C" default=ident() visible = (@opzb==16) endfunc func fnzb17p4 caption="Function 2 C" default=ident() visible = (@opzb==16) endfunc Heading caption="Parameters Set 18" visible = (@opzb==17) Endheading param zb18p1 caption="Add 1 Z Set 18" default=(0.0,0.0) visible = (@opzb==17) endparam param zb18p4 caption="Add 2 Z Set 18" default=(0.0,0.0) visible = (@opzb==17) endparam param zb18p5 caption="Add 3 Z Set 18" default=(0.0,0.0) visible = (@opzb==17) endparam param zb18p6 caption="Mult. 1 Z Set 18" default=(1.0,0.0) visible = (@opzb==17) endparam param zb18p2 caption="Mult. 2 C Set 18" default=(1.5,0.0) visible = (@opzb==17) endparam param zb18p3 caption="Exp. 2 Z Set 18" default=(2.0,0.0) visible = (@opzb==17) endparam func fnzb18p1 caption="Function 1 Z" default=ident() visible = (@opzb==17) endfunc func fnzb18p2 caption="Function 2 Z" default=ident() visible = (@opzb==17) endfunc func fnzb18p4 caption="Function 3 Z" default=ident() visible = (@opzb==17) endfunc func fnzb18p3 caption="Function 1 C" default=ident() visible = (@opzb==17) endfunc func fnzb18p5 caption="Function 2 C" default=ident() visible = (@opzb==17) endfunc Heading caption="Parameters Set 19" visible = (@opzb==18) Endheading param zb19p1 caption="FGZ Set 19" default=(-0.5,0.0) visible = (@opzb==18) endparam param zb19p6 caption="Add 1 Z Set 19" default=(0.0,0.0) visible = (@opzb==18) endparam param zb19p7 caption="Add 2 Z Set 19" default=(0.0,0.0) visible = (@opzb==18) endparam param zb19p8 caption="Add 3 Z Set 19" default=(0.0,0.0) visible = (@opzb==18) endparam param zb19p5 caption="Mult 4 C Set 19" default=(1.0,0.0) visible = (@opzb==18) endparam param zb19p2 caption="Exp. 1 Z Set 19" default=(2.0,0.0) visible = (@opzb==18) endparam param zb19p3 caption="Exp. 2 Z Set 19" default=(2.0,0.0) visible = (@opzb==18) endparam param zb19p4 caption="Exp. 3 Z Set 19" default=(2.0,0.0) visible = (@opzb==18) endparam func fnzb19p1 caption="Function 1 Z" default=ident() visible = (@opzb==18) endfunc func fnzb19p2 caption="Function 2 Z" default=ident() visible = (@opzb==18) endfunc func fnzb19p3 caption="Function 3 Z" default=ident() visible = (@opzb==18) endfunc func fnzb19p4 caption="Function C" default=ident() visible = (@opzb==18) endfunc Heading caption="Parameters Set 20" visible = (@opzb==19) Endheading param zb20p1 caption="Add 1 Z Set 20" default=(0.0,0.0) visible = (@opzb==19) endparam param zb20p2 caption="Add 2 Z Set 20" default=(0.0,0.0) visible = (@opzb==19) endparam param zb20p4 caption="Mult. 2 Z Set 20" default=(1.0,0.0) visible = (@opzb==19) endparam param zb20p3 caption="Exp. Set 20" default=(2.0,0.0) visible = (@opzb==19) endparam func fnzb20p1 caption="Function 1 Z" default=ident() visible = (@opzb==19) endfunc func fnzb20p2 caption="Function 2 Z" default=ident() visible = (@opzb==19) endfunc func fnzb20p3 caption="Function C" default=ident() visible = (@opzb==19) endfunc Heading caption="Globals parameters for newx newy result of ZB" expanded=false Endheading param finalZB caption ="Select Mode" enum="Standard""Splitted" default=0 endparam param pnzb20 caption="Add Set" default=(0.0,0.0) visible = (@finalZB==0) endparam param pnzb10 caption="Mult. Set" default=(1.0,0.0) visible = (@finalZB==0) endparam param pnzb30 caption="Exp. Set" default=(1.0,0.0) visible = (@finalZB==0) endparam param pnzb40 caption="Divider Set" default=(1.0,0.0) visible = (@finalZB==0) endparam param pnzbx2 caption="Add new X" default=(0.0,0.0) visible = (@finalZB==1) endparam param pnzby2 caption="Add new Y" default=(0.0,0.0) visible = (@finalZB==1) endparam param pnzbx1 caption="Multiply new X" default=(1.0,0.0) visible = (@finalZB==1) endparam param pnzby1 caption="Multiply new Y" default=(1.0,0.0) visible = (@finalZB==1) endparam param pnzb3 caption="Exp. newX|newY" default=(1.0,0.0) visible = (@finalZB==1) endparam param pnzb4 caption="Divider newX|newY" default=(1.0,0.0) visible = (@finalZB==1) endparam Heading caption="Global ZB Section" expanded=false Endheading param p8 caption="Add ZB" default=(0.0,0.0) endparam param p7 caption="Multiply ZB" default=(1.0,0.0) endparam param p9 caption="Power ZB" default=(1.0,0.0) endparam func fnzb caption="Function Final ZB" default = ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperFunny" @seed=#pixel bailout=@bailout selectPlane=@selectPlane rotx=@rotx roty=@roty rotw=@rotw rotwy=@rotwy rotz=@rotz zb1p1=@zb1p1 zb1p2=@zb1p2 zb1p3=@zb1p3 fnzb1p1=@fnzb1p1 zb2p1=@zb2p1 zb2p2=@zb2p2 zb2p3=@zb2p3 zb2p4=@zb2p4 zb2p5=@zb2p5 fnzb2p1=@fnzb2p1 fnzb2p2=@fnzb2p2 fnzb2p3=@fnzb2p3 zb3p1=@zb3p1 zb3p2=@zb3p2 zb3p3=@zb3p3 zb3p4=@zb3p4 fnzb3p1=@fnzb3p1 fnzb3p2=@fnzb3p2 fnzb3p3=@fnzb3p3 fnzb3p4=@fnzb3p4 fnzb3p5=@fnzb3p5 zb4p1=@zb4p1 zb4p2=@zb4p2 zb4p3=@zb4p3 zb4p4=@zb4p4 fnzb4p1=@fnzb4p1 fnzb4p2=@fnzb4p2 fnzb4p3=@fnzb4p3 zb5p1=@zb5p1 zb5p2=@zb5p2 zb5p3=@zb5p3 zb5p4=@zb5p4 zb5p5=@zb5p5 zb5p6=@zb5p6 zb5p7=@zb5p7 zb5p8=@zb5p8 fnzb5p1=@fnzb5p1 fnzb5p2=@fnzb5p2 fnzb5p3=@fnzb5p3 fnzb5p4=@fnzb5p4 fnzb5p5=@fnzb5p5 zb6p1=@zb6p1 zb6p2=@zb6p2 zb6p3=@zb6p3 zb6p4=@zb6p4 zb6p5=@zb6p5 zb6p6=@zb6p6 fnzb6p1=@fnzb6p1 fnzb6p2=@fnzb6p2 fnzb6p3=@fnzb6p3 fnzb6p4=@fnzb6p4 zb7p1=@zb7p1 zb7p2=@zb7p2 zb7p3=@zb7p3 fnzb7p1=@fnzb7p1 fnzb7p2=@fnzb7p2 fnzb7p3=@fnzb7p3 zb8p1=@zb8p1 zb8p2=@zb8p2 zb8p3=@zb8p3 zb8p4=@zb8p4 zb8p5=@zb8p5 fnzb8p1=@fnzb8p1 fnzb8p2=@fnzb8p2 fnzb8p3=@fnzb8p3 fnzb8p4=@fnzb8p4 zb9p1=@zb9p1 zb9p2=@zb9p2 zb9p3=@zb9p3 zb9p4=@zb9p4 zb9p5=@zb9p5 zb9p6=@zb9p6 zb9p7=@zb9p7 zb9p8=@zb9p8 fnzb9p1=@fnzb9p1 fnzb9p2=@fnzb9p2 fnzb9p3=@fnzb9p3 fnzb9p4=@fnzb9p4 fnzb9p5=@fnzb9p5 zb10p1=@zb10p1 zb10p2=@zb10p2 zb10p3=@zb10p3 zb10p4=@zb10p4 zb10p5=@zb10p5 zb10p6=@zb10p6 fnzb10p1=@fnzb10p1 fnzb10p2=@fnzb10p2 fnzb10p3=@fnzb10p3 fnzb10p4=@fnzb10p4 fnzb10p5=@fnzb10p5 zb11p1=@zb11p1 zb11p2=@zb11p2 zb11p3=@zb11p3 zb11p4=@zb11p4 zb11p5=@zb11p5 zb11p6=@zb11p6 fnzb11p1=@fnzb11p1 fnzb11p2=@fnzb11p2 fnzb11p3=@fnzb11p3 zb12p1=@zb12p1 zb12p2=@zb12p2 zb12p3=@zb12p3 zb12p4=@zb12p4 zb12p5=@zb12p5 fnzb12p1=@fnzb12p1 fnzb12p2=@fnzb12p2 fnzb12p3=@fnzb12p3 zb13p1=@zb13p1 zb13p2=@zb13p2 zb13p3=@zb13p3 zb13p4=@zb13p4 fnzb13p1=@fnzb13p1 fnzb13p2=@fnzb13p2 zb14p1=@zb14p1 zb14p2=@zb14p2 zb14p3=@zb14p3 fnzb14p1=@fnzb14p1 fnzb14p2=@fnzb14p2 fnzb14p3=@fnzb14p3 zb15p1=@zb15p1 zb15p2=@zb15p2 zb15p3=@zb15p3 zb15p4=@zb15p4 zb15p5=@zb15p5 fnzb15p1=@fnzb15p1 fnzb15p2=@fnzb15p2 zb16p1=@zb16p1 zb16p2=@zb16p2 zb16p3=@zb16p3 zb16p4=@zb16p4 zb16p5=@zb16p5 zb16p6=@zb16p6 fnzb16p1=@fnzb16p1 fnzb16p2=@fnzb16p2 fnzb16p3=@fnzb16p3 fnzb16p4=@fnzb16p4 fnzb16p5=@fnzb16p5 zb17p1=@zb17p1 zb17p2=@zb17p2 zb17p3=@zb17p3 zb17p4=@zb17p4 zb17p5=@zb17p5 zb17p6=@zb17p6 fnzb17p1=@fnzb17p1 fnzb17p2=@fnzb17p2 fnzb17p3=@fnzb17p3 fnzb17p4=@fnzb17p4 zb18p1=@zb18p1 zb18p2=@zb18p2 zb18p3=@zb18p3 zb18p4=@zb18p4 zb18p5=@zb18p5 zb18p6=@zb18p6 fnzb18p1=@fnzb18p1 fnzb18p2=@fnzb18p2 fnzb18p3=@fnzb18p3 fnzb18p4=@fnzb18p4 fnzb18p5=@fnzb18p5 zb19p1=@zb19p1 zb19p2=@zb19p2 zb19p3=@zb19p3 zb19p4=@zb19p4 zb19p5=@zb19p5 zb19p6=@zb19p6 zb19p7=@zb19p7 zb19p8=@zb19p8 fnzb19p1=@fnzb19p1 fnzb19p2=@fnzb19p2 fnzb19p3=@fnzb19p3 fnzb19p4=@fnzb19p4 zb20p1=@zb20p1 zb20p2=@zb20p2 zb20p3=@zb20p3 zb20p4=@zb20p4 fnzb20p1=@fnzb20p1 fnzb20p2=@fnzb20p2 fnzb20p3=@fnzb20p3 v1p1=@v1p1 v1p2=@v1p2 v1p3=@v1p3 v1p4=@v1p4 fnv1p1=@fnv1p1 fnv1p2=@fnv1p2 v2p1=@v2p1 v2p2=@v2p2 v2p3=@v2p3 v2p4=@v2p4 v2p5=@v2p5 v2p6=@v2p6 v2p7=@v2p7 v2p8=@v2p8 v2p9=@v2p9 v2p10=@v2p10 v2p11=@v2p11 fnv2p1=@fnv2p1 fnv2p2=@fnv2p2 fnv2p3=@fnv2p3 fnv2p4=@fnv2p4 v3p1=@v3p1 v3p2=@v3p2 v3p3=@v3p3 v3p4=@v3p4 v3p5=@v3p5 v3p6=@v3p6 v3p7=@v3p7 fnv3p1=@fnv3p1 fnv3p2=@fnv3p2 fnv3p3=@fnv3p3 fnv3p4=@fnv3p4 fnv3p5=@fnv3p5 v4p1=@v4p1 v4p2=@v4p2 v4p3=@v4p3 v4p4=@v4p4 fnv4p1=@fnv4p1 fnv4p2=@fnv4p2 fnv4p3=@fnv4p3 v5p1=@v5p1 v5p2=@v5p2 v5p3=@v5p3 v5p4=@v5p4 v5p5=@v5p5 v5p6=@v5p6 fnv5p1=@fnv5p1 fnv5p2=@fnv5p2 fnv5p3=@fnv5p3 fnv5p4=@fnv5p4 v6p1=@v6p1 v6p2=@v6p2 v6p3=@v6p3 v6p4=@v6p4 v6p5=@v6p5 fnv6p1=@fnv6p1 fnv6p2=@fnv6p2 fnv6p3=@fnv6p3 v7p1=@v7p1 v7p2=@v7p2 v7p3=@v7p3 v7p4=@v7p4 v7p5=@v7p5 fnv7p1=@fnv7p1 fnv7p2=@fnv7p2 fnv7p3=@fnv7p3 fnv7p4=@fnv7p4 v8p1=@v8p1 v8p2=@v8p2 v8p3=@v8p3 v8p4=@v8p4 v8p5=@v8p5 v8p6=@v8p6 fnv8p1=@fnv8p1 fnv8p2=@fnv8p2 fnv8p3=@fnv8p3 v9p1=@v9p1 v9p2=@v9p2 v9p3=@v9p3 v9p4=@v9p4 v9p5=@v9p5 v9p6=@v9p6 v9p7=@v9p7 v9p8=@v9p8 v9p9=@v9p9 v9p10=@v9p10 v9p11=@v9p11 v9p12=@v9p12 fnv9p1=@fnv9p1 fnv9p2=@fnv9p2 fnv9p3=@fnv9p3 fnv9p4=@fnv9p4 v10p1=@v10p1 v10p2=@v10p2 v10p3=@v10p3 v10p4=@v10p4 v10p5=@v10p5 v10p6=@v10p6 v10p7=@v10p7 fnv10p1=@fnv10p1 fnv10p2=@fnv10p2 fnv10p3=@fnv10p3 fnv10p4=@fnv10p4 fnv10p5=@fnv10p5 v11p1=@v11p1 v11p2=@v11p2 v11p3=@v11p3 v11p4=@v11p4 fnv11p1=@fnv11p1 fnv11p2=@fnv11p2 fnv11p3=@fnv11p3 fnv11p4=@fnv11p4 fnv11p5=@fnv11p5 v12p1=@v12p1 v12p2=@v12p2 v12p3=@v12p3 v12p4=@v12p4 v12p5=@v12p5 v12p6=@v12p6 v12p7=@v12p7 v12p8=@v12p8 v12p9=@v12p9 fnv12p1=@fnv12p1 fnv12p2=@fnv12p2 fnv12p3=@fnv12p3 fnv12p4=@fnv12p4 fnv12p5=@fnv12p5 fnv12p6=@fnv12p6 v13p1=@v13p1 v13p2=@v13p2 v13p3=@v13p3 v13p4=@v13p4 v13p5=@v13p5 v13p6=@v13p6 v13p7=@v13p7 fnv13p1=@fnv13p1 fnv13p2=@fnv13p2 fnv13p3=@fnv13p3 fnv13p4=@fnv13p4 fnv13p5=@fnv13p5 v14p1=@v14p1 v14p2=@v14p2 v14p3=@v14p3 v14p4=@v14p4 v14p5=@v14p5 v14p6=@v14p6 fnv14p1=@fnv14p1 fnv14p2=@fnv14p2 fnv14p3=@fnv14p3 fnv14p4=@fnv14p4 v15p1=@v15p1 v15p2=@v15p2 v15p3=@v15p3 v15p4=@v15p4 v15p5=@v15p5 v15p6=@v15p6 fnv15p1=@fnv15p1 fnv15p2=@fnv15p2 fnv15p3=@fnv15p3 fnv15p4=@fnv15p4 v16p1=@v16p1 v16p2=@v16p2 v16p3=@v16p3 v16p4=@v16p4 v16p5=@v16p5 v16p6=@v16p6 fnv16p1=@fnv16p1 fnv16p2=@fnv16p2 fnv16p3=@fnv16p3 fnv16p4=@fnv16p4 v17p1=@v17p1 v17p2=@v17p2 v17p3=@v17p3 v17p4=@v17p4 v17p5=@v17p5 v17p6=@v17p6 v17p7=@v17p7 v17p8=@v17p8 fnv17p1=@fnv17p1 fnv17p2=@fnv17p2 fnv17p3=@fnv17p3 fnv17p4=@fnv17p4 v18p1=@v18p1 v18p2=@v18p2 v18p3=@v18p3 v18p4=@v18p4 v18p5=@v18p5 v18p6=@v18p6 v18p7=@v18p7 v18p8=@v18p8 fnv18p1=@fnv18p1 fnv18p2=@fnv18p2 fnv18p3=@fnv18p3 fnv18p4=@fnv18p4 fnv18p5=@fnv18p5 v19p1=@v19p1 v19p2=@v19p2 v19p3=@v19p3 v19p4=@v19p4 v19p5=@v19p5 v19p6=@v19p6 v19p7=@v19p7 v19p8=@v19p8 fnv19p1=@fnv19p1 fnv19p2=@fnv19p2 fnv19p3=@fnv19p3 fnv19p4=@fnv19p4 fnv19p5=@fnv19p5 v20p1=@v20p1 v20p2=@v20p2 v20p3=@v20p3 v20p4=@v20p4 v20p5=@v20p5 v20p6=@v20p6 v20p7=@v20p7 v20p8=@v20p8 v20p9=@v20p9 v20p10=@v20p10 v20p11=@v20p11 v20p12=@v20p12 fnv20p1=@fnv20p1 fnv20p2=@fnv20p2 fnv20p3=@fnv20p3 fnv20p4=@fnv20p4 fnv20p5=@fnv20p5 fnv20p6=@fnv20p6 ph1=@ph1 ph2=@ph2 opXY=@opXY fnxx0=@fnxx0 mx0=@mx0 ax0=@ax0 ex0=@ex0 fnxx=@fnxx fnyy=@fnyy ax=@ax ay=@ay mx=@mx my=@my ex=@ex opXYZB=@opXYZB axzb0=@axzb0 mxzb0=@mxzb0 exzb0=@exzb0 fnxzb0=@fnxzb0 fnxzb=@fnxzb fnyzb=@fnyzb axzb=@axzb ayzb=@ayzb mxzb=@mxzb myzb=@myzb exzb=@exzb pcc=@pcc pcc1=@pcc1 pcc2=@pcc2 pcc3=@pcc3 variation=@variation mode=@switchmode switchmode=@mode version=@version prc=@prc prcm=@prcm prce=@prce pic=@pic picm=@picm pice=@pice seq=@seq fact1=@fact1 fact2=@fact2 fact3=@fact3 fact4=@fact4 finalZA=@finalZA pn10=@pn10 pn20=@pn20 pn30=@pn30 pn40=@pn40 finalZB=@finalZB pnzb10=@pnzb10 pnzb20=@pnzb20 pnzb30=@pnzb30 pnzb40=@pnzb40 pnx1=@pnx1 pnx2=@pnx2 pny1=@pny1 pny2=@pny2 pn3=@pn3 pn4=@pn4 pnzbx1=@pnzbx1 pnzbx2=@pnzbx2 pnzby1=@pnzby1 pnzby2=@pnzby2 pnzb3=@pnzb3 pnzb4=@pnzb4 p7=@p7 p8=@p8 p9=@p9 p10=@p10 p11=@p11 p12=@p12 addz=@addz multz=@multz opza=@opza opzb=@opzb opFinalZ=@opFinalZ fncr=@fncr fnci=@fnci fnfact1=@fnfact1 fnfact2=@fnfact2 fnza=@fnza fnzb=@fnzb fnz=@fnz slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperMandel { ; Normal and Quaternion HyperComplex Mandelbrot set with 2 distortions, Phoenix and Custom. ; For normal Phoenix use Phoenix 1 = 0.5 in Operators and Parameters Section. ; Distortion section adds a new custom distortion. ; AndreaSpinozzi(Giugno 2022) Init: ;----------------------Initialize variables------------------------------------- complex z1=z2=z3=(0.0,0.0) complex y1=y2=y3=(0.0,0.0) complex a1=a2=a3=(0.0,0.0) complex b1=b2=b3=(0.0,0.0) complex anew1=anew2=anew3=(0.0,0.0) complex hnew1=hnew2=hnew3=(0.0,0.0) ;------------------------Define C=pixel----------------------------------------- complex c1=real(#pixel)+flip(imag(#pixel)) complex c2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) complex c3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) ;---------Functions return a^2-b^2 and Quaterion a^2-real(b)^2-imag(b)^2-------- complex func HyperMandelZ1(const complex a1,const complex b1) ;Z1--------------- complex h=0.0 if (@selquat==0) ;--------------------Normal----------------------------- h=@fnz(a1)^@expm1-@fnz(b1)^@expm1 elseif (@selquat==1) ;--------------------Quaternion------------------------- h=@fnz(a1)^@expm1-@fnz(real(b1))^@expm1-@fnz(imag(b1))^@expm1 endif return h endfunc complex func HyperMandelZ2(const complex a2,const complex b2) ;Z2--------------- complex h=0.0 if (@selquat==0) ;------------------Normal------------------------------ h=@fnz(a2)^@expm1-@fnz(b2)^@expm1 elseif (@selquat==1) ;--------------------Quaternion------------------------- h=@fnz(a2)^@expm1-@fnz(real(b2))^@expm1-@fnz(imag(b2))^@expm1 endif return h endfunc complex func HyperMandelZ3(const complex a3,const complex b3) ;Z3--------------- complex h=0.0 if (@selquat==0) ;--------------------Normal----------------------------- h=@fnz(a3)^@expm1-@fnz(b3)^@expm1 elseif (@selquat==1) ;--------------------Quaternion------------------------- h=@fnz(a3)^@expm1-@fnz(real(b3))^@expm1-@fnz(imag(b3))^@expm1 endif return h endfunc if (@mode=="Julia") ;--------------Julia Mode-------------------------- complex z1=real(#pixel)+flip(imag(#pixel)) complex z2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) complex z3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) complex a1=real(#pixel)+flip(imag(#pixel)) complex a2=real(#pixel+@offset)+flip(imag(#pixel+@offset)) complex a3=real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))) complex b1=real(@juliadim)+flip(imag(@juliadim)) complex b2=real(@juliadim)+flip(imag(@juliadim)) complex b3=real(@juliadim)+flip(imag(@juliadim)) complex c1=real(@seed)+flip(imag(@seed)) complex c2=real(@seed)+flip(imag(@seed)) complex c3=real(@seed)+flip(imag(@seed)) endif int iter=0 ;--------------------C sequence method------------------ int modby=@seq+2 int done = 2 ;-------------------Slope variables--------------------- float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 Loop: int method=iter%modby ;---------Proceding C sequence------------------------- if method==0 fact1=(@fnfact1(c1)*@fact3)+@fact1 fact2=(@fnfact1(c2)*@fact3)+@fact1 fact3=(@fnfact1(c3)*@fact3)+@fact1 else fact1=(@fnfact2(c1)*@fact4)+@fact2 fact2=(@fnfact2(c2)*@fact4)+@fact2 fact3=(@fnfact2(c3)*@fact4)+@fact2 endif ;----------------------------Start hyper variables anew,a,b--------------------- anew1=HyperMandelZ1(a1,b1)+@fnc(fact1)+y1*@pho1+hnew1*@dista anew2=HyperMandelZ2(a2,b2)+@fnc(fact2)+y2*@pho1+hnew2*@dista anew3=HyperMandelZ3(a3,b3)+@fnc(fact3)+y3*@pho1+hnew3*@dista if (@selquat==0) ;--------------------Normal-------------------------- b1=(@hyp2*a1*b1+@hyp1)+(hnew1*@distb)+@hyp3+y1*@pho2 b2=(@hyp2*a2*b2+@hyp1)+(hnew2*@distb)+@hyp3+y2*@pho2 b3=(@hyp2*a3*b3+@hyp1)+(hnew3*@distb)+@hyp3+y3*@pho2 elseif (@selquat==1) ;--------------------Quaternion---------------------- b1=(@hyp2*real(a1)*real(b1)+flip(@hyp2*real(a1)*imag(b1))+@hyp1)+(hnew1*@distb)+@hyp3+y1*@pho2 b2=(@hyp2*real(a2)*real(b2)+flip(@hyp2*real(a2)*imag(b2))+@hyp1)+(hnew2*@distb)+@hyp3+y2*@pho2 b3=(@hyp2*real(a3)*real(b3)+flip(@hyp2*real(a3)*imag(b3))+@hyp1)+(hnew3*@distb)+@hyp3+y3*@pho2 endif ;----------------------------Phoenix Z distortion------------------------------- y1=@fnph1(a1)+@pho3 y2=@fnph1(a2)+@pho3 y3=@fnph1(a3)+@pho3 ;----------------------------Add a new distortion------------------------------- hnewa1=HyperMandelZ1(a1,b1) hnewa2=HyperMandelZ2(a2,b2) hnewa3=HyperMandelZ3(a3,b3) hnewb1=HyperMandelZ1(a1,b1) hnewb2=HyperMandelZ2(a2,b2) hnewb3=HyperMandelZ3(a3,b3) hnewa1=@fnha(hnewa1)*@dist1+@dist2 hnewa2=@fnha(hnewa2)*@dist1+@dist2 hnewa3=@fnha(hnewa3)*@dist1+@dist2 hnewb1=@fnha(hnewb1)*@dist3+@dist4 hnewb2=@fnha(hnewb2)*@dist3+@dist4 hnewb3=@fnha(hnewb3)*@dist3+@dist4 if (@opsel==0) hnew1=hnewa1+hnewb1 hnew2=hnewa2+hnewb2 hnew3=hnewa3+hnewb3 elseif (@opsel==1) hnew1=hnewa1*hnewb1 hnew2=hnewa2*hnewb2 hnew3=hnewa3*hnewb3 endif ;---------------------Iterate last Z-------------------------------------------- a1=(@fnznew(anew1)^@expm2) a2=(@fnznew(anew2)^@expm2) a3=(@fnznew(anew3)^@expm2) ;---------------------Z result a+b---------------------------------------------- z1=(@fnfl1(a1)*@flav1+@fnfl2(b1)*@flav2) z2=(@fnfl1(a2)*@flav1+@fnfl2(b2)*@flav2) z3=(@fnfl1(a3)*@flav1+@fnfl2(b3)*@flav2) if (@slope == true) ;-------------Slope Section---------------------------- ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |a1|+|b1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |a1|+|b1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done > 0 Default: title="SlopeHyperMandel" maxiter=250 periodicity=0 method=multipass Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param bailout caption="Bailout Value" default=64.0 endparam param seed caption="Seed Value" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param flav1 caption="Flavor 1" default=(1.0,0.0) endparam param flav2 caption="Flavor 2" default=(1.0,0.0) endparam func fnfl1 caption="Function Flavor 1" default=ident() endfunc func fnfl2 caption="Function Flavor 2" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=1.0e-8 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.01 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="C Sequence" show=false Endheading param seq caption="Lenght" enum="1""2""3" default=0 endparam param fact1 caption="Factor 1" default=(0.0,0.0) endparam param fact2 caption="Factor 2" default=(0.0,0.0) endparam param fact3 caption="Factor 3" default=(1.0,0.0) endparam param fact4 caption="Factor 4" default=(1.0,0.0) endparam func fnfact1 caption="Func. Factor 1" default=ident() endfunc func fnfact2 caption="Func. Factor 2" default=ident() endfunc Heading caption="Operators and Parameters" Endheading param selquat caption="Mode" enum="Normal""Quaternion" default=0 endparam param juliadim caption="Julia Dimension" default=(0.0,0.0) visible=(@mode=="Julia") endparam param hyp1 caption="Hyper 1" default=(0.0,0.0) endparam param hyp2 caption="Hyper 2" default=(2.0,0.0) endparam param hyp3 caption="Hyper 3" default=(0.0,0.0) endparam param expm1 caption="Exponent 1" default=(2.0,0.0) endparam param expm2 caption="Exponent 2" default=(1.0,0.0) endparam param pho1 caption="Phoenix 1" default=(0.0,0.0) endparam param pho2 caption="Phoenix 2" default=(0.0,0.0) endparam param pho3 caption="Add Phoenix" default=(0.0,0.0) enabled=(@pho1!=0)||(@pho2!=0) endparam Heading caption="Distortion Section" Endheading param opsel caption="Distortion" enum="a+b""a*b" default=0 enabled=(@dista!=0.0)||(@distb!=0.0) endparam param dista caption="Start Dist. in A" default=(0.0,0.0) endparam param distb caption="Start Dist. in B" default=(0.0,0.0) endparam param dist1 caption="Dist.MultNewA" default=(1.0,0.0) enabled=(@dista!=0.0)||(@distb!=0.0) endparam param dist2 caption="Dist.AddNewA" default=(0.0,0.0) enabled=(@dista!=0.0)||(@distb!=0.0) endparam param dist3 caption="Dist.MultNewB" default=(1.0,0.0) enabled=(@dista!=0.0)||(@distb!=0.0) endparam param dist4 caption="Dist.AddNewB" default=(0.0,0.0) enabled=(@dista!=0.0)||(@distb!=0.0) endparam func fnha caption="Func. Dist. a" default=ident() enabled=(@dista!=0.0)||(@distb!=0.0) endfunc func fnhb caption="Func. Dist. b" default=ident() enabled=(@dista!=0.0)||(@distb!=0.0) endfunc Heading caption="Functions" Endheading func fnz caption="Function 1Z" default=ident() endfunc func fnznew caption="Function 2Z" default=ident() endfunc func fnc caption="Function C" default=ident() endfunc func fnph1 caption="Func. Phoenix" default=ident() enabled=(@pho1!=0.0)||(@pho2!=0.0) endfunc param version caption="Version" default=1.1 visible=false endparam Switch: type="SlopeHyperMandel" seed=#pixel bailout=@bailout flav1=@flav1 flav2=@flav2 fnfl1=@fnfl1 fnfl2=@fnfl2 seq=@seq fact1=@fact1 fact2=@fact2 fact3=@fact3 fact4=@fact4 fnfact1=@fnfact1 fnfact2=@fnfact2 opsel=@opsel selquat=@selquat hyp1=@hyp1 hyp2=@hyp2 hyp3=@hyp3 expm1=@expm1 expm2=@expm2 dista=@dista distb=@distb dist1=@dist1 dist2=@dist2 dist3=@dist3 dist4=@dist4 pho1=@pho1 pho2=@pho2 pho3=@pho3 fnznew=@fnznew fnz=@fnz fnc=@fnc fnha=@fnha fnhb=@fnhb fnph1=@fnph1 juliadim=@juliadim mode=@switchmode switchmode=@mode version=@version slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperMath { ; Modified HyperComplex sets with two hypercomplex parameters. ; It presents 7 orgform sets based an hypercomplex math and added C sequence ; 3RDimensions, slope effect, functions and parameters. ; Andrea Spinozzi(Giugno 2022) Init: z1=(0.0,0.0) z2=(0.0,0.0) z3=(0.0,0.0) r_rcl=real(@rcl) i_rcl=imag(@rcl) prea1=prea2=prea3=preb1=preb2=preb3=@pre preua1=preua2=preua3=preub1=preub2=preub3=@pre zz1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) zz2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) zz3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(#pixel)+flip(imag(#pixel)*@rd1) cz2=@rd3+@rd2*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd1) cz3=@rd3+@rd2*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd1) w1=w2=w3=cw1=cw2=cw3=p1 u1=u2=u3=cu1=cu2=cu3=p2 if (@mode=="Julia") zz1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) zz2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) zz3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz2=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz3=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) w1=p3 w2=p3 w3=p3 u1=p4 u2=p4 u3=p4 cw1=p1 cw2=p1 cw3=p1 cu1=p2 cu2=p2 cu3=p2 endif czr1=real(cz1) czr2=real(cz2) czr3=real(cz3) czi1=imag(cz1) czi2=imag(cz2) czi3=imag(cz3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) cur1=real(cu1) cur2=real(cu2) cur3=real(cu3) cui1=imag(cu1) cui2=imag(cu2) cui3=imag(cu3) ca1=czr1-cwi1+flip(czi1+cwr1) ca2=czr2-cwi2+flip(czi2+cwr2) ca3=czr3-cwi3+flip(czi3+cwr3) cb1=czr1+cwi1+flip(czi1-cwr1) cb2=czr2+cwi2+flip(czi2-cwr2) cb3=czr3+cwi3+flip(czi3-cwr3) cua1=czr1-cui1+flip(czi1+cur1) cua2=czr2-cui2+flip(czi2+cur2) cua3=czr3-cui3+flip(czi3+cur3) cub1=czr1+cui1+flip(czi1-cur1) cub2=czr2+cui2+flip(czi2-cur2) cub3=czr3+cui3+flip(czi3-cur3) ;;; slope stuff int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 int modby=@seq+2 int iter=0 Loop: int method=iter%modby a1=real(zz1)-imag(w1)+flip(imag(zz1)+real(w1)) a2=real(zz2)-imag(w2)+flip(imag(zz2)+real(w2)) a3=real(zz3)-imag(w3)+flip(imag(zz3)+real(w3)) b1=real(zz1)+imag(w1)+flip(imag(zz1)-real(w1)) b2=real(zz2)+imag(w2)+flip(imag(zz2)-real(w2)) b3=real(zz3)+imag(w3)+flip(imag(zz3)-real(w3)) ua1=real(zz1)-imag(u1)+flip(imag(zz1)+real(u1)) ua2=real(zz2)-imag(u2)+flip(imag(zz2)+real(u2)) ua3=real(zz3)-imag(u3)+flip(imag(zz3)+real(u3)) ub1=real(zz1)+imag(u1)+flip(imag(zz1)-real(u1)) ub2=real(zz2)+imag(u2)+flip(imag(zz2)-real(u2)) ub3=real(zz3)+imag(u3)+flip(imag(zz3)-real(u3)) appca1=@fnc(ca1) appca2=@fnc(ca2) appca3=@fnc(ca3) appcb1=@fnc(cb1) appcb2=@fnc(cb2) appcb3=@fnc(cb3) appcua1=@fnc(cua1) appcua2=@fnc(cua2) appcua3=@fnc(cua3) appcub1=@fnc(cub1) appcub2=@fnc(cub2) appcub3=@fnc(cub3) a1=@fnz(a1) a2=@fnz(a2) a3=@fnz(a3) b1=@fnz(b1) b2=@fnz(b2) b3=@fnz(b3) ua1=@fnz(ua1) ua2=@fnz(ua2) ua3=@fnz(ua3) ub1=@fnz(ub1) ub2=@fnz(ub2) ub3=@fnz(ub3) if (method==0) appca1=@fnfact1(appca1+@factor)*@factor2 appca2=@fnfact1(appca2+@factor)*@factor2 appca3=@fnfact1(appca3+@factor)*@factor2 appcb1=@fnfact1(appcb1+@factor)*@factor2 appcb2=@fnfact1(appcb2+@factor)*@factor2 appcb3=@fnfact1(appcb3+@factor)*@factor2 appcua1=@fnfact1(appcua1+@factor)*@factor2 appcua2=@fnfact1(appcua2+@factor)*@factor2 appcua3=@fnfact1(appcua3+@factor)*@factor2 appcub1=@fnfact1(appcub1+@factor)*@factor2 appcub2=@fnfact1(appcub2+@factor)*@factor2 appcub3=@fnfact1(appcub3+@factor)*@factor2 else appca1=@fnfact2(appca1-@factor1)*@factor3 appca2=@fnfact2(appca2-@factor1)*@factor3 appca3=@fnfact2(appca3-@factor1)*@factor3 appcb1=@fnfact2(appcb1-@factor1)*@factor3 appcb2=@fnfact2(appcb2-@factor1)*@factor3 appcb3=@fnfact2(appcb3-@factor1)*@factor3 appcua1=@fnfact2(appcua1-@factor1)*@factor3 appcua2=@fnfact2(appcua2-@factor1)*@factor3 appcua3=@fnfact2(appcua3-@factor1)*@factor3 appcub1=@fnfact2(appcub1-@factor1)*@factor3 appcub2=@fnfact2(appcub2-@factor1)*@factor3 appcub3=@fnfact2(appcub3-@factor1)*@factor3 endif if (@formula==0);---------------------------------Mandelbrot------------------- a1=@fnm(a1)^@expm+@parm/@fnm1(a1)+@fnmc(appca1) a2=@fnm(a2)^@expm+@parm/@fnm1(a2)+@fnmc(appca2) a3=@fnm(a3)^@expm+@parm/@fnm1(a3)+@fnmc(appca3) b1=@fnm(b1)^@expm+@parm/@fnm1(b1)+@fnmc(appcb1) b2=@fnm(b2)^@expm+@parm/@fnm1(b2)+@fnmc(appcb2) b3=@fnm(b3)^@expm+@parm/@fnm1(b3)+@fnmc(appcb3) ua1=@fnm(ua1)^@expm+@parm/@fnm1(ua1)+@fnmc(appcua1) ua2=@fnm(ua2)^@expm+@parm/@fnm1(ua2)+@fnmc(appcua2) ua3=@fnm(ua3)^@expm+@parm/@fnm1(ua3)+@fnmc(appcua3) ub1=@fnm(ub1)^@expm+@parm/@fnm1(ub1)+@fnmc(appcub1) ub2=@fnm(ub2)^@expm+@parm/@fnm1(ub2)+@fnmc(appcub2) ub3=@fnm(ub3)^@expm+@parm/@fnm1(ub3)+@fnmc(appcub3) elseif (@formula==1);------------------------------DAFRM----------------------- ax1=flip(appca1+@fndaf(2*@daf1/3*@fndaf1(a1)-@fndaf2(a1)/@daf2)) ax2=flip(appca2+@fndaf(2*@daf1/3*@fndaf1(a2)-@fndaf2(a2)/@daf2)) ax3=flip(appca3+@fndaf(2*@daf1/3*@fndaf1(a3)-@fndaf2(a3)/@daf2)) bx1=flip(appcb1+@fndaf(2*@daf1/3*@fndaf1(b1)-@fndaf2(b1)/@daf2)) bx2=flip(appcb2+@fndaf(2*@daf1/3*@fndaf1(b2)-@fndaf2(b2)/@daf2)) bx3=flip(appcb3+@fndaf(2*@daf1/3*@fndaf1(b3)-@fndaf2(b3)/@daf2)) uax1=flip(appcua1+@fndaf(2*@daf1/3*@fndaf1(ua1)-@fndaf2(ua1)/@daf2)) uax2=flip(appcua2+@fndaf(2*@daf1/3*@fndaf1(ua2)-@fndaf2(ua2)/@daf2)) uax3=flip(appcua3+@fndaf(2*@daf1/3*@fndaf1(ua3)-@fndaf2(ua3)/@daf2)) ubx1=flip(appcub1+@fndaf(2*@daf1/3*@fndaf1(ub1)-@fndaf2(ub1)/@daf2)) ubx2=flip(appcub2+@fndaf(2*@daf1/3*@fndaf1(ub2)-@fndaf2(ub2)/@daf2)) ubx3=flip(appcub3+@fndaf(2*@daf1/3*@fndaf1(ub3)-@fndaf2(ub3)/@daf2)) a1=@fndaf4(ax1)*@fndaf3(a1+@daf3)+@fndaf5(appca1) a2=@fndaf4(ax2)*@fndaf3(a2+@daf3)+@fndaf5(appca2) a3=@fndaf4(ax3)*@fndaf3(a3+@daf3)+@fndaf5(appca3) b1=@fndaf4(bx1)*@fndaf3(b1+@daf3)+@fndaf5(appcb1) b2=@fndaf4(bx2)*@fndaf3(b2+@daf3)+@fndaf5(appcb2) b3=@fndaf4(bx3)*@fndaf3(b3+@daf3)+@fndaf5(appcb3) ua1=@fndaf4(uax1)*@fndaf3(ua1+@daf3)+@fndaf5(appcua1) ua2=@fndaf4(uax2)*@fndaf3(ua2+@daf3)+@fndaf5(appcua2) ua3=@fndaf4(uax3)*@fndaf3(ua3+@daf3)+@fndaf5(appcua3) ub1=@fndaf4(ubx1)*@fndaf3(ub1+@daf3)+@fndaf5(appcub1) ub2=@fndaf4(ubx2)*@fndaf3(ub2+@daf3)+@fndaf5(appcub2) ub3=@fndaf4(ubx3)*@fndaf3(ub3+@daf3)+@fndaf5(appcub3) elseif (@formula==2);-----------------------------Variant RCL------------------ rcla1=@fnrcl(a1)^@exrcl-r_rcl^2-@fnrcl1(b1)^@exrcl-i_rcl^2 rcla2=@fnrcl(a2)^@exrcl-r_rcl^2-@fnrcl1(b2)^@exrcl-i_rcl^2 rcla3=@fnrcl(a3)^@exrcl-r_rcl^2-@fnrcl1(b3)^@exrcl-i_rcl^2 rclua1=@fnrcl(ua1)^@exrcl-r_rcl^2-@fnrcl1(ub1)^@exrcl-i_rcl^2 rclua2=@fnrcl(ua2)^@exrcl-r_rcl^2-@fnrcl1(ub2)^@exrcl-i_rcl^2 rclua3=@fnrcl(ua3)^@exrcl-r_rcl^2-@fnrcl1(ub3)^@exrcl-i_rcl^2 rclb1=2*a1*b1 rclb2=2*a2*b2 rclb3=2*a3*b3 rclub1=2*ua1*ub1 rclub2=2*ua2*ub2 rclub3=2*ua3*ub3 a1=@fnrcl2(rcla1+@parcl)+@fnrcl3(appca1) a2=@fnrcl2(rcla2+@parcl)+@fnrcl3(appca2) a3=@fnrcl2(rcla3+@parcl)+@fnrcl3(appca3) ua1=@fnrcl2(rclua1+@parcl)+@fnrcl3(appcua1) ua2=@fnrcl2(rclua2+@parcl)+@fnrcl3(appcua2) ua3=@fnrcl2(rclua3+@parcl)+@fnrcl3(appcua3) b1=@fnrcl2(rclb1+@parcl)+@fnrcl3(appcb1) b2=@fnrcl2(rclb2+@parcl)+@fnrcl3(appcb2) b3=@fnrcl2(rclb3+@parcl)+@fnrcl3(appcb3) ub1=@fnrcl2(rclub1+@parcl)+@fnrcl3(appcub1) ub2=@fnrcl2(rclub2+@parcl)+@fnrcl3(appcub2) ub3=@fnrcl2(rclub3+@parcl)+@fnrcl3(appcub3) elseif (@formula==3);------------Precogna-------------------------------------- pa1=sqr(prea1)*prea1+@fnpre(a1)^@expre+appca1 pa2=sqr(prea2)*prea2+@fnpre(a2)^@expre+appca2 pa3=sqr(prea3)*prea3+@fnpre(a3)^@expre+appca3 pb1=sqr(preb1)*preb1+@fnpre(b1)^@expre+appcb1 pb2=sqr(preb2)*preb2+@fnpre(b2)^@expre+appcb2 pb3=sqr(preb3)*preb3+@fnpre(b3)^@expre+appcb3 pua1=sqr(preua1)*preua1+@fnpre(ua1)^@expre+appcua1 pua2=sqr(preua2)*preua2+@fnpre(ua2)^@expre+appcua2 pua3=sqr(preua3)*preua3+@fnpre(ua3)^@expre+appcua3 pub1=sqr(preub1)*preub1+@fnpre(ub1)^@expre+appcub1 pub2=sqr(preub2)*preub2+@fnpre(ub2)^@expre+appcub2 pub3=sqr(preub3)*preub3+@fnpre(ub3)^@expre+appcub3 prea1=a1+@pre1 prea2=a2+@pre1 prea3=a3+@pre1 preb1=b1+@pre1 preb2=b2+@pre1 preb3=b3+@pre1 preua1=ua1+@pre1 preua2=ua2+@pre1 preua3=ua3+@pre1 preub1=ub1+@pre1 preub2=ub2+@pre1 preub3=ub3+@pre1 a1=pa1 a2=pa2 a3=pa3 b1=pb1 b2=pb2 b3=pb3 ua1=pua1 ua2=pua2 ua3=pua3 ub1=pub1 ub2=pub2 ub3=pub3 elseif (@formula==4);-----------------------------MandelbrotQud---------------- a1=sqr(a1)+(0.2*@fnqud(a1^@exqu))+(@qudr*@fnqud1(a1^@qudi))+(@qudr1*@fnqud2(a1^@qudi1))+@fnqud3(appca1) a2=sqr(a2)+(0.2*@fnqud(a2^@exqu))+(@qudr*@fnqud1(a2^@qudi))+(@qudr1*@fnqud2(a2^@qudi1))+@fnqud3(appca2) a3=sqr(a3)+(0.2*@fnqud(a3^@exqu))+(@qudr*@fnqud1(a3^@qudi))+(@qudr1*@fnqud2(a3^@qudi1))+@fnqud3(appca3) b1=sqr(b1)+(0.2*@fnqud(b1^@exqu))+(@qudr*@fnqud1(b1^@qudi))+(@qudr1*@fnqud2(b1^@qudi1))+@fnqud3(appcb1) b2=sqr(b2)+(0.2*@fnqud(b2^@exqu))+(@qudr*@fnqud1(b2^@qudi))+(@qudr1*@fnqud2(b2^@qudi1))+@fnqud3(appcb2) b3=sqr(b3)+(0.2*@fnqud(b3^@exqu))+(@qudr*@fnqud1(b3^@qudi))+(@qudr1*@fnqud2(b3^@qudi1))+@fnqud3(appcb3) ua1=sqr(ua1)+(0.2*@fnqud(ua1^@exqu))+(@qudr*@fnqud1(ua1^@qudi))+(@qudr1*@fnqud2(ua1^@qudi1))+@fnqud3(appcua1) ua2=sqr(ua2)+(0.2*@fnqud(ua2^@exqu))+(@qudr*@fnqud1(ua2^@qudi))+(@qudr1*@fnqud2(ua2^@qudi1))+@fnqud3(appcua2) ua3=sqr(ua3)+(0.2*@fnqud(ua3^@exqu))+(@qudr*@fnqud1(ua3^@qudi))+(@qudr1*@fnqud2(ua3^@qudi1))+@fnqud3(appcua3) ub1=sqr(ub1)+(0.2*@fnqud(ub1^@exqu))+(@qudr*@fnqud1(ub1^@qudi))+(@qudr1*@fnqud2(ub1^@qudi1))+@fnqud3(appcub1) ub2=sqr(ub2)+(0.2*@fnqud(ub2^@exqu))+(@qudr*@fnqud1(ub2^@qudi))+(@qudr1*@fnqud2(ub2^@qudi1))+@fnqud3(appcub2) ub3=sqr(ub3)+(0.2*@fnqud(ub3^@exqu))+(@qudr*@fnqud1(ub3^@qudi))+(@qudr1*@fnqud2(ub3^@qudi1))+@fnqud3(appcub3) elseif (@formula==5);-----------------------------PhonyMandel------------------ a1=(@fnphom(a1^@exphom)/@exphom-@fnphom1(a1^@exphom1*@phom1)/@exphom1-@fnphom2(a1^@exphom2)/@exphom2+@phom1*@fnphom3(a1)-@phom2)*@fnphom4(appca1) a2=(@fnphom(a2^@exphom)/@exphom-@fnphom1(a2^@exphom1*@phom1)/@exphom1-@fnphom2(a2^@exphom2)/@exphom2+@phom1*@fnphom3(a2)-@phom2)*@fnphom4(appca2) a3=(@fnphom(a3^@exphom)/@exphom-@fnphom1(a3^@exphom1*@phom1)/@exphom1-@fnphom2(a3^@exphom2)/@exphom2+@phom1*@fnphom3(a3)-@phom2)*@fnphom4(appca3) b1=(@fnphom(b1^@exphom)/@exphom-@fnphom1(b1^@exphom1*@phom1)/@exphom1-@fnphom2(b1^@exphom2)/@exphom2+@phom1*@fnphom3(b1)-@phom2)*@fnphom4(appcb1) b2=(@fnphom(b2^@exphom)/@exphom-@fnphom1(b2^@exphom1*@phom1)/@exphom1-@fnphom2(b2^@exphom2)/@exphom2+@phom1*@fnphom3(b2)-@phom2)*@fnphom4(appcb2) b3=(@fnphom(b3^@exphom)/@exphom-@fnphom1(b3^@exphom1*@phom1)/@exphom1-@fnphom2(b3^@exphom2)/@exphom2+@phom1*@fnphom3(b3)-@phom2)*@fnphom4(appcb3) ua1=(@fnphom(ua1^@exphom)/@exphom-@fnphom1(ua1^@exphom1*@phom1)/@exphom1-@fnphom2(ua1^@exphom2)/@exphom2+@phom1*@fnphom3(ua1)-@phom2)*@fnphom4(appcua1) ua2=(@fnphom(ua2^@exphom)/@exphom-@fnphom1(ua2^@exphom1*@phom1)/@exphom1-@fnphom2(ua2^@exphom2)/@exphom2+@phom1*@fnphom3(ua2)-@phom2)*@fnphom4(appcua2) ua3=(@fnphom(ua3^@exphom)/@exphom-@fnphom1(ua3^@exphom1*@phom1)/@exphom1-@fnphom2(ua3^@exphom2)/@exphom2+@phom1*@fnphom3(ua3)-@phom2)*@fnphom4(appcua3) ub1=(@fnphom(ub1^@exphom)/@exphom-@fnphom1(ub1^@exphom1*@phom1)/@exphom1-@fnphom2(ub1^@exphom2)/@exphom2+@phom1*@fnphom3(ub1)-@phom2)*@fnphom4(appcub1) ub2=(@fnphom(ub2^@exphom)/@exphom-@fnphom1(ub2^@exphom1*@phom1)/@exphom1-@fnphom2(ub2^@exphom2)/@exphom2+@phom1*@fnphom3(ub2)-@phom2)*@fnphom4(appcub2) ub3=(@fnphom(ub3^@exphom)/@exphom-@fnphom1(ub3^@exphom1*@phom1)/@exphom1-@fnphom2(ub3^@exphom2)/@exphom2+@phom1*@fnphom3(ub3)-@phom2)*@fnphom4(appcub3) a1=@glphom(a1) a2=@glphom(a2) a3=@glphom(a3) b1=@glphom(b1) b2=@glphom(b2) b3=@glphom(b3) ua1=@glphom(ua1) ua2=@glphom(ua2) ua3=@glphom(ua3) ub1=@glphom(ub1) ub2=@glphom(ub2) ub3=@glphom(ub3) elseif (@formula==6);-----------------------------DivMandel-------------------- a1=(@fndiv(a1)^@exdiv+appca1)/(@fndiv1(a1)^@exdiv1-appca1)+@fndiv2(appca1) a2=(@fndiv(a2)^@exdiv+appca2)/(@fndiv1(a2)^@exdiv1-appca2)+@fndiv2(appca2) a3=(@fndiv(a3)^@exdiv+appca3)/(@fndiv1(a3)^@exdiv1-appca3)+@fndiv2(appca3) b1=(@fndiv(b1)^@exdiv+appcb1)/(@fndiv1(b1)^@exdiv1-appcb1)+@fndiv2(appcb1) b2=(@fndiv(b2)^@exdiv+appcb2)/(@fndiv1(b2)^@exdiv1-appcb2)+@fndiv2(appcb2) b3=(@fndiv(b3)^@exdiv+appcb3)/(@fndiv1(b3)^@exdiv1-appcb3)+@fndiv2(appcb3) ua1=(@fndiv(ua1)^@exdiv+appcua1)/(@fndiv1(ua1)^@exdiv1-appcua1)+@fndiv2(appcua1) ua2=(@fndiv(ua2)^@exdiv+appcua2)/(@fndiv1(ua2)^@exdiv1-appcua2)+@fndiv2(appcua2) ua3=(@fndiv(ua3)^@exdiv+appcua3)/(@fndiv1(ua3)^@exdiv1-appcua3)+@fndiv2(appcua3) ub1=(@fndiv(ub1)^@exdiv+appcub1)/(@fndiv1(ub1)^@exdiv1-appcub1)+@fndiv2(appcub1) ub2=(@fndiv(ub2)^@exdiv+appcub2)/(@fndiv1(ub2)^@exdiv1-appcub2)+@fndiv2(appcub2) ub3=(@fndiv(ub3)^@exdiv+appcub3)/(@fndiv1(ub3)^@exdiv1-appcub3)+@fndiv2(appcub3) endif ;------------------------------------------------------------------------------- zr1=(real(a1)+real(b1))/2 zr2=(real(a2)+real(b2))/2 zr3=(real(a3)+real(b3))/2 zi1=(imag(a1)+imag(b1))/2 zi2=(imag(a2)+imag(b2))/2 zi3=(imag(a3)+imag(b3))/2 zur1=(real(ua1)+real(ub1))/2 zur2=(real(ua2)+real(ub2))/2 zur3=(real(ua3)+real(ub3))/2 zui1=(imag(ua1)+imag(ub1))/2 zui2=(imag(ua2)+imag(ub2))/2 zui3=(imag(ua3)+imag(ub3))/2 wr1=(imag(a1)-imag(b1))/2 wr2=(imag(a2)-imag(b2))/2 wr3=(imag(a3)-imag(b3))/2 wi1=(real(b1)-real(a1))/2 wi2=(real(b2)-real(a2))/2 wi3=(real(b3)-real(a3))/2 ur1=(imag(ua1)-imag(ub1))/2 ur2=(imag(ua2)-imag(ub2))/2 ur3=(imag(ua3)-imag(ub3))/2 ui1=(real(ub1)-real(ua1))/2 ui2=(real(ub2)-real(ua2))/2 ui3=(real(ub3)-real(ua3))/2 za1=(zr1+flip(zi1)) za2=(zr2+flip(zi2)) za3=(zr3+flip(zi3)) zb1=(zur1+flip(zui1)) zb2=(zur2+flip(zui2)) zb3=(zur3+flip(zui3)) zz1=(za1+zb1)/2 zz2=(za2+zb2)/2 zz3=(za3+zb3)/2 z1=@fnfl(zz1+@fl1)*@fl2 z2=@fnfl(zz2+@fl1)*@fl2 z3=@fnfl(zz3+@fl1)*@fl2 w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) u1=ur1+flip(ui1) u2=ur2+flip(ui2) u3=ur3+flip(ui3) if (@slope == true) ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zz1|+|w1|+|u1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |zz1|+|w1|+|u1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done>0 Default: title="SlopeHyperMath" maxiter=250 method=multipass periodicity=0 Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param Bailout caption="Bailout Value" default=1000.0 endparam param seed caption="Seed Value" default=(1.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param fl1 caption="Add Flavor" default=(0.0,0.0) endparam param fl2 caption="Mult. Flavor" default=(1.0,0.0) endparam func fnfl caption="Func. Flavor" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=0.00000001 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="3R Dimension" show=false Endheading param rd1 caption="3RDim.1" default=(1.0,0.0) endparam param rd2 caption="3RDim.2" default=(1.0,0.0) endparam param rd3 caption="3RDim.3" default=(0.0,0.0) endparam Heading caption="C Sequence" show=false Endheading param seq caption="C Method" enum="1""2""3" default=0 endparam param factor caption="Factor 1" default=(0.0,0.0) endparam param factor1 caption="Factor 2" default=(0.0,0.0) endparam param factor2 caption="Factor 3" default=(1.0,0.0) endparam param factor3 caption="Factor 4" default=(1.0,0.0) endparam func fnfact1 caption="Function Factor 1" default=ident() endfunc func fnfact2 caption="Function Factor 2" default=ident() endfunc Heading caption="Parameters" Endheading param formula caption="Formula" enum="Mandelbrot""DAFRM""Variant RCL""Precogna""MandelbrotQud""PhonyMandel""DivMandel" default=0 endparam param p1 caption="Hyper1" default=(0.0,0.0) endparam param p2 caption="Hyper2" default=(0.0,0.0) endparam param p3 caption="JuliaDimension1" default=(0.0,0.0) visible=(@mode=="Julia") endparam param p4 caption="JuliaDimension2" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Mandelbrot" visible=(@formula==0) Endheading param expm caption="Exponent" default=(2.0,0.0) visible=(@formula==0) endparam param parm caption="Param." default=(0.0,0.0) visible=(@formula==0) endparam func fnm caption="Func.1Z" default=ident() visible=(@formula==0) endfunc func fnm1 caption="Func.2Z" default=ident() visible=(@formula==0) endfunc func fnmc caption="Func.C" default=ident() visible=(@formula==0) endfunc Heading caption="DAFRM" visible=(@formula==1) Endheading param daf1 caption="Dafrm1" default=(1.0,0.514) visible=(@formula==1) endparam param daf2 caption="Dafrm2" default=(1.1,-0.5) visible=(@formula==1) endparam param daf3 caption="Dafrm3" default=(0.0,0.0) visible=(@formula==1) endparam func fndaf caption="Func.1" default=conj() visible=(@formula==1) endfunc func fndaf1 caption="Func.2" default=ident() visible=(@formula==1) endfunc func fndaf2 caption="Func.3" default=ident() visible=(@formula==1) endfunc func fndaf3 caption="Func.4" default=ident() visible=(@formula==1) endfunc func fndaf4 caption="Func.5" default=ident() visible=(@formula==1) endfunc func fndaf5 caption="Func.C" default=ident() visible=(@formula==1) endfunc Heading caption="Variant RCL" visible=(@formula==2) Endheading param exrcl caption="Exponent" default=(2.0,0.0) visible=(@formula==2) endparam param rcl caption="Param.1" default=(0.0,0.0) visible=(@formula==2) endparam param parcl caption="Param.2" default=(0.0,0.0) visible=(@formula==2) endparam func fnrcl caption="Func.1 RCL" default=ident() visible=(@formula==2) endfunc func fnrcl1 caption="Func.2 RCL" default=ident() visible=(@formula==2) endfunc func fnrcl2 caption="Func.3 RCL" default=ident() visible=(@formula==2) endfunc func fnrcl3 caption="Func.C RCL" default=ident() visible=(@formula==2) endfunc Heading caption="Precogna" visible=(@formula==3) Endheading param expre caption="Exponent Precogna" default=(2.0,0.0) visible=(@formula==3) endparam param pre caption="Param. Precogna" default=(0.0,0.0) visible=(@formula==3) endparam param pre1 caption="Param. Precogna" default=(0.0,0.0) visible=(@formula==3) endparam func fnpre caption="Func. Precogna" default=ident() visible=(@formula==3) endfunc Heading caption="MandelbrotQud" visible=(@formula==4) Endheading param exqu caption="Exponent" default=(3.0,0.0) visible=(@formula==4) endparam param qudr caption="Param.1" default=(0.0,0.0) visible=(@formula==4) endparam param qudi caption="Param.2" default=(0.0,0.0) visible=(@formula==4) endparam param qudr1 caption="Param.3" default=(0.0,0.0) visible=(@formula==4) endparam param qudi1 caption="Param.4" default=(0.0,0.0) visible=(@formula==4) endparam func fnqud caption="Func.1" default=ident() visible=(@formula==4) endfunc func fnqud1 caption="Func.2" default=ident() visible=(@formula==4) endfunc func fnqud2 caption="Func.3" default=ident() visible=(@formula==4) endfunc func fnqud3 caption="Func.C" default=ident() visible=(@formula==4) endfunc Heading caption="PhonyMandel" visible=(@formula==5) Endheading param exphom caption="Exponent1" default=(4.0,0.0) visible=(@formula==5) endparam param exphom1 caption="Exponent2" default=(3.0,0.0) visible=(@formula==5) endparam param exphom2 caption="Exponent3" default=(2.0,0.0) visible=(@formula==5) endparam param phom1 caption="Param.1" default=(2.0,0.0) visible=(@formula==5) endparam param phom2 caption="Param.2" default=(0.15,0.0) visible=(@formula==5) endparam func fnphom caption="Func.1Z" default=ident() visible=(@formula==5) endfunc func fnphom1 caption="Func.2Z" default=ident() visible=(@formula==5) endfunc func fnphom2 caption="Func.3Z" default=ident() visible=(@formula==5) endfunc func fnphom3 caption="Func.4Z" default=ident() visible=(@formula==5) endfunc func fnphom4 caption="Func.C" default=ident() visible=(@formula==5) endfunc func glphom caption="Global" default=ident() visible=(@formula==5) endfunc Heading caption="DivMandel" visible=(@formula==6) Endheading param exdiv caption="Exponent1" default=(2.0,0.0) visible=(@formula==6) endparam param exdiv1 caption="Exponent2" default=(0.0,0.0) visible=(@formula==6) endparam func fndiv caption="Func.1" default=ident() visible=(@formula==6) endfunc func fndiv1 caption="Func.2" default=ident() visible=(@formula==6) endfunc func fndiv2 caption="Func.C" default=ident() visible=(@formula==6) endfunc Heading caption="Global Functions" endheading func fnc caption="Function C" default=ident() endfunc func fnz caption="Function Z" default=ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperMath" bailout=@bailout seed=#pixel formula=@formula mode=@switchmode switchmode=@mode fl1=@fl1 fl2=@fl2 fnfl=@fnfl factor=@factor factor1=@factor1 factor2=@factor2 factor3=@factor3 fnfact1=@fnfact1 fnfact2=@fnfact2 fnc=@fnc fnz=@fnz p1=@p1 p2=@p2 p3=@p3 p4=@p4 rd1=@rd1 rd2=@rd2 rd3=@rd3 expm=@expm parm=@parm fnm=@fnm fnm1=@fnm1 fnmc=@fnmc daf1=@daf1 daf2=@daf2 daf3=@daf3 fndaf=@fndaf fndaf1=@fndaf1 fndaf2=@fndaf2 fndaf3=@fndaf3 fndaf4=@fndaf4 fndaf5=@fndaf5 rcl=@rcl parcl=@parcl exrcl=@exrcl fnrcl=@fnrcl fnrcl1=@fnrcl1 fnrcl2=@fnrcl2 fnrcl3=@fnrcl3 pre=@pre pre1=@pre1 expre=@expre fnpre=@fnpre exqu=@exqu qudr=@qudr qudi=@qudi qudr1=@qudr1 qudi1=@qudi1 fnqud=@fnqud fnqud1=@fnqud1 fnqud2=@fnqud2 fnqud3=@fnqud3 exphom=@exphom exphom1=@exphom1 exphom2=@exphom2 phom1=@phom1 phom2=@phom2 fnphom=@fnphom fnphom1=@fnphom1 fnphom2=@fnphom2 fnphom3=@fnphom3 fnphom4=@fnphom4 glphom=@glphom exdiv=@exdiv exdiv1=@exdiv1 fndiv=@fndiv fndiv1=@fndiv1 fndiv2=@fndiv2 version=@version slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperMathSets { ; Slope hyper complex formula of differents sets with variants and parameters. ; The equation is completed with 3Rdimensions, Julia Hypercomplex Dimension and Variant ; for C=pixel, there are most of the common sets and the orgform sets in hypercomplex mode ; there's also the possibility to change the flavor functions that it's usefull in slope colors. ; Andrea Spinozzi(Giugno 2022) Init: complex ya1=ya2=ya3=yb1=yb2=yb3=0.0 complex zz1=zz2=zz3=0.0 complex z1=z2=z3=0.0 complex cz1=cz2=cz3=0.0 complex w1=w2=w3=0.0 complex cw1=cw2=cw3=0.0 complex a1=a2=a3=0.0 complex b1=b2=b3=0.0 complex ca1=ca2=ca3=0.0 complex cb1=cb2=cb3=0.0 complex okaa1=okaa2=okaa3=okbb1=okbb2=okbb3=0.0 complex zpa1=zpa2=zpa3=zpb1=zpb2=zpb3=0.0 complex oldza1=oldza2=oldza3=oldzb1=oldzb2=oldzb3=0.0 oka1=oka2=oka3=okb1=okb2=okb3=@fok(#pixel) if (@mode=="Mandelbrot") zz1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) zz2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) zz3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) oldza1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) oldza2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) oldza3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) oldzb1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) oldzb2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) oldzb3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(#pixel)+flip(imag(#pixel)*@rd1) cz2=@rd3+@rd2*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd1) cz3=@rd3+@rd2*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd1) cw1=cw2=cw3=p1 w1=w2=w3=p1 elseif (@mode=="Julia") oka1=oka2=oka3=okb1=okb2=okb3=@fok(@seed) zz1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) zz2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) zz3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) oldza1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) oldza2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) oldza3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) oldzb1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) oldzb2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) oldzb3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz2=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz3=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cw1=cw2=cw3=p1 w1=w2=w3=p2 endif czr1=real(cz1) czr2=real(cz2) czr3=real(cz3) czi1=imag(cz1) czi2=imag(cz2) czi3=imag(cz3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) ca1=czr1-cwi1+flip(czi1+cwr1) ca2=czr2-cwi2+flip(czi2+cwr2) ca3=czr3-cwi3+flip(czi3+cwr3) cb1=czr1+cwi1+flip(czi1-cwr1) cb2=czr2+cwi2+flip(czi2-cwr2) cb3=czr3+cwi3+flip(czi3-cwr3) ;;; slope stuff int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 int modby=@seq+2 int iter=0 Loop: int method=iter%modby a1=real(zz1)-imag(w1)+flip(imag(zz1)+real(w1)) a2=real(zz2)-imag(w2)+flip(imag(zz2)+real(w2)) a3=real(zz3)-imag(w3)+flip(imag(zz3)+real(w3)) b1=real(zz1)+imag(w1)+flip(imag(zz1)-real(w1)) b2=real(zz2)+imag(w2)+flip(imag(zz2)-real(w2)) b3=real(zz3)+imag(w3)+flip(imag(zz3)-real(w3)) appca1=@fnc(ca1) appca2=@fnc(ca2) appca3=@fnc(ca3) appcb1=@fnc(cb1) appcb2=@fnc(cb2) appcb3=@fnc(cb3) a1=@fnz(a1) a2=@fnz(a2) a3=@fnz(a3) b1=@fnz(b1) b2=@fnz(b2) b3=@fnz(b3) if (method==0) appca1=@fnfact1(appca1+@factor)*@factor2 appca2=@fnfact1(appca2+@factor)*@factor2 appca3=@fnfact1(appca3+@factor)*@factor2 appcb1=@fnfact1(appcb1+@factor)*@factor2 appcb2=@fnfact1(appcb2+@factor)*@factor2 appcb3=@fnfact1(appcb3+@factor)*@factor2 elseif (method==1) appca1=@fnfact2(appca1-@factor1)*@factor3 appca2=@fnfact2(appca2-@factor1)*@factor3 appca3=@fnfact2(appca3-@factor1)*@factor3 appcb1=@fnfact2(appcb1-@factor1)*@factor3 appcb2=@fnfact2(appcb2-@factor1)*@factor3 appcb3=@fnfact2(appcb3-@factor1)*@factor3 endif if @op==0 ;Mandelbrot(DoubleExp) a1=fn1(fn2(a1)^@man+(@man1*(a1^@man2)^(-@man2))+fn3(appca1)) a2=fn1(fn2(a2)^@man+(@man1*(a2^@man2)^(-@man2))+fn3(appca2)) a3=fn1(fn2(a3)^@man+(@man1*(a3^@man2)^(-@man2))+fn3(appca3)) b1=fn1(fn2(b1)^@man+(@man1*(b1^@man2)^(-@man2))+fn3(appcb1)) b2=fn1(fn2(b2)^@man+(@man1*(b2^@man2)^(-@man2))+fn3(appcb2)) b3=fn1(fn2(b3)^@man+(@man1*(b3^@man2)^(-@man2))+fn3(appcb3)) elseif @op==1 ;Magnet CplxSpirals if @magnetCplx==0 a1=( (@fmcp1(a1)*@fmcp2(a1)+(appca1-@mcp1)) / (appca1/@fmcp3(a1)*@mcp4+(appca1-@mcp2)) )^@mcp-@mcp3 a2=( (@fmcp1(a2)*@fmcp2(a2)+(appca2-@mcp1)) / (appca2/@fmcp3(a2)*@mcp4+(appca2-@mcp2)) )^@mcp-@mcp3 a3=( (@fmcp1(a3)*@fmcp2(a3)+(appca3-@mcp1)) / (appca3/@fmcp3(a3)*@mcp4+(appca3-@mcp2)) )^@mcp-@mcp3 b1=( (@fmcp1(b1)*@fmcp2(b1)+(appcb1-@mcp1)) / (appcb1/@fmcp3(b1)*@mcp4+(appcb1-@mcp2)) )^@mcp-@mcp3 b2=( (@fmcp1(b2)*@fmcp2(b2)+(appcb2-@mcp1)) / (appcb2/@fmcp3(b2)*@mcp4+(appcb2-@mcp2)) )^@mcp-@mcp3 b3=( (@fmcp1(b3)*@fmcp2(b3)+(appcb3-@mcp1)) / (appcb3/@fmcp3(b3)*@mcp4+(appcb3-@mcp2)) )^@mcp-@mcp3 elseif @magnetCplx==1 a1=( (@fmcp1(a1)*@fmcp2(a1)+(appca1-@mcp1)) / (appca1*@fmcp3(a1)*@mcp4+(appca1-@mcp2)) )^@mcp-@mcp3 a2=( (@fmcp1(a2)*@fmcp2(a2)+(appca2-@mcp1)) / (appca2*@fmcp3(a2)*@mcp4+(appca2-@mcp2)) )^@mcp-@mcp3 a3=( (@fmcp1(a3)*@fmcp2(a3)+(appca3-@mcp1)) / (appca3*@fmcp3(a3)*@mcp4+(appca3-@mcp2)) )^@mcp-@mcp3 b1=( (@fmcp1(b1)*@fmcp2(b1)+(appcb1-@mcp1)) / (appcb1*@fmcp3(b1)*@mcp4+(appcb1-@mcp2)) )^@mcp-@mcp3 b2=( (@fmcp1(b2)*@fmcp2(b2)+(appcb2-@mcp1)) / (appcb2*@fmcp3(b2)*@mcp4+(appcb2-@mcp2)) )^@mcp-@mcp3 b3=( (@fmcp1(b3)*@fmcp2(b3)+(appcb3-@mcp1)) / (appcb3*@fmcp3(b3)*@mcp4+(appcb3-@mcp2)) )^@mcp-@mcp3 elseif @magnetCplx==2 a1=( (@fmcp1(a1)*@fmcp2(a1)+(appca1-@mcp1)) / (@fmcp3(a1)*@mcp4+(appca1-@mcp2)) )^@mcp-@mcp3*a1 a2=( (@fmcp1(a2)*@fmcp2(a2)+(appca2-@mcp1)) / (@fmcp3(a2)*@mcp4+(appca2-@mcp2)) )^@mcp-@mcp3*a2 a3=( (@fmcp1(a3)*@fmcp2(a3)+(appca3-@mcp1)) / (@fmcp3(a3)*@mcp4+(appca3-@mcp2)) )^@mcp-@mcp3*a3 b1=( (@fmcp1(b1)*@fmcp2(b1)+(appcb1-@mcp1)) / (@fmcp3(b1)*@mcp4+(appcb1-@mcp2)) )^@mcp-@mcp3*b1 b2=( (@fmcp1(b2)*@fmcp2(b2)+(appcb2-@mcp1)) / (@fmcp3(b2)*@mcp4+(appcb2-@mcp2)) )^@mcp-@mcp3*b2 b3=( (@fmcp1(b3)*@fmcp2(b3)+(appcb3-@mcp1)) / (@fmcp3(b3)*@mcp4+(appcb3-@mcp2)) )^@mcp-@mcp3*b3 endif elseif @op==2 ; Magnet a1=@fmg1( (@fmg2(a1)^@mg1+@fmg4(appca1)*@mg4-@mg2)/(@fmg3(a1)^@mg1-@mg3) ) a2=@fmg1( (@fmg2(a2)^@mg1+@fmg4(appca2)*@mg4-@mg2)/(@fmg3(a2)^@mg1-@mg3) ) a3=@fmg1( (@fmg2(a3)^@mg1+@fmg4(appca3)*@mg4-@mg2)/(@fmg3(a3)^@mg1-@mg3) ) b1=@fmg1( (@fmg2(b1)^@mg1+@fmg4(appcb1)*@mg4-@mg2)/(@fmg3(b1)^@mg1-@mg3) ) b2=@fmg1( (@fmg2(b2)^@mg1+@fmg4(appcb2)*@mg4-@mg2)/(@fmg3(b2)^@mg1-@mg3) ) b3=@fmg1( (@fmg2(b3)^@mg1+@fmg4(appcb3)*@mg4-@mg2)/(@fmg3(b3)^@mg1-@mg3) ) elseif @op==3 ; Overkill if @selok==0 okaa1=@fok9(a1*@ok91)^appca1*@ok92 okaa2=@fok9(a2*@ok91)^appca2*@ok92 okaa3=@fok9(a3*@ok91)^appca3*@ok92 okbb1=@fok9(b1*@ok91)^appcb1*@ok92 okbb2=@fok9(b2*@ok91)^appcb2*@ok92 okbb3=@fok9(b3*@ok91)^appcb3*@ok92 elseif @selok==1 okaa1=@ok91*@fok9(a1)^a1/@fok91(a1*@ok92) okaa2=@ok91*@fok9(a2)^a2/@fok91(a2*@ok92) okaa3=@ok91*@fok9(a3)^a3/@fok91(a3*@ok92) okbb1=@ok91*@fok9(b1)^b1/@fok91(b1*@ok92) okbb2=@ok91*@fok9(b2)^b2/@fok91(b2*@ok92) okbb3=@ok91*@fok9(b3)^b3/@fok91(b3*@ok92) elseif @selok==2 okaa1=@ok91*@fok9(a1)^appca1/@fok91(a1*@ok92) okaa2=@ok91*@fok9(a2)^appca2/@fok91(a2*@ok92) okaa3=@ok91*@fok9(a3)^appca3/@fok91(a3*@ok92) okbb1=@ok91*@fok9(b1)^appcb1/@fok91(b1*@ok92) okbb2=@ok91*@fok9(b2)^appcb2/@fok91(b2*@ok92) okbb3=@ok91*@fok9(b3)^appcb3/@fok91(b3*@ok92) endif a1=@ok9*( @fok92(oka1)/@fok93(okaa1) ) a2=@ok9*( @fok92(oka2)/@fok93(okaa2) ) a3=@ok9*( @fok92(oka3)/@fok93(okaa3) ) b1=@ok9*( @fok92(okb1)/@fok93(okbb1) ) b2=@ok9*( @fok92(okb2)/@fok93(okbb2) ) b3=@ok9*( @fok92(okb3)/@fok93(okbb3) ) elseif @op==4 ;Ikenaga a1=@fike(a1)^@ike1+(appca1-@ike4)*@fike1(a1-@ike3)+@fike2(appca1*@ike5)^@ike2 a2=@fike(a2)^@ike1+(appca2-@ike4)*@fike1(a2-@ike3)+@fike2(appca2*@ike5)^@ike2 a3=@fike(a3)^@ike1+(appca3-@ike4)*@fike1(a3-@ike3)+@fike2(appca3*@ike5)^@ike2 b1=@fike(b1)^@ike1+(appcb1-@ike4)*@fike1(b1-@ike3)+@fike2(appcb1*@ike5)^@ike2 b2=@fike(b2)^@ike1+(appcb2-@ike4)*@fike1(b2-@ike3)+@fike2(appcb2*@ike5)^@ike2 b3=@fike(b3)^@ike1+(appcb3-@ike4)*@fike1(b3-@ike3)+@fike2(appcb3*@ike5)^@ike2 elseif @op==5 ;FGZ (p1*(z^2+c)*(z^2+c))/((z^2+c)+p1)+c a1=(@fgz*(@fngz1(a1)^@fgz1+appca1)*(@fngz2(a1)^@fgz2+appca1))/((@fngz3(a1)^@fgz3+appca1)+@fgz)+@fngz4(appca1)*@fgz4 a2=(@fgz*(@fngz1(a2)^@fgz1+appca2)*(@fngz2(a2)^@fgz2+appca2))/((@fngz3(a2)^@fgz3+appca2)+@fgz)+@fngz4(appca2)*@fgz4 a3=(@fgz*(@fngz1(a3)^@fgz1+appca3)*(@fngz2(a3)^@fgz2+appca3))/((@fngz3(a3)^@fgz3+appca3)+@fgz)+@fngz4(appca3)*@fgz4 b1=(@fgz*(@fngz1(b1)^@fgz1+appcb1)*(@fngz2(b1)^@fgz2+appcb1))/((@fngz3(b1)^@fgz3+appcb1)+@fgz)+@fngz4(appcb1)*@fgz4 b2=(@fgz*(@fngz1(b2)^@fgz1+appcb2)*(@fngz2(b2)^@fgz2+appcb2))/((@fngz3(b2)^@fgz3+appcb2)+@fgz)+@fngz4(appcb2)*@fgz4 b3=(@fgz*(@fngz1(b3)^@fgz1+appcb3)*(@fngz2(b3)^@fgz2+appcb3))/((@fngz3(b3)^@fgz3+appcb3)+@fgz)+@fngz4(appcb3)*@fgz4 elseif @op==6 ;Phoenix newa1=@fnpho1(a1)^@phoe+@fnpho2(a1)^@phoe1*appca1+@phoe2*@fnpho3(ya1) newa2=@fnpho1(a2)^@phoe+@fnpho2(a2)^@phoe1*appca2+@phoe2*@fnpho3(ya2) newa3=@fnpho1(a3)^@phoe+@fnpho2(a3)^@phoe1*appca2+@phoe2*@fnpho3(ya3) newb1=@fnpho1(b1)^@phoe+@fnpho2(b1)^@phoe1*appcb1+@phoe2*@fnpho3(yb1) newb2=@fnpho1(b2)^@phoe+@fnpho2(b2)^@phoe1*appcb2+@phoe2*@fnpho3(yb2) newb3=@fnpho1(b3)^@phoe+@fnpho2(b3)^@phoe1*appcb2+@phoe2*@fnpho3(yb3) ya1=a1 ya2=a2 ya3=a3 yb1=b1 yb2=b2 yb3=b3 a1=newa1 a2=newa2 a3=newa3 b1=newb1 b2=newb2 b3=newb3 elseif @op==7 ;Barnsley if real(a1)>0 a1=(@fbarn(a1)-@barn)*@fbarn2(appca1+@barn2) a2=(@fbarn(a2)-@barn)*@fbarn2(appca2+@barn2) a3=(@fbarn(a3)-@barn)*@fbarn2(appca3+@barn2) b1=(@fbarn(b1)-@barn)*@fbarn2(appcb1+@barn2) b2=(@fbarn(b2)-@barn)*@fbarn2(appcb2+@barn2) b3=(@fbarn(b3)-@barn)*@fbarn2(appcb3+@barn2) else a1=(@fbarn1(a1)+@barn1)*@fbarn3(appca1+@barn3) a2=(@fbarn1(a2)+@barn1)*@fbarn3(appca2+@barn3) a3=(@fbarn1(a3)+@barn1)*@fbarn3(appca3+@barn3) b1=(@fbarn1(b1)+@barn1)*@fbarn3(appcb1+@barn3) b2=(@fbarn1(b2)+@barn1)*@fbarn3(appcb2+@barn3) b3=(@fbarn1(b3)+@barn1)*@fbarn3(appcb3+@barn3) endif elseif @op==8 ;Faulty ;z = z*z^e / (z^e + c) + c a1=@fau2*@fnfau1(a1+@fau6)*@fnfau2(a1+@fau7)^@fau1/(@fau3*@fnfau2(a1+@fau8)^@fau1+@fnfau3(appca1)*@fau4)+@fnfau4(appca1)*@fau5 a2=@fau2*@fnfau1(a2+@fau6)*@fnfau2(a2+@fau7)^@fau1/(@fau3*@fnfau2(a2+@fau8)^@fau1+@fnfau3(appca2)*@fau4)+@fnfau4(appca2)*@fau5 a3=@fau2*@fnfau1(a3+@fau6)*@fnfau2(a3+@fau7)^@fau1/(@fau3*@fnfau2(a3+@fau8)^@fau1+@fnfau3(appca3)*@fau4)+@fnfau4(appca3)*@fau5 b1=@fau2*@fnfau1(b1+@fau6)*@fnfau2(b1+@fau7)^@fau1/(@fau3*@fnfau2(b1+@fau8)^@fau1+@fnfau3(appcb1)*@fau4)+@fnfau4(appcb1)*@fau5 b2=@fau2*@fnfau1(b2+@fau6)*@fnfau2(b2+@fau7)^@fau1/(@fau3*@fnfau2(b2+@fau8)^@fau1+@fnfau3(appcb2)*@fau4)+@fnfau4(appcb2)*@fau5 b3=@fau2*@fnfau1(b3+@fau6)*@fnfau2(b3+@fau7)^@fau1/(@fau3*@fnfau2(b3+@fau8)^@fau1+@fnfau3(appcb3)*@fau4)+@fnfau4(appcb3)*@fau5 elseif @op==9 ;FFCpm ;IF (x>1) ; z=cosh(z)+pixel ;ENDIF ;z=sqr(z)+pixel, x=|z| if |a1|>@fcpm3 a1=@fncpm2(a1+@fcpm)+appca1 a2=@fncpm2(a2+@fcpm)+appca2 a3=@fncpm2(a3+@fcpm)+appca3 b1=@fncpm2(b1+@fcpm)+appcb1 b2=@fncpm2(b2+@fcpm)+appcb2 b3=@fncpm2(b3+@fcpm)+appcb3 endif a1=@fcpm1*@fncpm1(a1+@fcpm2)^@excpm+@fncpm3(appca1) a2=@fcpm1*@fncpm1(a2+@fcpm2)^@excpm+@fncpm3(appca2) a3=@fcpm1*@fncpm1(a3+@fcpm2)^@excpm+@fncpm3(appca3) b1=@fcpm1*@fncpm1(b1+@fcpm2)^@excpm+@fncpm3(appcb1) b2=@fcpm1*@fncpm1(b2+@fcpm2)^@excpm+@fncpm3(appcb2) b3=@fcpm1*@fncpm1(b3+@fcpm2)^@excpm+@fncpm3(appcb3) elseif @op==10 ;N2_2 ;z=sin(sinh(z*pixel))+pixel a1=@nn2*sin(sinh(@nn1+@fnn1(a1)^@n1exp*appca1))+(@fnn2(appca1)+@nn3)*@nn4 a2=@nn2*sin(sinh(@nn1+@fnn1(a2)^@n1exp*appca2))+(@fnn2(appca2)+@nn3)*@nn4 a3=@nn2*sin(sinh(@nn1+@fnn1(a3)^@n1exp*appca3))+(@fnn2(appca3)+@nn3)*@nn4 b1=@nn2*sin(sinh(@nn1+@fnn1(b1^@n1exp)*appcb1))+(@fnn2(appcb1)+@nn3)*@nn4 b2=@nn2*sin(sinh(@nn1+@fnn1(b2^@n1exp)*appcb2))+(@fnn2(appcb2)+@nn3)*@nn4 b3=@nn2*sin(sinh(@nn1+@fnn1(b3^@n1exp)*appcb3))+(@fnn2(appcb3)+@nn3)*@nn4 elseif @op==11 ;Num_Dup ; z = (z*z + (c+1))^2 / (2*z + (c-1)) a1=(@fn1num(a1)*@fn2num(a1)+(@fn4num(appca1)+@num1)*@num4)^@num3/(@num3*@fn3num(a1)+(@fn5num(appca1)-@num2)*@num5) a2=(@fn1num(a2)*@fn2num(a2)+(@fn4num(appca2)+@num1)*@num4)^@num3/(@num3*@fn3num(a2)+(@fn5num(appca2)-@num2)*@num5) a3=(@fn1num(a3)*@fn2num(a3)+(@fn4num(appca3)+@num1)*@num4)^@num3/(@num3*@fn3num(a3)+(@fn5num(appca3)-@num2)*@num5) b1=(@fn1num(b1)*@fn2num(b1)+(@fn4num(appcb1)+@num1)*@num4)^@num3/(@num3*@fn3num(b1)+(@fn5num(appcb1)-@num2)*@num5) b2=(@fn1num(b2)*@fn2num(b2)+(@fn4num(appcb2)+@num1)*@num4)^@num3/(@num3*@fn3num(b2)+(@fn5num(appcb2)-@num2)*@num5) b3=(@fn1num(b3)*@fn2num(b3)+(@fn4num(appcb3)+@num1)*@num4)^@num3/(@num3*@fn3num(b3)+(@fn5num(appcb3)-@num2)*@num5) elseif @op==12 ;Dafrm ; z = z ^ (z - 1) * (fn1(z) + pixel) a1=@fnfrm2(a1)^@fnfrm3(a1-@frm1)*(@fnfrm1(a1-@frm3)^@frm2+@fnfrm4(appca1)) a2=@fnfrm2(a2)^@fnfrm3(a2-@frm1)*(@fnfrm1(a2-@frm3)^@frm2+@fnfrm4(appca2)) a3=@fnfrm2(a3)^@fnfrm3(a3-@frm1)*(@fnfrm1(a3-@frm3)^@frm2+@fnfrm4(appca3)) b1=@fnfrm2(b1)^@fnfrm3(b1-@frm1)*(@fnfrm1(b1-@frm3)^@frm2+@fnfrm4(appcb1)) b2=@fnfrm2(b2)^@fnfrm3(b2-@frm1)*(@fnfrm1(b2-@frm3)^@frm2+@fnfrm4(appcb2)) b3=@fnfrm2(b3)^@fnfrm3(b3-@frm1)*(@fnfrm1(b3-@frm3)^@frm2+@fnfrm4(appcb3)) elseif @op==13 ;Mind2 ;z = c * sin(1 / z) if @sel==0 a1=@fnmin4(appca1)*sin(@min1*@fnmin1(a1+@min2)) a2=@fnmin4(appca2)*sin(@min1*@fnmin1(a2+@min2)) a3=@fnmin4(appca3)*sin(@min1*@fnmin1(a3+@min2)) b1=@fnmin4(appcb1)*sin(@min1*@fnmin1(b1+@min2)) b2=@fnmin4(appcb2)*sin(@min1*@fnmin1(b2+@min2)) b3=@fnmin4(appcb3)*sin(@min1*@fnmin1(b3+@min2)) elseif @sel==1 a1=@fnmin4(appca1)*sin(@min1/@fnmin1(a1+@min2)) a2=@fnmin4(appca2)*sin(@min1/@fnmin1(a2+@min2)) a3=@fnmin4(appca3)*sin(@min1/@fnmin1(a3+@min2)) b1=@fnmin4(appcb1)*sin(@min1/@fnmin1(b1+@min2)) b2=@fnmin4(appcb2)*sin(@min1/@fnmin1(b2+@min2)) b3=@fnmin4(appcb3)*sin(@min1/@fnmin1(b3+@min2)) endif if @sel1==0 a1=@min3*@fnmin2(a1)^@min6*@fnmin3(a1)^@min5*@min4 a2=@min3*@fnmin2(a2)^@min6*@fnmin3(a2)^@min5*@min4 a3=@min3*@fnmin2(a3)^@min6*@fnmin3(a3)^@min5*@min4 b1=@min3*@fnmin2(b1)^@min6*@fnmin3(b1)^@min5*@min4 b2=@min3*@fnmin2(b2)^@min6*@fnmin3(b2)^@min5*@min4 b3=@min3*@fnmin2(b3)^@min6*@fnmin3(b3)^@min5*@min4 elseif @sel1==1 a1=@min3*@fnmin2(a1)^@min6*@fnmin3(a1)^@min5*@min4+appca1*@min7 a2=@min3*@fnmin2(a2)^@min6*@fnmin3(a2)^@min5*@min4+appca2*@min7 a3=@min3*@fnmin2(a3)^@min6*@fnmin3(a3)^@min5*@min4+appca3*@min7 b1=@min3*@fnmin2(b1)^@min6*@fnmin3(b1)^@min5*@min4+appcb1*@min7 b2=@min3*@fnmin2(b2)^@min6*@fnmin3(b2)^@min5*@min4+appcb2*@min7 b3=@min3*@fnmin2(b3)^@min6*@fnmin3(b3)^@min5*@min4+appcb3*@min7 elseif @sel1==2 a1=@min3*@fnmin2(a1)^@min6*@fnmin3(a1)^@min5*@min4*appca1*@min7 a2=@min3*@fnmin2(a2)^@min6*@fnmin3(a2)^@min5*@min4*appca2*@min7 a3=@min3*@fnmin2(a3)^@min6*@fnmin3(a3)^@min5*@min4*appca3*@min7 b1=@min3*@fnmin2(b1)^@min6*@fnmin3(b1)^@min5*@min4*appcb1*@min7 b2=@min3*@fnmin2(b2)^@min6*@fnmin3(b2)^@min5*@min4*appcb2*@min7 b3=@min3*@fnmin2(b3)^@min6*@fnmin3(b3)^@min5*@min4*appcb3*@min7 elseif @sel1==3 a1=@min3*@fnmin2(a1)^@min6*@fnmin3(a1)^@min5*@min4/appca1*@min7 a2=@min3*@fnmin2(a2)^@min6*@fnmin3(a2)^@min5*@min4/appca2*@min7 a3=@min3*@fnmin2(a3)^@min6*@fnmin3(a3)^@min5*@min4/appca3*@min7 b1=@min3*@fnmin2(b1)^@min6*@fnmin3(b1)^@min5*@min4/appcb1*@min7 b2=@min3*@fnmin2(b2)^@min6*@fnmin3(b2)^@min5*@min4/appcb2*@min7 b3=@min3*@fnmin2(b3)^@min6*@fnmin3(b3)^@min5*@min4/appcb3*@min7 endif elseif @op==14 ;TB Quest ;z=(z*fn1(sqrt(z)))/fn2(c) ;z=z+sqr(c) a1=(@tb3*(a1+@tb4)*@fntb1(sqrt(a1+@tb1)))/@fntb2(appca1+@tb2) a2=(@tb3*(a2+@tb4)*@fntb1(sqrt(a2+@tb1)))/@fntb2(appca2+@tb2) a3=(@tb3*(a3+@tb4)*@fntb1(sqrt(a3+@tb1)))/@fntb2(appca3+@tb2) b1=(@tb3*(b1+@tb4)*@fntb1(sqrt(b1+@tb1)))/@fntb2(appcb1+@tb2) b2=(@tb3*(b2+@tb4)*@fntb1(sqrt(b2+@tb1)))/@fntb2(appcb2+@tb2) b3=(@tb3*(b3+@tb4)*@fntb1(sqrt(b3+@tb1)))/@fntb2(appcb3+@tb2) a1=a1^@tb5+sqr(appca1) a2=a2^@tb5+sqr(appca2) a3=a3^@tb5+sqr(appca3) b1=b1^@tb5+sqr(appcb1) b2=b2^@tb5+sqr(appcb2) b3=b3^@tb5+sqr(appcb3) elseif @op==15 ;Hydra ;z=pixel, zp = (0,0): ;temp=z ;z=z*z+zp ;zp=temp, |zp| <= 4 } tempa1=a1 tempa2=a2 tempa3=a3 tempb1=b1 tempb2=b2 tempb3=b3 if @ophy==0 a1=@phy3*@fnhy2(a1)^@phy2+@phy9*@fnhy3(appca1)+@fnhy4(zpa1+@phy6)*@phy4 a2=@phy3*@fnhy2(a2)^@phy2+@phy9*@fnhy3(appca2)+@fnhy4(zpa2+@phy6)*@phy4 a3=@phy3*@fnhy2(a3)^@phy2+@phy9*@fnhy3(appca3)+@fnhy4(zpa3+@phy6)*@phy4 b1=@phy3*@fnhy2(b1)^@phy2+@phy9*@fnhy3(appcb1)+@fnhy4(zpb1+@phy6)*@phy4 b2=@phy3*@fnhy2(b2)^@phy2+@phy9*@fnhy3(appcb2)+@fnhy4(zpb2+@phy6)*@phy4 b3=@phy3*@fnhy2(b3)^@phy2+@phy9*@fnhy3(appcb3)+@fnhy4(zpb3+@phy6)*@phy4 elseif @ophy==1 a1=@phy3*@fnhy2(a1)^@phy2+@phy9*@fnhy3(appca1)*@fnhy4(zpa1+@phy6)*@phy4 a2=@phy3*@fnhy2(a2)^@phy2+@phy9*@fnhy3(appca2)*@fnhy4(zpa2+@phy6)*@phy4 a3=@phy3*@fnhy2(a3)^@phy2+@phy9*@fnhy3(appca3)*@fnhy4(zpa3+@phy6)*@phy4 b1=@phy3*@fnhy2(b1)^@phy2+@phy9*@fnhy3(appcb1)*@fnhy4(zpb1+@phy6)*@phy4 b2=@phy3*@fnhy2(b2)^@phy2+@phy9*@fnhy3(appcb2)*@fnhy4(zpb2+@phy6)*@phy4 b3=@phy3*@fnhy2(b3)^@phy2+@phy9*@fnhy3(appcb3)*@fnhy4(zpb3+@phy6)*@phy4 endif zpa1=@phy7+@fnhy1(@phy1+tempa1^@phy8)*@phy5 zpa2=@phy7+@fnhy1(@phy1+tempa2^@phy8)*@phy5 zpa3=@phy7+@fnhy1(@phy1+tempa3^@phy8)*@phy5 zpb1=@phy7+@fnhy1(@phy1+tempb1^@phy8)*@phy5 zpb2=@phy7+@fnhy1(@phy1+tempb2^@phy8)*@phy5 zpb3=@phy7+@fnhy1(@phy1+tempb3^@phy8)*@phy5 elseif @op==16 ;Hydra Brot ;z=pixel, zp = (0,0): ;temp=z ;z=z*z+zp*zd ;zp=temp, zd=temp : |zp| <= 4 } tempa1=a1 tempa2=a2 tempa3=a3 tempb1=b1 tempb2=b2 tempb3=b3 if @op1hy==0 a1=@mphy3*@fn1hy2(a1)^@mphy2+@mphy9*@fn1hy3(appca1)+@fn1hy4(zpa1+@mphy6)*@mphy4*@fnod1(oldza1+@od1)*@od2 a2=@mphy3*@fn1hy2(a2)^@mphy2+@mphy9*@fn1hy3(appca2)+@fn1hy4(zpa2+@mphy6)*@mphy4*@fnod1(oldza2+@od1)*@od2 a3=@mphy3*@fn1hy2(a3)^@mphy2+@mphy9*@fn1hy3(appca3)+@fn1hy4(zpa3+@mphy6)*@mphy4*@fnod1(oldza3+@od1)*@od2 b1=@mphy3*@fn1hy2(b1)^@mphy2+@mphy9*@fn1hy3(appcb1)+@fn1hy4(zpb1+@mphy6)*@mphy4*@fnod1(oldzb1+@od1)*@od2 b2=@mphy3*@fn1hy2(b2)^@mphy2+@mphy9*@fn1hy3(appcb2)+@fn1hy4(zpb2+@mphy6)*@mphy4*@fnod1(oldzb2+@od1)*@od2 b3=@mphy3*@fn1hy2(b3)^@mphy2+@mphy9*@fn1hy3(appcb3)+@fn1hy4(zpb3+@mphy6)*@mphy4*@fnod1(oldzb3+@od1)*@od2 elseif @op1hy==1 a1=@mphy3*@fn1hy2(a1)^@mphy2+@mphy9*@fn1hy3(appca1)*@fn1hy4(zpa1+@mphy6)*@mphy4*@fnod1(oldza1+@od1)*@od2 a2=@mphy3*@fn1hy2(a2)^@mphy2+@mphy9*@fn1hy3(appca2)*@fn1hy4(zpa2+@mphy6)*@mphy4*@fnod1(oldza2+@od1)*@od2 a3=@mphy3*@fn1hy2(a3)^@mphy2+@mphy9*@fn1hy3(appca3)*@fn1hy4(zpa3+@mphy6)*@mphy4*@fnod1(oldza3+@od1)*@od2 b1=@mphy3*@fn1hy2(b1)^@mphy2+@mphy9*@fn1hy3(appcb1)*@fn1hy4(zpb1+@mphy6)*@mphy4*@fnod1(oldzb1+@od1)*@od2 b2=@mphy3*@fn1hy2(b2)^@mphy2+@mphy9*@fn1hy3(appcb2)*@fn1hy4(zpb2+@mphy6)*@mphy4*@fnod1(oldzb2+@od1)*@od2 b3=@mphy3*@fn1hy2(b3)^@mphy2+@mphy9*@fn1hy3(appcb3)*@fn1hy4(zpb3+@mphy6)*@mphy4*@fnod1(oldzb3+@od1)*@od2 endif zpa1=@mphy7+@fn1hy1(@mphy1+tempa1^@mphy8)*@mphy5 zpa2=@mphy7+@fn1hy1(@mphy1+tempa2^@mphy8)*@mphy5 zpa3=@mphy7+@fn1hy1(@mphy1+tempa3^@mphy8)*@mphy5 zpb1=@mphy7+@fn1hy1(@mphy1+tempb1^@mphy8)*@mphy5 zpb2=@mphy7+@fn1hy1(@mphy1+tempb2^@mphy8)*@mphy5 zpb3=@mphy7+@fn1hy1(@mphy1+tempb3^@mphy8)*@mphy5 oldza1=@od3+@fnod2(@od4+tempa1^@od5)*@od6 oldza2=@od3+@fnod2(@od4+tempa2^@od5)*@od6 oldza3=@od3+@fnod2(@od4+tempa3^@od5)*@od6 oldzb1=@od3+@fnod2(@od4+tempb1^@od5)*@od6 oldzb2=@od3+@fnod2(@od4+tempb2^@od5)*@od6 oldzb3=@od3+@fnod2(@od4+tempb3^@od5)*@od6 endif za1=(real(a1)+real(b1))/2 za2=(real(a2)+real(b2))/2 za3=(real(a3)+real(b3))/2 zb1=(imag(a1)+imag(b1))/2 zb2=(imag(a2)+imag(b2))/2 zb3=(imag(a3)+imag(b3))/2 wa1=(imag(a1)-imag(b1))/2 wa2=(imag(a2)-imag(b2))/2 wa3=(imag(a3)-imag(b3))/2 wb1=(real(b1)-real(a1))/2 wb2=(real(b2)-real(a2))/2 wb3=(real(b3)-real(a3))/2 zz1=za1+flip(zb1) zz2=za2+flip(zb2) zz3=za3+flip(zb3) z1=@fnfl(zz1+@fl1)*@fl2 z2=@fnfl(zz2+@fl1)*@fl2 z3=@fnfl(zz3+@fl1)*@fl2 w1=wa1+flip(wb1) w2=wa2+flip(wb2) w3=wa3+flip(wb3) if (@slope == true) ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zz1|+|w1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |zz1|+|w1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done>0 Default: title="SlopeHyperMathSets" maxiter=250 method=multipass periodicity=0 Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param Bailout caption="Bailout Value" default=128.0 endparam param seed caption="Seed Value" default=(1.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param fl1 caption="Add Flavor" default=(0.0,0.0) endparam param fl2 caption="Mult. Flavor" default=(1.0,0.0) endparam func fnfl caption="Func. Flavor" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=0.00000001 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="3R Dimension" show=false Endheading param rd1 caption="3RDim.1" default=(1.0,0.0) endparam param rd2 caption="3RDim.2" default=(1.0,0.0) endparam param rd3 caption="3RDim.3" default=(0.0,0.0) endparam Heading caption="C Sequence" show=false Endheading param seq caption="C Method" enum="1""2""3" default=0 endparam param factor caption="Factor 1" default=(0.0,0.0) endparam param factor1 caption="Factor 2" default=(0.0,0.0) endparam param factor2 caption="Factor 3" default=(1.0,0.0) endparam param factor3 caption="Factor 4" default=(1.0,0.0) endparam func fnfact1 caption="Function Factor 1" default=ident() endfunc func fnfact2 caption="Function Factor 2" default=ident() endfunc Heading caption="Sets and Parameters" endheading param op caption="Formula" enum="Mandelbrot""MagnetCplxSpirals""Magnet""OverKill""Ikenaga""FGZ""Phoenix" \ "Barnsley""Faulty""FFcpm""N2_2""Num_Dup""Dafrm""Mind""TB Quest""Hydra""Hydra Brot" default=0 endparam param p1 caption="HyperCplx(cj,ck)" default=(0.0,0.0) endparam param p2 caption="Julia Dimension" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Mandelbrot" visible=(@op==0) endheading Heading caption="MagnetCplxSpirals" visible=(@op==1) endheading Heading caption="Magnet" visible=(@op==2) endheading Heading caption="OverKill" visible=(@op==3) endheading Heading caption="Ikenaga" visible=(@op==4) endheading Heading caption="FGZ" visible=(@op==5) endheading Heading caption="Phoenix" visible=(@op==6) endheading Heading caption="Barnsley" visible=(@op==7) endheading Heading caption="Faulty" visible=(@op==8) endheading Heading caption="FFcpm" visible=(@op==9) endheading Heading caption="N2_2" visible=(@op==10) endheading Heading caption="Num_Dup" visible=(@op==11) endheading Heading caption="Dafrm" visible=(@op==12) endheading Heading caption="Mind" visible=(@op==13) endheading Heading caption="TB Quest" visible=(@op==14) endheading Heading caption="Hydra" visible=(@op==15) endheading Heading caption="Hydra Brot" visible=(@op==16) endheading ;------------------------------Mandelbrot------------------------------------- param man caption="Exponent" default=(2.0,0.0) visible=(@op==0) endparam param man1 caption="Mult." default=(0.0,0.0) visible=(@op==0) endparam param man2 caption="Double Exp" default=(0.5,0.0) visible=(@op==0) enabled=@man1!=0 endparam func fn1 caption="Func. Global" default=ident() visible=(@op==0) endfunc func fn2 caption="Func. Z" default=ident() visible=(@op==0) endfunc func fn3 caption="Func. C" default=ident() visible=(@op==0) endfunc ;------------------------------MagnetCplxSpirals------------------------------ param magnetcplx caption="Select Variant" enum="CplxSpirals""CplxSpirals2""MiniMand" default=0 visible=(@op==1) endparam param mcp caption="Exponent" default=(2.0,0.0) visible=(@op==1) endparam param mcp1 caption="Param.1" default=(1.0,0.0) visible=(@op==1) endparam param mcp2 caption="Param.2" default=(2.0,0.0) visible=(@op==1) endparam param mcp3 caption="Param.3" default=(2.0,0.0) visible=(@op==1) endparam param mcp4 caption="Param.4" default=(1.0,0.0) visible=(@op==1) endparam func fmcp1 caption="Func.1Z" default=ident() visible=(@op==1) endfunc func fmcp2 caption="Func.2Z" default=ident() visible=(@op==1) endfunc func fmcp3 caption="Func.3Z" default=ident() visible=(@op==1) endfunc ;------------------------------Magnet----------------------------------------- param mg1 caption="Exponent" default=(2.0,0.0) visible=(@op==2) endparam param mg2 caption="Param.1" default=(1.0,0.0) visible=(@op==2) endparam param mg3 caption="Param.2" default=(1.0,0.0) visible=(@op==2) endparam param mg4 caption="Param.3" default=(1.0,0.0) visible=(@op==2) endparam func fmg1 caption="Func.Global" default=ident() visible=(@op==2) endfunc func fmg2 caption="Func.1Z" default=ident() visible=(@op==2) endfunc func fmg3 caption="Func.2Z" default=ident() visible=(@op==2) endfunc func fmg4 caption="Func.C" default=ident() visible=(@op==2) endfunc ;------------------------------OverKill--------------------------------------- param selok caption="Select Variant" enum="OverKill1""OverKill2""OverKill3" default=0 visible=(@op==3) endparam param ok9 caption="Param.1" default=(1.0,0.0) visible=(@op==3) endparam param ok91 caption="Param.2" default=(1.0,0.0) visible=(@op==3) endparam param ok92 caption="Param.3" default=(1.0,0.0) visible=(@op==3) endparam func fok caption="Init.C" default=ident() visible=(@op==3) endfunc func fok9 caption="Loop.1Z" default=ident() visible=(@op==3) endfunc func fok91 caption="Loop.2Z" default=ident() visible=(@op==3)&&(@selok!=0) endfunc func fok92 caption="Global1" default=ident() visible=(@op==3) endfunc func fok93 caption="Global2" default=ident() visible=(@op==3) endfunc ;------------------------------Ikenaga---------------------------------------- param ike1 caption="Exponent1" default=(3.0,0.0) visible=(@op==4) endparam param ike2 caption="Exponent2" default=(1.0,0.0) visible=(@op==4) endparam param ike3 caption="Param.1" default=(0.0,0.0) visible=(@op==4) endparam param ike4 caption="Param.2" default=(1.0,0.0) visible=(@op==4) endparam param ike5 caption="Param.3" default=(1.0,0.0) visible=(@op==4) endparam func fike caption="Func.1Z" default=ident() visible=(@op==4) endfunc func fike1 caption="Func.2Z" default=ident() visible=(@op==4) endfunc func fike2 caption="Func.C" default=ident() visible=(@op==4) endfunc ;------------------------------FGZ-------------------------------------------- param fgz1 caption="Exp.1" default=(2.0,0.0) visible=(@op==5) endparam param fgz2 caption="Exp.2" default=(2.0,0.0) visible=(@op==5) endparam param fgz3 caption="Exp.3" default=(2.0,0.0) visible=(@op==5) endparam param fgz caption="Param.1" default=(0.5,0.0) visible=(@op==5) endparam param fgz4 caption="Param.2" default=(1.0,0.0) visible=(@op==5) endparam func fngz1 caption="Func.1Z" default=ident() visible=(@op==5) endfunc func fngz2 caption="Func.2Z" default=ident() visible=(@op==5) endfunc func fngz3 caption="Func.3Z" default=ident() visible=(@op==5) endfunc func fngz4 caption="Func.C" default=ident() visible=(@op==5) endfunc ;----------------------------Phoenix------------------------------------------ param phoe caption="Exponent 1" default=(2.0,0.0) visible=(@op==6) endparam param phoe1 caption="Exponent 2" default=(0.0,0.0) visible=(@op==6) endparam param phoe2 caption="Distortion" default=(0.5,0.0) visible=(@op==6) endparam func fnpho1 caption="Func.1Z" default=ident() visible=(@op==6) endfunc func fnpho2 caption="Func.2Z" default=ident() visible=(@op==6) endfunc func fnpho3 caption="Distortion" default=ident() visible=(@op==6) endfunc ;----------------------------Barnsley----------------------------------------- param barn caption="Param.1" default=(1.0,0.0) visible=(@op==7) endparam param barn1 caption="Param.2" default=(1.0,0.0) visible=(@op==7) endparam param barn2 caption="Param.3" default=(0.0,0.0) visible=(@op==7) endparam param barn3 caption="Param.4" default=(0.0,0.0) visible=(@op==7) endparam func fbarn caption="Func.1Z" default=ident() visible=(@op==7) endfunc func fbarn1 caption="Func.2Z" default=ident() visible=(@op==7) endfunc func fbarn2 caption="Func.1C" default=ident() visible=(@op==7) endfunc func fbarn3 caption="Func.2C" default=ident() visible=(@op==7) endfunc ;----------------------------Faulty------------------------------------------- param fau1 caption="Param.1" default=(2.7,0.0) visible=(@op==8) endparam param fau2 caption="Param.2" default=(1.0,0.0) visible=(@op==8) endparam param fau3 caption="Param.3" default=(1.0,0.0) visible=(@op==8) endparam param fau4 caption="Param.4" default=(1.0,0.0) visible=(@op==8) endparam param fau5 caption="Param.5" default=(1.0,0.0) visible=(@op==8) endparam param fau6 caption="Param.6" default=(0.0,0.0) visible=(@op==8) endparam param fau7 caption="Param.7" default=(0.0,0.0) visible=(@op==8) endparam param fau8 caption="Param.8" default=(0.0,0.0) visible=(@op==8) endparam func fnfau1 caption="Func.1Z" default=ident() visible=(@op==8) endfunc func fnfau2 caption="Func.2Z" default=ident() visible=(@op==8) endfunc func fnfau3 caption="Func.1C" default=ident() visible=(@op==8) endfunc func fnfau4 caption="Func.2C" default=ident() visible=(@op==8) endfunc ;------------------------------FFcpm------------------------------------------ param fcpm3 caption="Rad." default=1.0 min=0.0 visible=(@op==9) endparam param fcpm caption="Distortion" default=(0.0,0.0) visible=(@op==9) endparam param fcpm1 caption="Param.1" default=(1.0,0.0) visible=(@op==9) endparam param fcpm2 caption="Param.2" default=(0.0,0.0) visible=(@op==9) endparam param excpm caption="Power" default=(2.0,0.0) visible=(@op==9) endparam func fncpm1 caption="Func.Z" default=ident() visible=(@op==9) endfunc func fncpm3 caption="Func.C" default=ident() visible=(@op==9) endfunc func fncpm2 caption="Func.Distortion" default=cosh() visible=(@op==9) endfunc ;------------------------------N2_2------------------------------------------- param nn1 caption="Param.1" default=(0.0,0.0) visible=(@op==10) endparam param nn2 caption="Param.2" default=(1.0,0.0) visible=(@op==10) endparam param nn3 caption="Param.3" default=(0.0,0.0) visible=(@op==10) endparam param nn4 caption="Param.4" default=(1.0,0.0) visible=(@op==10) endparam param n1exp caption="Power" default=(1.0,0.0) visible=(@op==10) endparam func fnn1 caption="Func.Z" default=ident() visible=(@op==10) endfunc func fnn2 caption="Func.C" default=ident() visible=(@op==10) endfunc ;------------------------------Num_Dup---------------------------------------- param num1 caption="Param.1" default=(1.0,0.0) visible=(@op==11) endparam param num2 caption="Param.2" default=(1.0,0.0) visible=(@op==11) endparam param num3 caption="Param.3" default=(2.0,0.0) visible=(@op==11) endparam param num4 caption="Param.4" default=(1.0,0.0) visible=(@op==11) endparam param num5 caption="Param.5" default=(1.0,0.0) visible=(@op==11) endparam func fn1num caption="Func.1Z" default=ident() visible=(@op==11) endfunc func fn2num caption="Func.2Z" default=ident() visible=(@op==11) endfunc func fn3num caption="Func.3Z" default=ident() visible=(@op==11) endfunc func fn4num caption="Func.1C" default=ident() visible=(@op==11) endfunc func fn5num caption="Func.2C" default=ident() visible=(@op==11) endfunc ;------------------------------Dafrm------------------------------------------ param frm1 caption="Param.1" default=(1.0,0.0) visible=(@op==12) endparam param frm3 caption="Param.2" default=(1.0,0.0) visible=(@op==12) endparam param frm2 caption="Exponent" default=(1.0,0.0) visible=(@op==12) endparam func fnfrm1 caption="Func.1Z" default=ident() visible=(@op==12) endfunc func fnfrm2 caption="Func.2Z" default=ident() visible=(@op==12) endfunc func fnfrm3 caption="Func.3Z" default=ident() visible=(@op==12) endfunc func fnfrm4 caption="Func.C" default=ident() visible=(@op==12) endfunc ;------------------------------Mind2------------------------------------------ param sel caption="Select" enum="*""/" default=1 visible=(@op==13) endparam param sel1 caption="Add C" enum="Normal""+C""*C""/C" default=0 visible=(@op==13) endparam param min1 caption="Param.1" default=(1.0,0.0) visible=(@op==13) endparam param min2 caption="Param.2" default=(0.0,0.0) visible=(@op==13) endparam param min3 caption="Param.3" default=(1.0,0.0) visible=(@op==13) endparam param min4 caption="Param.4" default=(1.0,0.0) visible=(@op==13) endparam param min6 caption="Exponent1" default=(1.0,0.0) visible=(@op==13) endparam param min5 caption="Exponent2" default=(1.0,0.0) visible=(@op==13) endparam param min7 caption="Param.C" default=(1.0,0.0) visible=(@op==13)&&(@sel1!=0) endparam func fnmin1 caption="Func.Z" default=ident() visible=(@op==13) endfunc func fnmin4 caption="Func. C" default=ident() visible=(@op==13) endfunc func fnmin2 caption="Global.1" default=ident() visible=(@op==13) endfunc func fnmin3 caption="Global.2" default=ident() visible=(@op==13) endfunc ;------------------------------TBQuest---------------------------------------- param tb1 caption="Param.1" default=(0.0,0.0) visible=(@op==14) endparam param tb2 caption="Param.2" default=(0.0,0.0) visible=(@op==14) endparam param tb3 caption="Param.3" default=(1.0,0.0) visible=(@op==14) endparam param tb4 caption="Param.4" default=(0.0,0.0) visible=(@op==14) endparam param tb5 caption="Exponent Z" default=(1.0,0.0) visible=(@op==14) endparam func fntb1 caption="Func.Z" default=exp() visible=(@op==14) endfunc func fntb2 caption="Func.C" default=tan() visible=(@op==14) endfunc ;------------------------------Hydra------------------------------------------ param ophy caption="Select Operator" enum="+""*" default=0 visible=(@op==15) endparam param phy3 caption="Mult.Z" default=(0.5,0.0) visible=(@op==15) endparam param phy9 caption="Mult.C" default=(1.0,0.0) visible=(@op==15) endparam param phy4 caption="Distortion.1" default=(1.0,0.0) visible=(@op==15) endparam param phy6 caption="Distortion.2" default=(0.0,0.0) visible=(@op==15) endparam param phy1 caption="Distortion.3" default=(0.5,0.0) visible=(@op==15) endparam param phy5 caption="Distortion.4" default=(1.0,0.0) visible=(@op==15) endparam param phy7 caption="Distortion.5" default=(0.0,0.0) visible=(@op==15) endparam param phy8 caption="Exp. Distortion" default=(1.0,0.0) visible=(@op==15) endparam param phy2 caption="Exponent" default=(2.0,0.0) visible=(@op==15) endparam func fnhy2 caption="Func.Z" default=ident() visible=(@op==15) endfunc func fnhy3 caption="Func.C" default=ident() visible=(@op==15) endfunc func fnhy4 caption="Func.Distortion.1" default=ident() visible=(@op==15) endfunc func fnhy1 caption="Func.Distortion.2" default=ident() visible=(@op==15) endfunc ;------------------------------Hydra Brot------------------------------------- param op1hy caption="Select Operator" enum="+""*" default=0 visible=(@op==16) endparam param mphy3 caption="Mult.Z" default=(0.5,0.0) visible=(@op==16) endparam param mphy9 caption="Mult.C" default=(1.0,0.0) visible=(@op==16) endparam param mphy4 caption="Distortion.1" default=(1.0,0.0) visible=(@op==16) endparam param mphy6 caption="Distortion.2" default=(0.0,0.0) visible=(@op==16) endparam param mphy1 caption="Distortion.3" default=(0.5,0.0) visible=(@op==16) endparam param mphy5 caption="Distortion.4" default=(1.0,0.0) visible=(@op==16) endparam param mphy7 caption="Distortion.5" default=(0.0,0.0) visible=(@op==16) endparam param mphy8 caption="Exp. Distortion" default=(1.0,0.0) visible=(@op==16) endparam param mphy2 caption="Exponent" default=(2.0,0.0) visible=(@op==16) endparam param od1 caption="Add Old 1Z" default=(0.0,0.0) visible=(@op==16) endparam param od3 caption="Add Old 2Z" default=(0.0,0.0) visible=(@op==16) endparam param od4 caption="Add Old 3Z" default=(0.0,0.0) visible=(@op==16) endparam param od2 caption="Mult. Old 1Z" default=(1.0,0.0) visible=(@op==16) endparam param od6 caption="Mult. Old 2Z" default=(1.0,0.0) visible=(@op==16) endparam param od5 caption="Exp. Old Z" default=(1.0,0.0) visible=(@op==16) endparam func fn1hy2 caption="Func.Z" default=ident() visible=(@op==16) endfunc func fn1hy3 caption="Func.C" default=ident() visible=(@op==16) endfunc func fn1hy4 caption="Func.Distortion.1" default=ident() visible=(@op==16) endfunc func fn1hy1 caption="Func.Distortion.2" default=ident() visible=(@op==16) endfunc func fnod1 caption="Func.Old 1" default=ident() visible=(@op==16) endfunc func fnod2 caption="Func.Old 2" default=sqr() visible=(@op==16) endfunc Heading caption="Global Functions" endheading func fnc caption="Function C" default=ident() endfunc func fnz caption="Function Z" default=ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperMathSets" @seed=#pixel bailout=@bailout seq=@seq fl1=@fl1 fl2=@fl2 fnfl=@fnfl rd1=@rd1 rd2=@rd2 rd3=@rd3 factor=@factor factor1=@factor1 factor2=@factor2 factor3=@factor3 fnfact1=@fnfact1 fnfact2=@fnfact2 fnc=@fnc fnz=@fnz p1=@p1 p2=@p2 op=@op man=@man man1=@man1 man2=@man2 magnetcplx=@magnetcplx mcp=@mcp mcp1=@mcp1 mcp2=@mcp2 mcp3=@mcp3 mcp4=@mcp4 fmcp1=@fmcp1 fmcp2=@fmcp2 fmcp3=@fmcp3 mg1=@mg1 mg2=@mg2 mg3=@mg3 mg4=@mg4 fmg1=@fmg1 fmg2=@fmg2 fmg3=@fmg3 fmg4=@fmg4 selok=@selok ok9=@ok9 ok91=@ok91 ok92=@ok92 fok=@fok fok9=@fok9 fok91=@fok91 fok92=@fok92 fok93=@fok93 ike1=@ike1 ike2=@ike2 ike3=@ike3 ike4=@ike4 ike5=@ike5 fike=@fike fike1=@fike1 fike2=@fike2 fgz=@fgz fgz1=@fgz1 fgz2=@fgz2 fgz3=@fgz3 fgz4=@fgz4 fngz1=@fngz1 fngz2=@fngz2 fngz3=@fngz3 fngz4=@fngz4 phoe=@phoe phoe1=@phoe1 phoe2=@phoe2 fnpho1=@fnpho1 fnpho2=@fnpho2 fnpho3=@fnpho3 barn=@barn barn1=@barn1 barn2=@barn2 barn3=@barn3 fbarn=@fbarn fbarn1=@fbarn1 fbarn2=@fbarn2 fbarn3=@fbarn3 fau1=@fau1 fau2=@fau2 fau3=@fau3 fau4=@fau4 fau5=@fau5 fau6=@fau6 fau7=@fau7 fau8=@fau8 fnfau1=@fnfau1 fnfau2=@fnfau2 fnfau3=@fnfau3 fnfau4=@fnfau4 excpm=@excpm fcpm=@fcpm fcpm1=@fcpm1 fcpm2=@fcpm2 fcpm3=@fcpm3 fncpm1=@fncpm1 fncpm2=@fncpm2 fncpm3=@fncpm3 fnn1=@fnn1 fnn2=@fnn2 nn1=@nn1 nn2=@nn2 nn3=@nn3 nn4=@nn4 n1exp=@n1exp fn1num=@fn1num fn2num=@fn2num fn3num=@fn3num fn4num=@fn4num fn5num=@fn5num num1=@num1 num2=@num2 num3=@num3 num4=@num4 num5=@num5 fnfrm1=@fnfrm1 fnfrm2=@fnfrm2 fnfrm3=@fnfrm3 fnfrm4=@fnfrm4 frm1=@frm1 frm2=@frm2 frm3=@frm3 sel=@sel sel1=@sel1 min1=@min1 min2=@min2 min3=@min3 min4=@min4 min5=@min5 min6=@min6 min7=@min7 fnmin1=@fnmin1 fnmin2=@fnmin2 fnmin3=@fnmin3 fnmin4=@fnmin4 fntb1=@fntb1 fntb2=@fntb2 tb1=@tb1 tb2=@tb2 tb3=@tb3 tb4=@tb4 tb5=@tb5 ophy=@ophy phy1=@phy1 phy2=@phy2 phy3=@phy3 phy4=@phy4 phy5=@phy5 phy6=@phy6 phy7=@phy7 phy8=@phy8 phy9=@phy9 fnhy1=@fnhy1 fnhy2=@fnhy2 fnhy3=@fnhy3 fnhy4=@fnhy4 op1hy=@op1hy mphy1=@mphy1 mphy2=@mphy2 mphy3=@mphy3 mphy4=@mphy4 mphy5=@mphy5 mphy6=@mphy6 mphy7=@mphy7 mphy8=@mphy8 mphy9=@mphy9 od1=@od1 od2=@od2 od3=@od3 od4=@od4 od5=@od5 od6=@od6 fnod1=@fnod1 fnod2=@fnod2 fn1hy1=@fn1hy1 fn1hy2=@fn1hy2 fn1hy3=@fn1hy3 fn1hy4=@fn1hy4 fn1=@fn1 fn2=@fn2 fn3=@fn3 mode=@switchmode switchmode=@mode version=@version slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperPolinomialSet { ;HyperComplex Polinomial set of tenth degree and corrispective distortion section ;with sequence and scenario method. ;Andrea Spinozzi(Giugno 2022) Init: ;--------------------------Initialize Mandelbrot parameters--------------------- z1=z2=z3=0.0 zz1=zz2=zz3=0.0 cc1=#pixel cc2=#pixel+@offset cc3=#pixel+flip(@offset) cza1=cza2=cza3=0.0 czb1=czb2=czb3=0.0 zr1=zr2=zr3=0.0 cr1=cr2=cr3=0.0 zaa1=zaa2=zaa3=0.0 zbb1=zbb2=zbb3=0.0 ;--------------------------Initialize distortion parameters--------------------- yaa11=yaa21=yaa31=yaa41=yaa51=yaa61=yaa71=yaa81=yaa91=yaa101=0.0 yaa12=yaa22=yaa32=yaa42=yaa52=yaa62=yaa72=yaa82=yaa92=yaa102=0.0 yaa13=yaa23=yaa33=yaa43=yaa53=yaa63=yaa73=yaa83=yaa93=yaa103=0.0 ybb11=ybb21=ybb31=ybb41=ybb51=ybb61=ybb71=ybb81=ybb91=ybb101=0.0 ybb12=ybb22=ybb32=ybb42=ybb52=ybb62=ybb72=ybb82=ybb92=ybb102=0.0 ybb13=ybb23=ybb33=ybb43=ybb53=ybb63=ybb73=ybb83=ybb93=ybb103=0.0 ;--------------------------HyperComplex parameters------------------------------ complex w1=w2=w3=0.0 complex cw1=cw2=cw3=@hyp1 if (@mode=="Julia");---------------------Julia Mode---------------------------- zz1=#pixel zz2=#pixel+@offset zz3=#pixel+flip(@offset) cc1=@seed cc2=@seed cc3=@seed w1=w2=w3=@hyp2 cw1=cw2=cw3=@hyp1 endif ;------------------------------Define the HyperComplex planes------------------- cr1=real(cc1) cr2=real(cc2) cr3=real(cc3) ci1=imag(cc1) ci2=imag(cc2) ci3=imag(cc3) cwr1=real(cw1) cwr2=real(cw2) cwr3=real(cw3) cwi1=imag(cw1) cwi2=imag(cw2) cwi3=imag(cw3) zr1=real(zz1) zr2=real(zz2) zr3=real(zz3) zi1=imag(zz1) zi2=imag(zz2) zi3=imag(zz3) wr1=real(w1) wr2=real(w2) wr3=real(w3) wi1=imag(w1) wi2=imag(w2) wi3=imag(w3) ;----------------------------MANDELBROT MODE------------------------------------ ;----------------------------(yz plane rotation)-------------------------------- ry1 = ci1*cos(#pi*@rotx/180) - cwr1*sin(#pi*@rotx/180) ry2 = ci2*cos(#pi*@rotx/180) - cwr2*sin(#pi*@rotx/180) ry3 = ci3*cos(#pi*@rotx/180) - cwr3*sin(#pi*@rotx/180) rz1 = ci1*sin(#pi*@rotx/180) + cwr1*cos(#pi*@rotx/180) rz2 = ci2*sin(#pi*@rotx/180) + cwr2*cos(#pi*@rotx/180) rz3 = ci3*sin(#pi*@rotx/180) + cwr3*cos(#pi*@rotx/180) ci1 = ry1 ci2 = ry2 ci3 = ry3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xz plane rotation)-------------------------------- rx1 = cwr1*sin(#pi*@roty/180) + cr1*cos(#pi*@roty/180) rx2 = cwr2*sin(#pi*@roty/180) + cr2*cos(#pi*@roty/180) rx3 = cwr3*sin(#pi*@roty/180) + cr3*cos(#pi*@roty/180) rz1 = cwr1*cos(#pi*@roty/180) - cr1*sin(#pi*@roty/180) rz2 = cwr2*cos(#pi*@roty/180) - cr2*sin(#pi*@roty/180) rz3 = cwr3*cos(#pi*@roty/180) - cr3*sin(#pi*@roty/180) cr1 = rx1 cr2 = rx2 cr3 = rx3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xy plane rotation)-------------------------------- rx1 = cr1*cos(#pi*@rotz/180) - ci1*sin(#pi*@rotz/180) rx2 = cr2*cos(#pi*@rotz/180) - ci2*sin(#pi*@rotz/180) rx3 = cr3*cos(#pi*@rotz/180) - ci3*sin(#pi*@rotz/180) ry1 = cr1*sin(#pi*@rotz/180) + ci1*cos(#pi*@rotz/180) ry2 = cr2*sin(#pi*@rotz/180) + ci2*cos(#pi*@rotz/180) ry3 = cr3*sin(#pi*@rotz/180) + ci3*cos(#pi*@rotz/180) cr1 = rx1 cr2 = rx2 cr3 = rx3 ci1 = ry1 ci2 = ry2 ci3 = ry3 ;----------------------------(xw plane rotation)-------------------------------- rx1=cr1*sin(#pi*@rotw/180)+cwi1*cos(#pi*@rotw/180) rx2=cr2*sin(#pi*@rotw/180)+cwi2*cos(#pi*@rotw/180) rx3=cr3*sin(#pi*@rotw/180)+cwi3*cos(#pi*@rotw/180) rw1=cr1*cos(#pi*@rotw/180)-cwi1*sin(#pi*@rotw/180) rw2=cr2*cos(#pi*@rotw/180)-cwi2*sin(#pi*@rotw/180) rw3=cr3*cos(#pi*@rotw/180)-cwi3*sin(#pi*@rotw/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 cr1=rw1 cr2=rw2 cr3=rw3 ;-------------------------(yw plane rotation)----------------------------------- rx1=ci1*sin(#pi*@rotwy/180)+cwi1*cos(#pi*@rotwy/180) rx2=ci2*sin(#pi*@rotwy/180)+cwi2*cos(#pi*@rotwy/180) rx3=ci3*sin(#pi*@rotwy/180)+cwi3*cos(#pi*@rotwy/180) rw1=ci1*cos(#pi*@rotwy/180)-cwi1*sin(#pi*@rotwy/180) rw2=ci2*cos(#pi*@rotwy/180)-cwi2*sin(#pi*@rotwy/180) rw3=ci3*cos(#pi*@rotwy/180)-cwi3*sin(#pi*@rotwy/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 ci1=rw1 ci2=rw2 ci3=rw3 if (@mode=="julia");-------------Julia Rotations------------------------------- ;---------------------------------JULIA MODE------------------------------------ ;---------------------------(yz plane rotation)--------------------------------- ry1 = zi1*cos(#pi*@rotx/180) - wr1*sin(#pi*@rotx/180) ry2 = zi2*cos(#pi*@rotx/180) - wr2*sin(#pi*@rotx/180) ry3 = zi3*cos(#pi*@rotx/180) - wr3*sin(#pi*@rotx/180) rz1 = zi1*sin(#pi*@rotx/180) + wr1*cos(#pi*@rotx/180) rz2 = zi2*sin(#pi*@rotx/180) + wr2*cos(#pi*@rotx/180) rz3 = zi3*sin(#pi*@rotx/180) + wr3*cos(#pi*@rotx/180) zi1 = ry1 zi2 = ry2 zi3 = ry3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;-------------------------(xz plane rotation)----------------------------------- rx1 = wr1*sin(#pi*@roty/180) + zr1*cos(#pi*@roty/180) rx2 = wr2*sin(#pi*@roty/180) + zr2*cos(#pi*@roty/180) rx3 = wr3*sin(#pi*@roty/180) + zr3*cos(#pi*@roty/180) rz1 = wr1*cos(#pi*@roty/180) - zr1*sin(#pi*@roty/180) rz2 = wr2*cos(#pi*@roty/180) - zr2*sin(#pi*@roty/180) rz3 = wr3*cos(#pi*@roty/180) - zr3*sin(#pi*@roty/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;---------------------(xy plane rotation)--------------------------------------- rx1 = zr1*cos(#pi*@rotz/180) - zi1*sin(#pi*@rotz/180) rx2 = zr2*cos(#pi*@rotz/180) - zi2*sin(#pi*@rotz/180) rx3 = zr3*cos(#pi*@rotz/180) - zi3*sin(#pi*@rotz/180) ry1 = zr1*sin(#pi*@rotz/180) + zi1*cos(#pi*@rotz/180) ry2 = zr2*sin(#pi*@rotz/180) + zi2*cos(#pi*@rotz/180) ry3 = zr3*sin(#pi*@rotz/180) + zi3*cos(#pi*@rotz/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 zi1 = ry1 zi2 = ry2 zi3 = ry3 ;---------------------(xw plane rotation)--------------------------------------- rx1=zr1*sin(#pi*@rotw/180)+wi1*cos(#pi*@rotw/180) rx2=zr2*sin(#pi*@rotw/180)+wi2*cos(#pi*@rotw/180) rx3=zr3*sin(#pi*@rotw/180)+wi3*cos(#pi*@rotw/180) rw1=zr1*cos(#pi*@rotw/180)-wi1*sin(#pi*@rotw/180) rw2=zr2*cos(#pi*@rotw/180)-wi2*sin(#pi*@rotw/180) rw3=zr3*cos(#pi*@rotw/180)-wi3*sin(#pi*@rotw/180) wi1=rx1 wi2=rx2 wi3=rx3 zr1=rw1 zr2=rw2 zr3=rw3 ;---------------------(yw plane rotation)--------------------------------------- rx1=zi1*sin(#pi*@rotwy/180)+wi1*cos(#pi*@rotwy/180) rx2=zi2*sin(#pi*@rotwy/180)+wi2*cos(#pi*@rotwy/180) rx3=zi3*sin(#pi*@rotwy/180)+wi3*cos(#pi*@rotwy/180) rw1=zi1*cos(#pi*@rotwy/180)-wi1*sin(#pi*@rotwy/180) rw2=zi2*cos(#pi*@rotwy/180)-wi2*sin(#pi*@rotwy/180) rw3=zi3*cos(#pi*@rotwy/180)-wi3*sin(#pi*@rotwy/180) wi1=rx1 wi2=rx2 wi3=rx3 zi1=rw1 zi2=rw2 zi3=rw3 endif;----------------------------------------------------------------------- ;----------Init variables for C, Distortion and scenario method----------------- int modby0=@seq0+2 int modby1=@seq1+2 int iter0=0 int iter1=0 int iter2=0 ;----------------------Initialize the Slope parameters and vectors-------------- int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 ;-------------------------Define C dimension for HyperComplex method------------ ca1=cr1-cwi1+flip(ci1+cwr1) ca2=cr2-cwi2+flip(ci2+cwr2) ca3=cr3-cwi3+flip(ci3+cwr3) cb1=cr1+cwi1+flip(ci1-cwr1) cb2=cr2+cwi2+flip(ci2-cwr2) cb3=cr3+cwi3+flip(ci3-cwr3) Loop: ;------Define the method for the sequence and scenario iteration---------------- int method0=iter0%modby0 int method1=iter1%modby1 bool scenario = false iter2 = iter2+1 if (@seq2==1) ; First scenario scenario = true elseif (@seq2==2 ) ; Second scenario scenario = false elseif (iter2%@modby2<@modcomp); Modulation scenario = true endif ;---------------------------Define Z for HyperComplex method-------------------- a1=zr1-wi1+flip(zi1+wr1) a2=zr2-wi2+flip(zi2+wr2) a3=zr3-wi3+flip(zi3+wr3) b1=zr1+wi1+flip(zi1-wr1) b2=zr2+wi2+flip(zi2-wr2) b3=zr3+wi3+flip(zi3-wr3) ;----------------------------Global C function---------------------------------- ca1=@fnc(ca1) ca2=@fnc(ca2) ca3=@fnc(ca3) cb1=@fnc(cb1) cb2=@fnc(cb2) cb3=@fnc(cb3) ;---------------------------Loop the method for C sequence---------------------- if (method0==0) cza1=@fnc1(ca1+@pcc1)*@pcc2 cza2=@fnc1(ca2+@pcc1)*@pcc2 cza3=@fnc1(ca3+@pcc1)*@pcc2 czb1=@fnc1(cb1+@pcc1)*@pcc2 czb2=@fnc1(cb2+@pcc1)*@pcc2 czb3=@fnc1(cb3+@pcc1)*@pcc2 elseif (method0==1) cza1=@fnc2(ca1+@pcc3)*@pcc4 cza2=@fnc2(ca2+@pcc3)*@pcc4 cza3=@fnc2(ca3+@pcc3)*@pcc4 czb1=@fnc2(cb1+@pcc3)*@pcc4 czb2=@fnc2(cb2+@pcc3)*@pcc4 czb3=@fnc2(cb3+@pcc3)*@pcc4 endif ;----------------------------Global Z function---------------------------------- a1=@fnz(a1) a2=@fnz(a2) a3=@fnz(a3) b1=@fnz(b1) b2=@fnz(b2) b3=@fnz(b3) ;------------------Define the degrees of Z untill the tenth degree-------------- za11=a1 za12=a2 za13=a3 zb11=b1 zb12=b2 zb13=b3 za21=a1*a1 za22=a2*a2 za23=a3*a3 zb21=b1*b1 zb22=b2*b2 zb23=b3*b3 za31=a1*a1*a1 za32=a2*a2*a2 za33=a3*a3*a3 zb31=b1*b1*b1 zb32=b2*b2*b2 zb33=b3*b3*b3 za41=a1*a1*a1*a1 za42=a2*a2*a2*a2 za43=a3*a3*a3*a3 zb41=b1*b1*b1*b1 zb42=b2*b2*b2*b2 zb43=b3*b3*b3*b3 za51=a1*a1*a1*a1*a1 za52=a2*a2*a2*a2*a2 za53=a3*a3*a3*a3*a3 zb51=b1*b1*b1*b1*b1 zb52=b2*b2*b2*b2*b2 zb53=b3*b3*b3*b3*b3 za61=a1*a1*a1*a1*a1*a1 za62=a2*a2*a2*a2*a2*a2 za63=a3*a3*a3*a3*a3*a3 zb61=b1*b1*b1*b1*b1*b1 zb62=b2*b2*b2*b2*b2*b2 zb63=b3*b3*b3*b3*b3*b3 za71=a1*a1*a1*a1*a1*a1*a1 za72=a2*a2*a2*a2*a2*a2*a2 za73=a3*a3*a3*a3*a3*a3*a3 zb71=b1*b1*b1*b1*b1*b1*b1 zb72=b2*b2*b2*b2*b2*b2*b2 zb73=b3*b3*b3*b3*b3*b3*b3 za81=a1*a1*a1*a1*a1*a1*a1*a1 za82=a2*a2*a2*a2*a2*a2*a2*a2 za83=a3*a3*a3*a3*a3*a3*a3*a3 zb81=b1*b1*b1*b1*b1*b1*b1*b1 zb82=b2*b2*b2*b2*b2*b2*b2*b2 zb83=b3*b3*b3*b3*b3*b3*b3*b3 za91=a1*a1*a1*a1*a1*a1*a1*a1*a1 za92=a2*a2*a2*a2*a2*a2*a2*a2*a2 za93=a3*a3*a3*a3*a3*a3*a3*a3*a3 zb91=b1*b1*b1*b1*b1*b1*b1*b1*b1 zb92=b2*b2*b2*b2*b2*b2*b2*b2*b2 zb93=b3*b3*b3*b3*b3*b3*b3*b3*b3 za101=a1*a1*a1*a1*a1*a1*a1*a1*a1*a1 za102=a2*a2*a2*a2*a2*a2*a2*a2*a2*a2 za103=a3*a3*a3*a3*a3*a3*a3*a3*a3*a3 zb101=b1*b1*b1*b1*b1*b1*b1*b1*b1*b1 zb102=b2*b2*b2*b2*b2*b2*b2*b2*b2*b2 zb103=b3*b3*b3*b3*b3*b3*b3*b3*b3*b3 ;------------Parameters allows to use a specific degree------------------------- ;------------Define the scenario that must be used------------------------------ if (scenario==true) za11=za11*@pz1 za12=za12*@pz1 za13=za13*@pz1 zb11=zb11*@pz1 zb12=zb12*@pz1 zb13=zb13*@pz1 za21=za21*@pz2 za22=za22*@pz2 za23=za23*@pz2 zb21=zb21*@pz2 zb22=zb22*@pz2 zb23=zb23*@pz2 za31=za31*@pz3 za32=za32*@pz3 za33=za33*@pz3 zb31=zb31*@pz3 zb32=zb32*@pz3 zb33=zb33*@pz3 za41=za41*@pz4 za42=za42*@pz4 za43=za43*@pz4 zb41=zb41*@pz4 zb42=zb42*@pz4 zb43=zb43*@pz4 za51=za51*@pz5 za52=za52*@pz5 za53=za53*@pz5 zb51=zb51*@pz5 zb52=zb52*@pz5 zb53=zb53*@pz5 za61=za61*@pz6 za62=za62*@pz6 za63=za63*@pz6 zb61=zb61*@pz6 zb62=zb62*@pz6 zb63=zb63*@pz6 za71=za71*@pz7 za72=za72*@pz7 za73=za73*@pz7 zb71=zb71*@pz7 zb72=zb72*@pz7 zb73=zb73*@pz7 za81=za81*@pz8 za82=za82*@pz8 za83=za83*@pz8 zb81=zb81*@pz8 zb82=zb82*@pz8 zb83=zb83*@pz8 za91=za91*@pz9 za92=za92*@pz9 za93=za93*@pz9 zb91=zb91*@pz9 zb92=zb92*@pz9 zb93=zb93*@pz9 za101=za101*@pz10 za102=za102*@pz10 za103=za103*@pz10 zb101=zb101*@pz10 zb102=zb102*@pz10 zb103=zb103*@pz10 else za11=za11*@pz11 za12=za12*@pz11 za13=za13*@pz11 zb11=zb11*@pz11 zb12=zb12*@pz11 zb13=zb13*@pz11 za21=za21*@pz12 za22=za22*@pz12 za23=za23*@pz12 zb21=zb21*@pz12 zb22=zb22*@pz12 zb23=zb23*@pz12 za31=za31*@pz13 za32=za32*@pz13 za33=za33*@pz13 zb31=zb31*@pz13 zb32=zb32*@pz13 zb33=zb33*@pz13 za41=za41*@pz14 za42=za42*@pz14 za43=za43*@pz14 zb41=zb41*@pz14 zb42=zb42*@pz14 zb43=zb43*@pz14 za51=za51*@pz15 za52=za52*@pz15 za53=za53*@pz15 zb51=zb51*@pz15 zb52=zb52*@pz15 zb53=zb53*@pz15 za61=za61*@pz16 za62=za62*@pz16 za63=za63*@pz16 zb61=zb61*@pz16 zb62=zb62*@pz16 zb63=zb63*@pz16 za71=za71*@pz17 za72=za72*@pz17 za73=za73*@pz17 zb71=zb71*@pz17 zb72=zb72*@pz17 zb73=zb73*@pz17 za81=za81*@pz18 za82=za82*@pz18 za83=za83*@pz18 zb81=zb81*@pz18 zb82=zb82*@pz18 zb83=zb83*@pz18 za91=za91*@pz19 za92=za92*@pz19 za93=za93*@pz19 zb91=zb91*@pz19 zb92=zb92*@pz19 zb93=zb93*@pz19 za101=za101*@pz20 za102=za102*@pz20 za103=za103*@pz20 zb101=zb101*@pz20 zb102=zb102*@pz20 zb103=zb103*@pz20 endif ;-------------------Loop Z with the ditortion method---------------------------- za11=za11+yaa11 za12=za12+yaa12 za13=za13+yaa13 zb11=zb11+ybb11 zb12=zb12+ybb12 zb13=zb13+ybb13 za21=za21+yaa21 za22=za22+yaa22 za23=za23+yaa23 zb21=zb21+ybb21 zb22=zb22+ybb22 zb23=zb23+ybb23 za31=za31+yaa31 za32=za32+yaa32 za33=za33+yaa33 zb31=zb31+ybb31 zb32=zb32+ybb32 zb33=zb33+ybb33 za41=za41+yaa41 za42=za42+yaa42 za43=za43+yaa43 zb41=zb41+ybb41 zb42=zb42+ybb42 zb43=zb43+ybb43 za51=za51+yaa51 za52=za52+yaa52 za53=za53+yaa53 zb51=zb51+ybb51 zb52=zb52+ybb52 zb53=zb53+ybb53 za61=za61+yaa61 za62=za62+yaa62 za63=za63+yaa63 zb61=zb61+ybb61 zb62=zb62+ybb62 zb63=zb63+ybb63 za71=za71+yaa71 za72=za72+yaa72 za73=za73+yaa73 zb71=zb71+ybb71 zb72=zb72+ybb72 zb73=zb73+ybb73 za81=za81+yaa81 za82=za82+yaa82 za83=za83+yaa83 zb81=zb81+ybb81 zb82=zb82+ybb82 zb83=zb83+ybb83 za91=za91+yaa91 za92=za92+yaa92 za93=za93+yaa93 zb91=zb91+ybb91 zb92=zb92+ybb92 zb93=zb93+ybb93 za101=za101+yaa101 za102=za102+yaa102 za103=za103+yaa103 zb101=zb101+ybb101 zb102=zb102+ybb102 zb103=zb103+ybb103 ;-----------------------Define the degrees of the distortion-------------------- ya11=a1 ya12=a2 ya13=a3 yb11=b1 yb12=b2 yb13=b3 ya21=a1*a1 ya22=a2*a2 ya23=a3*a3 yb21=b1*b1 yb22=b2*b2 yb23=b3*b3 ya31=a1*a1*a1 ya32=a2*a2*a2 ya33=a3*a3*a3 yb31=b1*b1*b1 yb32=b2*b2*b2 yb33=b3*b3*b3 ya41=a1*a1*a1*a1 ya42=a2*a2*a2*a2 ya43=a3*a3*a3*a3 yb41=b1*b1*b1*b1 yb42=b2*b2*b2*b2 yb43=b3*b3*b3*b3 ya51=a1*a1*a1*a1*a1 ya52=a2*a2*a2*a2*a2 ya53=a3*a3*a3*a3*a3 yb51=b1*b1*b1*b1*b1 yb52=b2*b2*b2*b2*b2 yb53=b3*b3*b3*b3*b3 ya61=a1*a1*a1*a1*a1*a1 ya62=a2*a2*a2*a2*a2*a2 ya63=a3*a3*a3*a3*a3*a3 yb61=b1*b1*b1*b1*b1*b1 yb62=b2*b2*b2*b2*b2*b2 yb63=b3*b3*b3*b3*b3*b3 ya71=a1*a1*a1*a1*a1*a1*a1 ya72=a2*a2*a2*a2*a2*a2*a2 ya73=a3*a3*a3*a3*a3*a3*a3 yb71=b1*b1*b1*b1*b1*b1*b1 yb72=b2*b2*b2*b2*b2*b2*b2 yb73=b3*b3*b3*b3*b3*b3*b3 ya81=a1*a1*a1*a1*a1*a1*a1*a1 ya82=a2*a2*a2*a2*a2*a2*a2*a2 ya83=a3*a3*a3*a3*a3*a3*a3*a3 yb81=b1*b1*b1*b1*b1*b1*b1*b1 yb82=b2*b2*b2*b2*b2*b2*b2*b2 yb83=b3*b3*b3*b3*b3*b3*b3*b3 ya91=a1*a1*a1*a1*a1*a1*a1*a1*a1 ya92=a2*a2*a2*a2*a2*a2*a2*a2*a2 ya93=a3*a3*a3*a3*a3*a3*a3*a3*a3 yb91=b1*b1*b1*b1*b1*b1*b1*b1*b1 yb92=b2*b2*b2*b2*b2*b2*b2*b2*b2 yb93=b3*b3*b3*b3*b3*b3*b3*b3*b3 ya101=a1*a1*a1*a1*a1*a1*a1*a1*a1*a1 ya102=a2*a2*a2*a2*a2*a2*a2*a2*a2*a2 ya103=a3*a3*a3*a3*a3*a3*a3*a3*a3*a3 yb101=b1*b1*b1*b1*b1*b1*b1*b1*b1*b1 yb102=b2*b2*b2*b2*b2*b2*b2*b2*b2*b2 yb103=b3*b3*b3*b3*b3*b3*b3*b3*b3*b3 ;---------------Loop the distortion sequence method----------------------------- if (method1==0) yaa11=(ya11)*@pgz1 yaa12=(ya12)*@pgz1 yaa13=(ya13)*@pgz1 ybb11=(yb11)*@pgz1 ybb12=(yb12)*@pgz1 ybb13=(yb13)*@pgz1 yaa21=(ya21)*@pgz2 yaa22=(ya22)*@pgz2 yaa23=(ya23)*@pgz2 ybb21=(yb21)*@pgz2 ybb22=(yb22)*@pgz2 ybb23=(yb23)*@pgz2 yaa31=(ya31)*@pgz3 yaa32=(ya32)*@pgz3 yaa33=(ya33)*@pgz3 ybb31=(yb31)*@pgz3 ybb32=(yb32)*@pgz3 ybb33=(yb33)*@pgz3 yaa41=(ya41)*@pgz4 yaa42=(ya42)*@pgz4 yaa43=(ya43)*@pgz4 ybb41=(yb41)*@pgz4 ybb42=(yb42)*@pgz4 ybb43=(yb43)*@pgz4 yaa51=(ya51)*@pgz5 yaa52=(ya52)*@pgz5 yaa53=(ya53)*@pgz5 ybb51=(yb51)*@pgz5 ybb52=(yb52)*@pgz5 ybb53=(yb53)*@pgz5 yaa61=(ya61)*@pgz6 yaa62=(ya62)*@pgz6 yaa63=(ya63)*@pgz6 ybb61=(yb61)*@pgz6 ybb62=(yb62)*@pgz6 ybb63=(yb63)*@pgz6 yaa71=(ya71)*@pgz7 yaa72=(ya72)*@pgz7 yaa73=(ya73)*@pgz7 ybb71=(yb71)*@pgz7 ybb72=(yb72)*@pgz7 ybb73=(yb73)*@pgz7 yaa81=(ya81)*@pgz8 yaa82=(ya82)*@pgz8 yaa83=(ya83)*@pgz8 ybb81=(yb81)*@pgz8 ybb82=(yb82)*@pgz8 ybb83=(yb83)*@pgz8 yaa91=(ya91)*@pgz9 yaa92=(ya92)*@pgz9 yaa93=(ya93)*@pgz9 ybb91=(yb91)*@pgz9 ybb92=(yb92)*@pgz9 ybb93=(yb93)*@pgz9 yaa101=(ya101)*@pgz10 yaa102=(ya102)*@pgz10 yaa103=(ya103)*@pgz10 ybb101=(yb101)*@pgz10 ybb102=(yb102)*@pgz10 ybb103=(yb103)*@pgz10 elseif (method1==1) yaa11=(ya11)*@pgz11 yaa12=(ya12)*@pgz11 yaa13=(ya13)*@pgz11 ybb11=(yb11)*@pgz11 ybb12=(yb12)*@pgz11 ybb13=(yb13)*@pgz11 yaa21=(ya21)*@pgz12 yaa22=(ya22)*@pgz12 yaa23=(ya23)*@pgz12 ybb21=(yb21)*@pgz12 ybb22=(yb22)*@pgz12 ybb23=(yb23)*@pgz12 yaa31=(ya31)*@pgz13 yaa32=(ya32)*@pgz13 yaa33=(ya33)*@pgz13 ybb31=(yb31)*@pgz13 ybb32=(yb32)*@pgz13 ybb33=(yb33)*@pgz13 yaa41=(ya41)*@pgz14 yaa42=(ya42)*@pgz14 yaa43=(ya43)*@pgz14 ybb41=(yb41)*@pgz14 ybb42=(yb42)*@pgz14 ybb43=(yb43)*@pgz14 yaa51=(ya51)*@pgz15 yaa52=(ya52)*@pgz15 yaa53=(ya53)*@pgz15 ybb51=(yb51)*@pgz15 ybb52=(yb52)*@pgz15 ybb53=(yb53)*@pgz15 yaa61=(ya61)*@pgz16 yaa62=(ya62)*@pgz16 yaa63=(ya63)*@pgz16 ybb61=(yb61)*@pgz16 ybb62=(yb62)*@pgz16 ybb63=(yb63)*@pgz16 yaa71=(ya71)*@pgz17 yaa72=(ya72)*@pgz17 yaa73=(ya73)*@pgz17 ybb71=(yb71)*@pgz17 ybb72=(yb72)*@pgz17 ybb73=(yb73)*@pgz17 yaa81=(ya81)*@pgz18 yaa82=(ya82)*@pgz18 yaa83=(ya83)*@pgz18 ybb81=(yb81)*@pgz18 ybb82=(yb82)*@pgz18 ybb83=(yb83)*@pgz18 yaa91=(ya91)*@pgz19 yaa92=(ya92)*@pgz19 yaa93=(ya93)*@pgz19 ybb91=(yb91)*@pgz19 ybb92=(yb92)*@pgz19 ybb93=(yb93)*@pgz19 yaa101=(ya101)*@pgz20 yaa102=(ya102)*@pgz20 yaa103=(ya103)*@pgz20 ybb101=(yb101)*@pgz20 ybb102=(yb102)*@pgz20 ybb103=(yb103)*@pgz20 endif ;------------------Define Z with the sum of degrees----------------------------- zaa1=za11+za21+za31+za41+za51+za61+za71+za81+za91+za101 zaa2=za12+za22+za32+za42+za52+za62+za72+za82+za92+za102 zaa3=za13+za23+za33+za43+za53+za63+za73+za83+za93+za103 zbb1=zb11+zb21+zb31+zb41+zb51+zb61+zb71+zb81+zb91+zb101 zbb2=zb12+zb22+zb32+zb42+zb52+zb62+zb72+zb82+zb92+zb102 zbb3=zb13+zb23+zb33+zb43+zb53+zb63+zb73+zb83+zb93+zb103 ;-------------------Rename C and add parameter---------------------------------- cra1=@pc2+(cza1)*@pc1 cra2=@pc2+(cza2)*@pc1 cra3=@pc2+(cza3)*@pc1 crb1=@pc2+(czb1)*@pc1 crb2=@pc2+(czb2)*@pc1 crb3=@pc2+(czb3)*@pc1 ;------------------Add C to Z and define the scenario to be used---------------- if (scenario==true) zra1=real(@glo2)*@fngloc1(cra1)^imag(@glo2)+real(@glo1)*@fngloz1(zaa1)^imag(@glo1) zra2=real(@glo2)*@fngloc1(cra2)^imag(@glo2)+real(@glo1)*@fngloz1(zaa2)^imag(@glo1) zra3=real(@glo2)*@fngloc1(cra3)^imag(@glo2)+real(@glo1)*@fngloz1(zaa3)^imag(@glo1) zrb1=real(@glo2)*@fngloc1(crb1)^imag(@glo2)+real(@glo1)*@fngloz1(zbb1)^imag(@glo1) zrb2=real(@glo2)*@fngloc1(crb2)^imag(@glo2)+real(@glo1)*@fngloz1(zbb2)^imag(@glo1) zrb3=real(@glo2)*@fngloc1(crb3)^imag(@glo2)+real(@glo1)*@fngloz1(zbb3)^imag(@glo1) else zra1=real(@glo3)*@fngloc2(cra1)^imag(@glo3)+real(@glo4)*@fngloz2(zaa1)^imag(@glo4) zra2=real(@glo3)*@fngloc2(cra2)^imag(@glo3)+real(@glo4)*@fngloz2(zaa2)^imag(@glo4) zra3=real(@glo3)*@fngloc2(cra3)^imag(@glo3)+real(@glo4)*@fngloz2(zaa3)^imag(@glo4) zrb1=real(@glo3)*@fngloc2(crb1)^imag(@glo3)+real(@glo4)*@fngloz2(zbb1)^imag(@glo4) zrb2=real(@glo3)*@fngloc2(crb2)^imag(@glo3)+real(@glo4)*@fngloz2(zbb2)^imag(@glo4) zrb3=real(@glo3)*@fngloc2(crb3)^imag(@glo3)+real(@glo4)*@fngloz2(zbb3)^imag(@glo4) endif ;---------------------------Define the Hypercomplex loop method----------------- zr1=(real(zra1)+real(zrb1))/2 zr2=(real(zra2)+real(zrb2))/2 zr3=(real(zra3)+real(zrb3))/2 zi1=(imag(zra1)+imag(zrb1))/2 zi2=(imag(zra2)+imag(zrb2))/2 zi3=(imag(zra3)+imag(zrb3))/2 wr1=(imag(zra1)-imag(zrb1))/2 wr2=(imag(zra2)-imag(zrb2))/2 wr3=(imag(zra3)-imag(zrb3))/2 wi1=(real(zrb1)-real(zra1))/2 wi2=(real(zrb2)-real(zra2))/2 wi3=(real(zrb3)-real(zra3))/2 ;------------------------These is the final Z and W hypercomplex---------------- zf1=zr1+flip(zi1) zf2=zr2+flip(zi2) zf3=zr3+flip(zi3) w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) ;-----------------------Final Z for flavor parameters and function-------------- z1=(@fnflav(zf1)+@flav1)*@flav2 z2=(@fnflav(zf2)+@flav1)*@flav2 z3=(@fnflav(zf3)+@flav1)*@flav2 ;----------------Start the loop slope section----------------------------------- if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zf1|+|w1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else z = z1 endif if ( @bailout < |zf1|+|w1| ) ; we're done done = 0 endif ;--------------------------Loop the sequence method--------------------------- iter0=iter0+1 iter1=iter1+1 Bailout: done > 0 Default: title="SlopeHyperPolinomialSet" maxiter=150 method=multipass periodicity=0 Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param Bailout caption="Bailout Value" default=128.0 endparam param seed caption="Seed Value" default=(1.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param flav1 caption="Flavor 1" default=(0.0,0.0) endparam param flav2 caption="Flavor 2" default=(1.0,0.0) endparam func fnflav caption="Flavor Function" default=ident() endfunc Heading caption="Rotations" show=false Endheading param rotx caption="Rotation YZ" default=0 min=-360 max=360 endparam param roty caption="Rotation XZ" default=0 min=-360 max=360 endparam param rotw caption="Rotation XW" default=0 min=-360 max=360 endparam param rotwy caption="Rotation YW" default=0 min=-360 max=360 endparam param rotz caption="Rotation XY" default=0 min=-360 max=360 endparam Heading caption="Slope Parameters" show=false Endheading float param offset caption="Orbit Separation" default=1.0e-8 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." endparam Heading caption="C Sequence" show=false Endheading param seq0 caption="Lenght" enum="1""2""3" default=0 endparam param pcc1 caption="Factor 1" default=(0.0,0.0) endparam param pcc3 caption="Factor 2" default=(0.0,0.0) endparam param pcc2 caption="Factor 3" default=(1.0,0.0) endparam param pcc4 caption="Factor 4" default=(1.0,0.0) endparam func fnc1 caption="Func. Factor 1" default=ident() endfunc func fnc2 caption="Func. Factor 2" default=ident() endfunc Heading caption="HyperComplex Section" Endheading param hyp1 caption="Hyper" default=(0.0,0.0) endparam param hyp2 caption="JuliaDim" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Scenario" Endheading param seq2 caption="Scenario" enum="Modulation""First Scenario""Second Scenario" default=1 endparam param modby2 caption="Mod By" default=10 visible = (@seq2=="Modulation") endparam param modcomp caption="Mod Compare" default=5 visible = (@seq2=="Modulation") endparam Heading caption="Z Degree" Endheading Heading caption="----------First Scenario----------" visible=(@seq2!=2) Endheading param pz1 caption="1° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz2 caption="2° degree" default=(1.0,0.0) visible=(@seq2!=2) endparam param pz3 caption="3° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz4 caption="4° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz5 caption="5° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz6 caption="6° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz7 caption="7° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz8 caption="8° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz9 caption="9° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam param pz10 caption="10° degree" default=(0.0,0.0) visible=(@seq2!=2) endparam Heading caption="----------Second Scenario----------" visible=(@seq2!=1) Endheading param pz11 caption="1° degree" default=(0.5,0.0) visible=(@seq2!=1) endparam param pz12 caption="2° degree" default=(1.0,0.0) visible=(@seq2!=1) endparam param pz13 caption="3° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam param pz14 caption="4° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam param pz15 caption="5° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam param pz16 caption="6° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam param pz17 caption="7° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam param pz18 caption="8° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam param pz19 caption="9° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam param pz20 caption="10° degree" default=(0.0,0.0) visible=(@seq2!=1) endparam Heading caption="Distortion Degree" Endheading param seq1 caption="Distortion Lenght" enum="1""2""3" default=0 endparam Heading caption="First Factors" Endheading param pgz1 caption="Fact.1 1° degree" default=(0.0,0.0) endparam param pgz2 caption="Fact.1 2° degree" default=(0.0,0.0) endparam param pgz3 caption="Fact.1 3° degree" default=(0.0,0.0) endparam param pgz4 caption="Fact.1 4° degree" default=(0.0,0.0) endparam param pgz5 caption="Fact.1 5° degree" default=(0.0,0.0) endparam param pgz6 caption="Fact.1 6° degree" default=(0.0,0.0) endparam param pgz7 caption="Fact.1 7° degree" default=(0.0,0.0) endparam param pgz8 caption="Fact.1 8° degree" default=(0.0,0.0) endparam param pgz9 caption="Fact.1 9° degree" default=(0.0,0.0) endparam param pgz10 caption="Fact.1 10° degree" default=(0.0,0.0) endparam Heading caption="Second Factors" Endheading param pgz11 caption="Fact.2 1° degree" default=(0.0,0.0) endparam param pgz12 caption="Fact.2 2° degree" default=(0.0,0.0) endparam param pgz13 caption="Fact.2 3° degree" default=(0.0,0.0) endparam param pgz14 caption="Fact.2 4° degree" default=(0.0,0.0) endparam param pgz15 caption="Fact.2 5° degree" default=(0.0,0.0) endparam param pgz16 caption="Fact.2 6° degree" default=(0.0,0.0) endparam param pgz17 caption="Fact.2 7° degree" default=(0.0,0.0) endparam param pgz18 caption="Fact.2 8° degree" default=(0.0,0.0) endparam param pgz19 caption="Fact.2 9° degree" default=(0.0,0.0) endparam param pgz20 caption="Fact.2 10° degree" default=(0.0,0.0) endparam Heading caption="C Parameters" Endheading param pc1 caption="Mult. C param." default=(1.0,0.0) endparam param pc2 caption="Add. C param." default=(0.0,0.0) endparam Heading caption="Final Parameters" Endheading Heading caption="----------First Scenario----------" visible=(@seq2!=2) Endheading param glo1 caption="Param. 1" default=(1.0,1.0) visible=(@seq2!=2) endparam param glo2 caption="Param. 2" default=(1.0,1.0) visible=(@seq2!=2) endparam func fngloz1 caption="Func.Z" default=ident() visible=(@seq2!=2) endfunc func fngloc1 caption="Func.C" default=ident() visible=(@seq2!=2) endfunc Heading caption="----------Second Scenario----------" visible=(@seq2!=1) Endheading param glo3 caption="Param. 1" default=(1.0,1.0) visible=(@seq2!=1) endparam param glo4 caption="Param. 2" default=(1.0,1.0) visible=(@seq2!=1) endparam func fngloz2 caption="Func.Z" default=ident() visible=(@seq2!=1) endfunc func fngloc2 caption="Func.C" default=ident() visible=(@seq2!=1) endfunc Heading caption="Functions Global" Endheading func fnz caption="Func.Z" default=ident() endfunc func fnc caption="Func.C" default=ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperPolinomialSet" bailout=@bailout @seed=#pixel rotx=@rotx roty=@roty rotw=@rotw rotwy=@rotwy rotz=@rotz seq0=@seq0 seq1=@seq1 seq2=@seq2 modby2=@modby2 modcomp=@modcomp hyp1=@hyp1 hyp2=@hyp2 flav1=@flav1 flav2=@flav2 fnflav=@fnflav pz1=@pz1 pz2=@pz2 pz3=@pz3 pz4=@pz4 pz5=@pz5 pz6=@pz6 pz7=@pz7 pz8=@pz8 pz9=@pz9 pz10=@pz10 pz11=@pz11 pz12=@pz12 pz13=@pz13 pz14=@pz14 pz15=@pz15 pz16=@pz16 pz17=@pz17 pz18=@pz18 pz19=@pz19 pz20=@pz20 pgz1=@pgz1 pgz2=@pgz2 pgz3=@pgz3 pgz4=@pgz4 pgz5=@pgz5 pgz6=@pgz6 pgz7=@pgz7 pgz8=@pgz8 pgz9=@pgz9 pgz10=@pgz10 pgz11=@pgz11 pgz12=@pgz12 pgz13=@pgz13 pgz14=@pgz14 pgz15=@pgz15 pgz16=@pgz16 pgz17=@pgz17 pgz18=@pgz18 pgz19=@pgz19 pgz20=@pgz20 pc1=@pc1 pc2=@pc2 pcc1=@pcc1 pcc2=@pcc2 pcc3=@pcc3 pcc4=@pcc4 glo1=@glo1 glo2=@glo2 glo3=@glo3 glo4=@glo4 fnz=@fnz fnc=@fnc fnc1=@fnc1 fnc2=@fnc2 fngloz1=@fngloz1 fngloz2=@fngloz2 fngloc1=@fngloc1 fngloc2=@fngloc2 version=@version mode=@switchmode switchmode=@mode offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeMixedQuatMandelbrot { ; Based on formulae of QuatMan in orgform collection _q.ufm ; The basics formulas are in orgform _q.frm: ; QuatMan_zw(ORIGIN) {; 4-dimensional M-Set ; cz = z = p1 ; cw = w = pixel ; qz = sqr(z) ; qw = sqr(w): ; tz = qz - qw + cz ; tw = 2*z*w + cw ; z = tz ; w = tw ; qz = sqr(z) ; qw = sqr(w) ; |z| + |w| < 64 ;SOURCE: 97msg.frm ;} ; The init Section defines z cz w cw unifying the q sets in orgform and after play with real and imag parts mixed between them ; added rotations and the result of z cz w cw is mixed in standard real+imag or hypercomplex definitions ; or mixed realZ+imagW etc... ; Andrea Spinozzi(Giugno 2022) Init: z1 = z2 = z3 = (0.0,0.0) w1 = w2 = w3 = (0.0,0.0) ;---------------------For C Sequence-------------------------------------------- int modby=@seq+2 int iter=0 ;----------------------Initialize the Slope parameters and vectors-------------- int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 ;-------------------Define z cz w cw-------------------------------------------- if (@selectInit == 0) if (@mode=="mandelbrot");ZW zz1 = p1 zz2 = p1 zz3 = p1 cz1 = p1 cz2 = p1 cz3 = p1 ww1 = @fn1Init(#pixel) ww2 = @fn1Init(#pixel) + @offset ww3 = @fn1Init(#pixel) + flip(@offset) cw1 = #pixel cw2 = #pixel + @offset cw3 = #pixel + flip(@offset) elseif (@mode=="julia") zz1 = p2 zz2 = p2 zz3 = p2 cz1 = p1 cz2 = p1 cz3 = p1 ww1 = @fn1Init(#pixel) ww2 = @fn1Init(#pixel) + @offset ww3 = @fn1Init(#pixel) + flip(@offset) cw1 = @seed cw2 = @seed cw3 = @seed endif elseif (@selectInit == 1);XY if (@mode=="mandelbrot") zz1 = @fn1Init(#pixel) zz2 = @fn1Init(#pixel)+@offset zz3 = @fn1Init(#pixel)+flip(@offset) cz1 = #pixel cz2 = #pixel+@offset cz3 = #pixel+flip(@offset) ww1 = p1 ww2 = p1 ww3 = p1 cw1 =p1 cw2 =p1 cw3 =p1 elseif (@mode=="julia") zz1 = @fn1Init(#pixel) zz2 = @fn1Init(#pixel)+@offset zz3 = @fn1Init(#pixel)+flip(@offset) cz1 = @seed cz2 = @seed cz3 = @seed ww1 = p2 ww2 = p2 ww3 = p2 cw1 = p1 cw2 = p1 cw3 = p1 endif elseif (@selectInit == 2);XW if (@mode=="mandelbrot") zz1 = (0.0,0.0) zz2 = (0.0,0.0) zz3 = (0.0,0.0) ww1 = (0.0,0.0) ww2 = (0.0,0.0) ww3 = (0.0,0.0) cz1 = real(@fn1Init(#pixel)) + flip(real(@p1)) cz2 = real(@fn1Init(#pixel) + @offset) + flip(real(@p1)) cz3 = real(@fn1Init(#pixel) + flip(@offset)) + flip(real(@p1)) cw1 = imag(@p1) + flip(imag(@fn2Init(#pixel))) cw2 = imag(@p1) + flip(imag(@fn2Init(#pixel) + @offset)) cw3 = imag(@p1) + flip(imag(@fn2Init(#pixel) + flip(@offset))) elseif (@mode=="julia") zz1 = real(@fn1Init(#pixel)) + flip(real(@p1)) zz2 = real(@fn1Init(#pixel) + @offset) + flip(real(@p1)) zz3 = real(@fn1Init(#pixel) + flip(@offset)) + flip(real(@p1)) ww1 = imag(@p1) + flip(imag(@fn2Init(#pixel))) ww2 = imag(@p1) + flip(imag(@fn2Init(#pixel) + @offset)) ww3 = imag(@p1) + flip(imag(@fn2Init(#pixel) + flip(@offset))) cz1 = @seed cz2 = @seed cz3 = @seed cw1 = p2 cw2 = p2 cw3 = p2 endif elseif (@selectInit == 3);YZ if (@mode=="Mandelbrot") zz1 = (0.0,0.0) zz2 = (0.0,0.0) zz3 = (0.0,0.0) ww1 = (0.0,0.0) ww2 = (0.0,0.0) ww3 = (0.0,0.0) cz1 = real(@p1) + flip(real(@fn1Init(#pixel))) cz2 = real(@p1) + flip(real(@fn1Init(#pixel) + @offset)) cz3 = real(@p1) + flip(real(@fn1Init(#pixel) + flip(@offset))) cw1= imag(@fn2Init(#pixel)) + flip(imag(@p1)) cw2= imag(@fn2Init(#pixel) + @offset) + flip(imag(@p1)) cw3= imag(@fn2Init(#pixel) + flip(@offset)) + flip(imag(@p1)) elseif (@mode=="Julia") zz1 = real(@p1) + flip(real(@fn1Init(#pixel))) zz2 = real(@p1) + flip(real(@fn1Init(#pixel) + @offset)) zz3 = real(@p1) + flip(real(@fn1Init(#pixel) + flip(@offset))) ww1 = imag(@fn2Init(#pixel)) + flip(imag(@p1)) ww2 = imag(@fn2Init(#pixel) + @offset) + flip(imag(@p1)) ww3 = imag(@fn2Init(#pixel) + flip(@offset)) + flip(imag(@p1)) cz1 = @seed cz2 = @seed cz3 = @seed cw1 = p2 cw2 = p2 cw3 = p2 endif endif ;----------------Slip z cz w cw in real and image part change planes------------ if (@planevar==0) czr1 = real(cz1) czr2 = real(cz2) czr3 = real(cz3) czi1 = imag(cz1) czi2 = imag(cz2) czi3 = imag(cz3) cwr1 = real(cw1) cwr2 = real(cw2) cwr3 = real(cw3) cwi1 = imag(cw1) cwi2 = imag(cw2) cwi3 = imag(cw3) zr1 = real(zz1) zr2 = real(zz2) zr3 = real(zz3) zi1 = imag(zz1) zi2 = imag(zz2) zi3 = imag(zz3) wr1 = real(ww1) wr2 = real(ww2) wr3 = real(ww3) wi1 = imag(ww1) wi2 = imag(ww2) wi3 = imag(ww3) elseif (@planevar==1) czr1 = real(cw1) czr2 = real(cw2) czr3 = real(cw3) czi1 = imag(cw1) czi2 = imag(cw2) czi3 = imag(cw3) cwr1 = real(cz1) cwr2 = real(cz2) cwr3 = real(cz3) cwi1 = imag(cz1) cwi2 = imag(cz2) cwi3 = imag(cz3) zr1 = real(ww1) zr2 = real(ww2) zr3 = real(ww3) zi1 = imag(ww1) zi2 = imag(ww2) zi3 = imag(ww3) wr1 = real(zz1) wr2 = real(zz2) wr3 = real(zz3) wi1 = imag(zz1) wi2 = imag(zz2) wi3 = imag(zz3) elseif (@planevar==2) czr1 = real(cz1) czr2 = real(cz2) czr3 = real(cz3) czi1 = imag(cw1) czi2 = imag(cw2) czi3 = imag(cw3) cwr1 = real(cw1) cwr2 = real(cw2) cwr3 = real(cw3) cwi1 = imag(cz1) cwi2 = imag(cz2) cwi3 = imag(cz3) zr1 = real(zz1) zr2 = real(zz2) zr3 = real(zz3) zi1 = imag(ww1) zi2 = imag(ww2) zi3 = imag(ww3) wr1 = real(ww1) wr2 = real(ww2) wr3 = real(ww3) wi1 = imag(zz1) wi2 = imag(zz2) wi3 = imag(zz3) elseif (@planevar==3) czr1 = real(cw1) czr2 = real(cw2) czr3 = real(cw3) czi1 = imag(cz1) czi2 = imag(cz2) czi3 = imag(cz3) cwr1 = real(cz1) cwr2 = real(cz2) cwr3 = real(cz3) cwi1 = imag(cw1) cwi2 = imag(cw2) cwi3 = imag(cw3) zr1 = real(ww1) zr2 = real(ww2) zr3 = real(ww3) zi1 = imag(zz1) zi2 = imag(zz2) zi3 = imag(zz3) wr1 = real(zz1) wr2 = real(zz2) wr3 = real(zz3) wi1 = imag(ww1) wi2 = imag(ww2) wi3 = imag(ww3) endif ;-----------------------------Rotations----------------------------------------- ry1 = czi1*cos(#pi*@rotx/180) - cwr1*sin(#pi*@rotx/180) ry2 = czi2*cos(#pi*@rotx/180) - cwr2*sin(#pi*@rotx/180) ry3 = czi3*cos(#pi*@rotx/180) - cwr3*sin(#pi*@rotx/180) rz1 = czi1*sin(#pi*@rotx/180) + cwr1*cos(#pi*@rotx/180) rz2 = czi2*sin(#pi*@rotx/180) + cwr2*cos(#pi*@rotx/180) rz3 = czi3*sin(#pi*@rotx/180) + cwr3*cos(#pi*@rotx/180) czi1 = ry1 czi2 = ry2 czi3 = ry3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xz plane rotation)-------------------------------- rx1 = cwr1*sin(#pi*@roty/180) + czr1*cos(#pi*@roty/180) rx2 = cwr2*sin(#pi*@roty/180) + czr2*cos(#pi*@roty/180) rx3 = cwr3*sin(#pi*@roty/180) + czr3*cos(#pi*@roty/180) rz1 = cwr1*cos(#pi*@roty/180) - czr1*sin(#pi*@roty/180) rz2 = cwr2*cos(#pi*@roty/180) - czr2*sin(#pi*@roty/180) rz3 = cwr3*cos(#pi*@roty/180) - czr3*sin(#pi*@roty/180) czr1 = rx1 czr2 = rx2 czr3 = rx3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xy plane rotation)-------------------------------- rx1 = czr1*cos(#pi*@rotz/180) - czi1*sin(#pi*@rotz/180) rx2 = czr2*cos(#pi*@rotz/180) - czi2*sin(#pi*@rotz/180) rx3 = czr3*cos(#pi*@rotz/180) - czi3*sin(#pi*@rotz/180) ry1 = czr1*sin(#pi*@rotz/180) + czi1*cos(#pi*@rotz/180) ry2 = czr2*sin(#pi*@rotz/180) + czi2*cos(#pi*@rotz/180) ry3 = czr3*sin(#pi*@rotz/180) + czi3*cos(#pi*@rotz/180) czr1 = rx1 czr2 = rx2 czr3 = rx3 czi1 = ry1 czi2 = ry2 czi3 = ry3 ;----------------------------(xw plane rotation)-------------------------------- rx1 = czr1*sin(#pi*@rotw/180)+cwi1*cos(#pi*@rotw/180) rx2 = czr2*sin(#pi*@rotw/180)+cwi2*cos(#pi*@rotw/180) rx3 = czr3*sin(#pi*@rotw/180)+cwi3*cos(#pi*@rotw/180) rw1 = czr1*cos(#pi*@rotw/180)-cwi1*sin(#pi*@rotw/180) rw2 = czr2*cos(#pi*@rotw/180)-cwi2*sin(#pi*@rotw/180) rw3 = czr3*cos(#pi*@rotw/180)-cwi3*sin(#pi*@rotw/180) cwi1 = rx1 cwi2 = rx2 cwi3 = rx3 czr1 = rw1 czr2 = rw2 czr3 = rw3 ;-------------------------(yw plane rotation)----------------------------------- rx1 = czi1*sin(#pi*@rotwy/180)+cwi1*cos(#pi*@rotwy/180) rx2 = czi2*sin(#pi*@rotwy/180)+cwi2*cos(#pi*@rotwy/180) rx3 = czi3*sin(#pi*@rotwy/180)+cwi3*cos(#pi*@rotwy/180) rw1 = czi1*cos(#pi*@rotwy/180)-cwi1*sin(#pi*@rotwy/180) rw2 = czi2*cos(#pi*@rotwy/180)-cwi2*sin(#pi*@rotwy/180) rw3 = czi3*cos(#pi*@rotwy/180)-cwi3*sin(#pi*@rotwy/180) cwi1 = rx1 cwi2 = rx2 cwi3 = rx3 czi1 = rw1 czi2 = rw2 czi3 = rw3 if (@mode=="julia");-------------Julia Rotations------------------------------- ;----------------------------(yz plane rotation)-------------------------------- ry1 = zi1*cos(#pi*@rotx/180) - wr1*sin(#pi*@rotx/180) ry2 = zi2*cos(#pi*@rotx/180) - wr2*sin(#pi*@rotx/180) ry3 = zi3*cos(#pi*@rotx/180) - wr3*sin(#pi*@rotx/180) rz1 = zi1*sin(#pi*@rotx/180) + wr1*cos(#pi*@rotx/180) rz2 = zi2*sin(#pi*@rotx/180) + wr2*cos(#pi*@rotx/180) rz3 = zi3*sin(#pi*@rotx/180) + wr3*cos(#pi*@rotx/180) zi1 = ry1 zi2 = ry2 zi3 = ry3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;-------------------------(xz plane rotation)----------------------------------- rx1 = wr1*sin(#pi*@roty/180) + zr1*cos(#pi*@roty/180) rx2 = wr2*sin(#pi*@roty/180) + zr2*cos(#pi*@roty/180) rx3 = wr3*sin(#pi*@roty/180) + zr3*cos(#pi*@roty/180) rz1 = wr1*cos(#pi*@roty/180) - zr1*sin(#pi*@roty/180) rz2 = wr2*cos(#pi*@roty/180) - zr2*sin(#pi*@roty/180) rz3 = wr3*cos(#pi*@roty/180) - zr3*sin(#pi*@roty/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;---------------------(xy plane rotation)--------------------------------------- rx1 = zr1*cos(#pi*@rotz/180) - zi1*sin(#pi*@rotz/180) rx2 = zr2*cos(#pi*@rotz/180) - zi2*sin(#pi*@rotz/180) rx3 = zr3*cos(#pi*@rotz/180) - zi3*sin(#pi*@rotz/180) ry1 = zr1*sin(#pi*@rotz/180) + zi1*cos(#pi*@rotz/180) ry2 = zr2*sin(#pi*@rotz/180) + zi2*cos(#pi*@rotz/180) ry3 = zr3*sin(#pi*@rotz/180) + zi3*cos(#pi*@rotz/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 zi1 = ry1 zi2 = ry2 zi3 = ry3 ;---------------------(xw plane rotation)--------------------------------------- rx1 = zr1*sin(#pi*@rotw/180)+wi1*cos(#pi*@rotw/180) rx2 = zr2*sin(#pi*@rotw/180)+wi2*cos(#pi*@rotw/180) rx3 = zr3*sin(#pi*@rotw/180)+wi3*cos(#pi*@rotw/180) rw1 = zr1*cos(#pi*@rotw/180)-wi1*sin(#pi*@rotw/180) rw2 = zr2*cos(#pi*@rotw/180)-wi2*sin(#pi*@rotw/180) rw3 = zr3*cos(#pi*@rotw/180)-wi3*sin(#pi*@rotw/180) wi1 = rx1 wi2 = rx2 wi3 = rx3 zr1 = rw1 zr2 = rw2 zr3 = rw3 ;---------------------(yw plane rotation)--------------------------------------- rx1 = zi1*sin(#pi*@rotwy/180)+wi1*cos(#pi*@rotwy/180) rx2 = zi2*sin(#pi*@rotwy/180)+wi2*cos(#pi*@rotwy/180) rx3 = zi3*sin(#pi*@rotwy/180)+wi3*cos(#pi*@rotwy/180) rw1 = zi1*cos(#pi*@rotwy/180)-wi1*sin(#pi*@rotwy/180) rw2 = zi2*cos(#pi*@rotwy/180)-wi2*sin(#pi*@rotwy/180) rw3 = zi3*cos(#pi*@rotwy/180)-wi3*sin(#pi*@rotwy/180) wi1 = rx1 wi2 = rx2 wi3 = rx3 zi1 = rw1 zi2 = rw2 zi3 = rw3 endif ;Mixes real and image part in results---------------------------------------- if (@planeRotation == 0) cz1 = czr1+flip(czi1) cz2 = czr2+flip(czi2) cz3 = czr3+flip(czi3) cw1 = cwr1+flip(cwi1) cw2 = cwr2+flip(cwi2) cw3 = cwr3+flip(cwi3) zz1 = zr1+flip(zi1) zz2 = zr2+flip(zi2) zz3 = zr3+flip(zi3) ww1 = wr1+flip(wi1) ww2 = wr2+flip(wi2) ww3 = wr3+flip(wi3) elseif (@planeRotation==1) cz1 = czr1-cwi1+flip(czi1+cwr1) cz2 = czr2-cwi2+flip(czi2+cwr2) cz3 = czr3-cwi3+flip(czi3+cwr3) cw1 = czr1+cwi1+flip(czi1-cwr1) cw2 = czr2+cwi2+flip(czi2-cwr2) cw3 = czr3+cwi3+flip(czi3-cwr3) zz1 = zr1-wi1+flip(zi1+wr1) zz2 = zr2-wi2+flip(zi2+wr2) zz3 = zr3-wi3+flip(zi3+wr3) ww1 = zr1+wi1+flip(zi1-wr1) ww2 = zr2+wi2+flip(zi2-wr2) ww3 = zr3+wi3+flip(zi3-wr3) elseif (@planeRotation==2) cz1 = czr1+flip(cwi1) cz2 = czr2+flip(cwi2) cz3 = czr3+flip(cwi3) cw1 = cwr1+flip(czi1) cw2 = cwr2+flip(czi2) cw3 = cwr3+flip(czi3) zz1 = zr1+flip(wi1) zz2 = zr2+flip(wi2) zz3 = zr3+flip(wi3) ww1 = wr1+flip(zi1) ww2 = wr2+flip(zi2) ww3 = wr3+flip(zi3) endif ;Quat Rules qz1 = sqr(fn1(zz1)) qz2 = sqr(fn1(zz2)) qz3 = sqr(fn1(zz3)) qw1 = sqr(fn1(ww1)) qw2 = sqr(fn1(ww2)) qw3 = sqr(fn1(ww3)) Loop: ;C sequence--------------------------------------------------------------------- int method=iter%modby ca1 = @fnc0(cz1) ca2 = @fnc0(cz2) ca3 = @fnc0(cz3) cb1 = @fnc0(cw1) cb2 = @fnc0(cw2) cb3 = @fnc0(cw3) if method==0 cca1 = (@fnc1(ca1)+@pc3)*@pc1 cca2 = (@fnc1(ca2)+@pc3)*@pc1 cca3 = (@fnc1(ca3)+@pc3)*@pc1 ccb1 = (@fnc1(cb1)+@pc3)*@pc1 ccb2 = (@fnc1(cb2)+@pc3)*@pc1 ccb3 = (@fnc1(cb3)+@pc3)*@pc1 elseif method==1 cca1 = (@fnc2(ca1)+@pc4)*@pc2 cca2 = (@fnc2(ca2)+@pc4)*@pc2 cca3 = (@fnc2(ca3)+@pc4)*@pc2 ccb1 = (@fnc2(cb1)+@pc4)*@pc2 ccb2 = (@fnc2(cb2)+@pc4)*@pc2 ccb3 = (@fnc2(cb3)+@pc4)*@pc2 endif ;--------------------------Quat Loop-------------------------------------------- tz1 = fn2(qz1-qw1)+cca1 tz2 = fn2(qz2-qw2)+cca2 tz3 = fn2(qz3-qw3)+cca3 tw1 = fn2(2*zz1*ww1)+ccb1 tw2 = fn2(2*zz2*ww2)+ccb2 tw3 = fn2(2*zz3*ww3)+ccb3 zz1 = fn3(tz1)*@mult+p3 zz2 = fn3(tz2)*@mult+p3 zz3 = fn3(tz3)*@mult+p3 ww1 = fn3(tw1)*@mult+p4 ww2 = fn3(tw2)*@mult+p4 ww3 = fn3(tw3)*@mult+p4 qz1 = sqr(fn4(zz1)) qz2 = sqr(fn4(zz2)) qz3 = sqr(fn4(zz3)) qw1 = sqr(fn4(ww1)) qw2 = sqr(fn4(ww2)) qw3 = sqr(fn4(ww3)) if (@finalFlavor == 0) z1 = @fnFlv1(zz1)*@flv1 z2 = @fnFlv1(zz2)*@flv1 z3 = @fnFlv1(zz3)*@flv1 elseif (@finalFlavor == 1) z1 = @fnFlv1(zz1)*@flv1+@flv2+flip(ww1) z2 = @fnFlv1(zz2)*@flv1+@flv2+flip(ww2) z3 = @fnFlv1(zz3)*@flv1+@flv2+flip(ww3) elseif (@finalFlavor == 2) z1 = @fnFlv1(qz1)*@flv1+@flv2 z2 = @fnFlv1(qz2)*@flv1+@flv2 z3 = @fnFlv1(qz3)*@flv1+@flv2 elseif (@finalFlavor == 3) z1 = @fnFlv1(qz1)*@flv1+@flv2+flip(qw1) z2 = @fnFlv1(qz2)*@flv1+@flv2+flip(qw2) z3 = @fnFlv1(qz3)*@flv1+@flv2+flip(qw3) endif ;----------------Start the loop slope section----------------------------------- done = done + 1; increment iteration counter if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zz1| + |ww1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else z = z1 endif if ( @bailout < |zz1| + |ww1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done>0 Default: Title = "SlopeMixedQuatMandelbrot" center = (0.0,0.0) magn = 1.0 angle = 0 method = multipass periodicity = 0 maxiter = 250 Heading caption = "Mandelbrot Mode" visible = @mode == 0 Endheading Heading caption = "Julia Mode" visible = @mode==1 Endheading param mode caption = "Current Mode" default = 0 enum = "Mandelbrot" "Julia" visible = false endparam param switchMode caption = "Switch Mode" default = 1 enum = "Mandelbrot" "Julia" visible = false endparam param bailout caption = "Bailout Value" default = 16.0 min = 0.0 endparam param seed caption = "Seed Value" default = (0.0,0.0) visible = (@mode=="Julia") endparam Heading caption = "Flavor" show=false Endheading param finalFlavor caption = "Final Flavor" default = 0 enum = "z""z+flip(w)""qz""qz+flip(qw)" endparam param flv1 caption = "Flavor 1" default = (1.0,0.0) endparam param flv2 caption = "Flavor 2" default = (0.0,0.0) endparam func fnFlv1 caption = "Function Flavor" default = ident() endfunc Heading caption="Slope Parameters" show=false Endheading float param offset caption = "Orbit Separation" default = 1.0e-8 hint= "Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." endparam param zmode caption = "Height Value" default = 85 enum = "smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint = "Specifies what will be used to construct a height value." endparam func fnsl caption = "Transmute Function" default = ident() visible = (@zmode==5) || (@zmode==6) endfunc param a caption = "Polar Parameter 1" default = 3.0 visible = (@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84) endparam param b caption = "Polar Parameter 2" default = 3.0 visible = (@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82) endparam param cp caption = "3rd Polar parameter" default = 0.05 visible = (@zmode==81) endparam param pn caption = "Polar Integer" default = 3 visible = (@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84) endparam param apwr caption = "Polar Power" default = (3.0,3.0) visible = (@zmode==15)||(@zmode==26)||(@zmode==58) endparam func afn1 caption = "Polar Fn 1" default = cos() visible = (@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc func afn2 caption = "Polar Fn 2" default = sin() visible = (@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) endfunc param sa1 caption = "Adjuster 1" default = 1.0 visible = (@zmode==65)||(@zmode==68) endparam param sa2 caption = "Adjuster 2" default = 1.0 visible = (@zmode==65)||(@zmode==68) endparam param sa3 caption = "Adjuster 3" default = 1.0 visible = (@zmode==68) endparam param sa4 caption = "Adjuster 4" default = 1.0 visible = (@zmode==68) endparam param sa5 caption = "Adjuster 5" default = 1.0 visible = (@zmode==68) endparam param sa6 caption = "Adjuster 6" default = 1.0 visible = (@zmode==68) endparam param sa7 caption = "Adjuster 7" default = 1.0 visible = (@zmode==68) endparam func safn caption = "Adjuster Fn" default = ident() visible = (@zmode==65)||(@zmode==68) endfunc param negroot caption = "Quad Neg Root" default = false visible = (@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75) endparam param xfer caption = "Height Transfer" default = 0 enum = "linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint = "This function will be applied to the height value \ before a slope is calculated." endparam param zscale caption = "Height Pre-Scale" default = 1.0 hint = "Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." endparam param zscale2 caption = "Height Post-Scale" default = 0.025 hint = "Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." endparam param everyiter caption = "Every Iteration" default = false hint = "If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." endparam Heading caption = "C Sequence" show=false Endheading param seq caption = "Lenght" enum = "1""2""3" default = 0 endparam param pc1 caption = "Factor 1" default = (1.0,0.0) endparam param pc2 caption = "Factor 2" default = (1.0,0.0) endparam param pc3 caption = "Factor 3" default = (0.0,0.0) endparam param pc4 caption = "Factor 4" default = (0.0,0.0) endparam func fnc1 caption = "Function Factor 1" default = ident() endfunc func fnc2 caption = "Function Factor 2" default = ident() endfunc Heading caption = "Rotations and Init Sections" Endheading param selectInit caption = "Select Method" default = 0 enum = "zw""xy""xw""yz" endparam param planevar caption = "Variation Plane" enum = "xy""zw""xw""yz" default = 0 endparam param planeRotation caption = "Mixed Complex Rotate" enum = "Deafult""HyperComplex Mixed""Mixed One" default = 0 endparam param p1 caption = "Hyper Complex" default = (0.0,0.0) endparam param p2 caption = "Julia Dimension" default = (0.0,0.0) visible = (@mode=="Julia") endparam param rotx caption = "Rotation YZ" default = 0 min = -360 max = 360 endparam param roty caption = "Rotation XZ" default = 0 min = -360 max = 360 endparam param rotw caption = "Rotation XW" default = 0 min = -360 max = 360 endparam param rotwy caption = "Rotation YW" default = 0 min = -360 max = 360 endparam param rotz caption = "Rotation XY" default = 0 min = -360 max = 360 endparam func fn1Init caption = "Function 1" default = ident() endfunc func fn2Init caption = "Function 2" default = ident() visible = (@selectInit == 2 || @selectInit == 3) endfunc Heading caption = "Operators and Parameters" Endheading param p3 caption = "Parameter 1" default = (0.0,0.0) endparam param p4 caption = "Parameter 2" default = (0.0,0.0) endparam param mult caption = "Multiply" default = (1.0,0.0) endparam Heading caption = "Functions" Endheading func fnc0 caption = "Function C" default = ident() endfunc func fn1 caption = "Function 1" default = ident() endfunc func fn2 caption = "Function 2" default = ident() endfunc func fn3 caption = "Function 3" default = ident() endfunc func fn4 caption = "Function 4" default = ident() endfunc param version caption = "Version" default = 1.0 visible = false endparam Switch: type = "SlopeMixedQuatMandelbrot" bailout = @bailout @seed = #pixel selectInit = @selectInit finalFlavor = @finalFlavor fnFlv1 = @fnFlv1 flv1 = @flv1 flv2 = @flv2 fn1Init = @fn1Init fn2Init = @fn2Init p1 = @p1 p2 = @p2 p3 = @p3 p4 = @p4 fn1 = @fn1 fn2 = @fn2 fn3 = @fn3 fn4 = @fn4 seq = @seq pc1 = @pc1 pc2 = @pc2 pc3 = @pc3 pc4 = @pc4 fnc0 = @fnc0 fnc1 = @fnc1 fnc2 = @fnc2 fnc3 = @fnc3 rotx = @rotx roty = @roty rotw = @rotw rotz = @rotz rotwy = @rotwy mult = @mult planevar = @planevar planeRotation = @planeRotation mode = @switchmode switchmode = @mode version = @version offset = @offset zmode = @zmode xfer = @xfer zscale = @zscale zscale2 = @zscale2 everyiter = @everyiter a = @a b = @b apwr = @apwr pn = @pn afn1 = @afn1 afn2 = @afn2 fnsl = @fnsl sa1 = @sa1 sa2 = @sa2 sa3 = @sa3 sa4 = @sa4 sa5 = @sa5 sa6 = @sa6 sa7 = @sa7 safn = @safn negroot = @negroot cp = @cp } SlopeTMan { ; Variation of TMan of Russell Walsmith. ; c1=real(pixel),c2=imag(pixel),c3=p1 ; z1=z2=z3=0: ; t1=z1*z1+2*z2*z3 ; t2=z3*z3+2*z1*z2 ; t3=z2*z2+2*z3*z1 ; z1=t1+c1 ; z2=t2-c2*c2 ; z3=t3+c3 ; z=z1+z2+z3 ; |z| < 8 ; ORGFORM Collection Russell_Walsmith.frm TMan.ufm ; Use the flavor section to change how ucl works. ; Uploaded version July 2022: ; Added a Triternion Mandelbrot Set ; Use Triternion 2 in Select Formula and cr|ci|ck in Select C after Phoenix Distortion = (0.5,0.0) ; And you have Phoenix. ; Andrea Spinozzi(March2006) - Fixed and rewrited(June2022-July2022) Init: z1=z2=z3=0.0 zr1=@rot1*real(@startseed) zr2=@rot1*real(@startseed) zr3=@rot1*real(@startseed) zi1=@rot2+imag(@startseed)*@rot1 zi2=@rot2+imag(@startseed)*@rot1 zi3=@rot2+imag(@startseed)*@rot1 zk1=zk2=zk3=0.0 cr1=@rot1*real(#pixel) cr2=@rot1*real(#pixel+@offset) cr3=@rot1*real(#pixel+flip(@offset)) ci1=@rot2+imag(#pixel)*@rot1 ci2=@rot2+imag(#pixel+@offset)*@rot1 ci3=@rot2+imag(#pixel+flip(@offset))*@rot1 ck1=ck2=ck3=p1 if (@mode=="Julia");--------------------Julia Mode--------------------------- zr1=@rot1*real(#pixel) zr2=@rot1*real(#pixel+@offset) zr3=@rot1*real(#pixel+flip(@offset)) zi1=@rot2+imag(#pixel)*@rot1 zi2=@rot2+imag(#pixel+@offset)*@rot1 zi3=@rot2+imag(#pixel+flip(@offset))*@rot1 zk1=zk2=zk3=p2 cr1=@rot1*real(@startseed) cr2=@rot1*real(@startseed) cr3=@rot1*real(@startseed) ci1=@rot2+imag(@startseed)*@rot1 ci2=@rot2+imag(@startseed)*@rot1 ci3=@rot2+imag(@startseed)*@rot1 endif ;---------------------------Select Plane Variation------------------------------ if (@variation==0) zr1=zr1 zr2=zr2 zr3=zr3 zi1=zi1 zi2=zi2 zi3=zi3 cr1=cr1 cr2=cr2 cr3=cr3 ci1=ci1 ci2=ci2 ci3=ci3 elseif(@variation==1) zr1=flip(zr1) zr2=flip(zr2) zr3=flip(zr3) zi1=flip(zi1) zi2=flip(zi2) zi3=flip(zi3) cr1=flip(cr1) cr2=flip(cr2) cr3=flip(cr3) ci1=flip(ci1) ci2=flip(ci2) ci3=flip(ci3) elseif(@variation==2) zr1=zr1 zr2=zr2 zr3=zr3 zi1=flip(zi1) zi2=flip(zi2) zi3=flip(zi3) cr1=cr1 cr2=cr2 cr3=cr3 ci1=flip(ci1) ci2=flip(ci2) ci3=flip(ci3) elseif(@variation==3) zr1=flip(zr1) zr2=flip(zr2) zr3=flip(zr3) zi1=zi1 zi2=zi2 zi3=zi3 cr1=flip(cr1) cr2=flip(cr2) cr3=flip(cr3) ci1=ci1 ci2=ci2 ci3=ci3 endif ;;; slope stuff int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 ;---------------Init C Sequence------------------------------------------------- int iter=0 int modby=@seq+2 Loop: ;------------------Define Iteration for C Sequence------------------------------ int method=iter%modby ;-------------------------Factors for C Sequence ------------------------------- if (method==0) cr11 = @fnfact1(cr1)*@fact1+real(@fact2) cr12 = @fnfact1(cr2)*@fact1+real(@fact2) cr13 = @fnfact1(cr3)*@fact1+real(@fact2) ci11 = @fnfact1(ci1)*@fact1+imag(@fact2) ci12 = @fnfact1(ci2)*@fact1+imag(@fact2) ci13 = @fnfact1(ci3)*@fact1+imag(@fact2) else cr11 = @fnfact2(cr1)*@fact3+real(@fact4) cr12 = @fnfact2(cr2)*@fact3+real(@fact4) cr13 = @fnfact2(cr3)*@fact3+real(@fact4) ci11 = @fnfact2(ci1)*@fact3+imag(@fact4) ci12 = @fnfact2(ci2)*@fact3+imag(@fact4) ci13 = @fnfact2(ci3)*@fact3+imag(@fact4) endif ;---------------------Loop TMAN Equation---------------------------------------- if (@selectTriternion==0) t11 = zr1 ^ 2 + 2 * zi1 * zk1 t12 = zr2 ^ 2 + 2 * zi2 * zk2 t13 = zr3 ^ 2 + 2 * zi3 * zk3 t21 = zk1 ^ 2 + 2 * zr1 * zi1 t22 = zk2 ^ 2 + 2 * zr2 * zi2 t23 = zk3 ^ 2 + 2 * zr3 * zi3 t31 = zi1 ^ 2 + 2 * zk1 * zr1 t32 = zi2 ^ 2 + 2 * zk2 * zr2 t33 = zi3 ^ 2 + 2 * zk3 * zr3 elseif (@selectTriternion==1) t11 = zr1 ^ 2 - zi1 ^ 2 - zk1 ^ 2 t12 = zr2 ^ 2 - zi2 ^ 2 - zk2 ^ 2 t13 = zr3 ^ 2 - zi3 ^ 2 - zk3 ^ 2 t21 = 2 * zr1 * zi1 t22 = 2 * zr2 * zi2 t23 = 2 * zr3 * zi3 t31 = 2 * zr1 * zk1 t32 = 2 * zr2 * zk2 t33 = 2 * zr3 * zk3 endif ;-------------------------Add Distortion Phoenix-------------------------------- t11 = t11 + @fndist1(ya1)*@mult t12 = t12 + @fndist1(ya2)*@mult t13 = t13 + @fndist1(ya3)*@mult t21 = t21 + @fndist2(yb1)*@mult t22 = t22 + @fndist2(yb2)*@mult t23 = t23 + @fndist2(yb3)*@mult t31 = t31 + @fndist3(yc1)*@mult t32 = t32 + @fndist3(yc2)*@mult t33 = t33 + @fndist3(yc3)*@mult ya1=@fndistr(zr1+@addr)*@mdistr ya2=@fndistr(zr2+@addr)*@mdistr ya3=@fndistr(zr3+@addr)*@mdistr yb1=@fndisti(zi1+@addi)*@mdisti yb2=@fndisti(zi2+@addi)*@mdisti yb3=@fndisti(zi3+@addi)*@mdisti yc1=@fndistk(zk1+@addk)*@mdistk yc2=@fndistk(zk2+@addk)*@mdistk yc3=@fndistk(zk3+@addk)*@mdistk ;------------------Add a Function and a Multiply-------------------------------- t11 = fn1(t11)*@mult1 t12 = fn1(t12)*@mult1 t13 = fn1(t13)*@mult1 t21 = fn2(t21)*@mult2 t22 = fn2(t22)*@mult2 t23 = fn2(t23)*@mult2 t31 = fn3(t31)*@mult3 t32 = fn3(t32)*@mult3 t33 = fn3(t33)*@mult3 ;---------------------Add cr,ci,ck on Set--------------------------------------- if (@selectC==0) zr1 = t11 + cr11 zr2 = t12 + cr12 zr3 = t13 + cr13 zi1 = t21 - ci11 * ci11 zi2 = t22 - ci12 * ci12 zi3 = t23 - ci13 * ci13 zk1 = t31 + ck1 zk2 = t32 + ck2 zk3 = t33 + ck3 elseif(@selectC==1) zr1 = t11 + cr11 zr2 = t12 + cr12 zr3 = t13 + cr13 zi1 = t21 + ci11 zi2 = t22 + ci12 zi3 = t23 + ci13 zk1 = t31 + ck1 zk2 = t32 + ck2 zk3 = t33 + ck3 endif ;----------------------Add some parameters-------------------------------------- zr1 = zr1 + @add2 zr2 = zr2 + @add2 zr3 = zr3 + @add2 zi1 = zi1 + @add1 zi2 = zi2 + @add1 zi3 = zi3 + @add1 zk1 = zk1 + @add1 + @add2 zk2 = zk2 + @add1 + @add2 zk3 = zk3 + @add1 + @add2 ;---------------Final Flavor--------------------------------------------------- if (@flavor==0) z1 = @fnfl1(zr1) + @fnfl2(zi1) z2 = @fnfl1(zr2) + @fnfl2(zi2) z3 = @fnfl1(zr3) + @fnfl2(zi3) elseif (@flavor==1) z1 = @fnfl1(zr1) - @fnfl2(zi1) z2 = @fnfl1(zr2) - @fnfl2(zi2) z3 = @fnfl1(zr3) - @fnfl2(zi3) elseif (@flavor==2) z1 = @fnfl1(zr1) + flip(@fnfl2(zi1)) z2 = @fnfl1(zr2) + flip(@fnfl2(zi2)) z3 = @fnfl1(zr3) + flip(@fnfl2(zi3)) elseif (@flavor==3) z1 = @fnfl1(zr1) - flip(@fnfl2(zi1)) z2 = @fnfl1(zr2) - flip(@fnfl2(zi2)) z3 = @fnfl1(zr3) - flip(@fnfl2(zi3)) endif if (@slope == true) ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zr1|+|zi1|+|zk1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |zr1|+|zi1|+|zk1| ) ; we're done done = 0 endif iter = iter + 1 Bailout: done > 0 Default: title="SlopeTMan" method=multipass periodicity=0 maxiter=250 param mode caption="Current Mode" enum="Mandelbrot""Julia" default=0 visible=false endparam param switchmode caption="Current Mode" enum="Mandelbrot""Julia" default=1 visible=false endparam Heading caption="Mandelbrot Mode" visible=(@mode=="Mandelbrot") Endheading Heading caption="Julia Mode" visible=(@mode=="Julia") Endheading param startseed caption="Start Z/Seed" default=(0.0,0.0) endparam param bailout caption="Bailout" default=128.0 min=0.0 endparam Heading caption="Slope Parameters" visible=@slope==true expanded=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=0.00000001 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="Flavor" expanded=false Endheading param flavor caption="Flavor" enum="z=zr+zi""z=zr-zi""z=zr+flip(zi)""z=zr-flip(zi)" default=2 endparam func fnfl1 caption="Function Flavor 1" default=ident() endfunc func fnfl2 caption="Function Flavor 2" default=ident() endfunc Heading caption="3R Dimension" expanded=false Endheading param rot1 caption="3R Dim. 1" default=(1.0,0.0) endparam param rot2 caption="3R Dim. 2" default=(0.0,0.0) endparam Heading caption="Loop C Sequence" expanded=false Endheading param seq caption="Sequence" enum="1""2""3" default=0 endparam param fact1 caption="Factor 1" default=(1.0,0.0) endparam param fact2 caption="Factor 2" default=(0.0,0.0) endparam param fact3 caption="Factor 3" default=(1.0,0.0) endparam param fact4 caption="Factor 4" default=(0.0,0.0) endparam func fnfact1 caption="Func. Factor 1" default=ident() endfunc func fnfact2 caption="Func. Factor 2" default=ident() endfunc Heading caption="Formula Parameters" Endheading param variation caption="Variation" enum="1""2""3""4" default=0 endparam param selectTriternion caption="Select Formula" enum="Triternion 1""Triternion 2" default=0 endparam param selectC caption="Select C" enum="cr | -ci*ci | ck""cr | ci | ck" default=0 endparam param p2 caption="Julia Dimension" default=(0.0,0.0) visible=(@mode=="Julia") endparam param p1 caption="Hyper Param. 1" default=(0.0,0.0) endparam param add1 caption="Hyper Param. 2" default=(0.0,0.0) endparam param add2 caption="Hyper Param. 3" default=(0.0,0.0) endparam param mult1 caption="Mult. T1" default=(1.0,0.0) endparam param mult2 caption="Mult. T2" default=(1.0,0.0) endparam param mult3 caption="Mult. T3" default=(1.0,0.0) endparam func fn1 caption="Function T1" default=ident() endfunc func fn2 caption="Function T2" default=ident() endfunc func fn3 caption="Function T3" default=ident() endfunc Heading caption="Phoenix Distortion(0.5,0.0)" Endheading param mult caption="Start Distortion" default=(0.0,0.0) endparam param addr caption=" Add ZR" default=(0.0,0.0) enabled= @mult != (0.0,0.0) endparam param addi caption=" Add ZI" default=(0.0,0.0) enabled= @mult != (0.0,0.0) endparam param addk caption=" Add ZK" default=(0.0,0.0) enabled= @mult != (0.0,0.0) endparam param mdistr caption="Mult. ZR" default=(1.0,0.0) enabled= @mult != (0.0,0.0) endparam param mdisti caption="Mult. ZI" default=(1.0,0.0) enabled= @mult != (0.0,0.0) endparam param mdistk caption="Mult. ZK" default=(1.0,0.0) enabled= @mult != (0.0,0.0) endparam func fndist1 caption="Func. Distortion T1" default=ident() enabled= @mult != (0.0,0.0) endfunc func fndist2 caption="Func. Distortion T2" default=ident() enabled= @mult != (0.0,0.0) endfunc func fndist3 caption="Func. Distortion T3" default=ident() enabled= @mult != (0.0,0.0) endfunc func fndistr caption="Func. Distortion ZR" default=ident() enabled= @mult != (0.0,0.0) endfunc func fndisti caption="Func. Distortion ZI" default=ident() enabled= @mult != (0.0,0.0) endfunc func fndistk caption="Func. Distortion ZK" default=ident() enabled= @mult != (0.0,0.0) endfunc param version caption="Formula Version" default=1.0 visible=false endparam Switch: type="SlopeTMan" bailout=@bailout flavor=@flavor fnfl1=@fnfl1 fnfl2=@fnfl2 rot1=@rot1 rot2=@rot2 variation=@variation selectTriternion=@selectTriternion selectC=@selectC startseed=pixel add1=@add1 add2=@add2 mult1=@mult1 mult2=@mult2 mult3=@mult3 mult=@mult addr=@addr addi=@addi addk=@addk mdistr=@mdistr mdisti=@mdisti mdistk=@mdistk fndist1=@fndist1 fndist2=@fndist2 fndist3=@fndist3 fndistr=@fndistr fndisti=@fndisti fndistk=@fndistk p1=@p1 p2=@p2 fn1=@fn1 fn2=@fn2 fn3=@fn3 seq=@seq fact1=@fact1 fact2=@fact2 fact3=@fact3 fact4=@fact4 fnfact1=@fnfact1 fnfact2=@fnfact2 version=@version mode=@switchmode switchmode=@mode slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeHyperMath_V1 { ; Modified HyperComplex sets with two hypercomplex parameters. ; It presents 15 orgform sets based an hypercomplex math and added C sequence ; 3RDimensions, slope effect, functions and parameters. ; Version 1(July2022): ; This Formula is different from SlopeHyperMath, basically the two hyper equations that ; creates the sets, in this version, are initialized in a different way, so Hyper Param 2 works differently ; compared to SlopeHyperMath, and this different initialization of plans of the hyper complex creates also different works ; compared to SlopeHyperMath. ; In this version i added Plane and Rotation Section. ; A total of 15 sets and i added also some new parameters in differents sets. ; Adding the Plane Rotation section i must split the real and imaginary part of Z in the init section, ; This didn't happen in the SlopeHyperMath. ; And the real and imaginary parts, splitted in the init section, will be taken in the loop section ; to create the standard hyper complex structure but for sure changing the real and imaginary part of Z ; in the Init Section and using 4 equations to define the sets in the loop section(so 2 differents initialization of Z for 4 equations) ; we have a different behaviour compared to Slope Hyper Math. ; So i added an operator to the Hyper Section that allow to choice differents initialization of the 2 Z=pixel that creates sets and ; hyper params work differently in base of the choice of Hyper Mix Operator. ; The similar behaviour to SlopeHyperMath is to use the Hyper Mix operator = 3 ; Andrea Spinozzi(July 2022) Init: z1=(0.0,0.0) z2=(0.0,0.0) z3=(0.0,0.0) r_rcl=real(@rcl) i_rcl=imag(@rcl) prea1=prea2=prea3=preb1=preb2=preb3=@pre preua1=preua2=preua3=preub1=preub2=preub3=@pre zz1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) zz2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) zz3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(#pixel)+flip(imag(#pixel)*@rd1) cz2=@rd3+@rd2*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd1) cz3=@rd3+@rd2*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd1) w1=w2=w3=cw1=cw2=cw3=p1 u1=u2=u3=cu1=cu2=cu3=p2 if (@mode=="Julia") zz1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) zz2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) zz3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) cz1=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz2=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cz3=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) cw1=cw2=cw3=p1 cu1=cu2=cu3=p2 w1=w2=w3=p3 u1=u2=u3=p4 endif zr1 = real(zz1) zr2 = real(zz2) zr3 = real(zz3) zi1 = imag(zz1) zi2 = imag(zz2) zi3 = imag(zz3) wr1 = real(w1) wr2 = real(w2) wr3 = real(w3) wi1 = imag(w1) wi2 = imag(w2) wi3 = imag(w3) ur1 = real(u1) ur2 = real(u2) ur3 = real(u3) ui1 = imag(u1) ui2 = imag(u2) ui3 = imag(u3) czr1 = real(cz1) czr2 = real(cz2) czr3 = real(cz3) czi1 = imag(cz1) czi2 = imag(cz2) czi3 = imag(cz3) cwr1 = real(cw1) cwr2 = real(cw2) cwr3 = real(cw3) cwi1 = imag(cw1) cwi2 = imag(cw2) cwi3 = imag(cw3) cur1 = real(cu1) cur2 = real(cu2) cur3 = real(cu3) cui1 = imag(cu1) cui2 = imag(cu2) cui3 = imag(cu3) ;--------------------Define HyperComplex variables and planes------------------- if (@planevar==0) czr1=czr1 czr2=czr2 czr3=czr3 czi1=czi1 czi2=czi2 czi3=czi3 cwr1=cwr1 cwr2=cwr2 cwr3=cwr3 cwi1=cwi1 cwi2=cwi2 cwi3=cwi3 elseif (@planevar==1) czr1=flip(czr1) czr2=flip(czr2) czr3=flip(czr3) czi1=flip(czi1) czi2=flip(czi2) czi3=flip(czi3) cwr1=flip(cwr1) cwr2=flip(cwr2) cwr3=flip(cwr3) cwi1=flip(cwi1) cwi2=flip(cwi2) cwi3=flip(cwi3) elseif (@planevar==2) czr1=czr1 czr2=czr2 czr3=czr3 czi1=cwi1 czi2=cwi2 czi3=cwi3 cwr1=cwr1 cwr2=cwr2 cwr3=cwr3 cwi1=czi1 cwi2=czi2 cwi3=czi3 elseif (@planevar==3) czr1=cwr1 czr2=cwr2 czr3=cwr3 czi1=czi1 czi2=czi2 czi3=czi3 cwr1=czr1 cwr2=czr2 cwr3=czr3 cwi1=cwi1 cwi2=cwi2 cwi3=cwi3 endif ;----------------------------Rotations Mandelbrot and Julia--------------------- ;----------------------------MANDELBROT MODE------------------------------------ ;----------------------------(yz plane rotation)-------------------------------- ry1 = czi1*cos(#pi*@rotx/180) - cwr1*sin(#pi*@rotx/180) ry2 = czi2*cos(#pi*@rotx/180) - cwr2*sin(#pi*@rotx/180) ry3 = czi3*cos(#pi*@rotx/180) - cwr3*sin(#pi*@rotx/180) rz1 = czi1*sin(#pi*@rotx/180) + cwr1*cos(#pi*@rotx/180) rz2 = czi2*sin(#pi*@rotx/180) + cwr2*cos(#pi*@rotx/180) rz3 = czi3*sin(#pi*@rotx/180) + cwr3*cos(#pi*@rotx/180) czi1 = ry1 czi2 = ry2 czi3 = ry3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xz plane rotation)-------------------------------- rx1 = cwr1*sin(#pi*@roty/180) + czr1*cos(#pi*@roty/180) rx2 = cwr2*sin(#pi*@roty/180) + czr2*cos(#pi*@roty/180) rx3 = cwr3*sin(#pi*@roty/180) + czr3*cos(#pi*@roty/180) rz1 = cwr1*cos(#pi*@roty/180) - czr1*sin(#pi*@roty/180) rz2 = cwr2*cos(#pi*@roty/180) - czr2*sin(#pi*@roty/180) rz3 = cwr3*cos(#pi*@roty/180) - czr3*sin(#pi*@roty/180) czr1 = rx1 czr2 = rx2 czr3 = rx3 cwr1 = rz1 cwr2 = rz2 cwr3 = rz3 ;----------------------------(xy plane rotation)-------------------------------- rx1 = czr1*cos(#pi*@rotz/180) - czi1*sin(#pi*@rotz/180) rx2 = czr2*cos(#pi*@rotz/180) - czi2*sin(#pi*@rotz/180) rx3 = czr3*cos(#pi*@rotz/180) - czi3*sin(#pi*@rotz/180) ry1 = czr1*sin(#pi*@rotz/180) + czi1*cos(#pi*@rotz/180) ry2 = czr2*sin(#pi*@rotz/180) + czi2*cos(#pi*@rotz/180) ry3 = czr3*sin(#pi*@rotz/180) + czi3*cos(#pi*@rotz/180) czr1 = rx1 czr2 = rx2 czr3 = rx3 czi1 = ry1 czi2 = ry2 czi3 = ry3 ;----------------------------(xw plane rotation)-------------------------------- rx1=czr1*sin(#pi*@rotw/180)+cwi1*cos(#pi*@rotw/180) rx2=czr2*sin(#pi*@rotw/180)+cwi2*cos(#pi*@rotw/180) rx3=czr3*sin(#pi*@rotw/180)+cwi3*cos(#pi*@rotw/180) rw1=czr1*cos(#pi*@rotw/180)-cwi1*sin(#pi*@rotw/180) rw2=czr2*cos(#pi*@rotw/180)-cwi2*sin(#pi*@rotw/180) rw3=czr3*cos(#pi*@rotw/180)-cwi3*sin(#pi*@rotw/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 czr1=rw1 czr2=rw2 czr3=rw3 ;-------------------------(yw plane rotation)----------------------------------- rx1=czi1*sin(#pi*@rotwy/180)+cwi1*cos(#pi*@rotwy/180) rx2=czi2*sin(#pi*@rotwy/180)+cwi2*cos(#pi*@rotwy/180) rx3=czi3*sin(#pi*@rotwy/180)+cwi3*cos(#pi*@rotwy/180) rw1=czi1*cos(#pi*@rotwy/180)-cwi1*sin(#pi*@rotwy/180) rw2=czi2*cos(#pi*@rotwy/180)-cwi2*sin(#pi*@rotwy/180) rw3=czi3*cos(#pi*@rotwy/180)-cwi3*sin(#pi*@rotwy/180) cwi1=rx1 cwi2=rx2 cwi3=rx3 czi1=rw1 czi2=rw2 czi3=rw3 if (@mode=="Julia");-------------Julia Rotations-------------------------------- ;---------------------------------JULIA MODE------------------------------------ ;---------------------------(yz plane rotation)--------------------------------- ry1 = zi1*cos(#pi*@rotx/180) - wr1*sin(#pi*@rotx/180) ry2 = zi2*cos(#pi*@rotx/180) - wr2*sin(#pi*@rotx/180) ry3 = zi3*cos(#pi*@rotx/180) - wr3*sin(#pi*@rotx/180) rz1 = zi1*sin(#pi*@rotx/180) + wr1*cos(#pi*@rotx/180) rz2 = zi2*sin(#pi*@rotx/180) + wr2*cos(#pi*@rotx/180) rz3 = zi3*sin(#pi*@rotx/180) + wr3*cos(#pi*@rotx/180) zi1 = ry1 zi2 = ry2 zi3 = ry3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;-------------------------(xz plane rotation)----------------------------------- rx1 = wr1*sin(#pi*@roty/180) + zr1*cos(#pi*@roty/180) rx2 = wr2*sin(#pi*@roty/180) + zr2*cos(#pi*@roty/180) rx3 = wr3*sin(#pi*@roty/180) + zr3*cos(#pi*@roty/180) rz1 = wr1*cos(#pi*@roty/180) - zr1*sin(#pi*@roty/180) rz2 = wr2*cos(#pi*@roty/180) - zr2*sin(#pi*@roty/180) rz3 = wr3*cos(#pi*@roty/180) - zr3*sin(#pi*@roty/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 wr1 = rz1 wr2 = rz2 wr3 = rz3 ;---------------------(xy plane rotation)--------------------------------------- rx1 = zr1*cos(#pi*@rotz/180) - zi1*sin(#pi*@rotz/180) rx2 = zr2*cos(#pi*@rotz/180) - zi2*sin(#pi*@rotz/180) rx3 = zr3*cos(#pi*@rotz/180) - zi3*sin(#pi*@rotz/180) ry1 = zr1*sin(#pi*@rotz/180) + zi1*cos(#pi*@rotz/180) ry2 = zr2*sin(#pi*@rotz/180) + zi2*cos(#pi*@rotz/180) ry3 = zr3*sin(#pi*@rotz/180) + zi3*cos(#pi*@rotz/180) zr1 = rx1 zr2 = rx2 zr3 = rx3 zi1 = ry1 zi2 = ry2 zi3 = ry3 ;---------------------(xw plane rotation)--------------------------------------- rx1=zr1*sin(#pi*@rotw/180)+wi1*cos(#pi*@rotw/180) rx2=zr2*sin(#pi*@rotw/180)+wi2*cos(#pi*@rotw/180) rx3=zr3*sin(#pi*@rotw/180)+wi3*cos(#pi*@rotw/180) rw1=zr1*cos(#pi*@rotw/180)-wi1*sin(#pi*@rotw/180) rw2=zr2*cos(#pi*@rotw/180)-wi2*sin(#pi*@rotw/180) rw3=zr3*cos(#pi*@rotw/180)-wi3*sin(#pi*@rotw/180) wi1=rx1 wi2=rx2 wi3=rx3 zr1=rw1 zr2=rw2 zr3=rw3 ;---------------------(yw plane rotation)--------------------------------------- rx1=zi1*sin(#pi*@rotwy/180)+wi1*cos(#pi*@rotwy/180) rx2=zi2*sin(#pi*@rotwy/180)+wi2*cos(#pi*@rotwy/180) rx3=zi3*sin(#pi*@rotwy/180)+wi3*cos(#pi*@rotwy/180) rw1=zi1*cos(#pi*@rotwy/180)-wi1*sin(#pi*@rotwy/180) rw2=zi2*cos(#pi*@rotwy/180)-wi2*sin(#pi*@rotwy/180) rw3=zi3*cos(#pi*@rotwy/180)-wi3*sin(#pi*@rotwy/180) wi1=rx1 wi2=rx2 wi3=rx3 zi1=rw1 zi2=rw2 zi3=rw3 endif ca1=czr1-cwi1+flip(czi1+cwr1) ca2=czr2-cwi2+flip(czi2+cwr2) ca3=czr3-cwi3+flip(czi3+cwr3) cb1=czr1+cwi1+flip(czi1-cwr1) cb2=czr2+cwi2+flip(czi2-cwr2) cb3=czr3+cwi3+flip(czi3-cwr3) cua1=czr1-cui1+flip(czi1+cur1) cua2=czr2-cui2+flip(czi2+cur2) cua3=czr3-cui3+flip(czi3+cur3) cub1=czr1+cui1+flip(czi1-cur1) cub2=czr2+cui2+flip(czi2-cur2) cub3=czr3+cui3+flip(czi3-cur3) ;;; slope stuff int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 int modby=@seq+2 int iter=0 Loop: int method=iter%modby ;------------Mix planes and initialitation of plans sets----------------------- if (@hyperMix==0) zar1 = zr1 zar2 = zr2 zar3 = zr3 zai1 = zi1 zai2 = zi2 zai3 = zi3 zzr1 = real(zz1) zzr2 = real(zz2) zzr3 = real(zz3) zzi1 = imag(zz1) zzi2 = imag(zz2) zzi3 = imag(zz3) elseif (@hyperMix==1) zar1 = real(zz1) zar2 = real(zz2) zar3 = real(zz3) zai1 = imag(zz1) zai2 = imag(zz2) zai3 = imag(zz3) zzr1 = zr1 zzr2 = zr2 zzr3 = zr3 zzi1 = zi1 zzi2 = zi2 zzi3 = zi3 elseif (@hyperMix==2) zar1 = real(zz1) zar2 = real(zz2) zar3 = real(zz3) zai1 = imag(zz1) zai2 = imag(zz2) zai3 = imag(zz3) zzr1 = real(zz1) zzr2 = real(zz2) zzr3 = real(zz3) zzi1 = imag(zz1) zzi2 = imag(zz2) zzi3 = imag(zz3) endif ;-----------------------Hyper Structure Z,W------------------------------------ a1=zar1-wi1+flip(zai1+wr1) a2=zar2-wi2+flip(zai2+wr2) a3=zar3-wi3+flip(zai3+wr3) b1=zar1+wi1+flip(zai1-wr1) b2=zar2+wi2+flip(zai2-wr2) b3=zar3+wi3+flip(zai3-wr3) ua1=zzr1-ui1+flip(zzi1+ur1) ua2=zzr2-ui2+flip(zzi2+ur2) ua3=zzr3-ui3+flip(zzi3+ur3) ub1=zzr1+ui1+flip(zzi1-ur1) ub2=zzr2+ui2+flip(zzi2-ur2) ub3=zzr3+ui3+flip(zzi3-ur3) ;-------------------------Add function to C------------------------------------ appca1=@fnc(ca1) appca2=@fnc(ca2) appca3=@fnc(ca3) appcb1=@fnc(cb1) appcb2=@fnc(cb2) appcb3=@fnc(cb3) appcua1=@fnc(cua1) appcua2=@fnc(cua2) appcua3=@fnc(cua3) appcub1=@fnc(cub1) appcub2=@fnc(cub2) appcub3=@fnc(cub3) ;-------------------------Add function to Z------------------------------------ a1=@fnz(a1) a2=@fnz(a2) a3=@fnz(a3) b1=@fnz(b1) b2=@fnz(b2) b3=@fnz(b3) ua1=@fnz(ua1) ua2=@fnz(ua2) ua3=@fnz(ua3) ub1=@fnz(ub1) ub2=@fnz(ub2) ub3=@fnz(ub3) ;----------------------Factor for C sequence----------------------------------- if (method==0) appca1=@fnfact1(appca1+@factor)*@factor2 appca2=@fnfact1(appca2+@factor)*@factor2 appca3=@fnfact1(appca3+@factor)*@factor2 appcb1=@fnfact1(appcb1+@factor)*@factor2 appcb2=@fnfact1(appcb2+@factor)*@factor2 appcb3=@fnfact1(appcb3+@factor)*@factor2 appcua1=@fnfact1(appcua1+@factor)*@factor2 appcua2=@fnfact1(appcua2+@factor)*@factor2 appcua3=@fnfact1(appcua3+@factor)*@factor2 appcub1=@fnfact1(appcub1+@factor)*@factor2 appcub2=@fnfact1(appcub2+@factor)*@factor2 appcub3=@fnfact1(appcub3+@factor)*@factor2 else appca1=@fnfact2(appca1-@factor1)*@factor3 appca2=@fnfact2(appca2-@factor1)*@factor3 appca3=@fnfact2(appca3-@factor1)*@factor3 appcb1=@fnfact2(appcb1-@factor1)*@factor3 appcb2=@fnfact2(appcb2-@factor1)*@factor3 appcb3=@fnfact2(appcb3-@factor1)*@factor3 appcua1=@fnfact2(appcua1-@factor1)*@factor3 appcua2=@fnfact2(appcua2-@factor1)*@factor3 appcua3=@fnfact2(appcua3-@factor1)*@factor3 appcub1=@fnfact2(appcub1-@factor1)*@factor3 appcub2=@fnfact2(appcub2-@factor1)*@factor3 appcub3=@fnfact2(appcub3-@factor1)*@factor3 endif ;----------------------------Start Sets---------------------------------------- if (@formula==0);---------------------------------Mandelbrot------------------- a1=@fnm(a1+real(@parm1))^@expm+@parm/@fnm1(a1+real(@parm2))+@fnmc(appca1)*@parm3 a2=@fnm(a2+real(@parm1))^@expm+@parm/@fnm1(a2+real(@parm2))+@fnmc(appca2)*@parm3 a3=@fnm(a3+real(@parm1))^@expm+@parm/@fnm1(a3+real(@parm2))+@fnmc(appca3)*@parm3 b1=@fnm(b1+flip(imag(@parm1)))^@expm+@parm/@fnm1(b1+flip(imag(@parm2)))+@fnmc(appcb1)*@parm3 b2=@fnm(b2+flip(imag(@parm1)))^@expm+@parm/@fnm1(b2+flip(imag(@parm2)))+@fnmc(appcb2)*@parm3 b3=@fnm(b3+flip(imag(@parm1)))^@expm+@parm/@fnm1(b3+flip(imag(@parm2)))+@fnmc(appcb3)*@parm3 ua1=@fnm(ua1+real(@parm1))^@expm+@parm/@fnm1(ua1+real(@parm2))+@fnmc(appcua1)*@parm3 ua2=@fnm(ua2+real(@parm1))^@expm+@parm/@fnm1(ua2+real(@parm2))+@fnmc(appcua2)*@parm3 ua3=@fnm(ua3+real(@parm1))^@expm+@parm/@fnm1(ua3+real(@parm2))+@fnmc(appcua3)*@parm3 ub1=@fnm(ub1+flip(imag(@parm1)))^@expm+@parm/@fnm1(ub1+flip(imag(@parm2)))+@fnmc(appcub1)*@parm3 ub2=@fnm(ub2+flip(imag(@parm1)))^@expm+@parm/@fnm1(ub2+flip(imag(@parm2)))+@fnmc(appcub2)*@parm3 ub3=@fnm(ub3+flip(imag(@parm1)))^@expm+@parm/@fnm1(ub3+flip(imag(@parm2)))+@fnmc(appcub3)*@parm3 elseif (@formula==1);------------------------------DAFRM----------------------- ax1=flip(appca1+@fndaf(2*@daf1/3*@fndaf1(a1+real(@daf4))-@fndaf2(a1+real(@daf5))/@daf2)) ax2=flip(appca2+@fndaf(2*@daf1/3*@fndaf1(a2+real(@daf4))-@fndaf2(a2+real(@daf5))/@daf2)) ax3=flip(appca3+@fndaf(2*@daf1/3*@fndaf1(a3+real(@daf4))-@fndaf2(a3+real(@daf5))/@daf2)) bx1=flip(appcb1+@fndaf(2*@daf1/3*@fndaf1(b1+flip(imag(@daf4)))-@fndaf2(b1+flip(imag(@daf5)))/@daf2)) bx2=flip(appcb2+@fndaf(2*@daf1/3*@fndaf1(b2+flip(imag(@daf4)))-@fndaf2(b2+flip(imag(@daf5)))/@daf2)) bx3=flip(appcb3+@fndaf(2*@daf1/3*@fndaf1(b3+flip(imag(@daf4)))-@fndaf2(b3+flip(imag(@daf5)))/@daf2)) uax1=flip(appcua1+@fndaf(2*@daf1/3*@fndaf1(ua1+real(@daf4))-@fndaf2(ua1+real(@daf5))/@daf2)) uax2=flip(appcua2+@fndaf(2*@daf1/3*@fndaf1(ua2+real(@daf4))-@fndaf2(ua2+real(@daf5))/@daf2)) uax3=flip(appcua3+@fndaf(2*@daf1/3*@fndaf1(ua3+real(@daf4))-@fndaf2(ua3+real(@daf5))/@daf2)) ubx1=flip(appcub1+@fndaf(2*@daf1/3*@fndaf1(ub1+flip(imag(@daf4)))-@fndaf2(ub1+flip(imag(@daf5)))/@daf2)) ubx2=flip(appcub2+@fndaf(2*@daf1/3*@fndaf1(ub2+flip(imag(@daf4)))-@fndaf2(ub2+flip(imag(@daf5)))/@daf2)) ubx3=flip(appcub3+@fndaf(2*@daf1/3*@fndaf1(ub3+flip(imag(@daf4)))-@fndaf2(ub3+flip(imag(@daf5)))/@daf2)) a1=@fndaf4(ax1)*@fndaf3(a1+real(@daf3))+@fndaf5(appca1) a2=@fndaf4(ax2)*@fndaf3(a2+real(@daf3))+@fndaf5(appca2) a3=@fndaf4(ax3)*@fndaf3(a3+real(@daf3))+@fndaf5(appca3) b1=@fndaf4(bx1)*@fndaf3(b1+flip(imag(@daf3)))+@fndaf5(appcb1) b2=@fndaf4(bx2)*@fndaf3(b2+flip(imag(@daf3)))+@fndaf5(appcb2) b3=@fndaf4(bx3)*@fndaf3(b3+flip(imag(@daf3)))+@fndaf5(appcb3) ua1=@fndaf4(uax1)*@fndaf3(ua1+real(@daf3))+@fndaf5(appcua1) ua2=@fndaf4(uax2)*@fndaf3(ua2+real(@daf3))+@fndaf5(appcua2) ua3=@fndaf4(uax3)*@fndaf3(ua3+real(@daf3))+@fndaf5(appcua3) ub1=@fndaf4(ubx1)*@fndaf3(ub1+flip(imag(@daf3)))+@fndaf5(appcub1) ub2=@fndaf4(ubx2)*@fndaf3(ub2+flip(imag(@daf3)))+@fndaf5(appcub2) ub3=@fndaf4(ubx3)*@fndaf3(ub3+flip(imag(@daf3)))+@fndaf5(appcub3) elseif (@formula==2);-----------------------------Variant RCL------------------ rcla1=@fnrcl(a1+@parcl1)^@exrcl-r_rcl^2-@fnrcl1(b1+@parcl2)^@exrcl-i_rcl^2 rcla2=@fnrcl(a2+@parcl1)^@exrcl-r_rcl^2-@fnrcl1(b2+@parcl2)^@exrcl-i_rcl^2 rcla3=@fnrcl(a3+@parcl1)^@exrcl-r_rcl^2-@fnrcl1(b3+@parcl2)^@exrcl-i_rcl^2 rclb1=2*a1*b1 rclb2=2*a2*b2 rclb3=2*a3*b3 rclua1=@fnrcl(ua1+@parcl1)^@exrcl-r_rcl^2-@fnrcl1(ub1+@parcl2)^@exrcl-i_rcl^2 rclua2=@fnrcl(ua2+@parcl1)^@exrcl-r_rcl^2-@fnrcl1(ub2+@parcl2)^@exrcl-i_rcl^2 rclua3=@fnrcl(ua3+@parcl1)^@exrcl-r_rcl^2-@fnrcl1(ub3+@parcl2)^@exrcl-i_rcl^2 rclub1=2*ua1*ub1 rclub2=2*ua2*ub2 rclub3=2*ua3*ub3 a1=@fnrcl2(rcla1+real(@parcl))+@fnrcl3(appca1)*@parcl3 a2=@fnrcl2(rcla2+real(@parcl))+@fnrcl3(appca2)*@parcl3 a3=@fnrcl2(rcla3+real(@parcl))+@fnrcl3(appca3)*@parcl3 b1=@fnrcl2(rclb1+flip(imag(@parcl)))+@fnrcl3(appcb1)*@parcl3 b2=@fnrcl2(rclb2+flip(imag(@parcl)))+@fnrcl3(appcb2)*@parcl3 b3=@fnrcl2(rclb3+flip(imag(@parcl)))+@fnrcl3(appcb3)*@parcl3 ua1=@fnrcl2(rclua1+real(@parcl))+@fnrcl3(appcua1)*@parcl3 ua2=@fnrcl2(rclua2+real(@parcl))+@fnrcl3(appcua2)*@parcl3 ua3=@fnrcl2(rclua3+real(@parcl))+@fnrcl3(appcua3)*@parcl3 ub1=@fnrcl2(rclub1+flip(imag(@parcl)))+@fnrcl3(appcub1)*@parcl3 ub2=@fnrcl2(rclub2+flip(imag(@parcl)))+@fnrcl3(appcub2)*@parcl3 ub3=@fnrcl2(rclub3+flip(imag(@parcl)))+@fnrcl3(appcub3)*@parcl3 elseif (@formula==3);------------Precogna-------------------------------------- pa1=sqr(prea1+@pre3)*prea1+@fnpre(a1+@pre2)^@expre+appca1*@pre4 pa2=sqr(prea2+@pre3)*prea2+@fnpre(a2+@pre2)^@expre+appca2*@pre4 pa3=sqr(prea3+@pre3)*prea3+@fnpre(a3+@pre2)^@expre+appca3*@pre4 pb1=sqr(preb1+@pre3)*preb1+@fnpre(b1+@pre2)^@expre+appcb1*@pre4 pb2=sqr(preb2+@pre3)*preb2+@fnpre(b2+@pre2)^@expre+appcb2*@pre4 pb3=sqr(preb3+@pre3)*preb3+@fnpre(b3+@pre2)^@expre+appcb3*@pre4 pua1=sqr(preua1+@pre3)*preua1+@fnpre(ua1+@pre2)^@expre+appcua1*@pre4 pua2=sqr(preua2+@pre3)*preua2+@fnpre(ua2+@pre2)^@expre+appcua2*@pre4 pua3=sqr(preua3+@pre3)*preua3+@fnpre(ua3+@pre2)^@expre+appcua3*@pre4 pub1=sqr(preub1+@pre3)*preub1+@fnpre(ub1+@pre2)^@expre+appcub1*@pre4 pub2=sqr(preub2+@pre3)*preub2+@fnpre(ub2+@pre2)^@expre+appcub2*@pre4 pub3=sqr(preub3+@pre3)*preub3+@fnpre(ub3+@pre2)^@expre+appcub3*@pre4 prea1=a1+@pre1 prea2=a2+@pre1 prea3=a3+@pre1 preb1=b1+@pre1 preb2=b2+@pre1 preb3=b3+@pre1 preua1=ua1+@pre1 preua2=ua2+@pre1 preua3=ua3+@pre1 preub1=ub1+@pre1 preub2=ub2+@pre1 preub3=ub3+@pre1 a1=pa1 a2=pa2 a3=pa3 b1=pb1 b2=pb2 b3=pb3 ua1=pua1 ua2=pua2 ua3=pua3 ub1=pub1 ub2=pub2 ub3=pub3 elseif (@formula==4);-----------------------------MandelbrotQud---------------- a1=sqr(a1+@qud1)+(0.2*@fnqud(a1)^@exqu)+(@qud1m*@fnqud1(a1+@qud2)^@exqu1)+(@qud2m*@fnqud2(a1+@qud3)^@exqu2)+@fnqud3(appca1) a2=sqr(a2+@qud1)+(0.2*@fnqud(a2)^@exqu)+(@qud1m*@fnqud1(a2+@qud2)^@exqu1)+(@qud2m*@fnqud2(a2+@qud3)^@exqu2)+@fnqud3(appca2) a3=sqr(a3+@qud1)+(0.2*@fnqud(a3)^@exqu)+(@qud1m*@fnqud1(a3+@qud2)^@exqu1)+(@qud2m*@fnqud2(a3+@qud3)^@exqu2)+@fnqud3(appca3) b1=sqr(b1+@qud1)+(0.2*@fnqud(b1)^@exqu)+(@qud1m*@fnqud1(b1+@qud2)^@exqu1)+(@qud2m*@fnqud2(b1+@qud3)^@exqu2)+@fnqud3(appcb1) b2=sqr(b2+@qud1)+(0.2*@fnqud(b2)^@exqu)+(@qud1m*@fnqud1(b2+@qud2)^@exqu1)+(@qud2m*@fnqud2(b2+@qud3)^@exqu2)+@fnqud3(appcb2) b3=sqr(b3+@qud1)+(0.2*@fnqud(b3)^@exqu)+(@qud1m*@fnqud1(b3+@qud2)^@exqu1)+(@qud2m*@fnqud2(b3+@qud3)^@exqu2)+@fnqud3(appcb3) ua1=sqr(ua1+@qud1)+(0.2*@fnqud(ua1)^@exqu)+(@qud1m*@fnqud1(ua1+@qud2)^@exqu1)+(@qud2m*@fnqud2(ua1+@qud3)^@exqu2)+@fnqud3(appcua1) ua2=sqr(ua2+@qud1)+(0.2*@fnqud(ua2)^@exqu)+(@qud1m*@fnqud1(ua2+@qud2)^@exqu1)+(@qud2m*@fnqud2(ua2+@qud3)^@exqu2)+@fnqud3(appcua2) ua3=sqr(ua3+@qud1)+(0.2*@fnqud(ua3)^@exqu)+(@qud1m*@fnqud1(ua3+@qud2)^@exqu1)+(@qud2m*@fnqud2(ua3+@qud3)^@exqu2)+@fnqud3(appcua3) ub1=sqr(ub1+@qud1)+(0.2*@fnqud(ub1)^@exqu)+(@qud1m*@fnqud1(ub1+@qud2)^@exqu1)+(@qud2m*@fnqud2(ub1+@qud3)^@exqu2)+@fnqud3(appcub1) ub2=sqr(ub2+@qud1)+(0.2*@fnqud(ub2)^@exqu)+(@qud1m*@fnqud1(ub2+@qud2)^@exqu1)+(@qud2m*@fnqud2(ub2+@qud3)^@exqu2)+@fnqud3(appcub2) ub3=sqr(ub3+@qud1)+(0.2*@fnqud(ub3)^@exqu)+(@qud1m*@fnqud1(ub3+@qud2)^@exqu1)+(@qud2m*@fnqud2(ub3+@qud3)^@exqu2)+@fnqud3(appcub3) elseif (@formula==5);-----------------------------PhonyMandel------------------ a1=(@fnphom(a1^@exphom+@phom3)/@exphom-@fnphom1(a1^@exphom1*@phom1)/@exphom1-@fnphom2(a1^@exphom2)/@exphom2+@phom1*@fnphom3(a1)-@phom2)*@fnphom4(appca1) a2=(@fnphom(a2^@exphom+@phom3)/@exphom-@fnphom1(a2^@exphom1*@phom1)/@exphom1-@fnphom2(a2^@exphom2)/@exphom2+@phom1*@fnphom3(a2)-@phom2)*@fnphom4(appca2) a3=(@fnphom(a3^@exphom+@phom3)/@exphom-@fnphom1(a3^@exphom1*@phom1)/@exphom1-@fnphom2(a3^@exphom2)/@exphom2+@phom1*@fnphom3(a3)-@phom2)*@fnphom4(appca3) b1=(@fnphom(b1^@exphom+@phom3)/@exphom-@fnphom1(b1^@exphom1*@phom1)/@exphom1-@fnphom2(b1^@exphom2)/@exphom2+@phom1*@fnphom3(b1)-@phom2)*@fnphom4(appcb1) b2=(@fnphom(b2^@exphom+@phom3)/@exphom-@fnphom1(b2^@exphom1*@phom1)/@exphom1-@fnphom2(b2^@exphom2)/@exphom2+@phom1*@fnphom3(b2)-@phom2)*@fnphom4(appcb2) b3=(@fnphom(b3^@exphom+@phom3)/@exphom-@fnphom1(b3^@exphom1*@phom1)/@exphom1-@fnphom2(b3^@exphom2)/@exphom2+@phom1*@fnphom3(b3)-@phom2)*@fnphom4(appcb3) ua1=(@fnphom(ua1^@exphom+@phom3)/@exphom-@fnphom1(ua1^@exphom1*@phom1)/@exphom1-@fnphom2(ua1^@exphom2)/@exphom2+@phom1*@fnphom3(ua1)-@phom2)*@fnphom4(appcua1) ua2=(@fnphom(ua2^@exphom+@phom3)/@exphom-@fnphom1(ua2^@exphom1*@phom1)/@exphom1-@fnphom2(ua2^@exphom2)/@exphom2+@phom1*@fnphom3(ua2)-@phom2)*@fnphom4(appcua2) ua3=(@fnphom(ua3^@exphom+@phom3)/@exphom-@fnphom1(ua3^@exphom1*@phom1)/@exphom1-@fnphom2(ua3^@exphom2)/@exphom2+@phom1*@fnphom3(ua3)-@phom2)*@fnphom4(appcua3) ub1=(@fnphom(ub1^@exphom+@phom3)/@exphom-@fnphom1(ub1^@exphom1*@phom1)/@exphom1-@fnphom2(ub1^@exphom2)/@exphom2+@phom1*@fnphom3(ub1)-@phom2)*@fnphom4(appcub1) ub2=(@fnphom(ub2^@exphom+@phom3)/@exphom-@fnphom1(ub2^@exphom1*@phom1)/@exphom1-@fnphom2(ub2^@exphom2)/@exphom2+@phom1*@fnphom3(ub2)-@phom2)*@fnphom4(appcub2) ub3=(@fnphom(ub3^@exphom+@phom3)/@exphom-@fnphom1(ub3^@exphom1*@phom1)/@exphom1-@fnphom2(ub3^@exphom2)/@exphom2+@phom1*@fnphom3(ub3)-@phom2)*@fnphom4(appcub3) a1=@glphom(a1+real(@phom4)) a2=@glphom(a2+real(@phom4)) a3=@glphom(a3+real(@phom4)) b1=@glphom(b1+flip(imag(@phom4))) b2=@glphom(b2+flip(imag(@phom4))) b3=@glphom(b3+flip(imag(@phom4))) ua1=@glphom(ua1+real(@phom4)) ua2=@glphom(ua2+real(@phom4)) ua3=@glphom(ua3+real(@phom4)) ub1=@glphom(ub1+flip(imag(@phom4))) ub2=@glphom(ub2+flip(imag(@phom4))) ub3=@glphom(ub3+flip(imag(@phom4))) elseif (@formula==6);-----------------------------DivMandel-------------------- a1=(@fndiv(a1+@div1)^@exdiv+appca1)/(@fndiv1(a1+@div2)^-@exdiv1-appca1*@div3)+@fndiv2(appca1) a2=(@fndiv(a2+@div1)^@exdiv+appca2)/(@fndiv1(a2+@div2)^-@exdiv1-appca2*@div3)+@fndiv2(appca2) a3=(@fndiv(a3+@div1)^@exdiv+appca3)/(@fndiv1(a3+@div2)^-@exdiv1-appca3*@div3)+@fndiv2(appca3) b1=(@fndiv(b1+@div1)^@exdiv+appcb1)/(@fndiv1(b1+@div2)^-@exdiv1-appcb1*@div3)+@fndiv2(appcb1) b2=(@fndiv(b2+@div1)^@exdiv+appcb2)/(@fndiv1(b2+@div2)^-@exdiv1-appcb2*@div3)+@fndiv2(appcb2) b3=(@fndiv(b3+@div1)^@exdiv+appcb3)/(@fndiv1(b3+@div2)^-@exdiv1-appcb3*@div3)+@fndiv2(appcb3) ua1=(@fndiv(ua1+@div1)^@exdiv+appcua1)/(@fndiv1(ua1+@div2)^-@exdiv1-appcua1*@div3)+@fndiv2(appcua1) ua2=(@fndiv(ua2+@div1)^@exdiv+appcua2)/(@fndiv1(ua2+@div2)^-@exdiv1-appcua2*@div3)+@fndiv2(appcua2) ua3=(@fndiv(ua3+@div1)^@exdiv+appcua3)/(@fndiv1(ua3+@div2)^-@exdiv1-appcua3*@div3)+@fndiv2(appcua3) ub1=(@fndiv(ub1+@div1)^@exdiv+appcub1)/(@fndiv1(ub1+@div2)^-@exdiv1-appcub1*@div3)+@fndiv2(appcub1) ub2=(@fndiv(ub2+@div1)^@exdiv+appcub2)/(@fndiv1(ub2+@div2)^-@exdiv1-appcub2*@div3)+@fndiv2(appcub2) ub3=(@fndiv(ub3+@div1)^@exdiv+appcub3)/(@fndiv1(ub3+@div2)^-@exdiv1-appcub3*@div3)+@fndiv2(appcub3) a1 = a1+real(@div4) a2 = a2+real(@div4) a3 = a3+real(@div4) b1 = b1+flip(imag(@div4)) b2 = b2+flip(imag(@div4)) b3 = b3+flip(imag(@div4)) ua1 = ua1+real(@div4) ua2 = ua2+real(@div4) ua3 = ua3+real(@div4) ub1 = ub1+flip(imag(@div4)) ub2 = ub2+flip(imag(@div4)) ub3 = ub3+flip(imag(@div4)) elseif (@formula==7);-----------------------------Hybra Brot------------------- ;z=pixel, zp = (0,0): ;temp=z ;z=z*z+zp*zd ;zp=temp, zd=temp : |zp| <= 4 } tempa1=a1 tempa2=a2 tempa3=a3 tempb1=b1 tempb2=b2 tempb3=b3 tempua1=ua1 tempua2=ua2 tempua3=ua3 tempub1=ub1 tempub2=ub2 tempub3=ub3 if @op1hy==0 a1=@mphy3*@fn1hy2(a1)^@mphy2+@mphy9*@fn1hy3(appca1)+@fn1hy4(zpa1+@mphy6)*@mphy4*@fnod1(oldza1+@od1)*@od2 a2=@mphy3*@fn1hy2(a2)^@mphy2+@mphy9*@fn1hy3(appca2)+@fn1hy4(zpa2+@mphy6)*@mphy4*@fnod1(oldza2+@od1)*@od2 a3=@mphy3*@fn1hy2(a3)^@mphy2+@mphy9*@fn1hy3(appca3)+@fn1hy4(zpa3+@mphy6)*@mphy4*@fnod1(oldza3+@od1)*@od2 b1=@mphy3*@fn1hy2(b1)^@mphy2+@mphy9*@fn1hy3(appcb1)+@fn1hy4(zpb1+@mphy6)*@mphy4*@fnod1(oldzb1+@od1)*@od2 b2=@mphy3*@fn1hy2(b2)^@mphy2+@mphy9*@fn1hy3(appcb2)+@fn1hy4(zpb2+@mphy6)*@mphy4*@fnod1(oldzb2+@od1)*@od2 b3=@mphy3*@fn1hy2(b3)^@mphy2+@mphy9*@fn1hy3(appcb3)+@fn1hy4(zpb3+@mphy6)*@mphy4*@fnod1(oldzb3+@od1)*@od2 ua1=@mphy3*@fn1hy2(ua1)^@mphy2+@mphy9*@fn1hy3(appcua1)+@fn1hy4(zpua1+@mphy6)*@mphy4*@fnod1(oldzua1+@od1)*@od2 ua2=@mphy3*@fn1hy2(ua2)^@mphy2+@mphy9*@fn1hy3(appcua2)+@fn1hy4(zpua2+@mphy6)*@mphy4*@fnod1(oldzua2+@od1)*@od2 ua3=@mphy3*@fn1hy2(ua3)^@mphy2+@mphy9*@fn1hy3(appcua3)+@fn1hy4(zpua3+@mphy6)*@mphy4*@fnod1(oldzua3+@od1)*@od2 ub1=@mphy3*@fn1hy2(ub1)^@mphy2+@mphy9*@fn1hy3(appcub1)+@fn1hy4(zpub1+@mphy6)*@mphy4*@fnod1(oldzub1+@od1)*@od2 ub2=@mphy3*@fn1hy2(ub2)^@mphy2+@mphy9*@fn1hy3(appcub2)+@fn1hy4(zpub2+@mphy6)*@mphy4*@fnod1(oldzub2+@od1)*@od2 ub3=@mphy3*@fn1hy2(ub3)^@mphy2+@mphy9*@fn1hy3(appcub3)+@fn1hy4(zpub3+@mphy6)*@mphy4*@fnod1(oldzub3+@od1)*@od2 elseif @op1hy==1 a1=@mphy3*@fn1hy2(a1)^@mphy2+@mphy9*@fn1hy3(appca1)*@fn1hy4(zpa1+@mphy6)*@mphy4*@fnod1(oldza1+@od1)*@od2 a2=@mphy3*@fn1hy2(a2)^@mphy2+@mphy9*@fn1hy3(appca2)*@fn1hy4(zpa2+@mphy6)*@mphy4*@fnod1(oldza2+@od1)*@od2 a3=@mphy3*@fn1hy2(a3)^@mphy2+@mphy9*@fn1hy3(appca3)*@fn1hy4(zpa3+@mphy6)*@mphy4*@fnod1(oldza3+@od1)*@od2 b1=@mphy3*@fn1hy2(b1)^@mphy2+@mphy9*@fn1hy3(appcb1)*@fn1hy4(zpb1+@mphy6)*@mphy4*@fnod1(oldzb1+@od1)*@od2 b2=@mphy3*@fn1hy2(b2)^@mphy2+@mphy9*@fn1hy3(appcb2)*@fn1hy4(zpb2+@mphy6)*@mphy4*@fnod1(oldzb2+@od1)*@od2 b3=@mphy3*@fn1hy2(b3)^@mphy2+@mphy9*@fn1hy3(appcb3)*@fn1hy4(zpb3+@mphy6)*@mphy4*@fnod1(oldzb3+@od1)*@od2 ua1=@mphy3*@fn1hy2(ua1)^@mphy2+@mphy9*@fn1hy3(appcua1)*@fn1hy4(zpua1+@mphy6)*@mphy4*@fnod1(oldzua1+@od1)*@od2 ua2=@mphy3*@fn1hy2(ua2)^@mphy2+@mphy9*@fn1hy3(appcua2)*@fn1hy4(zpua2+@mphy6)*@mphy4*@fnod1(oldzua2+@od1)*@od2 ua3=@mphy3*@fn1hy2(ua3)^@mphy2+@mphy9*@fn1hy3(appcua3)*@fn1hy4(zpua3+@mphy6)*@mphy4*@fnod1(oldzua3+@od1)*@od2 ub1=@mphy3*@fn1hy2(ub1)^@mphy2+@mphy9*@fn1hy3(appcub1)*@fn1hy4(zpub1+@mphy6)*@mphy4*@fnod1(oldzub1+@od1)*@od2 ub2=@mphy3*@fn1hy2(ub2)^@mphy2+@mphy9*@fn1hy3(appcub2)*@fn1hy4(zpub2+@mphy6)*@mphy4*@fnod1(oldzub2+@od1)*@od2 ub3=@mphy3*@fn1hy2(ub3)^@mphy2+@mphy9*@fn1hy3(appcub3)*@fn1hy4(zpub3+@mphy6)*@mphy4*@fnod1(oldzub3+@od1)*@od2 endif zpa1=@mphy7+@fn1hy1(@mphy1+tempa1^@mphy8)*@mphy5 zpa2=@mphy7+@fn1hy1(@mphy1+tempa2^@mphy8)*@mphy5 zpa3=@mphy7+@fn1hy1(@mphy1+tempa3^@mphy8)*@mphy5 zpb1=@mphy7+@fn1hy1(@mphy1+tempb1^@mphy8)*@mphy5 zpb2=@mphy7+@fn1hy1(@mphy1+tempb2^@mphy8)*@mphy5 zpb3=@mphy7+@fn1hy1(@mphy1+tempb3^@mphy8)*@mphy5 ;----------------------------------------------------- zpua1=@mphy7+@fn1hy1(@mphy1+tempua1^@mphy8)*@mphy5 zpua2=@mphy7+@fn1hy1(@mphy1+tempua2^@mphy8)*@mphy5 zpua3=@mphy7+@fn1hy1(@mphy1+tempua3^@mphy8)*@mphy5 zpub1=@mphy7+@fn1hy1(@mphy1+tempub1^@mphy8)*@mphy5 zpub2=@mphy7+@fn1hy1(@mphy1+tempub2^@mphy8)*@mphy5 zpub3=@mphy7+@fn1hy1(@mphy1+tempub3^@mphy8)*@mphy5 ;----------------------------------------------------- oldza1=@od3+@fnod2(@od4+tempa1^@od5)*@od6 oldza2=@od3+@fnod2(@od4+tempa2^@od5)*@od6 oldza3=@od3+@fnod2(@od4+tempa3^@od5)*@od6 oldzb1=@od3+@fnod2(@od4+tempb1^@od5)*@od6 oldzb2=@od3+@fnod2(@od4+tempb2^@od5)*@od6 oldzb3=@od3+@fnod2(@od4+tempb3^@od5)*@od6 ;----------------------------------------------------- oldzua1=@od3+@fnod2(@od4+tempua1^@od5)*@od6 oldzua2=@od3+@fnod2(@od4+tempua2^@od5)*@od6 oldzua3=@od3+@fnod2(@od4+tempua3^@od5)*@od6 oldzub1=@od3+@fnod2(@od4+tempub1^@od5)*@od6 oldzub2=@od3+@fnod2(@od4+tempub2^@od5)*@od6 oldzub3=@od3+@fnod2(@od4+tempub3^@od5)*@od6 elseif (@formula==8);------FGZ (p1*(z^2+c)*(z^2+c))/((z^2+c)+p1)+c------------- a1=(@fgz*(@fngz1(a1+@fgz5)^@fgz1+appca1)*(@fngz2(a1+@fgz6)^@fgz2+appca1))/((@fngz3(a1+@fgz7)^@fgz3+appca1)+@fgz)+@fngz4(appca1)*@fgz4 a2=(@fgz*(@fngz1(a2+@fgz5)^@fgz1+appca2)*(@fngz2(a2+@fgz6)^@fgz2+appca2))/((@fngz3(a2+@fgz7)^@fgz3+appca2)+@fgz)+@fngz4(appca2)*@fgz4 a3=(@fgz*(@fngz1(a3+@fgz5)^@fgz1+appca3)*(@fngz2(a3+@fgz6)^@fgz2+appca3))/((@fngz3(a3+@fgz7)^@fgz3+appca3)+@fgz)+@fngz4(appca3)*@fgz4 b1=(@fgz*(@fngz1(b1+@fgz5)^@fgz1+appcb1)*(@fngz2(b1+@fgz6)^@fgz2+appcb1))/((@fngz3(b1+@fgz7)^@fgz3+appcb1)+@fgz)+@fngz4(appcb1)*@fgz4 b2=(@fgz*(@fngz1(b2+@fgz5)^@fgz1+appcb2)*(@fngz2(b2+@fgz6)^@fgz2+appcb2))/((@fngz3(b2+@fgz7)^@fgz3+appcb2)+@fgz)+@fngz4(appcb2)*@fgz4 b3=(@fgz*(@fngz1(b3+@fgz5)^@fgz1+appcb3)*(@fngz2(b3+@fgz6)^@fgz2+appcb3))/((@fngz3(b3+@fgz7)^@fgz3+appcb3)+@fgz)+@fngz4(appcb3)*@fgz4 ua1=(@fgz*(@fngz1(ua1+@fgz5)^@fgz1+appcua1)*(@fngz2(ua1+@fgz6)^@fgz2+appcua1))/((@fngz3(ua1+@fgz7)^@fgz3+appcua1)+@fgz)+@fngz4(appcua1)*@fgz4 ua2=(@fgz*(@fngz1(ua2+@fgz5)^@fgz1+appcua2)*(@fngz2(ua2+@fgz6)^@fgz2+appcua2))/((@fngz3(ua2+@fgz7)^@fgz3+appcua2)+@fgz)+@fngz4(appcua2)*@fgz4 ua3=(@fgz*(@fngz1(ua3+@fgz5)^@fgz1+appcua3)*(@fngz2(ua3+@fgz6)^@fgz2+appcua3))/((@fngz3(ua3+@fgz7)^@fgz3+appcua3)+@fgz)+@fngz4(appcua3)*@fgz4 ub1=(@fgz*(@fngz1(ub1+@fgz5)^@fgz1+appcub1)*(@fngz2(ub1+@fgz6)^@fgz2+appcub1))/((@fngz3(ub1+@fgz7)^@fgz3+appcub1)+@fgz)+@fngz4(appcub1)*@fgz4 ub2=(@fgz*(@fngz1(ub2+@fgz5)^@fgz1+appcub2)*(@fngz2(ub2+@fgz6)^@fgz2+appcub2))/((@fngz3(ub2+@fgz7)^@fgz3+appcub2)+@fgz)+@fngz4(appcub2)*@fgz4 ub3=(@fgz*(@fngz1(ub3+@fgz5)^@fgz1+appcub3)*(@fngz2(ub3+@fgz6)^@fgz2+appcub3))/((@fngz3(ub3+@fgz7)^@fgz3+appcub3)+@fgz)+@fngz4(appcub3)*@fgz4 elseif (@formula==9);------Ikenaga--------------------------------------------- a1=@fike(a1+@ike6)^@ike1+(appca1-@ike4)*@fike1(a1-@ike3)+@fike2(appca1*@ike5)^@ike2 a2=@fike(a2+@ike6)^@ike1+(appca2-@ike4)*@fike1(a2-@ike3)+@fike2(appca2*@ike5)^@ike2 a3=@fike(a3+@ike6)^@ike1+(appca3-@ike4)*@fike1(a3-@ike3)+@fike2(appca3*@ike5)^@ike2 b1=@fike(b1+@ike6)^@ike1+(appcb1-@ike4)*@fike1(b1-@ike3)+@fike2(appcb1*@ike5)^@ike2 b2=@fike(b2+@ike6)^@ike1+(appcb2-@ike4)*@fike1(b2-@ike3)+@fike2(appcb2*@ike5)^@ike2 b3=@fike(b3+@ike6)^@ike1+(appcb3-@ike4)*@fike1(b3-@ike3)+@fike2(appcb3*@ike5)^@ike2 ua1=@fike(ua1+@ike6)^@ike1+(appcua1-@ike4)*@fike1(ua1-@ike3)+@fike2(appcua1*@ike5)^@ike2 ua2=@fike(ua2+@ike6)^@ike1+(appcua2-@ike4)*@fike1(ua2-@ike3)+@fike2(appcua2*@ike5)^@ike2 ua3=@fike(ua3+@ike6)^@ike1+(appcua3-@ike4)*@fike1(ua3-@ike3)+@fike2(appcua3*@ike5)^@ike2 ub1=@fike(ub1+@ike6)^@ike1+(appcub1-@ike4)*@fike1(ub1-@ike3)+@fike2(appcub1*@ike5)^@ike2 ub2=@fike(ub2+@ike6)^@ike1+(appcub2-@ike4)*@fike1(ub2-@ike3)+@fike2(appcub2*@ike5)^@ike2 ub3=@fike(ub3+@ike6)^@ike1+(appcub3-@ike4)*@fike1(ub3-@ike3)+@fike2(appcub3*@ike5)^@ike2 elseif (@formula==10);-------------------Magnet CplxSpirals-------------------- if @magnetCplx==0 a1=( (@fmcp1(a1+@mcp5)*@fmcp2(a1)+(appca1-@mcp1)) / (appca1/@fmcp3(a1+@mcp6)*@mcp4+(appca1-@mcp2)) )^@mcp-@mcp3 a2=( (@fmcp1(a2+@mcp5)*@fmcp2(a2)+(appca2-@mcp1)) / (appca2/@fmcp3(a2+@mcp6)*@mcp4+(appca2-@mcp2)) )^@mcp-@mcp3 a3=( (@fmcp1(a3+@mcp5)*@fmcp2(a3)+(appca3-@mcp1)) / (appca3/@fmcp3(a3+@mcp6)*@mcp4+(appca3-@mcp2)) )^@mcp-@mcp3 b1=( (@fmcp1(b1+@mcp5)*@fmcp2(b1)+(appcb1-@mcp1)) / (appcb1/@fmcp3(b1+@mcp6)*@mcp4+(appcb1-@mcp2)) )^@mcp-@mcp3 b2=( (@fmcp1(b2+@mcp5)*@fmcp2(b2)+(appcb2-@mcp1)) / (appcb2/@fmcp3(b2+@mcp6)*@mcp4+(appcb2-@mcp2)) )^@mcp-@mcp3 b3=( (@fmcp1(b3+@mcp5)*@fmcp2(b3)+(appcb3-@mcp1)) / (appcb3/@fmcp3(b3+@mcp6)*@mcp4+(appcb3-@mcp2)) )^@mcp-@mcp3 ua1=( (@fmcp1(ua1+@mcp5)*@fmcp2(ua1)+(appcua1-@mcp1)) / (appcua1/@fmcp3(ua1+@mcp6)*@mcp4+(appcua1-@mcp2)) )^@mcp-@mcp3 ua2=( (@fmcp1(ua2+@mcp5)*@fmcp2(ua2)+(appcua2-@mcp1)) / (appcua2/@fmcp3(ua2+@mcp6)*@mcp4+(appcua2-@mcp2)) )^@mcp-@mcp3 ua3=( (@fmcp1(ua3+@mcp5)*@fmcp2(ua3)+(appcua3-@mcp1)) / (appcua3/@fmcp3(ua3+@mcp6)*@mcp4+(appcua3-@mcp2)) )^@mcp-@mcp3 ub1=( (@fmcp1(ub1+@mcp5)*@fmcp2(ub1)+(appcub1-@mcp1)) / (appcub1/@fmcp3(ub1+@mcp6)*@mcp4+(appcub1-@mcp2)) )^@mcp-@mcp3 ub2=( (@fmcp1(ub2+@mcp5)*@fmcp2(ub2)+(appcub2-@mcp1)) / (appcub2/@fmcp3(ub2+@mcp6)*@mcp4+(appcub2-@mcp2)) )^@mcp-@mcp3 ub3=( (@fmcp1(ub3+@mcp5)*@fmcp2(ub3)+(appcub3-@mcp1)) / (appcub3/@fmcp3(ub3+@mcp6)*@mcp4+(appcub3-@mcp2)) )^@mcp-@mcp3 elseif @magnetCplx==1 a1=( (@fmcp1(a1+@mcp5)*@fmcp2(a1)+(appca1-@mcp1)) / (appca1*@fmcp3(a1+@mcp6)*@mcp4+(appca1-@mcp2)) )^@mcp-@mcp3 a2=( (@fmcp1(a2+@mcp5)*@fmcp2(a2)+(appca2-@mcp1)) / (appca2*@fmcp3(a2+@mcp6)*@mcp4+(appca2-@mcp2)) )^@mcp-@mcp3 a3=( (@fmcp1(a3+@mcp5)*@fmcp2(a3)+(appca3-@mcp1)) / (appca3*@fmcp3(a3+@mcp6)*@mcp4+(appca3-@mcp2)) )^@mcp-@mcp3 b1=( (@fmcp1(b1+@mcp5)*@fmcp2(b1)+(appcb1-@mcp1)) / (appcb1*@fmcp3(b1+@mcp6)*@mcp4+(appcb1-@mcp2)) )^@mcp-@mcp3 b2=( (@fmcp1(b2+@mcp5)*@fmcp2(b2)+(appcb2-@mcp1)) / (appcb2*@fmcp3(b2+@mcp6)*@mcp4+(appcb2-@mcp2)) )^@mcp-@mcp3 b3=( (@fmcp1(b3+@mcp5)*@fmcp2(b3)+(appcb3-@mcp1)) / (appcb3*@fmcp3(b3+@mcp6)*@mcp4+(appcb3-@mcp2)) )^@mcp-@mcp3 ua1=( (@fmcp1(ua1+@mcp5)*@fmcp2(ua1)+(appcua1-@mcp1)) / (appcua1*@fmcp3(ua1+@mcp6)*@mcp4+(appcua1-@mcp2)) )^@mcp-@mcp3 ua2=( (@fmcp1(ua2+@mcp5)*@fmcp2(ua2)+(appcua2-@mcp1)) / (appcua2*@fmcp3(ua2+@mcp6)*@mcp4+(appcua2-@mcp2)) )^@mcp-@mcp3 ua3=( (@fmcp1(ua3+@mcp5)*@fmcp2(ua3)+(appcua3-@mcp1)) / (appcua3*@fmcp3(ua3+@mcp6)*@mcp4+(appcua3-@mcp2)) )^@mcp-@mcp3 ub1=( (@fmcp1(ub1+@mcp5)*@fmcp2(ub1)+(appcub1-@mcp1)) / (appcub1*@fmcp3(ub1+@mcp6)*@mcp4+(appcub1-@mcp2)) )^@mcp-@mcp3 ub2=( (@fmcp1(ub2+@mcp5)*@fmcp2(ub2)+(appcub2-@mcp1)) / (appcub2*@fmcp3(ub2+@mcp6)*@mcp4+(appcub2-@mcp2)) )^@mcp-@mcp3 ub3=( (@fmcp1(ub3+@mcp5)*@fmcp2(ub3)+(appcub3-@mcp1)) / (appcub3*@fmcp3(ub3+@mcp6)*@mcp4+(appcub3-@mcp2)) )^@mcp-@mcp3 elseif @magnetCplx==2 a1=( (@fmcp1(a1+@mcp5)*@fmcp2(a1)+(appca1-@mcp1)) / (@fmcp3(a1+@mcp6)*@mcp4+(appca1-@mcp2)) )^@mcp-@mcp3*a1 a2=( (@fmcp1(a2+@mcp5)*@fmcp2(a2)+(appca2-@mcp1)) / (@fmcp3(a2+@mcp6)*@mcp4+(appca2-@mcp2)) )^@mcp-@mcp3*a2 a3=( (@fmcp1(a3+@mcp5)*@fmcp2(a3)+(appca3-@mcp1)) / (@fmcp3(a3+@mcp6)*@mcp4+(appca3-@mcp2)) )^@mcp-@mcp3*a3 b1=( (@fmcp1(b1+@mcp5)*@fmcp2(b1)+(appcb1-@mcp1)) / (@fmcp3(b1+@mcp6)*@mcp4+(appcb1-@mcp2)) )^@mcp-@mcp3*b1 b2=( (@fmcp1(b2+@mcp5)*@fmcp2(b2)+(appcb2-@mcp1)) / (@fmcp3(b2+@mcp6)*@mcp4+(appcb2-@mcp2)) )^@mcp-@mcp3*b2 b3=( (@fmcp1(b3+@mcp5)*@fmcp2(b3)+(appcb3-@mcp1)) / (@fmcp3(b3+@mcp6)*@mcp4+(appcb3-@mcp2)) )^@mcp-@mcp3*b3 ua1=( (@fmcp1(ua1+@mcp5)*@fmcp2(ua1)+(appcua1-@mcp1)) / (@fmcp3(ua1+@mcp6)*@mcp4+(appcua1-@mcp2)) )^@mcp-@mcp3*ua1 ua2=( (@fmcp1(ua2+@mcp5)*@fmcp2(ua2)+(appcua2-@mcp1)) / (@fmcp3(ua2+@mcp6)*@mcp4+(appcua2-@mcp2)) )^@mcp-@mcp3*ua2 ua3=( (@fmcp1(ua3+@mcp5)*@fmcp2(ua3)+(appcua3-@mcp1)) / (@fmcp3(ua3+@mcp6)*@mcp4+(appcua3-@mcp2)) )^@mcp-@mcp3*ua3 ub1=( (@fmcp1(ub1+@mcp5)*@fmcp2(ub1)+(appcub1-@mcp1)) / (@fmcp3(ub1+@mcp6)*@mcp4+(appcub1-@mcp2)) )^@mcp-@mcp3*ub1 ub2=( (@fmcp1(ub2+@mcp5)*@fmcp2(ub2)+(appcub2-@mcp1)) / (@fmcp3(ub2+@mcp6)*@mcp4+(appcub2-@mcp2)) )^@mcp-@mcp3*ub2 ub3=( (@fmcp1(ub3+@mcp5)*@fmcp2(ub3)+(appcub3-@mcp1)) / (@fmcp3(ub3+@mcp6)*@mcp4+(appcub3-@mcp2)) )^@mcp-@mcp3*ub3 endif elseif (@formula==11);-------------------Num Dup------------------------------- ; z = (z*z + (c+1))^2 / (2*z + (c-1)) a1=(@fn1num(a1)*@fn2num(a1+@num6)+(@fn4num(appca1)+@num1)*@num4)^@num3/(@num8*@fn3num(a1+@num7)+(@fn5num(appca1)-@num2)*@num5) a2=(@fn1num(a2)*@fn2num(a2+@num6)+(@fn4num(appca2)+@num1)*@num4)^@num3/(@num8*@fn3num(a2+@num7)+(@fn5num(appca2)-@num2)*@num5) a3=(@fn1num(a3)*@fn2num(a3+@num6)+(@fn4num(appca3)+@num1)*@num4)^@num3/(@num8*@fn3num(a3+@num7)+(@fn5num(appca3)-@num2)*@num5) b1=(@fn1num(b1)*@fn2num(b1+@num6)+(@fn4num(appcb1)+@num1)*@num4)^@num3/(@num8*@fn3num(b1+@num7)+(@fn5num(appcb1)-@num2)*@num5) b2=(@fn1num(b2)*@fn2num(b2+@num6)+(@fn4num(appcb2)+@num1)*@num4)^@num3/(@num8*@fn3num(b2+@num7)+(@fn5num(appcb2)-@num2)*@num5) b3=(@fn1num(b3)*@fn2num(b3+@num6)+(@fn4num(appcb3)+@num1)*@num4)^@num3/(@num8*@fn3num(b3+@num7)+(@fn5num(appcb3)-@num2)*@num5) ua1=(@fn1num(ua1)*@fn2num(ua1+@num6)+(@fn4num(appcua1)+@num1)*@num4)^@num3/(@num8*@fn3num(ua1+@num7)+(@fn5num(appcua1)-@num2)*@num5) ua2=(@fn1num(ua2)*@fn2num(ua2+@num6)+(@fn4num(appcua2)+@num1)*@num4)^@num3/(@num8*@fn3num(ua2+@num7)+(@fn5num(appcua2)-@num2)*@num5) ua3=(@fn1num(ua3)*@fn2num(ua3+@num6)+(@fn4num(appcua3)+@num1)*@num4)^@num3/(@num8*@fn3num(ua3+@num7)+(@fn5num(appcua3)-@num2)*@num5) ub1=(@fn1num(ub1)*@fn2num(ub1+@num6)+(@fn4num(appcub1)+@num1)*@num4)^@num3/(@num8*@fn3num(ub1+@num7)+(@fn5num(appcub1)-@num2)*@num5) ub2=(@fn1num(ub2)*@fn2num(ub2+@num6)+(@fn4num(appcub2)+@num1)*@num4)^@num3/(@num8*@fn3num(ub2+@num7)+(@fn5num(appcub2)-@num2)*@num5) ub3=(@fn1num(ub3)*@fn2num(ub3+@num6)+(@fn4num(appcub3)+@num1)*@num4)^@num3/(@num8*@fn3num(ub3+@num7)+(@fn5num(appcub3)-@num2)*@num5) a1 = (a1+@num9)*@num10 a2 = (a2+@num9)*@num10 a3 = (a3+@num9)*@num10 b1 = (b1+@num9)*@num10 b2 = (b2+@num9)*@num10 b3 = (b3+@num9)*@num10 ua1 = (ua1+@num9)*@num10 ua2 = (ua2+@num9)*@num10 ua3 = (ua3+@num9)*@num10 ub1 = (ub1+@num9)*@num10 ub2 = (ub2+@num9)*@num10 ub3 = (ub3+@num9)*@num10 elseif (@formula==12);-------------------Phoenix------------------------------- newa1=@fnpho1(a1+@phoe3)^@phoe+@fnpho2(a1+@phoe4)^@phoe1*appca1+@phoe2*@fnpho3(ya1) newa2=@fnpho1(a2+@phoe3)^@phoe+@fnpho2(a2+@phoe4)^@phoe1*appca2+@phoe2*@fnpho3(ya2) newa3=@fnpho1(a3+@phoe3)^@phoe+@fnpho2(a3+@phoe4)^@phoe1*appca3+@phoe2*@fnpho3(ya3) newb1=@fnpho1(b1+@phoe3)^@phoe+@fnpho2(b1+@phoe4)^@phoe1*appcb1+@phoe2*@fnpho3(yb1) newb2=@fnpho1(b2+@phoe3)^@phoe+@fnpho2(b2+@phoe4)^@phoe1*appcb2+@phoe2*@fnpho3(yb2) newb3=@fnpho1(b3+@phoe3)^@phoe+@fnpho2(b3+@phoe4)^@phoe1*appcb3+@phoe2*@fnpho3(yb3) newua1=@fnpho1(ua1+@phoe3)^@phoe+@fnpho2(ua1+@phoe4)^@phoe1*appcua1+@phoe2*@fnpho3(yua1) newua2=@fnpho1(ua2+@phoe3)^@phoe+@fnpho2(ua2+@phoe4)^@phoe1*appcua2+@phoe2*@fnpho3(yua2) newua3=@fnpho1(ua3+@phoe3)^@phoe+@fnpho2(ua3+@phoe4)^@phoe1*appcua3+@phoe2*@fnpho3(yua3) newub1=@fnpho1(ub1+@phoe3)^@phoe+@fnpho2(ub1+@phoe4)^@phoe1*appcub1+@phoe2*@fnpho3(yub1) newub2=@fnpho1(ub2+@phoe3)^@phoe+@fnpho2(ub2+@phoe4)^@phoe1*appcub2+@phoe2*@fnpho3(yub2) newub3=@fnpho1(ub3+@phoe3)^@phoe+@fnpho2(ub3+@phoe4)^@phoe1*appcub3+@phoe2*@fnpho3(yub3) ya1=a1 ya2=a2 ya3=a3 yb1=b1 yb2=b2 yb3=b3 yua1=ua1 yua2=ua2 yua3=ua3 yub1=ub1 yub2=ub2 yub3=ub3 a1=newa1 a2=newa2 a3=newa3 b1=newb1 b2=newb2 b3=newb3 ua1=newua1 ua2=newua2 ua3=newua3 ub1=newub1 ub2=newub2 ub3=newub3 elseif (@formula==13);-------------------Flattop------------------------------- a1 = @fnflat1(a1+@flat1)^@flat3 + (@fnflat2(appca1)*(@fnflat3(a1+@flat4)))/(@fnflat4(a1)-@flat2) a2 = @fnflat1(a2+@flat1)^@flat3 + (@fnflat2(appca2)*(@fnflat3(a2+@flat4)))/(@fnflat4(a2)-@flat2) a3 = @fnflat1(a3+@flat1)^@flat3 + (@fnflat2(appca3)*(@fnflat3(a3+@flat4)))/(@fnflat4(a3)-@flat2) b1 = @fnflat1(b1+@flat1)^@flat3 + (@fnflat2(appcb1)*(@fnflat3(b1+@flat4)))/(@fnflat4(b1)-@flat2) b2 = @fnflat1(b2+@flat1)^@flat3 + (@fnflat2(appcb2)*(@fnflat3(b2+@flat4)))/(@fnflat4(b2)-@flat2) b3 = @fnflat1(b3+@flat1)^@flat3 + (@fnflat2(appcb3)*(@fnflat3(b3+@flat4)))/(@fnflat4(b3)-@flat2) ua1 = @fnflat1(ua1+@flat1)^@flat3 + (@fnflat2(appcua1)*(@fnflat3(ua1+@flat4)))/(@fnflat4(ua1)-@flat2) ua2 = @fnflat1(ua2+@flat1)^@flat3 + (@fnflat2(appcua2)*(@fnflat3(ua2+@flat4)))/(@fnflat4(ua2)-@flat2) ua3 = @fnflat1(ua3+@flat1)^@flat3 + (@fnflat2(appcua3)*(@fnflat3(ua3+@flat4)))/(@fnflat4(ua3)-@flat2) ub1 = @fnflat1(ub1+@flat1)^@flat3 + (@fnflat2(appcub1)*(@fnflat3(ub1+@flat4)))/(@fnflat4(ub1)-@flat2) ub2 = @fnflat1(ub2+@flat1)^@flat3 + (@fnflat2(appcub2)*(@fnflat3(ub2+@flat4)))/(@fnflat4(ub2)-@flat2) ub3 = @fnflat1(ub3+@flat1)^@flat3 + (@fnflat2(appcub3)*(@fnflat3(ub3+@flat4)))/(@fnflat4(ub3)-@flat2) elseif (@formula==14);-------------------Mandelvar------------------------------- a1 = ( (@fnmvar1(a1+@mvar2)*@fnmvar2(appca1+@mvar3)) / (@fnmvar3(a1+@mvar4)*@fnmvar4(appca1)+@mvar1) + @fnmvar5(a1+@mvar5) ) ^2 + @fnmvar6(appca1) a2 = ( (@fnmvar1(a2+@mvar2)*@fnmvar2(appca2+@mvar3)) / (@fnmvar3(a2+@mvar4)*@fnmvar4(appca2)+@mvar1) + @fnmvar5(a2+@mvar5) ) ^2 + @fnmvar6(appca2) a3 = ( (@fnmvar1(a3+@mvar2)*@fnmvar2(appca3+@mvar3)) / (@fnmvar3(a3+@mvar4)*@fnmvar4(appca3)+@mvar1) + @fnmvar5(a3+@mvar5) ) ^2 + @fnmvar6(appca3) b1 = ( (@fnmvar1(b1+@mvar2)*@fnmvar2(appcb1+@mvar3)) / (@fnmvar3(b1+@mvar4)*@fnmvar4(appcb1)+@mvar1) + @fnmvar5(b1+@mvar5) ) ^2 + @fnmvar6(appcb1) b2 = ( (@fnmvar1(b2+@mvar2)*@fnmvar2(appcb2+@mvar3)) / (@fnmvar3(b2+@mvar4)*@fnmvar4(appcb2)+@mvar1) + @fnmvar5(b2+@mvar5) ) ^2 + @fnmvar6(appcb2) b3 = ( (@fnmvar1(b3+@mvar2)*@fnmvar2(appcb3+@mvar3)) / (@fnmvar3(b3+@mvar4)*@fnmvar4(appcb3)+@mvar1) + @fnmvar5(b3+@mvar5) ) ^2 + @fnmvar6(appcb3) ua1 = ( (@fnmvar1(ua1+@mvar2)*@fnmvar2(appcua1+@mvar3)) / (@fnmvar3(ua1+@mvar4)*@fnmvar4(appcua1)+@mvar1) + @fnmvar5(ua1+@mvar5) ) ^2 + @fnmvar6(appcua1) ua2 = ( (@fnmvar1(ua2+@mvar2)*@fnmvar2(appcua2+@mvar3)) / (@fnmvar3(ua2+@mvar4)*@fnmvar4(appcua2)+@mvar1) + @fnmvar5(ua2+@mvar5) ) ^2 + @fnmvar6(appcua2) ua3 = ( (@fnmvar1(ua3+@mvar2)*@fnmvar2(appcua3+@mvar3)) / (@fnmvar3(ua3+@mvar4)*@fnmvar4(appcua3)+@mvar1) + @fnmvar5(ua3+@mvar5) ) ^2 + @fnmvar6(appcua3) ub1 = ( (@fnmvar1(ub1+@mvar2)*@fnmvar2(appcub1+@mvar3)) / (@fnmvar3(ub1+@mvar4)*@fnmvar4(appcub1)+@mvar1) + @fnmvar5(ub1+@mvar5) ) ^2 + @fnmvar6(appcub1) ub2 = ( (@fnmvar1(ub2+@mvar2)*@fnmvar2(appcub2+@mvar3)) / (@fnmvar3(ub2+@mvar4)*@fnmvar4(appcub2)+@mvar1) + @fnmvar5(ub2+@mvar5) ) ^2 + @fnmvar6(appcub2) ub3 = ( (@fnmvar1(ub3+@mvar2)*@fnmvar2(appcub3+@mvar3)) / (@fnmvar3(ub3+@mvar4)*@fnmvar4(appcub3)+@mvar1) + @fnmvar5(ub3+@mvar5) ) ^2 + @fnmvar6(appcub3) endif ;------------------------Now combine the result of hypercomplex----------------- zr1=(real(a1)+real(b1))/2 zr2=(real(a2)+real(b2))/2 zr3=(real(a3)+real(b3))/2 zi1=(imag(a1)+imag(b1))/2 zi2=(imag(a2)+imag(b2))/2 zi3=(imag(a3)+imag(b3))/2 zur1=(real(ua1)+real(ub1))/2 zur2=(real(ua2)+real(ub2))/2 zur3=(real(ua3)+real(ub3))/2 zui1=(imag(ua1)+imag(ub1))/2 zui2=(imag(ua2)+imag(ub2))/2 zui3=(imag(ua3)+imag(ub3))/2 wr1=(imag(a1)-imag(b1))/2 wr2=(imag(a2)-imag(b2))/2 wr3=(imag(a3)-imag(b3))/2 wi1=(real(b1)-real(a1))/2 wi2=(real(b2)-real(a2))/2 wi3=(real(b3)-real(a3))/2 ur1=(imag(ua1)-imag(ub1))/2 ur2=(imag(ua2)-imag(ub2))/2 ur3=(imag(ua3)-imag(ub3))/2 ui1=(real(ub1)-real(ua1))/2 ui2=(real(ub2)-real(ua2))/2 ui3=(real(ub3)-real(ua3))/2 za1=(zr1+flip(zi1)) za2=(zr2+flip(zi2)) za3=(zr3+flip(zi3)) zb1=(zur1+flip(zui1)) zb2=(zur2+flip(zui2)) zb3=(zur3+flip(zui3)) zz1=(za1+zb1)/2 zz2=(za2+zb2)/2 zz3=(za3+zb3)/2 ;------------------------------Lazt Z and Flavor------------------------------- z1=@fnfl(zz1+@fl1)*@fl2 z2=@fnfl(zz2+@fl1)*@fl2 z3=@fnfl(zz3+@fl1)*@fl2 w1=wr1+flip(wi1) w2=wr2+flip(wi2) w3=wr3+flip(wi3) u1=ur1+flip(ui1) u2=ur2+flip(ui2) u3=ur3+flip(ui3) if (@slope == true) ;;;; process slope if (@zmode == 85) iterexp1 = iterexp1 + exp(-cabs(z1)) iterexp2 = iterexp2 + exp(-cabs(z2)) iterexp3 = iterexp3 + exp(-cabs(z3)) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from the i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from the r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from the i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 5) ; smallest |function1(z)| d1 = abs(real(@fnsl(z1))) + abs(imag(@fnsl(z1))) ; get current distances d2 = abs(real(@fnsl(z2))) + abs(imag(@fnsl(z2))) d3 = abs(real(@fnsl(z3))) + abs(imag(@fnsl(z3))) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 6) ; smallest |function2(z)| d1 = cabs(@fnsl(z1)) ; get current distances d2 = cabs(@fnsl(z2)) d3 = cabs(@fnsl(z3)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 7) ; smallest Lemniscate Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(2*theta))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 8) ; smallest Cardiod Distance theta = atan(imag(#z)/real(#z)) r = 5*@a*(1-cos(theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 9) ; smallest Conchoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*(@a + @b*cos(theta))/cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 10) ; smallest Cycloid Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*cabs(#z) polar = r*(theta-sin(theta)) + flip(r*(1-cos(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 11) ; smallest Archimedes Distance theta = atan(imag(#z)/real(#z)) r = 3.5*@a*theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 12) ; smallest Log Spiral Distance theta = atan(imag(#z)/real(#z)) r = exp(@a*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 13) ; smallest Rose Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 14) ; smallest Bifolium Distance theta = atan(imag(#z)/real(#z)) r = 16*@a*sin(theta)^2*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 15) ; smallest Astroid Distance theta = atan(imag(#z)/real(#z)) af1 = @afn1(theta)^imag(@apwr) af2 = @afn2(theta)^imag(@apwr) polar = 1.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 16) ; smallest Cissoid of Diocles Distance theta = atan(imag(#z)/real(#z)) r = 2*@a*sin(theta)*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 17) ; smallest Cochleoid Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*sin(theta)/theta polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 18) ; smallest Folium of Descartes Distance theta = atan(imag(#z)/real(#z)) r = @a*tan(theta)/(cos(theta)*(1+tan(theta)^3)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 19) ; smallest Limacon of Pascal Distance theta = atan(imag(#z)/real(#z)) r = 0.03*@b + 1.5*@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 20) ; smallest Lituus Distance theta = atan(imag(#z)/real(#z)) r = 0.6*@a/theta^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 21) ; smallest Nephroid Distance theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) - @afn1(theta/3) af2 = 3*@afn2(theta) - @afn2(theta/3) polar = 0.75*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 22) ; smallest Strophoid Distance theta = atan(imag(#z)/real(#z)) r = 0.2*@b*sin(@a-2*theta)/sin(@a-theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 23) ; smallest Witch of Agnesi theta = atan(imag(#z)/real(#z)) af1 = 2*cotan(theta) af2 = 1-cos(2*theta) polar = 0.1*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 24) ; smallest Curtate Cycloid theta = atan(imag(#z)/real(#z)) af1 = 2*@a*theta - 0.1*@b*@afn2(theta) af2 = 2*@a - 0.1*@b*@afn1(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 25) ; smallest Epicycloid theta = atan(imag(#z)/real(#z)) af1 = (5*@a+@b)*@afn1(theta) - @b*@afn1((5*@a+@b)*theta/@b) af2 = (5*@a+@b)*@afn2(theta) - @b*@afn2((5*@a+@b)*theta/@b) polar = 0.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 26) ; smallest Ellipse Evolute theta = atan(imag(#z)/real(#z)) af1 = (@a^2-(0.7*@b)^2)/@a*@afn1(theta)^(real(@apwr)) af2 = ((0.7*@b)^2-@a^2)/(0.7*@b)*@afn2(theta)^(imag(@apwr)) polar = 0.2*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 27) ; smallest Tractrix theta = atan(imag(#z)/real(#z)) af1 = @a*(log(tan(theta/2))-@afn1(theta)) af2 = @a*@afn2(theta) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 28) ; smallest Kampyle of Eudoxus Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta)^2 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 29) ; smallest Circle Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*(1-3*2*@b*cos(theta)+2*2*@b*cos(theta)^3)/(-(1+2*(2*@b)^2)+3*2*@b*cos(theta)) af2 = 2*(2*@b)^2*sin(theta)^3/(1+2*(2*@b)^2-3*@b*cos(theta)) polar = 1.5*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 30) ; smallest Deltoid Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 3*@afn1(theta) + @afn1(3*theta+#pi/2*@b) - @afn1(#pi/2*@b) af2 = 3*@afn2(theta) + @afn2(3*theta+#pi/2*@b) - @afn2(#pi/2*@b) polar = 0.35*@a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 31) ; smallest Ellipse Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 4*@a*(@a-@b)*(@a*@b)*sin(theta)^3/(@a^2+@b^2+(@b^2-@a^2)*cos(2*theta)) af2 = 4*@b*(@b^2-@a^2)*cos(theta)^3/(@a^2+@b^2+3*(@b^2-@a^2)*cos(2*theta)) polar = 0.25*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 32) ; smallest Log Spiral Catacaustic theta = atan(imag(#z)/real(#z)) af1 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)-sin(theta))/(1+(2*@b^2)) af2 = 2*@b*exp(2*@b*theta)*(2*@b*cos(theta)+sin(theta))/(1+(2*@b^2)) polar = @a*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 33) ; smallest Butterfly Distance theta = atan(imag(#z)/real(#z)) r = 1.25*@a*(exp(sin(theta))-2*cos(4*theta)+sin(1/24*(2*theta-#pi))) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 34) ; smallest Gear Curve theta = atan(imag(#z)/real(#z)) af1 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*cos(theta) af2 = (0.25*@a+1/@b*tanh(@b*sin(@pn*theta)))*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 35) ; smallest Arachnida 1 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn-1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 36) ; smallest Arachnida 2 Distance theta = atan(imag(#z)/real(#z)) r = @a*sin(@pn*theta)/sin((@pn+1)*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 37) ; smallest Cayley's Sextic Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*cos(theta)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 38) ; smallest Cycloid of Seva Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a*(1+2*cos(2*theta)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 39) ; smallest Devil's Curve Distance theta = atan(imag(#z)/real(#z)) r = (((0.5*@a*sin(theta))^2-(0.2*@b*cos(theta))^2)/(sin(theta)^2-cos(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 40) ; smallest Eight Curve Distance theta = atan(imag(#z)/real(#z)) r = @a*cos(theta)^(-2)*cos(2*theta)^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 41) ; smallest Epispiral Distance theta = atan(imag(#z)/real(#z)) r = 0.25*@a/cos(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 42) ; smallest Hipopede Distance theta = atan(imag(#z)/real(#z)) r = (0.5*@b*(0.5*@a-(0.5*@b)^2*cos(theta)))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 43) ; smallest Maltese Cross Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@a/(cos(theta)*sin(theta)*(cos(theta)^2-sin(theta)^2))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 44) ; smallest Ophiuride Distance theta = atan(imag(#z)/real(#z)) r = (0.01*@b*sin(theta)-4.5*@a*cos(theta))*tan(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 45) ; smallest Quadratrix of Hippias Distance theta = atan(imag(#z)/real(#z)) r = @a*theta/sin(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 46) ; smallest Poinsot Spiral 1 Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a/cosh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 47) ; smallest Poinsot Spiral 2 Distance theta = atan(imag(#z)/real(#z)) r = @a/sinh(@pn*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 48) ; smallest Quadrifolium Distance theta = atan(imag(#z)/real(#z)) r = 2.5*@a*sin(2*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 49) ; smallest Scarabaeus Distance theta = atan(imag(#z)/real(#z)) r = 0.5*@b*cos(2*theta)-@a*cos(theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 50) ; smallest Semicubical Parabola Distance theta = atan(imag(#z)/real(#z)) r = 1.5*@a*(cos(3*@b*theta))^(1/(3*@b)) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 51) ; smallest Swastika Curve Distance theta = atan(imag(#z)/real(#z)) r = 2.25*@a*(sin(theta)*cos(theta)/(sin(theta)^4-cos(theta)^4))^0.5 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 52) ; smallest Trifolium Distance theta = atan(imag(#z)/real(#z)) r = -2*@a*cos(3*theta) polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 53) ; smallest Tschirnhausen Cubic Distance theta = atan(imag(#z)/real(#z)) r = @a/cos(theta/3)^3 polar = r*cos(theta) + flip(r*sin(theta)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 54) ; smallest Bicorn theta = atan(imag(#z)/real(#z)) af1 = @a*sin(theta) af2 = @a*cos(theta)^2*(2+cos(theta))/(3+sin(theta)^2) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 55) ; smallest Cruciform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a/cos(theta) af2 = 0.02*@b/sin(theta) polar = 1.5*(af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 56) ; smallest Knot curve cy = imag(#z) qa = 1 qb = -2 qc = 1 - 3*cy^2 - 2*cy^3 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 57) ; smallest Ampersand qa = 4 qb = 6*real(#z)^2 - 3*real(#z) - 3 qc = 6*real(#z)^4 - 13*real(#z)^3 + 19*real(#z)^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(real(#z) + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 58) ; smallest Bean theta = atan(imag(#z)/real(#z)) af1 = @a*(@afn1(theta)^real(@apwr) + @afn2(theta)^imag(@apwr)) polar = ((af1*cos(theta))+flip((af1*sin(theta)))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 59) ; smallest Bicuspid cy = imag(#z) qa = 1 qb = -2*(0.05*@b)^2 qc = (0.05*@b)^4 - (cy^2 - (0.05*@b)^2)^2 if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = 2.25*@a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 60) ; smallest Bow theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1-tan(theta)^2)*cos(theta) af2 = 0.1*@b*(1-tan(theta)^2)*sin(theta) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 61) ; smallest Cassini Ovals theta = atan(imag(#z)/real(#z)) if @negroot == true rr = 0.5*@a*(cos(2*theta)-((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 else rr = 0.5*@a*(cos(2*theta)+((@b*0.1/(@a*0.5))^4-sin(2*theta)^2)^0.5)^0.5 endif polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 62) ; smallest Circle theta = atan(imag(#z)/real(#z)) rr = @a*sin(theta)^2 + 0.2*@b*cos(theta)^2 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 63) ; smallest Trident cx = real(#z) cy = cx^2 + 0.1*@b/cx polar = 0.1*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 64) ; smallest Stirrup Curve cy = imag(#z) qa = 1 qb = -2 qc = 1-cy^2*(cy-1)*(cy-2)*(cy+5) if @negroot == true qx = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qx = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(qx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 65) ; smallest Diamond polar = @a*@safn(abs((real(#z)*@sa1))+abs((flip(imag(#z))^@sa2))-1) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 66) ; smallest Dumbbell Curve cx = real(#z) cy = (cx^4 - cx^6)^0.5 polar = 4*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 67) ; smallest Teardrop Curve theta = atan(imag(#z)/real(#z)) af1 = @a*cos(theta) af2 = 0.5*@b*sin(theta)*sin(theta/2)^(@pn-1) polar = (af1 + flip(af2)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 68) ; smallest Happy Accident polar = 15*@a*@safn((((real(#z)*@sa4)^(1+@sa2))+ \ (flip(imag(#z))^2*@sa3))*atan2((flip(imag(#z))^@sa7)* \ (real(#z)^@sa5))-@sa1* \ (flip(imag(#z))^@sa6)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 69) ; smallest Hyperbola theta = atan(imag(#z)/real(#z)) rr = 0.35*@a*(1/cos(2*theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 70) ; smallest Kappa Curve theta = atan(imag(#z)/real(#z)) rr = 0.1*@a*tan(theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 71) ; smallest Piriform theta = atan(imag(#z)/real(#z)) af1 = 0.1*@a*(1+sin(theta)) af2 = 0.1*@b*cos(theta)*(1+sin(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 72) ; smallest Keratoid Cusp cx = real(#z) qa = 1 qb = -cx^2 qc = -cx^5 if @negroot == true qy = (-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa) else qy = (-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa) endif polar = 2.5*@a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 73) ; smallest Serpentine Curve theta = atan(imag(#z)/real(#z)) af1 = 0.2*@a*cotan(theta) af2 = 0.2*@b*sin(theta)*cos(theta) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 74) ; smallest Line cx = real(#z) cy = cx polar = 3*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 75) ; smallest Links Curve cx = real(#z) qa = 1 qb = 2*cx^2-6*cx qc = cx^4-2*cx^3+cx^2 if @negroot == true qy = ((-qb - (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 else qy = ((-qb + (qb^2 - 4*qa*qc)^0.5)/(2*qa))^0.5 endif polar = @a*(cx + flip(qy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 76) ; smallest Parabola cy = imag(#z) cx = 10*@b*cy^2 polar = 0.65*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 77) ; smallest Trefoil theta = atan(imag(#z)/real(#z)) rr = 0.1*@a/cos(3*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 78) ; smallest Trident of Descartes cx = real(#z) cy = (cx-0.2*@b)*(cx+0.2*@b)*(cx-0.4*@b)/cx polar = @a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 79) ; smallest Trisectrix of Maclaurin theta = atan(imag(#z)/real(#z)) rr = 0.5*@a*sin(3*theta)/sin(2*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 80) ; smallest Atzema Spiral theta = atan(imag(#z)/real(#z)) af1 = 0.5*@a*(sin(theta)/theta-2*cos(theta)-theta*sin(theta)) af2 = 0.05*@b*(cos(theta)/theta-2*sin(theta)+theta*cos(theta)) polar = af1 + flip(af2) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 81) ; smallest Rose of Troy theta = atan(imag(#z)/real(#z)) rr = @cp*(1+10*@a*sin(4*@b*theta)) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 82) ; smallest Cotes' Spiral theta = atan(imag(#z)/real(#z)) rr = @a/cosh(@b*theta) polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 83) ; smallest Dipole Curve theta = atan(imag(#z)/real(#z)) rr = @a*(cos(theta))^0.5 polar = (rr*cos(theta))+flip((rr*sin(theta))) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 84) ; smallest Polytrope cx = real(#z) cy = 1/cx^@pn polar = 0.00005*@a*(cx + flip(cy)) d1 = abs(cabs(z1)-cabs(polar)) ; get current distances d2 = abs(cabs(z2)-cabs(polar)) d3 = abs(cabs(z3)-cabs(polar)) if (d1 < s1) ; update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if ( @bailout < |zz1|+|w1|+|u1| ||\ @everyiter ||\ done == #maxiter + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 84) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 85) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector else; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif else z = z1 endif if ( @bailout < |zz1|+|w1|+|u1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done>0 Default: title="SlopeHyperMath_V1" maxiter=250 method=multipass periodicity=0 Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="Current Mode" default=0 enum="Mandelbrot" "Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot" "Julia" visible=false endparam param Bailout caption="Bailout Value" default=1000.0 endparam param seed caption="Seed Value" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false Endheading param fl1 caption="Add Flavor" default=(0.0,0.0) endparam param fl2 caption="Mult. Flavor" default=(1.0,0.0) endparam func fnfl caption="Func. Flavor" default=ident() endfunc Heading caption="Slope Parameters" show=false Endheading bool param slope caption="Apply slope?" default=true endparam float param offset caption="Orbit Separation" default=0.00000001 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." visible=@slope==true endparam param zmode caption="Height Value" default=85 enum="smallest |z|""smallest |real(z)|""smallest |imag(z)|" \ "smallest summ(z)""smallest |atan(z)|""smallest |function1|" \ "smallest |function2|""Lemniscate""Cardioid""Conchoid""Cycloid" \ "Archimedes""Log Spiral""Rose""Bifolium""Astroid""Cissoid of Diocles" \ "Cochleoid""Folium of Descartes""Limacon of Pascal""Lituus""Nephroid" \ "Strophoid""Witch of Agnesi""Curtate Cycloid""Epicycloid""Ellipse Evolute" \ "Tractrix""Kampyle of Eudoxus""Circle Catacaustic""Deltoid Catacaustic" \ "Ellipse Catacaustic""Log Spiral Catacaustic""Butterfly""Gear Curve" \ "Arachnida 1""Arachnida 2""Cayley's Sectic""Cycloid of Seva" "Devil's Curve" \ "Eight Curve""Epispiral""Hipopede""Maltese Cross""Ophiuride" \ "Quadratrix of Hippias""Poinsot Spiral 1""Poinsot Spiral 2""Quadrifolium" \ "Scarabaeus""Semicubical Parabola""Swastika Curve" \ "Trifolium""Tschirnhausen Cubic""Bicorn""Cruciform""Knot Curve""Ampersand" \ "Bean""Bicuspid""Bow""Cassini Ovals""Circle""Trident""Stirrup Curve""Diamond"\ "Dumbbell Curve""Teardrop Curve""Happy Accident""Hyperbola""Kappa Curve" \ "Piriform""Keratoid Cusp""Serpentine Curve""Line""Links Curve""Parabola" \ "Trefoil""Trident of Descartes""Trisectrix of Maclaurin""Atzema Spiral" \ "Rose of Troy""Cotes' Spiral""Dipole Curve""Polytrope""smoothed iteration" hint="Specifies what will be used to construct a height value." visible=@slope==true endparam func fnsl caption="Transmute Function" default=ident() visible=(@zmode==5)||(@zmode==6)&&(@slope==true) endfunc param a caption="Polar Parameter 1" default=3.0 visible=(@zmode==7)||(@zmode==8)||(@zmode==9)||(@zmode==10) || \ (@zmode==11)||(@zmode==12)||(@zmode==13)||(@zmode==14) || \ (@zmode==15)||(@zmode==16)||(@zmode==17)||(@zmode==18) || \ (@zmode==19)||(@zmode==20)||(@zmode==21)||(@zmode==22) || \ (@zmode==23)||(@zmode==24)||(@zmode==25)||(@zmode==26) || \ (@zmode==27)||(@zmode==28)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==33)||(@zmode==34) || \ (@zmode==35)||(@zmode==36)||(@zmode==37)||(@zmode==38) || \ (@zmode==39)||(@zmode==40)||(@zmode==41)||(@zmode==42) || \ (@zmode==43)||(@zmode==44)||(@zmode==45)||(@zmode==46) || \ (@zmode==47)||(@zmode==48)||(@zmode==49)||(@zmode==50) || \ (@zmode==51)||(@zmode==52)||(@zmode==53)||(@zmode==53) || \ (@zmode==54)||(@zmode==55)||(@zmode==56)||(@zmode==57) || \ (@zmode==58)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==64)||(@zmode==65) || \ (@zmode==66)||(@zmode==67)||(@zmode==68)||(@zmode==69) || \ (@zmode==70)||(@zmode==71)||(@zmode==72)||(@zmode==73) || \ (@zmode==74)||(@zmode==75)||(@zmode==76)||(@zmode==77) || \ (@zmode==78)||(@zmode==79)||(@zmode==80)||(@zmode==81) || \ (@zmode==82)||(@zmode==83)||(@zmode==84)&&(@slope==true) endparam param b caption="Polar Parameter 2" default=3.0 visible=(@zmode==9)||(@zmode==19)||(@zmode==22)||(@zmode==24) || \ (@zmode==25)||(@zmode==26)||(@zmode==29)||(@zmode==30) || \ (@zmode==31)||(@zmode==32)||(@zmode==34)||(@zmode==39) || \ (@zmode==42)||(@zmode==44)||(@zmode==49)||(@zmode==50) || \ (@zmode==55)||(@zmode==59)||(@zmode==60)||(@zmode==61) || \ (@zmode==62)||(@zmode==63)||(@zmode==67)||(@zmode==71) || \ (@zmode==73)||(@zmode==76)||(@zmode==78)||(@zmode==80) || \ (@zmode==81)||(@zmode==82)&&(@slope==true) endparam param cp caption="3rd Polar parameter" default=0.05 visible=(@zmode==81)&&(@slope==true) endparam param pn caption="Polar Integer" default=3 visible=(@zmode==34)||(@zmode==35)||(@zmode==36)||(@zmode==47) || \ (@zmode==84)&&(@slope==true) endparam param apwr caption="Polar Power" default=(3.0,3.0) visible=(@zmode==15)||(@zmode==26)||(@zmode==58)&&(@slope==true) endparam func afn1 caption="Polar Fn 1" default=cos() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc func afn2 caption="Polar Fn 2" default=sin() visible=(@zmode==15)||(@zmode==21)||(@zmode==24)||(@zmode==25) || \ (@zmode==26)||(@zmode==27)||(@zmode==30)||(@zmode==58) && \ (@slope==true) endfunc param sa1 caption="Adjuster 1" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa2 caption="Adjuster 2" default=1.0 visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endparam param sa3 caption="Adjuster 3" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa4 caption="Adjuster 4" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa5 caption="Adjuster 5" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa6 caption="Adjuster 6" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam param sa7 caption="Adjuster 7" default=1.0 visible=(@zmode==68)&&(@slope==true) endparam func safn caption="Adjuster Fn" default=ident() visible=(@zmode==65)||(@zmode==68)&&(@slope==true) endfunc param negroot caption = "Quad Neg Root" default = false visible=(@zmode==56)||(@zmode==57)||(@zmode==59)||(@zmode==61) || \ (@zmode==64)||(@zmode==72)||(@zmode==75)&&(@slope==true) endparam param xfer caption="Height Transfer" default=0 enum="linear""log""sqrt""cuberoot""exp""sqr""cube""sin""cos""tan" hint="This function will be applied to the height value \ before a slope is calculated." visible=@slope==true endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." visible=@slope==true endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." visible=@slope==true endparam param everyiter caption="Every Iteration" default=false hint="If set, the surface normal will be computed at every \ iteration. If you are using a coloring algorithm which \ processes every iteration, you will need this." visible=@slope==true endparam Heading caption="3R Dimension" show=false Endheading param rd1 caption="3RDim. 1" default=(1.0,0.0) endparam param rd2 caption="3RDim. 2" default=(1.0,0.0) endparam param rd3 caption="3RDim. 3" default=(0.0,0.0) endparam Heading caption="Plane and Rotations" show=false Endheading param planevar caption="Variation" enum="1""2""3""4" default=0 endparam param rotx caption="Rotation YZ" default=0 min=-360 max=360 endparam param roty caption="Rotation XZ" default=0 min=-360 max=360 endparam param rotw caption="Rotation XW" default=0 min=-360 max=360 endparam param rotwy caption="Rotation YW" default=0 min=-360 max=360 endparam param rotz caption="Rotation XY" default=0 min=-360 max=360 endparam Heading caption="C Sequence" show=false Endheading param seq caption="C Method" enum="1""2""3" default=0 endparam param factor caption="Factor 1" default=(0.0,0.0) endparam param factor1 caption="Factor 2" default=(0.0,0.0) endparam param factor2 caption="Factor 3" default=(1.0,0.0) endparam param factor3 caption="Factor 4" default=(1.0,0.0) endparam func fnfact1 caption="Function Factor 1" default=ident() endfunc func fnfact2 caption="Function Factor 2" default=ident() endfunc Heading caption="Hyper Section" Endheading param hyperMix caption="Hyper Mix" enum="1""2""3" default=0 endparam param p1 caption="Hyper. Param. 1" default=(0.0,0.0) endparam param p2 caption="Hyper. Param. 2" default=(0.0,0.0) endparam param p3 caption="JuliaDimension 1" default=(0.0,0.0) visible=(@mode=="Julia") endparam param p4 caption="JuliaDimension 2" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Formula" Endheading param formula caption="Formula" enum="Mandelbrot""DAFRM""Variant RCL""Precogna""MandelbrotQud""PhonyMandel""DivMandel""Hydra Brot" \ "FGZ""Ikenaga""MagnetCplxSpirals""Num_Dup 014""Phoenix""Flattop""Mandelvar" default=0 endparam ;------------------------------Mandelbrot-------------------------------------- Heading caption="Mandelbrot" visible=(@formula==0) Endheading param parm1 caption="Param. 1Z" default=(0.0,0.0) visible=(@formula==0) endparam param parm caption="Start Distortion" default=(0.0,0.0) visible=(@formula==0) endparam param parm2 caption="Param. Distortion" default=(0.0,0.0) visible=(@formula==0) endparam param parm3 caption="Mult. C" default=(1.0,0.0) visible=(@formula==0) endparam param expm caption="Exponent" default=(2.0,0.0) visible=(@formula==0) endparam func fnm caption="Func.1Z" default=ident() visible=(@formula==0) endfunc func fnm1 caption="Func. Distortion" default=ident() visible=(@formula==0) endfunc func fnmc caption="Func.C" default=ident() visible=(@formula==0) endfunc ;------------------------------DAFRM------------------------------------------ Heading caption="DAFRM" visible=(@formula==1) Endheading param daf1 caption="Dafrm 1" default=(1.0,0.514) visible=(@formula==1) endparam param daf2 caption="Dafrm 2" default=(1.1,-0.5) visible=(@formula==1) endparam param daf3 caption="Dafrm 3" default=(0.0,0.0) visible=(@formula==1) endparam param daf4 caption="Dafrm 4" default=(0.0,0.0) visible=(@formula==1) endparam param daf5 caption="Dafrm 5" default=(0.0,0.0) visible=(@formula==1) endparam func fndaf caption="Func. 1" default=conj() visible=(@formula==1) endfunc func fndaf1 caption="Func. 2" default=ident() visible=(@formula==1) endfunc func fndaf2 caption="Func. 3" default=ident() visible=(@formula==1) endfunc func fndaf3 caption="Func. 4" default=ident() visible=(@formula==1) endfunc func fndaf4 caption="Func. 5" default=ident() visible=(@formula==1) endfunc func fndaf5 caption="Func. C" default=ident() visible=(@formula==1) endfunc ;------------------------------Variant RCL------------------------------------ Heading caption="Variant RCL" visible=(@formula==2) Endheading param rcl caption="Param. 1" default=(0.0,0.0) visible=(@formula==2) endparam param parcl caption="Param. 2" default=(0.0,0.0) visible=(@formula==2) endparam param parcl1 caption="Param. 3" default=(0.0,0.0) visible=(@formula==2) endparam param parcl2 caption="Param. 4" default=(0.0,0.0) visible=(@formula==2) endparam param parcl3 caption="Mult. C" default=(1.0,0.0) visible=(@formula==2) endparam param exrcl caption="Exponent" default=(2.0,0.0) visible=(@formula==2) endparam func fnrcl caption="Func. 1 RCL" default=ident() visible=(@formula==2) endfunc func fnrcl1 caption="Func. 2 RCL" default=ident() visible=(@formula==2) endfunc func fnrcl2 caption="Func. 3 RCL" default=ident() visible=(@formula==2) endfunc func fnrcl3 caption="Func. C RCL" default=ident() visible=(@formula==2) endfunc ;------------------------------Precogna--------------------------------------- Heading caption="Precogna" visible=(@formula==3) Endheading param pre caption="Param. 1 Precogna" default=(0.0,0.0) visible=(@formula==3) endparam param pre1 caption="Param. 2 Precogna" default=(0.0,0.0) visible=(@formula==3) endparam param pre2 caption="Param. 3 Precogna" default=(0.0,0.0) visible=(@formula==3) endparam param pre3 caption="Param. 4 Precogna" default=(0.0,0.0) visible=(@formula==3) endparam param pre4 caption="Mult. C Precogna" default=(1.0,0.0) visible=(@formula==3) endparam param expre caption="Exponent Precogna" default=(2.0,0.0) visible=(@formula==3) endparam func fnpre caption="Func. Precogna" default=ident() visible=(@formula==3) endfunc ;------------------------------Mandelbrot Qud--------------------------------- Heading caption="MandelbrotQud" visible=(@formula==4) Endheading param qud1 caption="Param. 1Z" default=(0.0,0.0) visible=(@formula==4) endparam param qud2 caption="Param. 2Z" default=(0.0,0.0) visible=(@formula==4) endparam param qud3 caption="Param. 3Z" default=(0.0,0.0) visible=(@formula==4) endparam param qud1m caption="Mult. 2Z" default=(0.5,0.0) visible=(@formula==4) endparam param qud2m caption="Mult. 3Z" default=(-0.5,0.0) visible=(@formula==4) endparam param exqu caption="Exp. 1Z" default=(3.0,0.0) visible=(@formula==4) endparam param exqu1 caption="Exp. 2Z" default=(3.0,0.0) visible=(@formula==4) endparam param exqu2 caption="Exp. 3Z" default=(3.0,0.0) visible=(@formula==4) endparam func fnqud caption="Func. 1" default=ident() visible=(@formula==4) endfunc func fnqud1 caption="Func. 2" default=ident() visible=(@formula==4) endfunc func fnqud2 caption="Func. 3" default=ident() visible=(@formula==4) endfunc func fnqud3 caption="Func. C" default=ident() visible=(@formula==4) endfunc ;------------------------------Phony Mandel----------------------------------- Heading caption="PhonyMandel" visible=(@formula==5) Endheading param phom1 caption="Param. 1" default=(2.0,0.0) visible=(@formula==5) endparam param phom2 caption="Param. 2" default=(0.15,0.0) visible=(@formula==5) endparam param phom3 caption="Param. 3" default=(0.0,0.0) visible=(@formula==5) endparam param phom4 caption="Param. 4" default=(0.0,0.0) visible=(@formula==5) endparam param exphom caption="Exponent 1" default=(4.0,0.0) visible=(@formula==5) endparam param exphom1 caption="Exponent 2" default=(3.0,0.0) visible=(@formula==5) endparam param exphom2 caption="Exponent 3" default=(2.0,0.0) visible=(@formula==5) endparam func fnphom caption="Func. 1Z" default=ident() visible=(@formula==5) endfunc func fnphom1 caption="Func. 2Z" default=ident() visible=(@formula==5) endfunc func fnphom2 caption="Func. 3Z" default=ident() visible=(@formula==5) endfunc func fnphom3 caption="Func. 4Z" default=ident() visible=(@formula==5) endfunc func fnphom4 caption="Func. C" default=ident() visible=(@formula==5) endfunc func glphom caption="Global" default=ident() visible=(@formula==5) endfunc ;------------------------------Div Mandel------------------------------------- Heading caption="DivMandel" visible=(@formula==6) Endheading param div1 caption="Param. 1Z" default=(0.0,0.0) visible=(@formula==6) endparam param div4 caption="Param. 2Z" default=(0.0,0.0) visible=(@formula==6) endparam param div3 caption="Mult. C" default=(0.5,0.0) visible=(@formula==6) endparam param exdiv caption="Exponent 1" default=(2.0,0.0) visible=(@formula==6) endparam param exdiv1 caption="Exponent 2" default=(0.0,0.0) visible=(@formula==6) endparam param div2 caption="Param. 3Z" default=(0.0,0.0) visible=(@formula==6) endparam func fndiv caption="Func. 1Z" default=ident() visible=(@formula==6) endfunc func fndiv1 caption="Func. 2Z" default=ident() visible=(@formula==6) enabled=(@exdiv1!=0.0) endfunc func fndiv2 caption="Func. C" default=ident() visible=(@formula==6) endfunc ;------------------------------Hydra Brot------------------------------------- Heading caption="Hydra Brot" visible=(@formula==7) endheading param op1hy caption="Select Operator" enum="+""*" default=0 visible=(@formula==7) endparam param mphy3 caption="Mult. Z" default=(0.5,0.0) visible=(@formula==7) endparam param mphy9 caption="Mult. C" default=(1.0,0.0) visible=(@formula==7) endparam param mphy4 caption="Distortion 1" default=(1.0,0.0) visible=(@formula==7) endparam param mphy6 caption="Distortion 2" default=(0.0,0.0) visible=(@formula==7) endparam param mphy1 caption="Distortion 3" default=(0.5,0.0) visible=(@formula==7) endparam param mphy5 caption="Distortion 4" default=(1.0,0.0) visible=(@formula==7) endparam param mphy7 caption="Distortion 5" default=(0.0,0.0) visible=(@formula==7) endparam param mphy8 caption="Exp. Distortion" default=(1.0,0.0) visible=(@formula==7) endparam param mphy2 caption="Exponent" default=(2.0,0.0) visible=(@formula==7) endparam param od1 caption="Add Old 1Z" default=(0.0,0.0) visible=(@formula==7) endparam param od3 caption="Add Old 2Z" default=(0.0,0.0) visible=(@formula==7) endparam param od4 caption="Add Old 3Z" default=(0.0,0.0) visible=(@formula==7) endparam param od2 caption="Mult. Old 1Z" default=(1.0,0.0) visible=(@formula==7) endparam param od6 caption="Mult. Old 2Z" default=(1.0,0.0) visible=(@formula==7) endparam param od5 caption="Exp. Old Z" default=(1.0,0.0) visible=(@formula==7) endparam func fn1hy2 caption="Func. Z" default=ident() visible=(@formula==7) endfunc func fn1hy3 caption="Func. C" default=ident() visible=(@formula==7) endfunc func fn1hy4 caption="Func. Distortion 1" default=ident() visible=(@formula==7) endfunc func fn1hy1 caption="Func. Distortion 2" default=ident() visible=(@formula==7) endfunc func fnod1 caption="Func. Old 1" default=ident() visible=(@formula==7) endfunc func fnod2 caption="Func. Old 2" default=sqr() visible=(@formula==7) endfunc ;------------------------------FGZ-------------------------------------------- Heading caption="FGZ" visible=(@formula==8) Endheading param fgz caption="Param. 1" default=(0.5,0.0) visible=(@formula==8) endparam param fgz5 caption="Param. 2" default=(0.0,0.0) visible=(@formula==8) endparam param fgz6 caption="Param. 3" default=(0.0,0.0) visible=(@formula==8) endparam param fgz7 caption="Param. 4" default=(0.0,0.0) visible=(@formula==8) endparam param fgz4 caption="Mult C" default=(1.0,0.0) visible=(@formula==8) endparam param fgz1 caption="Exp. 1" default=(2.0,0.0) visible=(@formula==8) endparam param fgz2 caption="Exp. 2" default=(2.0,0.0) visible=(@formula==8) endparam param fgz3 caption="Exp. 3" default=(2.0,0.0) visible=(@formula==8) endparam func fngz1 caption="Func. 1Z" default=ident() visible=(@formula==8) endfunc func fngz2 caption="Func. 2Z" default=ident() visible=(@formula==8) endfunc func fngz3 caption="Func. 3Z" default=ident() visible=(@formula==8) endfunc func fngz4 caption="Func. C" default=ident() visible=(@formula==8) endfunc ;------------------------------Ikenaga---------------------------------------- Heading caption="Ikenaga" visible=(@formula==9) endheading param ike3 caption="Param. 1" default=(0.0,0.0) visible=(@formula==9) endparam param ike4 caption="Param. 2" default=(1.0,0.0) visible=(@formula==9) endparam param ike6 caption="Param. 3" default=(0.0,0.0) visible=(@formula==9) endparam param ike5 caption="Mult. C" default=(1.0,0.0) visible=(@formula==9) endparam param ike1 caption="Exponent 1" default=(3.0,0.0) visible=(@formula==9) endparam param ike2 caption="Exponent 2" default=(1.0,0.0) visible=(@formula==9) endparam func fike caption="Func. 1Z" default=ident() visible=(@formula==9) endfunc func fike1 caption="Func. 2Z" default=ident() visible=(@formula==9) endfunc func fike2 caption="Func. C" default=ident() visible=(@formula==9) endfunc ;------------------------------MagnetCplxSpirals------------------------------ Heading caption="MagnetCplxSpirals" visible=(@formula==10) endheading param magnetcplx caption="Select Variant" enum="CplxSpirals""CplxSpirals2""MiniMand" default=0 visible=(@formula==10) endparam param mcp1 caption="Param. 1" default=(1.0,0.0) visible=(@formula==10) endparam param mcp2 caption="Param. 2" default=(2.0,0.0) visible=(@formula==10) endparam param mcp3 caption="Param. 3" default=(2.0,0.0) visible=(@formula==10) endparam param mcp4 caption="Param. 4" default=(1.0,0.0) visible=(@formula==10) endparam param mcp5 caption="Param. 5" default=(0.0,0.0) visible=(@formula==10) endparam param mcp6 caption="Param. 6" default=(0.0,0.0) visible=(@formula==10) endparam param mcp caption="Exponent" default=(2.0,0.0) visible=(@formula==10) endparam func fmcp1 caption="Func. 1Z" default=ident() visible=(@formula==10) endfunc func fmcp2 caption="Func. 2Z" default=ident() visible=(@formula==10) endfunc func fmcp3 caption="Func. 3Z" default=ident() visible=(@formula==10) endfunc ;------------------------------Num_Dup---------------------------------------- Heading caption="Num_Dup" visible=(@formula==11) endheading param num6 caption="Param. 1Z" default=(0.0,0.0) visible=(@formula==11) endparam param num7 caption="Param. 2Z" default=(0.0,0.0) visible=(@formula==11) endparam param num1 caption="Param. 1C" default=(-1.0,0.0) visible=(@formula==11) endparam param num2 caption="Param. 2C" default=(1.0,0.0) visible=(@formula==11) endparam param num8 caption="Mult. 1Z" default=(2.0,0.0) visible=(@formula==11) endparam param num4 caption="Mult. 1C" default=(-1.0,0.0) visible=(@formula==11) endparam param num5 caption="Mult. 2C" default=(1.0,0.0) visible=(@formula==11) endparam param num3 caption="Exp. 1" default=(2.0,0.0) visible=(@formula==11) endparam param num9 caption="Global Add" default=(0.0,0.0) visible=(@formula==11) endparam param num10 caption="Global Mult." default=(1.0,0.0) visible=(@formula==11) endparam func fn1num caption="Func. 1Z" default=ident() visible=(@formula==11) endfunc func fn2num caption="Func. 2Z" default=ident() visible=(@formula==11) endfunc func fn3num caption="Func. 3Z" default=ident() visible=(@formula==11) endfunc func fn4num caption="Func. 1C" default=ident() visible=(@formula==11) endfunc func fn5num caption="Func. 2C" default=ident() visible=(@formula==11) endfunc ;----------------------------Phoenix------------------------------------------ Heading caption="Phoenix" visible=(@formula==12) Endheading param phoe2 caption="Distortion" default=(0.5,0.0) visible=(@formula==12) endparam param phoe3 caption="Param. 1" default=(0.0,0.0) visible=(@formula==12) endparam param phoe4 caption="Param. 2" default=(0.0,0.0) visible=(@formula==12) endparam param phoe caption="Exponent 1" default=(2.0,0.0) visible=(@formula==12) endparam param phoe1 caption="Exponent 2" default=(0.0,0.0) visible=(@formula==12) endparam func fnpho1 caption="Func. 1Z" default=ident() visible=(@formula==12) endfunc func fnpho2 caption="Func. 2Z" default=ident() visible=(@formula==12) endfunc func fnpho3 caption="Distortion" default=ident() visible=(@formula==12) endfunc ;------------------------------Flattop----------------------------------------- Heading caption="Flattop" visible=(@formula==13) Endheading param flat1 caption="Param. 1" default=(0.5,0.0) visible=(@formula==13) endparam param flat2 caption="Param. 2" default=(0.2,0.0) visible=(@formula==13) endparam param flat4 caption="Param. 3" default=(-0.5,0.0) visible=(@formula==13) endparam param flat3 caption="Exp. 1Z" default=(2.0,0.0) visible=(@formula==13) endparam func fnflat1 caption="Function 1Z" default=ident() visible=(@formula==13) endfunc func fnflat3 caption="Function 2Z" default=ident() visible=(@formula==13) endfunc func fnflat4 caption="Function 3Z" default=ident() visible=(@formula==13) endfunc func fnflat2 caption="Function C" default=ident() visible=(@formula==13) endfunc ;------------------------------Mandelvar--------------------------------------- Heading caption="Mandelvar" visible=(@formula==14) Endheading param mvar2 caption="Param. 1Z" default=(0.0,0.0) visible=(@formula==14) endparam param mvar4 caption="Param. 2Z" default=(0.0,0.0) visible=(@formula==14) endparam param mvar5 caption="Param. 3Z" default=(0.0,0.0) visible=(@formula==14) endparam param mvar3 caption="Param. 1C" default=(0.0,0.0) visible=(@formula==14) endparam param mvar1 caption="Param. 2C" default=(7.0,0.0) visible=(@formula==14) endparam func fnmvar1 caption="Function 1Z" default=ident() visible=(@formula==14) endfunc func fnmvar3 caption="Function 2Z" default=ident() visible=(@formula==14) endfunc func fnmvar5 caption="Function 3Z" default=ident() visible=(@formula==14) endfunc func fnmvar2 caption="Function 1C" default=ident() visible=(@formula==14) endfunc func fnmvar4 caption="Function 2C" default=ident() visible=(@formula==14) endfunc func fnmvar6 caption="Function 3C" default=ident() visible=(@formula==14) endfunc Heading caption="Global Functions" endheading func fnc caption="Function C" default=ident() endfunc func fnz caption="Function Z" default=ident() endfunc param version caption="Version" default=1.0 visible=false endparam Switch: type="SlopeHyperMath_V1" bailout=@bailout seed=#pixel formula=@formula mode=@switchmode switchmode=@mode planevar=@planevar hyperMix=@hyperMix rotx=@rotx roty=@roty rotw=@rotw rotwy=@rotwy rotz=@rotz fl1=@fl1 fl2=@fl2 fnfl=@fnfl factor=@factor factor1=@factor1 factor2=@factor2 factor3=@factor3 fnfact1=@fnfact1 fnfact2=@fnfact2 fnc=@fnc fnz=@fnz p1=@p1 p2=@p2 p3=@p3 p4=@p4 rd1=@rd1 rd2=@rd2 rd3=@rd3 expm=@expm parm=@parm parm1=@parm1 parm2=@parm2 parm3=@parm3 fnm=@fnm fnm1=@fnm1 fnmc=@fnmc daf1=@daf1 daf2=@daf2 daf3=@daf3 daf4=@daf4 daf5=@daf5 fndaf=@fndaf fndaf1=@fndaf1 fndaf2=@fndaf2 fndaf3=@fndaf3 fndaf4=@fndaf4 fndaf5=@fndaf5 rcl=@rcl parcl=@parcl parcl1=@parcl1 parcl2=@parcl2 parcl3=@parcl3 exrcl=@exrcl fnrcl=@fnrcl fnrcl1=@fnrcl1 fnrcl2=@fnrcl2 fnrcl3=@fnrcl3 pre=@pre pre1=@pre1 pre2=@pre2 pre3=@pre3 pre4=@pre4 expre=@expre fnpre=@fnpre qud1=@qud1 qud2=@qud2 qud3=@qud3 qud1m=@qud1m qud2m=@qud2m exqu=@exqu exqu1=@exqu1 exqu2=@exqu2 fnqud=@fnqud fnqud1=@fnqud1 fnqud2=@fnqud2 fnqud3=@fnqud3 exphom=@exphom exphom1=@exphom1 exphom2=@exphom2 phom1=@phom1 phom2=@phom2 phom3=@phom3 phom4=@phom4 fnphom=@fnphom fnphom1=@fnphom1 fnphom2=@fnphom2 fnphom3=@fnphom3 fnphom4=@fnphom4 glphom=@glphom div1=@div1 div2=@div2 div3=@div3 div4=@div4 exdiv=@exdiv exdiv1=@exdiv1 fndiv=@fndiv fndiv1=@fndiv1 fndiv2=@fndiv2 op1hy=@op1hy mphy1=@mphy1 mphy2=@mphy2 mphy3=@mphy3 mphy4=@mphy4 mphy5=@mphy5 mphy6=@mphy6 mphy7=@mphy7 mphy8=@mphy8 mphy9=@mphy9 od1=@od1 od2=@od2 od3=@od3 od4=@od4 od5=@od5 od6=@od6 fnod1=@fnod1 fnod2=@fnod2 fn1hy1=@fn1hy1 fn1hy2=@fn1hy2 fn1hy3=@fn1hy3 fn1hy4=@fn1hy4 fgz=@fgz fgz1=@fgz1 fgz2=@fgz2 fgz3=@fgz3 fgz4=@fgz4 fgz5=@fgz5 fgz6=@fgz6 fgz7=@fgz7 fngz1=@fngz1 fngz2=@fngz2 fngz3=@fngz3 fngz4=@fngz4 ike1=@ike1 ike2=@ike2 ike3=@ike3 ike4=@ike4 ike5=@ike5 ike6=@ike6 fike=@fike fike1=@fike1 fike2=@fike2 magnetcplx=@magnetcplx mcp=@mcp mcp1=@mcp1 mcp2=@mcp2 mcp3=@mcp3 mcp4=@mcp4 mcp5=@mcp5 mcp6=@mcp6 fmcp1=@fmcp1 fmcp2=@fmcp2 fmcp3=@fmcp3 fn1num=@fn1num fn2num=@fn2num fn3num=@fn3num fn4num=@fn4num fn5num=@fn5num num1=@num1 num2=@num2 num3=@num3 num4=@num4 num5=@num5 num6=@num6 num7=@num7 num8=@num8 num9=@num9 num10=@num10 phoe=@phoe phoe1=@phoe1 phoe2=@phoe2 phoe3=@phoe3 phoe4=@phoe4 fnpho1=@fnpho1 fnpho2=@fnpho2 fnpho3=@fnpho3 flat1=@flat1 flat2=@flat2 flat3=@flat3 flat4=@flat4 fnflat1=@fnflat1 fnflat2=@fnflat2 fnflat3=@fnflat3 fnflat4=@fnflat4 mvar1=@mvar1 mvar2=@mvar2 mvar3=@mvar3 mvar4=@mvar4 mvar5=@mvar5 fnmvar1=@fnmvar1 fnmvar2=@fnmvar2 fnmvar3=@fnmvar3 fnmvar4=@fnmvar4 fnmvar5=@fnmvar5 fnmvar6=@fnmvar6 version=@version slope=@slope offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter a=@a b=@b apwr=@apwr pn=@pn afn1=@afn1 afn2=@afn2 fnsl=@fnsl sa1=@sa1 sa2=@sa2 sa3=@sa3 sa4=@sa4 sa5=@sa5 sa6=@sa6 sa7=@sa7 safn=@safn negroot=@negroot cp=@cp } SlopeMandNewton { ; Original Loop "MandNewt03" in fotdv2.frm by Jim Muth ; This formula presents 10 differents equations to define a Newton, the first Mandelbrot Newton ; is based on the MandNewt03 of Mr. Jim Muth, the other sets are modifications ; of differents Newton division always in fotdv folder. ; The original of fotdv2.frm use z=c=pixel and can be used also here, but by default z=@start in this variation. ; Look that bailout start at 1.0E-8 changing global z function in some expression must be increased. ; In differents sets you can use big values of parameters ; AndreaSpinozzi(Giugno 2022) ; Version 1.1 September 2023 added differents new Mandelbrot Newton sets Init: ;--------------------------Initialize Z, a, b---------------------------------- z1=z2=z3=0.0 a1=a2=a3=0.0 b1=b2=b3=0.0 k1=k2=k3=0.0 ;--------------------------Mandelbrot Mode-------------------------------------- za1=@rd1*real(@start)+flip(imag(@start)*@rd2) za2=@rd1*real(@start)+flip(imag(@start)*@rd2) za3=@rd1*real(@start)+flip(imag(@start)*@rd2) if (@zpixel==true) za1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) za2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) za3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) endif c1=@rd3+@rd2*real(#pixel)+flip(imag(#pixel)*@rd1) c2=@rd3+@rd2*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd1) c3=@rd3+@rd2*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd1) ;----------------------------Julia Mode----------------------------------------- if (@mode=="Julia") za1=@rd1*real(#pixel)+flip(imag(#pixel)*@rd2) za2=@rd1*real(#pixel+@offset)+flip(imag(#pixel+@offset)*@rd2) za3=@rd1*real(#pixel+flip(@offset))+flip(imag(#pixel+flip(@offset))*@rd2) c1=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) c2=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) c3=@rd3+@rd2*real(@seed)+flip(imag(@seed)*@rd1) endif ;--------------------------Initialize Slope Variables--------------------------- int done = 2 float e1 = 0.0; potentials float e2 = 0.0 float e3 = 0.0 float vx = 0.0; normal vector float vy = 0.0 float vz = 0.0 float vd = 0.0 float d1 = 0.0; distances float d2 = 0.0 float d3 = 0.0 float s1 = 1.0e20; smallest distances float s2 = 1.0e20 float s3 = 1.0e20 float iterexp1 = 0.0 float iterexp2 = 0.0 float iterexp3 = 0.0 Loop: ;-----------------------------Global Functions Z and C------------------------- za1=fn1(za1) za2=fn1(za2) za3=fn1(za3) c1=fn2(c1) c2=fn2(c2) c3=fn2(c3) ;---------------------------Starts Newton Sets--------------------------------- if (@selmode==0) a1=@p7+za1^@p11+(@fn5(c1)-p1)*(fn3(za1)-p2)-(@p8*fn4(c1)+p3) a2=@p7+za2^@p11+(@fn5(c2)-p1)*(fn3(za2)-p2)-(@p8*fn4(c2)+p3) a3=@p7+za3^@p11+(@fn5(c3)-p1)*(fn3(za3)-p2)-(@p8*fn4(c3)+p3) b1=real(@p6)*za1^imag(@p6)+(@p9*@fn6(c1)-p4)+@p10*@fn7(c1) b2=real(@p6)*za2^imag(@p6)+(@p9*@fn6(c2)-p4)+@p10*@fn7(c2) b3=real(@p6)*za3^imag(@p6)+(@p9*@fn6(c3)-p4)+@p10*@fn7(c3) if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-p5*a1/b1 za2=za2-p5*a2/b2 za3=za3-p5*a3/b3 elseif (@selmode==1) a1=za1^(@mn1+1)+@fnm1(c1)*@mn2+@mn3*@fnm4(za1)^@mn10+@mn4*@fnm3(c1) a2=za2^(@mn1+1)+@fnm1(c2)*@mn2+@mn3*@fnm4(za2)^@mn10+@mn4*@fnm3(c2) a3=za3^(@mn1+1)+@fnm1(c3)*@mn2+@mn3*@fnm4(za3)^@mn10+@mn4*@fnm3(c3) b1=@mn5+(@mn1*za1^@mn1)*@mn11+@fnm2(c1)*@mn7+@mn8*(@fnm5(za1)+@mn9) b2=@mn5+(@mn1*za2^@mn1)*@mn11+@fnm2(c2)*@mn7+@mn8*(@fnm5(za2)+@mn9) b3=@mn5+(@mn1*za3^@mn1)*@mn11+@fnm2(c3)*@mn7+@mn8*(@fnm5(za3)+@mn9) if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-@mn6*a1/b1 za2=za2-@mn6*a2/b2 za3=za3-@mn6*a3/b3 elseif (@selmode==2) a1=@m2n3*@fnnew1(c1)+za1^(@m2n1+1)+@m2n5*((@m2n8-1)*@fnnew3(za1)^@m2n4+@fnnew2(c1)) a2=@m2n3*@fnnew1(c2)+za2^(@m2n1+1)+@m2n5*((@m2n8-1)*@fnnew3(za2)^@m2n4+@fnnew2(c2)) a3=@m2n3*@fnnew1(c3)+za3^(@m2n1+1)+@m2n5*((@m2n8-1)*@fnnew3(za3)^@m2n4+@fnnew2(c3)) b1=@m2n2+(@m2n1+1)*za1^@m2n1+@m2n7*(@m2n4*za1^(@m2n4-1)) b2=@m2n2+(@m2n1+1)*za2^@m2n1+@m2n7*(@m2n4*za2^(@m2n4-1)) b3=@m2n2+(@m2n1+1)*za3^@m2n1+@m2n7*(@m2n4*za3^(@m2n4-1)) if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-@m2n6*a1/b1 za2=za2-@m2n6*a2/b2 za3=za3-@m2n6*a3/b3 elseif (@selmode==3) a1 = za1^3+(@fn3n1(c1)-@m3n1)*(za1+@m3n2)-@fn3n2(c1-@m3n6)*@m3n7 a2 = za2^3+(@fn3n1(c2)-@m3n1)*(za2+@m3n2)-@fn3n2(c2-@m3n6)*@m3n7 a3 = za3^3+(@fn3n1(c3)-@m3n1)*(za3+@m3n2)-@fn3n2(c3-@m3n6)*@m3n7 b1 = real(@m3n3)*za1^imag(@m3n3)+@m3n9+@fn3n3(c1-@m3n4)*@m3n8 b2 = real(@m3n3)*za2^imag(@m3n3)+@m3n9+@fn3n3(c2-@m3n4)*@m3n8 b3 = real(@m3n3)*za3^imag(@m3n3)+@m3n9+@fn3n3(c3-@m3n4)*@m3n8 if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1= za1-@m3n5*a1/b1 za2= za2-@m3n5*a2/b2 za3= za3-@m3n5*a3/b3 elseif (@selmode==4) a1=za1^5+c1+(@m4n1*za1^-3)+@m4n2*za1+@m4n9+(@fn4n1(c1)+@m4n4)*@m4n5 a2=za2^5+c2+(@m4n1*za2^-3)+@m4n2*za2+@m4n9+(@fn4n1(c2)+@m4n4)*@m4n5 a3=za3^5+c3+(@m4n1*za3^-3)+@m4n2*za3+@m4n9+(@fn4n1(c3)+@m4n4)*@m4n5 b1=@m4n3*za1^4+@fn4n2(c1+@m4n6)*@m4n7 b2=@m4n3*za2^4+@fn4n2(c2+@m4n6)*@m4n7 b3=@m4n3*za3^4+@fn4n2(c3+@m4n6)*@m4n7 if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-@m4n8*a1/b1 za2=za2-@m4n8*a2/b2 za3=za3-@m4n8*a3/b3 elseif (@selmode==5) a1=(@fn5n1(c1)+@m5n4)*@m5n5+za1^@m5n2+@m5n3*(@m5n1*za1^(-3))+(@fn5n2(c1)+@m5n6)*@m5n7 a2=(@fn5n1(c2)+@m5n4)*@m5n5+za2^@m5n2+@m5n3*(@m5n1*za2^(-3))+(@fn5n2(c2)+@m5n6)*@m5n7 a3=(@fn5n1(c3)+@m5n4)*@m5n5+za3^@m5n2+@m5n3*(@m5n1*za3^(-3))+(@fn5n2(c3)+@m5n6)*@m5n7 b1=@m5n11+@m5n2*za1^(@m5n2-1)+(@fn5n3(c1)+@m5n8)*@m5n9 b2=@m5n11+@m5n2*za2^(@m5n2-1)+(@fn5n3(c2)+@m5n8)*@m5n9 b3=@m5n11+@m5n2*za3^(@m5n2-1)+(@fn5n3(c3)+@m5n8)*@m5n9 if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-@m5n10*a1/b1 za2=za2-@m5n10*a2/b2 za3=za3-@m5n10*a3/b3 elseif (@selmode==6) if (@opMod6==0) a1=@m6n1*(za1^3+3*@fn6n1(za1)^2+@m6n7)+2*c1+@m6n2*za1^2+@fn6n2(c1+@m6n8)*@m6n3 a2=@m6n1*(za2^3+3*@fn6n1(za2)^2+@m6n7)+2*c2+@m6n2*za2^2+@fn6n2(c2+@m6n8)*@m6n3 a3=@m6n1*(za3^3+3*@fn6n1(za3)^2+@m6n7)+2*c3+@m6n2*za3^2+@fn6n2(c3+@m6n8)*@m6n3 b1=za1^2+@m6n9*(@fn6n3(za1)+@m6n4)+@m6n5*(@fn6n4(c1)+@m6n6) b2=za2^2+@m6n9*(@fn6n3(za2)+@m6n4)+@m6n5*(@fn6n4(c2)+@m6n6) b3=za3^2+@m6n9*(@fn6n3(za3)+@m6n4)+@m6n5*(@fn6n4(c3)+@m6n6) elseif (@opMod6==1) a1=@m6n1*(za1^3+3*@fn6n1(za1)^2+@m6n7)+2*c1+@m6n2*za1^2+@fn6n2(c1+@m6n8)*@m6n3 a2=@m6n1*(za2^3+3*@fn6n1(za2)^2+@m6n7)+2*c2+@m6n2*za2^2+@fn6n2(c2+@m6n8)*@m6n3 a3=@m6n1*(za3^3+3*@fn6n1(za3)^2+@m6n7)+2*c3+@m6n2*za3^2+@fn6n2(c3+@m6n8)*@m6n3 b1=za1^2+@m6n9*(@fn6n3(za1)+@m6n4)*@m6n5*(@fn6n4(c1)+@m6n6) b2=za2^2+@m6n9*(@fn6n3(za2)+@m6n4)*@m6n5*(@fn6n4(c2)+@m6n6) b3=za3^2+@m6n9*(@fn6n3(za3)+@m6n4)*@m6n5*(@fn6n4(c3)+@m6n6) endif if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-1*a1/b1 za2=za2-1*a2/b2 za3=za3-1*a3/b3 elseif (@selmode==7) if (@opMod7==0) a1=za1^3+@m7n5*@fn7n3(c1-@m7n1)*(@fn7n1(za1)-@m7n2)+@fn7n4(c1-@m7n6)*@m7n7 a2=za2^3+@m7n5*@fn7n3(c2-@m7n1)*(@fn7n1(za2)-@m7n2)+@fn7n4(c2-@m7n6)*@m7n7 a3=za3^3+@m7n5*@fn7n3(c3-@m7n1)*(@fn7n1(za3)-@m7n2)+@fn7n4(c3-@m7n6)*@m7n7 b1=real(@m7n3)*@fn7n2(za1)^imag(@m7n3)+@fn7n5(c1-@m7n4)*@m7n10+za1^2+@fn7n6(c1-@m7n8)*@m7n9 b2=real(@m7n3)*@fn7n2(za2)^imag(@m7n3)+@fn7n5(c2-@m7n4)*@m7n10+za2^2+@fn7n6(c2-@m7n8)*@m7n9 b3=real(@m7n3)*@fn7n2(za3)^imag(@m7n3)+@fn7n5(c3-@m7n4)*@m7n10+za3^2+@fn7n6(c3-@m7n8)*@m7n9 elseif (@opMod7==1) a1=za1^3+@m7n5*@fn7n3(c1-@m7n1)*(@fn7n1(za1)-@m7n2)*@fn7n4(c1-@m7n6)*@m7n7 a2=za2^3+@m7n5*@fn7n3(c2-@m7n1)*(@fn7n1(za2)-@m7n2)*@fn7n4(c2-@m7n6)*@m7n7 a3=za3^3+@m7n5*@fn7n3(c3-@m7n1)*(@fn7n1(za3)-@m7n2)*@fn7n4(c3-@m7n6)*@m7n7 b1=real(@m7n3)*@fn7n2(za1)^imag(@m7n3)+@fn7n5(c1-@m7n4)*@m7n10+za1^2+@fn7n6(c1-@m7n8)*@m7n9 b2=real(@m7n3)*@fn7n2(za2)^imag(@m7n3)+@fn7n5(c2-@m7n4)*@m7n10+za2^2+@fn7n6(c2-@m7n8)*@m7n9 b3=real(@m7n3)*@fn7n2(za3)^imag(@m7n3)+@fn7n5(c3-@m7n4)*@m7n10+za3^2+@fn7n6(c3-@m7n8)*@m7n9 elseif (@opMod7==2) a1=za1^3+@m7n5*@fn7n3(c1-@m7n1)*(@fn7n1(za1)-@m7n2)+@fn7n4(c1-@m7n6)*@m7n7 a2=za2^3+@m7n5*@fn7n3(c2-@m7n1)*(@fn7n1(za2)-@m7n2)+@fn7n4(c2-@m7n6)*@m7n7 a3=za3^3+@m7n5*@fn7n3(c3-@m7n1)*(@fn7n1(za3)-@m7n2)+@fn7n4(c3-@m7n6)*@m7n7 b1=real(@m7n3)*@fn7n2(za1)^imag(@m7n3)+@fn7n5(c1-@m7n4)*@m7n10+za1^2*@fn7n6(c1-@m7n8)*@m7n9 b2=real(@m7n3)*@fn7n2(za2)^imag(@m7n3)+@fn7n5(c2-@m7n4)*@m7n10+za2^2*@fn7n6(c2-@m7n8)*@m7n9 b3=real(@m7n3)*@fn7n2(za3)^imag(@m7n3)+@fn7n5(c3-@m7n4)*@m7n10+za3^2*@fn7n6(c3-@m7n8)*@m7n9 elseif (@opMod7==3) a1=za1^3+@m7n5*@fn7n3(c1-@m7n1)*(@fn7n1(za1)-@m7n2)*@fn7n4(c1-@m7n6)*@m7n7 a2=za2^3+@m7n5*@fn7n3(c2-@m7n1)*(@fn7n1(za2)-@m7n2)*@fn7n4(c2-@m7n6)*@m7n7 a3=za3^3+@m7n5*@fn7n3(c3-@m7n1)*(@fn7n1(za3)-@m7n2)*@fn7n4(c3-@m7n6)*@m7n7 b1=real(@m7n3)*@fn7n2(za1)^imag(@m7n3)+@fn7n5(c1-@m7n4)*@m7n10+za1^2*@fn7n6(c1-@m7n8)*@m7n9 b2=real(@m7n3)*@fn7n2(za2)^imag(@m7n3)+@fn7n5(c2-@m7n4)*@m7n10+za2^2*@fn7n6(c2-@m7n8)*@m7n9 b3=real(@m7n3)*@fn7n2(za3)^imag(@m7n3)+@fn7n5(c3-@m7n4)*@m7n10+za3^2*@fn7n6(c3-@m7n8)*@m7n9 endif if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-1*a1/b1 za2=za2-1*a2/b2 za3=za3-1*a3/b3 elseif (@selmode==8) a1=(za1^3+3*za1^2)+(@m8n1*za1^2+3*@fn8n1(c1)) a2=(za2^3+3*za2^2)+(@m8n1*za2^2+3*@fn8n1(c2)) a3=(za3^3+3*za3^2)+(@m8n1*za3^2+3*@fn8n1(c3)) b1=@m8n2*(za1^2+@fn8n2(za1))+@m8n3+@fn8n3(c1)*@m8n4+(@fn8n4(c1)*@m8n5+@m8n6) b2=@m8n2*(za2^2+@fn8n2(za2))+@m8n3+@fn8n3(c2)*@m8n4+(@fn8n4(c2)*@m8n5+@m8n6) b3=@m8n2*(za3^2+@fn8n2(za3))+@m8n3+@fn8n3(c3)*@m8n4+(@fn8n4(c3)*@m8n5+@m8n6) if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-1*a1/b1 za2=za2-1*a2/b2 za3=za3-1*a3/b3 elseif (@selmode==9) a1=@fn9n1(c1)+za1^@m9n5+@m9n1*@fn9n2(za1)^-3+@fn9n3(c1)+@m9n2*@fn9n4(za1) a2=@fn9n1(c2)+za2^@m9n5+@m9n1*@fn9n2(za2)^-3+@fn9n3(c2)+@m9n2*@fn9n4(za2) a3=@fn9n1(c3)+za3^@m9n5+@m9n1*@fn9n2(za3)^-3+@fn9n3(c3)+@m9n2*@fn9n4(za3) b1=@m9n5*@fn9n5(za1)^(@m9n5-1)+@m9n3 + @m9n4*(@fn9n6(za1)+@fn9n7(c1))+@m9n6 b2=@m9n5*@fn9n5(za2)^(@m9n5-1)+@m9n3 + @m9n4*(@fn9n6(za1)+@fn9n7(c2))+@m9n6 b3=@m9n5*@fn9n5(za3)^(@m9n5-1)+@m9n3 + @m9n4*(@fn9n6(za1)+@fn9n7(c3))+@m9n6 if (@showGlobal) a1 = @glob1a+a1*@glob2a a2 = @glob1a+a2*@glob2a a3 = @glob1a+a3*@glob2a b1 = @glob1b+b1*@glob2b b2 = @glob1b+b2*@glob2b b3 = @glob1b+b3*@glob2b endif za1=za1-1*a1/b1 za2=za2-1*a2/b2 za3=za3-1*a3/b3 endif z1=za1 z2=za2 z3=za3 ;----------------------------Define Flavor-------------------------------------- k1=(@fnflav1(a1)+@flav1)*@flav2 k2=(@fnflav1(a2)+@flav1)*@flav2 k3=(@fnflav1(a3)+@flav1)*@flav2 ;----------------------------Proceding Slope------------------------------------ if (@zmode == 5) iterexp1 = iterexp1 + exp(-1/(cabs(k1))) iterexp2 = iterexp2 + exp(-1/(cabs(k2))) iterexp3 = iterexp3 + exp(-1/(cabs(k3))) endif done = done + 1; increment iteration counter if (@zmode == 0) ; smallest |z| d1 = |z1|; get current distances from origin d2 = |z2| d3 = |z3| if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 1) ; smallest |real(z)| d1 = abs(real(z1)); get current distances from i axis d2 = abs(real(z2)) d3 = abs(real(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 2) ; smallest |imag(z)| d1 = abs(imag(z1)); get current distances from r axis d2 = abs(imag(z2)) d3 = abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 3) ; smallest |real(z)|+|imag(z)| d1 = abs(real(z1))+abs(imag(z1)); get current distances from i axis d2 = abs(real(z2))+abs(imag(z2)) d3 = abs(real(z3))+abs(imag(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif elseif (@zmode == 4) ; smallest |atan(z)| d1 = abs(atan2(z1)); get current angles d2 = abs(atan2(z2)) d3 = abs(atan2(z3)) if (d1 < s1); update smallest distances s1 = d1 endif if (d2 < s2) s2 = d2 endif if (d3 < s3) s3 = d3 endif endif if (@bailout >= |a1| || \ @everyiter ||\ done == #maxit + 2); done, or every iteration, or last ; determine continuous iteration (height) for each point if (@zmode >= 0 && @zmode <= 4) ; height based on smallest |z| e1 = s1 * @zscale e2 = s2 * @zscale e3 = s3 * @zscale elseif (@zmode == 5) e1 = iterexp1 * @zscale e2 = iterexp2 * @zscale e3 = iterexp3 * @zscale endif ; apply transfer function ; a function is not used because these are floats ; and not all functions apply to floats if (@xfer == 1); log e1 = log(e1) e2 = log(e2) e3 = log(e3) elseif (@xfer == 2); sqrt e1 = sqrt(e1) e2 = sqrt(e2) e3 = sqrt(e3) elseif (@xfer == 3); cuberoot e1 = (e1)^(1/3) e2 = (e2)^(1/3) e3 = (e3)^(1/3) elseif (@xfer == 4); exp e1 = exp(e1) e2 = exp(e2) e3 = exp(e3) elseif (@xfer == 5); sqr e1 = sqr(e1) e2 = sqr(e2) e3 = sqr(e3) elseif (@xfer == 6); cube e1 = (e1)^3 e2 = (e2)^3 e3 = (e3)^3 elseif (@xfer == 7); sin e1 = sin(e1) e2 = sin(e2) e3 = sin(e3) elseif (@xfer == 8); cos e1 = cos(e1) e2 = cos(e2) e3 = cos(e3) elseif (@xfer == 9); tan e1 = tan(e1) e2 = tan(e2) e3 = tan(e3) endif ; apply post-scale e1 = e1 * @zscale2 e2 = e2 * @zscale2 e3 = e3 * @zscale2 vx = e2-e1 vy = e3-e1 vz = -@offset ; normalize vector vd = 1/sqrt(sqr(vx)+sqr(vy)+sqr(vz)) vx = vx*vd vy = vy*vd vz = vz*vd z = vx + flip(vy); fudge z from vector ELSE; didn't compute z this time z = z1; use primary iteration value to keep periodicity working endif if ( @bailout >= |a1| ) ; we're done done = 0 endif iter=iter+1 Bailout: done > 0 Default: Title="SlopeMandNewton" maxiter=250 method=multipass periodicity=0 Heading caption="Mandelbrot Mode" visible=@mode==0 Endheading Heading caption="Julia Mode" visible=@mode==1 Endheading param mode caption="current Mode" default=0 enum="Mandelbrot""Julia" visible=false endparam param switchMode caption="Switch Mode" default=1 enum="Mandelbrot""Julia" visible=false endparam param zpixel caption="Z=Pixel(only in MandelbrotMode)" default=false visible=(@mode=="Mandelbrot") endparam param bailout caption="Bailout" default=1.0E-8 min=0.0 endparam param start caption="Start Value" default=(0.0,0.0) visible=(@mode=="Mandelbrot")&&(@zpixel==false) endparam param seed caption="Seed Value" default=(0.0,0.0) visible=(@mode=="Julia") endparam Heading caption="Flavor" show=false endheading param flav1 caption="Add Flavor" default=(0.0,0.0) endparam param flav2 caption="Mult. Flavor" default=(1.0,0.0) endparam func fnflav1 caption="Func. Flavor" default=ident() endfunc Heading caption="Slope Parameters" show=false endheading param offset caption="Orbit Separation" default=1.0e-8 hint="Defines how far apart the simultaneous orbits are. Smaller \ distances will produce more accurate results." endparam param zmode caption="Height Value" default=5 enum="smallest |z|" "smallest |real(z)|" \ "smallest |imag(z)|" "smallest summ(z)" "smallest |atan(z)|" \ "smoothed iteration" hint="Specifies what will be used to construct a height value." endparam param xfer caption="Height Transfer" default=0 enum="linear" "log" "sqrt" "cuberoot" "exp" "sqr" "cube" "sin" "cos" "tan" hint="This function will be applied to the height value \ before a slope is calculated." endparam param zscale caption="Height Pre-Scale" default=1.0 hint="Specifies the ratio between height and distance. Higher \ values will exaggerate differences between high and low. \ In general, you will want to use smaller numbers here." endparam param zscale2 caption="Height Post-Scale" default=0.025 hint="Specifies the ratio between height and distance; like \ Height Pre-Scale, except that this value is applied after \ the transfer function." endparam param everyiter caption="Every Iteration" default=false hint="if set, the surface normal will be computed at every \ iteration. if you are using a coloring algorithm which \ processes every iteration, you will need this." endparam Heading caption="3R Dimensions" show=false endheading param rd1 caption="3R Dim.1" default=(1.0,0.0) endparam param rd2 caption="3R Dim.2" default=(1.0,0.0) endparam param rd3 caption="3R Dim.3" default=(0.0,0.0) endparam Heading caption="Formula Parameters" endheading param selmode caption="Select Mode" enum="Mandelbrot Newton 1""Mandelbrot Newton 2""Mandelbrot Newton 3""Mandelbrot Newton 4""Mandelbrot Newton 5"\ "Mandelbrot Newton 6""Mandelbrot Newton 7""Mandelbrot Newton 8""Mandelbrot Newton 9""Mandelbrot Newton 10" default=0 endparam bool param showGlobal caption="Global Param. a/b" default=false endparam Heading caption="Global Param. a/b" visible = @showGlobal endheading param glob1a caption="Glob. Add a" default=(0.0,0.0) visible = @showGlobal endparam param glob2a caption="Glob. Mult. a" default=(1.0,0.0) visible = @showGlobal endparam param glob1b caption="Glob. Add b" default=(0.0,0.0) visible = @showGlobal endparam param glob2b caption="Glob. Mult. b" default=(1.0,0.0) visible = @showGlobal endparam Heading caption="Mandelbrot Newton 1" visible=(@selmode==0) endheading param p6 caption="Wheel" default=(2.0,2.0) visible=(@selmode==0) endparam param p7 caption="Add. 1Z" default=(0.0,0.0) visible=(@selmode==0) endparam param p2 caption="Add. 2Z" default=(1.0,0.0) visible=(@selmode==0) endparam param p11 caption="Exp. 1Z" default=(3.0,0.0) visible=(@selmode==0) endparam param p1 caption="Add. 1C" default=(1.0,0.0) visible=(@selmode==0) endparam param p3 caption="Add. 2C" default=(0.0,0.0) visible=(@selmode==0) endparam param p4 caption="Add. 3C" default=(1.1,0.0) visible=(@selmode==0) endparam param p8 caption="Mult. 1C" default=(1.0,0.0) visible=(@selmode==0) endparam param p9 caption="Mult. 2C" default=(1.0,0.0) visible=(@selmode==0) endparam param p10 caption="Mult. 3C" default=(0.0,0.0) visible=(@selmode==0) endparam param p5 caption="Final Mult." default=(1.0,0.0) visible=(@selmode==0) endparam Heading caption="Formula Functions Mandelbrot Newton 1" visible=(@selmode==0) endheading func fn3 caption="Function 1Z" default=ident() visible=(@selmode==0) endfunc func fn4 caption="Function 1C" default=ident() visible=(@selmode==0) enabled=(@p8!=0) endfunc func fn5 caption="Function 2C" default=ident() visible=(@selmode==0) endfunc func fn6 caption="Function 3C" default=ident() visible=(@selmode==0) enabled=(@p9!=0) endfunc func fn7 caption="Function 4C" default=ident() visible=(@selmode==0) enabled=(@p10!=0) endfunc Heading caption="Mandelbrot Newton 2" visible=(@selmode==1) endheading param mn10 caption="Wheel" default=(-3.0,0.0) enabled=(@mn3!=0) visible=(@selmode==1) endparam param mn3 caption="Mult. 1Z" default=(0.5,0.0) visible=(@selmode==1) endparam param mn9 caption="Add 2Z" default=(0.0,0.0) enabled=(@mn8!=0) visible=(@selmode==1) endparam param mn8 caption="Mult. 2Z" default=(0.0,0.0) visible=(@selmode==1) endparam param mn5 caption="Add 3Z" default=(1.0,0.0) visible=(@selmode==1) endparam param mn11 caption="Mult. 3Z" default=(1.0,0.0) visible=(@selmode==1) endparam param mn1 caption="Exp. 3Z" default=(4.0,0.0) visible=(@selmode==1) endparam param mn2 caption="Mult. 1C" default=(1.0,0.0) visible=(@selmode==1) endparam param mn4 caption="Mult. 2C" default=(1.0,0.0) visible=(@selmode==1) endparam param mn7 caption="Mult. 3C" default=(0.0,0.0) visible=(@selmode==1) endparam param mn6 caption="Final Mult." default=(1.0,0.0) visible=(@selmode==1) endparam Heading caption="Formula Functions Mandelbrot Newton 2" visible=(@selmode==1) endheading func fnm4 caption="Function 1Z" default=ident() visible=(@selmode==1) enabled=(@mn3!=0) endfunc func fnm5 caption="Function 2Z" default=ident() visible=(@selmode==1) enabled=(@mn8!=0) endfunc func fnm1 caption="Function 1C" default=ident() visible=(@selmode==1) enabled=(@mn2!=0) endfunc func fnm2 caption="Function 2C" default=ident() visible=(@selmode==1) enabled=(@mn7!=0) endfunc func fnm3 caption="Function 3C" default=ident() visible=(@selmode==1) enabled=(@mn4!=0) endfunc Heading caption="Mandelbrot Newton 3" visible=(@selmode==2) endheading param m2n1 caption="Wheel 1" default=(4.0,0.0) visible=(@selmode==2) endparam param m2n4 caption="Wheel 2" default=(-3.0,0.0) visible=(@selmode==2) endparam param m2n3 caption="Mult. 1C" default=(1.0,0.0) visible=(@selmode==2) endparam param m2n8 caption="Mult. 1Z" default=(3.0,0.0) visible=(@selmode==2) enabled=(@m2n5!=0) endparam param m2n5 caption="Mult. 2Z" default=(1.0,0.0) visible=(@selmode==2) endparam param m2n2 caption="Add 3Z" default=(1.0,0.0) visible=(@selmode==2) endparam param m2n7 caption="Mult. 3Z" default=(0.0,0.0) visible=(@selmode==2) endparam param m2n6 caption="Final Mult." default=(1,0.0) visible=(@selmode==2) endparam Heading caption="Formula Functions Mandelbrot Newton 3" visible=(@selmode==2) endheading func fnnew3 caption="Function 1Z" default=ident() visible=(@selmode==2) enabled=(@m2n5!=0) endfunc func fnnew1 caption="Function 1C" default=ident() visible=(@selmode==2) enabled=(@m2n3!=0) endfunc func fnnew2 caption="Function 2C" default=ident() visible=(@selmode==2) endfunc Heading caption="Mandelbrot Newton 4" visible=(@selmode==3) endheading param m3n3 caption="Wheel" default=(2.0,2.0) visible=(@selmode==3) endparam param m3n1 caption="Add 1C" default=(0.8,0.0) visible=(@selmode==3) endparam param m3n6 caption="Add 2C" default=(0.0,0.0) visible=(@selmode==3) endparam param m3n4 caption="Add 3C" default=(1.0,0.0) visible=(@selmode==3) endparam param m3n7 caption="Mult. 2C" default=(1.0,0.0) visible=(@selmode==3) endparam param m3n8 caption="Mult. 3C" default=(1.0,0.0) visible=(@selmode==3) endparam param m3n2 caption="Add 1Z" default=(-1.0,0.0) visible=(@selmode==3) endparam param m3n9 caption="Add 2Z" default=(0.0,0.0) visible=(@selmode==3) endparam param m3n5 caption="Final Mult." default=(1.0,0.0) visible=(@selmode==3) endparam Heading caption="Formula Functions Mandelbrot Newton 4" visible=(@selmode==3) endheading func fn3n1 caption="Function 1C" default=ident() visible=(@selmode==3) endfunc func fn3n2 caption="Function 2C" default=ident() visible=(@selmode==3) endfunc func fn3n3 caption="Function 3C" default=ident() visible=(@selmode==3) endfunc Heading caption="Mandelbrot Newton 5" visible=(@selmode==4) endheading param m4n4 caption="Add. 1C" default=(0.0,0.0) visible=(@selmode==4) endparam param m4n6 caption="Add. 2C" default=(-1.0,0.0) visible=(@selmode==4) endparam param m4n5 caption="Mult. 1C" default=(0.7,0.0) visible=(@selmode==4) endparam param m4n7 caption="Mult. 2C" default=(1.0,0.0) visible=(@selmode==4) endparam param m4n9 caption="Add. 1Z" default=(0.0,0.0) visible=(@selmode==4) endparam param m4n1 caption="Mult. 1Z" default=(1.0,0.0) visible=(@selmode==4) endparam param m4n2 caption="Mult. 2Z" default=(3.0,0.0) visible=(@selmode==4) endparam param m4n3 caption="Mult. 3Z" default=(4.0,0.0) visible=(@selmode==4) endparam param m4n8 caption="Final Mult." default=(1.0,0.0) visible=(@selmode==4) endparam Heading caption="Formula Functions Mandelbrot Newton 5" visible=(@selmode==4) endheading func fn4n1 caption="Function 1C" default=ident() visible=(@selmode==4) endfunc func fn4n2 caption="Function 2C" default=ident() visible=(@selmode==4) endfunc Heading caption="Mandelbrot Newton 6" visible=(@selmode==5) endheading param m5n2 caption="Wheel" default=(5.0,0.0) visible=(@selmode==5) endparam param m5n11 caption="Add 1Z" default=(1.0,0.0) visible=(@selmode==5) endparam param m5n3 caption="Mult. 1Z" default=(1.0,0.0) visible=(@selmode==5) endparam param m5n1 caption="Mult. 2Z" default=(-1.0,0.0) visible=(@selmode==5) endparam param m5n4 caption="Add 1C" default=(0.0,0.0) visible=(@selmode==5) endparam param m5n5 caption="Mult. 1C" default=(5.0,0.0) visible=(@selmode==5) endparam param m5n6 caption="Add 2C" default=(-0.5,0.0) visible=(@selmode==5) endparam param m5n7 caption="Mult. 2C" default=(3.0,0.0) visible=(@selmode==5) endparam param m5n8 caption="Add 3C" default=(0.1,0.0) visible=(@selmode==5) endparam param m5n9 caption="Mult. 3C" default=(1.0,0.0) visible=(@selmode==5) endparam param m5n10 caption="Final Mult." default=(1.0,0.0) visible=(@selmode==5) endparam Heading caption="Formula Functions Mandelbrot Newton 6" visible=(@selmode==5) endheading func fn5n1 caption="Function 1C" default=ident() visible=(@selmode==5) endfunc func fn5n2 caption="Function 2C" default=ident() visible=(@selmode==5) endfunc func fn5n3 caption="Function 3C" default=ident() visible=(@selmode==5) endfunc Heading caption="Mandelbrot Newton 7" visible=(@selmode==6) endheading param opMod6 caption="Select Mode" enum="+""*" default=0 visible=(@selmode==6) endparam param m6n7 caption="Add 1Z" default=(0.0,0.0) visible=(@selmode==6) endparam param m6n4 caption="Add 2Z" default=(2.0,0.0) visible=(@selmode==6) endparam param m6n8 caption="Add 1C" default=(0.0,0.0) visible=(@selmode==6) endparam param m6n6 caption="Add 2C" default=(3.2,0.0) visible=(@selmode==6) endparam param m6n1 caption="Mult. 1Z" default=(1.0,0.0) visible=(@selmode==6) endparam param m6n2 caption="Mult. 2Z" default=(3.5,0.0) visible=(@selmode==6) endparam param m6n9 caption="Mult. 3Z" default=(1.0,0.0) visible=(@selmode==6) endparam param m6n3 caption="Mult. 1C" default=(1.0,0.0) visible=(@selmode==6) endparam param m6n5 caption="Mult. 2C" default=(1.0,0.0) visible=(@selmode==6) endparam Heading caption="Formula Functions Mandelbrot Newton 7" visible=(@selmode==6) endheading func fn6n1 caption="Function 1Z" default=ident() visible=(@selmode==6) endfunc func fn6n3 caption="Function 2Z" default=ident() visible=(@selmode==6) endfunc func fn6n2 caption="Function 1C" default=ident() visible=(@selmode==6) endfunc func fn6n4 caption="Function 2C" default=ident() visible=(@selmode==6) endfunc Heading caption="Mandelbrot Newton 8" visible=(@selmode==7) endheading param opMod7 caption="Select Mode" enum="+|+""*|+""+|*""*|*" default=0 visible=(@selmode==7) endparam param m7n3 caption="Wheel" default=(2.0,2.0) visible=(@selmode==7) endparam param m7n1 caption="Add 1C" default=(1.0,0.0) visible=(@selmode==7) endparam param m7n6 caption="Add 2C" default=(0.0,0.0) visible=(@selmode==7) endparam param m7n4 caption="Add 3C" default=(1.0,0.0) visible=(@selmode==7) endparam param m7n8 caption="Add 4C" default=(0.0,0.0) visible=(@selmode==7) endparam param m7n2 caption="Add 1Z" default=(1.0,0.0) visible=(@selmode==7) endparam param m7n5 caption="Mult. 1C" default=(1.0,0.0) visible=(@selmode==7) endparam param m7n7 caption="Mult. 2C" default=(-1.0,0.0) visible=(@selmode==7) endparam param m7n10 caption="Mult. 3C" default=(1.0,0.0) visible=(@selmode==7) endparam param m7n9 caption="Mult. 4C" default=(0.0,0.0) visible=(@selmode==7) endparam Heading caption="Formula Functions Mandelbrot Newton 8" visible=(@selmode==7) endheading func fn7n1 caption="Function 1Z" default=ident() visible=(@selmode==7) endfunc func fn7n2 caption="Function 2Z" default=ident() visible=(@selmode==7) endfunc func fn7n3 caption="Function 1C" default=ident() visible=(@selmode==7) endfunc func fn7n4 caption="Function 2C" default=ident() visible=(@selmode==7) endfunc func fn7n5 caption="Function 3C" default=ident() visible=(@selmode==7) endfunc func fn7n6 caption="Function 4C" default=ident() visible=(@selmode==7) endfunc Heading caption="Mandelbrot Newton 9" visible=(@selmode==8) endheading param m8n1 caption="Mult. 1Z" default=(1.0,0.0) visible=(@selmode==8) endparam param m8n2 caption="Mult. 2Z" default=(1.0,0.0) visible=(@selmode==8) endparam param m8n3 caption="Add 1C" default=(3.5,0.0) visible=(@selmode==8) endparam param m8n6 caption="Add 2C" default=(0.0,0.0) visible=(@selmode==8) endparam param m8n4 caption="Mult. 1C" default=(0.5,0.0) visible=(@selmode==8) endparam param m8n5 caption="Mult. 2C" default=(0.5,0.0) visible=(@selmode==8) endparam Heading caption="Formula Functions Mandelbrot Newton 9" visible=(@selmode==8) endheading func fn8n1 caption="Function 1C" default=ident() visible=(@selmode==8) endfunc func fn8n3 caption="Function 2C" default=ident() visible=(@selmode==8) endfunc func fn8n4 caption="Function 3C" default=ident() visible=(@selmode==8) endfunc func fn8n2 caption="Function Z" default=ident() visible=(@selmode==8) endfunc Heading caption="Mandelbrot Newton 10" visible=(@selmode==9) endheading param m9n5 caption="Wheel" default=(5.0,0.0) visible=(@selmode==9) endparam param m9n1 caption="Mult 1Z" default=(1.0,0.0) visible=(@selmode==9) endparam param m9n2 caption="Mult. 2Z" default=(1.0,0.0) visible=(@selmode==9) endparam param m9n3 caption="Add 3Z" default=(3.0,0.0) visible=(@selmode==9) endparam param m9n4 caption="Mult. (Z+C)" default=(0.0,0.0) visible=(@selmode==9) endparam param m9n6 caption="Add (Z+C)" default=(0.0,0.0) visible=(@selmode==9) endparam Heading caption="Formula Functions Mandelbrot Newton 10" visible=(@selmode==9) endheading func fn9n1 caption="Function 1C" default=ident() visible=(@selmode==9) endfunc func fn9n3 caption="Function 2C" default=ident() visible=(@selmode==9) endfunc func fn9n7 caption="Function 3C" default=ident() visible=(@selmode==9) endfunc func fn9n2 caption="Function 1Z" default=ident() visible=(@selmode==9) endfunc func fn9n4 caption="Function 2Z" default=ident() visible=(@selmode==9) endfunc func fn9n5 caption="Function 3Z" default=ident() visible=(@selmode==9) endfunc func fn9n6 caption="Function 4Z" default=ident() visible=(@selmode==9) endfunc Heading caption="Global Functions" show=false endheading func fn1 caption="Global Func. Z" default=ident() endfunc func fn2 caption="Global Func. C" default=ident() endfunc param version caption="Version" default=1.1 visible=false endparam Switch: type="SlopeMandNewton" zpixel=@zpixel bailout=@bailout @seed=#pixel flav1=@flav1 flav2=@flav2 fnflav1=@fnflav1 selmode=@selmode showGlobal=@showGlobal rd1=@rd1 rd2=@rd2 rd3=@rd3 glob1a=@glob1a glob2a=@glob2a glob1b=@glob1b glob2b=@glob2b p1=@p1 p2=@p2 p3=@p3 p4=@p4 p5=@p5 p6=@p6 p7=@p7 p8=@p8 p9=@p9 p10=@p10 p11=@p11 m2n1=@m2n1 m2n2=@m2n2 m2n3=@m2n3 m2n4=@m2n4 m2n5=@m2n5 m2n6=@m2n6 m2n7=@m2n7 m2n8=@m2n8 mn1=@mn1 mn2=@mn2 mn3=@mn3 mn4=@mn4 mn5=@mn5 mn6=@mn6 mn7=@mn7 mn8=@mn8 mn9=@mn9 mn10=@mn10 mn11=@mn11 m3n1=@m3n1 m3n2=@m3n2 m3n3=@m3n3 m3n4=@m3n4 m3n5=@m3n5 m3n6=@m3n6 m3n7=@m3n7 m3n8=@m3n8 m3n9=@m3n9 m4n1=@m4n1 m4n2=@m4n2 m4n3=@m4n3 m4n4=@m4n4 m4n5=@m4n5 m4n6=@m4n6 m4n7=@m4n7 m4n8=@m4n8 m4n9=@m4n9 m5n1=@m5n1 m5n2=@m5n2 m5n3=@m5n3 m5n4=@m5n4 m5n5=@m5n5 m5n6=@m5n6 m5n7=@m5n7 m5n8=@m5n8 m5n9=@m5n9 m5n10=@m5n10 m5n11=@m5n11 m6n1=@m6n1 m6n2=@m6n2 m6n3=@m6n3 m6n4=@m6n4 m6n5=@m6n5 m6n6=@m6n6 m6n7=@m6n7 m6n8=@m6n8 m6n9=@m6n9 m7n1=@m7n1 m7n2=@m7n2 m7n3=@m7n3 m7n4=@m7n4 m7n5=@m7n5 m7n6=@m7n6 m7n7=@m7n7 m7n8=@m7n8 m7n9=@m7n9 m7n10=@m7n10 m8n1=@m8n1 m8n2=@m8n2 m8n3=@m8n3 m8n4=@m8n4 m8n5=@m8n5 m8n6=@m8n6 m9n1=@m9n1 m9n2=@m9n2 m9n3=@m9n3 m9n4=@m9n4 m9n5=@m9n5 m9n6=@m9n6 fn1=@fn1 fn2=@fn2 fn3=@fn3 fn4=@fn4 fn5=@fn5 fn6=@fn6 fn7=@fn7 fnm1=@fnm1 fnm2=@fnm2 fnm3=@fnm3 fnm4=@fnm4 fnm5=@fnm5 fnnew1=@fnnew1 fnnew2=@fnnew2 fnnew3=@fnnew3 fn3n1=@fn3n1 fn3n2=@fn3n2 fn3n3=@fn3n3 fn4n1=@fn4n1 fn4n2=@fn4n2 fn5n1=@fn5n1 fn5n2=@fn5n2 fn5n3=@fn5n3 fn6n1=@fn6n1 fn6n2=@fn6n2 fn6n3=@fn6n3 fn6n4=@fn6n4 fn7n1=@fn7n1 fn7n2=@fn7n2 fn7n3=@fn7n3 fn7n4=@fn7n4 fn7n5=@fn7n5 fn7n6=@fn7n6 fn8n1=@fn8n1 fn8n2=@fn8n2 fn8n3=@fn8n3 fn8n4=@fn8n4 fn9n1=@fn9n1 fn9n2=@fn9n2 fn9n3=@fn9n3 fn9n4=@fn9n4 fn9n5=@fn9n5 fn9n6=@fn9n6 fn9n7=@fn9n7 opMod6=@opMod6 opMod7=@opMod7 mode=@switchmode switchmode=@mode offset=@offset zmode=@zmode xfer=@xfer zscale=@zscale zscale2=@zscale2 everyiter=@everyiter version=@version }