POV-Ray : Newsgroups : povray.general : Mandelbrot page : Re: Mandelbrot page Server Time
8 Aug 2024 14:20:34 EDT (-0400)
  Re: Mandelbrot page  
From: Tom Melly
Date: 24 Jan 2001 10:57:29
Message: <3a6efb69@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3a6eeefc@news.povray.org...
> Tom Melly <tom### [at] tomandlucouk> wrote:
> : Doh! Many thanks - fixed it now.
>
> :             #declare TReal = ((TReal * TReal) - (TImaginary *
TImaginary));
> :             #declare TImaginary = (2 * T2Real * TImaginary);
> :             #if(((TReal * TReal) + (TImaginary * TImaginary)) > 4)
>                  ...
> :             #end
> :             #declare TReal = TReal + Real;
> :             #declare TImaginary = TImaginary + Imaginary;
>
>   You are here actually calculating first Z=Z^2, then looking if |Z| > 2
> and then calculating Z=Z+c.
>   Now, this is interesting. Does this work? In theory you should calculate
> Z=Z^2+c first and then see if |Z| > 2.
>

Hmm, well it seems to work - if you run the code in POV it produces what
appears to be a Mandelbrot in ascii wherever debug is ending up.

Swapping them around to:

             #declare TReal = ((TReal * TReal) - (TImaginary * TImaginary));
             #declare TImaginary = (2 * T2Real * TImaginary);
             #declare TReal = TReal + Real;
             #declare TImaginary = TImaginary + Imaginary;
             #if(((TReal * TReal) + (TImaginary * TImaginary)) > 4)
                ...
             #end

seems to produce the exact same pattern - still, at this resolution who
knows? ... ;).

Thinking about it, it's not that surprising. A tendancy towards infinity
will show up in either case - presumably, my Mandelbrot outline has some
differences from having deferred the re-addition of the original real and
imaginary number, but you'd need much higher res. to see it.

Wee! - I love Mandelbrots. Why? Firstly, you can make them with schoolboy
maths. Secondly, imaginary numbers that turn into real numbers when you
square them are funny.


Post a reply to this message

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