[comp.sys.apple] Julia Set

jabernathy@pro-houston.cts.com (Joe Abernathy) (02/13/90)

In-Reply-To: message from eldorado@EN.ECN.PURDUE.EDU

> What happens if it goes to 1 (or in this case two squared) after a
> given number of iterations, I am not sure.

The Julia set occurs near the border of the Mandelbrot set, so it is easy to
exceed the precision of the computer's numerical ability when iterating the
equation the produces the set. So the easiest thing to try if you are getting
errors is to reduce the number of iterations.

Here's an extract of the algorithm for generating the Julia set:

while ((color<num_iterations) && ((xsquare + ysquare) < max_size))
{
        xsquare = X * X;
        ysquare = Y * Y;
        Y = 2 * X * Y + Q;
        x = xquare - ysquare + P;
        color++;
}
.. increment color ..
plot point


UUCP: crash!pro-houston!jabernathy
ARPA: crash!pro-houston!jabernathy@nosc.mil
INET: jabernathy@pro-houston.cts.com
America Online: JOEA17, First Word
Direct: Pro-Houston, (713) 526-9607, 3-2400 bps