POV-Ray : Newsgroups : povray.off-topic : Heh.... : Heh.... Server Time
6 Sep 2024 01:25:50 EDT (-0400)
  Heh....  
From: Mike Raiford
Date: 12 Mar 2009 14:50:43
Message: <49b95983$1@news.povray.org>
<sigh>

double x = x0, y = y0;

int i = 0;
while(x*x+y*y <= 4 && i < max_iterations)
{
    double xtemp = x*x - y*y + x0;
    y = 2*x*y + y0;
    x = xtemp;
    i++;
}
if (i == max_iterations) return -1;
return i;

-- 
~Mike


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.