Logo by Timeroot - 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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 18, 2024, 12:33:40 PM


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 ... 8 9 [10] 11 12 ... 37   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: True 3D mandelbrot type fractal  (Read 610421 times)
0 Members and 1 Guest are viewing this topic.
bugman
Conqueror
*******
Posts: 122



WWW
« Reply #135 on: August 12, 2009, 01:18:50 AM »

Here is a 4D version of Twinbee's formula for squaring a 3D hypercomplex number:

Twinbee's original formula can be expressed in the form of rotational matrices applied to the square of the radius (real value):
{x,y,z}² = Rz(2*theta)*Ry(2*phi)*{r²,0,0}
where Ry and Rz are rotational matrices about the y and z axis, respectively, and:
r=sqrt(x²+y²+z²)
theta=atan2(y,x)
phi=atan2(sqrt(x²+y²),z)

This can be expanded to give:
{x,y,z}² = r²*{cos(2*phi)*cos(2*theta), cos(2*phi)*sin(2*theta), sin(2*phi)}

This simplifies to:
{x,y,z}² = {(x²-y²)*a, 2*x*y*a, -2*z*sqrt(x²+y²)}
where a=1-z²/(x²+y²)

In 4D, rotation is about a plane so now there are 6 possible rotational matrices to choose from: Rxy, Ryz, Rxz, Rxw, Ryw, Rzw. Following this train of thought, I came up with the following 4D analog to Twinbee's formula by applying three consecutive 4D rotations:
{x,y,z,w}² = Rxy(2*theta)*Rxz(2*phi)*Rxw(2*psi)*{r²,0,0,0}
where
r=sqrt(x²+y²+z²+w²)
theta=atan2(y,x)
phi=atan2(sqrt(x²+y²),z)
psi=atan2(sqrt(x²+y²+z²),z)

This can be expanded to give:
{x,y,z,w}² = r²*{cos(2*psi)*cos(2*phi)*cos(2*theta), cos(2*psi)*cos(2*phi)*sin(2*theta), -cos(2*psi)*sin(2*phi), sin(2*psi)}

This formula reduces to Daniel's squaring function when w = 0 and reduces to the standard complex squaring function when w = z = 0.

For faster calculations, this formula can be simplified to:
{x,y,z,w}² = {(x²-y²)*b, 2*x*y*b, -2*r2*z*a, 2*r3*w}
where
r2=sqrt(x²+y²)
r3=sqrt(x²+y²+z²)
a=1-w²/r3²
b=a*(1-z²/r2²)

Using this formula, I rendered 3D slices of this 4D Mandelbrot fractal at w = 0, z = 0, y = 0, x = 0:


* Mandelbrot-White4D-large.jpg (165.16 KB, 563x563 - viewed 1399 times.)
Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #136 on: August 12, 2009, 04:44:41 AM »

Bugman, welcome to the forum! That "Mandelbrot-White2-large.jpg" pic really is droolsworthy - the texture is really odd, something like smoky sorbet icecream. Does using voxels instead of polygons (or other techniques), help in the calculations for the sub-surface scattering?

David, your latest is also stunning, like an intricate ice sculpture.
« Last Edit: August 12, 2009, 04:15:31 PM by twinbee » Logged
Buddhi
Fractal Iambus
***
Posts: 895



WWW
« Reply #137 on: August 12, 2009, 05:38:19 PM »

Hello Bugman
I'm very very impressed when I look at your renders. You are very good in 3D fractal rendering and I think we have to learn from you :-). I looked at you website http://bugman123.com and I see that you have big collection of fractals also 3D and very interesting physics simulations. I'm waiting for some animations with hypercomplex fractals made by you.
Logged

bugman
Conqueror
*******
Posts: 122



WWW
« Reply #138 on: August 12, 2009, 06:56:27 PM »

Does using voxels instead of polygons (or other techniques), help in the calculations for the sub-surface scattering?

As far as I know, there is no practical way to calculate participating media with polygons. I think it makes more sense to use voxels or calculate the potential during the render. It might also be possible to use point clouds (in a manner similar to 3D IFS). Lycium suggested using Bounding Volume Hierarchies (BHV) for faster 3D IFS rendering.
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #139 on: August 13, 2009, 12:08:35 AM »

heya paul, good to see you on the forums smiley

sorry for nitpicking, but the "foggy" rendering method employed here isn't really participating media in the technical sense of the word (it is not approximating the physics of light transport); having said that, it does look really cool, and has the distinct advantage of being waaaay faster!

about the BVH, that's just my interpretation of how Hart's method works - it implicitly creates a BVH using the IFS transformations during traversal.

looking forward to more cool renders guys!  afro
Logged

Buddhi
Fractal Iambus
***
Posts: 895



WWW
« Reply #140 on: August 14, 2009, 09:29:18 PM »

Hi

I tried to derive formula for Distance Estimator for Hypercomplex Mandendelbrot 3D and I have some conclusions.
At start I found some general theory about Distance Estimator in Wikipedia: http://en.wikipedia.org/wiki/Mandelbrot_set. Basing at this the main problem is how to calculate derivative of hypercomplex numer. There is some strange formula:
(taken from Wikipedia)
It looks terrible like some differential equation but this is only chain rule for the derivative. I used this to derive formula for iterations and I obtained following:

f'n+1(c) = 2*fn(c)*f'n(c)+1 =
= 2(x + iy + jz + kw)*(dx * idy * jdz * kdw) =
re:= 2*(x*dx - y*dy - z*dz - w*dw) + 1
i:= 2*(y*dx + x*dy + w*dz + z*dw)
j:= 2*(z*dx + w*dy + x*dz + y*dw)
k:=2*(w*dx + z*dy + y*dz * x*dw)
where:
f(c) = f(x+yi+jz+kw)
f'(c) = f'(dx+idy+jdz+kdw)

first iteration should start from 1+i0+j0+k0

It looks very easy but... IT NOT WORKS PROPERLY sad I made some renders and it looks very strange.
Why? The answer is very staright: we can't calculate derivative of hypercomplex numbers in that way because this numbers are not differentiable (in my opinion)
OK. Hypyercomplex - NO IDEA - but I tried with standard quaternions and it works PERFECT. In this case using the same method I obtained following formula:

re:= x*dx - y*dy - z*dz - w*dw
i:= y*dx + x*dy - w*dz + z*dw
j:= z*dx + w*dy + x*dz - y*dw
k:=w*dx - z*dy + y*dz * x*dw
first iteration also should start from 1+i0+j0+k0

I tested this and it looks on renders of slices like real Distance Estimator in every dimension.

Unfortunately I still don;t have idea how to calculate Distance Estimator for hypercomples numers.

Here's another render of the "True 3D" Mandy, rendered using my improved WIP formula for Julibrots/Quats/Hypercomplex etc. with solid based on directional distance estimation (using deltas rather than the derivative) (time 45mins @3840*2880 on a 3GHz P4HT in single-threaded mode) - max. iterations allowed was 60.

If interested you can check out how much better it is than using my older formula which was basically just solid based on iteration:

http://makinmagic.deviantart.com/art/quot-True-3D-quot-Mandelbrot-125190781
David, some time ago you wrote some about using deltas instead derivatives. Could you describe what you mean? Maybe only way is use some numeric method for calculate this.

Best regards for all fractal maniacs
Logged

David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #141 on: August 15, 2009, 04:15:59 AM »

<>
It looks very easy but... IT NOT WORKS PROPERLY sad I made some renders and it looks very strange.
Why? The answer is very staright: we can't calculate derivative of hypercomplex numbers in that way because this numbers are not differentiable (in my opinion)
OK. Hypyercomplex - NO IDEA - but I tried with standard quaternions and it works PERFECT. In this case using the same method I obtained following formula:
<>
Unfortunately I still don;t have idea how to calculate Distance Estimator for hypercomples numers.
<>
David, some time ago you wrote some about using deltas instead derivatives. Could you describe what you mean? Maybe only way is use some numeric method for calculate this.

Best regards for all fractal maniacs

Hi, that's basically the problem I found as well - using the derivative just doesn't work for that particular hypercomplex method, but it works for these:

http://home.comcast.net/~cmdaven/hyprcplx.htm

> Could you describe what you mean?

To use deltas I iterate at two points on the ray at each step, the current point and the current point plus a little bit, I then basically use the smooth iteration value from each of those iterations to calculate the distance estimate on which my next step distance is based.
If the smooth iteration count at the point is s0 and the smooth iteration count at the point plus a very small step along the ray (here 1e-10) is s1 then I use either

                    estimate = (s0+maxiter)/(maxiter+((1.0e10*maxiter)*abs(s1-s0)))
            or
                    estimate = 1.0/(1.0+((1.0e10)*abs(s1-s0)))

I also have another version that's based on quadratics but that requires another iteration for each step (either at current point-a bit or at current point + 2*a bit).

The main problem with these methods is that when a ray just misses the "solid" then the calculated estimate just after passing the solid gets much too large, the solution I found was that for each ray before you adjust your estimate (from the above) to give a step distance check the estimate against a current minimum for this ray at this iteration depth and if the previously stored step minimum for the iteration depth is less than the new value then use the previous value, otherwise store the new value as the minimum for this iteration depth.

I've still got the odd bug in the algorithm - sometimes it ends up in an infinite loop stepping zero, a situation that's not that easy to debug in UF (it's easy to fix with a fudge but I want to find out what's causing the problem).
Also I still haven't decided which of the two methods above is the better, though I've just about ruled out the quadratic method (mainly for speed reasons).

« Last Edit: August 15, 2009, 04:18:07 AM by David Makin » Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #142 on: August 15, 2009, 01:41:52 PM »

<snip>
....and if the previously stored step minimum for the iteration depth is less than the new value....
<snip>

Make that "and if the previously stored minimum estimate for the iteration depth is less than the new value"

Note that at the moment I also check the new estimate against the next 3 iteration depth minimums as well and store it for those if it's smaller, I dd that instinctively I haven't actually checked carefully to see if it actually makes any difference.

I side-tracked myself into using my 3D IFS formula to render using primitives rather than pure IFS.
« Last Edit: August 15, 2009, 01:47:10 PM by David Makin » Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #143 on: August 15, 2009, 02:09:52 PM »

David, some time ago you wrote some about using deltas instead derivatives. Could you describe what you mean?

Actually I have released a colouring formula to the UF formula database that basically uses the second method I gave in my other reply - the colouring is a class colouring "MMF Directional Distance Estimator" in mmf.ulb. It just ray-traces in 2D.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #144 on: August 15, 2009, 02:16:06 PM »

Hi, that's basically the problem I found as well - using the derivative just doesn't work for that particular hypercomplex method, but it works for these:

http://home.comcast.net/~cmdaven/hyprcplx.htm


Scratch that, I was mistaken. There is a method that works for those without using deltas but I don't think it's exactly the same as the DE method for quaternions.

The main disadvantage of using the delta method is that it's slower because you have to use two full iterations per step and because the estimate produced is not as accurate and not as linear as standard DE. Actually it's 3 to 4 times slower for quaternions.
The advantage of the method using deltas is that it's generic for just about any multi-dimensional numbers - the problems with the algorithm are essentially common to all so once you've got say quaternions rendering accurately then so will other number forms (provided you can calculate a reasonably accurate smooth iteration value).
« Last Edit: August 15, 2009, 02:23:01 PM by David Makin » Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #145 on: August 17, 2009, 02:04:03 AM »

Hi, I just made the odd slight change to my algorithm - the problem was with something I hadn't mentioned that's not really relevant - it was an optimisation attempt that obviously failed smiley

Anyway I just retested rendering a quaternion using the 3 delta methods I mentioned previously (i.e. including the quadratic one) against using standard quaternionic DE.
I adjusted the "minimum distance" values in each case so the visual results were as close as possible and got the following timings:

Standard DE: 14.6s
Quadratic: 39.5s
Newton 1: 25.5s
Newton 2: 26.2s

The visual result for the delta methods was best for the Newton 2 method (I say Newton as they are based loosely on using Newton's formula) and as that's almost as fast as Newton 1 it's the method I will impliment in publicly released formulas.

Actually Newton 2 is the simpler method, i.e. using:

         estimate = 1.0/(1.0+((1.0e10)*abs(s1-s0)))

where 1e10 is 1/1e-10 where 1e-10 is the "bit extra" along the ray, s0 is the smooth iteration at the current point and s1 is the smooth iteration at the current point plus the bit extra. It's actually basically the method I used in the 2D directional distance estimator colouring.

Note that in the 3D version I actually convert the estimate to a step distance by dividing the estimate by (2.5*@scale) where @scale is a user parameter allowing a user to control the accuracy/render speed - a value of 1.0 was used in the testing, this gives pretty accurate result fairly quickly but using @scale values up to about 4 will improve results though obviously at the cost of longer render times.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Buddhi
Fractal Iambus
***
Posts: 895



WWW
« Reply #146 on: August 17, 2009, 08:26:33 PM »

Finally I have rendered rotated view of Mandelbrot 3D in high resolution. Watch in HD!
<a href="http://www.youtube.com/v/x81lv4xfyNo&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/x81lv4xfyNo&rel=1&fs=1&hd=1</a>
Logged

twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #147 on: August 19, 2009, 03:29:16 PM »

Wow, how awesome is that?! For all those frames one would think you're using a 40-core from the future. And in your own raytracer too. Did you use global illumination?
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #148 on: August 20, 2009, 12:34:33 PM »

really nice animation buddhi!

the power of pre-processing is well illustrated here  afro
Logged

cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #149 on: August 22, 2009, 01:07:41 AM »

respects budhi!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Pages: 1 ... 8 9 [10] 11 12 ... 37   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Implementation: 3D mandelbrot type fractal 3D Fractal Generation « 1 2 » steamraven 27 65688 Last post August 21, 2016, 12:13:13 AM
by ironfractal
Re: True 3D mandelbrot type fractal Other / General Discussion shanest 2 27419 Last post November 20, 2009, 03:24:26 AM
by fractalrebel
True 3D mandelbrot fractal (search for the holy grail continues) The 3D Mandelbulb « 1 2 ... 17 18 » illi 260 58363 Last post November 25, 2010, 12:57:55 AM
by cKleinhuis
New fractal type... latest 3d type.. a z^2 for Benoit Images Showcase (Rate My Fractal) M Benesi 0 8533 Last post October 21, 2010, 07:14:00 AM
by M Benesi
My First Mandelbrot...Okay not true. Images Showcase (Rate My Fractal) Zephitmaal 3 8488 Last post January 07, 2012, 04:30:36 PM
by Pauldelbrot

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.213 seconds with 27 queries. (Pretty URLs adds 0.013s, 2q)