POV-Ray : Newsgroups : povray.general : Mandelbrot page Server Time
16 Oct 2026 00:23:21 EDT (-0400)
  Mandelbrot page (Message 1 to 26 of 26)  
From: Warp
Subject: Mandelbrot page
Date: 23 Jan 2001 12:01:51
Message: <3a6db8fe@news.povray.org>
I made a page explaining a bit the Mandelbrot set:
http://iki.fi/warp/Mandelbrot/

  Perhaps I should put a link to it in the povVFAQ?

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Tom Melly
Subject: Re: Mandelbrot page
Date: 23 Jan 2001 12:32:27
Message: <3a6dc02b$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3a6db8fe@news.povray.org...
>   I made a page explaining a bit the Mandelbrot set:
> http://iki.fi/warp/Mandelbrot/
>
>   Perhaps I should put a link to it in the povVFAQ?
>

Nice - now how about the idiots version?


Post a reply to this message

From: Christoph Hormann
Subject: Re: Mandelbrot page
Date: 23 Jan 2001 12:45:37
Message: <3A6DC341.8BDE1935@gmx.de>
Warp wrote:
> 
>   I made a page explaining a bit the Mandelbrot set:
> http://iki.fi/warp/Mandelbrot/
> 
>   Perhaps I should put a link to it in the povVFAQ?
> 

Looks good, i did not yet have time to read it, but the background color
of the code is disgusting :-)

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: David Fontaine
Subject: Re: Mandelbrot page
Date: 23 Jan 2001 21:24:10
Message: <3A6E3CCF.AE0A1909@faricy.net>
Warp wrote:

>   I made a page explaining a bit the Mandelbrot set:
> http://iki.fi/warp/Mandelbrot/

Too late, I gave my extra credit presentation for calculus (on fractals,
specifically julia sets) yesterday. ;)

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Tom Melly
Subject: Re: Mandelbrot page
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

From: Warp
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 06:56:26
Message: <3a6ec2ea@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
:       #declare TReal = (TReal * TReal) - (TImaginary * TImaginary);
:       #declare TImaginary = 2 * TTReal * TImaginary;

  You are making Z=Z^2 here, not Z=Z^2+c.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Warp
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 06:56:59
Message: <3a6ec30a@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
: Looks good, i did not yet have time to read it, but the background color
: of the code is disgusting :-)

  Thanks :)

  (Any better suggestion?)

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Sander Stols
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 07:35:33
Message: <MPG.14d8ea60150a4e459896d5@NEWS.POVRAY.ORG>
In article <3a6db8fe@news.povray.org>, war### [at] tagpovrayorg says...
>   I made a page explaining a bit the Mandelbrot set:
> http://iki.fi/warp/Mandelbrot/
> 
>   Perhaps I should put a link to it in the povVFAQ?
> 
I was wondering whether the inner part of what you call the Mandelbrot 
set /is/ part of the set. Isn't the Mandelbrot set just an infinitely 
large set of points forming an infinitely large (continuous?) line; the 
outline as it were? So anything outside or inside this set of points (or 
line of infinite length) would not be part of it?

-- 
Regards,  Sander


Post a reply to this message

From: Tom Melly
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 08:39:08
Message: <3a6edafc$1@news.povray.org>
"Sander Stols" <san### [at] stolscom> wrote in message
news:MPG### [at] NEWSPOVRAYORG...

> I was wondering whether the inner part of what you call the Mandelbrot
> set /is/ part of the set. Isn't the Mandelbrot set just an infinitely
> large set of points forming an infinitely large (continuous?) line; the
> outline as it were? So anything outside or inside this set of points (or
> line of infinite length) would not be part of it?
>
> --
> Regards,  Sander

IMHO, no. Each point is either inside or outside the set. The boundary has
no special significance in that sense. The only point about the boundary is
that it represents the area of least certainty - you can never be sure if,
with one more iteration, a point might suddenly turn out to be outside the
set.


Post a reply to this message

From: Tom Melly
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 09:07:48
Message: <3a6ee1b4$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3a6ec2ea@news.povray.org...
>
>   You are making Z=Z^2 here, not Z=Z^2+c.
>

Doh! Many thanks - fixed it now.

The final code is:
#declare XStart = -1.5;

#declare XEnd = 5;

#declare YStart = -3/2;

#declare YEnd = 5;

#declare Iterations = 50;

#declare Imaginary = -YStart;

#while(Imaginary >= -YEnd)

    #declare Real = XStart;

    #while(Real <= XEnd)

        #declare Inside = true;

        #declare TReal = Real;

        #declare TImaginary = Imaginary;

        #declare Counter = 1;

        #while(Counter <= Iterations)

            #declare T2Real = TReal;

            #declare TReal = ((TReal * TReal) - (TImaginary * TImaginary));

            #declare TImaginary = (2 * T2Real * TImaginary);

            #if(((TReal * TReal) + (TImaginary * TImaginary)) > 4)

                #declare Inside = false;

                #declare Counter = Iterations;

            #end

            #declare TReal = TReal + Real;

            #declare TImaginary = TImaginary + Imaginary;

            #declare Counter = Counter + 1;

        #end

        #if(Inside)

            #debug "X"

        #else

            #debug " "

        #end

        #declare Real = Real + ((XEnd - XStart)/130);

    #end

    #debug "\n"

    #declare Imaginary = Imaginary - ((YEnd - YStart)/80);

#end


Post a reply to this message

From: Sander Stols
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 09:22:23
Message: <MPG.14d902e6781f60259896d6@NEWS.POVRAY.ORG>
In article <3a6edafc$1@news.povray.org>, tom### [at] tomandlucouk says...
> IMHO, no. Each point is either inside or outside the set. The boundary has
> no special significance in that sense. The only point about the boundary is
> that it represents the area of least certainty - you can never be sure if,
> with one more iteration, a point might suddenly turn out to be outside the
> set.
Hm, it seems I will have to read more about this subject. The only 
somewhat thorough and also difficult book I have is the one by Peitgen 
and Richter :-))
-- 
Regards,  Sander


Post a reply to this message

From: Warp
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 10:04:28
Message: <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.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Warp
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 10:07:06
Message: <3a6eef9a@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
: IMHO, no.

  Remove that "IMHO" because you are right.
  Every point painted in "black" is part of the set. The set is defined as
each complex number that fullfills the formula. All the points painted in
black fullfill the formula, thus they belong to the set.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Fabien Mosen
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 10:09:18
Message: <3A6EEFCA.EC43FA89@skynet.be>
BTW, why not use the complex numbers feature in MegaPOV ?

Fabien.


Post a reply to this message

From: Warp
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 10:12:16
Message: <3a6ef0d0@news.povray.org>
Fabien Mosen <fab### [at] skynetbe> wrote:
: BTW, why not use the complex numbers feature in MegaPOV ?

  Why not, indeed.
  If the programming language used supports directly complex numbers, then
the code can be simplified a bit.

  For an example, see:
http://iki.fi/warp/MandScripts/matlab.html

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 10:29:15
Message: <3A6EF35E.3E2188EA@my-dejanews.com>
I think the pov code for making Mandel patterns is very cool, I like doing
multiple-OoM zooms on it.

Q's:
1. Can you zoom on that ASCII code?

2. Programs like Tierazon are really cool in that they let you plug in your
own equations.  How close is Tom's code to making one's own *pattern*  for
one's own original complex math?


Post a reply to this message

From: Warp
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 10:41:56
Message: <3a6ef7c4@news.povray.org>
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
: How close is Tom's code to making one's own *pattern*  for
: one's own original complex math?

  Megapov supports function patterns which you can use to create your
own patterns.
  However, Mandelbrot-type patterns are not possible with the current
implementation since the functions don't support variables nor loops.
  Making a Mandelbrot pattern with a pattern function would require something
like this:

#declare Mandel =
  function
  { Zr=x; Zi=y; n=0;
    while(n<=30 & sqr(Zr)+sqr(Zi)<4)
    { Zi2=sqr(Zi);
      Zi=2*Zr*Zi+x;
      Zr=sqr(Zr)-Zi2+y;
    }
    n/30
  }

  Until functions support variables and while-loops we are out of luck.

  Perhaps shaders are the answer?

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Tom Melly
Subject: Re: Mandelbrot page
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

From: Tom Melly
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 11:14:46
Message: <3a6eff76$1@news.povray.org>
"Greg M. Johnson" <gre### [at] my-dejanewscom> wrote in message
news:3A6EF35E.3E2188EA@my-dejanews.com...
> I think the pov code for making Mandel patterns is very cool, I like doing
> multiple-OoM zooms on it.
>
> Q's:
> 1. Can you zoom on that ASCII code?
>

Yes, try changing the opening params to:

#declare XStart = -1.5;
#declare XEnd = -1;
#declare YStart = 0;
#declare YEnd = 0.5;

Also, with my error, at this resolution the mandel is not so good, so change
the code I posted from:

      #declare TReal = TReal + Real;
      #declare TImaginary = TImaginary + Imaginary;
      #if(((TReal * TReal) + (TImaginary * TImaginary)) > 4)
        #declare Inside = false;
        #declare Counter = Iterations;
      #end
      #declare TReal = TReal + Real;
      #declare TImaginary = TImaginary + Imaginary;
      #declare Counter = Counter + 1;


to:

      #declare TReal = TReal + Real;
      #declare TImaginary = TImaginary + Imaginary;
      #declare TReal = TReal + Real;
      #declare TImaginary = TImaginary + Imaginary;
      #if(((TReal * TReal) + (TImaginary * TImaginary)) > 4)
        #declare Inside = false;
        #declare Counter = Iterations;
      #end
      #declare Counter = Counter + 1;


Post a reply to this message

From: Tom Melly
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 11:23:29
Message: <3a6f0181$1@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3a6eff76$1@news.povray.org...

> Also, with my error, at this resolution the mandel is not so good, so
change

Oops - make that

from:
      #declare TReal = ((TReal * TReal) - (TImaginary * TImaginary));
      #declare TImaginary = (2 * T2Real * TImaginary);
      #if(((TReal * TReal) + (TImaginary * TImaginary)) > 4)
        #declare Inside = false;
        #declare Counter = Iterations;
      #end
      #declare TReal = TReal + Real;
      #declare TImaginary = TImaginary + Imaginary;
      #declare Counter = Counter + 1;

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)
        #declare Inside = false;
        #declare Counter = Iterations;
      #end
      #declare Counter = Counter + 1;


Post a reply to this message

From: Warp
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 14:21:09
Message: <3a6f2b24@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
: seems to produce the exact same pattern - still, at this resolution who
: knows? ... ;).

  I suppose that the difference would probably be seen in the exterior
coloring if you color according to number of iterations until bailout
(ie. as usual).
  Since you are not examining whether |Z|>2 but instead |Z^2|>2 it probably
has a drastical effect in the exterior coloring.
  I wouldn't be suprised if the fractal itself was a bit deformed because
of this (mainly because your bailout value of 2 might be too low in this
case). Anyways, I would say that to be sure, make Z=Z^2+c first and then
compare.

: Thinking about it, it's not that surprising. A tendancy towards infinity
: will show up in either case

  Right, but I'm only worried about the bailout value. If you used a larger
value (presumably 4^2 = 8) then there may not be any problem (except perhaps
a different exterior coloring).

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Tom Melly
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 14:50:02
Message: <3a6f31ea@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3a6f2b24@news.povray.org...

<SNIP>

As you may have gathered I zoomed in using the both the correct and
incorrect code and saw distinct differences. The incorrect one also looked
less complex, but I wouldn't swear on that.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 16:32:17
Message: <3A6F4879.5C25F445@my-dejanews.com>
Warp wrote:
:    n/30
What exactly was this doing at the bottom--does it close the while next loop

:Perhaps shaders are the answer?
Did I forget to RFTM, or doesn't povray lack these?

> char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
> main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
> c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/

Could we have the povray-screen-language- compilable version of this?


Post a reply to this message

From: Christoph Hormann
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 16:33:42
Message: <3A6F4A32.A7701E3C@gmx.de>
How about:

#FFDDCC
#FFCF66

or something similar.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Alan Kong
Subject: Re: Mandelbrot page
Date: 24 Jan 2001 20:00:27
Message: <1guu6t0c9jnosm9lt9jpdsblej5rh45jcl@4ax.com>
On Wed, 24 Jan 2001 16:26:17 -0500 Greg M. Johnson wrote:

>:Perhaps shaders are the answer?
>Did I forget to RFTM, or doesn't povray lack these?

  Hi, Greg. There's an unofficial version called POVMan, written by
Vahur Krouverk that supports Renderman-like shaders at:

http://www.aetec.ee/fv/vkhomep.nsf/pages/povman2

-- 
Alan - ako### [at] povrayorg - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer


Post a reply to this message

From: Warp
Subject: Re: Mandelbrot page
Date: 25 Jan 2001 06:06:32
Message: <3a7008b7@news.povray.org>
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
: :    n/30
: What exactly was this doing at the bottom--does it close the while next loop

  That's the result of the function. I mean, it's the function itself.
That is, as if we just had wrote:

#declare Mandel = function { n/30 }

  Everything before that is just precalculation that is not part of the
function itself.

: Could we have the povray-screen-language- compilable version of this?

  Perhaps if I have the time and motivation to "port" it to povray :)

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

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