|
|
"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
|
|