Hiram Berry wrote:
SliceJulibrot2a {; SliceJulibrot2 with per screen initialization IF (scrnpix==(0,0)) a=pi*real(p1*0.0055555555555556), b=pi*imag(p1*0.0055555555555556), g=pi*real(p2*0.0055555555555556), d=pi*imag(p2*0.0055555555555556), ca=cos(a), cb=cos(b), sb=sin(b), cg=cos(g), sg=sin(g), cd=cos(d), sd=sin(d), term1=cg*cd, term2=ca*sb*sg*cd+ca*cb*sd, term3=cg*sd, term4=ca*cb*cd-ca*sb*sg*sd, term5=ca*sb*cg ENDIF pix=pixel, u=real(pix), v=imag(pix), p=u*term1-v*term2, q=u*term3+v*term4, r=u*sg+v*term5, s=v*sin(a), c=p+flip(q)+p3, z=r+flip(s)+p4: z=sqr(z)+c |z|<=9 }
Again, the drawing method should be set to single pass, but if anyone has a better solution or can shed more light on this problem, PLEASE reply.
I'm stealing this from Morgan L. Owens, who discussed this in May 2002 (you can look it up in the Fractint Mailing List Archive): Since variables don't have to be declared explicitely in Fractint formulas before using them, the parser creates variables automatically (and sets them to zero) as soon it encounters a variable name not encountered before. So this should (hopefully) work without dependence on screen coordinates: IF (notfirst==0) notfirst = 1 a=pi*real(p1*0.0055555555555556), b=pi*imag(p1*0.0055555555555556), g=pi*real(p2*0.0055555555555556), d=pi*imag(p2*0.0055555555555556), ca=cos(a), cb=cos(b), sb=sin(b), cg=cos(g), sg=sin(g), cd=cos(d), sd=sin(d), term1=cg*cd, term2=ca*sb*sg*cd+ca*cb*sd, term3=cg*sd, term4=ca*cb*cd-ca*sb*sg*sd, term5=ca*sb*cg ENDIF [etc] And watch out for those logical expressions! Fractint does only compare the number's *real parts* in those: IF (screenpix==(0,0)) is the same as IF (screenpix==0) is the same as IF (real(screenpix)==0) To check for pixel (0,0) you need: IF (screenpix==0 && imag(screenpix)==0) Regards, Gerald