Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Theory => Topic started by: cbuchner1 on November 22, 2009, 04:07:48 PM




Title: wanted: Interior potential function for Mandelbulbs
Post by: cbuchner1 on November 22, 2009, 04:07:48 PM
Hi,

I've found Buddhi's "walnut shell" render quite interesting. He noted that ray traversal for the inside of the Mandelbulb was very slow because it hit the maximum interation count.

This makes me wonder. Once you know you're inside, is there a potential function similar to the Hubbard-Douady potential, so that you can more quickly iterate towards the surface of the mandelbulb? This would come handy for ray tracing of refractive rays (traversing through the material), as well as looking at the bulb surface from the inside.

So if anyone has the guts to find the potential function for the interior of a Mandelbulb, please step forward. Your reward will be raytraced mandelbulbs made of glass.

Christian


Title: Re: wanted: Interior potential function for Mandelbulbs
Post by: David Makin on November 22, 2009, 04:25:48 PM
Yes you can do it - you basically need a sophisticated convergent bailout method, it's *much* more complicated than "outside" because you have to detect not only point convergence but also convergence to periodic attractors.
I have done code for Ultra Fractal that does this for complex formulas, in the UF formula database see the "Multi Bailout Switch Formula" in mmf5.ufm:

http://formulas.ultrafractal.com/ (http://formulas.ultrafractal.com/)

Of course if you have UF5 just select the formula then go to edit it - if you don't have UF5 then simply go to the above link, browse the collection, find my formulas and download mmf5.ufm - they're just text files with a different extension.

When I get time I'm going to impliment "inside" bailout and delta DE (and maybe analytical DE) in my own 3D formula.

Of course if the Mandelbulbs are not as well-behaved as the complex Mandelbrot (e.g. they have areas of strange attractors) then that method may not work too well and something even more sophisticated would be required - maybe involving Lyapunov exponents ?


Title: Re: wanted: Interior potential function for Mandelbulbs
Post by: David Makin on November 23, 2009, 01:05:30 AM
I should mention that there are issues using the inside convergence for DE - the red area in the image below is still "inside" even though the coloured convergent areas are bailing out as "outside" and the black is the normal "outside" and the image uses a maxiter of 400, but extra iterations are performed for detecting periodic convergence - up to 2000 max in this case :)
In other words making the boundary of detected convergent areas and detected divergent areas approach within close bounds can require large iteration counts.
The higher the period of the periodic attractor in a given convergent area then the more iterations required for detection.

In the example convergent bailout (point and periodic) was 1e-9 and divergent was 65536. The image took 11 seconds on this system - as compared to 1.35 secs with the same parameters but without the convergent testing/colouring (i.e. just colouring the normal "inside" as solid after max iterations without any testing for convergence during iteration).

Note that the actual colouring of the detected convergent areas is atan(smooth iteration).

(http://www.fractalforums.com/gallery/1/141_23_11_09_12_59_35.jpg)

In this case the maximum period tested for was 100, testing for fewer periods would speed things up but leave more circles/bulbs still as "inside".
More importantly any Julias from within the main cardioid have period 1 i.e. are point attractors so detection of convergence for those is much simpler - in fact detection is much simpler for any complex Julia since the convergent areas of complex Julias have a fixed period which means the algorithm can be (and is optionally) vastly optimised for specific period testing on Julia Sets - the fastest option of all being if the specific values in a given attractor are known and can be directly tested against.