Logo by AGUS - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. March 29, 2024, 08:51:37 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1] 2   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Please try this... new 3d mandelbrot formula, animations included  (Read 11270 times)
0 Members and 1 Guest are viewing this topic.
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« on: January 23, 2013, 06:31:52 AM »

I think I found something interesting... I read the original post with implementation details, and the optimized formula on this site a few years back. 

Recently though, I've been obsessed with reading about physics, quantum electrodynamics specifically.  The way Richard Feynman describes the handling of "probability amplitudes" in quantum mechanics reminded me of the 3d mandelbrot problem, so I put 2 and 2 together and got this.  I've been rendering in a pretty slow engine (mathematica), so I'd be grateful if someone can try this in a faster pan/zoomable renderer.

I'll explain the derivation later if anyone is interested, but here's something i'm working on in C# which generated the scans in these links:
<a href="https://www.youtube.com/v/Bv3YePo9kvw&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/Bv3YePo9kvw&rel=1&fs=1&hd=1</a>
<a href="https://www.youtube.com/v/Ygr0yE-ht7k&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/Ygr0yE-ht7k&rel=1&fs=1&hd=1</a>
<a href="https://www.youtube.com/v/KxFhVMsWb34&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/KxFhVMsWb34&rel=1&fs=1&hd=1</a>

        static public double DoFractal(double x, double y, double z, int maxiters)
        {
            var iters = 0;
            var cx = x;
            var cy = y;
            var cz = z;
            while (iters < maxiters && Math.Abs(x * x + y * y + z * z) < 4)
            {
                ShrinkAndTurn(ref x, ref y, ref z, cx, cy, cz);
                iters++;
            }
            return iters;
        }

        static public void ShrinkAndTurn(ref double x, ref double y, ref double z, double cx, double cy, double cz)
        {
            double theta, phi;
            if (x == 0 && y == 0)
                theta = 0;
            else
                theta = 2* Math.Acos(x / Math.Sqrt(Math.Abs(y) * Math.Abs(y) + Math.Abs(x) * Math.Abs(x)));
            if (x == 0 && z == 0)
                phi = 0;
            else
                phi = 2* Math.Acos(x / Math.Sqrt(Math.Abs(z) * Math.Abs(z) + Math.Abs(x) * Math.Abs(x)));
            var mag = (y * y + z * z + x * x);
            x = cx + mag * Math.Cos(y < 0 ? -theta : theta) * Math.Cos(z <= 0 ? phi : -phi);
            y = cy + mag * Math.Sin(y < 0 ? -theta : theta);
            z = cz - mag * Math.Cos(y < 0 ? -theta : theta) * Math.Sin(z <= 0 ? phi : -phi);
        }
Logged
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #1 on: January 23, 2013, 08:02:17 AM »

Here's the mathematica render, 200x200x200 points.


* 3d.png (178.03 KB, 688x582 - viewed 502 times.)
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #2 on: January 23, 2013, 08:03:39 AM »

hi there, the animations seem to "jump" at the end, would love to see this object in 3d wink

according to your animations you have mandelbrot shapes on imaginary and secondimaginary axis ?

Logged

---

divide and conquer - iterate and rule - chaos is No random!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #3 on: January 23, 2013, 08:05:24 AM »

nice!!!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #4 on: January 23, 2013, 08:06:52 AM »

regarding the jump at the end, it's the resolution I'm rendering at... 500 pixels doesn't capture how quickly they change close to the axis.  I have rendered a much smaller slice, and it looks better.

and yes, it does show a 2d mandelbrot on the imaginary and 3rd axis.
« Last Edit: January 23, 2013, 08:08:32 AM by Fred Decker » Logged
eiffie
Guest
« Reply #5 on: January 24, 2013, 06:05:28 PM »

I have a habit of posting questionable code off the top of my head, but here is a distance estimate for Fragmentarium smiley
Code:
float DE(in vec3 z0){
vec4 z=vec4(z0,1.0),c=z;
float r=length(z.xyz);
for(int i=0;i<Iterations && r<2.0;i++){
float theta=Power*acos(z.x/length(z.xy))*sign(z.y);
float phi=Power*acos(z.x/length(z.xz))*sign(z.z);
z=pow(r,Power-1.0)*vec4(r*vec3(cos(theta)*cos(phi),sin(theta),-cos(theta)*sin(phi)),Power*z.w)+c;
r=length(z.xyz);
}
return 0.5*log(r)*r/z.w;
}

Fragmentarium will display your formulas in under a second. Give it a try if you have time.
Logged
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #6 on: January 24, 2013, 06:54:25 PM »

I have a habit of posting questionable code off the top of my head, but here is a distance estimate for Fragmentarium smiley

thanks a lot! this is exactly what i was looking for... will try it tonight.  I started playing around with Fragmentarium, but I haven't quite got my head around the concept of distance estimation yet.  this looks like a good starting point at least.
Logged
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #7 on: January 25, 2013, 05:32:01 AM »

Using below (a small correction from eiffie's snippet)
Code:
float DE(in vec3 z0)
{
vec4 z=vec4(z0,1.0);
vec4 c=z;
float r=length(z.xyz);
for(int i=0;i<Iterations && r<Bailout;i++)
{
float theta =2.0*acos(z.x/length(z.xy))*sign(z.y);
float phi = -2.0*acos(z.x/length(z.xz))*sign(z.z);
z=r*vec4(r*vec3(cos(theta)*cos(phi),sin(theta),-cos(theta)*sin(phi)),2.0*z.w)+c;
r=length(z.xyz);
}
return 0.5*log(r)*r/z.w;
}

But why do I need to use vec4 instead of vec3?  What is the w axis for?  Any tips on improving detail on rendering?


* fragmentarium2-4.jpg (190.97 KB, 930x746 - viewed 437 times.)
Logged
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #8 on: January 25, 2013, 05:34:50 AM »

another showing more detail on the small bulb side


* fragmentarium2-7.jpg (198.73 KB, 758x746 - viewed 627 times.)
Logged
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #9 on: January 25, 2013, 05:35:39 AM »

and more detail from behind


* fragmentarium2-9.jpg (181.66 KB, 566x557 - viewed 441 times.)
Logged
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #10 on: January 25, 2013, 06:29:25 AM »

last one... the main stalk


* fragmentarium2-15-smaller.jpg (228.09 KB, 948x658 - viewed 498 times.)
Logged
Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #11 on: January 25, 2013, 03:25:55 PM »

Last one is good. Previous have certain sand effect. Maybe too thin structures or discontiniuaties.
Logged

fractal catalisator
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #12 on: January 25, 2013, 03:37:26 PM »

The "sand" problem is one thing I wanted to get a better understanding of... I know for sure there are very fine structures that are not showing up in these views.  Is there a way to improve this?  Or do I need to go to a different renderer?  I see people talking about other non-DE renderers, indigo, POV, etc.  Would these be better suited for what I'm trying to do?
Logged
eiffie
Guest
« Reply #13 on: January 25, 2013, 05:54:37 PM »

Fragmentarium also does DE-less rendering but the .frag file is not included in the release yet - you have to get it yourself. (github??)

The vec4 is only a shortcut. You can use a vec3 and create another variable typically called "dr". It is a running derivative calculated like this...
dr=dr*(derivative of your function)+1

You will get higher detail by lowering the "detail" slider - but you also get more sand. Just run the continuous mode longer smiley
« Last Edit: January 25, 2013, 05:56:43 PM by eiffie » Logged
Fred Decker
Forums Freshman
**
Posts: 11


fred.decker
« Reply #14 on: January 25, 2013, 06:24:26 PM »

Good to know... thanks again!  I didn't understand the continuous mode before, but I did notice the added sand with the change in "detail" control.  Will try again tonight.
Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
3D Mandelbrot Set Phase Shift Animations Videos bugman 4 10057 Last post January 30, 2010, 08:24:06 PM
by Nahee_Enterprises
New 3D Mandelbrot formula ( Orangeman ) The 3D Mandelbulb bkercso 7 10866 Last post May 14, 2011, 10:48:03 PM
by bkercso
Changing Mandelbrot Formula Mandelbrot & Julia Set hoddie54 1 5350 Last post March 13, 2012, 04:55:01 PM
by lkmitch
Mandelbrot Zoom Animations Fractal eXtreme Gallery Fractacular 3 1533 Last post June 25, 2013, 12:19:50 AM
by panzerboy
Classic Mandelbrot Set in 3D GIF animations Animations Showcase (Rate My short Animation) in4ur 14 3386 Last post September 12, 2014, 10:19:12 PM
by thargor6

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.197 seconds with 29 queries. (Pretty URLs adds 0.01s, 2q)