POV-Ray : Newsgroups : povray.binaries.images : The Cubic Mandelbrot [23 kb] Server Time
18 Nov 2024 20:28:22 EST (-0500)
  The Cubic Mandelbrot [23 kb] (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Orchid XP v2
Subject: The Cubic Mandelbrot [23 kb]
Date: 14 Jun 2005 16:27:10
Message: <42af3d9e@news.povray.org>
Hi peeps.

Remember this? (Yeah, it's only a short render.)

Anyway, somebody wanted the code...

// Just useful.
#declare ReMul = function (Xr, Xi, Yr, Yi) {Xr * Yr - Xi * Yi};
#declare ImMul = function (Xr, Xi, Yr, Yi) {Xr * Yi + Xi * Yr};

#declare Re2 = function (Zr, Zi) {  Zr*Zr - Zi*Zi};
#declare Im2 = function (Zr, Zi) {2*Zr*Zi};

#declare Re3 = function (Zr, Zi) {  Zr*Zr*Zr - 3*Zr*Zi*Zi};
#declare Im3 = function (Zr, Zi) {3*Zr*Zr*Zi -   Zi*Zi*Zi};

// Change if you like...
#declare End = function (Zr, Zi) {Zr*Zr + Zi*Zi};

// Build recursive definition...
#declare Fn = array[8];

#declare Fn[0] = function (Zr, Zi, Tr, Ti, Br, Bi) {End(Zr, Zi)};

#declare lp=1;
#while (lp<8)
   #declare Fn[lp] = function (Zr, Zi, Tr, Ti, Br, Bi)
   {
     Fn[lp-1]
     (
       Re3(Zr, Zi) - ReMul(Zr, Zi, Tr, Ti) + Br,
       Im3(Zr, Zi) - ImMul(Zr, Zi, Tr, Ti) + Bi,
       Tr, Ti, Br, Bi
     )
   };

   #declare lp = lp + 1;
#end
#undef lp

// Change this at will... (Must be < 8 tho.)
#declare Iterations = 2;

// Don't touch...
#declare InitP = function (Ar, Ai, Br, Bi) {Fn[Iterations](+Ar, +Ai, 
3*Re2(Ar, Ai), 3*Im2(Ar, Ai), Br, Bi)};
#declare InitM = function (Ar, Ai, Br, Bi) {Fn[Iterations](-Ar, -Ai, 
3*Re2(Ar, Ai), 3*Im2(Ar, Ai), Br, Bi)};

// Now draw something!!
camera
{
   location <0, 0, -4.5>
   look_at <0, 0, 0>
}

light_source {<-2, +3, -5>, colour rgb <1.0, 0.0, 1.0>}
light_source {<+2, -3, -5>, colour rgb <0.0, 1.0, 0.0>}

object
{
   isosurface
   {
     function {min(InitP(z, 0, x, y) - 4, 10)} // M+ set, A = (z, 0), B 
= (x, y).
     contained_by {box {-2, +2}}
     max_gradient exp(7)
   }
   texture
   {
     pigment {colour rgb 1}
     finish {ambient 0  specular 0.5}
   }
}

Top tip: Take out the max() function and watch the render drop from 350 
pixels/second to 50 pixels/second. :-)

As-is, renders the attached image. Took 4 minutes on my shiny new AMD64 
machine - but running in 32-bit mode. :-( The part you'll want to change 
is the isosurface function; if you change that 0 to some other figure, 
interesting things can happen. (Maybe you even wanna animate it?) 
Alternatively, change to InitP(x, y, z, 0) to swap the hyperplanes 
round. (Remember, you're drawing a 3D slice of a 4D shape!)

Also, InitP() draws the M+ set. The *Mandelbrot* set is the intersection 
of the M+ set and the M- set. (Use InitM() for M-.) It can be most 
interesting to draw both sets at once. Use a different pigment for each 
isosurface - and it looks best with x, y, z, 0 rather than z, 0, x, y.

Also of interest: slice the isosurface and stick a matching 2D plot on 
the cross-section! (I will do this later if I figure out pigment 
functions...)


Post a reply to this message


Attachments:
Download 'cubic2.png' (23 KB)

Preview of image 'cubic2.png'
cubic2.png


 

From: Orchid XP v2
Subject: Re: The Cubic Mandelbrot [23 kb]
Date: 14 Jun 2005 16:31:32
Message: <42af3ea4$1@news.povray.org>
> Top tip: Take out the max() function and watch the render drop from 350 
> pixels/second to 50 pixels/second. :-)

Uh... yeah... forgot to mention. The *reason* is that without max(), you 
have to set max_gradient exp(17) to get a picture. :-| But with max() in 
there, you can set it very much lower and it renders correctly.


Change #declare Iterations = 2; to something else to make the surface 
more complicated. (And slower to render!) You may need to increase the 
max_gradient a notch also; let it render and see if it's OK.


Post a reply to this message

From: Ross
Subject: Re: The Cubic Mandelbrot [23 kb]
Date: 14 Jun 2005 18:01:56
Message: <42af53d4$1@news.povray.org>
"Orchid XP v2" <voi### [at] devnull> wrote in message
news:42af3d9e@news.povray.org...
> Hi peeps.
>
> Remember this? (Yeah, it's only a short render.)
>
> Anyway, somebody wanted the code...
>

weird. FWIW, it looks like a sculpture of the rear end of an animal, lying
on it's side. not that i've seen any sculptures of rear ends of animals
lying on their sides.


Post a reply to this message

From: Mike Williams
Subject: Re: The Cubic Mandelbrot [23 kb]
Date: 15 Jun 2005 06:04:59
Message: <IpKe0AA50$rCFwZp@econym.demon.co.uk>
Wasn't it Orchid XP v2 who wrote:
>> Top tip: Take out the max() function and watch the render drop from 350 
>> pixels/second to 50 pixels/second. :-)
>
>Uh... yeah... forgot to mention. The *reason* is that without max(), you 
>have to set max_gradient exp(17) to get a picture. :-| But with max() in 
>there, you can set it very much lower and it renders correctly.

I couldn't find a max() function in the code you posted.

Is it possible that you posted the version with the max() already
removed, so that it we knew where to put it back it would run much
faster? Or did you mean to say "min()" rather than "max()"?

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Mike Raiford
Subject: Re: The Cubic Mandelbrot [23 kb]
Date: 15 Jun 2005 07:57:37
Message: <42b017b1$1@news.povray.org>
Ross wrote:

> weird. FWIW, it looks like a sculpture of the rear end of an animal, lying
> on it's side. not that i've seen any sculptures of rear ends of animals
> lying on their sides.

At first glance, it didn't look much like anything but what it was 
described as, but now that you mention it.. He should put some zebra 
stripes on that thing..

-- 
~Mike

Things! Billions of them!


Post a reply to this message

From: Stephen McAvoy
Subject: Re: The Cubic Mandelbrot [23 kb]
Date: 15 Jun 2005 09:58:24
Message: <2vc0b1pmhj7b82kv1alk9b7795nu7dj3lp@4ax.com>
On Tue, 14 Jun 2005 21:27:00 +0100, Orchid XP v2 <voi### [at] devnull>
wrote:

>Anyway, somebody wanted the code...

Thanks Andrew, I'll look at the code and use it as a starting point
and at Mike's

Regards
        Stephen


Post a reply to this message

From: Orchid XP v2
Subject: Re: The Cubic Mandelbrot [23 kb]
Date: 15 Jun 2005 15:43:00
Message: <42b084c4@news.povray.org>
> I couldn't find a max() function in the code you posted.

*slaps head*

min()...


Post a reply to this message

From: Stephen McAvoy
Subject: Re: The Cubic Mandelbrot [23 kb] - Sumobrot.png
Date: 27 Jun 2005 16:45:30
Message: <95p0c11m5asbk2eji2hd0erh5umb56b7aj@4ax.com>
On Tue, 14 Jun 2005 21:27:00 +0100, Orchid XP v2 <voi### [at] devnull>
wrote:

>Hi peeps.
>
>Remember this? (Yeah, it's only a short render.)
>
>Anyway, somebody wanted the code...

I wanted to modify it to the basic Mandelbrot so I could try and find
the Buddhabrot. No luck as I can't code to save myself. I did come up
with this though and I quite like it. I think I'll call it the
Sumobrot. I used Mike's modification to create 3 df3's and played
about with emitting media. Let your eyes go slightly out of focus.


Regards
        Stephen


Post a reply to this message


Attachments:
Download 'Sumobrot.png' (201 KB)

Preview of image 'Sumobrot.png'
Sumobrot.png


 

From: Dave Matthews
Subject: Re: The Cubic Mandelbrot [23 kb] - Sumobrot.png
Date: 29 Jun 2005 17:05:01
Message: <web.42c30c2f6612b41a8c7259570@news.povray.org>
Stephen McAvoy <mca### [at] aolcom> wrote:
>>I used Mike's modification to create 3 df3's and played
>>about with emitting media.

Wow.  Miss a few days, miss a lot.  I'm searching but not finding examples
of "Mike's modification" or "df3s" and I really want to figure this out!

So, please help.  Source perhaps?  Or of your less out-of-focus version
below?  I haven't puzzled out df3's yet.  Maybe this example would soak in.

Thanks

(Really cool by the way, yours and Andrew's and as always, Mike's)

Dave Matthews


Post a reply to this message

From: Stephen McAvoy
Subject: Re: The Cubic Mandelbrot [23 kb] - Sumobrot.png
Date: 29 Jun 2005 18:41:45
Message: <to86c1t4alun9i77rdu21e8t2jkm3lghv7@4ax.com>
On Wed, 29 Jun 2005 17:01:35 EDT, "Dave Matthews"
<dma### [at] wrmnwestmnscuedu> wrote:

>
>Wow.  Miss a few days, miss a lot.  I'm searching but not finding examples
>of "Mike's modification" or "df3s" and I really want to figure this out!

Mikes Modification (sounds important like Tim's error in fractint) was
to use Andrews's formula and use it as a pigment.

>So, please help.  Source perhaps?  Or of your less out-of-focus version
>below?  I haven't puzzled out df3's yet.  Maybe this example would soak in.
>
Of course! It is a three step process.
I added a variable to the formula and created an animation. Then using
tga2df3 I created a df3. The less out of focus image had more tga
images. 120 in the one you asked about. Mikes Modification uses a
three colour, colour map. So I modified that and produced three
monochrome df3's, Red, Yellow and Blue. This took 4 and a half hours
on my Laptop the df3's are 84 Megs.
The POV file to generate the image was made in Moray so the coordinate
system is not the same as in POV and there are INC and INI files. I
have found that there are 4 interesting positions for the camera and
they are symmetrical about the origin. 
BTW using a sphere instead of a box produces in interesting image but
I've not found anything worth posting.

I'll post the source in Povray.biniaries.misc as a zip file shortly.


>
>(Really cool by the way, yours and Andrew's and as always, Mike's)

Thank you, I'm flattered.


Regards
        Stephen


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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