Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => The 3D Mandelbulb => Topic started by: pupukuusikko on November 12, 2015, 06:19:20 PM




Title: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 12, 2015, 06:19:20 PM
Hello,

While tinkering with Tglad's formulas from thread http://www.fractalforums.com/the-3d-mandelbulb/2d-conformal-formula-suggestion/ ,
replacing x here and y there, I came upon an interesting variant which I'd call a mandelcup.
It is simpler than the originals, with just two complex operations:

Code:
void mandelcup(inout vec3 p) {
        // c1 and c2 are adjustable constants, with default values c1=0. c2=2.
vec2 z = complexDivision(p.xy,vec2(p.z,c1));
z = complexMult(z,z)*c2;
p=vec3(2.*z.x, 2.*z.y, dot(z,z)-1.)/(dot(z,z)+1.);
}

Because no insight was involved due to my lack of mathematical understanding, let's move straight to images.
Sideview from mandelbrot mode, notice the overall grailish shape  :beer:

(http://i.imgur.com/tinHYhY.jpg)


The top contains embedded mandelbrot, there's one in the bottom as well.

(http://i.imgur.com/DExnYGy.jpg)


At glance the julias seem disappointing, having rather featureless 2d julias at the ends of the tube,
with stretched bands in the middle.

(http://i.imgur.com/8rDjmuQ.jpg)


But wait, the tube is hollow, and it contains layers of beautiful 3d julias of the same theme :o

(http://i.imgur.com/UQHFVOC.jpg)

Attached is the fragmentarium .frag file with presets for the above images. Be careful with screen buffer size
in inside rendering, it can be quite slow.

Any comments, corrections or modifications of the formula would be greatly appreciated from the well educated folks around here.  :dink:





Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: 3dickulus on November 13, 2015, 04:09:46 AM
Beautiful! Nice work, I like the embedded mandelbrot and the "Grail" shape, may I include this in the Fragmentarium Experimental folder?


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: KRAFTWERK on November 13, 2015, 07:20:03 AM
WOW, love that last image. I like your layman approach too, kind of the same as mine...  O0


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: 3dickulus on November 13, 2015, 07:58:05 AM
Yikes! it is slow for the inside, maybe some of the larger math brains can help speed this up a bit.
@KRAFTWERK yours was using Mandelbulb 3D?

this pic is rendered with DE-Kn2, some nice structural features :)


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: DarkBeam on November 13, 2015, 11:25:19 AM
This is incredibly interesting. :beer:


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 13, 2015, 11:58:22 AM
Thanks everyone for your interest, it's nice to be able to contribute something here. :dink:

WOW, love that last image. I like your layman approach too, kind of the same as mine...  O0

I wish I had other approaches in my arsenal.. I have a bit more polished version of that scene in
http://pupukuusikko.deviantart.com/art/Towards-the-Light-571646559, check out also the new tetra works  :dink:

Yikes! it is slow for the inside, maybe some of the larger math brains can help speed this up a bit.
this pic is rendered with DE-Kn2, some nice structural features :)

Nice pic, although I find using more fog is useful for separating the foreground, otherwise inside renderers tend
to result a bit messy. Perhaps wait a bit on including this on the Fragmentarium package, maybe some improvements
will come up concerning inside DE or the formula. At the moment, play with number of iterations, detail and DE adjustment to
get acceptable speed in navigation.


This is incredibly interesting. :beer:

Thanks Luca, should not be impossible to code for MB3d? :D Maybe a bit later though,
there are issues of which constants are good for users, also some variations might come up.
 





Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: DarkBeam on November 13, 2015, 01:07:19 PM
More ideas?

Code:
void mandelcup(inout vec3 p) {
        // c1 and c2 are adjustable constants, with default values c1=0. c2=2.
vec2 z = complexDivision(p.xy,vec2(p.z,c1));
z = complexMult(z,z)*c2;
p=vec3(2.*z.x, 2.*z.y, dot(z,z)-1.)/(dot(z,z)+1.);
}

First idea that comes to mind; is c1 truly useful? :)
What variation pops out when you do this instead...
It is identical to your formula if c1 is still zero.

Code:
void mandelcup(inout vec3 p) {
        // c1 and c2 are adjustable constants, with default values c1=0. c2=2.
vec2 z = (p.xy / p.z);
z = complexMult(z,z)*c2;
        float mag1 = dot(z,z)-1.; float mag2 = mag1+2.;
        z.xy = complexDivision(z.xy,vec2(mag2,c1));
p=vec3(2.*z.x, 2.*z.y, mag1/mag2);
}


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 13, 2015, 06:14:55 PM
Quote
First idea that comes to mind; is c1 truly useful? :)

Yes it is, I use it to fatten the julia cups to make more room inside. ^-^

However, in your version, if we replace
Code:
//vec2 z = (p.xy / p.z);
vec2 z = (p.xy * p.z);

we get a different and at least as interesting fractal  :o

(http://i.imgur.com/E2a6wYf.jpg)
(http://i.imgur.com/Ob8IbDu.jpg)

Now, the only significant  flaw with both these variants is the stretching around the equator, seen
clearly in the previous julia pic, yet always present. Could something simple be done to alleviate that without
hitting the theoretical conformality limit? (Layman approach does not help here)




Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 13, 2015, 10:56:07 PM
Oh my Tglad, the brot insides are also navigable! :nerd:

(http://i.imgur.com/8rfpVwj.jpg)


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: mclarekin on November 13, 2015, 11:28:03 PM
Looks great.  Will try it soon O0 O0 O0


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: 3dickulus on November 14, 2015, 02:21:42 AM
I've done a few things like this with other peoples fragments but have never really published much more than pictures because of my "layman's" approach, thinking the real mathematicians would probably get a chuckle out of my silly little hacks.
@pupukuusikko I find this very encouraging and may include a few more things in the Experimental folder ;)
Once this gets polished a bit I would be happy to include it too.
hmmm... the "other" side of mandelbrot and julia sets :)


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: quaz0r on November 14, 2015, 03:53:32 AM
Because no insight was involved

 ;D  :D  ;D  :beer:

really nice!

it looks like a magnificent glass bowl for a bong  :angel1:
should name it "mandelbowl" instead


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 14, 2015, 05:10:35 PM
Thanks quazor and mclarekin for support.   ^-^

I've done a few things like this with other peoples fragments but have never really published much more than pictures because of my "layman's" approach, thinking the real mathematicians would probably get a chuckle out of my silly little hacks.
@pupukuusikko I find this very encouraging and may include a few more things in the Experimental folder ;)

Nice that you find my example therapeutic. I think there is a well established tradition in fractal community on
more or less random tinkering, seldom punctuated by mathematicians bringing something totally new to table.

Luca, here's the current version with some added variation and c1 moved to a more interesting role.
If you could serve this to the mb3d community, I'd be a happy camper. :yes:

Code:
void mandelcup(inout vec3 p) {
        // c1 and c2 are adjustable constants, with default values c1=0. c2=2.

        // squaring z appears to increase conformality and adds intesting
        // variations on outside julias
        if (squareZ)
                p.z*=p.z;

        // c1 can be used to modify the overall shape in nice ways and
        //  turn surface to aestethically pleasing quarternion-like smoothnes
        p.z+=c1;

        vec2 z;
        // inversion here produces another nice fractal with similar properties
        if (multiply)
                z = p.xy * p.z;
        else
                z = p.xy/p.z;

        z = complexMult(z,z)*c2;
        float mag1 = dot(z,z)-1.; float mag2 = mag1+2.;
        z.xy = complexDivision(z.xy,(vec2(mag2,0.)));
        p=vec3(2.*z.x, 2.*z.y, mag1/mag2);
}
 


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: matsoljare on November 15, 2015, 12:43:14 AM
But will you color it red for Christmas?


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 15, 2015, 07:43:41 AM
But will you color it red for Christmas?

Nah, I will paint it in gold and send it to fine folks in FIFA as a christmas present.


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 15, 2015, 01:43:28 PM
(Had various 'Daddy! Look!' ramblings about burning ship, will get back to it after more thought)


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: KRAFTWERK on November 16, 2015, 10:03:47 AM

@KRAFTWERK yours was using Mandelbulb 3D?



I havn't posted any images of this...


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: 3dickulus on November 16, 2015, 03:32:23 PM
was referring to bulb interior view, not this specific bit of code


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: Dinkydau on November 17, 2015, 08:32:18 PM
Yikes! it is slow for the inside, maybe some of the larger math brains can help speed this up a bit.
@KRAFTWERK yours was using Mandelbulb 3D?

this pic is rendered with DE-Kn2, some nice structural features :)
That looks incredible.


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: KRAFTWERK on November 17, 2015, 08:35:37 PM
was referring to bulb interior view, not this specific bit of code

All right! Yes, I am using Mandelbulb 3D for that! And it is also slow :)


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: pupukuusikko on November 17, 2015, 08:57:30 PM
I noticed there is no need for complex division in the formula, so the projection part reduces to
Code:
void mandelcup(inout vec3 p) {

vec2 z = p.xy/p.z; // or (p.z*p.z+1) for  more conformal
z = complexMult(z,z)*c2;
p=vec3(2.*z.x, 2.*z.y, dot(z,z)-1.)/(dot(z,z)+1.);
}



which looks like normal 2d-mandelbrot formula in stereographic projection... :hmh:

Now it seems prudent to doubt the originality of my method, considering the simplicity of the formula,
my noobiness, and the effort put into the search of 3d mandelbrot.
Can anyone with experience comment on this? Have you been here before?





Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: 3dickulus on November 18, 2015, 02:30:43 AM
The path of discovery is, in itself, fractal by nature. (imho)

If you have learned something you didn't know before, even if it is only about the character of the mandelbrot formula and not a "new" method, then the journey was worth it and will continue...

On my Amiga I spent a lot of time fiddling with variants in C code but found that the assembler language output was always very similar, mostly because the good folks that put together the compiler did a fantastic job of optimization and my optimizations in C were virtually redundant. None the less, I learned stuff and there in lies the joy :D

hmmm... mandel-zen


Title: Re: A new 3d mandelbrot variant - Mandelcup
Post by: Max Sinister on June 01, 2016, 09:51:14 PM
Some of these pictures remind me of cakes :)