Raytrace2 { global: int xx=#width+1 int yy=#height+1 int zz=@zpixels-1 float arr[#width+1,#height+1] int arr2[#width+1,#height+1] int zarr_real[#width+1,#height+1] int zarr_imag[#width+1,#height+1] bool flag=false int counter=0 complex temp=0 int i=0 int m=0 int n=0 int t=0 int tt=0 complex zri=0 complex zjk=0 complex zlm=0 complex cri=0 complex cjk=0 temp=0 float zr =0 float zi =0 float zj=0 float zk=0 float xmin=0 float ymin=0 float zmin=0 float xmax=0 float ymax=0 float zmax=0 float xtot=0 float ytot=0 float ztot=0 float vrot=0 float cosx=0 float sinx=0 float cosy=0 float siny=0 float cosz=0 float sinz=0 float dx=0 float dy=0 float dz=0 float dxx=0 float dxy=0 float dxz=0 float dyx=0 float dyy=0 float dyz=0 float dzx=0 float dzy=0 float dzz=0 float dzx1=0 float dzy1=0 float dzz1=0 float rxmin=0 float rymin=0 float rzmin=0 float tempx=0 float tempy=0 float tempz=0 float rx=0 float ry=0 float rz=0 if xx/yy>4/3 xtot=-3/#magn ytot=xtot ymin=imag(#center)-ytot/2 ymax=ymin+ytot xtot=-xx/yy*xtot xmin=real(#center)-xtot/2 xmax=xmin+xtot else xtot=4/#magn xmin=real(#center)-xtot/2 xmax=xmin+xtot ytot=-yy/xx*xtot ymin=imag(#center)-ytot/2 ymax=ymin+ytot endif ztot=@zlength zmin=@zcenter-ztot/2 zmax=zmin+ztot if @view==true zz=1 zmin=@zcenter zmax=zmin endif dx=(xmax-xmin)/xx dy=(ymax-ymin)/yy dz=(zmax-zmin)/zz vrot=@xrot/180*#pi cosx=cos(vrot) sinx=sin(vrot) vrot=@yrot/180*#pi cosy=cos(vrot) siny=sin(vrot) vrot=-@zrot/180*#pi cosz=cos(vrot) sinz=sin(vrot) rx=xmin ry=ymin rz=zmin if @localrot rx=rx-real(#center) ry=ry-imag(#center) rz=rz-@zcenter endif tempy=ry*cosx-rz*sinx tempz=ry*sinx+rz*cosx tempx=rx rx=tempx ry=tempy rz=tempz tempx=rx*cosy+rz*siny tempz=-rx*siny+rz*cosy rx=tempx ry=tempy rz=tempz tempx=rx*cosz-ry*sinz tempy=rx*sinz+ry*cosz rx=tempx ry=tempy rz=tempz if @localrot rx=rx+real(#center) ry=ry+imag(#center) rz=rz+@zcenter endif rxmin=rx rymin=ry rzmin=rz rx=xmax ry=ymin rz=zmin if @localrot rx=rx-real(#center) ry=ry-imag(#center) rz=rz-@zcenter endif tempy=ry*cosx-rz*sinx tempz=ry*sinx+rz*cosx tempx=rx rx=tempx ry=tempy rz=tempz tempx=rx*cosy+rz*siny tempz=-rx*siny+rz*cosy rx=tempx ry=tempy rz=tempz tempx=rx*cosz-ry*sinz tempy=rx*sinz+ry*cosz rx=tempx ry=tempy rz=tempz if @localrot rx=rx+real(#center) ry=ry+imag(#center) rz=rz+@zcenter endif dxx=(rx-rxmin)/xx dxy=(ry-rymin)/xx dxz=(rz-rzmin)/xx rx=xmin ry=ymax rz=zmin if @localrot rx=rx-real(#center) ry=ry-imag(#center) rz=rz-@zcenter endif tempy=ry*cosx-rz*sinx tempz=ry*sinx+rz*cosx tempx=rx rx=tempx ry=tempy rz=tempz tempx=rx*cosy+rz*siny tempz=-rx*siny+rz*cosy rx=tempx ry=tempy rz=tempz tempx=rx*cosz-ry*sinz tempy=rx*sinz+ry*cosz rx=tempx ry=tempy rz=tempz if @localrot rx=rx+real(#center) ry=ry+imag(#center) rz=rz+@zcenter endif dyx=(rx-rxmin)/yy dyy=(ry-rymin)/yy dyz=(rz-rzmin)/yy rx=xmin ry=ymin rz=zmax if @localrot rx=rx-real(#center) ry=ry-imag(#center) rz=rz-@zcenter endif tempy=ry*cosx-rz*sinx tempz=ry*sinx+rz*cosx tempx=rx rx=tempx ry=tempy rz=tempz tempx=rx*cosy+rz*siny tempz=-rx*siny+rz*cosy rx=tempx ry=tempy rz=tempz tempx=rx*cosz-ry*sinz tempy=rx*sinz+ry*cosz rx=tempx ry=tempy rz=tempz if @localrot rx=rx+real(#center) ry=ry+imag(#center) rz=rz+@zcenter endif dzx=(rx-rxmin)/zz dzy=(ry-rymin)/zz dzz=(rz-rzmin)/zz dzx1=dzx/@precision dzy1=dzy/@precision dzz1=dzz/@precision if @Formula==0 ;Quaternion cri=@cri1 cjk=@cjk1 zk=@fourthdim while m<=yy n=0 while n<=xx t=0 zr=rxmin+n*dxx+m*dyx zi=rymin+n*dxy+m*dyy zj=rzmin+n*dxz+m*dyz flag=false while (t<=zz)&&(flag==false) i=0 zr=zr+dzx zi=zi+dzy zj=zj+dzz if @Fourth_Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif repeat temp=zri*zri-real(zjk)^2-imag(zjk)^2+cri zjk=2*(real(zri)*real(zjk)+flip(real(zri)*imag(zjk)))+cjk zri=temp i=i+1 if i==@maxiter flag=true endif until i>=@maxiter|||zri|+|zjk|>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif repeat temp=zri*zri-real(zjk)^2-imag(zjk)^2+cri zjk=2*(real(zri)*real(zjk)+flip(real(zri)*imag(zjk)))+cjk zri=temp i=i+1 until i>=@maxiter|||zri|+|zjk|>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter|||zri|+|zjk|>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif repeat temp=zri*zri-real(zjk)^2+imag(zjk)^2-2*flip(real(zjk)*imag(zjk))+cri zjk=2*(real(zri)*real(zjk)-imag(zri)*imag(zjk)+flip(real(zri)*imag(zjk)+imag(zri)*real(zjk)))+cjk zri=temp i=i+1 until i>=@maxiter|||zri|+|zjk|>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter||length>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif float a=real(zri) float b=imag(zri) float c=real(zjk) float d=imag(zjk) float ee=real(cri) float f=imag(cri) float g=real(cjk) float h=imag(cjk) float length=0 repeat q=a-(a*a-b*b-c*c-d*d) r=1-2*a l=-f*b-g*c-h*d u=ee*b+g*d-h*c v=ee*c+h*b-f*d w=ee*d+f*c-g*b a=ee*q+l*r b=f*q+u*r c=g*q+v*r d=h*q+w*r length=a*a+b*b+c*c+d*d i=i+1 until i>=@maxiter||length>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter||length>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif float a=real(zri) float b=imag(zri) float c=real(zjk) float d=imag(zjk) float ee=real(cri) float f=imag(cri) float g=real(cjk) float h=imag(cjk) float a1=0 float b1=0 float c1=0 float d1=0 float length=0 repeat float q=a*a-b*b-c*c+d*d float u=c*d-a*b float v=b*d-a*c float w=a*d+b*c a1=a*ee-b*f-c*g+d*h-(ee*q+2*(f*u+g*v+h*w)) b1=a*f+b*ee-c*h-d*g-(f*q+2*(-ee*u+h*v-g*w)) c1=a*g-b*h+c*ee-d*f-(g*q+2*(h*u-ee*v-f*w)) d1=a*h+b*g+c*f+d*ee-(h*q+2*(-g*u-f*v+ee*w)) a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d i=i+1 until i>=@maxiter||length>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter||length>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif float a=real(zri) float b=imag(zri) float c=real(zjk) float d=imag(zjk) float ee=real(cri) float f=imag(cri) float g=real(cjk) float h=imag(cjk) float ii=real(@bri) float j=imag(@bri) float k=real(@bjk) float l=imag(@bjk) float length=0 repeat float u=3*a*a-b*b-c*c-d*d float v=3*(ee*ee-f*f-g*g-h*h) float w=6*ee float q=u-v float a1=a*(3*u-8*a*a-v)+w*(f*b+g*c+h*d)+ii float b1=b*q-w*(f*a+g*d-h*c)+j float c1=c*q-w*(-f*d+g*a+h*b)+k float d1=d*q-w*(f*c-g*b+h*a)+l a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d i=i+1 until i>=@maxiter||length>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter||length>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif float a=real(zri) float b=imag(zri) float c=real(zjk) float d=imag(zjk) float ee=real(cri) float f=imag(cri) float g=real(cjk) float h=imag(cjk) float ii=real(@bri) float j=imag(@bri) float k=real(@bjk) float l=imag(@bjk) float length=0 repeat float r5=a*a float r6=b*b float r7=c*c float r8=d*d float u=ee*ee-f*f-g*g+h*h float v=g*h-ee*f float w=f*h-ee*g float q=ee*h+f*g float r=-r7+r8 float r2=r5-r6 float r3=6*c*d float r4=6*a*b float a1=r5*a+3*a*(-r6+r)+b*r3-3*(a*u+2*(b*v+c*w+d*q))+ii float b1=-r6*b+3*b*(r5+r)-a*r3-3*(b*u+2*(-a*v+d*w-c*q))+j float c1=-r7*c+3*c*(r2+r8)-r4*d-3*(c*u+2*(d*v-a*w-b*q))+k float d1=r8*d+3*d*(r2-r7)+r4*c-3*(d*u+2*(-c*v-b*w+a*q))+l a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d i=i+1 until i>=@maxiter||length>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter|||zri|+|zjk|>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth__Dim==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth__Dim==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth__Dim==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif complex cri=zri complex cjk=zjk zri=@init_zri zjk=@init_zjk repeat temp=zri*zri-real(zjk)^2-imag(zjk)^2+cri zjk=2*(real(zri)*real(zjk)+flip(real(zri)*imag(zjk)))+cjk zri=temp i=i+1 until i>=@maxiter|||zri|+|zjk|>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter|||zri|+|zjk|>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth__Dim==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth__Dim==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth__Dim==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif complex cri=zri complex cjk=zjk zri=@init_zri zjk=@init_zjk repeat temp=zri*zri-real(zjk)^2+imag(zjk)^2-2*flip(real(zjk)*imag(zjk))+cri zjk=2*(real(zri)*real(zjk)-imag(zri)*imag(zjk)+flip(real(zri)*imag(zjk)+imag(zri)*real(zjk)))+cjk zri=temp i=i+1 until i>=@maxiter|||zri|+|zjk|>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter||length>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth__Dim==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth__Dim==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth__Dim==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif float a=real(@init__zri) float b=imag(@init__zri) float c=real(@init__zjk) float d=imag(@init__zjk) float ee=real(zri) float f=imag(zri) float g=real(zjk) float h=imag(zjk) float length=0 repeat q=a-(a*a-b*b-c*c-d*d) r=1-2*a l=-f*b-g*c-h*d u=ee*b+g*d-h*c v=ee*c+h*b-f*d w=ee*d+f*c-g*b a=ee*q+l*r b=f*q+u*r c=g*q+v*r d=h*q+w*r length=a*a+b*b+c*c+d*d i=i+1 until i>=@maxiter||length>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter||length>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth__Dim==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth__Dim==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth__Dim==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif float a=real(@init__zri) float b=imag(@init__zri) float c=real(@init__zjk) float d=imag(@init__zjk) float ee=real(zri) float f=imag(zri) float g=real(zjk) float h=imag(zjk) float a1=0 float b1=0 float c1=0 float d1=0 float length=0 repeat float q=a*a-b*b-c*c+d*d float u=c*d-a*b float v=b*d-a*c float w=a*d+b*c a1=a*ee-b*f-c*g+d*h-(ee*q+2*(f*u+g*v+h*w)) b1=a*f+b*ee-c*h-d*g-(f*q+2*(-ee*u+h*v-g*w)) c1=a*g-b*h+c*ee-d*f-(g*q+2*(h*u-ee*v-f*w)) d1=a*h+b*g+c*f+d*ee-(h*q+2*(-g*u-f*v+ee*w)) a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d i=i+1 until i>=@maxiter||length>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter|||zri|>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dim==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dim==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dim==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif repeat zri=zri^2+zjk i=i+1 until i>=@maxiter|||zri|>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter|||zri|>@bailout t=t+1 if @view==true arr[n,m]=i endif endwhile t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth_Dim==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth_Dim==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth_Dim==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif repeat zri=zjk*zri*(1-zri) i=i+1 until i>=@maxiter|||zri|>@bailout tt=tt+1 if i<@maxiter flag=false endif endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zri)*1000) zarr_imag[n,m]=round(imag(zri)*1000) if t=@maxiter|||cz|>@bailout if @MSet>1 zstore=cz counter=2 if @view==false if flag==true if @Cubic_Gradient==0 arr2[n,m]=1 elseif @Cubic_Gradient==1&&(@Background==0||@Background==2) if @MSet==2 arr2[n,m]=2 else arr2[n,m]=3 endif elseif @Cubic_Gradient==1 arr2[n,m]=3 elseif @Cubic_Gradient==2 if @MSet==2 arr2[n,m]=8 else arr2[n,m]=9 endif elseif @Cubic_Gradient==3 if @MSet==2 arr2[n,m]=12 else arr2[n,m]=13 endif endif endif endif elseif counter==1 istore1=i zstore1=cz zstoren1=|cz| flagstore1=flag flag=false elseif counter==2 istore2=i zstore2=cz zstoren2=|cz| flagstore2=flag flag=false if @MSet==0 if @view==true arr2[n,m]=4 if flagstore1==true||flagstore2==true if flagstore1==true&&flagstore2==true if zstoren1istore2 arr[n,m]=istore1 zstore=zstore1 else arr[n,m]=istore2 zstore=zstore2 endif endif elseif flagstore1==true||flagstore2==true ;not view flag=true if flagstore1==true&&flagstore2==true ;Both if zstoren21 arr[n,m]=i endif endif t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Fourth__Dimension==0 zri=zr+flip(zi) zjk=zj+flip(zk) elseif @Fourth__Dimension==1 zri=zr+flip(zi) zjk=zk+flip(zj) elseif @Fourth__Dimension==2 zri=zj+flip(zk) zjk=zr+flip(zi) else zri=zk+flip(zj) zjk=zr+flip(zi) endif if @MSet<2 cz=setstore elseif @MSet==2 cz=zri else cz=-zri endif counter=0 repeat if @MSet==1 counter=counter+1 if counter==2 cz=-setstore i=0 endif else counter=2 endif repeat cz=cz*cz*cz-3*zri*zri*cz+zjk i=i+1 until i>=@maxiter|||cz|>@bailout if i<@maxiter flag=false endif until counter==2||flag==false tt=tt+1 endwhile tt=tt-1 zstore=cz endif zarr_real[n,m]=round(real(zstore)*1000) zarr_imag[n,m]=round(imag(zstore)*1000) if @MSet>1 if @view==true arr2[n,m]=4 arr[n,m]=i elseif t=zz arr[n,m]=zmax+dz if @Background==0 arr2[n,m]=0 elseif @Background==2 arr2[n,m]=5 elseif @Cubic_Gradient==0 arr2[n,m]=6 elseif @Cubic_Gradient==1 arr2[n,m]=2 elseif @Cubic_Gradient==2 arr2[n,m]=7 elseif @Cubic_Gradient==3 arr2[n,m]=10 endif endif endif else ;MSet<2 if @view==false if t=@maxiter|||cz|>@bailout zstore=cz if @QMSet>1&&@QMSet<5 counter=3 if @view==false if flag==true if @Quartic_Gradient==0 arr2[n,m]=1 elseif @Quartic_Gradient==1&&(@Background==0||@Background==2) if @QMSet==2 arr2[n,m]=2 else arr2[n,m]=3 endif elseif @Quartic_Gradient==1 arr2[n,m]=3 elseif @Quartic_Gradient==2&&(@Background==0||@Background==2) if @QMSet==2 arr2[n,m]=7 elseif @QMSet==3 arr2[n,m]=8 else arr2[n,m]=9 endif elseif @Quartic_Gradient==2 if @QMSet==2 arr2[n,m]=8 else arr2[n,m]=9 endif elseif @Quartic_Gradient==3 if @QMSet==2 arr2[n,m]=11 elseif @QMSet==3 arr2[n,m]=12 else arr2[n,m]=13 endif endif endif endif elseif counter==1 istore1=i zstore1=cz zstoren1=|cz| flagstore1=flag flag=false elseif counter==2 istore2=i zstore2=cz zstoren2=|cz| flagstore2=flag flag=false if @QMSet==5 if @view==true arr2[n,m]=4 if flagstore1==true||flagstore2==true if flagstore1==true arr[n,m]=istore1 elseif flagstore2==true arr[n,m]=istore2 endif if flagstore1==true zstore=zstore1 if flagstore2==true if zstoren2istore2 zstore=zstore1 arr[n,m]=istore1 else zstore=zstore2 arr[n,m]=istore2 endif endif ;view is false QMSet=5 elseif flagstore1==true||flagstore2==true flag=true if flagstore1==true&&flagstore2==true setstore=zri if zstoren1istore2 zstore=zstore1 arr[n,m]=istore1 else zstore=zstore2 arr[n,m]=istore2 endif endif ;view is false QMSet=6 elseif flagstore1==true||flagstore2==true flag=true if flagstore1==true&&flagstore2==true setstore=zri if zstoren1istore2 zstore=zstore1 arr[n,m]=istore1 else zstore=zstore2 arr[n,m]=istore2 endif endif ;view is false QMSet=7 elseif flagstore1==true||flagstore2==true flag=true if flagstore1==true&&flagstore2==true setstore=zjk if zstoren1istore2 zstore=zstore1 arr[n,m]=istore1 if istore3>istore1 zstore=zstore3 arr[n,m]=istore3 endif elseif istore2>istore3 zstore=zstore2 arr[n,m]=istore2 else zstore=zstore3 arr[n,m]=istore3 endif endif ;view is false QMSet=0 elseif flagstore1==true||flagstore2==true||flagstore3==true flag=true if flagstore1==true&&flagstore2==true&&flagstore3==true setstore=zri if zstoren11&&@QMSet<5 arr[n,m]=i flag=false endif endif t=t-1 tt=0 if (flag==true)&&(t>0) while flag==true i=0 zr=zr-dzx1 zi=zi-dzy1 zj=zj-dzz1 if @Plotted_Space==0 zri=zr+flip(zi) zjk=zj+flip(zk) zlm=zl+flip(zm) elseif @Plotted_Space==1 zri=zr+flip(zi) zjk=zk+flip(zj) zlm=zl+flip(zm) elseif @Plotted_Space==2 zri=zr+flip(zi) zjk=zl+flip(zm) zlm=zj+flip(zk) elseif @Plotted_Space==3 zri=zr+flip(zi) zjk=zl+flip(zm) zlm=zk+flip(zj) elseif @Plotted_Space==4 zri=zj+flip(zk) zjk=zr+flip(zi) zlm=zl+flip(zm) elseif @Plotted_Space==5 zri=zk+flip(zj) zjk=zr+flip(zi) zlm=zl+flip(zm) elseif @Plotted_Space==6 zri=zl+flip(zm) zjk=zr+flip(zi) zlm=zj+flip(zk) elseif @Plotted_Space==7 zri=zl+flip(zm) zjk=zr+flip(zi) zlm=zk+flip(zj) elseif @Plotted_Space==8 zri=zj+flip(zk) zjk=zl+flip(zm) zlm=zr+flip(zi) elseif @Plotted_Space==9 zri=zk+flip(zj) zjk=zl+flip(zm) zlm=zr+flip(zi) elseif @Plotted_Space==10 zri=zl+flip(zm) zjk=zj+flip(zk) zlm=zr+flip(zi) elseif @Plotted_Space==11 zri=zl+flip(zm) zjk=zk+flip(zj) zlm=zr+flip(zi) elseif @Plotted_Space==12 zri=zr+flip(zl) zjk=zi+flip(zm) zlm=zj+flip(zk) elseif @Plotted_Space==13 zri=zr+flip(zl) zjk=zi+flip(zm) zlm=zk+flip(zj) elseif @Plotted_Space==14 zri=zr+flip(zl) zjk=zm+flip(zi) zlm=zj+flip(zk) elseif @Plotted_Space==15 zri=zr+flip(zl) zjk=zm+flip(zi) zlm=zk+flip(zj) elseif @Plotted_Space==16 zri=zl+flip(zr) zjk=zi+flip(zm) zlm=zj+flip(zk) elseif @Plotted_Space==17 zri=zl+flip(zr) zjk=zi+flip(zm) zlm=zk+flip(zj) elseif @Plotted_Space==18 zri=zl+flip(zr) zjk=zm+flip(zi) zlm=zj+flip(zk) else zri=zl+flip(zr) zjk=zm+flip(zi) zlm=zk+flip(zj) endif if @QMSet==0||@QMSet==5||@QMSet==6||@QMSet==7 cz=setstore elseif @QMSet==2 cz=zri elseif @QMSet==3 cz=zjk elseif @QMSet==4 cz=-zri-zjk endif counter=0 repeat i=0 if @QMSet==1 counter=counter+1 if counter==1 cz=zri elseif counter==2 cz=zjk else cz=-zri-zjk endif else counter=3 endif repeat cz=cz*cz*cz*cz+2*(zri*zjk-(zri+zjk)*(zri+zjk))*cz*cz+4*zri*zjk*(zri+zjk)*cz+zlm i=i+1 until i>=@maxiter|||cz|>@bailout if i<@maxiter flag=false endif until counter==3||flag==false tt=tt+1 zstore=cz endwhile tt=tt-1 endif zarr_real[n,m]=round(real(zstore)*1000) zarr_imag[n,m]=round(imag(zstore)*1000) if @QMSet>1&&@QMSet<5 if @view==true arr2[n,m]=4 arr[n,m]=i elseif t=zz arr[n,m]=zmax+dz if @Background==0 arr2[n,m]=0 elseif @Background==2 arr2[n,m]=5 elseif @Quartic_Gradient==0 arr2[n,m]=6 elseif @Quartic_Gradient==1 arr2[n,m]=2 elseif @Quartic_Gradient==2 arr2[n,m]=7 elseif @Quartic_Gradient==3 arr2[n,m]=10 endif endif endif else ;QMSet<2 if @view==false if t4/3 temp0=3/#magn float temp0=-3/#magn ymin=imag(#center)-temp0/2 ymax=ymin+temp0 temp0=-xscreen/yscreen*temp0 xmin=real(#center)-temp0/2 xmax=xmin+temp0 else temp0=4/#magn xmin=real(#center)-temp0/2 xmax=xmin+temp0 temp0=-yscreen/xscreen*temp0 ymin=imag(#center)-temp0/2 ymax=ymin+temp0 endif float zmax=@zorig+@zdist/2 float zmin=zmax-@zdist if @view==1 zmax=@zorig zmin=@zorig endif if (@zmagn==true)&&(@view!=1) zmax=@zorig+@zdist/2/#magn zmin=zmax-@zdist/#magn endif if (@autoscale==true)&&(@view==0) zscreen=xscreen/(xmax-xmin)*(zmax-zmin) endif float dx=(xmax-xmin)/xscreen float dy=(ymax-ymin)/yscreen float dz=(zmax-zmin)/zscreen float origx=real(#center) float origy=imag(#center) float origz=@zorig float vx=@xrot/180.0*#pi float vy=@yrot/180.0*#pi float vz=@zrot/180.0*#pi float cosx=0 float cosy=0 float cosz=0 float sinx=0 float siny=0 float sinz=0 if @xrot==90.0 sinx=1.0 cosx=0 elseif @xrot==-90 sinx=-1.0 cosx=0 elseif abs(@xrot)==180 sinx=0 cosx=-1 else cosx=cos(vx) sinx=sin(vx) endif if @yrot==90.0 siny=1.0 cosy=0 elseif @yrot==-90 siny=-1.0 cosy=0 elseif abs(@yrot)==180 siny=0 cosy=-1 else cosy=cos(vy) siny=sin(vy) endif if @zrot==90.0 sinz=1.0 cosz=0 elseif @zrot==-90 sinz=-1.0 cosz=0 elseif abs(@zrot)==180 sinz=0 cosz=-1 else cosz=cos(vz) sinz=sin(vz) endif float rminx=0 float rminy=0 float rminz=0 float xy=0 float xz=0 float yx=0 float yz=0 float zx=0 float zy=0 float tempx=0 float tempy=0 float tempz=0 float dxx=0 float dxy=0 float dxz=0 float dyx=0 float dyy=0 float dyz=0 float dzx=0 float dzy=0 float dzz=0 float dzx=0 float dzy=0 float dzz=0 float dzx1=0 float dzy1=0 float dzz1=0 ; rotating the space and creation of unit-vectors xx=rminx=xmin yy=rminy=ymin zz=rminz=zmin if @local==true xx=xx-origx yy=yy-origy zz=zz-origz endif xy=yy*cosx-zz*sinx xz=yy*sinx+zz*cosx yy=xy zz=xz yx=xx*cosy+zz*siny yz=-xx*siny+zz*cosy xx=yx zz=yz zx=xx*cosz-yy*sinz zy=xx*sinz+yy*cosz xx=zx yy=zy if @local==true xx=xx+origx yy=yy+origy zz=zz+origz endif rminx=xx rminy=yy rminz=zz xx=tempx=xmax yy=tempy=ymin zz=tempz=zmin if @local==true xx=xx-origx yy=yy-origy zz=zz-origz endif xy=yy*cosx-zz*sinx xz=yy*sinx+zz*cosx yy=xy zz=xz yx=xx*cosy+zz*siny yz=-xx*siny+zz*cosy xx=yx zz=yz zx=xx*cosz-yy*sinz zy=xx*sinz+yy*cosz xx=zx yy=zy if @local==true xx=xx+origx yy=yy+origy zz=zz+origz endif tempx=xx tempy=yy tempz=zz dxx=(tempx-rminx)/xscreen dxy=(tempy-rminy)/xscreen dxz=(tempz-rminz)/xscreen xx=tempx=xmin yy=tempy=ymax zz=tempz=zmin if @local==true xx=xx-origx yy=yy-origy zz=zz-origz endif xy=yy*cosx-zz*sinx xz=yy*sinx+zz*cosx yy=xy zz=xz yx=xx*cosy+zz*siny yz=-xx*siny+zz*cosy xx=yx zz=yz zx=xx*cosz-yy*sinz zy=xx*sinz+yy*cosz xx=zx yy=zy if @local==true xx=xx+origx yy=yy+origy zz=zz+origz endif tempx=xx tempy=yy tempz=zz dyx=(tempx-rminx)/yscreen dyy=(tempy-rminy)/yscreen dyz=(tempz-rminz)/yscreen xx=tempx=xmin yy=tempy=ymin zz=tempz=zmax if @local==true xx=xx-origx yy=yy-origy zz=zz-origz endif xy=yy*cosx-zz*sinx xz=yy*sinx+zz*cosx yy=xy zz=xz yx=xx*cosy+zz*siny yz=-xx*siny+zz*cosy xx=yx zz=yz zx=xx*cosz-yy*sinz zy=xx*sinz+yy*cosz xx=zx yy=zy if @local==true xx=xx+origx yy=yy+origy zz=zz+origz endif tempx=xx tempy=yy tempz=zz dzx=(tempx-rminx)/zscreen dzy=(tempy-rminy)/zscreen dzz=(tempz-rminz)/zscreen dzx1=dzx/@prec dzy1=dzy/@prec dzz1=dzz/@prec ; end rotation and creating unit-vectors 'puuh' if @formula==0 repeat ccount=ccount+1 if @zinit>1 ccount=ccount+1 endif count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif z1=xx+flip(yy) zh=zz+flip(ww) m=0 if @zinit==1 z=z1 elseif @zinit==2 z=-z1 elseif @zinit==0&&ccount==1 z=z1 else z=-z1 endif repeat z=z*z*z-3*z1*z1*z+zh length=|z| m=m+1 until m>=#maxiter || length>=@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 z1=xx+flip(yy) zh=zz+flip(ww) if @zinit==1 z=z1 elseif @zinit==2 z=-z1 elseif @zinit==0&&ccount==1 z=z1 else z=-z1 endif repeat z=z*z*z-3*z1*z1*z+zh length=|z| m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 if @zinit==0&&ccount==1 rbuff0=buff0 rbuff1=buff1 rbuff2=buff2 rbuff3=buff3 rbuff4=buff4 rz=z rm=mm endif until ccount==2 if@zinit==0 if @view>0 if mm=#maxiter || length>=@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 z1=xx+flip(yy) zh=zz+flip(ww) z=z1 repeat z=z*z+zh length=|z| m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 elseif @formula==2 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif z1=xx+flip(yy) zh=zz+flip(ww) cri=@cr+flip(@ci) cjk=@cj+flip(@ck) m=0 repeat temp=z1*z1-real(zh)^2-imag(zh)^2+cri zh=2*(real(z1)*real(zh)+flip(real(z1)*imag(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>=@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 z1=xx+flip(yy) zh=zz+flip(ww) cri=@cr+flip(@ci) cjk=@cj+flip(@ck) repeat temp=z1*z1-real(zh)^2-imag(zh)^2+cri zh=2*(real(z1)*real(zh)+flip(real(z1)*imag(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=z1 elseif @formula==3 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif z1=xx+flip(yy) zh=zz+flip(ww) cri=@cr+flip(@ci) cjk=@cj+flip(@ck) m=0 repeat ; 1st hyp temp=z1*z1-real(zh)^2+imag(zh)^2-2*flip(real(zh)*imag(zh))+cri zh=2*(real(z1)*real(zh)-imag(z1)*imag(zh)+flip(real(z1)*imag(zh)+imag(z1)*real(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>=@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 z1=xx+flip(yy) zh=zz+flip(ww) cri=@cr+flip(@ci) cjk=@cj+flip(@ck) repeat temp=z1*z1-real(zh)^2+imag(zh)^2-2*flip(real(zh)*imag(zh))+cri zh=2*(real(z1)*real(zh)-imag(z1)*imag(zh)+flip(real(z1)*imag(zh)+imag(z1)*real(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=z1 elseif @formula==4 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif z1=@cr+flip(@ci) zh=@cj+flip(@ck) cri=xx+flip(yy) cjk=zz+flip(ww) m=0 repeat temp=z1*z1-real(zh)^2-imag(zh)^2+cri zh=2*(real(z1)*real(zh)+flip(real(z1)*imag(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>=@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 z1=@cr+flip(@ci) zh=@cj+flip(@ck) cri=xx+flip(yy) cjk=zz+flip(ww) repeat temp=z1*z1-real(zh)^2-imag(zh)^2+cri zh=2*(real(z1)*real(zh)+flip(real(z1)*imag(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=z1 elseif @formula==5 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif z1=@cr+flip(@ci) zh=@cj+flip(@ck) cri=xx+flip(yy) cjk=zz+flip(ww) m=0 repeat temp=z1*z1-real(zh)^2+imag(zh)^2-2*flip(real(zh)*imag(zh))+cri zh=2*(real(z1)*real(zh)-imag(z1)*imag(zh)+flip(real(z1)*imag(zh)+imag(z1)*real(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>=@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 z1=@cr+flip(@ci) zh=@cj+flip(@ck) cri=xx+flip(yy) cjk=zz+flip(ww) repeat temp=z1*z1-real(zh)^2+imag(zh)^2-2*flip(real(zh)*imag(zh))+cri zh=2*(real(z1)*real(zh)-imag(z1)*imag(zh)+flip(real(z1)*imag(zh)+imag(z1)*real(zh)))+cjk z1=temp length=|z1|+|zh| m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=z1 elseif @formula==6 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif z1=xx+flip(yy) zh=zz+flip(ww) m=0 z=z1 repeat z=zh*z*(1-z) length=|z| m=m+1 until m>=#maxiter || length>=@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 z1=xx+flip(yy) zh=zz+flip(ww) z=z1 repeat z=zh*z*(1-z) length=|z| m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 elseif @formula==7 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck repeat q=a-(a*a-b*b-c*c-d*d) r=1-2*a l=-f*b-g*c-h*d u=ee*b+g*d-h*c v=ee*c+h*b-f*d w=ee*d+f*c-g*b a=ee*q+l*r b=f*q+u*r c=g*q+v*r d=h*q+w*r length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck repeat q=a-(a*a-b*b-c*c-d*d) r=1-2*a l=-f*b-g*c-h*d u=ee*b+g*d-h*c v=ee*c+h*b-f*d w=ee*d+f*c-g*b a=ee*q+l*r b=f*q+u*r c=g*q+v*r d=h*q+w*r length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=a+flip(b) elseif @formula==8 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck repeat q=a*a-b*b-c*c+d*d u=c*d-a*b v=b*d-a*c w=a*d+b*c a1=a*ee-b*f-c*g+d*h-(ee*q+2*(f*u+g*v+h*w)) b1=a*f+b*ee-c*h-d*g-(f*q+2*(-ee*u+h*v-g*w)) c1=a*g-b*h+c*ee-d*f-(g*q+2*(h*u-ee*v-f*w)) d1=a*h+b*g+c*f+d*ee-(h*q+2*(-g*u-f*v+ee*w)) a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck repeat q=a*a-b*b-c*c+d*d u=c*d-a*b v=b*d-a*c w=a*d+b*c a1=a*ee-b*f-c*g+d*h-(ee*q+2*(f*u+g*v+h*w)) b1=a*f+b*ee-c*h-d*g-(f*q+2*(-ee*u+h*v-g*w)) c1=a*g-b*h+c*ee-d*f-(g*q+2*(h*u-ee*v-f*w)) d1=a*h+b*g+c*f+d*ee-(h*q+2*(-g*u-f*v+ee*w)) a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=a+flip(b) elseif @formula==9 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif m=0 a=@cr b=@ci c=@cj d=@ck ee=xx f=yy g=zz h=ww repeat q=a-(a*a-b*b-c*c-d*d) r=1-2*a l=-f*b-g*c-h*d u=ee*b+g*d-h*c v=ee*c+h*b-f*d w=ee*d+f*c-g*b a=ee*q+l*r b=f*q+u*r c=g*q+v*r d=h*q+w*r length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 a=@cr b=@ci c=@cj d=@ck ee=xx f=yy g=zz h=ww repeat q=a-(a*a-b*b-c*c-d*d) r=1-2*a l=-f*b-g*c-h*d u=ee*b+g*d-h*c v=ee*c+h*b-f*d w=ee*d+f*c-g*b a=ee*q+l*r b=f*q+u*r c=g*q+v*r d=h*q+w*r length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=a+flip(b) elseif @formula==10 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif m=0 a=@cr b=@ci c=@cj d=@ck ee=xx f=yy g=zz h=ww repeat q=a*a-b*b-c*c+d*d u=c*d-a*b v=b*d-a*c w=a*d+b*c a1=a*ee-b*f-c*g+d*h-(ee*q+2*(f*u+g*v+h*w)) b1=a*f+b*ee-c*h-d*g-(f*q+2*(-ee*u+h*v-g*w)) c1=a*g-b*h+c*ee-d*f-(g*q+2*(h*u-ee*v-f*w)) d1=a*h+b*g+c*f+d*ee-(h*q+2*(-g*u-f*v+ee*w)) a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 a=@cr b=@ci c=@cj d=@ck ee=xx f=yy g=zz h=ww repeat q=a*a-b*b-c*c+d*d u=c*d-a*b v=b*d-a*c w=a*d+b*c a1=a*ee-b*f-c*g+d*h-(ee*q+2*(f*u+g*v+h*w)) b1=a*f+b*ee-c*h-d*g-(f*q+2*(-ee*u+h*v-g*w)) c1=a*g-b*h+c*ee-d*f-(g*q+2*(h*u-ee*v-f*w)) d1=a*h+b*g+c*f+d*ee-(h*q+2*(-g*u-f*v+ee*w)) a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=a+flip(b) elseif @formula==11 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck ii=@br j=@bi k=@bj l=@bk repeat u=3*a*a-b*b-c*c-d*d v=3*(ee*ee-f*f-g*g-h*h) w=6*ee q=u-v a1=a*(3*u-8*a*a-v)+w*(f*b+g*c+h*d)+ii b1=b*q-w*(f*a+g*d-h*c)+j c1=c*q-w*(-f*d+g*a+h*b)+k d1=d*q-w*(f*c-g*b+h*a)+l a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck ii=@br j=@bi k=@bj l=@bk repeat u=3*a*a-b*b-c*c-d*d v=3*(ee*ee-f*f-g*g-h*h) w=6*ee q=u-v a1=a*(3*u-8*a*a-v)+w*(f*b+g*c+h*d)+ii b1=b*q-w*(f*a+g*d-h*c)+j c1=c*q-w*(-f*d+g*a+h*b)+k d1=d*q-w*(f*c-g*b+h*a)+l a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=a+flip(b) elseif @formula==12 count0=0 repeat diffx=0 diffy=0 if count0==1 diffx=-@delta elseif count0==2 diffx=@delta elseif count0==3 diffy=@delta elseif count0==4 diffy=-@delta endif tempx=rminx+(real(#screenpixel)+diffx)*dxx+(imag(#screenpixel)+diffy)*dyx tempy=rminy+(real(#screenpixel)+diffx)*dxy+(imag(#screenpixel)+diffy)*dyy tempz=rminz+(real(#screenpixel)+diffx)*dxz+(imag(#screenpixel)+diffy)*dyz if @fourthdim==3 xx=tempx yy=tempy zz=tempz ww=@fourthvalue elseif @fourthdim==2 xx=tempx yy=tempy zz=@fourthvalue ww=tempz elseif @fourthdim==1 xx=tempz yy=@fourthvalue zz=tempx ww=tempy else xx=@fourthvalue yy=tempz zz=tempx ww=tempy endif count=0.0 repeat if @fourthdim==3 xx=xx+dzx yy=yy+dzy zz=zz+dzz elseif @fourthdim==2 xx=xx+dzx yy=yy+dzy ww=ww+dzz elseif @fourthdim==1 xx=xx+dzz zz=zz+dzx ww=ww+dzy else yy=yy+dzz zz=zz+dzx ww=ww+dzy endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck ii=@br j=@bi k=@bj l=@bk repeat r5=a*a r6=b*b r7=c*c r8=d*d u=ee*ee-f*f-g*g+h*h v=g*h-ee*f w=f*h-ee*g q=ee*h+f*g r=-r7+r8 r2=r5-r6 r3=6*c*d r4=6*a*b a1=r5*a+3*a*(-r6+r)+b*r3-3*(a*u+2*(b*v+c*w+d*q))+ii b1=-r6*b+3*b*(r5+r)-a*r3-3*(b*u+2*(-a*v+d*w-c*q))+j c1=-r7*c+3*c*(r2+r8)-r4*d-3*(c*u+2*(d*v-a*w-b*q))+k d1=r8*d+3*d*(r2-r7)+r4*c-3*(d*u+2*(-c*v-b*w+a*q))+l a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout ;här mm=m count=count+1 until (count>=zscreen || length<@bailout)||(@view>0) if count==1 if m>=#maxiter&&@view==0&&@touchscreen==true tflag=true endif endif if @view>0 count0=6 elseif (length<@bailout)&&(count>1) count2=0 repeat if @fourthdim==3 xx=xx-dzx1 yy=yy-dzy1 zz=zz-dzz1 elseif @fourthdim==2 xx=xx-dzx1 yy=yy-dzy1 ww=ww-dzz1 elseif @fourthdim==1 xx=xx-dzz1 zz=zz-dzx1 ww=ww-dzy1 else yy=yy-dzz1 zz=zz-dzx1 ww=ww-dzy1 endif m=0 a=xx b=yy c=zz d=ww ee=@cr f=@ci g=@cj h=@ck ii=@br j=@bi k=@bj l=@bk repeat r5=a*a r6=b*b r7=c*c r8=d*d u=ee*ee-f*f-g*g+h*h v=g*h-ee*f w=f*h-ee*g q=ee*h+f*g r=-r7+r8 r2=r5-r6 r3=6*c*d r4=6*a*b a1=r5*a+3*a*(-r6+r)+b*r3-3*(a*u+2*(b*v+c*w+d*q))+ii b1=-r6*b+3*b*(r5+r)-a*r3-3*(b*u+2*(-a*v+d*w-c*q))+j c1=-r7*c+3*c*(r2+r8)-r4*d-3*(c*u+2*(d*v-a*w-b*q))+k d1=r8*d+3*d*(r2-r7)+r4*c-3*(d*u+2*(-c*v-b*w+a*q))+l a=a1 b=b1 c=c1 d=d1 length=a*a+b*b+c*c+d*d m=m+1 until m>=#maxiter || length>@bailout count2=count2+1 until length>=@bailout if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif elseif count==1 if count0==0 buff0=zmin+count*dz-(count2-1)*dz/@prec elseif count0==1 buff1=zmin+count*dz-(count2-1)*dz/@prec elseif count0==2 buff2=zmin+count*dz-(count2-1)*dz/@prec elseif count0==3 buff3=zmin+count*dz-(count2-1)*dz/@prec elseif count0==4 buff4=zmin+count*dz-(count2-1)*dz/@prec endif else if count0==0 buff0=zmax+dz count0=6 elseif count0==1 buff1=zmax+dz elseif count0==2 buff2=zmax+dz elseif count0==3 buff3=zmax+dz elseif count0==4 buff4=zmax+dz endif endif count0=count0+1 until count0>=5 z=a+flip(b) endif ; tracing if @view>0 setflag=false elseif buff0>zmax&&@background>0 setflag=false else lightdx=real(#screenpixel)*dx+xmin-@lightx lightdy=imag(#screenpixel)*dy+ymin-@lighty lightdz=buff0-@lightz lightlength=sqrt(lightdx*lightdx+lightdy*lightdy+lightdz*lightdz) fx=(buff2-buff1)*2*dy fy=-2*dx*(buff4-buff3) fz=-4*dx*dy flength=sqrt(fx*fx+fy*fy+fz*fz) tangle=(fx*lightdx+fy*lightdy+fz*lightdz)/(flength*lightlength) endif if tflag==true&&@view==0 setflag=false endif loop: if @view>0 iter=iter+1 elseif buff0>zmax if @background==0 z=tangle+flip(color2) elseif @background==1 setflag=false endif elseif tflag==true setflag=false else z=tangle+flip(color1) endif bailout: (setflag==false&&@view==0)|| \ (iter0) default: title = "RayTrace" method=guessing periodicity=0 maxiter=10 param formula enum="Cubic" "Juliabrot" "Quaternion" "Hypernion" "Quatbrot" "Hyperbrot" "Juliabrot 2" \ "Quaternion 2" "Hypernion 2" "Quatbrot 2" "Hyperbrot 2" "Cubic Quat" "Cubic Hyper" default=0 hint="type of formula for raytracing." endparam param fourthdim enum="a-real or zr" "a-imag or zi" "b-real or zj" "b-imag or zk" default=3 hint=" axis that points into the fourth dimension. Cubic or Quaternion-Hypercomplex." endparam param fourthvalue caption="4-dim-value" default=0.0 hint="value for the fourth axis." endparam param zorig caption="z-center" default=0.0 hint="Center of z-axis." endparam param zinit enum="Both" "a" "-a" default=0 hint="Initial values for Cubic" endparam param view enum="3-dim" "2-dim-center" "2-dim-screen" default=0 hint="View-system. 3d or 2d from center or 2d from 'screentouch'." endparam param background enum="outside" "inside" default=0 hint="What type of background-coloring you want. With inside only one colour or inside \ coloring filter" endparam param touchscreen caption="Screen-touch" default=false hint="Those structures that goes out of the screen, or touches it, is colored with \ inside colouring." endparam param cr caption="cr" default=0.0 hint="real constant for quaternions and hypercomplex calculations. In cubic quaternions \ this corresponds to a-real." endparam param ci caption="ci" default=0.0 hint="imaginary constant for quaternions and hypercomplex calculations. In cubic \ quaternions this corresponds to a-imag." endparam param cj caption="cj" default=0.0 hint="Second imaginary constant for quaternions and hypercomplex calculations. In cubic \ quaternions this corresponds to a-jmag." endparam param ck caption="ck" default=0.0 hint="Third imaginary constant for quaternions and hypercomplex calculations. In cubic \ quaternions this corresponds to a-kmag." endparam param br caption="br" default=0.0 hint="real constant for cubic quaternions and cubic hypercomplex calculations. \ Corresponds to b-real." endparam param bi caption="bi" default=0.0 hint="imaginary constant for cubic quaternions and cubic hypercomplex calculations. \ Corresponds to b-imag." endparam param bj caption="bj" default=0.0 hint="second imaginary constant for cubic quaternions and hypercomplex calculations. \ Corresponds to b-jmag." endparam param bk caption="bk" default=0.0 hint="third imaginary constant for cubic quaternions and hypercomplex calculations. \ Corresponds to b-kmag." endparam param xrot caption="x-rotation" default=0.0 hint="Rotates the system through the x-axis." endparam param yrot caption="y-rotation" default=0.0 hint="Rotates the system through the y-axis." endparam param zrot caption="z-rotation" default=0.0 hint="Rotates the system through the z-axis." endparam param local caption="Local rotation" default=true hint="Sets local rotation. Otherwise location around zero." endparam param lightx caption="Light-x" default=0.0 hint="x-coord of lightsource" endparam param lighty caption="Light-y" default=0.0 hint="y-coord of lightsource" endparam param lightz caption="Light-z" default=-6.0 hint="z-coord of lightsource" endparam param zscreen caption="Screen-depth" default=320.0 hint="Screendepth in virtual pixels." min=0 endparam param zdist caption="z-distance" default=4.0 hint="Length of z-axis." endparam param zmagn caption="z-magnify" default=false hint="If set then the fractal will be magnified in the third dimension too." endparam param autoscale caption="Auto scaling" default=false hint="If set then the screendepth in virtual pixels will be set to hold the same scalar \ proportions as the x-axis. Take it easy with this as you donīt have to \ magnify the screensurface very much to get a very long z-axis in pixels. If \ z-magnify is set too then there is no danger in overproportions." endparam param prec caption="Precision" default=10.0 min=1.0 hint="Precision for the fine tracing. The lower, the faster but with less precision. \ Smallest value allowed is 1.0" endparam param delta caption="Delta" default=1.0 hint="The difference between the points that builds the normal-plane to the lightsource. \ Should normally be 1.0" endparam param bailout caption="Bailout" default=4.0 hint="Breakvalue for iterations." min=0.0 endparam } MToJ { init: complex z=0 if @zinit!=0 z=@zinit else if @formula==1 z=0.5 endif endif loop: if @formula==0 z=z^2+#pixel else z=#pixel*z*(1-z) endif bailout: |z|<@bailout switch: type="BackToM" seed=#pixel formula=formula bailout=bailout default: title = "MToJ" param formula enum="z->z^2+c" "z->cz(1-z)" default=0 hint="z->z^2+c is the Mandelbrot." endparam param zinit caption="z-init" default=(0,0) endparam param bailout caption="bailout" default=4.0 endparam } BackToM{ init: complex z=#pixel loop: if @formula==0 z=z^2+@seed else z=@seed*z*(1-z) endif bailout: |z|<@bailout switch: type="MToJ" bailout=bailout formula=formula default: title = "BackToM" periodicity=0 param formula enum="z->z^2+c" "z->cz(1-z)" default=0 hint="z->z^2+c is the Mandelbrot." endparam param seed caption="seed" default=(-0.4875,0.5875) endparam param bailout caption="bailout" default=4.0 endparam } IPol { init: complex z=@zinit complex zold=0 loop: zold=z z=@fu3(1/@fu2(1+@fu1(zold^@n1))^@n2)+@pixfu(#pixel) bailout: ((@diffbail==false)&&(|z|<@bailout))|| \ ((@diffbail==true)&&(|z-zold|>1/@bailout)&&(|z|<@bailout)) switch: type="IPolJulia" seed=#pixel fu1=fu1 fu2=fu2 fu3=fu3 pixfu=pixfu bailout=bailout diffbail=diffbail zinit=zinit n1=n1 n2=n2 default: title = "IPol" periodicity=0 method=multipass angle=90.0 func fu1 caption="1/(1+f1(z))" default=ident() endfunc func fu2 caption="1/f2(1+z)" default=abs() endfunc func fu3 caption="f3(1/(1+z))" default=ident() endfunc func pixfu caption="Pix-func" default=ident() endfunc param n1 caption="z^n1" default=(1,0) endparam param n2 caption="1/(1+z)^n2" default=(2,0) endparam param zinit caption="z-init" default=(0,0) endparam param diffbail caption="diff-bailout" default=false endparam param bailout caption="bailout" default=2.0 endparam } IPolJulia { init: complex z=#pixel complex zold=0 loop: zold=z z=@fu3(1/@fu2(1+@fu1(zold^@n1))^@n2)+@pixfu(@seed) bailout: ((@diffbail==false)&&(|z|<@bailout))|| \ ((@diffbail==true)&&(|z-zold|>1/@bailout)&&(|z|<@bailout)) switch: type="IPol" fu1=fu1 fu2=fu2 fu3=fu3 pixfu=pixfu bailout=bailout diffbail=diffbail zinit=zinit n1=n1 n2=n2 default: title = "IPolJulia" periodicity=0 method=multipass angle=90.0 func fu1 caption="1/(1+f1(z))" default=ident() endfunc func fu2 caption="1/f2(1+z)" default=abs() endfunc func fu3 caption="f3(1/(1+z))" default=ident() endfunc func pixfu caption="Pix-func" default=ident() endfunc param seed caption="seed" default=(-0.375,0.8) endparam param n1 caption="z^n1" default=(1,0) endparam param n2 caption="1/(1+z)^n2" default=(2,0) endparam param diffbail caption="diff-bailout" default=false endparam param bailout caption="bailout" default=2.0 endparam param zinit caption="z-init" default=(0,0) endparam } IPol2 { init: complex z=@zinit complex zold=0 loop: zold=z z=@fu3(@fu0(zold^@n0)/@fu2(1+@fu1(zold^@n1))^@n2)+@pixfu(#pixel) bailout: ((@diffbail==false)&&(|z|<@bailout))|| \ ((@diffbail==true)&&(|z-zold|>1/@bailout)&&(|z|<@bailout)) switch: type="IPol2Julia" seed=#pixel fu0=fu0 fu1=fu1 fu2=fu2 fu3=fu3 pixfu=pixfu bailout=bailout diffbail=diffbail zinit=zinit n0=n0 n1=n1 n2=n2 default: title = "IPol2" periodicity=0 method=multipass angle=90.0 func fu0 caption="f0(z)/(1+z)" default=ident() endfunc func fu1 caption="z/(1+f1(z))" default=ident() endfunc func fu2 caption="z/f2(1+z)" default=ident() endfunc func fu3 caption="f3(z/(1+z))" default=ident() endfunc func pixfu caption="Pix-func" default=ident() endfunc param n0 caption="z^n0/(1+z)" default=(2,0) endparam param n1 caption="z/(1+z^n1)" default=(1,0) endparam param n2 caption="z/(1+z)^n2" default=(1,0) endparam param zinit caption="z-init" default=(0,0) endparam param diffbail caption="diff-bailout" default=true endparam param bailout caption="bailout" default=100.0 endparam } IPol2Julia { init: complex z=#pixel complex zold=0 loop: zold=z z=@fu3(@fu0(zold^@n0)/@fu2(1+@fu1(zold^@n1))^@n2)+@pixfu(@seed) bailout: ((@diffbail==false)&&(|z|<@bailout))|| \ ((@diffbail==true)&&(|z-zold|>1/@bailout)&&(|z|<@bailout)) switch: type="IPol2" fu0=fu0 fu1=fu1 fu2=fu2 fu3=fu3 pixfu=pixfu bailout=bailout diffbail=diffbail zinit=zinit n0=n0 n1=n1 n2=n2 default: title = "IPol2Julia" periodicity=0 method=multipass angle=90.0 func fu0 caption="f0(z)/(1+z)" default=ident() endfunc func fu1 caption="z/(1+f1(z))" default=ident() endfunc func fu2 caption="z/f2(1+z)" default=ident() endfunc func fu3 caption="f3(z/(1+z))" default=abs() endfunc func pixfu caption="Pix-func" default=ident() endfunc param seed caption="seed" default=(-0.7,-0.65) endparam param n0 caption="z^n0/(1+z)" default=(3,0) endparam param n1 caption="z/(1+z^n1)" default=(2,0) endparam param n2 caption="z/(1+z)^n2" default=(1,0) endparam param diffbail caption="diff-bailout" default=true endparam param bailout caption="bailout" default=100.0 endparam param zinit caption="z-init" default=(0,0) endparam } IPolNewton { init: complex zold=0 complex t=0 complex u=0 complex v=0 int i=0 if @init==1 complex z=@zinit elseif @init==2 complex z=#pixel else complex z=@zinit if @formula==0 repeat zold=z if zold==0 zold=1e-20 endif t=zold^@n1 u=zold^@n0 z=zold-(u-@r*(1+t)^@n2)/(u/zold*(@n0-@n2*@n1*t/(1+t))) i=i+1 until (i>29)||(|z-zold|<@bailout) if i>29 z=@zinit endif elseif @formula==1 repeat zold=z if zold==0 zold=1e-20 endif t=zold^@n1 u=zold^@n0 v=1+sin(t) z=zold-(sinh(u/v^@n2)-@r)/(cosh(u/zold*(@n0-@n2*@n1*zold*cos(t)/v)/v^@n2)) i=i+1 until (i>29)||(|z-zold|<@bailout) if i>29 z=@zinit endif elseif @formula==2 repeat zold=z if zold==0 zold=1e-20 endif t=zold^@n1 u=zold^@n0 v=log(u) z=zold-(v-@r*(1+sin(t))^@n2)/(@n0/zold-(@n1*@n2*t/zold*v*cos(t))/(1+sin(t))^@n2) i=i+1 until (i>29)||(|z-zold|<@bailout) if i>29 z=@zinit endif elseif @formula==3 repeat zold=z if zold==0 zold=1e-20 endif t=zold^@n1 u=zold^@n0 v=1+log(t) z=zold-(sin(u)-@r*v^@n2)/(@n0*u/zold*cos(u)-(@n1*@n2/zold*sin(u)/v)) i=i+1 until (i>29)||(|z-zold|<@bailout) if i>29 z=@zinit endif endif endif loop: zold=z if zold==0 zold=1e-20 endif if @formula==0 t=zold^@n1 u=zold^@n0 z=zold-(u-@r*(1+t)^@n2)/(u/zold*(@n0-@n2*@n1*t/(1+t)))+@pixfu(#pixel) elseif @formula==1 t=zold^@n1 u=zold^@n0 v=1+sin(t) z=zold-(sinh(u/v^@n2)-@r)/(cosh(u/zold*(@n0-@n2*@n1*zold*cos(t)/v)/v^@n2))+@pixfu(#pixel) elseif @formula==2 t=zold^@n1 u=zold^@n0 v=log(u) z=zold-(v-@r*(1+sin(t))^@n2)/(@n0/zold-(@n1*@n2*t/zold*v*cos(t))/(1+sin(t))^@n2) \ +@pixfu(#pixel) elseif @formula==3 t=zold^@n1 u=zold^@n0 v=1+log(t) z=zold-(sin(u)-@r*v^@n2)/(@n0*u/zold*cos(u)-(@n1*@n2/zold*sin(u)/v))+@pixfu(#pixel) endif bailout: |z-zold|>@bailout switch: type="IPolNewtonJulia" seed=#pixel pixfu=pixfu bailout=bailout init=init zinit=zinit n0=n0 n1=n1 n2=n2 r=r formula=formula default: title = "IPolNewton" periodicity=0 method=multipass angle=90.0 func pixfu caption="Pix-func" default=ident() endfunc param formula enum="z^n0/(1+z^n1)^n2" "sinh(z/(1+sin(z)))" "ln(z)/(1+sin(z))" "sin(z)/(1+ln(z))" default=0 endparam param n0 caption="z^n0" default=(2,0) endparam param n1 caption="1+z^n1" default=(-3,0) endparam param n2 caption="(1+z)^n2" default=(3,0) endparam param r caption="root" default=(1,0) endparam param init enum="auto" "z-init" "pixel-init" default=0 hint="z initiates by the actual pixelvalue." endparam param zinit caption="z-init" default=(1.0,0) endparam param bailout caption="bailout" default=1E-5 endparam } IPolNewtonJulia { init: complex z=#pixel complex zold=0 complex t=0 complex u=0 complex v=0 loop: zold=z if zold==0 zold=1e-20 endif if @formula==0 t=zold^@n1 u=zold^@n0 z=zold-(u-@r*(1+t)^@n2)/(u/zold*(@n0-@n2*@n1*t/(1+t)))+@pixfu(@seed) elseif @formula==1 t=zold^@n1 u=zold^@n0 v=1+sin(t) z=zold-(sinh(u/v^@n2)-@r)/(cosh(u/zold*(@n0-@n2*@n1*zold*cos(t)/v)/v^@n2))+@pixfu(@seed) elseif @formula==2 t=zold^@n1 u=zold^@n0 v=log(u) z=zold-(v-@r*(1+sin(t))^@n2)/(@n0/zold-(@n1*@n2*t/zold*v*cos(t))/(1+sin(t))^@n2) \ +@pixfu(@seed) elseif @formula==3 t=zold^@n1 u=zold^@n0 v=1+log(t) z=zold-(sin(u)-@r*v^@n2)/(@n0*u/zold*cos(u)-(@n1*@n2/zold*sin(u)/v))+@pixfu(@seed) endif bailout: |z-zold|>@bailout switch: type="IPolNewton" pixfu=pixfu bailout=bailout init=init zinit=zinit n0=n0 n1=n1 n2=n2 r=r formula=formula default: title = "IPolNewtonJulia" periodicity=0 method=multipass angle=90.0 func pixfu caption="Pix-func" default=ident() endfunc param formula enum="z^n0/(1+z^n1)^n2" "sinh(z/(1+sin(z)))" "ln(z)/(1+sin(z))" "sin(z)/(1+ln(z))" default=0 endparam param seed caption="Seed" default=(0,0) endparam param n0 caption="z^n0" default=(2,0) endparam param n1 caption="1+z^n1" default=(-3,0) endparam param n2 caption="(1+z)^n2" default=(3,0) endparam param r caption="root" default=(1,0) endparam param init enum="auto" "z-init" "pixel-init" default=0 hint="z initiates by the actual pixelvalue." endparam param zinit caption="z-init" default=(1.0,0) endparam param bailout caption="bailout" default=1E-5 endparam } EMandel { init: complex z=@zinit complex zold=0 loop: zold=z z=@fu1(z)^@fu2(z)+@pixfu(#pixel) bailout: (!@newton && (|z|<@bailout))||(@newton && (|z-zold|>1/@bailout)&&(|z|<@bailout)) switch: type="EMandelJulia" seed=#pixel bailout=bailout fu1=fu1 fu2=fu2 pixfu=pixfu newton=newton zinit=zinit default: title = "EMandel" periodicity=0 method=multipass func fu1 caption="func 1" default=ident() endfunc func fu2 caption="func 2" default=ident() endfunc func pixfu caption="Pixel func" default=ident() endfunc param zinit caption="z-init" default=(0,0) endparam param newton caption="Diff bailout" default=true hint="Difference bailout" endparam param bailout caption="bailout" default=100.0 endparam } EMandelJulia { init: complex z=#pixel complex zold=0 loop: zold=z z=@fu1(z)^@fu2(z)+@pixfu(@seed) bailout: (!@newton && (|z|<@bailout))||(@newton && (|z-zold|>1/@bailout)&&(|z|<@bailout)) switch: type="EMandel" seed=#pixel bailout=bailout fu1=fu1 fu2=fu2 pixfu=pixfu newton=newton zinit=zinit default: title = "EMandelJulia" periodicity=0 method=multipass func fu1 caption="func 1" default=ident() endfunc func fu2 caption="func 2" default=ident() endfunc func pixfu caption="Pixel func" default=ident() endfunc param seed caption="Seed" default=(1.07,-0.34) endparam param newton caption="Diff bailout" default=true hint="Difference bailout" endparam param zinit caption="z-init" default=(0,0) endparam param bailout caption="bailout" default=100.0 endparam } QuarticParameterspace { init: int n=0 int m1save=0 int m2save=0 int m3save=0 float abs1=0 float abs2=0 float abs3=0 complex z=0 complex oldz=0 float t=0 float aa=0 complex a=0+0i complex b=0+0i complex c=0+0i float cc=real(#pixel) float dd=imag(#pixel) float IX=0 float IY=0 float IU=0 float IV=0 float resIX=0 float resIY=0 float resIU=0 float resIV=0 float yrot=0 float xrot=0 float zrot=0 IF @PlottedPlane==0 IX=@breal IY=@bimag IU=@creal IV=@cimag ELSEIF @PlottedPlane==1 IX=@areal IY=@aimag IU=@breal IV=@bimag ELSEIF @PlottedPlane==2 IX=@aimag IY=@bimag IU=@creal IV=@cimag ELSEIF @PlottedPlane==3 IX=@aimag IY=@breal IU=@bimag IV=@cimag ELSEIF @PlottedPlane==4 IX=@aimag IY=@breal IU=@creal IV=@cimag ELSEIF @PlottedPlane==5 IX=@aimag IY=@breal IU=@bimag IV=@creal ELSEIF @PlottedPlane==6 IX=@areal IY=@breal IU=@bimag IV=@cimag ELSEIF @PlottedPlane==7 IX=@areal IY=@breal IU=@creal IV=@cimag ELSE IX=@areal IY=@breal IU=@bimag IV=@creal ENDIF IF @LocalRot==true cc=cc-real(#center) dd=dd-imag(#center) resIX=IX resIY=IY resIU=IU resIV=IV IX=0 IY=0 IU=0 IV=0 ENDIF IF @yrot!=0 yrot=(@yrot%360)*pi/180 t=cabs(cc+IX*1i) aa=atan2(cc+IX*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IX=0 ELSEIF aa==pi/2 cc=0 IX=t ELSEIF aa==-pi/2 cc=0 IX=-t ELSE cc=t*cos(aa) IX=t*sin(aa) ENDIF ENDIF IF @xrot!=0 xrot=(@xrot%360)*pi/180 t=cabs(IX+dd*1i) aa=atan2(IX+dd*1i) aa=xrot+aa IF abs(aa)==pi IX=-t dd=0 ELSEIF aa==pi/2 IX=0 dd=t ELSEIF aa==-pi/2 IX=0 dd=-t ELSE IX=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @zrot!=0 zrot=(@zrot%360)*pi/180 t=cabs(cc+dd*1i) aa=atan2(cc+dd*1i) aa=zrot+aa IF abs(aa)==pi cc=-t dd=0 ELSEIF aa==pi/2 cc=0 dd=t ELSEIF aa==-pi/2 cc=0 dd=-t ELSE cc=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrott!=0 yrot=(@yrott%360)*pi/180 t=cabs(cc+IY*1i) aa=atan2(cc+IY*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IY=0 ELSEIF aa==pi/2 cc=0 IY=t ELSEIF aa==-pi/2 cc=0 IY=-t ELSE cc=t*cos(aa) IY=t*sin(aa) ENDIF ENDIF IF @xrott!=0 xrot=(@xrott%360)*pi/180 t=cabs(IY+dd*1i) aa=atan2(IY+dd*1i) aa=xrot+aa IF abs(aa)==pi IY=-t dd=0 ELSEIF aa==pi/2 IY=0 dd=t ELSEIF aa==-pi/2 IY=0 dd=-t ELSE IY=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrotu!=0 yrot=(@yrotu%360)*pi/180 t=cabs(cc+IU*1i) aa=atan2(cc+IU*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IU=0 ELSEIF aa==pi/2 cc=0 IU=t ELSEIF aa==-pi/2 cc=0 IU=-t ELSE cc=t*cos(aa) IU=t*sin(aa) ENDIF ENDIF IF @xrotu!=0 xrot=(@xrotu%360)*pi/180 t=cabs(IU+dd*1i) aa=atan2(IU+dd*1i) aa=xrot+aa IF abs(aa)==pi IU=-t dd=0 ELSEIF aa==pi/2 IU=0 dd=t ELSEIF aa==-pi/2 IU=0 dd=-t ELSE IU=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrotv!=0 yrot=(@yrotv%360)*pi/180 t=cabs(cc+IV*1i) aa=atan2(cc+IV*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IV=0 ELSEIF aa==pi/2 cc=0 IV=t ELSEIF aa==-pi/2 cc=0 IV=-t ELSE cc=t*cos(aa) IV=t*sin(aa) ENDIF ENDIF IF @xrotv!=0 xrot=(@xrotv%360)*pi/180 t=cabs(IV+dd*1i) aa=atan2(IV+dd*1i) aa=xrot+aa IF abs(aa)==pi IV=-t dd=0 ELSEIF aa==pi/2 IV=0 dd=t ELSEIF aa==-pi/2 IV=0 dd=-t ELSE IV=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @LocalRot==true cc=cc+real(#center) dd=dd+imag(#center) IX=IX+resIX IY=IY+resIY IU=IU+resIU IV=IV+resIV ENDIF IF @PlottedPlane==0 a=cc+dd*1i b=IX+IY*1i c=IU+IV*1i ELSEIF @PlottedPlane==1 a=IX+IY*1i b=IU+IV*1i c=cc+dd*1i ELSEIF @PlottedPlane==2 a=cc+IX*1i b=dd+IY*1i c=IU+IV*1i ELSEIF @PlottedPlane==3 a=cc+IX*1i b=IY+IU*1i c=dd+IV*1i ELSEIF @PlottedPlane==4 a=cc+IX*1i b=IY+dd*1i c=IU+IV*1i ELSEIF @PlottedPlane==5 a=cc+IX*1i b=IY+IU*1i c=IV+dd*1i ELSEIF @PlottedPlane==6 a=IX+dd*1i b=IY+IU*1i c=cc+IV*1i ELSEIF @PlottedPlane==7 a=IX+cc*1i b=IY+dd*1i c=IU+IV*1i ELSE a=IX+cc*1i b=IY+IU*1i c=IV+dd*1i ENDIF if (@M==0)&&(@mode==0) z=a elseif (@M==1)&&(@mode==0) z=b elseif (@M==2)&&(@mode==0) z=-a-b else z=a while (|z|<@bailout)&&(n<#maxiter) n=n+1 z=z*z*z*z+2*(a*b-(a+b)*(a+b))*z*z+4*a*b*(a+b)*z+c endwhile m1save=n abs1=|z| n=0 z=b while (|z|<@bailout)&&(n<#maxiter) n=n+1 z=z*z*z*z+2*(a*b-(a+b)*(a+b))*z*z+4*a*b*(a+b)*z+c endwhile m2save=n abs2=|z| n=0 z=-a-b while (|z|<@bailout)&&(n<#maxiter) n=n+1 z=z*z*z*z+2*(a*b-(a+b)*(a+b))*z*z+4*a*b*(a+b)*z+c endwhile m3save=n abs3=|z| if @mode==1 if @M==0 if m1save==#maxiter z=a elseif (m1save<#maxiter)&&(m2save<#maxiter)&&(m3save<#maxiter) if m1save>m2save if m1save>m3save z=a else z=-a-b endif else if m2save>m3save z=b else z=-a-b endif endif elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=b endif elseif (m1save<#maxiter)&&(m3save<#maxiter) if m1save>m3save z=a else z=-a-b endif else z=a endif elseif @M==1 if m2save==#maxiter z=b elseif (m1save<#maxiter)&&(m2save<#maxiter)&&(m3save<#maxiter) if m1save>m2save if m1save>m3save z=a else z=-a-b endif else if m2save>m3save z=b else z=-a-b endif endif elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=b endif elseif (m2save<#maxiter)&&(m3save<#maxiter) if m2save>m3save z=b else z=-a-b endif else z=b endif elseif @M==2 if m3save==#maxiter z=-a-b elseif (m1save<#maxiter)&&(m2save<#maxiter)&&(m3save<#maxiter) if m1save>m2save if m1save>m3save z=a else z=-a-b endif else if m2save>m3save z=b else z=-a-b endif endif elseif (m1save<#maxiter)&&(m3save<#maxiter) if m1save>m3save z=a else z=-a-b endif elseif (m2save<#maxiter)&&(m3save<#maxiter) if m2save>m3save z=b else z=-a-b endif else z=-a-b endif elseif @M==3 if (m1save==#maxiter)&&(m2save==#maxiter)&&(m3save==#maxiter) if abs1>abs2 if abs1>abs3 z=a else z=-a-b endif elseif abs2>abs3 z=b else z=-a-b endif elseif (m1save==#maxiter)&&(m2save==#maxiter) if abs1>abs2 z=a else z=b endif elseif (m1save==#maxiter)&&(m3save==#maxiter) if abs1>abs3 z=a else z=-a-b endif elseif (m2save==#maxiter)&&(m3save==#maxiter) if abs2>abs3 z=b else z=-a-b endif elseif m1save==#maxiter z=a elseif m2save==#maxiter z=b elseif m3save==#maxiter z=-a-b else if m1save>m2save if m1save>m3save z=a else z=-a-b endif elseif m2save>m3save z=b else z=-a-b endif endif elseif (@M==4) if (m1save==#maxiter)&&(m2save==#maxiter)&&(m3save==#maxiter) if abs1>abs2 if abs1>abs3 z=a else z=-a-b endif elseif abs2>abs3 z=b else z=-a-b endif elseif (m1save<#maxiter)&&(m2save<#maxiter)&&(m3save<#maxiter) if m1save>m2save if m1save>m3save z=a else z=-a-b endif else if m2save>m3save z=b else z=-a-b endif endif elseif (m1save==#maxiter)&&(m2save==#maxiter) z=-a-b elseif (m1save==#maxiter)&&(m3save==#maxiter) z=b elseif (m2save==#maxiter)&&(m3save==#maxiter) z=a elseif m1save==#maxiter if m2save>m3save z=b else z=-a-b endif elseif m2save==#maxiter if m1save>m3save z=a else z=-a-b endif else if m1save>m2save z=a else z=b endif endif elseif @M==5 if (m1save==#maxiter)&&(m2save==#maxiter) if abs1>abs2 z=a else z=b endif elseif (m1save<#maxiter)&&(m2save<#maxiter)&&(m3save<#maxiter) if m1save>m2save if m1save>m3save z=a else z=-a-b endif else if m2save>m3save z=b else z=-a-b endif endif elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=b endif elseif (m1save==#maxiter) z=a else z=b endif elseif @M==6 if (m1save==#maxiter)&&(m3save==#maxiter) if abs1>abs3 z=a else z=-a-b endif elseif (m1save<#maxiter)&&(m2save<#maxiter)&&(m3save<#maxiter) if m1save>m2save if m1save>m3save z=a else z=-a-b endif else if m2save>m3save z=b else z=-a-b endif endif elseif (m1save<#maxiter)&&(m3save<#maxiter) if m1save>m3save z=a else z=-a-b endif elseif (m1save==#maxiter) z=a else z=-a-b endif elseif @M==7 if (m2save==#maxiter)&&(m3save==#maxiter) if abs2>abs3 z=b else z=-a-b endif elseif (m1save<#maxiter)&&(m2save<#maxiter)&&(m3save<#maxiter) if m1save>m2save if m1save>m3save z=a else z=-a-b endif else if m2save>m3save z=b else z=-a-b endif endif elseif (m2save<#maxiter)&&(m3save<#maxiter) if m2save>m3save z=b else z=-a-b endif elseif (m2save==#maxiter) z=b else z=-a-b endif endif else if @M==3 if (m1save==#maxiter)&&(m2save==#maxiter)&&(m3save==#maxiter) if abs1>abs2 if abs1>abs3 z=a else z=-a-b endif elseif abs2>abs3 z=b else z=-a-b endif elseif (m1save==#maxiter)&&(m2save==#maxiter) if abs1>abs2 z=a else z=b endif elseif (m1save==#maxiter)&&(m3save==#maxiter) if abs1>abs3 z=a else z=-a-b endif elseif (m2save==#maxiter)&&(m3save==#maxiter) if abs2>abs3 z=b else z=-a-b endif elseif m1save==#maxiter z=a elseif m2save==#maxiter z=b elseif m3save==#maxiter z=-a-b else if m1save>m2save if m1save>m3save z=a else z=-a-b endif elseif m2save>m3save z=b else z=-a-b endif endif elseif (@M==4) if (m1save==#maxiter)&&(m2save==#maxiter)&&(m3save==#maxiter) if abs1abs2 z=a else z=b endif elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=b endif elseif (m1save==#maxiter) z=a else z=b endif elseif @M==6 if (m1save==#maxiter)&&(m3save==#maxiter) if abs1>abs3 z=a else z=-a-b endif elseif (m1save<#maxiter)&&(m3save<#maxiter) if m1save>m3save z=a else z=-a-b endif elseif (m1save==#maxiter) z=a else z=-a-b endif elseif @M==7 if (m2save==#maxiter)&&(m3save==#maxiter) if abs2>abs3 z=b else z=-a-b endif elseif (m2save<#maxiter)&&(m3save<#maxiter) if m2save>m3save z=b else z=-a-b endif elseif (m2save==#maxiter) z=b else z=-a-b endif endif endif endif loop: oldz=z z=z*z*z*z+2*(a*b-(a+b)*(a+b))*z*z+4*a*b*(a+b)*z+c bailout: (!@diff && (|z|<@bailout))||(@diff && (|z-oldz|>1/@bailout)&&(|z|<@bailout)) switch: type="QuarticJulia" seed=#pixel PlottedPlane=PlottedPlane M=M mode=mode areal=areal aimag=aimag breal=breal bimag=bimag creal=creal cimag=cimag xrot=xrot yrot=yrot xrott=xrott yrott=yrott xrotu=xrotu yrotu=yrotu xrotv=xrotv yrotv=yrotv zrot=zrot LocalRot=LocalRot diff=diff bailout=bailout default: title = "QuarticParameterspace" periodicity=0 method=multipass param PlottedPlane enum = "1.(a-real,a-imag)" "2.(c-real,c-imag)" "3.(a-real,b-real)" "4.(a-real,c-real)" \ "5.(a-real,b-imag)" "6.(a-real,c-imag)" "7.(c-real,a-imag)" "8.(a-imag,b-imag)" \ "9.(a-imag,c-imag)" default=0 hint="The axis that will be plotted." endparam param M enum="M1" "M2" "M3" "M1+M2+M3" "QCL" "M1+M2" "M1+M3" "M2+M3" hint="The choosen critical point to initialize z" default=0 endparam param mode enum="Normal" "High" default=0 endparam param areal caption=" a-real " hint="Value for a-real when a-real is constant (not plotted)." default=0.0 endparam param aimag caption=" a-imag " hint="Value for a-imag when a-imag is constant (not plotted)." default=0.0 endparam param breal caption=" b-real " hint="Value for b-real when b-real is constant (not plotted)." default=0.0 endparam param bimag caption=" b-imag " hint="Value for b-imag when b-imag is constant (not plotted)." default=0.0 endparam param creal caption=" c-real " hint="Value for c-real when c-real is constant (not plotted)." default=0.0 endparam param cimag caption=" c-imag " hint="Value for c-imag when c-imag is constant (not plotted)." default=0.0 endparam param xrot caption="x-rotz" hint= "Rotates yz-plane in degrees around the x-axes." default=0.0 endparam param yrot caption="y-rotz" hint= "Rotates xz-plane in degrees around the y-axis." default=0.0 endparam param xrott caption="x-rott" hint= "Rotates yt-plane in degrees around the x-axes." default=0.0 endparam param yrott caption="y-rott" hint= "Rotates xt-plane in degrees around the y-axis." default=0.0 endparam param xrotu caption="x-rotu" hint= "Rotates yu-plane in degrees around the x-axes." default=0.0 endparam param yrotu caption="y-rotu" hint= "Rotates xu-plane in degrees around the y-axis." default=0.0 endparam param xrotv caption="x-rotv" hint= "Rotates yv-plane in degrees around the x-axes." default=0.0 endparam param yrotv caption="y-rotv" hint= "Rotates xv-plane in degrees around the y-axis." default=0.0 endparam param zrot caption="z-rot" hint= "Rotating xy-plane in degrees around the z-axis." default=0.0 endparam param LocalRot caption="Local Rotation" hint="Enables Local Rotation." default=false endparam param diff caption="Diff-Bailout" default=false endparam param bailout caption="bailout" hint="Value for bailout" default=100.0 endparam } QuarticJulia { init: complex z=#pixel complex oldz=0 float t=0 float aa=0 complex a=0+0i complex b=0+0i complex c=0+0i float cc=real(@seed) float dd=imag(@seed) float IX=0 float IY=0 float IU=0 float IV=0 float resIX=0 float resIY=0 float resIU=0 float resIV=0 float yrot=0 float xrot=0 float zrot=0 IF @PlottedPlane==0 IX=@breal IY=@bimag IU=@creal IV=@cimag ELSEIF @PlottedPlane==1 IX=@areal IY=@aimag IU=@breal IV=@bimag ELSEIF @PlottedPlane==2 IX=@aimag IY=@bimag IU=@creal IV=@cimag ELSEIF @PlottedPlane==3 IX=@aimag IY=@breal IU=@bimag IV=@cimag ELSEIF @PlottedPlane==4 IX=@aimag IY=@breal IU=@creal IV=@cimag ELSEIF @PlottedPlane==5 IX=@aimag IY=@breal IU=@bimag IV=@creal ELSEIF @PlottedPlane==6 IX=@areal IY=@breal IU=@bimag IV=@cimag ELSEIF @PlottedPlane==7 IX=@areal IY=@breal IU=@creal IV=@cimag ELSE IX=@areal IY=@breal IU=@bimag IV=@creal ENDIF IF @LocalRot==true cc=cc-real(#center) dd=dd-imag(#center) resIX=IX resIY=IY resIU=IU resIV=IV IX=0 IY=0 IU=0 IV=0 ENDIF IF @yrot!=0 yrot=(@yrot%360)*pi/180 t=cabs(cc+IX*1i) aa=atan2(cc+IX*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IX=0 ELSEIF aa==pi/2 cc=0 IX=t ELSEIF aa==-pi/2 cc=0 IX=-t ELSE cc=t*cos(aa) IX=t*sin(aa) ENDIF ENDIF IF @xrot!=0 xrot=(@xrot%360)*pi/180 t=cabs(IX+dd*1i) aa=atan2(IX+dd*1i) aa=xrot+aa IF abs(aa)==pi IX=-t dd=0 ELSEIF aa==pi/2 IX=0 dd=t ELSEIF aa==-pi/2 IX=0 dd=-t ELSE IX=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @zrot!=0 zrot=(@zrot%360)*pi/180 t=cabs(cc+dd*1i) aa=atan2(cc+dd*1i) aa=zrot+aa IF abs(aa)==pi cc=-t dd=0 ELSEIF aa==pi/2 cc=0 dd=t ELSEIF aa==-pi/2 cc=0 dd=-t ELSE cc=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrott!=0 yrot=(@yrott%360)*pi/180 t=cabs(cc+IY*1i) aa=atan2(cc+IY*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IY=0 ELSEIF aa==pi/2 cc=0 IY=t ELSEIF aa==-pi/2 cc=0 IY=-t ELSE cc=t*cos(aa) IY=t*sin(aa) ENDIF ENDIF IF @xrott!=0 xrot=(@xrott%360)*pi/180 t=cabs(IY+dd*1i) aa=atan2(IY+dd*1i) aa=xrot+aa IF abs(aa)==pi IY=-t dd=0 ELSEIF aa==pi/2 IY=0 dd=t ELSEIF aa==-pi/2 IY=0 dd=-t ELSE IY=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrotu!=0 yrot=(@yrotu%360)*pi/180 t=cabs(cc+IU*1i) aa=atan2(cc+IU*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IU=0 ELSEIF aa==pi/2 cc=0 IU=t ELSEIF aa==-pi/2 cc=0 IU=-t ELSE cc=t*cos(aa) IU=t*sin(aa) ENDIF ENDIF IF @xrotu!=0 xrot=(@xrotu%360)*pi/180 t=cabs(IU+dd*1i) aa=atan2(IU+dd*1i) aa=xrot+aa IF abs(aa)==pi IU=-t dd=0 ELSEIF aa==pi/2 IU=0 dd=t ELSEIF aa==-pi/2 IU=0 dd=-t ELSE IU=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrotv!=0 yrot=(@yrotv%360)*pi/180 t=cabs(cc+IV*1i) aa=atan2(cc+IV*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IV=0 ELSEIF aa==pi/2 cc=0 IV=t ELSEIF aa==-pi/2 cc=0 IV=-t ELSE cc=t*cos(aa) IV=t*sin(aa) ENDIF ENDIF IF @xrotv!=0 xrot=(@xrotv%360)*pi/180 t=cabs(IV+dd*1i) aa=atan2(IV+dd*1i) aa=xrot+aa IF abs(aa)==pi IV=-t dd=0 ELSEIF aa==pi/2 IV=0 dd=t ELSEIF aa==-pi/2 IV=0 dd=-t ELSE IV=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @LocalRot==true cc=cc+real(#center) dd=dd+imag(#center) IX=IX+resIX IY=IY+resIY IU=IU+resIU IV=IV+resIV ENDIF IF @PlottedPlane==0 a=cc+dd*1i b=IX+IY*1i c=IU+IV*1i ELSEIF @PlottedPlane==1 a=IX+IY*1i b=IU+IV*1i c=cc+dd*1i ELSEIF @PlottedPlane==2 a=cc+IX*1i b=dd+IY*1i c=IU+IV*1i ELSEIF @PlottedPlane==3 a=cc+IX*1i b=IY+IU*1i c=dd+IV*1i ELSEIF @PlottedPlane==4 a=cc+IX*1i b=IY+dd*1i c=IU+IV*1i ELSEIF @PlottedPlane==5 a=cc+IX*1i b=IY+IU*1i c=IV+dd*1i ELSEIF @PlottedPlane==6 a=IX+dd*1i b=IY+IU*1i c=cc+IV*1i ELSEIF @PlottedPlane==7 a=IX+cc*1i b=IY+dd*1i c=IU+IV*1i ELSE a=IX+cc*1i b=IY+IU*1i c=IV+dd*1i ENDIF loop: oldz=z z=z*z*z*z+2*(a*b-(a+b)*(a+b))*z*z+4*a*b*(a+b)*z+c bailout: (!@diff && (|z|<@bailout))||(@diff && (|z-oldz|>1/@bailout)&&(|z|<@bailout)) switch: type="QuarticParameterspace" PlottedPlane=PlottedPlane M=M mode=mode areal=areal aimag=aimag breal=breal bimag=bimag creal=creal cimag=cimag xrot=xrot yrot=yrot xrott=xrott yrott=yrott xrotu=xrotu yrotu=yrotu xrotv=xrotv yrotv=yrotv zrot=zrot LocalRot=LocalRot diff=diff bailout=bailout default: title = "QuarticJulia" periodicity=0 method=multipass param PlottedPlane enum = "1.(a-real,a-imag)" "2.(c-real,c-imag)" "3.(a-real,b-real)" "4.(a-real,c-real)" \ "5.(a-real,b-imag)" "6.(a-real,c-imag)" "7.(c-real,a-imag)" "8.(a-imag,b-imag)" \ "9.(a-imag,c-imag)" default=0 hint="The axis that will be plotted." endparam param M enum="M1" "M2" "M3" "M1+M2+M3" "QCL" "M1+M2" "M1+M3" "M2+M3" hint="The choosen critical point to initialize z" default=0 endparam param seed caption="seed" default=(0,0) endparam param areal caption=" a-real " hint="Value for a-real when a-real is constant (not plotted)." default=0.0 endparam param aimag caption=" a-imag " hint="Value for a-imag when a-imag is constant (not plotted)." default=0.0 endparam param breal caption=" b-real " hint="Value for b-real when b-real is constant (not plotted)." default=0.0 endparam param bimag caption=" b-imag " hint="Value for b-imag when b-imag is constant (not plotted)." default=0.0 endparam param creal caption=" c-real " hint="Value for c-real when c-real is constant (not plotted)." default=0.0 endparam param cimag caption=" c-imag " hint="Value for c-imag when c-imag is constant (not plotted)." default=0.0 endparam param xrot caption="x-rotz" hint= "Rotates yz-plane in degrees around the x-axes." default=0.0 endparam param yrot caption="y-rotz" hint= "Rotates xz-plane in degrees around the y-axis." default=0.0 endparam param xrott caption="x-rott" hint= "Rotates yt-plane in degrees around the x-axes." default=0.0 endparam param yrott caption="y-rott" hint= "Rotates xt-plane in degrees around the y-axis." default=0.0 endparam param xrotu caption="x-rotu" hint= "Rotates yu-plane in degrees around the x-axes." default=0.0 endparam param yrotu caption="y-rotu" hint= "Rotates xu-plane in degrees around the y-axis." default=0.0 endparam param xrotv caption="x-rotv" hint= "Rotates yv-plane in degrees around the x-axes." default=0.0 endparam param yrotv caption="y-rotv" hint= "Rotates xv-plane in degrees around the y-axis." default=0.0 endparam param zrot caption="z-rot" hint= "Rotating xy-plane in degrees around the z-axis." default=0.0 endparam param LocalRot caption="Local Rotation" hint="Enables Local Rotation." default=false endparam param diff caption="Diff-Bailout" default=false endparam param bailout caption="bailout" hint="Value for bailout" default=100.0 endparam } CubicParameterspace2 { init: int n=0 int m1save=0 int m2save=0 float abs1=0 float abs2=0 complex z=0 complex oldz=0 float t=0 float aa=0 complex a=0+0i complex b=0+0i float cc=real(#pixel) float dd=imag(#pixel) float IX=0 float IY=0 float resIX=0 float resIY=0 float yrot=0 float xrot=0 float zrot=0 IF @PlottedPlane==0 ;a-real, a-imag IX=@breal IY=@bimag ELSEIF @PlottedPlane==1 ;a-real, b-real IX=@aimag IY=@bimag ELSEIF @PlottedPlane==2 ;a-real, b-imag IX=@aimag IY=@breal ELSEIF @PlottedPlane==3 ;a-imag, b-real IX=@areal IY=@bimag ELSEIF @PlottedPlane==4 ;a-imag, b-imag IX=@areal IY=@breal ELSE ;b-real, b-imag IX=@areal IY=@aimag ENDIF IF @LocalRot==true cc=cc-real(#center) dd=dd-imag(#center) resIX=IX resIY=IY IX=0 IY=0 ENDIF IF @yrot!=0 ;yrot-z yrot=(@yrot%360)*pi/180 t=cabs(cc+IX*1i) aa=atan2(cc+IX*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IX=0 ELSEIF aa==pi/2 cc=0 IX=t ELSEIF aa==-pi/2 cc=0 IX=-t ELSE cc=t*cos(aa) IX=t*sin(aa) ENDIF ENDIF IF @xrot!=0 ;xrot-z xrot=(@xrot%360)*pi/180 t=cabs(IX+dd*1i) aa=atan2(IX+dd*1i) aa=xrot+aa IF abs(aa)==pi IX=-t dd=0 ELSEIF aa==pi/2 IX=0 dd=t ELSEIF aa==-pi/2 IX=0 dd=-t ELSE IX=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @zrot!=0 ;zrot-xy zrot=(@zrot%360)*pi/180 t=cabs(cc+dd*1i) aa=atan2(cc+dd*1i) aa=zrot+aa IF abs(aa)==pi cc=-t dd=0 ELSEIF aa==pi/2 cc=0 dd=t ELSEIF aa==-pi/2 cc=0 dd=-t ELSE cc=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrott!=0 ;yrot-t yrot=(@yrott%360)*pi/180 t=cabs(cc+IY*1i) aa=atan2(cc+IY*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IY=0 ELSEIF aa==pi/2 cc=0 IY=t ELSEIF aa==-pi/2 cc=0 IY=-t ELSE cc=t*cos(aa) IY=t*sin(aa) ENDIF ENDIF IF @xrott!=0 ;xrot-t xrot=(@xrott%360)*pi/180 t=cabs(IY+dd*1i) aa=atan2(IY+dd*1i) aa=xrot+aa IF abs(aa)==pi IY=-t dd=0 ELSEIF aa==pi/2 IY=0 dd=t ELSEIF aa==-pi/2 IY=0 dd=-t ELSE IY=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @LocalRot==true cc=cc+real(#center) dd=dd+imag(#center) IX=IX+resIX IY=IY+resIY ENDIF IF @PlottedPlane==0 ;a-real, a-imag a=cc+dd*1i b=IX+IY*1i ELSEIF @PlottedPlane==1 ;a-real, b-real a=cc+IX*1i b=dd+IY*1i ELSEIF @PlottedPlane==2 ;a-real, b-imag a=cc+IX*1i b=IY+dd*1i ELSEIF @PlottedPlane==3 ;a-imag, b-real a=IX+cc*1i b=dd+IY*1i ELSEIF @PlottedPlane==4 ;a-imag, b-imag a=IX+cc*1i b=IY+dd*1i ELSE a=IX+IY*1i ;b-real, b-imag b=cc+dd*1i ENDIF if (@M==0)&&(@mode==0) z=a elseif (@M==1)&&(@mode==0) z=-a else z=a while (|z|<@bailout)&&(n<#maxiter) n=n+1 z=z*z*z-3*a*a*z+b endwhile m1save=n abs1=|z| n=0 z=-a while (|z|<@bailout)&&(n<#maxiter) n=n+1 z=z*z*z-3*a*a*z+b endwhile m2save=n abs2=|z| if @mode==1 if @M==0 ;M1 if m1save==#maxiter z=a elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=-a endif else z=a endif elseif @M==1 ;M2 if m2save==#maxiter z=-a elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=-a endif else z=-a endif elseif (@M==2) if (m1save==#maxiter)&&(m2save==#maxiter) if abs1>abs2 z=a else z=-a endif elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=-a endif elseif m1save==#maxiter z=-a elseif m2save==#maxiter z=a else if m1save>m2save z=a else z=-a endif endif elseif @M==3 if (m1save==#maxiter)&&(m2save==#maxiter) if abs1>abs2 z=a else z=-a endif elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=-a endif elseif (m1save==#maxiter) z=a else z=-a endif endif else if (@M==2) if (m1save==#maxiter)&&(m2save==#maxiter) if abs1abs2 z=a else z=-a endif elseif (m1save<#maxiter)&&(m2save<#maxiter) if m1save>m2save z=a else z=-a endif elseif (m1save==#maxiter) z=a else z=-a endif endif endif endif loop: oldz=z z=z*z*z-3*a*a*z+b bailout: (!@diff && (|z|<@bailout))||(@diff && (|z-oldz|>1/@bailout)&&(|z|<@bailout)) switch: type="CubicJulia2" seed=#pixel PlottedPlane=PlottedPlane M=M mode=mode areal=areal aimag=aimag breal=breal bimag=bimag xrot=xrot yrot=yrot xrott=xrott yrott=yrott zrot=zrot LocalRot=LocalRot diff=diff bailout=bailout default: title = "CubicParameterspace2" periodicity=0 method=multipass param PlottedPlane enum = "1.(a-real,a-imag)" "2.(a-real,b-real)" "3.(a-real,b-imag)" "4.(a-imag,b-real)" \ "5.(a-imag,b-imag)" "6.(b-real,b-imag)" default=0 hint="The axis that will be plotted." endparam param M enum="M+" "M-" "CCL" "M+ and/or M-" hint="The choosen critical point to initialize z" default=0 endparam param mode enum="Normal" "High" default=0 endparam param areal caption=" a-real " hint="Value for a-real when a-real is constant (not plotted)." default=0.0 endparam param aimag caption=" a-imag " hint="Value for a-imag when a-imag is constant (not plotted)." default=0.0 endparam param breal caption=" b-real " hint="Value for b-real when b-real is constant (not plotted)." default=0.0 endparam param bimag caption=" b-imag " hint="Value for b-imag when b-imag is constant (not plotted)." default=0.0 endparam param xrot caption="x-rotz" hint= "Rotates yz-plane in degrees around the x-axes." default=0.0 endparam param yrot caption="y-rotz" hint= "Rotates xz-plane in degrees around the y-axis." default=0.0 endparam param xrott caption="x-rott" hint= "Rotates yt-plane in degrees around the x-axes." default=0.0 endparam param yrott caption="y-rott" hint= "Rotates xt-plane in degrees around the y-axis." default=0.0 endparam param zrot caption="z-rot" hint= "Rotating xy-plane in degrees around the z-axis." default=0.0 endparam param LocalRot caption="Local Rotation" hint="Enables Local Rotation." default=false endparam param diff caption="Diff-Bailout" default=false endparam param bailout caption="bailout" hint="Value for bailout" default=100.0 endparam } CubicJulia2 { init: complex z=#pixel complex oldz=0+0i float t=0 float aa=0 complex a=0+0i complex b=0+0i float cc=real(@seed) float dd=imag(@seed) float IX=0 float IY=0 float resIX=0 float resIY=0 float yrot=0 float xrot=0 float zrot=0 IF @PlottedPlane==0 ;a-real, a-imag IX=@breal IY=@bimag ELSEIF @PlottedPlane==1 ;a-real, b-real IX=@aimag IY=@bimag ELSEIF @PlottedPlane==2 ;a-real, b-imag IX=@aimag IY=@breal ELSEIF @PlottedPlane==3 ;a-imag, b-real IX=@areal IY=@bimag ELSEIF @PlottedPlane==4 ;a-imag, b-imag IX=@areal IY=@breal ELSE ;b-real, b-imag IX=@areal IY=@aimag ENDIF IF @LocalRot==true cc=cc-real(#center) dd=dd-imag(#center) resIX=IX resIY=IY IX=0 IY=0 ENDIF IF @yrot!=0 ;yrot-z yrot=(@yrot%360)*pi/180 t=cabs(cc+IX*1i) aa=atan2(cc+IX*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IX=0 ELSEIF aa==pi/2 cc=0 IX=t ELSEIF aa==-pi/2 cc=0 IX=-t ELSE cc=t*cos(aa) IX=t*sin(aa) ENDIF ENDIF IF @xrot!=0 ;xrot-z xrot=(@xrot%360)*pi/180 t=cabs(IX+dd*1i) aa=atan2(IX+dd*1i) aa=xrot+aa IF abs(aa)==pi IX=-t dd=0 ELSEIF aa==pi/2 IX=0 dd=t ELSEIF aa==-pi/2 IX=0 dd=-t ELSE IX=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @zrot!=0 ;zrot-xy zrot=(@zrot%360)*pi/180 t=cabs(cc+dd*1i) aa=atan2(cc+dd*1i) aa=zrot+aa IF abs(aa)==pi cc=-t dd=0 ELSEIF aa==pi/2 cc=0 dd=t ELSEIF aa==-pi/2 cc=0 dd=-t ELSE cc=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @yrott!=0 ;yrot-t yrot=(@yrott%360)*pi/180 t=cabs(cc+IY*1i) aa=atan2(cc+IY*1i) aa=yrot+aa IF abs(aa)==pi cc=-t IY=0 ELSEIF aa==pi/2 cc=0 IY=t ELSEIF aa==-pi/2 cc=0 IY=-t ELSE cc=t*cos(aa) IY=t*sin(aa) ENDIF ENDIF IF @xrott!=0 ;xrot-t xrot=(@xrott%360)*pi/180 t=cabs(IY+dd*1i) aa=atan2(IY+dd*1i) aa=xrot+aa IF abs(aa)==pi IY=-t dd=0 ELSEIF aa==pi/2 IY=0 dd=t ELSEIF aa==-pi/2 IY=0 dd=-t ELSE IY=t*cos(aa) dd=t*sin(aa) ENDIF ENDIF IF @LocalRot==true cc=cc+real(#center) dd=dd+imag(#center) IX=IX+resIX IY=IY+resIY ENDIF IF @PlottedPlane==0 ;a-real, a-imag a=cc+dd*1i b=IX+IY*1i ELSEIF @PlottedPlane==1 ;a-real, b-real a=cc+IX*1i b=dd+IY*1i ELSEIF @PlottedPlane==2 ;a-real, b-imag a=cc+IX*1i b=IY+dd*1i ELSEIF @PlottedPlane==3 ;a-imag, b-real a=IX+cc*1i b=dd+IY*1i ELSEIF @PlottedPlane==4 ;a-imag, b-imag a=IX+cc*1i b=IY+dd*1i ELSE a=IX+IY*1i ;b-real, b-imag b=cc+dd*1i ENDIF loop: oldz=z z=z*z*z-3*a*a*z+b bailout: (!@diff && (|z|<@bailout))||(@diff && (|z-oldz|>1/@bailout)&&(|z|<@bailout)) switch: type="CubicParameterspace2" PlottedPlane=PlottedPlane M=M mode=mode areal=areal aimag=aimag breal=breal bimag=bimag xrot=xrot yrot=yrot xrott=xrott yrott=yrott zrot=zrot LocalRot=LocalRot diff=diff bailout=bailout default: title = "CubicJulia2" periodicity=0 method=multipass param PlottedPlane enum = "1.(a-real,a-imag)" "2.(a-real,b-real)" "3.(a-real,b-imag)" "4.(a-imag,b-real)" \ "5.(a-imag,b-imag)" "6.(b-real,b-imag)" default=0 hint="The axis that will be plotted." endparam param M enum="M+" "M-" "CCL" "M+ and/or M-" hint="The choosen critical point to initialize z" default=0 endparam param mode enum="Normal" "High" default=0 endparam param areal caption=" a-real " hint="Value for a-real when a-real is constant (not plotted)." default=0.0 endparam param aimag caption=" a-imag " hint="Value for a-imag when a-imag is constant (not plotted)." default=0.0 endparam param breal caption=" b-real " hint="Value for b-real when b-real is constant (not plotted)." default=0.0 endparam param bimag caption=" b-imag " hint="Value for b-imag when b-imag is constant (not plotted)." default=0.0 endparam param xrot caption="x-rotz" hint= "Rotates yz-plane in degrees around the x-axes." default=0.0 endparam param yrot caption="y-rotz" hint= "Rotates xz-plane in degrees around the y-axis." default=0.0 endparam param xrott caption="x-rott" hint= "Rotates yt-plane in degrees around the x-axes." default=0.0 endparam param yrott caption="y-rott" hint= "Rotates xt-plane in degrees around the y-axis." default=0.0 endparam param zrot caption="z-rot" hint= "Rotating xy-plane in degrees around the z-axis." default=0.0 endparam param LocalRot caption="Local Rotation" hint="Enables Local Rotation." default=false endparam param diff caption="Diff-Bailout" default=false endparam param bailout caption="bailout" hint="Value for bailout" default=100.0 endparam param seed caption="Seed" default=(0,0) hint="Seed for Julia" endparam }