POV-Ray : Newsgroups : povray.general : Mandelbrot page : Re: Mandelbrot page Server Time
8 Aug 2024 08:13:14 EDT (-0400)
  Re: Mandelbrot page  
From: Tom Melly
Date: 24 Jan 2001 04:28:40
Message: <3a6ea048$1@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3a6dc02b$1@news.povray.org...

Actually, I took some more time last night to read it properly, and it's
more of an idiot's version than I first thought. At first glance, I ran
screaming for the hills when I saw the opening equations.

What I can't find (although I'm not saying it isn't there) is an explanation
of what the imaginary number is (the square-root of -1).

BTW Here is my ascii line-art mandelbrot code for POV - the trouble is that
it doesn't work and I don't understand why not. Can anyone see what's wrong
with it?

#declare Start = -2.00;
#declare End = 2.00;
#declare Iterations = 5;

#declare Imaginary = -Start;
#while(Imaginary >= -End)
  #declare Real = Start;
  #while(Real <= End)
    #declare Inside = true;
    #declare TReal = Real;
    #declare TImaginary = Imaginary;
    #declare Count = 1;
    #while(Count <= Iterations)
      #declare TTReal = TReal;
      #declare TReal = (TReal * TReal) - (TImaginary * TImaginary);
      #declare TImaginary = 2 * TTReal * TImaginary;
      #if((TReal * TReal) + (TImaginary * TImaginary) > 4)
        #declare Inside = false;
        #declare Count = Iterations + 1;
      #else
        #declare Count = Count + 1;
      #end
    #end
    #if(Inside)
      #debug "X"
    #else
      #debug " "
    #end
    #declare Real = Real + ((End - Start)/100);
  #end
  #debug "\n"
  #declare Imaginary = Imaginary - ((End - Start)/50);
#end


Post a reply to this message

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