Tglad
Fractal Molossus
Posts: 703
|
|
« on: November 20, 2009, 02:09:39 AM » |
|
Hello, I'm new to these forums and have been experimenting with the mandelbulb in ultrafractal. (using http://www.fractalgallery.co.uk/MMFWip3D.zip) I'm finding it a little hard to understand the DE part of the formula, is it possible to render the bulb without it? just be applying the single iterative method (changing zj, zri without dzj and dzri?). I tried switching to point trap mode but that doesn't display anything. If not, could someone point me to the theory behind the DE part of the algorithm? so I know how to write it. Thank you for any help.
|
|
|
Logged
|
|
|
|
David Makin
|
|
« Reply #1 on: November 20, 2009, 03:38:37 AM » |
|
Hello, I'm new to these forums and have been experimenting with the mandelbulb in ultrafractal. (using http://www.fractalgallery.co.uk/MMFWip3D.zip) I'm finding it a little hard to understand the DE part of the formula, is it possible to render the bulb without it? just be applying the single iterative method (changing zj, zri without dzj and dzri?). I tried switching to point trap mode but that doesn't display anything. If not, could someone point me to the theory behind the DE part of the algorithm? so I know how to write it. Thank you for any help. My MMFWip3D formula impliments 2 versions of DE - true DE which is analytically based (and requires the calculation of the derivative) and my own "delta DE" algorithm which is loosely based on the analytical version but was developed almost exclusively by experimentation and basically works on the principle that as we approach the "inside" then the iteration density increases so the distance from the inside is inversely proportional to the iteration density in some way. As for understanding the analytical version, see: http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8505/#msg8505There are some follow-ups to that later in *the thread* discussing various related issues including problems with analytical DE that can be encountered especially when rendering Julia Sets The advantage of the "Delta DE" method is that it works for any formula for which you can get an accurate smooth iteration value so is very much "black box" from an implimentation point of view whereas with the analytical method a specific iterated formula requires a specific iterated derivative to go with it. You can of course render without using DE in the simple fixed-raystep manner but that is extremely inefficient. Also for Julia Sets there is a completely different method of rendering - the inverse method as discussed in *the thread* by xenodreambuie and bugman: Starting about here: http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8214/#msg8214Including this: http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8407/#msg8407Also see: http://www.fractalforums.com/mandelbrot-and-julia-set/glynn-julia-set/msg8002/#msg8002
|
|
|
Logged
|
|
|
|
David Makin
|
|
« Reply #2 on: November 20, 2009, 04:10:56 AM » |
|
I tried switching to point trap mode but that doesn't display anything.
For orbit trapping increase the "solid threshold" to a value from around 0.5 down to around 0.05
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« Reply #3 on: November 20, 2009, 04:35:51 AM » |
|
I have three methods for rendering. The first, similar to Dave's, is analytical and requires the first derivative. It calculates both the potential and the gradient for approach to the fractal surface. The first derivative of the fractal function is used for calculating the gradient. The second method is still analytical, but doesn't require calculating the derivative of the fractal function. The gradient is calculated as the derivative of the potential using a method based somewhat on the work of Linas Vepstas. The third and most painful method is brute force. In the brute force method fairly large steps are made towards the fractal surface until the surface is penetrated. One step back is then taken and then much smaller steps are taken towards the surface again. It is generally much slower than either analytical method.
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« Reply #4 on: November 21, 2009, 07:58:52 PM » |
|
I thought I would post my distance estimate method here: Iterate until mod exceeds sqrt(bailout) The potential is calculated according to the methods of Linas Vepstas: where i is the number of iterations until bailout is reached. The gradient and distance estimate are calculated according to Dang, Kauffman and Sandin in the book "Hypercomplex Iterations." The distance to the surface at each round of iterations is corrected by de until the difference is less than the chosen tolerance. There are also corrections in case de steps "through" the surface.
|
|
« Last Edit: November 21, 2009, 08:00:52 PM by fractalrebel, Reason: typo »
|
Logged
|
|
|
|
David Makin
|
|
« Reply #5 on: November 21, 2009, 08:10:29 PM » |
|
I thought I would post my distance estimate method here:
<Quoted Image Removed>modd = sqrt(dx^2+dy^2+dz^2)" border="0" align="absmiddle" />
Iterate until mod exceeds sqrt(bailout)
The potential is calculated according to the methods of Linas Vepstas:
<Quoted Image Removed>pot = exp(-s*log(2))" border="0" align="absmiddle" />
where i is the number of iterations until bailout is reached.
The gradient and distance estimate are calculated according to Dang, Kauffman and Sandin in the book "Hypercomplex Iterations."
<Quoted Image Removed>de = dfactor*sinh(pot)/(2*exp(pot)*grad)" border="0" align="absmiddle" />
The distance to the surface at each round of iterations is corrected by de until the difference is less than the chosen tolerance. There are also corrections in case de steps "through" the surface.
Hi Ron, Are you currently using the trig version of getting dx, dy and dz ? I mean have you worked out any non-trig formulations for calculatiing the derivative ?
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« Reply #6 on: November 21, 2009, 08:21:07 PM » |
|
Hi Ron,
Are you currently using the trig version of getting dx, dy and dz ? I mean have you worked out any non-trig formulations for calculatiing the derivative ?
Non-trig. I actually use the same approach as for quaternions and hypercomplex numbers. There are obviously some gross oversimplifications in this approach, but it seems to work fairly well.
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« Reply #7 on: November 21, 2009, 08:30:59 PM » |
|
Although I have made some big approximations in getting the derivatives of the fractal functions (e.g. ignoring that they are complex), the de works well only when the derivative as scalar is calculated "correctly". Leaving out a term, incorrect power, incorrect coefficient, etc, and it doesn't work. After doing the "scalar" deriviative, I substitute the complex values for x, y, z (and w) back in and do the same for dx, dy, dz (and dw).
|
|
|
Logged
|
|
|
|
David Makin
|
|
« Reply #8 on: November 21, 2009, 08:38:44 PM » |
|
Thanks Ron.
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« Reply #9 on: November 21, 2009, 08:48:08 PM » |
|
One more gross simplification which works much better that it should . I have an alternate method for calculating the gradient, based, with simplifications, on Linas Vepstas' work: With this method the derivative of the fractal function is not needed.
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« Reply #10 on: November 21, 2009, 08:55:01 PM » |
|
Although I have made some big approximations in getting the derivatives of the fractal functions (e.g. ignoring that they are complex), the de works well only when the derivative as scalar is calculated "correctly". Leaving out a term, incorrect power, incorrect coefficient, etc, and it doesn't work. After doing the "scalar" deriviative, I substitute the complex values for x, y, z (and w) back in and do the same for dx, dy, dz (and dw).
And what do I mean by substitute back in? suppose we have and are calculated according the actual datatype (complex, spherical, quaternion, hypercomplex etc.)
|
|
« Last Edit: November 21, 2009, 08:57:50 PM by fractalrebel, Reason: LaTex error »
|
Logged
|
|
|
|
Tglad
Fractal Molossus
Posts: 703
|
|
« Reply #11 on: November 22, 2009, 03:41:01 AM » |
|
>> I'm finding it a little hard to understand the DE part of the formula, is it possible to render the bulb without it? >> I tried switching to point trap mode but that doesn't display anything.
Ok thanks for the replies, I found the answer to my question, you just turn off the analytical DE option in the formula tab, then you can use the simple formula. Awesome.
|
|
|
Logged
|
|
|
|
David Makin
|
|
« Reply #12 on: November 22, 2009, 01:35:49 PM » |
|
>> I'm finding it a little hard to understand the DE part of the formula, is it possible to render the bulb without it? >> I tried switching to point trap mode but that doesn't display anything.
Ok thanks for the replies, I found the answer to my question, you just turn off the analytical DE option in the formula tab, then you can use the simple formula. Awesome.
Ah - I thought you were asking generally rather than specifically about my formula. Of course the delta DE method which is used when you turn off Analytical DE is still a form of distance estimate, it's just a bit more "ad hoc"
|
|
|
Logged
|
|
|
|
JosLeys
|
|
« Reply #13 on: November 22, 2009, 01:47:11 PM » |
|
Ron,
do you know of any web pages where I can look at your exotic formulas for the distance estimate in some more detail? (..and what is "gradadj" ?)
Thanks, Jos
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« Reply #14 on: November 22, 2009, 09:57:40 PM » |
|
Hi Jos, Gradadj is simply an adjustable parameter for the approximation to the gradient. Here are two references that might help: http://linas.org/art-gallery/escape/ray.html. I was very loose with how I interpreted some the equations. "Hypercomplex Iterations" by Dang, Kauffman and Sandin in the neighborhood of page 22. The most important thing is that the equations work very effectively and are fast, especially for quaternions which was my original target.
|
|
|
Logged
|
|
|
|
|