On 3 Nov 1999 11:00:24 -0500, Nieminen Juha
<war### [at] punarastas cs tut fi> wrote:
>Peter Popov <pet### [at] usa net> wrote:
>: #declare Rn = (R*R-I*I)+X;
>: #declare In = (2*R*I-J*J)+Y;
>: #declare Jn= (2*J*I+2*J*R)+Z;
>
> Where does this formula come from? Is the formula for Jn just a randomly
>chosen one?
> What's the bailout value?
According to Mark he came up with it. it more of a hack than anything
else, but it sure works darn good. Now here's the snippet of code from
Mark's program that does the iteration:
iter = 0;
r = X; i = Y; j = Z;
while(iter < maxiter && ((r*r)+(i+i)+(j*j)) <= 4)
{
rn = ((r*r)-(i*i))+X;
in = ((2*r*i)-(j*j))+Y;
j = ((2*i*j)+(2*r*j))+Z;
r = rn;
i = in;
iter++;
}
So you see the bailout is 4, as usual (but you can always change it or
leave it to the user)
Peter Popov
ICQ: 15002700
Post a reply to this message
|