Welcome to Fractal Forums

Fractal Software => 3D Fractal Generation => Topic started by: twinbee on September 22, 2007, 11:05:02 AM




Title: True 3D mandelbrot type fractal
Post by: twinbee on September 22, 2007, 11:05:02 AM
Hi all!
I'm relatively new to fractals, but I have searched for hours to find a true 3D mandlebrot type fractal, all in vain. I don't want the raised mountain type of mandlebrot, and I don't want any true (but trivially simple) ones such as the Menger sponge. I instead want a true 3D equivalent of the mandlebrot (or near enough).

The closest I got was the Quasi-fuchsian sphere fractal:
http://youtube.com/watch?v=3lcO9zRCv-4

However, that is still mostly self-similar. I want the amazing variety that can be found in the mandlebrot. Anything out there?


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on September 22, 2007, 11:11:31 AM
heya, welcome to the forums. curiously i was just watching arthur clarke describing the mandelbrot set in "fractals - the colors of infinity" ;)

there doesn't seem to be a direct 3d analogue of the mandelbrot set. you can spin it about the x axis, you can use the same kind of iteration using quaternions, and a whole bunch of other "nartural" extensions ... but in the end the character of the original mandelbrot set is lost.

i've found this is true of 3d fractals in general: it's a bit of a double-edged sword, you gain some things (potentially in realism, structure) but you often lose others (simplicity, especially of exploration). to me the solution is simple: accept the mandelbrot set for what it is, be satisfied and don't try to boost it to 3 dimensions artificially. there are plenty of exciting fractals that exist natively in 3-space, and we shouldn't try to create new fractals with the expectation of looking like old ones ;)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 25, 2007, 08:16:44 AM
Thanks so much for your reply!
Even if it wasn't like a 3D rendition of the Mandelbrot, I would love to know of a 3D fractal that has mandelbrot-type beauty and complexity along with the amazing variety. As far as I know, no such fractal exists, but perhaps I haven't looked hard enough?


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 30, 2007, 10:08:52 PM
I've just spent an exhausting week trying to create a TRUE 3D rendition of the Mandelbrot (or whatever the equivalent would turn out to be). It's been a really cumbersome, if somewhat exciting journey. Although you say we should be happy with the 2D version (which I am), I believe that maths can do anything, and that it's just a matter of finding the right equations to find the jackpot.

To aid me in my quest for 3D perfection, I have tried to use 3 dimensional numbers, and have even creating my own arithmetic around it. At first I was meddling with the basic 2D formula, but trying to mould it into 3D dimensions using simple algebra (expand the equation and simplify). This leads on to questions such as what you would do if faced with i multiplied by j (j being the 3 dimensional imaginary number). Using solutions based around this approach I got some interesting extruded/distorted 3D Mandelbrot objects, but nothing like what I was hoping for (where the Mandel-type detail is surfacing throughout all 3 dimensions).

Failing that, I also tried to visualize what happens in standard complex multiplications, and used rotation techniques, but in all 3 dimenions, instead of the 2D rotation for complex numbers. In the end, I got another "extruded Mandelbrot" which had a sort of bird shape at one cross section of the 3D object. It was quite interesting, but nothing sensational.

Well that's it. Having done all that, I feel fairly gutted, having failed :(

Still it was quite fun too. If anyone has any inkling whether 3D mandelbrots could even theoretically be possible, I would love to hear.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 01, 2007, 12:57:36 AM
You could probably get what you're aiming for by performing fancy transforms on 3D/4D space prior to plugging coords into quaternionic iteration, though you might consider that as "cheating" :)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 01, 2007, 01:09:31 AM
I've had a good look over the net and couldn't see anything coming even close. Even quaternionic fractals (as cool as they are), have mandelbrot-depth fractal complexity in only 1 dimension (they look very 'smooth' on the other two axes - which resemble the extruded 3D fractals I was able to create with 'triplex' numbers as I explained in my post above). In fact, they look like whipped cream (http://local.wasp.uwa.edu.au/~pbourke/fractals/quatjulia/q3big.gif) :)

No, sorry, I'm after mandelbrot style complexity in all 3 dimensions. Something similar to the Quasi-fuchsian sphere fractal here:
http://youtube.com/watch?v=3lcO9zRCv-4
(except that's mostly self-similar, so it's good but no cigar).


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 01, 2007, 01:44:32 AM
I know standard quaternionics is no use, but to go back to 2D, you could apply a 2D manipulation of the complex plane (i.e. x and y coords) prior to plugging them into the standard z^2+c iteration to (for example) give the Mandelbrot an extra lobe - or remove a lobe. In the same way you could manipulate 3D/4D space prior to plugging the coords into a quaternionic iteration (for "roundy" results) or a hypercomplex iteration (for "squarey" results) to produce 3D lobes.
As you say though I've seen no-one try this yet :) In fact I've never seen any 3D/4D fractal software that allows 3D/4D transformations to be applied in that way (i.e. like UXFs are used for 2D in Ultrafractal).


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 01, 2007, 01:49:36 AM
Wow, sounds good. Seriously, if you see any picture on the net, then please let us know ASAP!


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on November 15, 2007, 05:22:26 AM
So far, this is the closest I've come to creating a 3D-style mandelbrot with bulbs on all axis. It uses techniques described in my "Meet & greet" forum thread (http://www.fractalforums.com/index.php?topic=769.0), and orthographic projection with lighter areas at the front.

(http://www.skytopia.com/stuff/mandel3d1.png)

Sigh, so close, yet so far!


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 15, 2007, 08:02:02 AM
hey that's looking promising, email me the cayley table you used and i'll ray trace it - busy working on the program now after my horrible exam earlier today.


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on November 17, 2007, 02:52:35 PM
Hope the exam went okay. Here's the way to create the object. I'm not sure how Cayley tables would fit in this context, but here's the multiplication function:

double pi=3.14159265;
double r    = sqrt(x*x + y*y + z*z );
double yang = atan2(sqrt(x*x + y*y) , z  )  ;
double zang = atan2(y , x);
newx = (r*r) * sin( yang*2 + 0.5*pi ) * cos(zang*2 +pi);
newy = (r*r) * sin( yang*2 + 0.5*pi ) * sin(zang*2 +pi);
newz = (r*r) * cos( yang*2 + 0.5*pi );

Since in the standard Mandelbrot forumla, the only multiplication is the number multiplied by itself (the square), that's why there's only x, y and z in the above function, and not x2, y2, and z2 aswell. Hope that makes sense.

The addition function for these 3D numbers is as expected:
newx = x1 + x2;
newy = y1 + y2;
newz = z1 + z2;

The main Mandelbrot formula stays the same ("a" and "point" are 3D numbers of course - X, Y and Z):
add(    multiply(a,a)   , point).

Oh and the escape condition is slightly extended over the 2D version like so:
while (x*x + y*y + z*z  <  2.0)

Thanks for doing this. It's gonna be quite exciting to see how it all turns out!


Title: Re: True 3D mandlebrot type fractal
Post by: this is not kasker on November 17, 2007, 05:16:41 PM
This is cool, I'll be watching this thread.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 17, 2007, 11:28:12 PM
heya, thanks for the formulae :) just popping in to say that i'm writing my last exam for this year tomorrow, and it's a killer so there's going to be at least a 1-day lag until i implement this... oh, and you can cancel the square root / squaring for big speed gains and increased numeric stability.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 19, 2007, 03:51:24 AM
while sitting and staring at this thing rendering (you wouldn't believe how easily it gobbles my 12ghz of processing power), i realised i'd made a mistake in implementing the algorithm. this resulted in strange, interesting shapes:

(http://www.fractographer.com/wip/strange_thing.jpg)

i also think it's possible to simplify the iteration a LOT. i'm going to fix the iteration now (and also try out the "julia" version, where the constant isn't the initial point) and render it a bit while i do the algebra/trig on paper to simplify the equations.

looks quite interesting so far :)


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 19, 2007, 03:55:58 AM
i can confirm bulbs on all axes ;D

rendering it a bit and simplifying the iteration...


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 19, 2007, 04:11:40 AM
hmm, this seems to just be performing a rotation and a scale by r^2...

edit: nono, it's doubling the spherical angle and adding an offset (different ones for phi and theta). hmm i wonder if this can be made more efficient, cuz damn it's slow :|


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 19, 2007, 09:55:39 AM
here's a preview, i'll update it as it gets smoother:

(http://www.fractographer.com/wip/3d_mandelbrot.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on November 19, 2007, 05:00:04 PM
Oh wow that first one - looks ace!! Amazing how mistakes can often result in these things. It looks like a face with the head part being scalped heh :)

Ah, yes, the sqrt/sqr in the r variable can be cancelled. Is the pic above (which also looks really nice by the way) the equivalent of my 2D ortho projection? Doesn't quite look like it, but then I wouldn't know what to expect from a different angle!

Quote
edit: nono, it's doubling the spherical angle and adding an offset (different ones for phi and theta). hmm i wonder if this can be made more efficient, cuz damn it's slow :|

Yep, in fact, the spherical angle is doubled not just in one direction, but in the other too. So it's more of a spherical 'twist' than rotation. I wish I could sort of rotate in the 3rd direction too, but as you know, only 2 rotations are needed to represent any possible sphere angle. Maybe there is a way, but I don't want to start representing angles with multiple possible ways of XYZ rotations...

Haha, I'm dying to see higher res versions now. To be honest, I know these things render so slowly, but I'm amazed they can render at all. Even plotting the simple pixel projection I did took around 2 hours in C++, so I'm quite impressed really, especially as it's raytraced. More CPU speed in computers would still really be nice (http://www.skytopia.com/project/tech/5tech.html#100,000,000x_CPU_Speed_Up) though hehe.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 20, 2007, 12:42:53 AM
Is the pic above (which also looks really nice by the way) the equivalent of my 2D ortho projection? Doesn't quite look like it, but then I wouldn't know what to expect from a different angle!

yup. i rendered a quick top-down preview (low precision, different materials):

(http://img23.imageshack.us/img23/8550/3dmandeltopviewpreview.jpg)

Even plotting the simple pixel projection I did took around 2 hours in C++, so I'm quite impressed really, especially as it's raytraced.

btw, that's not simple ray tracing :P it's simulating all possible light/surface interactions (based on metropolis light transport (http://graphics.stanford.edu/papers/metro/metro.pdf)), spectral skylight (based on a practical analytic model for daylight (http://www.cs.utah.edu/vissim/papers/sunsky/sunsky.pdf)) in a completely correct way, which requires 100-1000 or more samples per pixel for clean images... for me fractals are just fodder for my first love, rendering systems ;)

More CPU speed in computers would still really be nice (http://www.skytopia.com/project/tech/5tech.html#100,000,000x_CPU_Speed_Up) though hehe.
i don't think we'll ever see a 100m times speed improvement, there are physical limits (if you don't believe this, ask yourself: why stop at 100m? why not 1000000000000 quadrillion times faster?) i'd say we have another 1000x or so to go, at most.

oh and about physical limits, do you really think that the speed of light will be broken in the year 2600 (http://www.skytopia.com/project/tech/4tech.html#Internet_Omega)? :D


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 20, 2007, 01:41:35 AM
it's also definitely the mandelbrot set, here's a thin slice (from y = -0.15 to +0.15) of the object:

(http://img18.imageshack.us/img18/8061/3dmandelslice.jpg)

it's really fun taking vertical slices of the shape too, a nice project would be to render and assemble a whole bunch of slices to really get an idea of the 3d structure. i think i finally understand the formula btw, it's basically reproducing the dynamics of the mandelbrot iteration in the 2d complex plane (doubling the angle comes from the z^2, adding the offset comes from the starting point) and doing analogous transformations in the other spherical co-ordinate; because of this there are actually entire families of 3d mandelbrots, depending on your choices of angle coefficient and offset.

moreover, i've been thinking of visualising the whole 4d object. yes, 4d: actually, at each point in space there is a scalar potential, which can be interpreted as density (like a cloud). since i plan to simulate atmospheric physics (in particular rayleigh scattering - which is what's responsible for blue skies and red sunsets etc.) anyway, this will serve as a really nice volumetric dataset. i'll definitely pre-render it to a grid though, because it's SO damn slow! that ought to look pretty cool, and would actually be way faster than the method i'm using here.

for the moment, i want to render some more slices of this thing :)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on November 20, 2007, 09:37:34 AM
Quote from: lycium
Quote from: twinbee
Is the pic above (which also looks really nice by the way) the equivalent of my 2D ortho projection? Doesn't quite look like it, but then I wouldn't know what to expect from a different angle!
yup.

Oh so it is?? But that previous grey one hardly looks like the next gold one. Not even slightly symmetric for instance. Are you sure?

Quote
i rendered a quick top-down preview (low precision, different materials):
Excellent! This is definitely a 3D version of the ortho one I did :D Can I ask you a favour? Can you render it at higher resolution, and also veer the light source to one side, so that the left part of the fractal is brighter than the right, so that we can see a more '3D' like picture. Maybe also use the grey material too, as it better reflects the subtle blue sky light source.

Quote
btw, that's not simple ray tracing  it's simulating all possible light/surface interactions (based on metropolis light transport),

That's all well and good, but I won't be happy until you render with full brute force photon motion simulation (http://www.cpjava.net/photonproj.html) to accurately emulate what really happens. Lol, just kidding... :D :P

Quote
it's simulating all possible light/surface interactions (based on metropolis light transport), spectral skylight (based on a practical analytic model for daylight) in a completely correct way, which requires 100-1000 or more samples per pixel for clean images...

How does that compare to photon mapping or radiosity out of interest?

Quote
.. for me fractals are just fodder for my first love, rendering systems ;)
On a tangent, it's be interesting to experience 3D in general (or this world with special goggles) with inverse perspective, so that nearby objects are small, and more distant objects are big (the larger more distant objects would still be 'behind' the nearer stuff). I bet it would look really cool...


Quote
i don't think we'll ever see a 100m times speed improvement, there are physical limits (if you don't believe this, ask yourself: why stop at 100m? why not 1000000000000 quadrillion times faster?) i'd say we have another 1000x or so to go, at most.

Yes that prediction for 2040 is looking slightly optimistic now (that article was written 2 years ago). It's quite a shame the increases have been so small lately :( At least there's parallel processing which will good for raytracing, and radiosity type effects (I hope).

Quote
oh and about physical limits, do you really think that the speed of light will be broken in the year 2600?
Haha :P Yeah it probably won't, unless we manage to cheat space-time somehow. Haha, one can dream :D :D


Quote
it's also definitely the mandelbrot set, here's a thin slice (from y = -0.15 to +0.15) of the object:

Nice!! I'd die to zoom right into that top-left little cave part next to the spindly part to see how much of the detail has survived the move to 3D. If you have time of course. I don't want to eat up all your CPU time! ;)

Quote
and doing analogous transformations in the other spherical co-ordinate; because of this there are actually entire families of 3d mandelbrots, depending on your choices of angle coefficient and offset.

I wish!... As good as it looks, this beast is far from the real thing, because most of the infinitely complex details haven't survived the Z axis. Unfortunately, they still look as though they've been 'smeared' over or lost completely. However, there's a chance some of the infinite detail has nearly survived in smaller portions of the set. For example, that cave part near the top looks as though there could be some interesting stuff. Again, I doubt it though.

Quote
moreover, i've been thinking of visualising the whole 4d object. yes, 4d: actually, at each point in space there is a scalar potential, which can be interpreted as density (like a cloud). since i plan to simulate atmospheric physics (in particular rayleigh scattering - which is what's responsible for blue skies and red sunsets etc.) anyway, this will serve as a really nice volumetric dataset. i'll definitely pre-render it to a grid though, because it's SO damn slow! that ought to look pretty cool, and would actually be way faster than the method i'm using here.

Ace. Can't wait to see some more pics of this thing!


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 20, 2007, 11:23:42 AM
Are you sure?
yup.

Can I ask you a favour? Can you render it at higher resolution,
sure, it'll take a while though, once i've set up the scene to be rendered (i do everything with code, and tweaking the camera xyz etc is labourious).

and also veer the light source to one side,
there's no light source in the scene per se, it's all just skylight. i do have light sources though, and will use some.

Quote
btw, that's not simple ray tracing  it's simulating all possible light/surface interactions (based on metropolis light transport),
That's all well and good, but I won't be happy until you render with full brute force photon motion simulation (http://www.cpjava.net/photonproj.html) to accurately emulate what really happens. Lol, just kidding... :D :P
they are totally equivalent: radiance (which is the radiometric quantity corresponding to what we see) is invariant along directions, so it doesn't matter whether you simulate light going from the eye to the lights (path tracing), from the light to the eye (light tracing), or both (bi-directional path tracing). what i'm doing there is a 100% accurate simulation of diffuse light transport, which is really easy actually.

How does that compare to photon mapping or radiosity out of interest?
photon mapping is a full global illumination algorithm, in that it can simulate all modes of light transport. however it is biased (roughly, you can't be sure it's converging to the right image) and i personally dislike the algorithm, it's quite storage intensive and subject to a lot of approximations that make the result uncrisp.

radiosity only works with polygonal scenes, and only simulates diffuse light transport. so it's not at all applicable to scenes having curved (let alone fractal!) surfaces.

the core algorithms used in my renderer are pretty much state of the art, and i'll be extending its functionality a lot these holidays :)

On a tangent, it's be interesting to experience 3D in general (or this world with special goggles) with inverse perspective, so that nearby objects are small, and more distant objects are big (the larger more distant objects would still be 'behind' the nearer stuff). I bet it would look really cool...
i've not heard of inverse perspective before, can you explain how it works?

Yes that prediction for 2040 is looking slightly optimistic now (that article was written 2 years ago). It's quite a shame the increases have been so small lately :( At least there's parallel processing which will good for raytracing, and radiosity type effects (I hope).
yup, but we've already mostly exhausted the "free ghz" ride, and eternal multicore scaling isn't a given. so there definitely is a limit, and lithographic microprocessor manufacturing is slowly approaching some kind of peak too... all other techs (quantum, biological, nano, ...) are a pie in the sky so far.

Haha :P Yeah it probably won't, unless we manage to cheat space-time somehow. Haha, one can dream :D :D
i'd prefer it not to be the case, it's what keeps super advanced intergalactic civilisations out of our cosmic back yard ;)

Nice!! I'd die to zoom right into that top-left little cave part next to the spindly part to see how much of the detail has survived the move to 3D. If you have time of course. I don't want to eat up all your CPU time! ;)
the way to visualise this thing in realtime is to precompute a volume... i should get to doing that.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 20, 2007, 11:38:20 AM
to give an idea of how accurate these rendering methods (based on physical wavelength-based light quantities and reflectances) are, check out http://www.graphics.cornell.edu/online/box/compare.html

that same accuracy extends to less simple scenes, and if you want to see what i'm chasing see http://www.maxwellrender.com/


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on November 21, 2007, 01:04:35 AM
here's a preview, i'll update it as it gets smoother:

That render doesn't half remind me of this:

http://www.youtube.com/watch?v=jeVDBvE5Bg0 (http://www.youtube.com/watch?v=jeVDBvE5Bg0)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on November 21, 2007, 01:05:48 AM
edit: nono, it's doubling the spherical angle and adding an offset (different ones for phi and theta). hmm i wonder if this can be made more efficient, cuz damn it's slow :|

Maybe there's a way of working out a distance estimation for it ?


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 21, 2007, 06:08:07 AM
edit: nono, it's doubling the spherical angle and adding an offset (different ones for phi and theta). hmm i wonder if this can be made more efficient, cuz damn it's slow :|

Maybe there's a way of working out a distance estimation for it ?

that would be great, almost necessary even. i don't have a clue as to how to approach it though :/


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 21, 2007, 06:09:49 AM
Can I ask you a favour? Can you render it at higher resolution, and also veer the light source to one side, so that the left part of the fractal is brighter than the right, so that we can see a more '3D' like picture. Maybe also use the grey material too, as it better reflects the subtle blue sky light source.

i took out the sky and used a simple area-directional light source; it's not very efficiently sampled, but it works. here's the pic, it's still really grainy even after rendering all night :(

(http://img4.imageshack.us/img4/1036/3dmandellit.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on November 22, 2007, 05:28:36 PM
Quote
they are totally equivalent: radiance (which is the radiometric quantity corresponding to what we see) is invariant along directions, so it doesn't matter whether you simulate light going from the eye to the lights (path tracing), from the light to the eye (light tracing), or both (bi-directional path tracing). what i'm doing there is a 100% accurate simulation of diffuse light transport, which is really easy actually.

Wow really? I can't really get one up on that one then :) I'm a bit surprised, because it took 100 Sun SparcStations 1 month to generate some of those pics, but then it was back in 1991...
Does your algorithm even do exotic stuff like account for red/blue shift for rainbow effects?

Quote
photon mapping is a full global illumination algorithm, in that it can simulate all modes of light transport. however it is biased (roughly, you can't be sure it's converging to the right image)

How about if you throw more CPU time at it. Is accuracy increased proportional to the CPU time?

Quote
the core algorithms used in my renderer are pretty much state of the art, and i'll be extending its functionality a lot these holidays

Sounds ace. I have to say, some of these, although grainy, do look very realistic.

Quote
i've not heard of inverse perspective before, can you explain how it works?

Usually, in 3D, lines of perspective converge to a point. Orthographic images on the other hand don't - everything in the back is just as big as everything at the front. Now imagine one step further than even this. lines of perspective would fly away from each other (actually they would converge, but only behind the viewer).

Parallax would look really strange and interesting like this. I was semi-surprised to see the idea is already out there (http://en.wikipedia.org/wiki/Reverse_perspective) on Wikipedia.

Still love to see a zoom into that top left cave here: http://www.fractographer.com/wip/3dmandel_slice.jpg
Even if you have to forego some of the more realistic lighting effects for quicker speed, I'd love to get a closer eye on the detail.

By the way, what's the building block of these images? Billions of little cubes? Polygons? Pure mathematical curves? I can't imagine the latter, since the difficulty in translating from fractal to curve is daunting (at least for me).

Quote
that same accuracy extends to less simple scenes, and if you want to see what i'm chasing see http://www.maxwellrender.com/

What does that have, that your algorithm lacks?

Quote
That render doesn't half remind me of this:

http://www.youtube.com/watch?v=jeVDBvE5Bg0

Hi David, still love to see that quaternion technique at creating the 3D Mandelbrot set. Any attempts so far?

Meanwhile, here's another 2 failed attempts. As before, brightness represents the Z axis.
(http://www.skytopia.com/stuff/3dcave/mandel3d4.png)

And the other...
(http://www.skytopia.com/stuff/3dcave/MandelTmultiplyB.png)


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on November 23, 2007, 03:43:38 AM
Quote
they are totally equivalent: radiance (which is the radiometric quantity corresponding to what we see) is invariant along directions, so it doesn't matter whether you simulate light going from the eye to the lights (path tracing), from the light to the eye (light tracing), or both (bi-directional path tracing). what i'm doing there is a 100% accurate simulation of diffuse light transport, which is really easy actually.

Wow really? I can't really get one up on that one then :) I'm a bit surprised, because it took 100 Sun SparcStations 1 month to generate some of those pics, but then it was back in 1991...
Does your algorithm even do exotic stuff like account for red/blue shift for rainbow effects?

first off, a minor technical correction due to my bad wording: radiance isn't "invariant along direction", it's invariant if you swap the directions; i.e., the (differential) radiance from a to b is the same as the radiance from b to a. so if you have a path of light between the eye and the camera, then it doesn't matter which point is the source and which is the sensor. this symmetry is concisely summarised in this this paper (http://www.cs.utah.edu/~shirley/papers/gi06.pdf).

about 100 computers to render 1 image, that's a bit crazy. any reference on that? if they were just blindly shooting out photons from the light sources and recording those which hit the image plane, then they should know better in 1991 because path tracing was developed by kajyia in 1986 when he formalised image synthesis in his seminal paper, "the rendering equation"...

regarding spectral effects such as redshift and dispersive refraction, yes my renderer can (efficiently!) do both. even polarisation of light can be taken into account.

Quote
photon mapping is a full global illumination algorithm, in that it can simulate all modes of light transport. however it is biased (roughly, you can't be sure it's converging to the right image)

How about if you throw more CPU time at it. Is accuracy increased proportional to the CPU time?

that's a very good scientifically-minded question. it depends on how you scale up photon mapping; but yes, photon mapping can be made to approach correctness if you make the photon's region of effect really really small. this is extremely inefficient, but it sort of works (however it's still an approximation since you have a nonzero radius of effect): http://www.winosi.onlinehome.de/

be sure to read this excellent article comparing the "accuracy" of various rendering methods: http://www.cgafaq.info/wiki/Bias_in_rendering

I have to say, some of these, although grainy, do look very realistic.

yeah, unfortunately naively rendering fractal surfaces without distance estimation is several hundred times slower than rendering "normal" scenes.

Still love to see a zoom into that top left cave here: http://www.fractographer.com/wip/3dmandel_slice.jpg

i'll look into it now. getting light in there will be tricky...

By the way, what's the building block of these images? Billions of little cubes? Polygons? Pure mathematical curves? I can't imagine the latter, since the difficulty in translating from fractal to curve is daunting (at least for me).

it's working directly with the procedure you gave, same as your images were produced. your rays were going out in parallel bundles, mine leave in perspective and bounce around the scene looking for light sources - that's about it.

Quote
that same accuracy extends to less simple scenes, and if you want to see what i'm chasing see http://www.maxwellrender.com/

What does that have, that your algorithm lacks?

it's difficult to say exactly what technology they're using because they're obviously not going to disclose it, but it's hypothesised that they're also using (some variant of) metropolis light transport. there are a bunch of renderers out there which work in the same way, as does mine.

regarding features, mine can't be compared to any of them as i've hardly worked on it at all and have absolutely no hooks for polygonal data (let alone import from 3ds max, maya, etc.), no material system, no support for textures, no nothing basically ;) this is why i need to work on it. however, wrt the core algorithm i think there's rough parity; i just need to take that powerful engine and do useful things with it, these simple renders i've done don't even scratch the surface (as you'll see looking at maxwell render's gallery).


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on November 23, 2007, 07:20:18 PM
Quote
That render doesn't half remind me of this:

http://www.youtube.com/watch?v=jeVDBvE5Bg0

Hi David, still love to see that quaternion technique at creating the 3D Mandelbrot set. Any attempts so far?


Not yet as I'm concentrating on the 3D IFS/RIFS formula I just released for Ultrafractal at the moment :)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on December 05, 2007, 12:02:17 AM
I think we may have something...

(http://www.skytopia.com/stuff/MandelCave.png)

Sorry about the low resolution - even this took around 30 hours to render!! Formula and full story coming when I tidy up the code...


Title: How about 3D slices through the 4D Mandelbrot/Julia equation?
Post by: Duncan C on December 27, 2007, 01:29:18 AM
Hi all!
I'm relatively new to fractals, but I have searched for hours to find a true 3D mandlebrot type fractal, all in vain. I don't want the raised mountain type of mandlebrot, and I don't want any true (but trivially simple) ones such as the Menger sponge. I instead want a true 3D equivalent of the mandlebrot (or near enough).

The closest I got was the Quasi-fuchsian sphere fractal:
http://youtube.com/watch?v=3lcO9zRCv-4

However, that is still mostly self-similar. I want the amazing variety that can be found in the mandlebrot. Anything out there?


Could you take the 4D Mandelbrot/Julia set equation:

(real and imaginary Z and real and imaginary C values) and hold one of the 4 values constant, while running the other 3 thorough a cubic grid of values? I would think this would generate very interesting 3D fractals. It would be a 3D slice through the 4D Mandelbrot/Jullia equation, where normal Mandelbrot and Julia sets are 2D slices.



Duncan


Title: Re: How about 3D slices through the 4D Mandelbrot/Julia equation?
Post by: David Makin on December 27, 2007, 02:46:54 AM

Could you take the 4D Mandelbrot/Julia set equation:

(real and imaginary Z and real and imaginary C values) and hold one of the 4 values constant, while running the other 3 thorough a cubic grid of values? I would think this would generate very interesting 3D fractals. It would be a 3D slice through the 4D Mandelbrot/Jullia equation, where normal Mandelbrot and Julia sets are 2D slices.

Duncan

2D renders of 3D slices from the 4 dimensional "Julibrot" space are possible from Fractint and some formulas in Ultrafractal but they aren't exactly what is being sought :)

Here's one view of a Julibrot:

http://makinmagic.deviantart.com/art/Classic-3D-Julibrot-43168532 (http://makinmagic.deviantart.com/art/Classic-3D-Julibrot-43168532)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on December 27, 2007, 10:39:46 AM
Looks like it's not just us lot that have searched for the 3D Mandelbulb. I found some interesting threads in Google Groups from quite a few who seemed to wonder if such an object could exist. Notable posts include Erick's info (http://groups.google.com/group/alt.fractals/browse_thread/thread/95178ace3421cbd2/7e632eae3d58fa9a?lnk=st&q=3d+mandelbrot#7e632eae3d58fa9a) about using arbitrary powers of n (instead of the usual n^2 in the main formula) to represent the third dimension. Also Laszlo's rumour (http://groups.google.com/group/sci.fractals/browse_thread/thread/7562ebca0b78231d/99f88dd3931a2cf8) indicates that the thing exists, and actually has a name (oops he's lost the reference - there's a surprise!). Finally, Lloyd Mitchell in this thread (http://groups.google.com/group/alt.fractals/browse_thread/thread/95178ace3421cbd2/7e632eae3d58fa9a?lnk=st&q=3d+mandelbrot#7e632eae3d58fa9a) claims that "3d slices of the 4D Mandelbrot set (let the k part of c = 0) do reveal spheres instead of circular disks.", and precedes that with formulae which maybe someone here can follow better than I can. Of course, I'm am very skeptical he's actually found anything.

I'll come clean about the image I posted on December 04. It's not from any maths at all - I drew it in an art program...... :-} Yeah I know, seemed a fun joke at the time, though I'd be a lot more excited if I really found it. If you look carefully, you should be able to notice some discrepancies which indicate it's not the genuine article heh.

I still think the 3D version of the Mandelbrot would look the best and most fascinating fractal ever (especially if we could make the surface multi-colored - not sure how easy that is, since the surface of the ordinary 2D Mandelbrot is always only a single colour). To find the Mandelbulb, I've tried everything from cylindrical coords to spherical-distance based rotations (instead of angle-based). Unfortunately, nothing's got closer than the one I posted earlier which Lycium rendered.

Finally, one glimmer of hope that such a thing may exist after all. I quote from this excellent page (http://www.miqel.com/fractals_math_patterns/visual-math-mandelbrot-magic.html):

"Also Mandelbrot curves have been discovered in cross-sections of magnetic field borders, implying there is a 3-D mandelbrot equivalent that is closely tied to electromagnetism and therefore a deep structural and fundamental aspect of life, and physical space/time."


Title: Re: True 3D mandlebrot type fractal
Post by: lkmitch on December 29, 2007, 05:34:33 AM
actually has a name (oops he's lost the reference - there's a surprise!). Finally, Lloyd Mitchell in this thread (http://groups.google.com/group/alt.fractals/browse_thread/thread/95178ace3421cbd2/7e632eae3d58fa9a?lnk=st&q=3d+mandelbrot#7e632eae3d58fa9a) claims that "3d slices of the 4D Mandelbrot set (let the k part of c = 0) do reveal spheres instead of circular disks.", and precedes that with formulae which maybe someone here can follow better than I can. Of course, I'm am very skeptical he's actually found anything.

Wow--it's not often that something I wrote 15 years ago comes back to life!  :-)

I think that the search for a 3D Mandelbrot analog depends on a suitable definition of a 3D number system.  As has probably been pointed out, the more useful extensions of the real numbers have 2^n components, so there isn't a standard 3D system.  Thus, you're free to define your own and see how it works with the Mandelbrot set.

(Lloyd) Kerry Mitchell


Title: Re: True 3D mandlebrot type fractal
Post by: glbn on January 09, 2008, 02:59:53 PM
Hi,

Here's a little program I did long time ago to explore the quaternions fractals:

http://www.cse.yorku.ca/~gilles/fractal.zip (http://www.cse.yorku.ca/~gilles/fractal.zip)

I got some interesting results:
(http://www.cse.yorku.ca/~gilles/smooth2.jpeg)

I can't remember exactly which multiplication I used, but it wasn't the quaternion one.

Gilles


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on January 10, 2008, 03:32:38 AM
interesting screenshot, unfortunately the program crashes at startup :/

edit: it was crashing because of the included opengl dlls, deleted them and it works. unfortunately it still crashes when making high resolution meshes, but i was able to render these with resolution 960:

(http://img219.imageshack.us/img219/4264/3dmandel1wt8.png)

(http://img219.imageshack.us/img219/2023/3dmandel2es2.png)

(http://img135.imageshack.us/img135/3782/3dmandel3rq7.png)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on January 12, 2008, 02:31:52 PM
Quote
Wow--it's not often that something I wrote 15 years ago comes back to life!  :-)

Lol :) I take it what you said back then didn't produce what we're looking for (a Mandelbulb with bulbs on all axis) ?

Hey glbn, that looks pretty cool! Obviously, it's not quite what we're after, but it looks quite nice regardless and although the chance is small, there are certainly areas which could hold more and more detail as you zoom in.

Nice renders Lycium!

As for me, I've almost given up (but then I always say that don't I? ;)). I'm exploring one last idea involving toroidal coords, which could be interesting.


Title: Re: True 3D mandlebrot type fractal
Post by: Karl131058 on November 19, 2008, 04:19:12 PM
Oh, my deeply sleeping thread!
I revive Thee from the dead...  :angel1:


Ok, seriously, after staying away from FractalForums for a while because of RealLife(TM), I came back and (obviously) found this thread. I had a little exchange of mails with twinbee about the formula involved and he has asked me to post the results here. So, here it comes:


twinbee defined (a "few" posts back)

double r    = sqrt(x*x + y*y + z*z );   
double yang = atan2(sqrt(x*x + y*y) , z  ) // that would be theta in std polar coordinates
double zang = atan2(y , x);                      // that would be phi  in std polar coordinates

so I would suppose he has implicitly

x = r*sin(yang)*cos(zang)
y = r*sin(yang)*sin(zang)
z = r*cos(yang)

and I would have expected (doubling the angles!)

newx = (r*r) * sin(yang*2)*cos(zang*2)
newy = (r*r) * sin(yang*2)*sin(zang*2)
newz = (r*r) * cos(yang*2)

but he defines

newx = (r*r) * sin( yang*2 + 0.5*pi ) * cos(zang*2 +pi);
newy = (r*r) * sin( yang*2 + 0.5*pi ) * sin(zang*2 +pi);
newz = (r*r) * cos( yang*2 + 0.5*pi );

which can be simplified by taking into account the symmetries of sin() and cos() to

newx = - (r*r) * cos(yang*2) * cos(zang*2)
newy = - (r*r) * cos(yang*2) * sin(zang*2)
newz = - (r*r) * sin(yang*2)

which is not exactly equal to doubling the angles. :)
... but it leads to interesting pictures.
One DOES NOT need atan2(), sin() and cos() to implement these formulae,
because they can be simplified a lot by using the following identities for any
angle a :
cos(a)*cos(a)+sin(a)*sin(a)=1  (well known, I suppose)
cos(2*a) = cos(a)*cos(a)-sin(a)*sin(a)   (less well known, it seems :))
sin(2*a) = 2*cos(a)*sin(a)

I'll spare you the details, but you end on:

newx = ( x*x + y*y - z*z )*( x*x - y*y) / ( x*x + y*y )
newy = 2 * ( x*x + y*y - z*z )*x*y / ( x*x + y*y )
newz = - 2 * z * sqrt( x*x + y*y )

no trigonometric functions at all, just additions, multiplications, divisions and a squareroot.
There is NO pole on the z-axis, BUT there might be numerical problems because of the
denominator, solvable e.g. by taking

if( abs(y) < really_small_value )
newx = x*x-z*z
newy = 0
newz = -2*z*sqrt(x*x)
else (view above)

(end of simplification)

Interesting side effect: when I first read about "doubling both angles" I wanted
to try that for myself. When doing geometry instead of math, I prefer measuring
the angle theta not against the z-axis, but against the x-y-plane, so in that case

phi = atan2( y, x ) // just like before
theta = atan2( z, sqrt(x*x + y*y) ) // exchange of arguments, angle is positive above, negative below x-y-Plane

then
x = r*cos(theta)*cos(phi)
y = r*cos(theta)*sin(phi)
z = r*sin(theta)

and simply doubling the angles

newx = r*r*cos(2*theta)*cos(2*phi)
newy = r*r*cos(2*theta)*sin(2*phi)
newz = r*r*sin(2*theta)

simplifying this analogous to above gives

newx = ( x*x + y*y - z*z )*( x*x - y*y) / ( x*x + y*y )
newy = 2 * ( x*x + y*y - z*z )*x*y / ( x*x + y*y )
newz = 2 * z * sqrt( x*x + y*y )

IDENTICAL to twinbee's stuff except for the sign in z !

Since I'm sitting at an OLD Mac (350MHz) and try to use POV-Ray to produce pictures I can't show any yet; that takes TIME! But the first little "thumbnails" I produced show that this change of sign dramatically changes the resulting set!

Forgive my ranting - I hope somebody might find these "simplifications" useful - twinbee thought so, at least!

Happy iterating...
Karl


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on February 09, 2009, 12:25:57 AM
Hi Karl,

I've just recently 'modularized' my drawing/mandelbrot algorithms, and so I've been trying to get some results out of your simplified functions such as:

newx = ( x*x + y*y - z*z )*( x*x - y*y) / ( x*x + y*y )
newy = 2 * ( x*x + y*y - z*z )*x*y / ( x*x + y*y )
newz = - 2 * z * sqrt( x*x + y*y )

Pictures are turning up blank so far... any idea why? I'll keep trying anyway...


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on February 09, 2009, 07:17:36 AM
whoa cool, with ~100x speedup it should be possible to compute nice images of this thing, finally and at last :D i suspected there was a nice simplification to be found instead of the constant cartesian<->polar conversions...

i'm busy rendering another (absolutely insane) 3d fractal, once i've got those cycles freed up i'll try do some more 3d mandelbrot pictures  O0

ps. twinbee no idea mate, sorry; it could be a huge number of things (camera pointed wrong way, light intensity set to zero, forgot to comment out this and that, ...)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on February 09, 2009, 01:21:04 PM
Yay, cracked it! I just added Karl's "if( abs(y) < really_small_value )" section, and that seemed to do the trick. The (orthographic) image seems practically identical to the old method (except a difference in 'pixel noise' which is expected really).

Can't wait to see the new 3D renders btw! 100x may be a bit optimistic however - I only managed a 4-5x increase on my setup. However that may be different when working with proper 3D, or it could be because of my own SSC (super sucky code) ;)


Title: Re: True 3D mandlebrot type fractal
Post by: Karl131058 on February 10, 2009, 12:14:29 PM
Hi twinbee,

sorry, haven't been here for a while - my new part time job puts quite a strain on my capabilities to look at a computer screen  :dink:
I'm quite happy that someone made use of my mathematical gymnastics - finally, I might add.

I only managed a 4-5x increase on my setup.

OK - that's not THAT much, but it's SOMETHING. I would seriously love a speedup like that, but I'm looking forward to the next pay check from aforementioned new job; that just MIGHT become a faster computer (crosses fingers)

My pictures came up very fast (and empty!) too, before I worked around that non-singularity with that "really_small_value"-trick...

Happy iterating
Karl


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on February 10, 2009, 01:05:56 PM
If you do get a new CPU, you might want to treat yourself to a quadcore Q6600 from Intel. I've never loved a CPU as much as this, and it's been getting tons of 5 stars from Amazon - it's amazing for multitasking lots of progs simultanesously too + it runs quite cool (at least with the G0 stepping version).

Quote
OK - that's not THAT much, but it's SOMETHING.
Haha, I'm just spoilt ;) I'm guessing you got similar results too?

I wonder if there's a program to simplify all the sine/cosines like you've done. It can't be easy - probably comes under advanced algebra I'm guessing. Thanks again for the results!


Title: Re: True 3D mandlebrot type fractal
Post by: monguin61 on March 17, 2009, 03:06:06 AM
Hi twinbee, I'm a brand new member here. I stumbled upon your page (http://www.skytopia.com/project/fractal/mandelbrot.html) on my quest to understand how to render the "whipped cream" Julia quaternions. I've always liked how they look... but there's something missing... I was so glad to find your page documenting your attempt to find this object. Ever since I wrote my first crappy Mandelbrot program (probably ten years ago), I've had the same question you do, about a "true" 3D Mandelbrot fractal solid. I just wanted to post to let you know that I understand EXACTLY what you're looking for, and why its so enticing. I briefly searched for this thing years ago, but gave up pretty quickly. Some of the images I've seen here and on your page make me think that it does exist though.

Also, while looking over the description of your 3D multiplication, I wondered why you doubled both angles - that has kind of a weird effect. Wouldn't it be better to double the angle between your number, and the number 1 (for simplicity, say 1=(0,0,1))? This is similar to your approach, but not exactly the same thing. It makes the multiplication operation a little more uniform, in that all points on the circle of constant r and phi, but varying theta, will end up on another circle of constant, but different, r and phi. Did you try this at all? (sorry if that's hard to follow - I can clarify with a diagram if necessary)

lyc, it seems that most of your renders attached to your older posts are gone, are those still available anywhere?

Quote
I wonder if there's a program to simplify all the sine/cosines like you've done. It can't be easy - probably comes under advanced algebra I'm guessing. Thanks again for the results!
I use my TI89 frequently (it uses a program called Derive). There's also Mathematica, and Maple. Matlab has a symbolic manipulation package that just uses Maple.

[sorry for reviving a dying thread, but I was totally astounded to find another person in the world searching for this]


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on March 17, 2009, 07:11:44 PM
Hey there, welcome to the forum!

Great to see someone else interested in the search too. It's almost like hunting for the yeti, loch ness, or UFOs, except at least this has a chance of existing ;) Kinda weird to see this kind of thing in abstract maths, rather than on a material level too. And yeah, the reward is definitely enticing.

There was a thread recently at povray.org that you may find interesting. Goes into a little bit more detail about whether it exists, and how one would render such a beast (in terms of lighting, iteration level etc.):
http://news.povray.org/povray.off-topic/thread/%3C48d7d290%241%40news.povray.org%3E/?mtop=9

I'd be happy to try out your suggestion and post the results here, but I can't quite follow your description so a diagram would be nice. Feel free to to use my 'sphere' as a template:
http://www.skytopia.com/project/fractal/sphere.png

Actually, even better, if you know a little programming, you could alter the function below. I've kept it as the 'slow' long way for clarity:

Code:
// A triplex number is a '3D' number
triplex multiply(triplex a, triplex b) {
    triplex n;
    double pi=3.14159265;
    double r    = pow(a.x*b.x + a.y*b.y + a.z*b.z , 0.5);
    double yang = atan2( pow(a.x*b.x + a.y*b.y, 0.5) ,      a.z  )  ;
    double zang = atan2(a.y , b.x);
    n.x = (r*r) * sin( yang*2 + 0.5*pi ) * cos(zang*2 +pi);
    n.y = (r*r) * sin( yang*2 + 0.5*pi ) * sin(zang*2 +pi);
    n.z = (r*r) * cos( yang*2 + 0.5*pi );
return n;
}


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on March 18, 2009, 12:21:31 PM
fixed the links, they now point to imageshack instead of fractographer.com (RIP)


Title: Re: True 3D mandlebrot type fractal
Post by: monguin61 on March 19, 2009, 01:41:47 AM
(http://img208.imageshack.us/img208/3691/mult3d.png)
What you're doing, as I understand it, moves point z1 to point z3. You can see both the vertical angle phi and the lateral angle theta changing. I'm wondering if, in order to come up with the right 3D multiplication operation, you need to capture the qualitative behavior of the complex numbers, and make the 3D multiplication resemble the 2D multiplication as closely as possible. That said, I think it might make more sense to change only the vertical angle phi, which would move point z1 to point z2. My reasoning is that, with complex numbers, squaring z doubles the angle between z and unity. To make that happen with 3D numbers, assuming unity=(0,0,1), only phi needs to change.

After my last post, though, I thought of another issue: with complex numbers (but NOT quaternions), there is a finite set of points that, when squared, get you to negative one (for complex numbers, z = +-i; for quaternions, any z with |z|=1 and Re{z}=0). I wonder if that is another important 'feature' of the multiplication operation? If so, then neither your definition, nor my suggestion will work: any point with phi = 90 will yield -1 after squaring. So, maybe the multiplication needs to depend on theta in some more complicated way? I guess the question here is whether it should behave more like the complex numbers, or more like the quaternions. If we say complex numbers, then the obvious answer is to say that (1,0,0), (-1,0,0), (0,1,0), (0,-1,0) need to yield -1, while no other points do. I'm not yet sure how best to realize that concept through formulas. Or... maybe this has no effect at all on the result.

I hope that all sort of makes sense. I've been thinking about this stuff a lot in the last few days, because I'm afraid if I stop pursuing it, I'll lose track of all these ideas in my head. Maybe none of it will go anywhere, but I at least want to check it out.

lycium, what method were you using to render those surfaces? How long did it take to generate a surface that showed some basic detail? I'm wondering if I can put something together to try out different approaches on my own.


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on March 19, 2009, 11:59:57 AM
Oh right, just doubling the phi angle, instead of both the phi and theta? You bet I tried that :)
AFAICR, I got the 2nd b/w pic on that article:
http://www.skytopia.com/project/fractal/mandel3d6.png

Also, tried doubling theta only, and with most combinations of offsets (the +0.5pi bits in the function) etc.

Can't say I tried everything though. Good thinking with trying to emulate complex numbers more closely. The chances of finding it may be slim, but that's offset against how cool it would look  ;D

Yay, 100 posts!




Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on May 24, 2009, 09:01:30 PM
Hi all, was just having another play with the quaternionic Mandy - some results:

q^2+c where q is (x,y,z,w) but with x and z swapped on each iteration prior to squaring:

(http://fc00.deviantart.com/fs42/f/2009/144/1/c/3D_Mandelbrot_Buds_attempt_by_MakinMagic.gif)

As you can see this produce "projections", though not really "bulbs", but it is reminiscent of the complex Tricorn (Mandelbar) which can be created by either z=conj(z) or z=flip(z) prior to squaring.
Anyway I wondered what Julias from this would be like, so here's one, I think they look promising (I mean as interesting and slightly different Julia sets)...

(http://fc02.deviantart.com/fs43/f/2009/144/f/5/3D_Buds_Julia_set_by_MakinMagic.gif)

I also wondered what happens if you do something closer to how the complex Tricorn is created, so I thought I'd try a version of "flip" like this (corrected for "zero" issues):

d = sign(y)/sqrt(y*y+z*z+w*w)
y = x*y*d
z = x*z*d
w = x*w*d
x = 1/d

Note I tried "flip" because the equivalent of "conj" just produces the plain 3D rotation of the complex tricorn.
The Mandelbrot is probably the most boring "fractal" I've ever seen, but again the Julias look promising:

(http://fc05.deviantart.com/fs44/f/2009/144/5/3/__Tricorn___3D_Julia_by_MakinMagic.jpg)

Edit:
I confess and offer my apologies - I should have been more careful when testing this. The Julia that produced this image was such that the above line:

x = 1/d

was actually executed as

x = sign(x)/d

in other words it wasn't a correct quaternionic analogue to complex flip.
Doing it correctly also turns the Mandy version into the correct slightly more interesting 3D rotation of the complex "flip" Tricorn.

Edit:
Of course the main problem with this sort of manipulation (and the others used earlier in this thread) is that it makes it more difficult to get efficient rendering - because the formulas end up effectively treating what are normal 4D numbers in standard quaternionic form as numbers in a more generalised 4D form so normally "brute force" ray-tracing is required since you can't use the simple quaternionic derivative to get the distance estimation.
I suppose one could write the mathematical algorithm to get the derivative treating the iterated formula as a general 4D one but I guess that would require the differentiation of a full general 4D system using the Jacobians ..... anyone care to have a go, or would that end up making the distance estimator method as slow as the "brute-force" method ?


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on May 25, 2009, 04:22:36 AM
Nice renders - always good to see these things animated!

Look forward to more results as always...


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on May 25, 2009, 09:23:13 PM
Hi all, take a look at this IFS:

(http://fc04.deviantart.com/fs44/f/2009/145/5/7/Pure_Julia_IFS_by_MakinMagic.jpg)

http://makinmagic.deviantart.com/art/Pure-Julia-IFS-123685891 (http://makinmagic.deviantart.com/art/Pure-Julia-IFS-123685891)

As the comment says it was entirely created from 4 complex Julia Set transforms.

The reason I post this here is that using the same method with quaternionic Julia Sets for 3D/4D IFS could be used to produce the same thing but made up of many spheres (essentially q^2+0) or other Julia Set shapes - essentially giving the "3D bulb" effect.
Actually the results would probably be similar to the images produced using Indra's Pearls except that the "spheres" could be any shape of quaternionic Julia and it would of course be simple to mix in affine transforms too.
The only problem is that writing an efficient rendering method for such 3D objects isn't trivial, though I think getting distance estimation would be possible.


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on May 25, 2009, 11:53:19 PM
i am thinkin a lot about realtime fractals now adays, i am searching for nice methods to display on
todays gfx hardware, rendering quaternions is like displaying a iso-surface of a function ...
this is a bit expensive .... but i like the method of iterated function systems ( with extended functions introduced with the flames algorithm.. ) 
and symmetry ... i will simply plot millions of dots somehow ... :D

cheers
ck


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on May 29, 2009, 04:20:19 AM
Hi all,

Another one - this time swapping y and z in (x,y,z,w) on every iteration prior to squaring (not exactly a "True 3D Mandelbrot Set" but I'm rather pleased with it).

(http://fc02.deviantart.com/fs45/f/2009/148/e/c/RockBrot_by_MakinMagic.gif)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on June 02, 2009, 02:25:12 AM
Hey that's neat - so near yet so far...


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 06, 2009, 09:49:23 PM
Hi all,

I decided to try Kerry's suggestion of using a truly 3D based number system i.e.

*|  r   i   j
_________
r | r   i   j
i | i  -r   ?
j | j   ?  ?

The best result was from this:

*|  r   i   j
_________
r | r   i   j
i | i  -r   i
j | j   i  -r

e.g.  (for z^2+c)

              xi = mx
              mx = mx*mx - my*my - mz*mz + x
              my = 2.0*(xi*my + my*mz) + y
              mz = 2.0*xi*mz + z

Edit:

Result is this:

(http://www.fractalforums.com/gallery/0/141_07_06_09_12_55_51.gif)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 07, 2009, 04:33:25 AM
Hi all,

Here's my best effort so far:

(http://fc00.deviantart.com/fs49/f/2009/157/0/6/4D_Mandy_by_MakinMagic.gif)

http://makinmagic.deviantart.com/art/4D-Mandy-125047448 (http://makinmagic.deviantart.com/art/4D-Mandy-125047448)

This is using 4D numbers as follows:

* | r   i   j   k
-------------
r | r   i    j   k
i | i  -r   k   j
j | j   k  -r  i
k | k  j   i  -r

Which gives z^2+c:

              xi = mx
              yyy = my
              zzz = mz
              mx = mx*mx - my*my - mz*mz - mw*mw + x
              my = 2.0*my*xi + 2.0*mz*mw + y
              mz = 2.0*mz*xi + 2.0*yyy*mw + zz
              mw = 2.0*(mw*xi + yyy*zzz) + w


Title: Re: True 3D mandlebrot type fractal
Post by: bib on June 07, 2009, 03:24:03 PM
The last one is very impressive and quite similar to what one would expect to see: same global shape, nice symmetries. However, there are still smooth surfaces when the 2D M-set border is never smooth. Is it because of a low number of iterations?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 07, 2009, 03:44:51 PM
The last one is very impressive and quite similar to what one would expect to see: same global shape, nice symmetries. However, there are still smooth surfaces when the 2D M-set border is never smooth. Is it because of a low number of iterations?

Yes - bailout is only x^2+y^2+z^2+w^2>4 and it's solid at just 11 iterations (using solid at a given iteration with an optimised "brute force" method for finding the intersections). I added the formula to my version of mmf.ufm:Sold-3D Quaternions, I'll probably upload the new version to the UF database later today.
Ideally it should use a distance estimator method but that requires the derivative and as far as I know the only way of getting that for the number system used is the full derivation of the derivative of 4 functions of 4 reals, which I was too lazy to calculate :)
Using the dstance estimator one could get a lot more detail in the smooth areas without losing it in the complicated areas (also rendering would actually probably be more efficient).


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 08, 2009, 10:41:09 AM
Hmmm - doesn't look quite so good when in more detail, here it is solid at 20 iterations instead of 11:

(http://fc01.deviantart.com/fs44/f/2009/159/0/d/__True_3D___Mandelbrot_by_MakinMagic.jpg)


This image really shows up the necessity of rendering it using solid based on distance estimation (or iteration density) rather than using plain iteration.


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on June 08, 2009, 06:30:50 PM
That's actually pretty good. If you have the CPU cycles to spare, I wouldn't mind seeing the zoomed in sections outlined by the green boxes. Chances are we'll see whipped cream, but at least it won't be UHT ;)

(http://www.skytopia.com/stuff/mandzoom.png)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 08, 2009, 06:44:55 PM
When I get home I'll post the UPR for it here - mmf.ufm:Solid-3D Quaternions is the formula which I have updated to the UF formula database but there are still issues with the compiled zip files not updating so if you want to get the update you'll probably have to download the updated version of mmf.ufm manually from:

http://formulas.ultrafractal.com/cgi-bin/formuladb?changes (http://formulas.ultrafractal.com/cgi-bin/formuladb?changes)

For anyone impatient, once you've got the updated mmf.ufm just select the Solid-3D Quaternions formula and then set the fractal type parameter to "Alternative q^2+c" :)

Note that with the formula UF's zoom does not work correctly if the viewing rotation parameters in the formula are not zero - you need to set the "x, y, z" target parameters etc. by hand.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 08, 2009, 11:39:01 PM
Hi all, here's a UPR for the main minibrot - visually centred at -1.76 on the x axis (not the one twinbee outlined but the slightly larger one further from the main cardioid).

Code:
MMF-4DMinibrot {
::cRN/Qjn29l5WvtOuRc83DQ+OY4+SLOnjOSzYJZvLIQ3tBFoAnsAb3+cDolps1e0tKJHHnP9d
  ouYzLTO5hEyhD/zRD5wfBS5dysBZ5P94DrWNUMUqErf+5/5qvsazTPXUXsvrZY9qLFHGOJgw
  wVnUFHPNIiiDXVKvq66FRry7kVqeBmq1YsjA2tKrTdoYoXs+J5rFHW9s87F1/cyX3+VSmdrf
  8hxpPusZy2himax6fVm99jdNnrPseVTrMrY4qIiW0K1wpmDiqzlDFty++HfoS22WUfca6q6B
  VnI8rkjyj1i4wHfIvpj8WOOel8tCtDQ4qWVX2JV23FN55ryLKV16gddVVew58q1avJx6uOmD
  G+yf0UWcAf63PLp5XThY/6VtvkPlxEr/lStZ5QxrqV/v/L8psRBafp/is96bi6m52vb0+ip9
  rG21tvP9LvPNUeZR7Ur9nPKuq6pWZN1/5kthOZdvx8KGyOJW/2nv+53/8Fdo2epTgUeZsV0Y
  Kq9FKxkX01PcbiVy6DXFPT/WVq3v1rmsos58gYjeVe7q4LRBpJjze4dRYA9XKhr/dkAmE51C
  1FxmAtxcREMFdZ0eOdAhi5zDldTBdpKfg6qlMcaqd6jUaTRjTnaNsf+heoaxVtgNtWelv/2j
  QeXT9ghr7pl2y3+MJd0+WX9ZmOlOhMN/bmok0oPVNvq0CMGGUOR3eO9feg6P63t5SGg5JqXr
  2TKS8J370zMMQnEmsPv0zZ05tOjRMjgZlWCCzuZ0JDZZpeVm04gag20Eb0ztvS2tEv1N7Lql
  dzn1o2HUtUx84WU2JZ9R19DCT1Z/L6YtUXROtJ2+qsc5sju7yT/9Rh7JyZHADHGu2qoTXHrL
  GOfQRGP3rolVfTzvUWuasZ/cpDN0wpOV/pmyDznxv1NMIWHjF10KukR1Foi/ziLTaMKY0Y5+
  UbQsO8v/XC/23wE6vxpJhrXGCnjT6+Aalvvn+GVk1PMP4VzOvP3hae5ezsGqcpT8N9JZ6ep5
  Dl7rimvcpc/PR3o8CdjR+vWteesgXf5oqW1Vkpvl7+cI70kkkv7rmPyOauq5Alzeq41VRJ30
  oXpOQbm4m4EDFGvXeut++KK4TDTvZqSSHJqaFRGTR+KtrTHG+N6qTZ5i1ix7W/WRtS2tY7QR
  myaqHOXVdVYEndtnmv/S3X9W79o5osqSevud0/ilN3xulNXI/v3/ElUbJHSu9TqxkLVvqK7F
  bvlPO1choD9Grfep8Y49ClbJlQnsSXf494kSPm9qJFM3i0aGNXhdTwIPBjsEMyOhXTKAw9HU
  tmgrmgnmgtKVtgVcS9iCALRRXRxZRtOxgWxKaJKKQMI1S0NMZ0NeB7GLR3YJK1LJYbasTaN2
  Naj9UN2S1Y30asA3Fg2hbirqJeqm4mYTsC3EBsNIyOzmykES9EO1KcTtUNVEHkAu5gtuR7WP
  R3KADR1jHbnF2Ki2Fks1ONszV4dcHF2Zp9OzqTS4dCMJIOxOTExVhF5XiRmM1e0DnAnstNYj
  z+Xkf1WEXoTW3Yqv2JwM6JLQcAG5lzj8q9i8L+ITbsPkM6k9KQlg0/JkbCC5SQo/Kg3vMTLv
  2D7gVvEUBZYwO3c0GvngNs5Idln5ao9yMe1rwGBEslJL5VeG5XfSmQwJNp9KEjsXkYxGIIy8
  OA4HQMhPgYC8ETgjYCsETwgYC+ETghYCsETghYCuETwmYCOETwkYC+ETwmYCOET4HSMBHiJ4
  TMBGiJwQMBTiJYRMBXiJ4SMBGiJYSMBXiJ4SMBXiJwQMBHiJYRMBPiJ4SMBeiJYSMBLiJ4RM
  BGiJwQMBTiJYRMBWiJ4SMBGiJYSMBXiJ4TMBXiJwQMBHiJYRMBfiJwQMBGiJYSMBLiJwRMBX
  iJwQMBTiJ4TMBGiJ4SMBeiJYSMBHiJwQMBOiJwRMBLiJwQMBGiJ4RMhPgYCWETwjYCfAxE8I
  mAHxEcJmgHxE4ImAHxE4ImgFxEYJmAHxE8ImwHQMBbiJwQMBeiJ4RMBOiJ4RMBOiJ8BET8HQ
  MxPgYi8ETkjYisET0gYi+ETkhYisETkhYiuET0mYiOET0kYi+ET0mYiOET8HSMRHiJ6TMRGi
  JyQMRTiJaRMRXiJ6SMRGiJaSMRXiJ6SMRXiJyQMRHiJaRMRPiJ6SMReiJaSMRLiJ6RMRGiJy
  QMRTiJaRMRWiJ6SMRGiJaSMRXiJ6TMRXiJyQMRHiJaRMRfiJyQMRGiJaSMRLiJyRMRXiJyQM
  RTiJ6TMRGiJ6SMReiJaSMRHiJyQMROiJyRMRLiJyQMRGiJ6RMxPgYiWET0jYifAxE9ImIHxE
  dJmoHxE5ImIHxE5ImoFxEZJmIHxE9Im4HQMRbiJyQMReiJ6RMROiJ6RMROiJaTMJjF19FaA3
  f9tPf9vN/OnlV7LU1jvketLHKyzP3r0HZiHf18qszlyOqPO3tv4dFVRt86/L1Uup4tc8jj9P
  +0/+T/xJ5hmL9zvH/J7G+of90TTfsLoz0hL9QRy9Obmpz9jCOWW31Ms8C3zfJvOSQPS1DP+w
  0D30XyT/lhyJqa5EV15bdlVu24DdJ/SeTH+ElOaOP4LRdTt6xHO2JPoTTjj1X10Mca8BS/9E
  ej4y63AenYTSMMbKi2smMGFtNJc2KsdEsONQ8udxR7imHCTxZ7b3FmGGmuYf72Fhi3GvLNa8
  g28Y72tMWSaaKERHlm/yhmBKxpXizlvrIETu+/xgBG9y
}

Edit:

Animation now here:

http://www.fractalforums.com/gallery/?sa=view;id=684 (http://www.fractalforums.com/gallery/?sa=view;id=684)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 09, 2009, 02:38:01 AM
Hi all,

I guess you all probably noticed that that "True 3D" Mandy looks closer to a quaternionic Mandy than a normal hypercomplex Mandy ?
Well just by changing two signs in the 4D multiplication table gives you an alternative "True 3D" Mandy but this time closer to hypercomplex than quaternion i.e. squarry rather than roundy:

(http://fc02.deviantart.com/fs44/f/2009/159/b/9/__True_3D___Mandy_Squarry_by_MakinMagic.gif)

http://makinmagic.deviantart.com/art/quot-True-3D-quot-Mandy-Squarry-125272102 (http://makinmagic.deviantart.com/art/quot-True-3D-quot-Mandy-Squarry-125272102)

The only changes to the multiplication table I posted earlier are that i*j = j*i = -k instead of +k.
In z^2+c this just gives w = 2*(x*w - y*z) instead of w = 2*(x*w + y*z).


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 09, 2009, 10:38:55 AM
excellent work dave, the earlier "roundy" (hehe) mandelbrot looks pretty much exactly like what i'd expect a 3d mandelbrot to look like!

especially cool is that you're using distance estimation to intersect the surface, so you get very fine solid details with a relatively short computation; in my algorithm i mark cells as containing surface once i've probabilistically intersected it, so i'll miss a lot of details at first and as the render progresses it gets more accurate (hence i do a kind of warmup before the proper render). horrible :P

looks like you've got this one licked, congratulations are due for your fruitful directed efforts.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 09, 2009, 10:43:00 AM
Ideally it should use a distance estimator method but that requires the derivative and as far as I know the only way of getting that for the number system used is the full derivation of the derivative of 4 functions of 4 reals, which I was too lazy to calculate :)
Using the dstance estimator one could get a lot more detail in the smooth areas without losing it in the complicated areas (also rendering would actually probably be more efficient).

ah whoops, i thought you were using distance estimation for your recent renders. regarding the analytic derivatives, there's always maple (which can output c code for functions)! i've used it in the past to do analytic integration of functions over the sphere against spherical harmonic basis functions, it works a treat and seems pretty indifferent to the complexity of the function at hand.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 09, 2009, 11:38:47 AM
Ideally it should use a distance estimator method but that requires the derivative and as far as I know the only way of getting that for the number system used is the full derivation of the derivative of 4 functions of 4 reals, which I was too lazy to calculate :)
Using the dstance estimator one could get a lot more detail in the smooth areas without losing it in the complicated areas (also rendering would actually probably be more efficient).

ah whoops, i thought you were using distance estimation for your recent renders. regarding the analytic derivatives, there's always maple (which can output c code for functions)! i've used it in the past to do analytic integration of functions over the sphere against spherical harmonic basis functions, it works a treat and seems pretty indifferent to the complexity of the function at hand.

:D Imagine how good it's gonna look using DE - or alternatively solid based on iteration density.
I think I'll have a go at trying it using DE this evening, it's not just the derivative that put me off though - at the moment I haven't a 3D formula of my own geared towards DE, maybe I'll try modifying a private copy of Ron Barnett's 3D Quat formula.
When playing with the 4D multiplication tables I noticed that these "True 3D" formulas mathematically speaking are most closely related to the standard hypercomplex method, for z^2+c they are a family such that:

new x = x^2 - y^2 - z^2 +/- w^2
new y = 2.0*(x*y o w*z)
new z = 2.0*(x*z o w*y)
new w = 2.0*(x*w +/- y*z)

Where o is +/-, this gives a family of 8, though for z^2+c it's 2 identical sets of 4. Of the 4 I've added 3 different non-hypercomplex types to my version of mmf.ufm:Solid-3D Quaternions and will upload it to the UF database this evening.


Unfortunately I don't have Maple (or Mathematica or similar software).


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on June 09, 2009, 11:50:05 AM
in fact it gets more interesting :D

can you create an image with ~250 iterations ?  O0 O0 O0


Title: Re: True 3D mandlebrot type fractal
Post by: bib on June 09, 2009, 11:53:10 AM
You guys are totally crazy! What is more useless than a 3D brot? I love that :)


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 09, 2009, 12:27:46 PM
Unfortunately I don't have Maple (or Mathematica or similar software).

no problem, just head on down to your local university and find a physics/maths professor; they're always chomping at the bit for interesting problems to solve (refreshing break from developing solutions in search of a problem). a good heuristic is to ask the one with the wildest, most unkempt hair  O0


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on June 09, 2009, 02:39:25 PM
You guys are totally crazy! What is more useless than a 3D brot? I love that :)


two 3d brots?  O0


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 09, 2009, 04:33:48 PM
in fact it gets more interesting :D

can you create an image with ~250 iterations ?  O0 O0 O0

You could, but in order to render and see all the detail it would have to be phenomenally large (to get the difference between 249 iterations and 250 iterations as big as a whole pixel even in the densest areas).


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 09, 2009, 04:35:05 PM
What is more useless than a 3D brot?

Art ? :D ;)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 09, 2009, 04:47:06 PM
What is more useless than a 3D brot?

Art ? :D ;)

:) I can't resist the temptation :-

Climbing mountains
Racing fast cars
Having sex with no intention of having children
Looking for weapons of mass destruction in Iraq
Using sanctions to stop countries nuclear weapons testing
Watching TV
Sunbathing
Finding the solution to Fermat's last theorem
Calculating pi to more than 100 significant figures
.
.
.
.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 10, 2009, 01:17:27 PM
:) I can't resist the temptation
nor can i... what a strange, strange selection of examples! the over-arching theme in my replies is that one should try to see the world beyond one's own chosen set of values, and that just because something is useless to you or me, doesn't mean it's intrinsically useless.

Climbing mountains
some like to make fractals, some like to climb mountains.

Racing fast cars
much as i dislike racing, not all recreation needs to be intellectual.

Having sex with no intention of having children
this one is by far the strangest; there's nothing wrong with consensual sex, and the last thing our poor planet needs is more people.

Looking for weapons of mass destruction in Iraq
this serves as a convenient excuse for all sorts of dodgy manoeuvres... no moral explanation however.

Using sanctions to stop countries nuclear weapons testing
it should somehow be strongly disincentivised, and limiting the growth of a militaristically-inclined nation (e.g. north korea) is difficult to logically argue against.

Watching TV
that's a personal judgement, but i'm with you 100%. it's a first class, fully addictive and mind-altering drug. then again, so is alcohol, which is notably absent from this list...

Sunbathing
personal judgement, and i agree, but some people want to attract others; instead of blaming the effect, why not find fault in the cause - that people find tanned skin attractive.

Finding the solution to Fermat's last theorem
so some purely intellectual pursuits (making fractals) are definitely less useless than others?

Calculating pi to more than 100 significant figures
as above, try not to be so biased :P


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 10, 2009, 01:19:10 PM
and while the thread is getting derailed, i might as well play the trump card of all useless (and harmful) human activities: religion!


Title: Re: True 3D mandlebrot type fractal
Post by: pnorthover on June 10, 2009, 09:13:56 PM

"useless (and harmful) human activities: religion!"


There are advantages at the individual level, like a membership that helps each other out a little more than can be expected of dog eat dog. 

I'd have said war was the most useless and harmful of human activities. 


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on June 10, 2009, 09:27:01 PM
@pnorthover: indeed!

and, isnt fractalism ( or science in general ) just another religion ?

in the meaning that you need to believe in something ...  :evil1: :alien:


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 10, 2009, 09:54:41 PM
:) I can't resist the temptation
nor can i... what a strange, strange selection of examples! the over-arching theme in my replies is that one should try to see the world beyond one's own chosen set of values, and that just because something is useless to you or me, doesn't mean it's intrinsically useless.

Climbing mountains
some like to make fractals, some like to climb mountains.

Racing fast cars
much as i dislike racing, not all recreation needs to be intellectual.

Having sex with no intention of having children
this one is by far the strangest; there's nothing wrong with consensual sex, and the last thing our poor planet needs is more people.

Looking for weapons of mass destruction in Iraq
this serves as a convenient excuse for all sorts of dodgy manoeuvres... no moral explanation however.

Using sanctions to stop countries nuclear weapons testing
it should somehow be strongly disincentivised, and limiting the growth of a militaristically-inclined nation (e.g. north korea) is difficult to logically argue against.

Watching TV
that's a personal judgement, but i'm with you 100%. it's a first class, fully addictive and mind-altering drug. then again, so is alcohol, which is notably absent from this list...

Sunbathing
personal judgement, and i agree, but some people want to attract others; instead of blaming the effect, why not find fault in the cause - that people find tanned skin attractive.

Finding the solution to Fermat's last theorem
so some purely intellectual pursuits (making fractals) are definitely less useless than others?

Calculating pi to more than 100 significant figures
as above, try not to be so biased :P

:D
They were all meant humorously - though not all in the same way :)
In no case was I necessarily giving my own beliefs - except....sorry I'll stop because it's already way OT :)

Edit: I guess that in most cases I was just making the point that anything recreational could be seen as "useless" :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 10, 2009, 10:13:21 PM
OK back on topic - I assumed that getting the derivative of the "True 3D" formulas I've been using would require some complicated maths involving the Jacobian for 4 functions of 4 reals but after considering the Jacobian for complex and quaternionic z^2+c it appears that only the first column from the Jacobian is required to get the derivative - is this correct or am I missing something ?

If you consider complex z^2+c as:

f1(x,y) = x^2 - y^2 + cx
f2(x,y) = 2*x*y + cy

Then the Jacobian is:

| 2x -2y |
| 2y  2x |

Take the first column gives (2x,2y)  i.e. 2x+flip(2y) i.e. 2*z

Similarly for quaternionic q^2+c:

f1(x,y,z.w) = x^2 - y^2 - z^2 - w^2 + cx
f2(x,y,z,w) = 2*x*y + cy
f3(x,y,z,w) = 2*x*z + cz
f4(x,y,z,w) = 2*x*w + cw

Then the Jacobian is:

| 2x -2y -2z -2w |
| 2y  2x    0     0 |
| 2z   0   2x     0 |
| 2w  0    0    2x |

Again taking the first column gives (2x,2y,2z,2w) == 2*q

So given that the first column of the Jacobians for the "True 3D" hypercomplex-like family are the same as the quaternion do I take it that for all members of this family then the derivative of f^2+c is simply 2*f ?


Title: Re: True 3D mandlebrot type fractal
Post by: pnorthover on June 10, 2009, 11:40:43 PM

"isnt fractalism ( or science in general ) just another religion ?"

Not for me, but if you want to worship fractals or science, go ahead! 

"in the meaning that you need to believe in something ...  :evil1: :alien:"

You don't have to believe in anything. 

Anyway, I was just providing a counter example to the claim that religion is useless and harmful. 


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 11, 2009, 03:04:27 AM
Anyway, I was just providing a counter example to the claim that religion is useless and harmful.  
we'll have to weigh that (admittedly valid, although human brotherhood shouldn't be based on fictitious beings) counterexample against the crusades (http://en.wikipedia.org/wiki/Crusades)  :-X

anyway back on topic, although it is far from "clean" i think the full jacobian would be required and that it is only a numerical coincidence that a factor of 2 appears throughout the first column.

furthermore, all that's involved is differentiation, which is easy enough (mechanical, unlike integration), and getting a determinant (which is also pretty easy and mechanical). hence my suggestion to use a symbolic algebra package to do the grunt work :)

by the way i think matlab should be able to do this, in which case the free clone called "octave" should be good for the job.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 11, 2009, 12:55:48 PM
Anyway, I was just providing a counter example to the claim that religion is useless and harmful.  
we'll have to weigh that (admittedly valid, although human brotherhood shouldn't be based on fictitious beings) counterexample against the crusades (http://en.wikipedia.org/wiki/Crusades)  :-X

anyway back on topic, although it is far from "clean" i think the full jacobian would be required and that it is only a numerical coincidence that a factor of 2 appears throughout the first column.

furthermore, all that's involved is differentiation, which is easy enough (mechanical, unlike integration), and getting a determinant (which is also pretty easy and mechanical). hence my suggestion to use a symbolic algebra package to do the grunt work :)

by the way i think matlab should be able to do this, in which case the free clone called "octave" should be good for the job.

I thought it might be more complicated...unfortunately higher calculus (partial derivatives, differential equations, multivariable differentiation and integration) are the parts of my education that I seem to have lost (in any case I only did maths to Further Maths "A" level and even then only attended about half the lessons and consequently just scraped a pass grade "E" in Further Maths).
I need to get a book on multivariable calculus from the library....doing it for specific cases with Matlab/Octave etc. doesn't cover allowing general cases of 4 functions in 4 variables which is something I'd like to include in my 3D+ formulas.
So it may be several days before I have a working version using DE.
Incidentally while it was easy to do I tried a modification of Ron Barnett's 3D raytrace formula (in reb.ufm) such that the running derivative was calculated as if the number form was quaternionic and the iteration was performed using the "roundy" "True 3D" method and was surprised to find that it worked to some extent - then I tried "correcting" the calculation of the running derivative to use the roundy True 3D multiplication instead of quaternionic multiplication and the result was a resounding mess :)


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 11, 2009, 01:22:45 PM
I thought it might be more complicated...unfortunately higher calculus (partial derivatives, differential equations, multivariable differentiation and integration) are the parts of my education that I seem to have lost (in any case I only did maths to Further Maths "A" level and even then only attended about half the lessons and consequently just scraped a pass grade "E" in Further Maths).
my maths education mostly stops at 2nd year and i usually got poor grades, except in courses of genuine interest like numerical methods. fortunately, with some effort and the right materials (http://lyc.deviantart.com/art/wall-of-pixels-124527417) we can eventually master it :)

I need to get a book on multivariable calculus from the library....
i can recommend thomas' calculus (pictured above with erwin kryzig's differential geometry) for calculus 2; tomorrow i hope to get my new (http://geometricalgebra.org/index.html) books (http://press.princeton.edu/titles/8350.html) from amazon, and begin a nice fractal-oriented weekend of study :)

doing it for specific cases with Matlab/Octave etc. doesn't cover allowing general cases of 4 functions in 4 variables which is something I'd like to include in my 3D+ formulas.
yes, that's ultimately the right way to do it (expand the parameter space), as it enlarges the artistic possibilities of a given method. flame fractals are awesome because they are high-dimensional O0 in this vein it shouldn't be too difficult to work with a slightly more general cayley table, where the products don't always have a coefficient of +/- 1.

Incidentally while it was easy to do I tried a modification of Ron Barnett's 3D raytrace formula (in reb.ufm) such that the running derivative was calculated as if the number form was quaternionic and the iteration was performed using the "roundy" "True 3D" method and was surprised to find that it worked to some extent - then I tried "correcting" the calculation of the running derivative to use the roundy True 3D multiplication instead of quaternionic multiplication and the result was a resounding mess :)
that sounds like quite a battle you had; the results are great though, especially the fly-around animations. i'd really like to see that mess btw, one of the coolest things about computer graphics is the weird error images you get!


Title: Re: True 3D mandlebrot type fractal
Post by: pnorthover on June 11, 2009, 02:55:34 PM
"fictitious beings"

God has neither been proved nor disproved. 

"the crusades"

Not a religious function.  I say unto you, "Go Forth and KILL!!"  I don't think so.   ;)


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 11, 2009, 03:23:22 PM
God has neither been proved nor disproved.
Nor have the gnomes that come in the night and steal my socks so as to leave odd numbers in my drawer ??? Of course the onus is on everyone else to prove my theory wrong, it's perfectly reasonable when looked at logically - some unseen force of considerable ingenuity and complex character must be responsible...

Anyway, Marcus Aurelius long ago summed up everything there is to meaningfully consider about higher powers: http://www.goodreads.com/quotes/show/63966 I will do my best to leave my heretical thoughts on the matter at that  :-X


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 11, 2009, 04:34:26 PM
I need to get a book on multivariable calculus from the library....
i can recommend thomas' calculus (pictured above with erwin kryzig's differential geometry) for calculus 2; tomorrow i hope to get my new (http://geometricalgebra.org/index.html) books (http://press.princeton.edu/titles/8350.html) from amazon, and begin a nice fractal-oriented weekend of study :)


Thanks - I'll investigate those.


doing it for specific cases with Matlab/Octave etc. doesn't cover allowing general cases of 4 functions in 4 variables which is something I'd like to include in my 3D+ formulas.
yes, that's ultimately the right way to do it (expand the parameter space), as it enlarges the artistic possibilities of a given method. flame fractals are awesome because they are high-dimensional O0 in this vein it shouldn't be too difficult to work with a slightly more general cayley table, where the products don't always have a coefficient of +/- 1.

It also allows the possibility of 4 functions of 4 variables where some of the functions are like this:

f1(x,y,z,w) = log(x) + sin(y) + y*z + z^2 + 3*x*z + tan(w)

etc.

Incidentally while it was easy to do I tried a modification of Ron Barnett's 3D raytrace formula (in reb.ufm) such that the running derivative was calculated as if the number form was quaternionic and the iteration was performed using the "roundy" "True 3D" method and was surprised to find that it worked to some extent - then I tried "correcting" the calculation of the running derivative to use the roundy True 3D multiplication instead of quaternionic multiplication and the result was a resounding mess :)
that sounds like quite a battle you had; the results are great though, especially the fly-around animations. i'd really like to see that mess btw, one of the coolest things about computer graphics is the weird error images you get!

Well actually all the renders I've posted were done using my mmf.ufm:Solid-3D Quaternions formula to which I've added the 3 interesting not-quite-standard-hypercomplex variants.
That formula is just solid on iteration count but performs reasonably well as I included every trick I could think of to improve speed and accuracy.
Testing the "roundy True3D" in Ron's DE raytracer only took about an hour altogether :)


Title: Re: True 3D mandlebrot type fractal
Post by: pnorthover on June 11, 2009, 09:38:33 PM
"Nor have the gnomes that come in the night and steal my socks so as to leave odd numbers in my drawer ???"

God is a unique case.  If there is a supreme deity, there can only be one.  That's the meaning of supreme.  Do you claim your gnomes are God?  If so, then it becomes a question of naming.  If not, then your statement is meaningless.  What properties do you claim for your gnomes (or flying toasters, or spaghetti monster etc.) that match the properties claimed for God? 

"Of course the onus is on everyone else to prove my theory wrong"

Since God's existence cannot be proved or disproved, onus is irrelevant. 

" - some unseen force of considerable ingenuity and complex character must be responsible..."

In the case of "God", *may* be responsible.  Or not.  There is no answer.  Which is why off topic religious potshots should be avoided.  Where did you think it was going to get you? 


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on June 14, 2009, 09:55:14 PM
I suppose the discussion of whether God exists is actually pretty related to this thread in a funny roundabout kind of way. Because it takes a certain amount of 'faith' (for want of a better word) to believe the 3D mandelbrot (in the form I'm hoping for) actually exists. We have the 2D version, and it's a strange kind of judgement to ascertain if there's really a 3D analogue. As usual, it comes to probabilities, guesswork, and uncertainties with wide margins of error. It's out there. Maybe. Maybe sort of. Sort of maybe.

Bring on more pseudo 3D mands in the meantime - or hit the jackpot whilst trying! :D


Title: Dreams of a 3D-brot
Post by: bib on June 14, 2009, 11:22:56 PM
(http://www.fractalforums.com/gallery/0/492_14_06_09_11_20_05.jpg)

(http://www.fractalforums.com/gallery/0/492_14_06_09_11_21_37.jpg)

(http://www.fractalforums.com/gallery/0/492_15_06_09_12_32_28.jpg)

http://www.youtube.com/v/6d4-l4y5m2w&hl=fr&fs=1&


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 18, 2009, 01:58:00 AM
Hi again,

I abandoned trying to get DE working for the 4D ring I was using for the "real" 3D Mandelbrot and decided to try rendering it adding it as an option in the beta Julibrot formula that I posted which uses solid based on iteration density rather than solid based on iteration - it's not as optimum as using DE but considerably more optimum than plain iteration and produces results very similar to using DE.
So I did a test render of the same minibrot I did previously but this time allowing the rest of the Mandelbrot to appear in the background.
Here's the result:

(http://www.fractalforums.com/gallery/0/141_18_06_09_1_36_51.gif)

http://www.fractalforums.com/gallery/?sa=view;id=695 (http://www.fractalforums.com/gallery/?sa=view;id=695)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 18, 2009, 03:14:14 AM
Another view - this time the "top" of the Mandy:

(http://fc08.deviantart.com/fs47/f/2009/168/1/6/Attempt_at_real_3D_Mandy_by_MakinMagic.gif)

Or:

http://makinmagic.deviantart.com/art/Attempt-at-real-3D-Mandy-126306420 (http://makinmagic.deviantart.com/art/Attempt-at-real-3D-Mandy-126306420)


Title: Regarding the solution to the derivative of 4 functions of 4 reals
Post by: David Makin on June 18, 2009, 09:16:47 PM
Hi all, it's not simple, but I think solving this will give the derivative in general cases (where a solution is possible):

For deriving the derivative of 4 functions of 4 reals, we have:
 
 x1 = a(x,y,z,w)
 y1 = b(x,y,z,w)
 z1 = c(x,y,z,w)
 z2 = d(x,y,z,w)
 
We want the derivative of the system where:
 
 N.p = 0
 
Which is given by the limit(v->0) of:
 
( |          i                       j                      k                      l               | ).(x1,y1,z1,w1) = 0
  | a(x+v,y,z,w)-x1  b(x+v,y,z,w)-y1  c(x+v,y,z,w)-z1  b(x+v,y,z,w)-w1  |
  | a(x,y+v,z,w)-x1  b(x,y+v,z,w)-y1  c(x,y+v,z,w)-z1  b(x,y+v,z,w)-w1  |
  | a(x,y,z+v,w)-x1  b(x,y,z+v,w)-y1  c(x,y,z+v,w)-z1  b(x,y,z+v,w)-w1  |
  | a(x,y,z,w+v)-x1  b(x,y,z,w+v)-y1  c(x,y,z,w+v)-z1  b(x,y,z,w+v)-w1  |

All values treated as reals - obviously treating all values as complex would maybe provide a solution in cases where using reals does not.

Duh - OK this is just WIP - I guess my recollection of getting a normal was a little hazy, but maybe just omitting the bottom row of the matrix.....or make it 5*5 with the last column as ident ?

Aaaargh !! I really should think things through more before posting stuff:




Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on June 18, 2009, 11:35:41 PM
cool stuff, you can use the LaT\sum x feature  :)

for what do you need this ? as surface normal vector ? ... btw. how do you get the surface ? raytracing until volume is hit ?  :police: :alien:


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 19, 2009, 02:12:14 AM
cool stuff, you can use the <Quoted Image Removed> feature  :)

for what do you need this ? as surface normal vector ? ... btw. how do you get the surface ? raytracing until volume is hit ?  :police: :alien:

I tend to rethink stuff from first principles - I don't have any high levels maths books and working it out myself is usually quicker than ordering books from the library ;)
In this case I was considering the fact that for distance estimation (to be used in ray-tracing) we need the derivative of a formula and thinking about it I suddenly thought that that is very closely related to the normal to the surface - hence my calculation above.
In fact it turns out that if you calculate the 4*4 matrix above (below the i,j,k,l) to the limit of v then you get the transpose of the Jacobian so I guess I'm not completely off target :)



Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 20, 2009, 04:47:56 PM
Hi all, I just realised something - I never knew the derivation of distance estimation but I just realised that maybe using the normal to the object surface at some point (a) on the surface and a point (b) to be tested gives us a method to find the shortest distance from b to the surface.
At each iteration level we know equation of the surface and the distance from point b to the surface at that iteration will always be less than the distance of b to the surface at a higher iteration level (assuming our initial b is "outside").
Goes back to the " drawing board".......


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on June 21, 2009, 05:18:10 AM
Hi all, I just realised something - I never knew the derivation of distance estimation but I just realised that maybe using the normal to the object surface at some point (a) on the surface and a point (b) to be tested gives us a method to find the shortest distance from b to the surface.
At each iteration level we know equation of the surface and the distance from point b to the surface at that iteration will always be less than the distance of b to the surface at a higher iteration level (assuming our initial b is "outside").
Goes back to the " drawing board".......
hmm while i haven't completely understood the method you're proposing, i think it's not possible to infer global characteristics from local sampling: basically the normal can vary chaotically at any point inside the field of consideration, so we should not expect there to be a "straight line" to the point of nearest intersection, at any level of iteration. moreover i've found that with fractals there is never really a "surface" at all, making normals extremely troublesome to even estimate reasonably :(


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 21, 2009, 01:20:36 PM
hmm while i haven't completely understood the method you're proposing, i think it's not possible to infer global characteristics from local sampling: basically the normal can vary chaotically at any point inside the field of consideration, so we should not expect there to be a "straight line" to the point of nearest intersection, at any level of iteration. moreover i've found that with fractals there is never really a "surface" at all, making normals extremely troublesome to even estimate reasonably :(

Ah, but what you're overlooking is that when rendering 3D fractals to a given iteration depth then the fractal "surface" we're rendering is not actually chaotic in itself, in fact for iterating z^2+c it's simply a high level polynomial.
And I meant getting the normal analytically not via local sampling.
If In(z^2+c) is the iterate at iteration n i.e. such that I1(z^2+c) is z^2+c, I2(z^2+c) is (z^2+c)^2+c then the surface at iteration depth n is given by:
|In(z^2+c)| = bailout
I did think that one alternative way of finding intersection for a fixed iteration depth is:
Given our ray is p+ad where p is the viewpoint and d is the unit direction vector then for a given In we could fully expand In to a polynomial, then substitute in p+ad as z then solve for a using the Newton to get the roots and the smallest positive real root is our intersection point but I suspect that method may be less efficient than it sounds even ignoring the complexity of getting the equation for say I20(z^2+c) :) I did wonder about using a modified Newton where on each iteration (n) of the Newton f(z) as z^2+c became In(z^2+c) instead and f'(z) became the derivative of In(z^2+c) instead of just 2z.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 21, 2009, 06:34:37 PM
Ok, did a higher res. still shot of the "true 3D" minibrot:

(http://fc09.deviantart.com/fs48/f/2009/172/0/4/__Real_3D___Minibrot_by_MakinMagic.jpg)

or:

http://makinmagic.deviantart.com/art/quot-Real-3D-quot-Minibrot-126708978 (http://makinmagic.deviantart.com/art/quot-Real-3D-quot-Minibrot-126708978)

The minibrot is at approx. -1.76 on the real axis and is viewed from 30 degrees above and 60 degrees around (camera target point set slightly nearer the main cardioid).
Bailout was x^2+y^2+z^2+w^2>4 and the maximum iteration count allowed was 60, though solid was based on iteration density so rarely if ever would 60 iterations actually be used.
Rendered to disk in Ultra Fractal at a resolution of 3840*2880, time 1hour 51mins on a (heat impaired) 3GHz P4HT effectively in single-threaded mode due to the render being performed to a screen buffer in the global section of a UF formula.

Hope you guys like it :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 21, 2009, 10:00:43 PM

I did wonder about using a modified Newton where on each iteration (n) of the Newton f(z) as z^2+c became In(z^2+c) instead and f'(z) became the derivative of In(z^2+c) instead of just 2z.


Actually make that using a modified Newton for finding a root of f(a)="|In(g(a))|-bailout" where a is alpha in p+ad where p is the camera viewpoint and d is the unit viewing direction vector... problem is our equation is:

c = p+ad
z = p + ad

|In(z^2 + c)| - bailout = 0

Note that here if In(z^2+c) is 4D then the || means x^2+y^2+z^2+w^2

So finding f(a) and f'(a) is not completely straightforward - I mean in particular what's say the derivative of |f(q)| where the function is quaternionic ? I guess you could write it as f(q)*conj(f(q)) ?? ... but then what's the derivative of conj(f(q)) ?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 22, 2009, 01:23:15 AM
Just for comparison with the "True 3D" Minibrot:

http://makinmagic.deviantart.com/art/Hypercomplex-Minibrot-126754381 (http://makinmagic.deviantart.com/art/Hypercomplex-Minibrot-126754381)

http://makinmagic.deviantart.com/art/Quaternionic-Minibrot-126754860 (http://makinmagic.deviantart.com/art/Quaternionic-Minibrot-126754860)


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on June 22, 2009, 08:09:43 PM
cool, but the non-quaternionic method one looks very quadratic ... is it because of low iteration depth ?
or sampling errors ?

or ist it the used math ? ... anyway .... i would now be interested in a X/Z cut plane 2d version of the pseudo method,
or is it just the mandelbrot again ? ( as proposed ... )

greets
ck


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 22, 2009, 09:02:24 PM
cool, but the non-quaternionic method one looks very quadratic ... is it because of low iteration depth ?
or sampling errors ?

or ist it the used math ? ... anyway .... i would now be interested in a X/Z cut plane 2d version of the pseudo method,
or is it just the mandelbrot again ? ( as proposed ... )

greets
ck


Hi, well if you look at the math for the "real 3D" "roundy version:

* | r   i   j   k
-------------
r | r   i    j   k
i | i  -r   k   j
j | j   k  -r  i
k | k  j   i  -r

Which gives z^2+c:

              xi = mx
              yyy = my
              zzz = mz
              mx = mx*mx - my*my - mz*mz - mw*mw + x
              my = 2.0*(my*xi + mz*mw) + y
              mz = 2.0*(mz*xi + yyy*mw) + zz
              mw = 2.0*(mw*xi + yyy*zzz) + w

Assuming the start value is always (0,0,0,0) then:

if we start with a 3D cut such that w=0 and from that a 2D cut such that zz is 0 then the iterate is reduced to:

              xi = mx
              mx = mx*mx - my*my + x
              my = 2.0*my*xi + y

if w=0 and y is 0 then it's reduced to:

              xi = mx
              mx = mx*mx - mz*mz + x
              mz = 2.0*mz*xi + zz

And if we take a 3D cut where y=0 (or zz=0) and a 2D cut where zz=0 (or y=0):

              xi = mx
              mx = mx*mx - mw*mw + x
              mw = 2.0*mw*xi + w

However, for example in the first two cases (i.e. a 3D cut where w=0) then although the 2D X-Y slice and 2D X-Z slice both are the 2D Mandelbrot Set any other rotation of a plane including the X axis around the X axis will result in other images.

For the "squarry" version the iteration depth was only 10 :) The above holds for the 2D slices in that case also (as the only difference is that in the full iteration it uses "mw = 2.0*(mw*xi - yyy*zzz) + w" instead of "mw = 2.0*(mw*xi + yyy*zzz) + w").

I hope that makes things clearer :)




Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 22, 2009, 11:16:18 PM
Hi, in case you miss them:

http://www.fractalforums.com/gallery/?sa=view;id=700 (http://www.fractalforums.com/gallery/?sa=view;id=700)

http://www.fractalforums.com/gallery/?sa=view;id=701 (http://www.fractalforums.com/gallery/?sa=view;id=701)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 23, 2009, 01:57:49 AM
Here's the minibrot for the "squarry" version:

http://makinmagic.deviantart.com/art/quot-Real-3D-quot-Minibrot-Squarry-126885372 (http://makinmagic.deviantart.com/art/quot-Real-3D-quot-Minibrot-Squarry-126885372)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on June 23, 2009, 02:57:30 AM
Hi, just posted this in another thread - meant to post it here - so here's the link:

http://www.fractalforums.com/images-showcase-(rate-my-fractal)/%27real%27-3d-mandelbrot-attempt/msg7366/#msg7366 (http://www.fractalforums.com/images-showcase-(rate-my-fractal)/%27real%27-3d-mandelbrot-attempt/msg7366/#msg7366)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on June 24, 2009, 12:15:46 PM
With the 3rd dimension thrown in, it's like exploring unchartered space ala Star Trek, all this stuff.

David, I liked the way of demonstrating 3D that those 'sliced' animations used. (Wouldn't mind seeing that one or your latest rendered in Lycium's renderer).


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on July 09, 2009, 08:17:04 PM
Hello
I made some 3D Mandelbrot fractal using David's 4D formula:

newx = xx*xx - yy*yy - zz*zz - ww*ww;
newy = 2.0*xx*yy + 2.0*ww*zz;
newz = 2.0*xx*zz + 2.0*yy*ww;
neww = 2.0*xx*ww + 2.0*yy*zz;
xx = newx +a;
yy = newy +b;
zz = newz +c;
ww = neww;

I rendered this fractal into 3D array: 1500 x 1500 x 1500 pixels and later generate 3D view with some very simple but effective shading algorithm. It takes very huge amount of memory. Only 3,2GB RAM :-) but rendering is very fast. It takes only 1 hour to render this. I write my own program in C++ to render this

First attached render uses iterations between 15 and 255 to make some "fractal fog".
(http://www.fractalforums.com/gallery/0/640_11_07_09_8_13_49.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=727

Second uses iterations higher than 240 and there are visible very sharp shapes.
(http://www.fractalforums.com/gallery/0/640_11_07_09_8_15_15.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=728

Thanks Twinbee and David for inspiration. You have done very good piece of work.

For more fractals I invite to my gallery: http://picasaweb.google.com/buddhi1980/Fraktale


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on July 09, 2009, 08:26:13 PM
wow, the second one is cool, i believe a pertubated mandelbrot .... very nice!


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 09, 2009, 08:27:15 PM
Congratulations on the nice renders !

I'm still hoping that Lycium will have a go at this one using his fractal rendering engine ;)


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on July 09, 2009, 08:42:27 PM
When I made my first attempts to generate 3D fractals I use Tweebee's algorithm with calculating (doubling) angle of iteration vector. I think it looks very nice:
(http://www.fractalforums.com/gallery/0/640_11_07_09_8_05_27.JPG)
http://www.fractalforums.com/gallery/?sa=view;id=725
http://picasaweb.google.com/buddhi1980/Fraktale#5298247532536219042

Next I tried to use 3D rotation matrix to double angle of vector:

calculating angles:
alfa = atan2(y,x);
beta = atan2(z, sqrt(x*x + y*y));
             

create rotation matrix:
                          |cos(alfa)   -sin(alfa)   0      |
Rot z (alfa) =     |sin(alfa)    cos(alfa)   0      |
                           |    0             0              0       |

                           |cos(beta)    0         sin(beta)   |
Rot y (alfa) =     |    0             1             0           |
                           |-sin(beta)   0     cos(beta)      |

coplette double rotation:

Rot = (Rot z * Rot y) * (Rot z * Rot y);

and we have this formula:
r = x*x + y*y + z*z;
cz = cos(alfa);
cy = cos(beta);
sz = sin(alfa);
sy = sin(beta);
newx = r*(cy*cy*cz*cz - cy*sz*sz - sy*sy*cz) + a;
newy = r*((1+cy)*sz*cz) + b;
newz = r*(sz*sz*sy - cz*cz*sy*cy - sy*cy*cz) + c;

And look at results (it looks so strange):
(http://www.fractalforums.com/gallery/0/640_11_07_09_8_10_27.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=726
http://picasaweb.google.com/buddhi1980/Fraktale#5356525301118658994


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 09, 2009, 08:54:57 PM
wow, the second one is cool, i believe a pertubated mandelbrot .... very nice!

It's not actually a perurbated Mandelbrot, it does start from (0,0,0,0) but it's using unconventional 4D maths to calculate z^2+c.
The maths involved is a 4D commutative ring but not a division algebra and hence not a field.
Standard Quaternions are a division algebra but are a non-commutative ring and hence are also not a field.
Standard Hypercomplex (sometimes called BiComplex) is a commutative ring but only a partial division algebra and hence again not a field (partial division algebra because not all non-zero values have an inverse).


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on July 10, 2009, 09:35:54 AM
"Front view" of Quaternions Mandelbrot (iterations between 15 and 255)

(http://www.fractalforums.com/gallery/0/640_11_07_09_8_16_32.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=729
http://picasaweb.google.com/buddhi1980/Fraktale#5356729663908398674

Next I will try to render MiniBrot in 512 iterations


Title: Re: True 3D mandlebrot type fractal
Post by: bib on July 10, 2009, 03:32:22 PM
This last one is very impressive with the red peaks showing the 2D M-set. If you zoom on these, are they completely flat or do they have some thickness with potentielly new fractal shapes ?


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on July 11, 2009, 08:50:01 AM
3D Minibrot at coordinates:
x: -1.7877, 1.7847
y: -0.0015, 0.0015
z: -0.0015, 0.0015

(http://www.fractalforums.com/gallery/0/640_11_07_09_8_17_26.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=730
http://picasaweb.google.com/buddhi1980/Fraktale#5357087816457273234

and something near this Minibrot at:
x: -1.78524, -1.78495
y: -0.00014, 0.00014
z: -0.00014, 0.00014

(http://www.fractalforums.com/gallery/0/640_11_07_09_8_18_05.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=731
http://picasaweb.google.com/buddhi1980/Fraktale#5357087793505057986


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on July 11, 2009, 08:54:10 AM
View inside 3D Mandelbrot
coordinates:
x: -1, -0.60
y: -0.3, 0.1
z: -0.3, 0.1

(http://www.fractalforums.com/gallery/0/640_11_07_09_8_18_52.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=732
http://picasaweb.google.com/buddhi1980/Fraktale#5357087896354851314


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on July 15, 2009, 07:38:01 PM
Another view inside 3D Mandelbrot
region coordinates:
x: 0, 0.5
y: -0.25, 0,25
z: -0.25, 0.25
max iteration number: 256
(http://www.fractalforums.com/gallery/0/640_15_07_09_7_32_29.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on July 17, 2009, 09:03:24 PM
Hello guys, I've been keeping an eye on this thread for a little while, although I didn't actually join FractalForums before today. State of the art-work like this is really exciting to watch =)
Just a little thought I just got: There is a 4-dimensional object, a kind of julibrot, of which the familiar mandelbrot set and julia sets are 2D-slices of, and the quaternion julias are 3D-slices. As we know, the 4th dimension can be thought of as time, and therefore the entire 4D-object might be presented as an animation of a morphing quaternion julia.
In the same way, you can imagine a movie as a 3D object, as a prism where a 2D cross-section is a frame of the movie and the height represents time. But there is only one right direction to play the movie. Taking the cross-sections from the side would look completely different.
In the same way, how do one know if one is going through the "correct" axis on the 4D julibrot?

I kind of think this is relevant to this discussion, although I can not bring you amazing renders. I don't even know if I can render a sphere in POVray without consulting the tutorial :P


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 17, 2009, 09:28:34 PM
Hello guys, I've been keeping an eye on this thread for a little while, although I didn't actually join FractalForums before today. State of the art-work like this is really exciting to watch =)
Just a little thought I just got: There is a 4-dimensional object, a kind of julibrot, of which the familiar mandelbrot set and julia sets are 2D-slices of, and the quaternion julias are 3D-slices. As we know, the 4th dimension can be thought of as time, and therefore the entire 4D-object might be presented as an animation of a morphing quaternion julia.
In the same way, you can imagine a movie as a 3D object, as a prism where a 2D cross-section is a frame of the movie and the height represents time. But there is only one right direction to play the movie. Taking the cross-sections from the side would look completely different.
In the same way, how do one know if one is going through the "correct" axis on the 4D julibrot?

I kind of think this is relevant to this discussion, although I can not bring you amazing renders. I don't even know if I can render a sphere in POVray without consulting the tutorial :P

Hi, Here's a morphing Julibrot - in this case the 4 fractal dimensions - zstartreal,zstartimag,creal,cimag - are implimented in 3D space by using two of the fractal dimensions directly as 2 spatial dimensions and then using the 3rd spatial dimension as a line in the plane of the 2 remaining fractal dimensions and gradually rotating the angle of this line in this plane by 90 degrees from one of the fractal dimensions to the other, then doing the same with a different spatial dimension:

http://www.youtube.com/watch?v=gr-ul7sZDwc&feature=channel_page


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on July 17, 2009, 10:01:19 PM
HAHA! :D I commented on that video on YouTube two days ago!


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 17, 2009, 10:13:37 PM
HAHA! :D I commented on that video on YouTube two days ago!

So you did ! I've a terrible memory for (new) names :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 18, 2009, 01:37:09 AM
Hello guys, I've been keeping an eye on this thread for a little while, although I didn't actually join FractalForums before today. State of the art-work like this is really exciting to watch =)
Just a little thought I just got: There is a 4-dimensional object, a kind of julibrot, of which the familiar mandelbrot set and julia sets are 2D-slices of, and the quaternion julias are 3D-slices. As we know, the 4th dimension can be thought of as time, and therefore the entire 4D-object might be presented as an animation of a morphing quaternion julia.
In the same way, you can imagine a movie as a 3D object, as a prism where a 2D cross-section is a frame of the movie and the height represents time. But there is only one right direction to play the movie. Taking the cross-sections from the side would look completely different.
In the same way, how do one know if one is going through the "correct" axis on the 4D julibrot?

I kind of think this is relevant to this discussion, although I can not bring you amazing renders. I don't even know if I can render a sphere in POVray without consulting the tutorial :P

I just re-read your post above and I think you may be slightly confusing Julibrots and Quaternions - Julibrots are 4D because they're made up of 2 complex numbers, zstart and the constant whereas quaternions are 4D becuase the zstart in a quaternion Mandelbrot is 4D or because the constant in a quaternion Julia is 4D - one could consider viewing Quaternionic Julibrots but these actually have 8 dimensions - 4 from zstart and 4 from the constant.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 18, 2009, 02:26:53 AM
Hello
I made some 3D Mandelbrot fractal using David's 4D formula:

newx = xx*xx - yy*yy - zz*zz - ww*ww;
newy = 2.0*xx*yy + 2.0*ww*zz;
newz = 2.0*xx*zz + 2.0*yy*ww;
neww = 2.0*xx*ww + 2.0*yy*zz;
xx = newx +a;
yy = newy +b;
zz = newz +c;
ww = neww;

I rendered this fractal into 3D array: 1500 x 1500 x 1500 pixels and later generate 3D view with some very simple but effective shading algorithm. It takes very huge amount of memory. Only 3,2GB RAM :-) but rendering is very fast. It takes only 1 hour to render this. I write my own program in C++ to render this

First attached render uses iterations between 15 and 255 to make some "fractal fog".
(http://www.fractalforums.com/gallery/0/640_11_07_09_8_13_49.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=727

Second uses iterations higher than 240 and there are visible very sharp shapes.
(http://www.fractalforums.com/gallery/0/640_11_07_09_8_15_15.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=728

Thanks Twinbee and David for inspiration. You have done very good piece of work.

For more fractals I invite to my gallery: http://picasaweb.google.com/buddhi1980/Fraktale

Hi Buddhi - I'd be interested to see what rendering this one:

http://www.fractalforums.com/images-showcase-(rate-my-fractal)/%27real%27-3d-mandelbrot-attempt/msg7366/#msg7366 (http://www.fractalforums.com/images-showcase-(rate-my-fractal)/%27real%27-3d-mandelbrot-attempt/msg7366/#msg7366)

is like when rendered to a fixed grid :)


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on July 18, 2009, 09:26:46 AM
Do you mean that this
http://www.youtube.com/watch?v=Sv0x3vOp_Lc (http://www.youtube.com/watch?v=Sv0x3vOp_Lc)
is not 3d slices of the julibrot, but a completely different object? I didn't know, thanks.

Just another thing:
At an early point in this thread, someone suggested using the exponent in z -> z^2+c as the 3rd dimension. I realise it's not what we're looking for, because the resulting object has no border, but I'm curious how the 3D render looks like. I've only seen animations like this:
http://www.youtube.com/watch?v=3Zg3_J_jHCY (http://www.youtube.com/watch?v=3Zg3_J_jHCY)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 18, 2009, 03:40:28 PM
Do you mean that this
http://www.youtube.com/watch?v=Sv0x3vOp_Lc (http://www.youtube.com/watch?v=Sv0x3vOp_Lc)
is not 3d slices of the julibrot, but a completely different object? I didn't know, thanks.

From the comment given on that one (and it's appearance) I think it's just a standard Quaternionic Julia morph where the 4D value of "c" in z^2+c where z and c are quaternionic is being modified over time.

For quaternions q^2 expressed as reals is as below:

newx = x^2 - y^2 - z^2 - w^2
newy = 2*x*y
newz = 2*x*z
neww = 2*x*w

You can see from the above that if any 2 of the y, z or w components are always zero then for q^2 the quaternion collapses to standard complex - in fact this is true for any quaternionic maths.
Quaternions can be considered as having one 1D real component "r" and one 3D imaginary component (i,j,k).

More quaternion maths here:

http://en.wikipedia.org/wiki/Quaternion_group (http://en.wikipedia.org/wiki/Quaternion_group)
http://mathworld.wolfram.com/Quaternion.html (http://mathworld.wolfram.com/Quaternion.html)

Also this (but I didn't actually check everything was correct):

http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/arithmetic/index.htm (http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/arithmetic/index.htm)

If you want to delve deeper into 4D number systems then you should also look into the various meanings of "Hypercomplex":

Generally:

http://en.wikipedia.org/wiki/Hypercomplex_number (http://en.wikipedia.org/wiki/Hypercomplex_number)
http://mathworld.wolfram.com/HypercomplexNumber.html (http://mathworld.wolfram.com/HypercomplexNumber.html)

More on the specific hypercomplex numbers mentioned on the Mathwoirld page here:

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


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on July 23, 2009, 01:37:49 PM
Have anyone tried using z.r or z.i as the 3rd dimension? That would be the "true" 3d Mandelbrot in the sense that it is a 3d slice of the Julibrot just as the M-set is a 2d slice of it. There is, of course, the problem that the resulting object would be without a finite boundary, but I think it would be interesting anyway. You can i.e. clip it from -1.5 to 1.5. I have made some animations to try and imagine what the 3d version would look like, like this:
http://www.youtube.com/watch?v=54wDwErEw-Q (http://www.youtube.com/watch?v=54wDwErEw-Q)
Some interesting things to notice is that the "valleys" stay in the same place as the set morphs, and that some parts are ripped loose from the set only to be reunited with it at a later point. Just pay attention to the "tentacles" at the top.
Will anyone do this? Please?  :D


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 23, 2009, 04:02:08 PM
Will anyone do this? Please?  :D

Ermmm - that's exactly what my Julibrot animation on YouTube that I posted earlier does (the one you commented on), pause the video and look carefully at the first frame and you'll see that frame is essentially made up of the 2D slices from your animation.


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on July 23, 2009, 04:07:43 PM
Yeah, I see it now. Well thanks then! I hope I haven't disrupted this thread with my n00bery.
I also found a render of the same shape (by you) on DA, and I copied the parameters into UF, but when I changed the parameters nothing happened.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on July 23, 2009, 07:33:35 PM
Yeah, I see it now. Well thanks then! I hope I haven't disrupted this thread with my n00bery.
I also found a render of the same shape (by you) on DA, and I copied the parameters into UF, but when I changed the parameters nothing happened.

If you like mail me privately about it:

makinmagic@tiscali.co.uk


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on August 02, 2009, 04:24:12 PM
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.

(http://www.fractalforums.com/gallery/0/141_02_08_09_4_15_15.jpg)

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 (http://makinmagic.deviantart.com/art/quot-True-3D-quot-Mandelbrot-125190781)


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on August 02, 2009, 08:18:39 PM
Hi David
You made very good and accurate render. I'm very impressed by very high resolution of this render. Using your render algorithm you don't have to use large amount of memory because it doesn't need to store slices in memory. I case of this you can render 3D fractals in very high resolution.  But... in your renders there is no shadows.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on August 02, 2009, 08:50:12 PM
Hi David
You made very good and accurate render. I'm very impressed by very high resolution of this render. Using your render algorithm you don't have to use large amount of memory because it doesn't need to store slices in memory. I case of this you can render 3D fractals in very high resolution.  But... in your renders there is no shadows.


Thanks. A disadvantage is that every view requires a complete re-render whereas once you have your 1500 jpgs you can more rapidly render from any viewpoint. Another disadvantage is that the method is quite prone to irregular aliasing effects which isn't so bad when using a regular grid as you are, I'm considering trying out a "snap to grid" option.

As to shadows, reflections, transparency/diffraction and better lighting (with something approaching radiosity) and the ability to render a complete scene rather than a single fractal - I'm working on a set of ray-tracing classes for UF5 but it will take some time especially as the simulated radiosity is something I've never tried before :)


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on August 02, 2009, 08:56:59 PM
congrats dave, this is simply awesome!
hehe, was it fun to code ? :D


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on August 02, 2009, 09:01:08 PM
It was fun :)
Just a little tricky with the final "tweaking" of the default "detail level" which I've set so it renders very quickly (around 4* faster than the render I uploaded) but without too many errors. So you can leave the detail level set at "1" while setting up and then increase it as necessary for the final render.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on August 12, 2009, 12:26:40 AM
I'm new to this discussion, but I've been emailing David Makin, twinbee, and lycium about 3D fractals and they've been helpful. I wrote a simple isosurface ray tracer to render these fractals with options for global illumination and participating media. Here are my results:
http://bugman123.com/Hypercomplex/index.html


Title: Re: True 3D mandlebrot type fractal
Post by: bugman 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:


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee 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.


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi 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.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman 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.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on August 13, 2009, 12:08:35 AM
heya paul, good to see you on the forums :)

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!  O0


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi 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:
(http://upload.wikimedia.org/math/b/6/0/b604069f182d4a280ffb459ecfe99409.png) (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 :( 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 (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


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on August 15, 2009, 04:15:59 AM
<>
It looks very easy but... IT NOT WORKS PROPERLY :( 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).



Title: Re: True 3D mandlebrot type fractal
Post by: David Makin 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.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin 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.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin 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).


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin 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 :)

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.


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on August 17, 2009, 08:26:33 PM
Finally I have rendered rotated view of Mandelbrot 3D in high resolution. Watch in HD!
http://www.youtube.com/watch?v=x81lv4xfyNo


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee 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?


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on August 20, 2009, 12:34:33 PM
really nice animation buddhi!

the power of pre-processing is well illustrated here  O0


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on August 22, 2009, 01:07:41 AM
respects budhi!


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on August 22, 2009, 09:20:11 AM
Hi
I made some interesting experiment with hypercomplex formula. I used 4th dimension instead 3rd (x,y and w). It looks so strange  ;D
(http://www.fractalforums.com/gallery/0/thumb_640_22_08_09_8_45_35.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=873
(http://www.fractalforums.com/gallery/0/thumb_640_22_08_09_8_46_24.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=874



Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on August 27, 2009, 11:08:42 PM
Hi all,

Regarding the "delta" method using the differences in smooth iteration count, a friend asked me for clarification so here's the pseudo-code I sent him, I thought more people may be interested :)

----------------------
Code:
 
Assume position on ray is "vp+alpha*d" where vp is the viewpoint and d is our normalised direction vector for the viewing ray.
We want to scan along the ray segment from a start point dictated by our front cutting plane giving us a starting value for alpha to our end point
dictated by the back cutting plane giving us an end value for alpha.
We use an array "maxd[maxiter]" for storing maximum distances to step at each iteration level.
Proceed as follows:
 
For each ray:
  alpha = starting alpha (as dictated by front clip)
  Set all maxd[n] to a maximum step distance value (usually a user parameter) - n from 0 to maxiter
  step = 0
  done = false
  binary search = false
  alpha found = end alpha
  repeat
     compute point p = vp + alpha*d
     oldstep = step
     iterate point p (set i to number of iterations done here and remember final values for computing smooth iteration)
     if not reached maxiter
       compute point p = vp + (alpha+abit)*d  ;----- where abit is a user parameter, say 1e-10
       Iterate point p
       if reached maxiter
          if oldstep==0
            alpha found = current alpha
            done = true
         else
           step = oldstep/2
           binary search = true
           alpha = alpha - step
         endif
       else
          compute smooth iteration value for first iteration s0
          compute smooth iteration value for second iteration s1
          compute directional DE = 1.0/(1.0+(1/abit)*abs(s1-s0))
          if binary search
            step = oldstep/2
            if DE>solid threshold ;--------- solid threshold is a user parameter, say 1e-4
               alpha = alpha + step
            else
               alpha = alpha - step
            endif
            if step<min accuracy ;--- min accuracy is a user parameter, say 1e-8
               alpha found = current alpha
               done = true
            endif
          elseif directional DE < solid threshold ;--------- solid threshold is a user parameter, say 1e-4
             step = oldstep/2
             binary search = true
             alpha = alpha - step
          else
             if maxd[i]<directional DE
               directional DE = maxd[i]
             else
                maxd[i] = directional DE
             endif
             if directional DE < maxd[i+1] ;***********ADDED
                maxd[i+1] = directional DE
             endif
             alpha = alpha + (step=directional DE/scale value) ;---- I use scale value = @scale*2.5 where @scale is a user parameter
;                                                                                                               default 1.0
           endif
       endif
     elseif oldstep==0
        alpha found = current alpha
        done = true
     else
       step = oldstep/2
       binary search = true
       alpha = alpha - step
     endif
  until  done || alpha>=end position
----------------------

EDIT: Please note the "****ADDED section - I checked and it is actually necessary to conditionally store the DE value found as the maximum for the next iteration depth.

EDIT#2: (August 28th 2009) The code above has now been modified such that if the first iteration does not reach maxiter but the second does then we test to see if it's the first point on the ray in which case we exit with solid found or if not the first point then we initiate the binary search. Also I've optimised the code such that smooth iteration values are only calculated when absolutely necessary and modified the binary search section slightly.

EDIT #3: (October 5th 2009) Corrected the rather alarming oversight of not assigning the new calculated step distance to the "step" variable when not in the binary search :) I even made the same mistake in my original implimented version !


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on August 30, 2009, 01:39:28 PM
Hi

David, you prepared very nice algorithm for DE.  It looks very simple - good idea with this double computation. You don't have to derive formulas for derivatives. Sometimes numeric methods are the best and simple.

Today I made some experiments with completely another approach to calculate iterations. I tried to convert Twenbee's idea to make rotations of vectors using complex numbers. First I normalize all vectors because when abs(z)=1 then abs(z^2)=abs(z). Then square of complex number is the same like doubling angle of vector without changing length of vector.

I expected the same results as using trigonometric calculations but fractal looks different. Maybe I made some mistake somewhere.

Below is C code for iteration
Code:
double r = sqrt(xx*xx+yy*yy+zz*zz);
xx = xx/r;
yy = yy/r;
zz = zz/r;
/* --- rotation - axis Z  */
//vector normalization:        
r1 = sqrt(xx*xx+yy*yy);
xx = xx/r1;
yy = yy/r1;
zz = zz/r1;
//complex numbers calculation
newx1 = xx*xx - yy*yy;
newy1 = 2.0*xx*yy;
newz1 = zz;
       
//---- rotation XY ------
r2 = sqrt(newx1*newx1+newy1*newy1);
//normalization:
r3 = sqrt(r2*r2+newz1*newz1);
newx1 = newx1/r3;
newy1 = newy1/r3;
newz1 = newz1/r3;
r2 = r2/r3;
//complex numbers calculation
newr2 = r2*r2 - newz1*newz1;
newz2 = 2.0*r2*newz1;
//spread result for 2 vectors (x and y)
rr = newr2/r2;
newx2 = newx1*rr;
newy2 = newy1*rr;        

//multiplying by normalization factors        
m=r*r*r1*r3;
newx = newx2*m;
newy = newy2*m;
newz = newz2*m;
       
xx = newx + aa;
yy = newy + bb;
zz = newz + cc;

...and the result:
(http://www.fractalforums.com/gallery/0/640_30_08_09_12_39_40.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=881



Title: Re: True 3D mandlebrot type fractal
Post by: bugman on August 30, 2009, 04:25:45 PM
Here are some higher power variations of Twinbee's Mandelbrot set using the following formula:
{x,y,z}^n = r^n{cos(n*theta)cos(n*phi),sin(n*theta)cos(n*phi),-sin(n*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))

(Can anyone tell me why Fractal Forums is making this image so small?)


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on August 31, 2009, 02:46:55 PM
hi paul :) those higher power versions are amazing!

basically instead of doubling angle, it does some (p/q)-symmetry, correct? (corresponding to the higher powers in the complex exponential)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 02, 2009, 03:22:29 AM
Cool stuff indeed, like a Sea anemone or that shell (http://farm2.static.flickr.com/1390/751085804_7bad272ec0.jpg?v=0) I posted months ago.

Not sure about the forum resoution thing, but here's a link to my fave version at a higher res than previously:
http://www.bugman123.com/Hypercomplex/Mandelbrot-White8-large.jpg

I'm guessing it's globally illuminated right? Interesting to see such ambient lighting with GI. I'd like to see more directional lighting (as well), and also without those small bright 'bits'. But that's not all, I'd like a 3000x3000 version if poss with less noise and maybe more iterations :) Seriously, love to see it close to those specs.


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on September 03, 2009, 06:33:59 PM
Hi Twinbee
I'd like a 3000x3000 version if poss with less noise and maybe more iterations :) Seriously, love to see it close to those specs.
Now I'm rendering z^7+b fractal using your trigonometric formula in 3000x3000x3000 resolution with 256 iterations. In few days it will be done . It should take about 50 hours to render :D


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 03, 2009, 09:30:13 PM
Hi Twinbee
I'd like a 3000x3000 version if poss with less noise and maybe more iterations :) Seriously, love to see it close to those specs.
Now I'm rendering z^7+b fractal using your trigonometric formula in 3000x3000x3000 resolution with 256 iterations. In few days it will be done . It should take about 50 hours to render :D

Hi all, here's a zoom into said fractal:

(http://www.fractalforums.com/gallery/0/141_03_09_09_9_25_55.png)

Magnification approx. *22 max iter. 256 - based on this detail 3000*3000*3000 is not enough !
Because of the number of multiplies and in particular because of the trig functions this 640*480 render took 12.5 minutes - but then again this PC/CPU/FPU is essentially an antique


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 03, 2009, 10:16:38 PM

(Can anyone tell me why Fractal Forums is making this image so small?)


 :police: .... one image is the thumbnail, and the other resolution is rescaled to a max version, perhaps i can adjust the image size in the settings ... i will see ... bigger images can be placed in the gallery and linked !  :police:


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 03, 2009, 10:20:15 PM
have i said that this thread is by far the most interesting here ?!?!?! new formulas, rendered in excellent ways, and really lots
of people contribute ( too many to list them all ;) ... ) great work guys, and keep on doing that i hope i will manage to create a fancy
realtime gpu fractal renderer this year ( winter is standing in front of the door  ) , i would love seeing those objects interactively ...

keep on!
 O0 O0 O0 O0 :police:


@dave if the shape would be green it would look like a vegetable ! hmm, yummy yummy ....
why is it that the outlines of the object are black !??!


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 04, 2009, 01:18:03 AM
@dave if the shape would be green it would look like a vegetable ! hmm, yummy yummy ....
why is it that the outlines of the object are black !??!

In the prototype UF formula I used the fractal is calculated in the global section and the normals are calculated directly from the z-buffer using the centre point and 4 adjacent points giving 4 triangles. The 4 adjacent points are tested for validity i.e. they're invalid if there's no surface or if the adjacent point is further than a given threshold away from the central point - the valid (up to four) (non-unit) normals are summed and the result is normalised.
This render was my very first attempt at zooming into this particular fractal and I didn't play around tweaking the distance limit ("joined threshold") for deciding when points are valid for use in the normal calculation, the result being that on the edges of overlap the normals are calculated as being almost perpendicular to line of sight.
The other reason I didn't tinker with the value is that the black outlines do actually help in this case since it's purely diffuse lighting without shadows and if I used the "correct" "joined threshold" the depth perception of the render would vanish (without using animation).


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 04, 2009, 02:49:00 AM
@dave, i see, about the diffuse lighting you might be right, i am impressed by the shapes, the shapes get more interesting at higher iterations,
anyway, i need to test those formulas also, because i was always disappointed with the shapes of the quaternions, even though they where 4d
they just looked like a stretched mandelbrot around some axes ... those formulas really inspire me, and i am enjoying that they look how one ( me ? )
naturally thinks of a 3 ( or 4 ) D mandelbrot ... hehe, very nice mathematical experiments !!! :police: :police: :police: :police: :police:


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 04, 2009, 03:06:23 AM
Quote
Now I'm rendering z^7+b fractal using your trigonometric formula in 3000x3000x3000 resolution with 256 iterations. In few days it will be done . It should take about 50 hours to render
Can't wait!  :D

I think the thing that's dawning on me about the higher power version from bugman's sea anemone pic is that the 'bits have bits'. In other words, it's meeting the stricter definition of the word 'fractal' :) I wonder if the smaller bits have bits too. It's hard to tell from the resolution, but if they do, then it's anyone's guess what happens when you zoom in.

What happens to the math to make these higher power versions more 'fractal-like' than the standard ^1 original?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 04, 2009, 03:17:49 AM
@dave if the shape would be green it would look like a vegetable ! hmm, yummy yummy ....

Here you are:

(http://www.fractalforums.com/gallery/0/141_04_09_09_3_11_03.png)

Mag *1284
max. iter. 256, delta DE threshold 1e-4 - in other words the same detail settings as the other versions I put in my 3D examples gallery.

@Twinbee - yes, with decreased DE threshold (and maybe increased max. iter.) then the bits will have more bits :)

I'm guessing but I think the fractal dimension of the *surface* could be 3 ?


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 04, 2009, 03:39:16 AM
Quote
@Twinbee - yes, with decreased DE threshold (and maybe increased max. iter.) then the bits will have more bits

Ace, and the romanesco broccoli style veg is the proof by the looks of it :) Can you render the exact same veg shot again, but with higher iteration / delta DE threshold. Shadows too if poss...


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 04, 2009, 03:51:09 AM
Quote
@Twinbee - yes, with decreased DE threshold (and maybe increased max. iter.) then the bits will have more bits

Ace, and the romanesco broccoli style veg is the proof by the looks of it :) Can you render the exact same veg shot again, but with higher iteration / delta DE threshold. Shadows too if poss...

I will, but just at the moment I'm working on code related to my 3D IFS formula - I did the other renders while coding and I haven't expanded the optimised delta DE formula to do shadows or positional lighting yet (that's next on my list, along with moving the rendering into the loop section instead of the global section so that *very* large renders are possible).
I'm just rendering a full-view of the degree 7 version in green at 3000*3000, but still just diffuse lighting.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 04, 2009, 06:00:45 AM
I would like to make an animation of the higher power variation of Twinbee's Mandelbrot set, by continuously varying the exponent, but my code is pretty slow. It will take a while for me to complete the render. Perhaps David can render it faster than I could. It seems like his algorithm is quite fast.

Another one I would like to do is show how the 4D version of Twinbee's Mandelbrot set can be continuous animated between different
3D slices.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 04, 2009, 12:05:04 PM
Quote
@Twinbee - yes, with decreased DE threshold (and maybe increased max. iter.) then the bits will have more bits

Ace, and the romanesco broccoli style veg is the proof by the looks of it :) Can you render the exact same veg shot again, but with higher iteration / delta DE threshold. Shadows too if poss...

OK, no shadows yet though....

(http://www.fractalforums.com/gallery/0/141_04_09_09_12_01_24.png)

Delta DE threshold reduced to 5e-6
As you can see we probably still haven't reached the limit of detail for 256 max. iterations :)

I haven't uploaded the 3000*3000 render of the whole object as I was disappointed with the result - it most definitely needs better lighting than plain remote diffuse from the viewpoint direction :) Also I think I overdid the delta DE threshold (at 1e-4) I may try again using say 5e-4.



Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 04, 2009, 01:04:05 PM
Wow, it really is beginning to resemble romanesco broccoli, even taking on the IFS look, but of course with a completely different approach.

Can you make the Delta DE threshold lower still (lower = more fine detail right?). I'd love to see even more nooks and crannies... Any chance of 1e-7 or even 1e-8?

Love to see the 3000x3000 1e-4 pic still if you can upload it. Even if it's 'overdone', that may be because of the plain lighting. It will still give an idea of what we can expect once shadows come into play (where I'm guessing no amount of detail can be too fine).
This is really exciting - it's going to look so awesome with full shadowing etc. :w00t:

bugman, I like the sound of animating the exponent!


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 04, 2009, 08:42:25 PM
Love to see the 3000x3000 1e-4 pic still if you can upload it. Even if it's 'overdone', that may be because of the plain lighting. It will still give an idea of what we can expect once shadows come into play (where I'm guessing no amount of detail can be too fine).

It was too big for the gallery here, so:

http://makinmagic.deviantart.com/art/Twinbee-s-3D-Mandy-degree-7-135872852 (http://makinmagic.deviantart.com/art/Twinbee-s-3D-Mandy-degree-7-135872852)


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 04, 2009, 09:26:46 PM
David, this is astonishingly beautiful.


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on September 04, 2009, 09:41:31 PM
Yes, this high resolution fractal looks incredible. David, speed of your renderer is really impressive. I think I have to made second separate renderer for fast previews using DE and without rendering slices. Now I have to wait many hours to see any effect.


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 04, 2009, 09:50:32 PM
Awesome indeed. Here's another taste of things to come. I took David's previous two images and superimposed them in a special way to imitate light sourcing/shadowing. The real thing should look much better of course!

(http://www.skytopia.com/stuff/broc.png)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 05, 2009, 07:17:08 PM
Here are some higher power variations of Twinbee's Mandelbrot set using the following formula:
{x,y,z}^n = r^n{cos(n*theta)cos(n*phi),sin(n*theta)cos(n*phi),-sin(n*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))

I'd be interested to know if anyone can prove that each of the above set of Mandelbrots is connected, actually the same goes for the other "true 3D" version for which I have a suspicion that it may not be connected:

newx = xx*xx - yy*yy - zz*zz - ww*ww;
newy = 2.0*xx*yy + 2.0*ww*zz;
newz = 2.0*xx*zz + 2.0*yy*ww;
neww = 2.0*xx*ww + 2.0*yy*zz;
xx = newx +a;
yy = newy +b;
zz = newz +c;
ww = neww;


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 12:48:43 AM
Here are some higher power variations of Twinbee's Mandelbrot set using the following formula:
{x,y,z}^n = r^n{cos(n*theta)cos(n*phi),sin(n*theta)cos(n*phi),-sin(n*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))

I'd be interested to know if anyone can prove that each of the above set of Mandelbrots is connected, actually the same goes for the other "true 3D" version for which I have a suspicion that it may not be connected:

newx = xx*xx - yy*yy - zz*zz - ww*ww;
newy = 2.0*xx*yy + 2.0*ww*zz;
newz = 2.0*xx*zz + 2.0*yy*ww;
neww = 2.0*xx*ww + 2.0*yy*zz;
xx = newx +a;
yy = newy +b;
zz = newz +c;
ww = neww;


Ooops - make that "for which  I have the suspicion that the standard 3D slice of the 4D set is not connected" which doesn't mean the full 4D object is not connected :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 04:04:05 AM
I would like to make an animation of the higher power variation of Twinbee's Mandelbrot set, by continuously varying the exponent, but my code is pretty slow. It will take a while for me to complete the render. Perhaps David can render it faster than I could. It seems like his algorithm is quite fast.

Another one I would like to do is show how the 4D version of Twinbee's Mandelbrot set can be continuous animated between different
3D slices.


Edit: I updated the animation to a 640*480 version.

Here's an animation of the power varying from 3 to 10:

http://makinmagic.deviantart.com/art/The-Brocolli-Virus-136076770 (http://makinmagic.deviantart.com/art/The-Brocolli-Virus-136076770)

Anyway rendering 500 frames at 640*480 took 4hrs 34mins, that's around 33 seconds per frame which I think is pretty good for my 2GHz core2Duo laptop in single threaded mode - note that because of the number of higher trig functions involved the core2Duo was actually less than twice as fast as this P4HT at rendering this one.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 12:26:37 PM
Here's a zoom into the degree 10 version of bugman's formula:

(http://www.fractalforums.com/gallery/0/141_06_09_09_12_25_17.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 06, 2009, 01:25:00 PM
WOW JUST WOW.

 (jaw drops)

How close to the holy grail is this gonna be - the one that I've always been hoping for?! The variety of the shapes is looking so promising! I wonder if the normal version (power 2) has this kind of detail at any point after zooming?

Excellent shot David. You can guess what I'm going to say - I'd love to see a lower threshold for this one :D I feel we may be at the point Mandelbrot was when he first discovered the 2D version, but computers took hours or days to render anything.

The animation is also stunning. It's like as if it's trying to subtly force more bulbs on the surface but without losing symmetry.

Quote
I'd be interested to know if anyone can prove that each of the above set of Mandelbrots is connected
I was thinking exactly the same - can't imagine how one might prove it apart from experimentally.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 02:36:56 PM
I updated the animation to 640*480:

http://makinmagic.deviantart.com/art/The-Brocolli-Virus-136076770 (http://makinmagic.deviantart.com/art/The-Brocolli-Virus-136076770)


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on September 06, 2009, 04:50:18 PM
Sometimes ago I made the same with Buddhabrot fractal (power was varying from -6 to to +7). Watch in HD on Youtube:
http://www.youtube.com/watch?v=KTS7F9dzr4k
I think it will be very interesting in 3D. Maybe somebody made some trials with 3D Buddhabrots? I'm planning in near future to write some program for rendering 3D Buddhabrots and animations.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 06:39:05 PM
I'm repeatedly disappointed by the quality of the final animation when uploading to DA or YouTube, so here's the original h264 Quicktime 640*480 version of "The Broccoli Virus":

http://www.fractalgallery.co.uk/Broccoli.html (http://www.fractalgallery.co.uk/Broccoli.html)

If you'd like to see it more than just once then please save yourself a local copy rather than always going to my page (otherwise I'll start running out of bandwidth).


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 06, 2009, 07:13:07 PM
excellent dave, do you render with uf5 ?

i need to try some fancy formulas, have you uploaded the formulas, i would like to play around, and convert standard fractals
for using the 4d math method ...


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 06, 2009, 07:13:34 PM
33 seconds per frame?! I would really like to understand your distance estimation method, David.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 08:21:37 PM
excellent dave, do you render with uf5 ?

i need to try some fancy formulas, have you uploaded the formulas, i would like to play around, and convert standard fractals
for using the 4d math method ...


Yes I did them with UF5 with my WIP version of the rendering method that I posted the pseudo-code for.
I'm still working on my 3D IFS formula so haven't redone the escape-time formula for general release yet.

Note that for the use of bugman's method for general formulas we need to define "a*b" - we have a^n but not the product of two or more different values.

Also this is purely a 3D method - Paul also previously posted a 4D version.

For the 3D method I would suggest that we convert the squared version:

{x,y,z}^2 = r^2{cos(2*theta)cos(2*phi),sin(2*theta)cos(2*phi),-sin(2*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))

for a*b such that:

{xa,ya,za}*{xb.yb,zb} = r^2{cos(2*theta)cos(2*phi),sin(2*theta)cos(2*phi),-sin(2*phi)}
where:
r = exp(log(sqrt(xa^2+ya^2+za^2))+log(sqrt(xb^2+yb^2+zb^2)))
theta=atan(y/x), phi=atan(z/sqrt(x²+y²)) where x=(xa+xb), y=(ya+yb) and z=(za+zb)

which I think is a commutative method.

Note that the value for r defined here can be simplified to:  r = exp(0.5*(log(xa^2+ya^2+za^2)+log(xb^2+yb^2+zb^2)))

I'm not sure given that, how to "correctly" define division or even if it is possible ?



Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 08:27:26 PM
33 seconds per frame?! I would really like to understand your distance estimation method, David.


I thought the pseudo-code was fairly clear ?

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812)

Basically although based on using the Newton to find the distance to the next iteration depth it actually boils down to distance estimation based on iteration density.
Just ask if you need the algorithm clarifying :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 08:45:05 PM
excellent dave, do you render with uf5 ?

i need to try some fancy formulas, have you uploaded the formulas, i would like to play around, and convert standard fractals
for using the 4d math method ...


Yes I did them with UF5 with my WIP version of the rendering method that I posted the pseudo-code for.
I'm still working on my 3D IFS formula so haven't redone the escape-time formula for general release yet.

Note that for the use of bugman's method for general formulas we need to define "a*b" - we have a^n but not the product of two or more different values.

Also this is purely a 3D method - Paul also previously posted a 4D version.

For the 3D method I would suggest that we convert the squared version:

{x,y,z}^2 = r^2{cos(2*theta)cos(2*phi),sin(2*theta)cos(2*phi),-sin(2*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))

for a*b such that:

{xa,ya,za}*{xb.yb,zb} = r^2{cos(2*theta)cos(2*phi),sin(2*theta)cos(2*phi),-sin(2*phi)}
where:
r = exp(log(sqrt(xa^2+ya^2+za^2))+log(sqrt(xb^2+yb^2+zb^2)))
theta=atan(y/x), phi=atan(z/sqrt(x²+y²)) where x=(xa+xb), y=(ya+yb) and z=(za+zb)

which I think is a commutative method.

Note that the value for r defined here can be simplified to:  r = exp(0.5*(log(xa^2+ya^2+za^2)+log(xb^2+yb^2+zb^2)))

I'm not sure given that, how to "correctly" define division or even if it is possible ?


Haven't checked but I'm not sure that my suggested method for a*b would give the same result for a*a*a as the original a^3 method ?

Edit: Sorry - I wasn't thinking in terms of magnitudes and angles, for a*b that should probably be:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = exp(log(sqrt(xa^2+ya^2+za^2))+log(sqrt(xb^2+yb^2+zb^2)))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))

Is that correct ?



Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 09:14:08 PM
excellent dave, do you render with uf5 ?

i need to try some fancy formulas, have you uploaded the formulas, i would like to play around, and convert standard fractals
for using the 4d math method ...


Yes I did them with UF5 with my WIP version of the rendering method that I posted the pseudo-code for.
I'm still working on my 3D IFS formula so haven't redone the escape-time formula for general release yet.

Note that for the use of bugman's method for general formulas we need to define "a*b" - we have a^n but not the product of two or more different values.

Also this is purely a 3D method - Paul also previously posted a 4D version.

For the 3D method I would suggest that we convert the squared version:

{x,y,z}^2 = r^2{cos(2*theta)cos(2*phi),sin(2*theta)cos(2*phi),-sin(2*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))

for a*b such that:

{xa,ya,za}*{xb.yb,zb} = r^2{cos(2*theta)cos(2*phi),sin(2*theta)cos(2*phi),-sin(2*phi)}
where:
r = exp(log(sqrt(xa^2+ya^2+za^2))+log(sqrt(xb^2+yb^2+zb^2)))
theta=atan(y/x), phi=atan(z/sqrt(x²+y²)) where x=(xa+xb), y=(ya+yb) and z=(za+zb)

which I think is a commutative method.

Note that the value for r defined here can be simplified to:  r = exp(0.5*(log(xa^2+ya^2+za^2)+log(xb^2+yb^2+zb^2)))

I'm not sure given that, how to "correctly" define division or even if it is possible ?


Haven't checked but I'm not sure that my suggested method for a*b would give the same result for a*a*a as the original a^3 method ?

Edit: Sorry - I wasn't thinking in terms of magnitudes and angles, for a*b that should probably be:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = exp(log(sqrt(xa^2+ya^2+za^2))+log(sqrt(xb^2+yb^2+zb^2)))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))

Is that correct ?



OK - now I'm embarassed, I missed that Twinbee had actually posted:

**************
// A triplex number is a '3D' number
triplex multiply(triplex a, triplex b) {
    triplex n;
    double pi=3.14159265;
    double r    = pow(a.x*b.x + a.y*b.y + a.z*b.z , 0.5);
    double yang = atan2( pow(a.x*b.x + a.y*b.y, 0.5) ,      a.z  )  ;
    double zang = atan2(a.y , b.x);
    n.x = (r*r) * sin( yang*2 + 0.5*pi ) * cos(zang*2 +pi);
    n.y = (r*r) * sin( yang*2 + 0.5*pi ) * sin(zang*2 +pi);
    n.z = (r*r) * cos( yang*2 + 0.5*pi );
   return n;
}
***********************

Which gives a different a*b - so is bugman's formula more different from Twinbee's than I thought it was ?

Edit:
<blush> OK, my version is actually:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)*(xb^2+yb^2+zb^2))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))

On balance I think I prefer a combination:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = abs(xa*xb+ya*yb+za*zb)
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))

However we still need division ?

So maybe use this for a*b:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)*(xb^2+yb^2+zb^2))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))


And this for a/b:

{xa,ya,za}/{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)/(xb^2+yb^2+zb^2))
theta=atan(ya/xa)-atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))-atan(zb/sqrt(xb²+yb²))




Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 06, 2009, 09:54:57 PM
However we still need division ?

So maybe use this for a*b:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)*(xb^2+yb^2+zb^2))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))


And this for a/b:

{xa,ya,za}/{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)/(xb^2+yb^2+zb^2))
theta=atan(ya/xa)-atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))-atan(zb/sqrt(xb²+yb²))


I don't suppose there's the slightest chance that this is associative as well as the multiply being commutative ?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 07, 2009, 12:27:06 AM
However we still need division ?

So maybe use this for a*b:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)*(xb^2+yb^2+zb^2))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))


And this for a/b:

{xa,ya,za}/{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)/(xb^2+yb^2+zb^2))
theta=atan(ya/xa)-atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))-atan(zb/sqrt(xb²+yb²))


I don't suppose there's the slightest chance that this is associative as well as the multiply being commutative ?


Just to add I meant is there the slightest chance that the multiplication is associative over addition i.e. a*(b+c) = a*b + a*c.

Just checked and using the above * and / then if c = a/b then a is not necessarily equal to b*c :)
However the "divide" still makes for an interesting 3D function, I tried redoing my animation for the degree 3 to the degree 10 such that the degree was increased to from 4 to 11 but the result was "divided" by the original value - the result was similar to the original from 3 to 10 but not the same.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 07, 2009, 01:44:33 AM
I would like to see the animation go all the way down to degree 2, or perhaps even to negative powers.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 07, 2009, 03:26:20 AM
I'm repeatedly disappointed by the quality of the final animation when uploading to DA or YouTube, so here's the original h264 Quicktime 640*480 version of "The Broccoli Virus":

http://www.fractalgallery.co.uk/Broccoli.html (http://www.fractalgallery.co.uk/Broccoli.html)

If you'd like to see it more than just once then please save yourself a local copy rather than always going to my page (otherwise I'll start running out of bandwidth).

I've added a view of the same animation but using the "division" method added, so the origibal was z^n+c but the small version is (z^(n+1))/z + c where the "divide" is as I outlined in my last posts.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 07, 2009, 06:31:24 AM
Here is my most detailed global illumination rendering so far with 320 samples per pixel:
http://bugman123.com/Hypercomplex/Mandelbrot-White1-large.jpg


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 07, 2009, 07:53:30 PM
Here's another variation that Rudy Rucker came up with in 1990:
{x,y,z}² = r²*{cos(2*phi)*cos(2*theta), cos(2*phi)*sin(2*theta), sin(2*phi)}
where r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/x)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 09, 2009, 03:49:20 PM
Excellent renders! Rudy's formula actually seems fairly similar to mine. I wonder if it will have the awesome fractal detail of the sea anemone/virus at higher powers when you've zoomed in.

I tried to see if this was the case, but the results seem in between either conclusion:
http://www.skytopia.com/project/fractal/new/3dmand-rudy-rucker.jpg  (1600x800 res)

Here are some other orthographic projection renders. The quality is no where near the images from you guys, but the advantage is speed. Optimization of my main algorithm allowed a speed up of around 100x. All of these together took only around 1-2 days (in total) on a quad core. The images are mapped using a z depth 'ping pong' colour scheme.

Here's a giant 8000x4000 resolution of the old 3d mandy:
http://www.skytopia.com/project/fractal/new/3dmand-standard.jpg

Since higher powers have nice detail, I was seeing if there was any kind of fractal detail in this power 2 version, but it appears not (3000x3000):
http://www.skytopia.com/project/fractal/new/3dmand-bulbs-bulb.jpg

Here's a nice 3000x3000 pixel image from the power 8 (apx) version:
http://www.skytopia.com/project/fractal/new/3dmand-power-apx8.jpg

Finally, here's a nice 3000x3000 pixel image zoom in from the power 8 version:
http://www.skytopia.com/project/fractal/new/3dmand-power8corner.jpg


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 10, 2009, 10:47:46 AM
Here's a zoom with a different viewpoint:

http://makinmagic.deviantart.com/art/Amongst-the-Buds-136532213 (http://makinmagic.deviantart.com/art/Amongst-the-Buds-136532213)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 10, 2009, 01:51:01 PM
Ace! I fear adding even shadowing (let alone global illumination) may choke on that!  :crazy:


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 10, 2009, 04:16:45 PM
a bit moreiterations would also be nice, diffuse direct lighting is fine !

i propose, for global illumination issues, a mesh export would be better, than to include a whole global illum renderer ....


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 11, 2009, 10:03:37 PM
I really must stop rendering and get on with some coding instead !

Anyway, I hope you like it:

http://www.youtube.com/watch?v=i94NzTRCxg8 (http://www.youtube.com/watch?v=i94NzTRCxg8)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 12, 2009, 01:57:42 AM
Cool !

How about a zoom in to 10,000x starting from 1x... (one where the camera moves in, rather than a camera type magnification (narrowing field of vision), which would only look like a 2D magnification thing, rather than an awesome 'fly through' with parallax). Naturally, the camera would need to slow down towards the end as it gets incredibly close to the object. Also, with a nice, large field of vision for maximum effect :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 12, 2009, 05:06:33 AM
Anyone for a degree 4 Julia Set ?

http://makinmagic.deviantart.com/art/True-3D-Julia-136717735 (http://makinmagic.deviantart.com/art/True-3D-Julia-136717735)


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 12, 2009, 05:31:58 AM
Here are a couple of 3D Pickover stalks orbit traps:
http://bugman123.com/Hypercomplex/PickoverStalks-Tricorn-large.jpg
http://bugman123.com/Hypercomplex/PickoverStalks-White-large.jpg


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 12, 2009, 05:35:00 AM
Maybe somebody made some trials with 3D Buddhabrots? I'm planning in near future to write some program for rendering 3D Buddhabrots and animations.

Here are my first attempts to create a 3D Nebulabrot (a variation of the Buddhabrot). Unfortunately, it has some bugs, but I think it will look really beautiful if I ever get the bugs ironed out:
http://bugman123.com/Hypercomplex/Nebulabrot-White.jpg
http://bugman123.com/Hypercomplex/Nebulabrot-Tricorn.jpg


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 12, 2009, 04:24:50 PM
those orbit traps variation looks beautiful !
and for the 3d buddhabrot .... you fill a 3d array with hit counter values ?! and render it as a volumetric object ?!?

 :hmh:


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 12, 2009, 06:39:50 PM
Here's a comparison of two different ways of calculating higher order Mandelbrot sets for Twinbee's formula. One image uses the standard method of:
{x,y,z}^8 = r^8{cos(8θ)cos(8φ),sin(8θ)cos(8φ),-sin(8φ)}

The other image uses nesting:
(({x,y,z}²)²)² where {x,y,z}² = r²{cos(2θ)cos(2φ),sin(2θ)cos(2φ),-sin(2φ)}

In either case r=sqrt(x²+y²+z²), θ=atan(y/x), φ=atan(z/sqrt(x²+y²))


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 14, 2009, 09:31:02 PM
those orbit traps variation looks beautiful !
and for the 3d buddhabrot .... you fill a 3d array with hit counter values ?! and render it as a volumetric object ?!?

 :hmh:

Yes, the 3D Buddhabrot is a volumetric rendering of a 3D array with hit counter values. I am going to try a completely different approach and see if I get better results.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 14, 2009, 09:32:09 PM
I have improved the resolution of my 8th order version of Twinbee's Mandelbrot set:
http://bugman123.com/Hypercomplex/Mandelbrot-White8-large.jpg


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 14, 2009, 09:33:22 PM
Anyone for a degree 4 Julia Set ?

http://makinmagic.deviantart.com/art/True-3D-Julia-136717735 (http://makinmagic.deviantart.com/art/True-3D-Julia-136717735)

I like this one. What constant did you use for this Julia set?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 14, 2009, 10:58:42 PM
Anyone for a degree 4 Julia Set ?

http://makinmagic.deviantart.com/art/True-3D-Julia-136717735 (http://makinmagic.deviantart.com/art/True-3D-Julia-136717735)

I like this one. What constant did you use for this Julia set?


It's a degree 4 using your version of Twinbee's formula - i.e. the "power" version rather than the repeated squaring - and the Julia constant is (0.8,0,0).


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 14, 2009, 11:10:24 PM
All good stuff; more zooms please! :)

At the mo, the surface is going to be mono-hued in general (I think). I never thought we'd get to use it, but I bet Duncan's method of colouring the outside edge would produce interesting results:
http://www.fractalforums.com/mandelbrot-and-julia-set/coloring-algorithm-to-allow-for-multi-colored-mandelbrot-edge


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 14, 2009, 11:36:17 PM
All good stuff; more zooms please! :)

At the mo, the surface is going to be mono-hued in general (I think). I never thought we'd get to use it, but I bet Duncan's method of colouring the outside edge would produce interesting results:
http://www.fractalforums.com/mandelbrot-and-julia-set/coloring-algorithm-to-allow-for-multi-colored-mandelbrot-edge

Actually for well-behaved maths (like quats or "standard" hypercomplex) where there's an analytical distance estimator and for other fractals using the delta smooth iteration method then colouring the surface simply based on the smooth iteration value for the solid surface points should produce surface colour variation - using both methods the shape of the solid does not match the shape of the smooth iteration contours provided that the max. iteration used is large enough - in the delta case this is because "solid" is essentially based on the iteration density rather than the iteration value.
Ways of colouring the surface is something that I will include in my new set of classes when I finally get around to some more fractal coding :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 15, 2009, 12:00:37 AM
Anyone for a degree 4 Julia Set ?

http://makinmagic.deviantart.com/art/True-3D-Julia-136717735 (http://makinmagic.deviantart.com/art/True-3D-Julia-136717735)

I like this one. What constant did you use for this Julia set?


It's a degree 4 using your version of Twinbee's formula - i.e. the "power" version rather than the repeated squaring - and the Julia constant is (0.8,0,0).


Actually the Julia using the double squaring method produces a very similar result anyway :)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 19, 2009, 03:51:22 PM
Finally I managed to update my crappy orthographic drawer. Okay, so this only has fake shadowing (the same technique as the superposition of the earlier broccoli), but here's another 'taster' for what we can expect this thing to look like. I'm looking forward to adding proper shadowing soon. Enjoy, and click here for full size (http://www.skytopia.com/project/fractal/new/shellbrot-gold.png).

"Golden Mandelbrot Canyon" - (3D shellbrot - power 8, iterations: 6)

(http://www.skytopia.com/project/fractal/new/qpng/Golden-Mandelbrot-Canyon.png)

Anyone for Viennetta ice cream?


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 19, 2009, 04:14:52 PM
yea, this one really looks yummy ... nice iso rendering :D



Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 23, 2009, 07:07:51 PM
 :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t: :w00t:

Sorry for the above spamming, but this is actually pretty exciting. It's amazing what a simple formula can do. The render below consists of a zoom in the bottom right corner of the earlier 'golden' mandelbrot, but this time in full shadowed mode. It uses 7 iterations. The render took around 16-24 hours on a single core, and consists of around 2000x2000x20000 voxels. For each pixel, around 200 rays were shot in spherical directions to obtain the shadows.

"A Slice of Mandelbrot Gateaux"

CLICK HERE FOR FULL SIZE (http://www.skytopia.com/project/fractal/new/full/q85/A-Slice-of-Mandelbrot-Gateaux-med.jpg) (2000^2)

(http://www.skytopia.com/project/fractal/new/full/q85/A-Slice-of-Mandelbrot-Gateaux-medium-small.jpg)

Here's a preview of a more broccoli-esque location: (I'm rendering full-size soon):
(http://www.skytopia.com/project/fractal/new/q85/magic-broccoli-old.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 23, 2009, 08:43:56 PM
 from me a decent:

:thumbsup1: :thumbsup1: :thumbsup1: :thumbsup1: :thumbsup1: :thumbsup1: :thumbsup1: :thumbsup1:


but, beside of spamming, i also want to use the 'new' developed formulas, as far as i know yet you use actually 2 variants for using a true 3 Dimensional Vector
and you have extended the 2 dimensional complex calculations to a 3 dimensional method which differs from the normally used quaternionic 4d method which complies
certain mathematical rules ( for complex numbers it was : i*i=-1 )....

i think we should create a (pdf,latex?) document describing the modifications, and list the formulas, as it was done with the fractal flame algorithm ... this would make
for a nice coproduction on fractalforums.com i can start on creating a rough outline for the document, and start collecting the formulas you have developed ... and try
to explain why the modifications took place ...

the document should contain the following parts:

prerequisite:
complex numbers description :D
extending to "real" 3d ( not using 3 parts of a 4d vector )
A Chapter About Coloring/inside methods, because outlining the "inner" part of the fractal ( the points which do not diverge ) is just one coloring method out of many ( HPDZ has a nice document describing that http://www.hpdz.net/TechInfo_Colorizing.htm )


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 23, 2009, 09:05:37 PM
That all sounds good. Colouring the thing will produce even more incredibleness. I will stop short of calling my above renders a 'glimpse', but full global illumination and (most dramatically) perspective will make this 100x better yet still!! When stuff's in 3D, it makes all the difference. In the gateaux pic, imagine standing on one of the 'balconies' and looking across and down the surface on the mountain, with sumptious detail to either side. It will kill the CPU as always, but wow, to even think of this is too awesome.

Quote
and you have extended the 2 dimensional complex calculations to a 3 dimensional method which differs from the normally used quaternionic 4d method which complies certain mathematical rules ( for complex numbers it was : i*i=-1 )....

Yup - pretty much. It's the same formula I printed back here (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg4109/#msg4109), except where the squaring changes to higher powers instead. Hopefully these results justify my obsession with all of this to begin with ;)

Of course, me and Paul can't take all the credit for the concept. To my surprise, it turns out that Rudy Rucker also thought of the same formula around 20 years ago (and didn't realise its potential), and for all I know, others have thought of it too. Of course, limited computer speed would hinder research back then, and Paul's addition of highers powers for some utterly strange reason, actually produces all this detail.

Here's Rudy's recent blog entry on the matter:
http://www.rudyrucker.com/blog/2009/09/15/in-search-of-the-mandelbulb/

Of course, what we have here is much closer, but it's still not quite the holy grail I'm after. I could definitely be fooled though! Though I do have my suspicions the real thing will look yet better still.  ;D

We must let Benoit Mandelbrot see some of this stuff!


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 23, 2009, 09:49:27 PM
Here is a formula for the square root based on Twinbee's formula for squaring a 3D hypercomplex number ("triplex"). By definition, the square root must satisfy sqrt({x,y,z})² = {x,y,z}. As it turns out, 4 roots can be found that satisfy this equation. Using these roots, one can calculate inverse Julia set fractals. This method is very fast, but some regions are faint because they attract much slower. For example, 2 billion points can be calculated in a matter of seconds, although rendering can take longer. Here are some pictures:

Julia set with 2 billion spheres (the full-sized image rendered in 4 hours at 4000 x 4000 pixels):
http://bugman123.com/Hypercomplex/Julia-White-spheres-large.jpg

Julia set with 2 billion points (the full-sized image rendered in 2 hours at 4000 x 4000 pixels):
http://bugman123.com/Hypercomplex/Julia-White-points1-large.jpg

180 frame animation with 2 million spheres (the full-sized animation rendered in 2 hours at 1000 x 1000 pixels):
http://bugman123.com/Hypercomplex/Julia-White-spheres.m1v

180 frame animation with 8 million points (the full-sized animation rendered in 1.5 hours at 1000 x 1000 pixels):
http://bugman123.com/Hypercomplex/Julia-White-points.m1v

8 million points (the full-sized 1000 x 1000 image rendered in a matter of seconds):
http://bugman123.com/Hypercomplex/Julia-White-points2-large.jpg

I would really like to create inverse Mandelbrot sets, but unfortunately, as far as I know there is no practical way to do this.

Here is some Mathematica code demonstating the basic concept. This code is not intended to be efficient. It is intended to be as easy as possible to understand:
WhiteSqrt[{x_, y_, z_}, sign1_, sign2_] := Module[{r = Sqrt[x^2 + y^2 + z^2], a, b, c,d}, a = sign1 Sqrt[y^2 + x^2 (2 + z^2/(x^2 + y^2)) - 2 x r]; b = sign2 Sqrt[r - x - a]/2; c = y^4 + x^2(y^2 - z^2); d = a (x (r + x) + y^2); {b ((x y^2 - d)(x^2 + y^2) - x^3 z^2)/(y c), b, -z/Sqrt[2(r - d(x^2 + y^2)/c)]}];
pc = {-0.2, 0.8, 0}; plist = {{1.0, 1.0, 1.0}, {-1.0, -1.0, -1.0}};
Do[plist = Flatten[Map[{WhiteSqrt[# - pc, 1, 1], WhiteSqrt[# - pc, -1, 1], WhiteSqrt[# - pc, 1, -1], WhiteSqrt[# - pc, -1, -1]} &, plist], 1], {6}];
Show[Graphics3D[{PointSize[0.005], Point /@ plist}, Boxed -> False, ViewPoint -> {0, 10, 0}]]


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 23, 2009, 10:06:55 PM
<snip>
Here is some Mathematica code demonstating the basic concept. This code is not intended to be efficient. It is intended to be as easy as possible to understand:
WhiteSqrt[{x_, y_, z_}, sign1_, sign2_] := Module[{r = Sqrt[x^2 + y^2 + z^2], a, b, c,d}, a = sign1 Sqrt[y^2 + x^2 (2 + z^2/(x^2 + y^2)) - 2 x r]; b = sign2 Sqrt[r - x - a]/2; c = y^4 + x^2(y^2 - z^2); d = a (x (r + x) + y^2); {b ((x y^2 - d)(x^2 + y^2) - x^3 z^2)/(y c), b, -z/Sqrt[2(r - d(x^2 + y^2)/c)]}];
pc = {-0.2, 0.8, 0}; plist = {{1.0, 1.0, 1.0}, {-1.0, -1.0, -1.0}};
Do[plist = Flatten[Map[{WhiteSqrt[# - pc, 1, 1], WhiteSqrt[# - pc, -1, 1], WhiteSqrt[# - pc, 1, -1], WhiteSqrt[# - pc, -1, -1]} &, plist], 1], {6}];
Show[Graphics3D[{PointSize[0.005], Point /@ plist}, Boxed -> False, ViewPoint -> {0, 10, 0}]]


Can you translate that root calculation into step-wise pseudo-code Paul please ? I can never follow Mathematica code :)


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 23, 2009, 10:19:22 PM
If you look closely there is a image of the formula underneath my previous post. Unfortuntely, Fractal Forums continues to insist on shrinking my images into tiny thumbnails so it's easy to overlook the image if you're not looking carefully for it.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 23, 2009, 10:25:54 PM
For those of you who don't use Mathematica, here is my C++ code that returns all 4 roots in an array of 3D points:

#define nroot 4
pt3D plist[nroot];
pt3D pc=pt3D(-0.2,0.8,0);
pt3D *WhiteSqrt(pt3D p) {double t1,t2,t3,t4;
 double x=p.x,y=(p.y==0.0?1.0e-9:p.y),z=p.z; // avoids singularity when y=0
 double x2=sqr(x),y2=sqr(y),z2=sqr(z),r=sqrt(x2+y2+z2);
 double a=sqrt(y2+x2*(2.0+z2/(x2+y2))-2.0*x*r), b=sqr(y2)+x2*(y2-z2), c=a*(x*(r+x)+y2);
 t1=r-x; double yroot1=0.5*sqrt(t1-a), yroot2=0.5*sqrt(t1+a);
 t1=x*y2; t2=x2+y2; t3=cube(x)*z2; t4=y*b;
 double xroot1=yroot1*((t1-c)*t2-t3)/t4, xroot2=yroot2*((t1+c)*t2-t3)/t4;
 t1=c*(x2+y2)/b; double zroot1=-z/sqrt(2.0*(r-t1)), zroot2=-z/sqrt(2.0*(r+t1));
 plist[0]=pt3D(xroot1,yroot1,zroot1);
 plist[1]=pt3D(xroot2,yroot2,zroot2);
 plist[2]=pt3D(-xroot1,-yroot1,zroot1);
 plist[3]=pt3D(-xroot2,-yroot2,zroot2);
 return plist;
}


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 23, 2009, 10:26:56 PM
If you look closely there is a image of the formula underneath my previous post. Unfortuntely, Fractal Forums continues to insist on shrinking my images into tiny thumbnails so it's easy to overlook the image if you're not looking carefully for it.


I see it now - was it that big originally ? If so I can't believe I missed it !

Edit: Thanks for posting the C version :)

Edit2: I know why I missed the gif formula, I was reading your post in "recent posts" and the images don't get shown there.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 23, 2009, 10:40:33 PM
Here is a formula for the square root based on Twinbee's formula for squaring a 3D hypercomplex number ("triplex").

Hi Paul, have you tried using Mathematica to see if you can get a true "divide" for any of the possible multiplies ?

e.g. such that b*(a/b) = a where the mulitiiply is:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)*(xb^2+yb^2+zb^2))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))

Forgive me if given that "multiply" it's not actually possible to accomplish a true "divide", my math theory is more limited than my programming skills ;)


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 23, 2009, 11:27:50 PM
David, I cannot find a division formula for your multiplication formula because it is expressed in trigonometric form. I was able to find a square root formula using the "simplified" non-trigonometric form of the squaring equation, but I can't seem to obtain a similar non-trigonometric form of your multiplication formula.

Just out of curiosity, what were you hoping to do with this division formula?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 24, 2009, 01:48:03 AM
David, I cannot find a division formula for your multiplication formula because it is expressed in trigonometric form. I was able to find a square root formula using the "simplified" non-trigonometric form of the squaring equation, but I can't seem to obtain a similar non-trigonometric form of your multiplication formula.

Just out of curiosity, what were you hoping to do with this division formula?


Ermmm, "true 3D" formulas using division - such as different versions of the Newton or Nova.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 24, 2009, 02:21:09 AM
Here are a few higher order Julia set renders with global illumination:

4th order, c={-0.2,0.8,0}, imax=6:
http://bugman123.com/Hypercomplex/Julia-White4-large.jpg

4th order, c={0.8,0,0}, imax=6 (same as David Makin's):
http://bugman123.com/Hypercomplex/Julia-White4-2-large.jpg

6th order, c={-0.2,0.8,0}, imax=6:
http://bugman123.com/Hypercomplex/Julia-White6-large.jpg


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 24, 2009, 07:07:32 AM
Wow Twinbee, I couldn't see your fractal renderings until now because I was at work. Those really are stunning. How long did they take to render and how many samples are you using per pixel for anti-aliasing?


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 24, 2009, 10:01:33 AM
Thanks, love the julia renderings you and David are making too.

The first took around 1 to 2 days as far as I know. It used no antialiasing at all (apart from for the forum preview, which was scaled down from 2000x2000 to around 770*770.

The second one took about 6-12 hours, and also had no anti-aliasing (apart from a minimal scaling from 800x800 to 770x770 which blurs it a bit). In addition, it was given no justice. Here's a 2000x2000 which is better, not least because an extra couples of valuable iterations were also used (8 instead of 6 - makes all the difference):

"Fractal Foliage" (http://www.skytopia.com/project/fractal/new/fractal-foliage.jpg).

No anti-aliasing for this either. It does need it, so I'm doing a monsterous 4000x4000 version now. Should only take a week or so ;D

Interestingly, a hundred iterations produces very interesting results (I'll post something soon). Thanks to the shadows, they're not so bitty as one might expect, though they're not as smooth as the lesser iterations, unless we go for massive oversampling/anti-aliasing!



Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 24, 2009, 02:38:23 PM
i am going to set up a gpu renderer for that ... and try to make it as a benchmark or windows screensaver for current graphics cards ... yummy yummy
 :evil1: :dink: O0 O0 O0


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 24, 2009, 06:24:47 PM
i am going to set up a gpu renderer for that ... and try to make it as a benchmark or windows screensaver for current graphics cards ... yummy yummy
 :evil1: :dink: O0 O0 O0

I would like to see that. I wish I knew how to program the GPU. You can animate the inverse method in real time.


Title: Re: True 3D mandlebrot type fractal
Post by: Rudy on September 24, 2009, 06:31:20 PM
Good going, Twinbee, that shadowed 8th degree polynomial 3D Mandlbrot-like set is the best yet.  I like your line,

"In the gateaux pic, imagine standing on one of the 'balconies' and looking across and down the surface on the mountain, with sumptious detail to either side."

People sometimes ask why the 3D 'brots don’t have the color bands like in the 2D mandelbrot ... it's because everything we see in these images has the same escape iteration count…the visible pixels are all on the surface. But the shadowing gets a lot more kapow from the 3D.

 In a better world, we could make the pixels translucent to varying degrees, and have the 100 step iteration faintly visible as purplish fingers inside the pale gold of the ten step iteration, and so on.  Like a translucent Cthulhu cuttlefish.

For now I just wish I go in there and fly around.  To that end, I'm actually including a scene like this in an SF novel I'm currently writing.  Your work is an inspiration.

I say a little more about this in a more recent blog post http://www.rudyrucker.com/blog/2009/09/21/breaking-the-bank-of-computation (http://www.rudyrucker.com/blog/2009/09/21/breaking-the-bank-of-computation)

"Down inside one of those craterlike holes, off a balcony a third of the way up , down a spiral hallway, with everything steadily shifting its shape and fresh doorways opening up, tunnels closing off, everything translucent with deep shades of color within, the Mathematician is waiting for SOMETHING, it's hard to be sure what---he image of his lost love? A shape so hideously eldritch as to enrage the great Mind of Flimsy itself?"




Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 24, 2009, 09:02:17 PM
i am going to set up a gpu renderer for that ... and try to make it as a benchmark or windows screensaver for current graphics cards ... yummy yummy
 :evil1: :dink: O0 O0 O0

Christian I don't suppose you have a small sample project using shader 2 under DirectX say to render a 2D Mandy or Julia ?
I only have an ATI X600 at the moment and would like to do something with that - initially just 2D fractals.
I found this code: http://files.myopera.com/nerius/files/GpuFractals.zip (http://files.myopera.com/nerius/files/GpuFractals.zip) but it's for shader 3, is it possible to do something similar under shader 2 ?


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on September 24, 2009, 09:10:36 PM
i did a fractal 2d renderer und shader1.0 :)
but i suppose it is a bit hard to realize 3d rendering under shader2.0 hardware ...
i even can not get it running under 3.0 hardware right now...  :'(


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 25, 2009, 01:11:06 AM
While everyone's rendering these at higher zoom, you may like to try some quality renders of the (approx) degree 4 version:

(http://www.fractalforums.com/gallery/0/141_25_09_09_1_09_00.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 25, 2009, 03:55:44 AM
Quote
In a better world, we could make the pixels translucent to varying degrees, and have the 100 step iteration faintly visible as purplish fingers inside the pale gold of the ten step iteration, and so on.  Like a translucent Cthulhu cuttlefish.

Hey I thought of that too - good idea! I have almost zero idea how that would look, but it could only look incredible. Though it would kill all CPUs dead heh. Also a mirrored surface, or deep refractive index to make the mountain like a crystal would look awesome I bet. Did you real my earlier post about coloring each pixel as an average of the colours of the voxels within a specified radius from that initial/voxel? (Duncan's idea).

Quote
For now I just wish I go in there and fly around.

Wow, yeah me too! Wouldn't that just be so cool. Also zooming the camera into the neverending structure (with full perspective could look amazing).

And that's just the beginning, one could travel inside the object, or any one of its nooks and crannies like you were saying. I should try to 'chop' a layer of the gateau mountain off to see if there's holes inside ;)

Quote
While everyone's rendering these at higher zoom, you may like to try some quality renders of the (approx) degree 4 version:

I wonder if zooming into the degree 3 version will exhibit amazing detail like degree 8.

Trifox, GPU rendering for this would so awesome! I wonder how suited they are to using sin and cos with double precision numbers etc.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 25, 2009, 12:31:27 PM
<snip>
Trifox, GPU rendering for this would so awesome! I wonder how suited they are to using sin and cos with double precision numbers etc.

As far as I am aware float is still the highest precision available on GPUs - this is the reason I'm saving for my dream MacPro with Dual Quadcore Nehalems rather than going for something with lesser CPU/s and ultimate video card.
However I am definitely going to play around with GPU programming - starting on the new iPhone/iTouch devices - I'm even going to go into "work" on Saturdays to do it ! (Unfortunately Steve won't let me take one of Parys Technografx' Mac minis home).


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on September 25, 2009, 02:28:13 PM
As far as I am aware float is still the highest precision available on GPUs - this is the reason I'm saving for my dream MacPro with Dual Quadcore Nehalems rather than going for something with lesser CPU/s and ultimate video card.

from http://techreport.com/articles.x/17618/5 -

Quote
Demers claims the GPU is compliant with the IEEE 754-2008 standard, with precision-enhancing denorms handled "at speed." The chip now supports a fused multiply-add instruction, which takes the result of a multiply operation and feeds it directly into the adder without rounding in between. Demers describes FMA as a way to achieve DP-like results with single-precision datatypes. (This FMA capability is present in some CPU architectures, but isn't yet built into x86 microprocessors, believe it or not—though Intel and AMD have both announced plans to add it.)
Quote
The Radeon HD 5870's peak processing power is formidable at 2.7 TFLOPS for single-precision math and 544 GFLOPS for double-precision.

what we're all REALLY waiting for is intel's larrabee :)


right now i'm rendering one of these generalised julia sets, they are amazing! from my previous experiences with generalised julia sets the most interesting ones had a rational exponent p/q with p and q relatively prime; this introduces an element of periodicity when iterated that produces marvelous repeating patterns.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 25, 2009, 06:07:45 PM
Quote
In a better world, we could make the pixels translucent to varying degrees, and have the 100 step iteration faintly visible as purplish fingers inside the pale gold of the ten step iteration, and so on.  Like a translucent Cthulhu cuttlefish.

Aren't translucent pixels the same thing as the volumetric approach that Buddhi and I rendered?

Regarding refraction and dispersion, here's part of one I rendered over a month ago. But I didn't finish the render because I wasn't satisfied with the results.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 25, 2009, 09:17:41 PM
I attempted to implement David Makin's fast method for distance estimation. I kind of understand how it works but not exactly, and it's giving me weird results. It seems to be about 5x faster, than my regular method.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 25, 2009, 10:16:48 PM
I attempted to implement David Makin's fast method for distance estimation. I kind of understand how it works but not exactly, and it's giving me weird results. It seems to be about 5x faster, than my regular method.


Hi Paul, here's a slightly more wordy description "off the top of my head":

For each ray initialise a float array called say "dists" of size maxiter entries each to say 1e200 and set "binary search" count to zero, set "step dstance" to say 1e200 and set current position on the ray then perform the following loop until current position is too large or solid is found

copy "step distance" to last step distance
calculate the values for the current position on the ray
Iterate the fractal formula (==iteration1) store iteration count as i1
if hit max iter
  if last step distance==1e200
    set "solid found"
    set found position=current position
  else
    set "binary search" count to 1
    set step distance = 0.5*last step distance
    set current position = current position - step distance
  endif
else
  calculate s1 = smooth iteration value for iteration1
  cacluate values for current position + 1e-10
  Iterate the fractal formula (==iteration2)
  if hit max iter
    if last step distance==1e200
      set "solid found"
      set found position = current position+1e-10
    else
       set "binary search" count to 1
       set step distance = 0.5*last step distance
       set current position = current position+1e-10 - step distance
    endif
  else
    calculate s2 = smooth iteration value for iteration2
    calculate v = 1.0/(1.0+1e10*abs(s1-s2))
    if v<minimum approach
       step distance = 0.5*last step distance
       current position = current position - step distance
       binary search = 1
    else if not binary search
      if dists[i1]<v
         v = dists[i1]
      else
         dists[i1] = v
      endif
      if dists[i1+1]>v
          dists[i1+1] = v
      endif
      step distance = v/(2.5*user detail parameter)
      set current position = current position + step distance
    else
       if binary search count>=max binary depth
          set solid found
          found position = current position
       else
          step distance = 0.5*last step distance
          if v<minimum approach
             current position = current position - step distance
          else
             current position = current position + step distance
          endif
       endif
    endif
  endif
endif

Edit: I just rechecked the original here: http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812) and I think that's actually better :)

Paul - are you sure you 1. calculated the smooth iteration values correctly ? and 2. used abs(s1-s0) in the DE calculation not just (s1-s0) ?


Edit2: OK, just re-read the original again - there's an error, if the first iteration does not reach max iter but the second does then you need to check to see if it's the first point on the ray (by checking last step distance for instance) and if so then set the point as "found" else if it's not the first point then you *do* need to institute the binary search rather than as I originally wrote it where it's just taken as being the "found" point anyway.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on September 26, 2009, 11:41:07 AM
here's an unfinished render of those generalised julia sets:

(http://imgur.com/0Egj5.jpg) (http://imgur.com/0Egj5.jpg)

i need to get my cpu cooling sorted out before i do any serious rendering with this computer :/


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 26, 2009, 12:00:44 PM
Awesome render Thomas - is that using the Monte Carlo methods that you mentioned for the light casting ?


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on September 26, 2009, 12:06:59 PM
yup. i've been reading http://graphics.stanford.edu/papers/veach_thesis/ again lately, it's the bible of monte carlo image synthesis :)


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 26, 2009, 04:16:03 PM
Very cool. I expect your renderings will blow us all out of the water. How long did this render take and how many samples per pixel? Are you using an efficient distance estimator like David Makin's? What constant did you use?


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 26, 2009, 05:22:19 PM
Ace stuff, lycium. Like a 3D-shaped snowflake if you could ever get such a thing. GI seems to reveal more detail by brightening inside areas, i.e. nooks and crannies.

Any chance of an inside shot of the mandelbulb?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 26, 2009, 06:55:42 PM
Hi all, I just corrected and optimised the original code I posted for the "delta" DE method:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 27, 2009, 12:14:15 PM
Hi, finally got around to taking a copy of my 3D IFS formula and changing it from escape-time IFS to standard escape-time.

First result:

http://makinmagic.deviantart.com/art/True-3D-Degree-7-Two-lights-138388564 (http://makinmagic.deviantart.com/art/True-3D-Degree-7-Two-lights-138388564)

If you compare it to the earlier render (also in my scraps on DA) you'll see the increased sense of perspective gained from using the extra light source and including a specular component.

Will be adding code for shadows today :)

When I finally get around to writing the class-based raytracing suite in earnest I will be including options for global illumination methods.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 27, 2009, 08:02:36 PM
Exactly the same image but with shadows (at last), @2560*2560 took 1hour 43mins on this 3GHz P4HT running in hyperthreaded mode at around 2GHz (just 21mins extra for shadowcasting).

(http://fc06.deviantart.com/fs51/f/2009/270/b/5/True_3D_Deg7_2lights_Shadows_by_MakinMagic.jpg)

If no image above then go here:

http://makinmagic.deviantart.com/art/True-3D-Deg7-2lights-Shadows-138430287 (http://makinmagic.deviantart.com/art/True-3D-Deg7-2lights-Shadows-138430287)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 27, 2009, 10:59:00 PM
Wow, a true behemoth. This is the best pic yet of the whole thing, and it's so much nicer with shadows too.


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on September 27, 2009, 11:27:12 PM
That is where I am going to live! There can't be a more beautiful location anywhere.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 27, 2009, 11:52:40 PM
That is where I am going to live! There can't be a more beautiful location anywhere.

Actually I suspect the degree 4 may be even more aesthetically pleasing - at least in close-up :)


All please note that I have some speed optimisations and improvements to do as to get the two renders I just posted there are actually 5 rays being cast per pixel just to get an accurate surface normal and at the moment it's just doing a full trace for each whereas it shouild be possible to do a full trace for the centre ray and limited ray-segment traces for the 4 adjacent rays - also I still have the issue of the dark outlines in areas of overlap and I want a better way of getting the "connectedness" i.e. to decide when an adjacent point should actually be used in the normal calculation.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on September 28, 2009, 06:08:01 AM
david that latest render of yours is really nice and clean, visualises the structure well :) also i agree about low degrees looking better close-up, the higher degree ones tend to display mainly periodicity of what's there in the low degree fractals.

i replied to paul's question about the constant used in email, it's from wikipedia (http://en.wikipedia.org/wiki/Julia_set#Quadratic_polynomials): c = -0.8x + 0.156y

twinbee, i'm looking forward to rendering more images of these fractals, but first i need to get my pc sorted. got a quote on new pc parts and servicing today, once they get an appropriately massive heatsink in stock for the i7 i'll get cooking on those zooms :)

finally, i've taken a week's leave from wednesday to work on fractal stuff!  O0


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on September 28, 2009, 04:29:45 PM
The "Mandelbulb Garden" pic is a zoom into my earlier broccoli one, and the "Ice Plateau Cross" below it is a section to the left of my previous mountain pic.

For those new to this thread, both of them are zooms into David's 'behemoth object' pic above :D

"Mandelbulb Garden"
(http://www.skytopia.com/project/fractal/new/q85/mandelbulb-garden-small-OLD.jpg)
(bigger size (http://www.skytopia.com/project/fractal/new/full/q85/mandelbulb-gardenGREEN.jpg))

"Ice Plateau Cross"
(http://www.skytopia.com/project/fractal/new/q85/plateau-cross-small.jpg)

I've asked Karl if he can help simplify the algorithm like he did before (to remove the sin/cos stuff) - the extra speed boost would be so welcome...


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on September 29, 2009, 12:11:44 AM
Here's an animated 4th order Julia set with GI:
http://bugman123.com/Hypercomplex/Julia-White4.m1v


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 29, 2009, 12:51:51 AM
You guys are totally crazy! What is more useless than a 3D brot? I love that :)

Craziness can produce amazing results:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8090/#msg8090
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8082/#msg8082
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8075/#msg8075
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7737/#msg7737

On the subject of crazy. I just found a great anagram of "David Makin" ---> "Via mad kind". Most appropriate :D


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on September 29, 2009, 04:18:28 AM
phoar paul, that animation is awesome! i'd really like to do some animations of interpolating parameters too, but my rendering system is crazy slow... maybe when i get a new gpu or larrabee or something ;)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 29, 2009, 11:15:43 AM
http://www.fractalforums.com/gallery/?sa=view;id=934 (http://www.fractalforums.com/gallery/?sa=view;id=934)


Title: Re: True 3D mandlebrot type fractal
Post by: Karl131058 on September 29, 2009, 02:58:34 PM
I've asked Karl if he can help simplify the algorithm like he did before (to remove the sin/cos stuff) - the extra speed boost would be so welcome...

OK people, here we go:

simplifying your formulae on multiplying the angles by whatever integer. I have to admit I'm a little bit astonished about the fact that people who want to learn (or freshen up) multidimensional calculus by reading a book over the weekend don't seem to know about Euler's Formula or the Binomial Theorem. These (and the definition of tan() from sin() and cos() ;D)are all that is needed to get rid of the trigonometric functions for every integer you may choose to multiply your angles by, and you will always have just polynomials in x,y and z, and the occasional sqrt(x^2+y^2). Minor drawback: these polynomials are getting more complicated the higher your "exponent" becomes, so there will be an exponent where working WITH trigonometric functions will be FASTER than with these polynomials; WHICH exponent that is probably depends on your math-library/processor, and I will NOT try to find it...

Suggested reading:
http://en.wikipedia.org/wiki/Euler%27s_formula
http://en.wikipedia.org/wiki/Binomial_theorem
http://en.wikipedia.org/wiki/Binomial_coefficient

The general argument works like this:

Euler's formula states that for any real number f
exp( i*f ) = cos(f)+i*sin(f)     ( i being sqrt(-1), of course )

Now, if you take an integer (say "n") multiple of f, you get (reversing the order)

cos(n*f) + i*sin(n*f) = exp( i*n*f )

The right side is, since it IS the exponential function, equal to (exp(i*f))^n !
So:

cos(n*f) + i*sin(n*f) = exp( i*n*f ) = (exp(i*f))^n = (cos(f)+i*sin(f))^n
(last equation comes from substituting the first one again)

By using the Binomial Theorem we expand
(cos(f)+i*sin(f))^n = Sum( k=0 to n, C(n,k)*cos(f)^k*i^(n-k)*sin(f)^(n-k) )

C(n,k) being the Binomial Coefficents

Remembering i^2 = -1 this sum can be sorted into real and imaginary parts, and we end with polynomial expressions for
cos(n*f) = real( Sum( k=0 to n, C(n,k)*cos(f)^k*i^(n-k)*sin(f)^(n-k) ) )
sin(n*f) = imag( Sum( k=0 to n, C(n,k)*cos(f)^k*i^(n-k)*sin(f)^(n-k) ) )

For shorter lines, I will write "F" (think "phi") instead of "zang", and "T" (think "theta") instead of "yang", if you don't mind...

We have
(old)x = r*cos(F)*sin(T)
(old)y = r*sin(F)*sin(T)
(old)z = r*cos(T)

and we want
newx = r^n*cos(n*F)*sin(n*T)
newy = r^n*sin(n*F)*sin(n*T)
newz = r^n*cos(n*T)

If we would insert the general expressions for sines and cosines of n*F and n*T here, everything becomes lengthy, so it is probably best to argue by example: LET n = 3:

Pascal's triangle states the relevant binomial coefficients are 1,3,3 and 1
(see example on the wikipedia page mentioned above):
(a+b)^3 = a^3 + 3*a^2*b + 3*a*b^2 + b^3, thus

( cos(f) + i*sin(f) )^3 =
          cos(f)^3 + 3*cos(f)^2*i*sin(f) + 3*cos(f)*(i*sin(f))^2 + (i*sin(f))^3

remember that i^2 = -1, thus i^3 = -i, sort into real and imaginary parts and find
a) for the real part:          cos(3*f) = cos(f)^3 - 3*cos(f)*sin(f)^2
b) for the imaginary part: sin(3*f) = 3*cos(f)^2*sin(f) - sin(f)^3

so we have:
newx = r^3 * (cos(F)^3 - 3*cos(F)*sin(F)^2) * (3*cos(T)^2*sin(T) - sin(T)^3)
newy = r^3 * (3*cos(F)^2*sin(F) - sin(F)^3) * (3*cos(T)^2*sin(T) - sin(T)^3)
newz = r^3 * (cos(T)^3 - 3*cos(T)*sin(T)^2)

"newz" seems most simple, relatively speaking. Let's factor out cos(T)^3, and remember the definition of the tan():

newz = r^3 * cos(T)^3 * ( 1 - 3*tan(T)^2 )

but remember:
1) r^3*cos(T)^3 = z^3 !
2) tan(T) = sqrt(x^2+y^2)/z

thus newz = z^3 * ( 1 - 3*(x^2+y^2)/z^2 ) = z * ( z^2 - 3*x^2 - 3*y^2 )

This can be done for EVERY exponent; you can always factor out cos(T)^n from newz and are left with z^n and a polynomial in tan(T), which can be expressed in x,y,z using formula "2" above.

For newx, we factor out sin(T)^3 from the second bracket and get

newx = r^3 * sin(T)^3 * (cos(F)^3 - 3*cos(F)*sin(F)^2) * (3*tan(T)^-2 - 1 )

now, one "r", one "sin(T)", and one of the factors in the first bracket always combine to an old coordinate, and tan(T)^-2 = z^2/(x^2+y^2), so

newx = ( x^3 - 3*x*y^2 ) * ( 3*z^2 - x^2 - y^2 ) / ( x^2+y^2 )

by the same arguments:
newy = ( 3*x^2*y - y^3) * ( 3*z^2 - x^2 - y^2 ) / ( x^2+y^2 )

This can in principle be done for every exponent, too; you always factor out sin(T)^n from the second bracket, than you combine one "r", one "sin(T)" with a cos(F) from the first bracket into x, or with a sin(F) from the first bracket into y; and the second bracket is a polynomial in ( z/sqrt(x^2+y^2) )

Minor drawback again, more explicitly: each of these brackets has, in the general case for "exponent" n, exacly (n+1) summands, as per Binomial Theorem. I personally would not want to find the closed expressions as above for, say, n>8 or so, and definitely NOT for n=32. I am quite sure that, even if one would use one of those symbolic algebra thingies to find the correct polynomials, for n=32 using the trigonometric functions will be faster, since these polynomials are of order n (=32), all of them!

I hope this was helpful.
I hope I didn't step on anyones toes (too heavily  :) ).
Any grammatical errors or strange english formulations are due to me being german, but the math SHOULD be sound!

Have fun
Karl


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on September 29, 2009, 07:56:15 PM
I've asked Karl if he can help simplify the algorithm like he did before (to remove the sin/cos stuff) - the extra speed boost would be so welcome...
simplifying your formulae on multiplying the angles by whatever integer. I have to admit I'm a little bit astonished about the fact that people who want to learn (or freshen up) multidimensional calculus by reading a book over the weekend don't seem to know about Euler's Formula or the Binomial Theorem.

Hi Karl, In my case I was hoping for a magical formulaic solution that would remove the trig for any degree of the formula but I guess that's probably not possible especially since (as shown by Paul) the degree 4 is not the same as repeating the degree 2 :)

More interesting to me would be to find a "divide" such that (a*b)/b is a and/or a*(b/a) is a where the "multiply" is:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)*(xb^2+yb^2+zb^2))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))

however my maths makes me suspect that it's not possible but is not advanced enough to confirm that suspicion or disprove it by finding a solution.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 01, 2009, 03:07:50 AM
A 3rd degree Julia:

(http://fc00.deviantart.com/fs50/f/2009/273/b/5/3rd_Degree_Julia_by_MakinMagic.jpg)

If no image above then go here:

http://makinmagic.deviantart.com/art/3rd-Degree-Julia-138800953 (http://makinmagic.deviantart.com/art/3rd-Degree-Julia-138800953)


Title: Re: True 3D mandlebrot type fractal
Post by: Karl131058 on October 01, 2009, 07:25:19 AM
More interesting to me would be to find a "divide" such that (a*b)/b is a and/or a*(b/a) is a where the "multiply" is:

{xa,ya,za}*{xb.yb,zb} = r{cos(theta)cos(phi),sin(theta)cos(phi),-sin(phi)}
where:
r = sqrt((xa^2+ya^2+za^2)*(xb^2+yb^2+zb^2))
theta=atan(ya/xa)+atan(yb/xb), phi=atan(za/sqrt(xa²+ya²))+atan(zb/sqrt(xb²+yb²))

Hi David,

now that one could be tricky...
First of all I prefer, as you do here, measuring one of the angles against the x-y-plane and not against the z-axis, because this ensures that in the x-y-plane it replicates complex multiplication. So we're back to the system twinbee proposed near the beginning of this thread...

My first reaction was like: there can't be a divide as you are looking for, cause that would define a group-structure on the 2-sphere, and that doesn't exist. See wikipedia:lie-groups for that statement; the proof is outside of my mathematical skills, too :)

BUT since (a*a)*(a*a) != a*(a*(a*a)) (as shown by Paul) that "multiplcation" is not associative, so your goal wouldn't be in  contradiction to said statement. Nevertheless, the search for something like that calls for a quiet afternoon (at least, maybe a FEW), and I'm short of those for the time being  ;D

Nice problem - there's a weekend ahead, maybe I'l have some time - but again, maybe not!

Have fun
Karl


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 01, 2009, 11:13:14 AM
Hi Karl, thanks for that...if you do ever find a "divide" at least for either a=(a*b)/b or a=a*(b/a) then I'd love to see it - I fancy trying a version of the Newton and similar fractals with this method - next I am going to see what happens using the "divide" I suggested earlier in the thread when applied in a "Newton" formula.


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 01, 2009, 03:32:43 PM
Many thanks Karl for the formulae - it actually works around 10x faster than before!! I hope to extrapolate the technique to order 4 or even 8.

Keep up the good work guys...


Title: Re: True 3D mandlebrot type fractal
Post by: Ought on October 02, 2009, 03:40:35 AM
Hi all. I've been lurking here for a month or so since Twinbee posted some questions on Physics Forum. You've created an amazing synthesis between you all. Very impressive, and it's working. I've put in many hours attempting to find a mandelbrot variant without success. You've been at it more than two years! Persistence paid off.

Beautiful creations, David. Despite that I'm primarily looking toward mandelbrots the Julias you've come up with are very pleasing. I like the metallic look.

By the way, Twinbee. This is Phrak.
----------------------------------------------------------------------------------------
This is for cut and paste. Some of this might help with presenting the mathematical notation.

α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω . . . . . Γ Δ Θ Λ Ξ Π Σ Φ Ψ Ω
∂ ∫ ∏ ∑ . . . . . ← → ↓ ↑ ↔ . . . . . ± − • × ÷ √ . . . . . ¼ ½ ¾ ⅛ ⅜ ⅝ ⅞
∞ ° ² ³ ⁿ Å . . . . . ~ ≈ ≠ ≡ ≤ ≥ « » . . . . . † ‼

To enter supscripts and subscripts use

[ sup]2[ /sup]  and [ sup]2[ /sup]

with the spaces removed from within the brackets.




Title: Re: True 3D mandlebrot type fractal
Post by: Karl131058 on October 02, 2009, 09:37:56 AM
@Ought: thank you for the help for the mathematical notation. However, in this post I'll try to refrain from using complicated formulae...

@David:
I'm sorry, but there is no "divide" like the one you are looking for!

Think spherical coordinates: we "multiply" two vectors by multiplicating the radii to get the new radius and adding the azimuth angles and elevation angles to get the new angles; the "-" in z (i.e. in elevation) doesn't make that much of a difference.

As long as the sum of the elevations is inside the interval ±900, there's no problem: take one of your "factors", invert the radius, let both angles change sign and you've got an inverse...or so it would seem! But hang on: that is only correct on the x-y-plane (small wonder, since there we have complex multiplication, a FIELD!), but NOT outside of that plane!

Suppose the sum of the elevations is exactly 900, so the "product" points along the negative z-axis.
Then there is no chance to reconstruct the original azimuth angle, that information is lost forever.

If the sum of the elevations is bigger than 900, the azimuth of the result gets another half turn and the elevation gets "reflected" around 900, but you can't recognize that if you only know the "product" and one of the "factors". So for given product "p" and factor "f" there can be several (here: two) second factors "a" that fulfill a*f=p; in case of results on the z-axis and given factor not on the z-axis there are even infinitely many of them. Which one of these would you like to choose for "p/f" :)?

(This "turnaround" is responsible for there being FOUR solutions "a" to a2 = p (in general), as pointed out earlier in this thread when somebody calculated backwards orbits.)

All this is only valid if the given factor's elevation and the products negative(!) elevation differ from each other by less than 900, else there is no second factor to find to give the desired product. As an example, there is no factor "a" which you can multiply to a given factor "f" with any positive elevation phi to result in a product on the positive z-axis. Suppose a's elevation were PHI, than phi+PHI = -900, but thats impossible, since PHI can't be less than -900.

So here you are; with given f and p, searching for "a" with a*f=p, you either have
- finitely many solutions (from which you could choose a "canonical", e.g. that without elevation-overflow), or
- infinitely many solutions, where the choice would be arbitrary in azimuth, or
- NO solutions at all!


Sorry!

Have fun
Karl


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on October 02, 2009, 12:55:25 PM
@all
Fractalalforums.com has a build in LateX Compiler ... there is no need for special signs!

Example:
[ tex]\sum^n_0 x[/tex]
\sum^n_0 x


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on October 02, 2009, 05:47:20 PM
I have just rendered z7+b Mandelbrot fractal. I used following shading algorithms together:
- hard shadows
- angle of incidence of light based on estimated normal vectors
- global illumination

(http://th04.deviantart.net/fs51/300W/f/2009/275/2/b/z7_b_3D_fractal_2_by_KrzysztofMarczak.jpg)
Full resolution: http://krzysztofmarczak.deviantart.com/art/z7-b-3D-fractal-2-138950342

rendering statistics:
number of iterations: 256
slices resolution: 1500x1500x1500 (used symmetries to achieve final resolution 3000x3000x3000)
image resolution: 3000x3000
global illumination number of rays: 150
render time of slices: 60h
render time of image: 8h


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 02, 2009, 06:39:02 PM
Wow, that's stunning - glad to see one from you Buddhi! 256 iterations is overkill for this one though haha. Even 10 iterations gets enough detail for 100x100 zooms. Although weirdly enough, the iteration 'limit' of this set does seem to converge to an object with some kind of 'frothy' detailed structure (unlike the 2D mandelbrot which evolves to mere circles). I'm currently rendering out a 100,000 iteration image at 4000*4000 pixels. I suppose that's even more overkill ;)

I still wonder if the set is connected or locally connected.

Ought, welcome to this particular corner of the interweb! :D


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 02, 2009, 07:32:37 PM
<snip>
So here you are; with given f and p, searching for "a" with a*f=p, you either have
- finitely many solutions (from which you could choose a "canonical", e.g. that without elevation-overflow), or
- infinitely many solutions, where the choice would be arbitrary in azimuth, or
- NO solutions at all!


Sorry!

Have fun
Karl

Thanks Karl - you not only answered the question but also explained it in a way that improves my (current) understanding of math - I'm sure at one time (say around 20 years ago) I would have figured that out myself but unfortunately a lot of my math knnowledge has lapsed over the years and I have to relearn things that I've forgotten :) (At one time I even knew how to solve differential equations but doing that now would take some considerable re-learning)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 02, 2009, 07:57:30 PM
I have just rendered z7+b Mandelbrot fractal. I used following shading algorithms together:

Nice work !

Just a small point, anyone thinking that it's not a connected Mandelbrot should not come to that opinion based on Buddhi's image because the rendering method used (based on a voxel grid and iteration values) will always miss areas of "solid".

Also I have improved my directional DE rendering algorithm so that (extra) black outlines are averted by changing the normal calculation to using the directional DE values from points on the adjacent rays that are the same distance from the viewpoint as the central "solid" pixel -> this means that a fractal lit by a non-viewpoint light source can be rendered by tracing just 2 rays per pixel instead of 6 and the method is 2 to 3 times faster and gives better details (it's not always 3 times faster because in many cases tracing back to the general light source takes a lot longer than the trace/s to the object from the viewpoint).
I am going to see how far I can push the closeness to "inside" in an 8000*8000 render of the degree 4 "true 3D" Mandy (as soon as I've optimised the formula a bit more) :)



Title: Re: True 3D mandlebrot type fractal
Post by: lycium on October 03, 2009, 02:26:42 PM
updated: bigger image preview, click for 3840x2400

(http://imgur.com/OBf8J.jpg) (http://lyc.deviantart.com/art/siebenfach-139038934)


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on October 03, 2009, 03:55:46 PM
Wow! Wonderful rendering! Lycium, did you render this using raytracing with radiosity? Final effect is amusing. It is worth waiting for it whole day.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on October 03, 2009, 04:02:13 PM
thanks :) yes, it has global illumination with unlimited number of light bounces. the fractal iteration is done in double precision to 8 iterations, so it takes a very long time to compute!


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 04, 2009, 02:01:57 AM
finally, after a day of rendering:

I couldn't resist doing something similar, so here's a slightly different view of a very simple crater lake but just plain Phong using 2 remote light sources - one to get the shadows and the other a source from the camera direction to get pseudo-global illumination.

Resized to 1280*960 from the original rendered on my 3GHz P4HT in double-threaded mode @3840*2880 in 3hrs 7mins.

(http://fc04.deviantart.com/fs51/f/2009/276/8/7/Crater_Lake_by_MakinMagic.jpg)

If no image above or to see the full 1280*960 version then go here:

http://makinmagic.deviantart.com/art/Crater-Lake-139108178 (http://makinmagic.deviantart.com/art/Crater-Lake-139108178)



Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 04, 2009, 02:56:33 PM
Good stuff above - like the perspectives.

Karl, you posted the below earlier on in the thread - do you know the equivalent for the power 3 formula?

Quote
if( abs(y) < really_small_value )
newx = x*x-z*z
newy = 0
newz = -2*z*sqrt(x*x)
else other code


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 05, 2009, 05:17:14 AM
Here is an animation of my 4D variation of Twinbee's formula. It looks like some sort of a spaceship to me:
http://bugman123.com/Hypercomplex/Mandelbrot-White4D.m1v


Title: Re: True 3D mandlebrot type fractal
Post by: Karl131058 on October 05, 2009, 08:49:02 AM
@twinbee:

Hi Dan,

Thats easy to do:
To get rid of that not-really-existing pole on the z-axis you simply set y=0 in the formulae,
that gives:
if( abs(y) < really_small_value )
   newx = ( x^3 - 0 ) * ( 3*z^2 - x^2 - 0 ) / ( x^2 + 0 ) = x*( 3*z^2 - x^2 )
   newy = 0
   newz = z * ( z^2 - 3*x^2 )
else
   (other formulae)
endif

That's all...

Hope that helps, have fun

Karl


Title: Re: True 3D mandlebrot type fractal
Post by: bib on October 05, 2009, 08:32:01 PM
Here is an animation of my 4D variation of Twinbee's formula. It looks like some sort of a spaceship to me:
http://bugman123.com/Hypercomplex/Mandelbrot-White4D.m1v


is it a bird is it a plane?
Nice work :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 05, 2009, 11:10:25 PM
Hi all, finally got around to being patient enough to get a pretty decent animation of the degree 4:

http://www.youtube.com/watch?v=hwnAKFlXmtA (http://www.youtube.com/watch?v=hwnAKFlXmtA)

Hope you like it - it took aaround 55 hours to render (500 frames @640*480) on this decrepit 3GHz P4HT.

Apologies for the odd error here and there - and for the aliasing - I plan on doing a re-render at work on Steve's MacPro @1280*960 with the "accuracy" setting increased - to be resampled down to 640*480.

Am working on my WIP formula adding extra (simple) objects to go in the background to act as shadow receptors and/or mirrors.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 05, 2009, 11:19:27 PM
Here is an animation of my 4D variation of Twinbee's formula. It looks like some sort of a spaceship to me:
http://bugman123.com/Hypercomplex/Mandelbrot-White4D.m1v


Hi Paul - is that animated by just varying the 4th dimension coordinate ? If so you may get a more interesting animation by rotating the 3rd spatial axis as a line from the 3rd fractal axis to the 4th fractal axis (i.e. as a line in the j,k plane through 90 degrees from the j axis to the k axis).


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 05, 2009, 11:54:42 PM
Here is an animation of my 4D variation of Twinbee's formula. It looks like some sort of a spaceship to me:
http://bugman123.com/Hypercomplex/Mandelbrot-White4D.m1v


Hi Paul - is that animated by just varying the 4th dimension coordinate ? If so you may get a more interesting animation by rotating the 3rd spatial axis as a line from the 3rd fractal axis to the 4th fractal axis (i.e. as a line in the j,k plane through 90 degrees from the j axis to the k axis).

It is a 3D "slice" of the 4D object starting from w=0, and then rotating to z=0, then rotating to y=0, then rotating to x=0, and finally rotating back to w=0 again.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 06, 2009, 12:00:55 AM
Here is an animation of my 4D variation of Twinbee's formula. It looks like some sort of a spaceship to me:
http://bugman123.com/Hypercomplex/Mandelbrot-White4D.m1v


Hi Paul - is that animated by just varying the 4th dimension coordinate ? If so you may get a more interesting animation by rotating the 3rd spatial axis as a line from the 3rd fractal axis to the 4th fractal axis (i.e. as a line in the j,k plane through 90 degrees from the j axis to the k axis).

It is a 3D "slice" of the 4D object starting from w=0, and then rotating to z=0, then rotating to y=0, then rotating to x=0, and finally rotating back to w=0 again.


Oh ! OK - I guess I should have investigated first :)


Title: Delta directional DE code updated (again)
Post by: David Makin on October 06, 2009, 12:37:26 AM
OK I confess there was another major oversight in my delta DE pseudo-code which I have now corrected:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7812/#msg7812)

Basically the newly calculated step distance (Directional DE/scale) needed to be assigned to the "step" variable - my apologies to those trying my code !


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 07, 2009, 05:49:48 PM
Here are some higher power variations of Twinbee's Mandelbrot set using the following formula:
{x,y,z}^n = r^n{cos(n*theta)cos(n*phi),sin(n*theta)cos(n*phi),-sin(n*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))

These higher order 3D Mandelbrot sets were created using the same formula as above, except the sign of the z-component is switched (the rotation about the y-axis is reversed):
{x,y,z}^n = r^n{cos(n*theta)cos(n*phi),sin(n*theta)cos(n*phi),sin(n*phi)}
r=sqrt(x²+y²+z²), theta=atan(y/x), phi=atan(z/sqrt(x²+y²))


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 07, 2009, 06:45:56 PM
A deeper look at the degree 7:

(http://fc07.deviantart.com/fs51/f/2009/280/e/d/Bridges_by_MakinMagic.jpg)

If no image then go here:

http://makinmagic.deviantart.com/art/Bridges-139503621 (http://makinmagic.deviantart.com/art/Bridges-139503621)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 07, 2009, 07:21:48 PM
Like the anim! (still want a zoom in tho). Interesting image too - didn't realise there were big gaping holes in the object as shown. Curious...

Lycium, is that a special kind of lighting used to create the more 'polarized' look (black/white), rather than for more grey shades?

It'll be interesting to see some (apx.) pow 20 renders of this thing :D


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on October 07, 2009, 11:24:17 PM
for the rendering i've got all sorts of effects going on inside my program (so that it works at very high precision); things like contrast adjustments, blurring and sharpening...


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 08, 2009, 02:47:53 AM
Like the anim! (still want a zoom in tho). Interesting image too - didn't realise there were big gaping holes in the object as shown. Curious...

I did mention in the DA comments (in reply to Lycium) that I cut the fractal to a plane to create the crater lake. I'll just add something to the main comments just to be sure no-one gets too coinfused ;)


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on October 08, 2009, 04:49:06 PM
Perhaps he was pointing to the gaps beneath the bridges?
Golden Gate, go home.


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 08, 2009, 11:02:40 PM
Stigomaster's right... I meant the gaps below the bridges in David's latest pic.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 09, 2009, 05:08:07 AM
Stigomaster's right... I meant the gaps below the bridges in David's latest pic.

Oh - I'm going to do some more examination of the degree 4 to see if that has anything similar :)


Title: Re: True 3D mandlebrot type fractal
Post by: JosLeys on October 09, 2009, 06:13:17 PM
I just joined. Hello all.
A few weeks ago, Dave Makin helped me get going on 3D fractals.
I'm using his Distance Estimate method based on smooth iteration count.
I must say it works quite well, although I'm not really sure why! I'm trying to get my hands around the underlying math, as I think it would make a good subject for an article in the appropriate place.

Well, thanks to Dave's pseudocode, here is something that I thought turned out quite well, although it has nothing to do with the quest for the elusive 3D Mandelbrot..
(http://www.josleys.com/gfx/4D_test_16S.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 09, 2009, 06:21:34 PM
Hi Jos! Glad to have you join us!  ;D
This discussion seems to be attracting quite a few talented individuals.

If I may ask, what is this image you have created? Is it a slice of a Julibrot?


Title: Re: True 3D mandlebrot type fractal
Post by: JosLeys on October 09, 2009, 06:32:40 PM
Well, I guess so. I've seen so many things called a Julibrot that I'm not sure anymore.
The z direction (perpendicular to the screen) is c=variable+i.constant), and then the formula is z^2+c (Julia), so in actual fact I'm stacking up all the possible Julia's with seed=variable+i.constant. For the image it is c= var*i.0.1, and var starts at -0.76.


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 09, 2009, 06:57:07 PM
Well, I guess so. I've seen so many things called a Julibrot that I'm not sure anymore.
The z direction (perpendicular to the screen) is c=variable+i.constant), and then the formula is z^2+c (Julia), so in actual fact I'm stacking up all the possible Julia's with seed=variable+i.constant. For the image it is c= var*i.0.1, and var starts at -0.76.

That's very nice. I like the embossed detail in the slice. I'm defining the "Julibrot" as the set of all Julia sets (which happens to include the Mandelbrot set). I made a Julibrot animation here:
http://bugman123.com/Hypercomplex/Julibrot.m1v

It is a 3D "slice" of the 4D Julibrot starting from y0=0, and then rotating to x0=0, then rotating to xc=0, then rotating to yc=0, and finally rotating back to y0=0 again.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 10, 2009, 01:11:07 AM
Stigomaster's right... I meant the gaps below the bridges in David's latest pic.

I just checked to see that the render was indeed accurate - in the original the default DE divisor parameter to get the step distances was 5 and the initial maximum distances to step was set to 0.1 - to check that it was accurate I first tried changing the maximum step distance allowed to 0.01 and this basically produced the same image (but around 4*slower), I then reset the maximum step distance allowed to 0.1 and changed the DE divisor to 10 (i.e. making all the step distances half the original values) and again this produced the same image (this time about 1.8* slower).
So I guess there are gaps under the bridges in places ;)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 10, 2009, 02:01:06 AM
I just joined. Hello all.
A few weeks ago, Dave Makin helped me get going on 3D fractals.
I'm using his Distance Estimate method based on smooth iteration count.
I must say it works quite well, although I'm not really sure why! I'm trying to get my hands around the underlying math, as I think it would make a good subject for an article in the appropriate place.

Well, thanks to Dave's pseudocode, here is something that I thought turned out quite well, although it has nothing to do with the quest for the elusive 3D Mandelbrot..
(http://www.josleys.com/gfx/4D_test_16S.jpg)

Very nice image - I also like your embossing !


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on October 10, 2009, 03:07:35 AM
hey cool it's jos leys! welcome to the forums :)


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 10, 2009, 03:53:28 AM
There are lots of impressive renders in this thread.

Since I've been experimenting with MIIM (modified inverse iteration method) lately, I tried Paul's formulas for the roots of the quadratic triplex, to get the benefit of the extra detail. It didn't add much worthwhile. On the whole, I was disappointed with the various forms of the quadratic, and the higher powers look far more interesting.


Title: Re: True 3D mandlebrot type fractal
Post by: lycium on October 10, 2009, 03:58:41 AM
very cool render garth!


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 10, 2009, 05:41:16 AM
Thanks Lycium! It does have the benefit of soft shadows.

Something I noticed with the quadratic version was that making the third constant nonzero tended to introduce a planar discontinuity in the middle. It could have been due to steps I was taking to avoid invalid roots. Otherwise I guess it's just a result of using spherical coordinates and the z axis being polar. Has anyone found the third constant to give useful variation? (One advantage of inverse iteration is interactive previewing.)

I already deleted my code for the inverse triplex, and I'm not planning to revisit it unless I can do something with the trigonometric version instead. I just looked at the formula Dave provided, and noticed that phi=atan((z/sqrt(x²+y²)). It should be cheaper to use phi=asin(z/r).


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 10, 2009, 06:28:00 AM
There are lots of impressive renders in this thread.

Since I've been experimenting with MIIM (modified inverse iteration method) lately, I tried Paul's formulas for the roots of the quadratic triplex, to get the benefit of the extra detail. It didn't add much worthwhile. On the whole, I was disappointed with the various forms of the quadratic, and the higher powers look far more interesting.


Wow, Garth! I think your inverse Julia set is very impressive. Did you use Bounding Volume Hierarchies (BVH) to ray trace the image? How long did it take to render and what was the highest depth reached? It inspires me to investigate further. I think your MIIM greatly enhanced the image with some nice spirals. Do you have any recommendations where I can learn more about MIIM?

I also created some experiments with higher order inverse methods, but they were very sparse and boring because I wasn't using MIIM (see image below). I think adding MIIM to these images will be utterly stunning.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 10, 2009, 12:56:04 PM
I already deleted my code for the inverse triplex, and I'm not planning to revisit it unless I can do something with the trigonometric version instead. I just looked at the formula Dave provided, and noticed that phi=atan((z/sqrt(x²+y²)). It should be cheaper to use phi=asin(z/r).


Very nice image Garth.

With respect to the calculation, here's my actual UF code - I make use of UF's in-built atan2(value) where value is complex because I'm pretty sure this is faster than using atan(a/b) - note that mm and magn are initialised before entry into the iteration loop also that magno is used because I allow the option of using log(magn)/log(magno) for the divergence as an alternative to specifying a fixed value.

        magno = magn
        r = sqrt(magn)^@mpwr
        th = @mpwr*atan2(zri)
        ph = @mpwr*atan2(sqrt(mm)+flip(zj))
        zri = r*(cos(th)*cos(ph) + flip(sin(th)*cos(ph))) + cri
        zj = -r*sin(ph) + cj
        magn = (mm=|zri|) + sqr(zj)




Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 10, 2009, 01:28:36 PM
Thanks, Paul! No, I coded it into a transform in XenoDream, to use the existing rendering (using a zbuffer as a surface for lighting.) It was mostly done in an hour at twice that size, but I left it overnight for only marginal improvement. If you check the recent thread about the Glynn Set, Dave posted some code from Peter Liepa for doing MIIM. (His website http://www.brainjam.ca/fractals.html has plenty of pics.) It uses contractivity to vary tree depth, which works incredibly well, although still not perfectly even distribution.

However, I believe there is some mistake in the formula we used for the quadratic. I decided to try the trigonometric version instead, in order to use arbitrary powers. At first attempt only the theta was right (reducing to standard Julia set in XY). When I changed the formula to phi=acos(z/r), with x= rsin(theta)sin(phi), y=rcos(theta)sin(phi), z= rcos(phi), the correct roots appear for phi and the whole shape works as it should. That pic I did and the similar one of yours appear to be glitches and not reproducible with the correct formula. On the bright side, the quadratic produces a much nicer range of shapes and renders faster, and any power >1 or <-1 should work.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 10, 2009, 10:56:32 PM
Hi all, 6 images of the degree 2. Three of the White/Nylander (trig version) and three of the Rudy Rucker version:

http://www.fractalforums.com/gallery/?su=user;cat=95;u=141 (http://www.fractalforums.com/gallery/?su=user;cat=95;u=141)

Note that I had to fudge the code to render the inside Mandlebrots in the Rucker version correctly as the z (for the XY slice) and y (for the XZ slice) values kept gradually increasing due to error accumulation in the trig.
Edit: Actually the black speckling around the edges of the inside in the White/Nylander slices is probably the same problem.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 11, 2009, 02:00:20 AM
Finally got a render of the degree 4 White/Nylander Mandelbrot underway at 8000*8000, rendered using a wide field of view.
Here's what the 800*800 version looks like rendered with the parameters set for the large render (i.e. the detail level is really too high for the 800*800 version):

(http://www.fractalforums.com/gallery/0/141_11_10_09_1_55_10.png)

http://www.fractalforums.com/gallery/?sa=view;id=967 (http://www.fractalforums.com/gallery/?sa=view;id=967)

The 800*800 version took just under 6 minutes on my core2duo laptop.

In case anyone's interested the colouring is psedo-3D pseudo-perlin noise (or fBm if you prefer) using the sum of 3 2D fBm results i.e. fBm(x+flip(y))+fBm(y+flip(z))+fBm(z+flip(x)).

Edit: larger version now here http://makinmagic.deviantart.com/art/Asteroid-National-Park-139905412 (http://makinmagic.deviantart.com/art/Asteroid-National-Park-139905412)

Edit: Click image twice for full-size !


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 11, 2009, 04:09:40 AM
Dave, that looks promising. Of course with inverse methods I can only do Julias.

On the formulas, the main reason for preferring atan2 over atan in general is to get a result in the right quadrant, so by default I use atan2 in actual code. If you use phi=asin(z/r) instead of atan, you should be able to save a sqrt, which must be cheaper, and should give identical results.

However, I'm curious as to what happens if you change to the standard spherical coords of phi=acos(z/r), z=rcos(phi), and sin(phi) in the x and y terms. This definition works for the inverse method, whereas the other doesn't (at least without some clever manipulation.)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 11, 2009, 02:13:31 PM
Ok, here you are:

http://makinmagic.deviantart.com/art/Asteroid-National-Park-139905412 (http://makinmagic.deviantart.com/art/Asteroid-National-Park-139905412)

Hope you like it :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 12, 2009, 12:18:23 AM
Dave, that looks promising. Of course with inverse methods I can only do Julias.

On the formulas, the main reason for preferring atan2 over atan in general is to get a result in the right quadrant, so by default I use atan2 in actual code. If you use phi=asin(z/r) instead of atan, you should be able to save a sqrt, which must be cheaper, and should give identical results.

However, I'm curious as to what happens if you change to the standard spherical coords of phi=acos(z/r), z=rcos(phi), and sin(phi) in the x and y terms. This definition works for the inverse method, whereas the other doesn't (at least without some clever manipulation.)

Hi Garth, you are absolutely correct about the use of asin(z/r) instead of atan2(sqrt(x^2+y^2)+flip(z)) - it is identical and shaves just over 10% off the time on this P4HT by removing a square root from the iteration loop.

As to your other idea, it's certainly produces an interesting Mandelbrot:

(http://www.fractalforums.com/gallery/0/141_12_10_09_12_08_09.png)

(http://www.fractalforums.com/gallery/0/141_12_10_09_12_09_16.png)

(http://www.fractalforums.com/gallery/0/141_12_10_09_12_10_20.png)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 12, 2009, 10:47:27 PM
Hi all, here's an animation of the Degree 7:

http://www.youtube.com/watch?v=remIsv7OXy0 (http://www.youtube.com/watch?v=remIsv7OXy0)

Edit: OK, now I'm getting really annoyed with YouTube again - the HQ is not showing for me in the above !!

To see the HQ version go here:

http://www.youtube.com/user/MakinMagicFractals (http://www.youtube.com/user/MakinMagicFractals)

And again no HQ button - but wait - click on the image of the animation to the right and bingo - an HQ option !!


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 13, 2009, 04:41:41 AM
Hi, I think I found a new contender for the "true 3D" Mandelbrot.

In this case I was contemplating (not for the first time) what would actually constitute a truly second level of "imaginary" for the j axis.
Introduction of the i axis to the real number world depends on a new concept - the angle and rotation.
Most methods of 3D+ visualisation depend on this and distance alone but we need something "other" that can only exist when a third dimension exists.
I thought that maybe if we invent a function such that under multiplication by our third unit vector then both  r and i are transformed to j we have something new and whole - since the production of itself depends on multiplication by itself and cannot be explained using existing 2D concepts (distance/angle) - also extending the same idea to 4D+

I came up with this multiplication table:

    r   i   j   k
r   r   i   j   k
i   i  -r *j  *k
j   j  *j *r *k
k  k *k *k *r

Where * in the above is + or - (potentially different in each case).
Obviously this idea can be extended to any number of dimensions.

Anyway after playing with the options for the 3D version I settled on this:

   r   i   j
r  r   i   j
i  i  -r  -j
j  j  -j  -r

And here's the result for z^2+c:

(http://www.fractalforums.com/gallery/0/141_13_10_09_4_27_58_0.png)

(http://www.fractalforums.com/gallery/0/141_13_10_09_4_27_59_1.png)

(http://www.fractalforums.com/gallery/0/141_13_10_09_4_27_59_2.png)

Note that if we have zri (complex) and zj (real) then z^2+c is for example just:

          r = zj
          zj = 2.0*(real(zri)*zj - imag(zri)*zj) + cj
          zri = zri*zri - r*r + cri


OK - I know, it's not exactly fully symmetrical but at least the 2 slices are the 2D Mandelbrot - and who said it should be symmetrical ?


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 13, 2009, 06:21:46 AM
As to your other idea, it's certainly produces an interesting Mandelbrot:

Thanks Dave! That helps a lot. I suspected the phi=acos(z/r) version would have an asymmetric Mandelbrot in Z, as the Z constant has asymmetric behaviour in the Julias. It's now obvious that phi=asin(z/r) was chosen to get symmetry in the Z axis. Both are valid choices with different goals.

Paul, I reimplemented your quadratic inverse formula and it's working correctly, so I take back any mention of glitches.  (This time I just zeroed any negative arguments that appeared in sqrt functions, whereas previously I switched roots when that happened. That's what was giving me wrong results when the z constant was nonzero.)

With phi=acos(z/r), the trig version has N independent roots in theta and phi for N*N total. For phi=asin(z/r), theta and phi don't have independent roots and I've given up trying to work out a solution. Anyone have any ideas? The quadratic Julia sets for each are quite different, and I'm rendering samples of each to post.


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 13, 2009, 10:07:04 AM
Here are six examples of quadratic Julia sets with a MIIM version of the Nylander/White formula for the triplex (z=rsin(phi) version.) They had 10-15 minutes rendering each at twice the size.

(http://www.fractalforums.com/gallery/0/111_13_10_09_9_49_42.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 13, 2009, 12:11:34 PM
Here are six examples of quadratic Julia sets with a MIIM version of the Nylander/White formula for the triplex (z=rsin(phi) version.) They had 10-15 minutes rendering each at twice the size.

Nice !!


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 13, 2009, 07:45:42 PM
Thanks, Paul! No, I coded it into a transform in XenoDream, to use the existing rendering (using a zbuffer as a surface for lighting.) It was mostly done in an hour at twice that size, but I left it overnight for only marginal improvement. If you check the recent thread about the Glynn Set, Dave posted some code from Peter Liepa for doing MIIM. (His website http://www.brainjam.ca/fractals.html has plenty of pics.) It uses contractivity to vary tree depth, which works incredibly well, although still not perfectly even distribution.

However, I believe there is some mistake in the formula we used for the quadratic. I decided to try the trigonometric version instead, in order to use arbitrary powers. At first attempt only the theta was right (reducing to standard Julia set in XY). When I changed the formula to phi=acos(z/r), with x= rsin(theta)sin(phi), y=rcos(theta)sin(phi), z= rcos(phi), the correct roots appear for phi and the whole shape works as it should. That pic I did and the similar one of yours appear to be glitches and not reproducible with the correct formula. On the bright side, the quadratic produces a much nicer range of shapes and renders faster, and any power >1 or <-1 should work.

All I found was this but it says nothing about MIIM:
http://www.fractalforums.com/programming/mathematical-formula-for-fractal-tree/


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 13, 2009, 07:52:58 PM
Anyway after playing with the options for the 3D version I settled on this:

   r   i   j
r  r   i   j
i  i  -r  -j
j  j  -j  -r


What is this table called and how do I find the squaring function from this table?


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 13, 2009, 09:20:14 PM
Anyway after playing with the options for the 3D version I settled on this:

   r   i   j
r  r   i   j
i  i  -r  -j
j  j  -j  -r


What is this table called and how do I find the squaring function from this table?


It's just one possible 3D unit vector multiplication table :)

i.e. in this case the multiplications are commutative and:

real*real -> real, real*imag -> imag, imag*imag -> -real, real*jmag -> jmag, imag*jmag -> -jmag and jmag*jmag -> -real.

For the squaring function we want:

    (x + i*y + j*z)^2
    = x^2 + i*x*y + j*x*z + i*x*y + i*i*y*y + i*j*y*z + j*x*z + i*j*y*z + j*j*z*z
    = x^2 - y^2 - z^2 + i*2*x*y + j*2*(x*z - y*z) (because i*i=j*j=-r, r*j=j and i*j=-j)
  


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 13, 2009, 09:25:41 PM

All I found was this but it says nothing about MIIM:
http://www.fractalforums.com/programming/mathematical-formula-for-fractal-tree/


Hi Paul -- http://www.fractalforums.com/mandelbrot-and-julia-set/glynn-julia-set/msg8002/#msg8002 (http://www.fractalforums.com/mandelbrot-and-julia-set/glynn-julia-set/msg8002/#msg8002)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 14, 2009, 01:03:35 AM
Here's an animation of the minibrot from my "new contender" centred at approx. -1.76 real (for the degree 2).
You'll have to wait a little for it to download as it doesn't stream:

http://www.fractalgallery.co.uk/NewContenderMinibrotAnim.mov (http://www.fractalgallery.co.uk/NewContenderMinibrotAnim.mov)

I have to admit IMHO I think this is the closest so far - especially after I started investigating doing a render of the same minibrot for the degree 2 White/Nylander - I gave up on that for now, you'll see why when I upload a detailed still of it later....

Edit: Here's the still-shot, it's a very slow one to render hence I gave up on doing even a small anim !

(http://www.fractalforums.com/gallery/0/141_14_10_09_2_27_47.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 14, 2009, 12:14:37 PM
Here are eight examples of quadratic Julia sets with a MIIM version of the variation for the triplex with z=r*cos(phi). They don't have the 2D Julia structure at the equator that the other formula has. I really like some of these structures.

(http://www.fractalforums.com/gallery/0/111_14_10_09_9_50_51.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: cKleinhuis on October 14, 2009, 02:34:42 PM
hey xenodream, the lower left looks like a brain, and the upper ones are just cool !  :police:


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on October 14, 2009, 07:17:27 PM
I have just rendered animation with flying around 3D Nebulabrot fractal (Twinbee formula).
For faster rendering I cached all iteration data on HD. It takes about 20GB space :-) and I used 4 threads for rendering and 1 for loading data from HD in background. The bottleneck was drive speed (90MB/s) however it was much more faster than rendering without cached data.

Rendering statistics:
- frames resolution: 1280x720
- 3D mesh resolution: 800x800x800
- max number of iterations: 500
- number of points per frame: 5 356 802 016
- avg. rendering speed: 22,3 mln points per second (1 frame per 4 minutes)

Please watch in HD
http://www.youtube.com/watch?v=YVkCoDo6MW8
 


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 14, 2009, 07:58:17 PM
Anyway after playing with the options for the 3D version I settled on this:

   r   i   j
r  r   i   j
i  i  -r  -j
j  j  -j  -r


What is this table called and how do I find the squaring function from this table?


It's just one possible 3D unit vector multiplication table :)

i.e. in this case the multiplications are commutative and:

real*real -> real, real*imag -> imag, imag*imag -> -real, real*jmag -> jmag, imag*jmag -> -jmag and jmag*jmag -> -real.

For the squaring function we want:

    (x + i*y + j*z)^2
    = x^2 + i*x*y + j*x*z + i*x*y + i*i*y*y + i*j*y*z + j*x*z + i*j*y*z + j*j*z*z
    = x^2 - y^2 - z^2 + i*2*x*y + j*2*(x*z - y*z) (because i*i=j*j=-r, r*j=j and i*j=-j)
  


Thanks Dave. Here's some Mathematica code to find the squaring formula for any multiplication table that uses your notation:
ToFormula[A0_] := Module[{A = A0 /. {r -> 1, i -> 2, j -> 3}, p0 = {x, y, z}, p = {0, 0, 0}}, Do[k = A[[i, j]]; p[[Abs[k]]] += Sign[k]p0 [[ i ]] p0[[j]], {i, 1, 3}, {j, 1, 3}]; p];

For example:
ToFormula[{{r, i, j}, {i, -r, -j}, {j, -j, -r}}]

returns
{x^2 - y^2 - z^2, 2 x y, 2 x z - 2 y z}


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 14, 2009, 08:54:24 PM

Thanks Dave. Here's some Mathematica code to find the squaring formula for any multiplication table that uses your notation:
ToFormula[A0_] := Module[{A = A0 /. {r -> 1, i -> 2, j -> 3}, p0 = {x, y, z}, p = {0, 0, 0}}, Do[k = A[[i, j]]; p[[Abs[k]]] += Sign[k]p0 [[ i ]] p0[[j]], {i, 1, 3}, {j, 1, 3}]; p];

For example:
ToFormula[{{r, i, j}, {i, -r, -j}, {j, -j, -r}}]

returns
{x^2 - y^2 - z^2, 2 x y, 2 x z - 2 y z}

The only way I could get my hands on Mathematica is if I decide to take a course i.e. become a bona-fide student :)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 15, 2009, 01:04:49 AM
Quote
Hi Garth, you are absolutely correct about the use of asin(z/r) instead of atan2(sqrt(x^2+y^2)+flip(z)) - it is identical and shaves just over 10% off the time on this P4HT by removing a square root from the iteration loop.

Interestingly, compared to the asin, the MSVC compiler seems to have a really fast implementation of atan2 (relative to the mingw compiler at least), so especially if you're using C/C++, it may be worth checking out both according to setup.

Some really neat stuff above! I'm getting an article together to further explore the object, but I can't resist sharing one of my own zooms now. I've cut the 3D mandelbrot in half, and then I zoom into one the thin valley sections. Youtube decreases the quality, so the video can also be found here (http://www.skytopia.com/project/fractal/new/mandelbulb-zoom.avi) at a super-fluid 60 frames per second (6 meg).

http://www.youtube.com/watch?v=vqkPjpU6bsA


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 15, 2009, 03:40:48 AM
I have just rendered animation with flying around 3D Nebulabrot fractal (Twinbee formula).
For faster rendering I cached all iteration data on HD. It takes about 20GB space :-) and I used 4 threads for rendering and 1 for loading data from HD in background. The bottleneck was drive speed (90MB/s) however it was much more faster than rendering without cached data.

That's great! You might also want to try the old formula. It produces some interesting-looking results:
http://www.bugman123.com/Hypercomplex/Nebulabrot0111.jpg


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 15, 2009, 03:55:27 AM
Zooms of two Julias from the new contender for a true 3D Mandelbrot that I posted here:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8231/#msg8231 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8231/#msg8231)

They were rendered as here at 640*480 and 640*640 and took 14 mins and 12 mins respectively.

In both cases you can see a problem with my algorithm - the speckles are due to some points never reaching the iteration density required to be called "solid" - both these Julias almost disappear at 150 iterations or so.

(http://www.fractalforums.com/gallery/0/141_15_10_09_3_52_46.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 15, 2009, 07:35:28 AM
xenodreambuie, can you render larger versions of those objects?


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 15, 2009, 07:43:22 AM
Some really neat stuff above! I'm getting an article together to further explore the object, but I can't resist sharing one of my own zooms now. I've cut the 3D mandelbrot in half, and then I zoom into one the thin valley sections.

This is amazing Twinbee! I doubt anyone has ever made a fractal animation quite like this one!  O0


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 15, 2009, 09:18:12 AM
Cheers, though it would look 100x better if it used proper perspective camera zooming (which I'll hopefully be sorting out soon). At the mo, it's like zooming into a 2D photograph, which is weird considering the object is 3D heh.

It'd be nice to see an anim going through the thin corridor near the beginning of the vid (ala Star Wars). Anyone up for rendering that? :)


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 15, 2009, 10:01:07 AM
Twinbee, that is a cool animation. Here is my favourite cosine triplex variant; like a quaternion but more Gothic. This one went overnight to get reasonably clean. Inverse iteration struggles with some settings, even with MIIM. Forward iteration should produce quicker and nicer images in many cases, if not all.
(http://www.fractalforums.com/gallery/0/111_15_10_09_9_33_46.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 15, 2009, 10:00:13 PM
Twinbee, that is a cool animation. Here is my favourite cosine triplex variant; like a quaternion but more Gothic. This one went overnight to get reasonably clean. Inverse iteration struggles with some settings, even with MIIM. Forward iteration should produce quicker and nicer images in many cases, if not all.

Garth:
I've been trying and failing to reproduce your inverse renders but it appears that the divergent formula I'm using is not the exact inverse of your inverted version - here's my iteration loop where zri is x/y (complex) and zj is z (float):

            r = (magn=sqrt(magn))^@mpwr
            th = @mpwr*atan2(zri)
            ph = @mpwr*acos(zj/magn)
            zri = r*(cos(th)*sin(ph) + flip(sin(ph)*sin(th))) + cri
            zj = r*cos(ph) + cj
            magn = |zri| + sqr(zj)

Is that what you intended as the "forwards" iteration ?

As I said I can't seem to reproduce your inverse renders but I do get some interesting Julias - will post some 640*480 renders shortly :)


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 16, 2009, 12:43:17 AM
Dave, you're right. That is the correct forward formula. I had assumed that the inverse worked with independent roots for phi and theta, simply because the pictures looked nice and made sense, but that turns out to be wrong. What I've been getting is two redundant roots, and missing the other two. I hope the correct Julias are better! I can easily fix my formula for the quadratic case, and have to check the general solution. What is surprising is that I had tried an 8th degree Julia and it looked pretty similar to Lycium's render, so I took that as a sign that it was likely correct.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 16, 2009, 01:14:39 AM
Dave, you're right. That is the correct forward formula. I had assumed that the inverse worked with independent roots for phi and theta, simply because the pictures looked nice and made sense, but that turns out to be wrong. What I've been getting is two redundant roots, and missing the other two. I hope the correct Julias are better! I can easily fix my formula for the quadratic case, and have to check the general solution. What is surprising is that I had tried an 8th degree Julia and it looked pretty similar to Lycium's render, so I took that as a sign that it was likely correct.

I don't suppose you can work out a "forward" method for your erroneous version ? - the Julias are rather nice :)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 16, 2009, 02:14:09 AM
Zooms of two Julias from the new contender for a true 3D Mandelbrot that I posted here:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8231/#msg8231 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8231/#msg8231)

They were rendered as here at 640*480 and 640*640 and took 14 mins and 12 mins respectively.

In both cases you can see a problem with my algorithm - the speckles are due to some points never reaching the iteration density required to be called "solid" - both these Julias almost disappear at 150 iterations or so.

Apologies - it wasn't algorithm error, it was user error, I simply hadn't set the minimum step distance low enough :)
Am just re-rendering corrected images.


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 16, 2009, 02:30:58 AM
Dave, for a forward method of my erroneous Julias, I think it just needs to map values with the missing roots over to the other roots. Try this: after computing phi and theta; if phi>pi/2, add pi/2 to both phi and theta (before multiplying by @mpwr.)

Edit: I doubt that will work. My analysis of the inverse iteration problem was too hasty.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 16, 2009, 03:33:08 AM
Garth: OK !

Here are the new candidate Julias rendered properly:

(http://www.fractalforums.com/gallery/0/141_16_10_09_3_31_01.jpg)



Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 17, 2009, 01:28:46 AM
Finally had a go at some Julia's using Garth's version of the triplex formula:

http://www.fractalforums.com/gallery/?su=user;u=141;cat=95 (http://www.fractalforums.com/gallery/?su=user;u=141;cat=95)


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 17, 2009, 01:38:34 PM
Excellent, Dave! I had managed to replicate that form with an inverse formula, but wasn't sure if it was right. I have it working for quadratic and expect to make it work for other powers. I've also solved the inverse trig version of the z=-rsin(phi) one. It's much cleaner for some settings because it has no singularities or instabilities.

For the forward version of my alternative triplex, try this:
ph = acos(zj/magn)
if ph>pi/2 then ph = pi-ph  // or whatever the UF equivalent is
ph =  @mpwr*ph

Compared with the proper cos triplex, my alternative has two of the correct roots and two wrong, and misses two correct ones. So for the ones that are missing, you need to change phi to the wrong roots instead.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 17, 2009, 05:01:49 PM
Excellent, Dave! I had managed to replicate that form with an inverse formula, but wasn't sure if it was right. I have it working for quadratic and expect to make it work for other powers. I've also solved the inverse trig version of the z=-rsin(phi) one. It's much cleaner for some settings because it has no singularities or instabilities.

For the forward version of my alternative triplex, try this:
ph = acos(zj/magn)
if ph>pi/2 then ph = pi-ph  // or whatever the UF equivalent is
ph =  @mpwr*ph

Compared with the proper cos triplex, my alternative has two of the correct roots and two wrong, and misses two correct ones. So for the ones that are missing, you need to change phi to the wrong roots instead.

Thanks and thanks for the details for that "forward" version - will try it later :)

In the meantime here's a Julia animation using the "correct" forwards cos triplex:

http://www.youtube.com/watch?v=1VVFo97so8U (http://www.youtube.com/watch?v=1VVFo97so8U)


Title: Re: True 3D mandlebrot type fractal
Post by: stigomaster on October 17, 2009, 08:37:37 PM
Oh! I would like to see a seed morph of one of them julias!


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 17, 2009, 11:14:43 PM
Hi all, here's the "forwards" Mandelbrot for Garth's erroneous version of the cos triplex formula:

http://www.fractalforums.com/gallery/?su=user;cat=95;u=141 (http://www.fractalforums.com/gallery/?su=user;cat=95;u=141)

UF iteration:

            r = (magn=sqrt(magn))^@mpwr
            th = @mpwr*atan2(zri)
            if (ph = acos(zj/magn))>0.5*#pi
              ph = #pi - ph
            elseif ph<-0.5*#pi
              ph = -#pi - ph
            endif
            ph = @mpwr*ph
            zri = r*(cos(th)*sin(ph) + flip(sin(ph)*sin(th))) + cri
            zj = r*cos(ph) + cj
            magn = |zri| + sqr(zj)



Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 18, 2009, 12:17:45 AM
Here's a standard escape-time render of the larger Julia Set that Garth uploaded (i.e. using the erroneous version of the cos triplex formula).

(http://www.fractalforums.com/gallery/0/141_18_10_09_12_15_21.jpg)

http://www.fractalforums.com/gallery/?sa=view;id=998 (http://www.fractalforums.com/gallery/?sa=view;id=998)



Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 18, 2009, 02:45:11 AM
Great shape Garth - one can't get the resolution big enough for those methinks.

Here's another couple of renders (bigger resolutions are on the way). The 2nd one is from the inside!!

(http://www.skytopia.com/stuff/ff1.jpg)

(http://www.skytopia.com/stuff/ff2.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: bugman on October 18, 2009, 03:06:13 AM
Great shape Garth - one can't get the resolution big enough for those methinks.

Here's another couple of renders (bigger resolutions are on the way). The 2nd one is from the inside!!

I love it! Are these also 8th order Mandelbrots of your formula (White's formula)?


Title: Re: True 3D mandlebrot type fractal
Post by: xenodreambuie on October 18, 2009, 03:23:14 AM
Dave, Fantastic! I wasn't sure if that would work. Slight differences from mine are because I changed the parameters a bit for the large render.

You shouldn't need the elseif check since acos results are from 0 to pi. Working with phi in 0 to 2pi creates a double cover, which is the cause of the asymmetry between forward and inverse iteration. In my naive cosine version (ignoring fractional power support for simplicity), I used

phi = (phi + (Np-1)*2pi)*invpower
theta = (theta + (Nt-1)*2pi)*invpower

where Np and Nt are the choices of roots, from 0 to power-1.

To get the true cosine version working, all it took was changing to

theta = (theta + (Nt-1)*2pi + Np*pi)*invpower

For the trig sine version, it was a bit more complicated:

theta = (theta + (Nt-1)*2pi + Np*pi)*invpower
if phi<0 then phi= (phi - Np*pi)*invpower else phi= (phi + Np*pi)*invpower

But I also had to flip the sign of z only if it didn't already change;
if z*newz>0 then newz= -newz

Some time it will be convenient to adopt a simple naming convention.

Daniel; awesome pics!


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 18, 2009, 03:53:39 AM
Quote
I love it! Are these also 8th order Mandelbrots of your formula (White's formula)?

Yep, 8th order. I'm also working on some 3rd order pics to see if we can obtain similiar quality (since it's just above the 'noisy' 2nd power). So far, the best spots are revealing results that are weird to say the least, though perhaps not quite up to the standard of the higher powers.

By the way in the second pic, the 'stalk' is really like the equivalent of the 2D mandelbrot set, because it's smooth/coarse and bulbous at the tip. Adding more iterations lengthens the tip as one might expect. Here's that old pic from ages ago:

(http://www.skytopia.com/stuff/fractal/stalkm.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 18, 2009, 03:58:31 AM
Twinbee - truly awesome renders !
I really really need a faster machine so I can do global lighting ! (I haven't coded it up yet since I'm dreading how slow it will be on this old P4HT).

Garth - you are of course correct about acos !

I'm just rendering a 640*480 rotation around the main quadratic minibrot from my "new contender" formula, will upload to YouTube.


Title: Re: True 3D mandlebrot type fractal
Post by: Buddhi on October 18, 2009, 09:05:30 AM
Great shape Garth - one can't get the resolution big enough for those methinks.

Here's another couple of renders (bigger resolutions are on the way). The 2nd one is from the inside!!

Twinbee, you made amazing renders! Shapes are very sharp and there is very good depth. Render from inside is also very interesting!
I think you have the best rendering method from our.


Title: Re: True 3D mandlebrot type fractal
Post by: David Makin on October 18, 2009, 03:48:39 PM
Here's the "Mandelbrot Lightship" brought to you courtesy of the main minibrot for my new contender formula:

http://www.youtube.com/watch?v=rIMqmDR30ks (http://www.youtube.com/watch?v=rIMqmDR30ks)

I reckon if someone created this so it could be converted to polygons and clipped a little more it would be a great ship or probe for Eve online :)


Title: Re: True 3D mandlebrot type fractal
Post by: twinbee on October 19, 2009, 05:39:28 AM
By accident, I rendered a close up of the old power 2 3D mandelbrot, and interestingly, after all, it would seem there's fractal detail that doesn't just resemble whipped cream. At least not completely :)

If we zoom in on the noisy area at the top (perhaps illustrated most from Buddhi's render here (http://www.fractalforums.com/gallery/0/640_29_08_09_8_17_22.jpg)), this is what we get:

(http://www.skytopia.com/stuff/BestHope2Da.jpg)

and a further zoom in to the most promising area.......

(http://www.skytopia.com/stuff/BestHope2Db.jpg)

Okay these don't compare to the higher powers, but I didn't think before there would be any fractal detail, and there may even be much juicier spots than the above (though I doubt it).

Quote
I think you have the best rendering method from our.

Thanks, I guess although my renderer is quite fast, it doesn't use global illumination or actually render light coming through underneath parts (in shapes such as bridges) yet, which I think may really help the speed for technical reasons. I think that's why I haven't seen occasions in my pictures such as that render from David where you could see 'through' areas (like that cool bridge).

Cheers everyone for the comments. I might see if I can get a bit more sleep now - got a driving exam in a couple of days!

***EDIT*** Haha, just realised I spelt "mandelbrot" as "mandlebrot" in the thread title - oops, took me a while ;)


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on October 20, 2009, 01:32:28 AM
I decided to test the delta DE method a bit more:

Testing the Delta DE method on a quaternionic Julia under high magnification/small DE distance for solid.
Here you can see the original at *1.0 magnification and below a plain magnify of the part in the centre *10,378 with a delta DE solid value of 1e-7.
The render of the zoomed-in version took 4 mins, I intend to compare this to the analytical DE method for the same fractal zoom (which should be around 3* faster).

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


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on October 21, 2009, 12:37:23 PM
Just gone back to the "roundy" true 3D method that was actually using 4D maths - here's a view of a Julia:

(http://fc00.deviantart.com/fs50/f/2009/294/e/d/Under_Alien_Skies_by_MakinMagic.jpg)

If no image above then go here:

http://makinmagic.deviantart.com/art/Under-Alien-Skies-140980746 (http://makinmagic.deviantart.com/art/Under-Alien-Skies-140980746)


Title: Re: True 3D mandlebrot type fractal
Post by: Ought on October 26, 2009, 01:32:58 AM
Your fractals in post #342 are amazing. The second looks like scrimshaw.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on October 26, 2009, 05:44:53 AM
A 3rd degree White/Nylander Julia:

(http://fc05.deviantart.com/fs50/f/2009/298/a/4/Alien_Coral_by_MakinMagic.jpg)

If no image above then go here:

http://makinmagic.deviantart.com/art/Alien-Coral-141491974 (http://makinmagic.deviantart.com/art/Alien-Coral-141491974)



Title: Re: True 3D mandelbrot type fractal
Post by: jehovajah on October 26, 2009, 10:54:38 AM
This has been a most rewarding experience. This is math as it should be, not hidebound by snobbish conventionality but collaborative and egalitarian and inclusive as well as playful. The use of the processor and algorithms for visualisation, shading , rendering etc show the mathematical toolset benefits by innovation and extension.

mathematic
c.1380 as singular, replaced by early 17c. by mathematics (1581), from L. mathematica (pl.), from Gk. mathematike tekhne "mathematical science," fem. sing. of mathematikos (adj.) "relating to mathematics, scientific," from mathema (gen. mathematos) "science, knowledge, mathematical knowledge," related to manthanein "to learn," from PIE base *mn-/*men-/*mon- "to think, have one's mind aroused" (cf. Gk. menthere "to care," Lith. mandras "wide-awake," O.C.S. madru "wise, sage," Goth. mundonsis "to look at," Ger. munter "awake, lively"). Mathematics (pl.) originally denoted the mathematical sciences collectively, including geometry, astronomy, optics. Math is the Amer.Eng. shortening, attested from 1890; the British preference, maths is attested from 1911.
 Online Etymology Dictionary free


So really! congratulations!! As you may know i think the foundations of maths can now be revised, but not in terms of unifying, an old value and goal.RATHER IN TERMS OF THE ITERATIVE NATURE of all things i perceive. I find you practitioners more stimulating than dry elegant text. :dink:  \pi


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on October 30, 2009, 12:44:03 PM
I've been re-reading everything that has been posted on the spherical coordinates type 3D fractals, and have been looking for my own way of rendering them.
Dave Makin's "delta DE" works fine, but I thought that if we can get the derivative of the transformation, things would be faster.

So I've been reading up on Jacobians and all that stuff. Getting the Jacobian matrix for the transformation is no problem, but then I did not know what to do with it :-))..

In general one can get a distance estimate from DE= |z|.log(|z|)/|dz|, z and dz being the values after bailout and dz can be calculated iteratively (for  z=z^p+c ) as dz=p.z^(p-1).dz+1  (starting with dz=1).

So I tried (maybe a bit naively, to do something similar with the 'spherical transformation'.
Let's do a Mandelbrot of degree p.

We have point on the ray x1,y1,z1 or x1=R.cos(ph).cos(th), y1=R.cos(ph).sin(th), z1=R.sin(ph), R=sqrt(x1^2+y1^2+z1^2),ph=atan(y1/x1), th=asin(z1/R)
Put dzx=1,dzy=0,dzz=0 . Express this in spherical coordinates also: ph_dz=0, th_dz=0, R_dz=1
We iterate this point:
First calculate dz:
dzx=p.R^(p-1).R_dz.cos((p-1).ph+ph_dz).cos((p-1).th+th_dz)+1
dzy=p.R^(p-1).R_dz.cos((p-1).ph+ph_dz).sin((p-1).th+th_dz)
dzz=p.R^(p-1).R_dz.sin((p-1).ph+ph_dz)
Calculate new R_dz and ph_dz and th_dz.
Now the new x,y,z:
x=R^p.cos(p.ph).cos(p.th)+x1
y=R^p.cos(p.ph).sin(p.th)+y1
z=R^p.sin(p.ph)+z1
Calculate new R and ph and th.

If R>bailout or maxiters reached, calculate DE=R.log(R)/R_dz

Move the point along the ray a distance f.DE (f<1) and start over until DE<epsilon.

Believe it or not, but this works! Here is the order 12 Mandelbrot :
(http://www.josleys.com/gfx/4D_test_57.jpg)

..and here is a Julia :
(http://www.josleys.com/gfx/4D_test_58.jpg)




Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on October 30, 2009, 10:31:49 PM
I've been re-reading everything that has been posted on the spherical coordinates type 3D fractals, and have been looking for my own way of rendering them.
Dave Makin's "delta DE" works fine, but I thought that if we can get the derivative of the transformation, things would be faster.

So I've been reading up on Jacobians and all that stuff. Getting the Jacobian matrix for the transformation is no problem, but then I did not know what to do with it :-))..

In general one can get a distance estimate from DE= |z|.log(|z|)/|dz|, z and dz being the values after bailout and dz can be calculated iteratively (for  z=z^p+c ) as dz=p.z^(p-1).dz+1  (starting with dz=1).

So I tried (maybe a bit naively, to do something similar with the 'spherical transformation'.
Let's do a Mandelbrot of degree p.

We have point on the ray x1,y1,z1 or x1=R.cos(ph).cos(th), y1=R.cos(ph).sin(th), z1=R.sin(ph), R=sqrt(x1^2+y1^2+z1^2),ph=atan(y1/x1), th=asin(z1/R)
Put dzx=1,dzy=0,dzz=0 . Express this in spherical coordinates also: ph_dz=0, th_dz=0, R_dz=1
We iterate this point:
First calculate dz:
dzx=p.R^(p-1).R_dz.cos((p-1).ph+ph_dz).cos((p-1).th+th_dz)+1
dzy=p.R^(p-1).R_dz.cos((p-1).ph+ph_dz).sin((p-1).th+th_dz)
dzz=p.R^(p-1).R_dz.sin((p-1).ph+ph_dz)
Calculate new R_dz and ph_dz and th_dz.
Now the new x,y,z:
x=R^p.cos(p.ph).cos(p.th)+x1
y=R^p.cos(p.ph).sin(p.th)+y1
z=R^p.sin(p.ph)+z1
Calculate new R and ph and th.

If R>bailout or maxiters reached, calculate DE=R.log(R)/R_dz

Move the point along the ray a distance f.DE (f<1) and start over until DE<epsilon.



Thanks for that Jos, I think I know where I was going wrong when I tried using the Jacobian to get the derivative for DE when I tried it on the 4D "true 3D" formula that I suggested a while ago - I'm going to try again now......


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on October 31, 2009, 03:53:59 AM
(http://www.fractalforums.com/gallery/1/141_31_10_09_3_50_54.jpg)

A degree 5 White/Nylander Julia.

This shows that the difference in renders using the delta DE and analytical DE is sometimes not that great especially with a formula such as the White/Nylander where calculating the derivative is as complicated as calculating the normal iterate
The time differnce is not so great - note that how often the viewing rays approach the surface without striking it also has a bearing on the timing, this generally causes more slow down in the analytical method than the delta method.

You should note that the final analytical DE calculation was modified to correct for scale differences for different powers/degrees, the UF calculation used (after trial and error based on getting the normals correct - the normals being calculated from adjacent DE values with no extra ray-tracing) was:

 dist = 0.5*sqrt(@mpwr-1.0)*log(magn)*sqrt(magn/(|dzri|+sqr(dzj)))

i.e. the usual calculation but scaled by the square root of the power/degree minus one.


Title: Re: True 3D mandelbrot type fractal
Post by: Buddhi on October 31, 2009, 11:48:27 AM
Hi

I wrote completely new program for rendering 3D fractals. I resigned with rendering slices and fixed grid. Now fractal is calculated directly in 3D space using scanline algorithm. DE is not implemented yet but for accurate searching of fractal boundary I use binary search algorithm. I included all shading algorithms which I used in old program: global illumination, hard shadows and normal vector calculation (angle of incidence of light). Without volumetric fog (opacity proportional to number of iterations) rendering is much more faster than in old program and quality is higher. Details are sharper because I didn't have to use any interpolation algorithms. This image was rendered 25 minutes in 2560x2560 resolution and max. 20 iterations (rendered on Intel Core 2 Duo Quad 8200)

(http://www.fractalforums.com/gallery/1/640_31_10_09_11_17_22.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=1029





Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on October 31, 2009, 03:38:10 PM
Congrats on the renderer speedup - that looks really ace!

(nice golden brot before too).

Here is an animation showing cross sections of the old Mandelbulb gateau I did:

http://www.youtube.com/watch?v=mTdQ8jTHQ7I


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 03, 2009, 12:56:44 AM
Hi all, you may remember I had a 3D based suggestion for a "true 3D" Mandy using the following:

 *  |    r    i    j
-----------------
  r  |    r    i    j
  i  |    i   -r  -j
  j  |   j   -j   -r

Which gives a square of (x,y,z):

new x = x^2 - y^2 - z^2
new y = 2*x*y
new z = 2*z*(x-y)

I finally got around to investigating further and realised why no-one had commented on it, here's a rotation of the top of the Mandy:

http://www.fractalgallery.co.uk/FlatMandy.mov (http://www.fractalgallery.co.uk/FlatMandy.mov)

However it wasn't a dead loss because here's the main minibrot:

http://www.youtube.com/watch?v=rIMqmDR30ks


Title: Re: True 3D mandelbrot type fractal
Post by: cKleinhuis on November 03, 2009, 03:38:20 AM
i rendered an animation with your formula dave, 1000 frames of julia pertubation, rendered in ~35 hours on a quad core 2,2 ghz in uf

http://www.youtube.com/watch?v=ZNIQ50SuIMM

 O0 O0 O0


Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 03, 2009, 06:22:44 AM
Hi

I wrote completely new program for rendering 3D fractals. I resigned with rendering slices and fixed grid. Now fractal is calculated directly in 3D space using scanline algorithm. DE is not implemented yet but for accurate searching of fractal boundary I use binary search algorithm. I included all shading algorithms which I used in old program: global illumination, hard shadows and normal vector calculation (angle of incidence of light). Without volumetric fog (opacity proportional to number of iterations) rendering is much more faster than in old program and quality is higher. Details are sharper because I didn't have to use any interpolation algorithms. This image was rendered 25 minutes in 2560x2560 resolution and max. 20 iterations (rendered on Intel Core 2 Duo Quad 8200)


Wow, 24 minutes without any distance estimation? That's quite impressive for such quality.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 05, 2009, 12:58:46 PM
The article I'm working on is almost finished. I want to leave some things as a surprise, but couldn't resist these.....  ;D Hope you enjoy, the second Cave piece is available at aprx. 4000x2000 resolution here (http://www.skytopia.com/project/fractal/new/full/q85/MysteryCave-b-big.jpg) (downscaled from 8000x4000!).

"Ice Cream From Uranus"
(http://www.skytopia.com/project/fractal/new/full/q85/IceCreamFromUranus-med.jpg)



"Cave of Lost Secrets"
(http://www.skytopia.com/project/fractal/new/full/q85/MysteryCave-b-med.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: jehovajah on November 05, 2009, 01:37:22 PM
Hi all, you may remember I had a 3D based suggestion for a "true 3D" Mandy using the following:

 *  |    r    i    j
-----------------
  r  |    r    i    j
  i  |    i   -r  -j
  j  |   j   -j   -r

Which gives a square of (x,y,z):

new x = x^2 - y^2 - z^2
new y = 2*x*y
new z = 2*z*(x-y)

I finally got around to investigating further and realised why no-one had commented on it, here's a rotation of the top of the Mandy:

http://www.fractalgallery.co.uk/FlatMandy.mov (http://www.fractalgallery.co.uk/FlatMandy.mov)




I would like to see the results of the table you discarded as uninteresting where j x i transforms to -i. If you have time could you render that please.



Title: Re: True 3D mandelbrot type fractal
Post by: jehovajah on November 05, 2009, 03:18:11 PM
  : r   i   j 
...................
r : rr ri rj
i :  ir  ii  ij
j :  jr  ji  jj
.......................



Define rr as r2   , ii as i2   = -1 , jj as j2  = -1 all of which are real values.

Define ri  =  ir  which is an i value  and rj = jr  which is a j value.

In the case of commutativity  ij = ji

so define ij = -i or ij = -j   

in the case where the operators are non commutative ij / ji

define ij = -j and ji = -i

or    ij = -i  and  ji=  -j   

If you have explored all these alternatives i would love to see the results.


Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 05, 2009, 05:26:10 PM
The article I'm working on is almost finished. I want to leave some things as a surprise, but couldn't resist these.....  ;D Hope you enjoy, the second Cave piece is available at aprx. 4000x2000 resolution here (http://www.skytopia.com/project/fractal/new/full/MysteryCave-b-big.jpg) (downscaled from 8000x4000!).

Twinbee, your deep zoom renderings are still my favorite. I suspect that your "Ice Cream From Uranus" rendering is hiding some beautiful spirals in it, but we cannot see them because the iteration depth is not deep enough. I wonder if it is possible to make iteration depth a function of the cumulative derivative or Cauchy method in such a way that we could render the fine detail in the spirals without going into too much detail in other regions.


Title: Re: True 3D mandelbrot type fractal
Post by: jehovajah on November 05, 2009, 05:42:13 PM
Just in passing  ; it occurs that using the non commutative forms model left handed and righr handed forms in 3D so called. Combining the forms in this way may produce relevant results to natural forms.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 06, 2009, 02:18:52 AM
Twinbee, your deep zoom renderings are still my favorite. I suspect that your "Ice Cream From Uranus" rendering is hiding some beautiful spirals in it, but we cannot see them because the iteration depth is not deep enough. I wonder if it is possible to make iteration depth a function of the cumulative derivative or Cauchy method in such a way that we could render the fine detail in the spirals without going into too much detail in other regions.

Just solid based solely on distance estimate threshold would probably achieve the desired result in terms of detail i.e. use distance estimation with maxiter set higher than is ever used in the distance estimation.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 06, 2009, 04:05:32 AM
Spirals!! Oh if only... y'see this exactly why I don't think we've found nearly anything like the real McCoy (tm) yet. So far, I haven't seen anything really very spiral yet, although yes, the "Ice Cream from Uranus" pic does indeed hint that spirals may exist.

I'll see if I can get methods (such as Cauchy) working with the 2D mandelbrot first before I attempt it with the 3D bulb. Any particularly good links with example pictures?

In the meantime, I'll render the Icecream picture with higher resolution and more iterations. And you never know;  that curl may itself develop into a fully blown spiral. If so we're in for a treat I'm sure...


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 06, 2009, 10:54:04 PM
Right here we go. At this level of magnification (150x150 to 300x300), and with this area of the brot, things are rendering really slow. But here are some results. For full size, save the pic, and reopen in an image viewer because the forum has shrunk it a bit.

(http://www.skytopia.com/project/fractal/new/full/q85/spirals.jpg)

Any more iterations, and the spiral is 'covered up' by that overhanging subspiral to the right of the main spiral's eye. Another great thing which I was hoping for; notice how the subpsirals are branching off in oblique directions!

And yes, I will be rendering high resolution of 40 iterations or so. Even though the main spiral will be covered up, one of the subspirals is surely bound not to be.

I should have been more optimistic about the potential of spirals. Thanks to Paul for pushing me to try this!


Title: Re: True 3D mandelbrot type fractal
Post by: xenodreambuie on November 07, 2009, 09:14:34 AM
Beautiful renders, Dan. It seems to me that in 2D the relative size of spirals for z^n+c is about inversely proportional to abs(power)-1. For the triplex the same is true in certain planes but the spiral structures get obscured by the 3D structures, especially in powers greater than about 3. In that case, taking a slice should show spirals with the right parameters. Negative powers tend to have larger spirals and also invert them towards the outside, so power -2 should be best. It turns out that the standard (sine) triplex handles these spirals surprisingly well. Here is a sample of power -2, although the straight on view doesn't show how much depth there is.
(http://www.fractalforums.com/gallery/1/111_07_11_09_2_58_27.jpg)

The flipped root cosine triplex also has some good regions for power -2, but it takes some searching.
(http://www.fractalforums.com/gallery/1/111_07_11_09_3_07_17.jpg)


Title: Re: True 3D mandlebrot type fractal
Post by: jehovajah on November 08, 2009, 01:45:47 AM
Hope the exam went okay. Here's the way to create the object. I'm not sure how Cayley tables would fit in this context, but here's the multiplication function:

double pi=3.14159265;
double r    = sqrt(x*x + y*y + z*z );
double yang = atan2(sqrt(x*x + y*y) , z  )  ;
double zang = atan2(y , x);
newx = (r*r) * sin( yang*2 + 0.5*pi ) * cos(zang*2 +pi);
newy = (r*r) * sin( yang*2 + 0.5*pi ) * sin(zang*2 +pi);
newz = (r*r) * cos( yang*2 + 0.5*pi );

Since in the standard Mandelbrot forumla, the only multiplication is the number multiplied by itself (the square), that's why there's only x, y and z in the above function, and not x2, y2, and z2 aswell. Hope that makes sense.

The addition function for these 3D numbers is as expected:
newx = x1 + x2;
newy = y1 + y2;
newz = z1 + z2;

Do you mind explaining what you mean here? The method you have arrived at seems to be the right stuff but it does not seem to follow from any standard math. Karl rogers called it doubling you call it 3d numbers and in both cases the description is non standard. This is good in my book as the whole area of complex numbers is not rigorous enough to determine what we are constructing.

The simple question is : when you calculate newx etc you put in an extra r factor. Why is this?
Quote
The main Mandelbrot formula stays the same ("a" and "point" are 3D numbers of course - X, Y and Z):
add(    multiply(a,a)   , point).

Now what do you mean by this? What specifically is the a? What form do these 3d numbers have? Then following that what definition of multiplication are you using for these 3d numbers?

If Karl has discussed this with you before then i do not mind if he wants to email me his points. However it is not clear whether his "doubling" and your 3d multiplication are one and the same or not.

I am about to post some analysis for David's alternative method but just wondered if your spherical coordinate approach had not already covered the alternatives more elegantly.

Whatever i think that your method has illustrated the point that calling these operators numbers is not helpful, at least not as helpful as vector /tensor type denotation.  Thanks for your time and maybe i need to congratulate you on your fantastic discovery of the 3d mandelbrot method. There is just one thing that needs to be clarified and that is that you have not found a 3d juliabrot that has the mandelbrot form

http://www.fractalforums.com/mandelbrot-and-julia-set/julia-set-that-looks-like-a-mandelbrot-set/ (http://www.fractalforums.com/mandelbrot-and-julia-set/julia-set-that-looks-like-a-mandelbrot-set/)



Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 08, 2009, 07:53:44 AM
Hi Jehova,

Quote
The simple question is : when you calculate newx etc you put in an extra r factor. Why is this?

Oh right, it's for the same reason that one would calculate the radius squared in the standard 2D mandelbrot. Instead of approaching/repelling way from the centre of a circle though, it'll do the same for a sphere.

Paul Nylander printed a neater representation (http://www.bugman123.com/Hypercomplex/index.html) of the formula, which you might find clearer:

{x,y,z}^n = r^n { cos(n*theta)cos(n*phi)  ,  sin(n*theta)cos(n*phi)  ,  -sin(n*phi) }
where r = sqrt(x^2+y^2+z^2),   theta = atan2(y,x),   phi = atan2(z,sqrt(x^2+y^2))

So that's the equivalent of the squaring part of the 2D mandelbrot formula (except of course it's for 3D, and for a higher power).

Also, to get a better idea, see my old tuturial found here (http://www.skytopia.com/project/fractal/mandelbrot.html#pandora).


Quote
Quote
The main Mandelbrot formula stays the same ("a" and "point" are 3D numbers of course - X, Y and Z):
add(    multiply(a,a)   , point).

Now what do you mean by this? What specifically is the a? What form do these 3d numbers have?

I should have used just one a, and put 'square' instead of 'multiply' really. I was just trying to be more general to account for any 'triplex' multiplication.
Let's rewrite that:

add( square(a), point)

Okay so that corresponds to the original 2D mandelbrot. Using more standard math we can say:
a -> a^2 + point

...which of course is the same as Wikipedia's definition:
z -> z^2 + c

(I of course use 'a' instead of 'z', and 'point' instead of 'c').

Bear in mind of course that you replace the square function for higher powers if you wanted them.

Hope that clears things up a bit.

Quote
If Karl has discussed this with you before then i do not mind if he wants to email me his points. However it is not clear whether his "doubling" and your 3d multiplication are one and the same or not.

I think so yes. He made a quicker version which cuts out the time consuming trig stuff, but other than it's the same.

Garth, nice and unusual spirally renders - I'll have to play around with power -2 as well...


Title: Re: True 3D mandelbrot type fractal
Post by: jehovajah on November 08, 2009, 07:54:27 AM
Hi all, you may remember I had a 3D based suggestion for a "true 3D" Mandy using the following:

 *  |    r    i    j
-----------------
  r  |    r    i    j
  i  |    i   -r  -j
  j  |   j   -j   -r

Which gives a square of (x,y,z):

new x = x^2 - y^2 - z^2
new y = 2*x*y
new z = 2*z*(x-y)


I attempt to be explicit and thorough.

 *  x       iy     jz     -iy    -jz
------------------------------------
x:     x2   xiy   xjz   -xiy   -xjz
iy:   iyx   -y2   iyjz  -iyiy  -iyjz
jz:    jzx   jziy   -z2  -jziy   -jzjz
-iy:   -iyx  -iyiy -iyjz  -y2   iy(-jz)
-jz:   -jzx  -jziy -jzjz  -jz(-iy)  -z2


The rules are:
     i2 = j2 = (-j)2 = (-i)2 = -1
  
     -ii = -jj = +1

The manipulations are:

 yix = yxi = xyi = xiy = ixy = iyx

 zjx = zxj = xzj = xjz = jxz = jzx

-yix = -yxi = -xyi = -xiy = -ixy = -iyx

-zjx = -zxj = -xzj = -xjz = -jxz = -jzx


double operator manipulations non commutative :

ziyj =zyij = yzij = yizj = iyzj = [iyjz = -iy(-jz)] = ijyz = ijzy= izjy

+y2 = -y2i2 = -yiyi = -iy2i = [-iyiy = iy(-iy)] = -i2y2 = +y2


-ziyj = -zyij = -yzij = -iyzj = [-iyjz = iy(-jz)] = -ijyz = -ijzy = -izjy

yjzi = yzji = zyji = zjyi = jzyi = [jziy = -jz(-iy)] = jizy = jiyz = jyiz

-yjzi = -yzji = -zyji = -zjyi = -jzyi = [-jziy = jz(-iy)] = -jizy = -jiyz = -jyiz

+z2 = -z2j2 = -zjzj = -jz2j = [-jzjz = jz(-jz)] = -j2z2 = +z2


summary of main manipulations:

yzij  = ijyz        (±jz)2 = -z2      yxi = iyx
-yzij = -ijyz      (±iy)2 = -y2     zxj = jzx
yzji  = jiyx     -(iy)2 = +y2     -yxi = -iyx
yzji  = jiyz     -(jz)2  = +z2     -zxj = -jzx
-yzji   = -jiyz


So (x + iy +jz)2 gives the following parts

x2 + (iy)2 + (jz)2


i(xy + yx)

j(xz + zx)

yz(ij + ji)

So for the function the last term which i am calling the handedness term is decided by the programmer.

For the geometrical space mandelbrot iteration

newx =x2 - y2 - z2

newy = 2xy

newz = 2xz

handedness term affects either x or y or z or 2 out of the 3 and has magnitude yz so:
if ij / ji

newyz =y.z.


for the handedness term
 if ij = ji
newyz = 2yz

I will suggest in another post how the handedness term might be applied but i think there is enough here for you to play with.


Title: Re: True 3D mandelbrot type fractal
Post by: jehovajah on November 08, 2009, 09:05:07 AM
 ;) Thanks Twinbee. Found some of your motivation  here just before you posted http://www.fractalforums.com/mandelbrot-and-julia-set/variety-of-the-mandelbrot-set/ (http://www.fractalforums.com/mandelbrot-and-julia-set/variety-of-the-mandelbrot-set/). Great stuff you are rendering.so i am definitely hooked.  Catch up with you later.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 08, 2009, 03:24:49 PM
Article finished <wipes brow>:

Linky: The Unravelling of the Real 3D Mandelbulb (http://www.skytopia.com/project/fractal/mandelbulb.html)

A deep zoom rendering of a certain spiral has been rendered too (featured on the 2nd page).

If anyone here would like to change a featured pic of theirs, let me know. Equally, any comments, suggestions, or even criticism is welcome!


Title: Re: True 3D mandelbrot type fractal
Post by: Buddhi on November 08, 2009, 04:40:08 PM
Article finished <wipes brow>:

Linky: The Unravelling of the Real 3D Mandelbulb (http://www.skytopia.com/project/fractal/mandelbulb.html)

A deep zoom rendering of a certain spiral has been rendered too (featured on the 2nd page).

If anyone here would like to change a featured pic of theirs, let me know. Equally, any comments, suggestions, or even criticism is welcome!

I have seen your website with article about 3D Mandelbrots. It is wonderful! You are the Master!


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 08, 2009, 05:03:11 PM
Article finished <wipes brow>:

Linky: The Unravelling of the Real 3D Mandelbulb (http://www.skytopia.com/project/fractal/mandelbulb.html)

A deep zoom rendering of a certain spiral has been rendered too (featured on the 2nd page).

If anyone here would like to change a featured pic of theirs, let me know. Equally, any comments, suggestions, or even criticism is welcome!

Hi Daniel, very nice article.

You may wish to add a link to this large degree 4 render: http://makinmagic.deviantart.com/art/Asteroid-National-Park-139905412 (http://makinmagic.deviantart.com/art/Asteroid-National-Park-139905412)
Apologies if it's already there, if it is I missed it.

Also a render I did of the degree 7 entitled "7th level Mandelbrot Temple" was chosen as one of the winners in the 2009 Benoit Mandelbrot Fractal Art Contest and will be exhibited with the other winners at ICM2010:

http://www.fractalartcontests.com/2009/winners.php (http://www.fractalartcontests.com/2009/winners.php)

http://www.icm2010.org.in/ (http://www.icm2010.org.in/)

Note that in the text to go with the contest image I invited viewers to attempt to prove whether or not the White/Nylander integer degree Mandelbrots are connected, and if connected are they toplogically spheres :)


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 08, 2009, 09:12:22 PM
Thanks guys! :D

David, congrats about the contest! Link's down at the mo - I'll try again later.

Although I might prefer the coloring of the Alien Coral - you're right - the Asteroid is more advanced overall. I've added it :)

Garth, I've also added your latest.

Quote
Note that in the text to go with the contest image I invited viewers to attempt to prove whether or not the White/Nylander integer degree Mandelbrots are connected, and if connected are they toplogically spheres

That old chestnut eh? Hehe, they'll have a job ;)


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 08, 2009, 09:23:22 PM
Quote
Note that in the text to go with the contest image I invited viewers to attempt to prove whether or not the White/Nylander integer degree Mandelbrots are connected, and if connected are they toplogically spheres

That old chestnut eh? Hehe, they'll have a job ;)

Well if no-one attending the ICM can solve it.....


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 08, 2009, 09:39:12 PM
David, congrats about the contest! Link's down at the mo - I'll try again later.

Thanks, and it's working again now (at least it is here).


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 02:19:45 AM
If anyone here would like to change a featured pic of theirs, let me know. Equally, any comments, suggestions, or even criticism is welcome!

Just a suggestion - where you discuss the formula you could also mention Jos Leys' algorithm for accurate analytical DE for the formula (and related formulas such as Garth Thornton's variations and Rudy Rucker's formula).


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 09, 2009, 10:45:52 AM
I've read the article. Great overview!
As to the distance estimation formula that I'm using, it may still be buggy.
I was looking at the large size pictures of the degree 8 and comparing to what I'm getting in my Ultrafractal routine.
It seems that with my algorithm, the buds are on 'stalks', and I can see through them (see the images below).
I think this might be a rendering error, but I have not figured it out yet..
Any comments from the rendering experts?

(http://www.josleys.com/gfx/4D_test_88a.jpg)

(http://www.josleys.com/gfx/4D_test_88b.jpg)

(http://www.josleys.com/gfx/4D_test_88c.jpg)

(http://www.josleys.com/gfx/4D_test_88d.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 09, 2009, 10:54:28 AM
Article finished <wipes brow>:

Linky: The Unravelling of the Real 3D Mandelbulb (http://www.skytopia.com/project/fractal/mandelbulb.html)

A deep zoom rendering of a certain spiral has been rendered too (featured on the 2nd page).

If anyone here would like to change a featured pic of theirs, let me know. Equally, any comments, suggestions, or even criticism is welcome!

Congratulations for this superb summary of the state-of-the-art.

I have 2 questions :

- In the 8-power monster, although the level of detail is infinite, I have the feeling that shapes do not vary as much as in the 2D M-set (2 or 8 power, it does not matter) when you zoom in. All is very self similar, and there is not such variery as you can find for example when you zoom near a minibrot in 2D. What do you think about that?

- Although I have not much time to play with the maths (I could, because I did a lot of maths when I was younger, but I prefer the beauty of images rather than the beauty of equations) I would love to explore this fractal. I understand you developped your own program. @David Makin (or anybody else) : do you use Ultrafractal for your beautiful images in this thread? If so, would you mind sharing the formula ?

Thanks!


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 11:09:46 AM
@David Makin (or anybody else) : do you use Ultrafractal for your beautiful images in this thread? If so, would you mind sharing the formula ?

Thanks!

Am still working on the formula, so far I've only given Trifox a copy and he'll probably attest to the fact that it's not really ready for public release yet - I've still to sort out the parameters correctly, add more options and get all the options I've added so far as parameters working properly - I'm hoping to have a "release version" by the end of this week.
Note that I didn't originally intend this formula for public release since I was just using it to fine-tune ideas for when I do a suite of class-based general ray-tracing formulas.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 11:11:53 AM
I've read the article. Great overview!
As to the distance estimation formula that I'm using, it may still be buggy.
I was looking at the large size pictures of the degree 8 and comparing to what I'm getting in my Ultrafractal routine.
It seems that with my algorithm, the buds are on 'stalks', and I can see through them (see the images below).
I think this might be a rendering error, but I have not figured it out yet..
Any comments from the rendering experts?


Hi Jos, I'm confused by your renders, I seem to get the same results using your analytical method as I do with my delta method.
Are those renders of the degree 8 ?


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 09, 2009, 11:23:26 AM
Yes Dave, it is the degree 8.
So you do not see the 'holes' with both methods, is that what you are saying?


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 11:37:22 AM
Yes Dave, it is the degree 8.
So you do not see the 'holes' with both methods, is that what you are saying?

Am just checking what happens when I go closer to "inside" on the degree 8 than I've done previously.....


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 11:51:37 AM
Yes Dave, it is the degree 8.
So you do not see the 'holes' with both methods, is that what you are saying?

Am just checking what happens when I go closer to "inside" on the degree 8 than I've done previously.....

Hi Jos, no I definitely do not get the "holes" that you are getting, I suspect the problem is the one you mentioned to me previously where there are locations at which the analytical DE gets very large due to singularities in the derivative.
Here's a quick render of the degree 8, "straight on" view but zoomed to a bud on the edge - I get no holes using your analytical method even with the threshold set very small at 1e-6.

(http://www.fractalforums.com/gallery/1/141_09_11_09_11_50_30.png)

Note however that I am using the method of not stepping further at a given iteration depth on a given ray than was stepped previously at that depth on that ray *and using the array code that I sent you earlier* - I suspect your holes are due to more limited storage/checking of the step distances at iteration depth - see the code I sent you in the E-mail and see if that removes the holes.


Title: Re: True 3D mandelbrot type fractal
Post by: xenodreambuie on November 09, 2009, 12:01:00 PM
Hi Jos,
I like the quality that your DE formula produces. The problem you have may be due to using z1=R.sin(ph), which only gives one hemisphere. Changing it to z1= -R.sin(ph) is necessary to flip the orbits between hemispheres.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 12:20:17 PM
I don't get the holes Jos is getting even using positive sine - this is the closest I got to getting such holes (a much deeper zoom):

(http://www.fractalforums.com/gallery/1/141_09_11_09_12_16_12.png)

Here's virtually the same area using negative sine:

(http://www.fractalforums.com/gallery/1/141_09_11_09_12_19_47.png)


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 09, 2009, 12:59:00 PM
Well, I used the formula quoted in the article, which has z=R.cos(ph) !

And yes, Dave, I am limiting the max step to not be greater than the smallest observed for a particular iter count, but in a simpler way than what you sent me. I'll look at that again.
I'm sure I have a bug somewhere...thanks, I'll keep searching.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 01:14:44 PM
Hi Daniel, it appears that you've quoted a different formula to the ones we've been using ?

For Paul's version of your formula I'm sure he quoted it as:

              r = magn^@mpwr
              dth = @mpwr*(th = atan2(zri))
              dph = @mpwr*(ph = asin(zj/magn))
              zri = r*(cos(dth)*cos(dph) + flip(cos(dph)*sin(dth))) + cri
              zj = -r*sin(dph) + cj

Then I also had two versions suggested by Garth:

              r = (magn=sqrt(magn))^@mpwr
              th = @mpwr*atan2(zri)
              ph = @mpwr*acos(zj/magn)
              zri = r*(cos(th)*sin(ph) + flip(sin(ph)*sin(th))) + cri
              zj = r*cos(ph) + cj

              r = magn^@mpwr
              dth = @mpwr*(th = atan2(zri))
              if (ph = acos(zj/magn))>0.5*#pi
                ph = #pi - ph
              endif
              dph = @mpwr*ph
              zri = r*(cos(dth)*sin(dph) + flip(sin(dph)*sin(dth))) + cri
              zj = r*cos(dph) + cj


I'm guessing but what Jos has rendered may well be correct for the formula you quoted in your article - I'm just about to try it....


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 01:35:40 PM
Hi Daniel, it appears that you've quoted a different formula to the ones we've been using ?

For Paul's version of your formula I'm sure he quoted it as:

              r = magn^@mpwr
              dth = @mpwr*(th = atan2(zri))
              dph = @mpwr*(ph = asin(zj/magn))
              zri = r*(cos(dth)*cos(dph) + flip(cos(dph)*sin(dth))) + cri
              zj = -r*sin(dph) + cj

Then I also had two versions suggested by Garth:

              r = (magn=sqrt(magn))^@mpwr
              th = @mpwr*atan2(zri)
              ph = @mpwr*acos(zj/magn)
              zri = r*(cos(th)*sin(ph) + flip(sin(ph)*sin(th))) + cri
              zj = r*cos(ph) + cj

              r = magn^@mpwr
              dth = @mpwr*(th = atan2(zri))
              if (ph = acos(zj/magn))>0.5*#pi
                ph = #pi - ph
              endif
              dph = @mpwr*ph
              zri = r*(cos(dth)*sin(dph) + flip(sin(dph)*sin(dth))) + cri
              zj = r*cos(dph) + cj


I'm guessing but what Jos has rendered may well be correct for the formula you quoted in your article - I'm just about to try it....


Apologies - I forgot, Paul essentially quoted ph = @mpwr*(atan(zj/cabs(zri)) - using the above was suggested by Garth as a faster alternative. Also don't worry about the dph/ph in the first version, I quoted from part of my code using Jos' analytical DE which requires the ph value multplied by (@mpwr-1).


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 02:06:42 PM
Sorry - I missed Paul's recent post where he quotes the triplex formula he's using - that's the formula I'm using too.

Jos I'd be interested to know exactly what your formula was that was producing the "holes" since it's quite different from what I get from any versions of the formula - I also tried the formula that Daniel has quoted in his article (were ph and th are reversed etc.) but still didn't get a result with holes like yours.


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 09, 2009, 03:10:44 PM
Quote
Jos I'd be interested to know exactly what your formula was that was producing the "holes" since it's quite different from what I get from any versions of the formula

OK, here it is : (the first part handles what is needed for the derivative)
   dzx= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*cos(thdz+(@pow-1)*th)+c
   dzy= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*sin(thdz+(@pow-1)*th)
   dzz= @pow*(R^(@pow-1))*Rdz*cos(phdz+(@pow-1)*ph)
     Rdz=sqrt(dzx*dzx+dzy*dzy+dzz*dzz)
     thdz=atan2(dzx+i*dzy)
     phdz=acos(dzz/Rdz)

   zx= (R^@pow)*sin(@pow*ph)*cos(@pow*th)+cx
   zy= (R^@pow)*sin(@pow*ph)*sin(@pow*th)+cy
   zz=(R^@pow)*cos(@pow*ph)+cz
     R=sqrt(zx*zx+zy*zy+zz*zz)
     th=atan2(zx+i*zy)
     ph=atan2(sqrt(zx*zx+zy*zy)+i*zz)

..but remember, as I said, it could still well be a weird rendering error


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 04:57:18 PM
Quote
Jos I'd be interested to know exactly what your formula was that was producing the "holes" since it's quite different from what I get from any versions of the formula

OK, here it is : (the first part handles what is needed for the derivative)
   dzx= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*cos(thdz+(@pow-1)*th)+c
   dzy= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*sin(thdz+(@pow-1)*th)
   dzz= @pow*(R^(@pow-1))*Rdz*cos(phdz+(@pow-1)*ph)
     Rdz=sqrt(dzx*dzx+dzy*dzy+dzz*dzz)
     thdz=atan2(dzx+i*dzy)
     phdz=acos(dzz/Rdz)

   zx= (R^@pow)*sin(@pow*ph)*cos(@pow*th)+cx
   zy= (R^@pow)*sin(@pow*ph)*sin(@pow*th)+cy
   zz=(R^@pow)*cos(@pow*ph)+cz
     R=sqrt(zx*zx+zy*zy+zz*zz)
     th=atan2(zx+i*zy)
     ph=atan2(sqrt(zx*zx+zy*zy)+i*zz)

..but remember, as I said, it could still well be a weird rendering error

Hi, in Daniel's article he actually put:

------------------------
r = sqrt(x^2 + y^2 + z^2 )
theta = atan2(sqrt(x^2 + y^2) , z)
phi = atan2(y,x) ;

newx = r^n * sin(theta*n) * cos(phi*n)
newy = r^n * sin(theta*n) * sin(phi*n)
newz = r^n * cos(theta*n)
------------------------

I presume for phi he meant atan(y/x) or atan2(x+flip(y)).

Here's what I used based on Daniel's above version:

              dr = @mpwr*(r=sqrt(|dzri|+sqr(dzj)))*(magn=sqrt(magn))^(@mpwr-1.0)
              dph = (@mpwr-1.0)*ph + atan2(dzri)
              dth = (@mpwr-1.0)*th + asin(dzj/r)
              dzri = dr*(cos(dph)*sin(dth) + flip(sin(dth)*sin(dph)))
              dzj = dr*cos(dth)
              if @fractaltype==1 ; 1==Mandy
                dzri = dzri + 1.0
              endif
              r = magn^@mpwr
              dph = @mpwr*(ph = atan2(zri))
              dth = @mpwr*(th = asin(zj/magn))
              zri = r*(sin(dth)*cos(dph) + flip(sin(dth)*sin(dph))) + cri
              zj = r*cos(dth) + cj
              magn = |zri| + sqr(zj)

You should note that for my version magn, ph and th are precalculated before entry into the iteration loop.
It turns out that z^2+c for the above gives a 180 degree rotation of Garth Thornton's suggested formula (the "correct" one) but is quite different from Garth's at higher powers.


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 09, 2009, 05:21:47 PM
Well , I see
Quote
theta = atan2(sqrt(x^2 + y^2) , z)

Sorry, my mistake then. In my code I'm actually using pi/2-theta by mistake.
Let's see if that makes my "tunnels" go away...


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 05:28:47 PM
Quote
Jos I'd be interested to know exactly what your formula was that was producing the "holes" since it's quite different from what I get from any versions of the formula

OK, here it is : (the first part handles what is needed for the derivative)
   dzx= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*cos(thdz+(@pow-1)*th)+c
   dzy= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*sin(thdz+(@pow-1)*th)
   dzz= @pow*(R^(@pow-1))*Rdz*cos(phdz+(@pow-1)*ph)
     Rdz=sqrt(dzx*dzx+dzy*dzy+dzz*dzz)
     thdz=atan2(dzx+i*dzy)
     phdz=acos(dzz/Rdz)

   zx= (R^@pow)*sin(@pow*ph)*cos(@pow*th)+cx
   zy= (R^@pow)*sin(@pow*ph)*sin(@pow*th)+cy
   zz=(R^@pow)*cos(@pow*ph)+cz
     R=sqrt(zx*zx+zy*zy+zz*zz)
     th=atan2(zx+i*zy)
     ph=atan2(sqrt(zx*zx+zy*zy)+i*zz)

..but remember, as I said, it could still well be a weird rendering error

I should read code more carefully Jos - I just noticed you have:

     phdz=acos(dzz/Rdz)

but:

     ph=atan2(sqrt(zx*zx+zy*zy)+i*zz)


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 09, 2009, 05:41:08 PM
Well it seems I was using the complement of the angle by mistake.
The 'holes' are now plugged.
Sorry for the wild goose chase


Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 09, 2009, 05:57:57 PM
I would really like to ask xenodreambuie, how did you find the roots for the -2 power triplex? Do you have a means of finding the roots for arbitrary powers, and if so, how do you verify root validity?

I tried to create a 3D Glynn set using MIIM, but no luck so far. I also found that my MIIM code did nothing to improve my 4th order inverse 3D Julia set. On the up side, I was able to reproduce some similar images to xenodreambuie's 3D Julia sets using the MIIM code.

What does "flip" mean in UltraFractal code?


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 06:00:12 PM
Well it seems I was using the complement of the angle by mistake.
The 'holes' are now plugged.
Sorry for the wild goose chase


No problem - it helped because I just noticed the obvious with respect to my version of the analytical DE and changed it so that ph and th do not need precalculatiing - it just needed their calculation moving to the start of the iteration loop !


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 09, 2009, 06:02:32 PM
(like "flip" for example).


Hi Paul

flip(f)

is just i*f

:)

Edit: Aargh - make that flip(x+i*y) is (y+i*x) !


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 09, 2009, 08:44:16 PM
Now that I know that my distance estimate formula works better than I thought, I tried a really deep zoom.
The image below has magnification 28.8 million, and the surface treshold is 10^-12. If I haven't made a mistake, this means that if the total object is the size of the earth, then we are looking at an area the size of a dining table.

I think this about as deep as I can go with current state of the code.


Title: Re: True 3D mandelbrot type fractal
Post by: xenodreambuie on November 09, 2009, 10:05:09 PM
I would really like to ask xenodreambuie, how did you find the roots for the -2 power triplex? Do you have a means of finding the roots for arbitrary powers, and if so, how do you verify root validity?

I tried to create a 3D Glynn set using MIIM, but no luck so far. I also found that my MIIM code did nothing to improve my 4th order inverse 3D Julia set. On the up side, I was able to reproduce some similar images to xenodreambuie's 3D Julia sets using the MIIM code.


Peter Liepa's MIIM code works for all powers, since it uses Abs(power) in the appropriate places. Integer powers always have abs(power) roots, so for the triplex I didn't have to do anything different for -2.

However, for fractional powers the modifications to the sin and true cos complicate the root validity checks. I tried just cancelling those out for the validity tests. Also I think the rootlimit for phi uses pi rather than 2pi. However, as I never got worthwhile results with 1.5 or other fractional powers, I don't know for sure whether I had the correct validity tests. I came to the conclusion that a good 1.5 triplex is unlikely. It's a tricky enough beast in 2D.


Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 09, 2009, 11:30:56 PM
Peter Liepa's MIIM code works for all powers, since it uses Abs(power) in the appropriate places. Integer powers always have abs(power) roots, so for the triplex I didn't have to do anything different for -2.

However, for fractional powers the modifications to the sin and true cos complicate the root validity checks. I tried just cancelling those out for the validity tests. Also I think the rootlimit for phi uses pi rather than 2pi. However, as I never got worthwhile results with 1.5 or other fractional powers, I don't know for sure whether I had the correct validity tests. I came to the conclusion that a good 1.5 triplex is unlikely. It's a tricky enough beast in 2D.

Which formulas are you referring to by "sin" and "true cos"? If you refer to the formulas on my previous post, you will see that I don't know of any formula for the triplex that produce abs(power) roots. Are you adding multiples of 2pi to both rotational angles theta and phi, or just phi, or are you doing something else?


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 10, 2009, 12:02:21 AM
Now that I know that my distance estimate formula works better than I thought, I tried a really deep zoom.
The image below has magnification 28.8 million, and the surface treshold is 10^-12. If I haven't made a mistake, this means that if the total object is the size of the earth, then we are looking at an area the size of a dining table.

I think this about as deep as I can go with current state of the code.

Hi Jos - to avoid the "stepping" just add the binary search between the last two steps to find the exact threshold - or as Paul Nylander suggested you could try a weighted search instead which may possibly be more optimum - though supposedly we're dealing with a linear value so it should really actually be slower than a plain binary search due to the extra maths required - I haven't tried it :)
Or was it Garth who suggested it ? Apologies to the relevant party !


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 10, 2009, 01:10:57 AM
I had the same idea as Jos regarding testing his analytical DE algorithm on a deep zoom, but my machines probalbly not quite so fast :)

Anyway, here you are:

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

A 9th degree White/Nylander (actually a zoom of Tower Gardens).

Magnification approx. 2.58E12
Solid Threshold: 4E-14

Rendered @1280*960 in 1 hour 10mins on a 2GHz core2duo.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 10, 2009, 03:58:44 AM
Okay had time recuperate... :)

Quote
Just a suggestion - where you discuss the formula you could also mention Jos Leys' algorithm for accurate analytical DE for the formula (and related formulas such as Garth Thornton's variations and Rudy Rucker's formula).

Hi David, That's an idea, at least a mention would be good. I think Paul's done a good job of collecting the different formulas, so I probably won't repeat the math. But in any case, I may first link to some thread posts until I understand some of them better. Out of interest, how much faster is rendering after using Jos Leys' algorithm compared to before?

Cheers for the formulae Paul. I look forward to implementing it, especially the 4th power one. I take it that one can use it in conjunction with Jos Leys' DE algorithm?

Hi bib,
Quote
- In the 8-power monster, although the level of detail is infinite, I have the feeling that shapes do not vary as much as in the 2D M-set (2 or 8 power, it does not matter) when you zoom in. All is very self similar, and there is not such variery as you can find for example when you zoom near a minibrot in 2D. What do you think about that?

Alas, I agree. The variety is extensive, but nowhere near as good as the real thing would be. That's why I said at the end: "but again, they wouldn't compare to the variety one might expect from a 3D version of Seahorse valley.... That means the biggest secret is still under wraps".

There could still be some surprises left though I think. The inside has been hardly explored for instance.

Quote
Hi Daniel, it appears that you've quoted a different formula to the ones we've been using ?

Yes, the one I printed in the article is basically an arbitrary power version of my old formula from page 1 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg4109/#msg4109) of this thread, except without the 0.5pi and 1pi offsets. The version on Paul's page is with the pi offsets. Both produce good (and pretty similar) results - I just like to try and simplify things as much as possible.

Quote
I presume for phi he meant atan(y/x) or atan2(x+flip(y)).

Nope I checked - it is atan2(y,x) at least in the c/c++ language.

Nice images Jos! I can add one to the article if you like. Congrats on the 28.8 million zoom too; interesting, I got the exact 'layered pixel' effect that you're getting in that image to begin with. As David said, one can use a binary chop type algorithm at the last stage to sort that out, though I still think it looks a kinda cool effect in itself.

Thanks everyone for the comments! :)


Title: Re: True 3D mandelbrot type fractal
Post by: xenodreambuie on November 10, 2009, 05:59:56 AM

Which formulas are you referring to by "sin" and "true cos"? If you refer to the formulas on my previous post, you will see that I don't know of any formula for the triplex that produce abs(power) roots. Are you adding multiples of 2pi to both rotational angles theta and phi, or just phi, or are you doing something else?

Hi Paul, my previous post was hasty due to rushing out. See if this makes sense.

I only use the trig formula, basically as yours but with three variations of phi handling. I had difficulty with the trig version roots initially, because treating the roots independently is not quite reversible due to spherical coordinates being a double cover if phi goes beyond pi (which it does when calculating powers greater than 1). To get equivalence to a forward iteration method requires some parity correction by pi to get the root in the right hemisphere of theta. It took some experiment and thought to get the two correct variations working.

When I wrote "using Abs(power) in appropriate places," I meant in setting the rootlimit and number of branches, and the multiplier for dp, so those all handle negative powers as is. The trig formulas don't need any special handling for negative power.

In my code I've dropped the root validity checking as I've given up on fractional powers, but rootlimit is still used for
some angle choices because it works. The following is pseudocode for clarity. (Delphi uses := for assignment, and I have some optimizations such as precomputing invpower, and computing sin and cos in a single sincos function.)

So I have, in all cases:

  NumBranches = ceil(abs(power));
  Numchoices = sqr(numbranches);
  rootlimit= abs(power)*pi;
 // ktheta and kphi are independent choices, from 0 to numbranches-1
  r = sqrt(sqr(x)+sqr(y)+sqr(z));
  theta= arctan2(y,x);
  theta= theta + 2pi*(ktheta - floor((theta+rootlimit)/2pi);

then, for standard triplex:
  theta= theta + kphi*pi; // a correction to get the parity of theta right
  phi = arcsin(z/r);
  if phi>0 then phi= phi - kphi*pi else phi= phi + kphi*pi;
  theta= theta/power;
  phi= phi/power;
  r= r^(1/power);
  x= r*cos(theta)*cos(phi);
  y= r*sin(theta)*cos(phi);
// but for the inverse, z=-sin(phi) doesn't work. To get both hemispheres, need to compare new and old z
  newz= r*sin(phi);
  if newz*z>0 then newz= -newz;

or, for my variation of the z=cos(phi) triplex (the simple one with some flipped roots):
  phi = arccos(z/r);
  phi= phi + 2pi*(kphi - floor((phi+rootlimit)/2pi);
  theta= theta/power;
  phi= phi/power;
  r= r^(1/power);
  x= r*cos(theta)*sin(phi);
  y= r*sin(theta)*sin(phi);
  z= r*cos(phi);

or, for the "true" z=cos(phi) triplex:
  theta= theta + kphi*pi;
  phi = arccos(z/r);
  phi= phi + 2pi*kphi;
  theta= theta/power;
  phi= phi/power;
  r= r^(1/power);
  x= r*cos(theta)*sin(phi);
  y= r*sin(theta)*sin(phi);
  z= r*cos(phi);

There may be a purer way to get the standard triplex working but I tried hard without success, so if you do find one, please post it.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 10, 2009, 08:24:07 AM
Sorry had to say...

David, just seen some of your pics over at Deviantart - but your "The Honeycomb" pic - it's incredible! Great colours, material and choice of view!!

http://makinmagic.deviantart.com/art/The-Honeycomb-142102904

Let me know at any time if you would like me to replace it over Alien Coral in the mini gallery from my article.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 10, 2009, 12:14:30 PM
Sorry had to say...

David, just seen some of your pics over at Deviantart - but your "The Honeycomb" pic - it's incredible! Great colours, material and choice of view!!

http://makinmagic.deviantart.com/art/The-Honeycomb-142102904

Let me know at any time if you would like me to replace it over Alien Coral in the mini gallery from my article.

Thanks very much. As to using it instead of Alien Coral, it's up to you, I don't mind which is used :)


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 10, 2009, 12:16:03 PM
Quote
I presume for phi he meant atan(y/x) or atan2(x+flip(y)).

Nope I checked - it is atan2(y,x) at least in the c/c++ language.

Ah, it's a while since I did it in C/C++ - my suggestions are just the Ultra Fractal versions.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 10, 2009, 01:01:03 PM
Heck, these perspective shots render slower on mine. Pig to set up the camera as well, but results are exciting. It's a zoom into the old gateau mountain I did, but it's a preview, so the detail level is a bit low (this took about an hour or two to render). Couldn't resist the Amiga-style HAM background as well ;)

(http://www.skytopia.com/project/fractal/new/full/mountain-persp.jpg)

I'm wishing about now that I could grab the infinitely fast CPU from that article I did.


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 10, 2009, 01:54:05 PM
Couldn't resist the Amiga-style HAM background as well ;)

Haaa...the Amiga and my first fractal images! good old memories :)
Talking about HAM, I had never noticed the fractals in this famous image from http://en.wikipedia.org/wiki/Hold-And-Modify

(http://upload.wikimedia.org/wikipedia/en/c/c5/HAM6example.png)


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 10, 2009, 03:28:35 PM
Couldn't resist the Amiga-style HAM background as well ;)

Haaa...the Amiga and my first fractal images! good old memories :)
Talking about HAM, I had never noticed the fractals in this famous image from http://en.wikipedia.org/wiki/Hold-And-Modify

Did you Amiga fans ever play Crystal Dragon ?
If not you can get it from my ancient website (runs on a real Amiga or under WinUAE/Fellow):
http://skyscraper.fortunecity.com/terabyte/966/download.html (http://skyscraper.fortunecity.com/terabyte/966/download.html)
Apologies for the ads.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 10, 2009, 10:08:04 PM
.<non-trig formulas for the White/Nylander>

Hi Paul, finally got around to trying these and z^2+c works fine but your definition of z^3+c doesn't match the trig version - I simply found that removing the abs from abs(x) and the sign(x) fixed the problem grossly simplifying things when using complex numbers i.e. I got this result for z^3+c:

            zri = (zri^3)*(1.0 - 3.0*sqr(zj)/(r=|zri|)) + cri
            zj = zj*sqr(zj) - 3.0*zj*r + cj

Where zri and cri are complex and r, zj and cj are reals and |zri| is sqr(real(zri))+sqr(imag(zri)).
z^2+c was just:

            zri = sqr(zri)*(1.0 - sqr(zj)/(r=|zri|)) + cri
            zj = -2.0*zj*sqrt(r) + cj

Out of interest I decided to try something based on the quadratic version that would have the standard 2D Mandy in both XY and XZ planes and settled on this (a mix of quaternion and White/Nylander):

            ztemp = zri
            zri = sqr(zri) - zj*zj
            zri = real(zri) + flip(imag(zri)*(1.0 - sqr(zj)/|ztemp|)) + cri
            zj = 2.0*real(ztemp)*zj*(1.0 - sqr(imag(ztemp))/|real(ztemp)+flip(zj)|)+cj

It's still not the "holy grail" but I found it particularly interesting.

On to z^4+c......



Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 10, 2009, 11:29:38 PM
.<non-trig formulas for the White/Nylander>

Hi Paul, finally got around to trying these and z^2+c works fine but your definition of z^3+c doesn't match the trig version - I simply found that removing the abs from abs(x) and the sign(x) fixed the problem grossly simplifying things when using complex numbers i.e. I got this result for z^3+c:

            zri = (zri^3)*(1.0 - 3.0*sqr(zj)/(r=|zri|)) + cri
            zj = zj*sqr(zj) - 3.0*zj*r + cj

Where zri and cri are complex and r, zj and cj are reals and |zri| is sqr(real(zri))+sqr(imag(zri)).
z^2+c was just:

            zri = sqr(zri)*(1.0 - sqr(zj)/(r=|zri|)) + cri
            zj = -2.0*zj*sqrt(r) + cj

Out of interest I decided to try something based on the quadratic version that would have the standard 2D Mandy in both XY and XZ planes and settled on this (a mix of quaternion and White/Nylander):

            ztemp = zri
            zri = sqr(zri) - zj*zj
            zri = real(zri) + flip(imag(zri)*(1.0 - sqr(zj)/|ztemp|)) + cri
            zj = 2.0*real(ztemp)*zj*(1.0 - sqr(imag(ztemp))/|real(ztemp)+flip(zj)|)+cj

It's still not the "holy grail" but I found it particularly interesting.

On to z^4+c......



For z^4+c to match the trig version I had to reverse the sign of the z^4 term:

            r = |zri|
            zri = (zri^4)*(1.0 - (6.0*r*sqr(zj) - zj^4)/sqr(r)) + cri
            zj = -4.0*zj*sqrt(r)*(r - sqr(zj)) + cj


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 11, 2009, 02:47:10 AM
Quote
Just a suggestion - where you discuss the formula you could also mention Jos Leys' algorithm for accurate analytical DE for the formula (and related formulas such as Garth Thornton's variations and Rudy Rucker's formula).

Hi David, That's an idea, at least a mention would be good. I think Paul's done a good job of collecting the different formulas, so I probably won't repeat the math. But in any case, I may first link to some thread posts until I understand some of them better. Out of interest, how much faster is rendering after using Jos Leys' algorithm compared to before?

Cheers for the formulae Paul. I look forward to implementing it, especially the 4th power one. I take it that one can use it in conjunction with Jos Leys' DE algorithm?

Hi all, just did some accurate timing tests (using my core2duo instead of the somewhat unreliable timings on this P4HT) just to see the difference between my Delta DE and Jos Leys' Analytical DE and also to see how much faster the non-trig versions are.

First to anwer Daniel's question - yes you can use the non-trig versions with Jos' analytical DE *but* at the moment I only know how to do that using the trig version of the formula for calculating the derivative (with the "normal" iteration using the non-trig version). There's probably a way to get the derivative without the trig but it's beyond my maths ability :)

OK now the timings - all rendered within UF at the same (high) detail settings with shadowcasting and all at the same magnification. In all cases the "entire" Mandelbrot was in view (all renders 1024 wide).

z^2+c

Delta DE (trig): 9 mins 12 secs
Analytical DE (trig): 5 mins 25 secs
Delta DE (no trig): 1 min 44 secs
Analytical DE (trig for derivative only): 4 mins 26 secs

z^3+c

Delta DE (trig): 4 mins 53 secs
Analytical DE (trig): 3 mins 07 secs
Delta DE (no trig): 0 min 53 secs
Analytical DE (trig for derivative only): 2 mins 29 secs

z^4+c

Delta DE (trig): 4 mins 04 secs
Analytical DE (trig): 2 mins 30 secs
Delta DE (no trig): 0 min 59 secs
Analytical DE (trig for derivative only): 2 mins 04 secs

Pretty much as you'd expect based on the relative amounts of calculation involved :)

If anyone's wondering there was essentially zero visible difference between the trig renders and the non-trig renders - just the odd pixel in the "bowl" areas of the z^3 and z^4 analytical DE renders - probably down to greater inaccuracies in the trig versions as compared to the non-trig versions (the way I calculate the normals is especially sensitive to small variations).


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 11, 2009, 02:12:27 PM
Hi
Playing with old 3D formulas is still good fun. Some videos are still calculating with intersesting 3D fractal details from pseudo-seahorse valleys...
(http://www.fractalforums.com/gallery/1/492_11_11_09_2_08_36.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 11, 2009, 03:25:39 PM
Some Julia Set timings - all rendered within UF at the same (high) detail settings with shadowcasting and all at the same magnification. In all cases the "entire" Julia was in view (all renders 1024 wide) and the seed was (-0.05, 0.8, 0.1).
Basically this just backs up the results for the Mandelbrots.

z^2+c

Delta DE (trig): 9 mins 50 secs
Analytical DE (trig): 4 mins 50 secs
Delta DE (no trig): 1 min 51 secs
Analytical DE (trig for derivative only): 3 mins 59 secs

z^3+c

Delta DE (trig): 4 mins 17 secs
Analytical DE (trig): 3 mins 0 secs
Delta DE (no trig): 0 min 43 secs
Analytical DE (trig for derivative only): 2 mins 23 secs

z^4+c

Delta DE (trig): 3 mins 28 secs
Analytical DE (trig): 2 mins 31 secs
Delta DE (no trig): 0 min 48 secs
Analytical DE (trig for derivative only): 2 mins 06 secs

In the case of the Julias the trig and non-trig versions were all visually identical.


Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 11, 2009, 05:49:17 PM
Wow, I did not realize that the non­trigonometric formulas were so much faster. Here are some higher order formulas that I found with Mathematica. Hopefully, these formulas will provide huge time savings, especially for the popular 8th order version. One nice thing about the odd powers is that they do not require any square roots, so they should be quite fast. These formulas are a bit lengthy, but they checked out correctly on my computer. For optimum efficiency, you will probably need to declare some intermediate variables to avoid redundant calculations.


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 11, 2009, 07:05:47 PM
Another deep zoom on the power 8 Mandelbrot.
Magnification 4E15, so a million-billion times.
Ultrafractal switched to "extended precision" to calculate this. (meaning it worked with numbers of 20 decimals)
Any further and UF starts "arbitray precision" which takes forever to calculate, so I think this is about the limit with UF (unless Dave has other ideas. ;) )
Anyway, I guess we are all convinced now that this thing is fractal, and quite uniform, so at whatever magnification we see more or less the same thing.


Title: Re: True 3D mandelbrot type fractal
Post by: Daniel_P on November 11, 2009, 08:35:24 PM
Hi all,

Awesome work with the Mandelbulb!

My first post here.
I've been wondering for a little while about another possible way of generating a 3D Mandelbrot and would appreciate your thoughts.

A comment in this Reddit triggered this recent line of thought: http://www.reddit.com/r/math/comments/9nnc0/hypercomplex_fractals_pics/c0djtbw (http://www.reddit.com/r/math/comments/9nnc0/hypercomplex_fractals_pics/c0djtbw)
Quote
Given two complex numbers z and w, repeatedly apply the transformation z→z^2+w (while w stays fixed)
you stop whenever the modulus of z becomes greater than 2. Then take the set of pairs (z,w) for which this process never terminates (of course, in reality you put an upper limit, say, 1000 iterations). As a pair of complex numbers has 4 real components, the set is 4 dimensional. This is the full Mandelbrot set.

Since seeing some of Thomas Banchoff's animations years ago I've been fascinated by the 3-sphere and its stereographic projection into flat 3-space (Something I explored in my 4D rotation animations here: http://spacesymmetrystructure.wordpress.com/2008/12/11/4-dimensional-rotations/ (http://spacesymmetrystructure.wordpress.com/2008/12/11/4-dimensional-rotations/) )
and what I was wondering is: What would it look like to take the intersection of the set in 4-space described above with the unit 3-Sphere and stereographically project down to 3D ?

Actually it would make more sense to work backwards - to check if a point in 3D space is part of the fractal, first reverse stereographic project like this:

   X  = 2 * x / (1 + x ^ 2 + y ^ 2 + z ^ 2)
   Y  = 2 * y / (1 + x ^ 2 + y ^ 2 + z ^ 2)
   Z  = 2 * z / (1 + x ^ 2 + y ^ 2 + z ^ 2)
   W = (-1 + x^2 + y^2 + z^2) / (1 + x^2 + y^2 + z^2)

Then do the iteration to see if it is in the set.

My questions for you are:
  • Has this been done before ?
  • Do you think the results would be interesting ?
  • How would you recommend getting started?
    I have a little programming experience but have never done any raytracing/raymarching before. From reading some of Inigo Quilez's writing I suspect that the Hubbard Douady potential might be useful here


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 11, 2009, 11:32:25 PM
Hi all, my WIP formula is not yet ready to add to the UF formula database but I've tidied it up a lot - not everything works yet (such as re-ordering the axes) but I think most will find it useable (unzip, copy all the text and paste into an open UF fractal window - needs UF5):

http://www.fractalgallery.co.uk/MMFwip3D.zip (http://www.fractalgallery.co.uk/MMFwip3D.zip)

The UPR has quick example z^2+c quaternion renders - one solid on Analytical DE threshold and one on point trapping - note that pickover stalks do not produce good results on quaternions, try the other fractal types for those.

Edit: The above file still exists but is obsolete:

I just updated the WIP3D formula, new link:

http://www.fractalgallery.co.uk/MMFWip3D.zip (http://www.fractalgallery.co.uk/MMFWip3D.zip)

Again unzip, copy all the text and paste into an open UF fractal window.
This time the UPR is an example render of Pickover stalks (orbit trap) - note that "auto distances" is disabled and the solid threshold is much larger than used for solid on iteration/distance estimate.
Several more options in the formula plus some bugfixes in the analytical distance estimate methods.
This is actually named as a different formula so as not to cause compatibility issues with any renders you've already done :)


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 12, 2009, 04:16:30 AM
Apologies if you guys already have this, but I just realised a more compact form of the White/Nylander formula - though not necessarily fastest in all cases (e.g. even powers<10), though it is faster than the explicit trig version in UF:

            ztemp = ((r=cabs(zri)) + flip(zj))^@mpwr
            zri = real(ztemp)*(zri/r)^@mpwr + cri
            zj = -imag(ztemp) + cj

ztemp, zri and cri all complex
r, zj and cj all real.
@mpwr real, though using complex is possible with this form.
In case anyone isn't familiar flip(zj) simply produces i*zj i.e. makes zj imaginary.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 12, 2009, 05:08:08 AM
Apologies if you guys already have this, but I just realised a more compact form of the White/Nylander formula - though not necessarily fastest in all cases (e.g. even powers<10), though it is faster than the explicit trig version in UF:

            ztemp = ((r=cabs(zri)) + flip(zj))^@mpwr
            zri = real(ztemp)*(zri/r)^@mpwr + cri
            zj = -imag(ztemp) + cj

ztemp, zri and cri all complex
r, zj and cj all real.
@mpwr real, though using complex is possible with this form.
In case anyone isn't familiar flip(zj) simply produces i*zj i.e. makes zj imaginary.

It'd be interesting if someone can work out how to apply a full 3D "power" :)


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 12, 2009, 08:00:31 AM
Hi guys, I just registered to the forum because somebody pointed me to this thread this morning. I got interested in the trigonometric version of the Mandelbrot set posted here, so I wrote a small raymarcher (in C) and tried the idea. Results are interesting. First I tried it in the CPU:

(http://www.iquilezles.org/trastero/f8p.jpg)

Render time was about 15 minutes (512 ambient occlusion rays, one shadow ray, two light sources, 2x2 antialias at 1280x720). The raymarcher is very rudimentary, the step size is constant, no distance estimation computations to speed the marching. Not yet. The surface normal (if such a thing exists for fractals) is computed by the central differences method, it's not analytic.

Since a couple of years ago I did a demo with a quaternion 4d julia set in realtime with ambient occlusion in the GPU (Kindernoiser: http://iquilezles.org/prods/#kindernoiser (http://iquilezles.org/prods/#kindernoiser)), I decided to port this little raymarcher of this morning to the GPU this afternoon. Results are promising, I get almost realtime rendering (5 frames per second) without the distance estimation optimization and some non-raytrace-based ambient occlusion.

My motivation to try this has been one of those green-broccoli zooms posted by Twenbie, it so much looks like real vegetation or a forest, it's amazing. I hope I can work a bit next days again and do something like that, I will continue to do so.

Also, I think twenbie or somebody with a good raytracer handy should try some subsurface-scattering (translucent surfaces), that should rock quite a lot!!!

About the topic, it's really a pity the thing doesn't work that nicely for exponent=2, otherwise I would say this would have been the definite 3D M-Set. In any case, the choice of multiplying both angles by the exponent in the trigonometric multiplication is rather arbitrary I think. It's a pity. I somehow feel the real thing not trigonometric, but polynomial, although I'm not the one to tell. My best attempt so far was this http://iquilezles.org/www/articles/experimental3djulia/experimental3djulia.htm (http://iquilezles.org/www/articles/experimental3djulia/experimental3djulia.htm) whici is completely ridiculous compared to the beautiful images produced by this trigonometric variation discussed in the thread.



Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 12, 2009, 10:42:29 AM
Hi all, my WIP formula is not yet ready to add to the UF formula database but I've tidied it up a lot - not everything works yet (such as re-ordering the axes) but I think most will find it useable (unzip, copy all the text and paste into an open UF fractal window - needs UF5):

http://www.fractalgallery.co.uk/MMFwip3D.zip (http://www.fractalgallery.co.uk/MMFwip3D.zip)

The UPR has quick example z^2+c quaternion renders - one solid on Analytical DE threshold and one on point trapping - note that pickover stalks do not produce good results on quaternions, try the other fractal types for those.

Thanks so much David. Many hours of fun exploration to come :):)


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 12, 2009, 10:48:31 AM
Very impressive image for a first post here!
My best attempt so far was this http://iquilezles.org/www/articles/experimental3djulia/experimental3djulia.htm (http://iquilezles.org/www/articles/experimental3djulia/experimental3djulia.htm) whici is completely ridiculous compared to the beautiful images produced by this trigonometric variation discussed in the thread.

Your 3D julia images remind me a video I did recently :
http://www.youtube.com/watch?v=uotgvkZO2Zk

and this one as well:
http://www.youtube.com/watch?v=tCGqXDnzje8


Title: Re: True 3D mandelbrot type fractal
Post by: lycium on November 12, 2009, 12:13:02 PM
hi (again!) iñigo, good to see you see you here :) the render you posted is great!

i was also hoping to try rendering this thing on everyone's favourite little supercomputer, the gpu  O0


Title: Re: True 3D mandelbrot type fractal
Post by: Aexion on November 12, 2009, 02:28:15 PM
Hello,   :)

This very simple iteration can produce some interesting results (in a very unoptimized C code):

bool JuliaSimple(double x, double y, double z){
double radius,ny,nx,nz;
unsigned char Counter;
for(Counter=0;Counter<50;Counter++){

 nx = x*x-z*z-0.27;
 nz = 2*x*z;

ny=y;
x=nz;
y=-nx;
z=-ny;
radius=x*x+y*y+z*z;
if (radius>1000) break;
}
if(radius>1000)
return false; //its outside of the set
 else
   return true; //its on the set
}

These are two other C values:
/*nx = x*x-z*z-0.285;
nz = 2*x*z-0.1;*/

/*nx = x*x-z*z-0.27;
 nz = 3*x*z;*/

here are two renders of this system:
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html)
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html)

The Mandelbrot of this series doesn't looks good but I have tested it on many other julia equations (such as the phoenix and the newton fractal) and it looks interesting.




Title: Re: True 3D mandelbrot type fractal
Post by: Buddhi on November 12, 2009, 05:40:27 PM
here are two renders of this system:
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html)
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html)
The Mandelbrot of this series doesn't looks good but I have tested it on many other julia equations (such as the phoenix and the newton fractal) and it looks interesting.

Hello Aexion
It is very nice to see new person in FractalForums. I saw your renderings and they looks very interesting. You have very strange iteration formula. It looks like z^2+c formula but with additional rotation by 90 degrees after each iteration. The results are awesome because there are visible lots of beautiful spirals.


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 12, 2009, 08:39:37 PM
I have some feedback to share.

I implemented the polynomial version of the 8x rotation (it's slightly different than the Mathematica-one posted above -  I did my own derivation based on the spherical coordinate system I'm using).  The speed improvement in the CPU version was great (4 to 5 times faster). However, the GPU version runs equally fast, no speed gain at all between trigonometric or polynomial version. Still, it's very fast (interactive to realtime, depending on the resolution/quality settings) This is disappointing, and might be related to the fact that probably the trig functions are partially implemented by little texture lookups which are fast, while the polynomial version consumes lots of instructions (MADs). Of course I took into account that most terms in the polynomials where even, so only one square root is needed per iteration in the end. So conclusion is: big speed gains in CPU, but no speed gain in the GPU :(


Title: Re: True 3D mandelbrot type fractal
Post by: Buddhi on November 12, 2009, 09:21:56 PM
Since a couple of years ago I did a demo with a quaternion 4d julia set in realtime with ambient occlusion in the GPU (Kindernoiser: http://iquilezles.org/prods/#kindernoiser (http://iquilezles.org/prods/#kindernoiser)), I decided to port this little raymarcher of this morning to the GPU this afternoon. Results are promising, I get almost realtime rendering (5 frames per second) without the distance estimation optimization and some non-raytrace-based ambient occlusion.

Hi IQ
It is nice surprise to see you in Fractal Forums. I know your 4k and 64k intros and 4kGfxExe from Demoscene (scene.org). I have never made any intro or demo but I have watched every demo from famous copy-parties since I had my first Amiga 600. I can said that your 4kGfxExe are the best I know. I saw also your the newest Elevated 4kIntro. It is relay impressive (ftp://ftp.scene.org/pub/parties/2009/breakpoint09/in4k/rgba_tbc_elevated.zip)
I think we can learn a lot from you how to optimise fractal rendering and how use some capabilities like SSE, MMX, GPU. Of course if you would like to share some knowledge. Maybe we can also help you to improve your fractal intros  :D


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 12, 2009, 09:56:13 PM
Hi
This is a zoom in the picture I posted above, using David Makin's M-true3D formula
(http://www.fractalforums.com/gallery/1/492_12_11_09_9_54_03.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 12, 2009, 10:07:25 PM
For reference, if anybody want to try the GPU version, here goes the GLSL version of the iteration formula:


//--------------------------------------
// interate z -> z^8 + c (trigonometric)
//--------------------------------------
float zr = sqrt( dot(z,z) );
float zo = acos( z.y/zr );
float zi = atan( z.x,z.z );

zr = pow( zr, 8.0 );
zo = zo * 8.0;
zi = zi * 8.0;
       
z = zr*vec3( sin(zo)*sin(zi), cos(zo), sin(zo)*cos(zi) );

z = z + c;
//--------------------------------------


The coordinate axes and spherical coords are arranged like they teach you at school (and as OpenGL does): x=right, y=up, z=towards you. "zo" is the angle between the point/vector and the y axis, and zi is the angle between it's shadow in the xz horizontal plane and the z axis. After some maths in paper I got that:

cos(8x) = c^8 + s^8 - 28c^6s^2 - 28c^2s^6 + 68c^4s^4
sin(8x) = 8sc^7 - 8s^7c - 56c^5s^3 + 56s^5c^3

where c=cos(x) and s=sin(x)

I think I didn't make any mistake, as images look identical to the ones rendered with the trigonometric version. After optimization it got quite ugly thou....:

//--------------------------------------
// interate z -> z^8 + c (polynomic)
//--------------------------------------
float zr2 = dot(z,z);
float zq2 = dot(z.xz,z.xz);
float izr2 = 1.0/zr2;
float izq2 = 1.0/zq2;

vec4 k2 = vec4( izr2*z.y*z.y, izr2*zq2, izq2*z.z*z.z, izq2*z.x*z.x );
vec4 k4 = k2*k2;
vec4 k6 = k4*k2;
vec4 k8 = k4*k4;

float ko = izr2*z.y*sqrt(zq2);
float ki = izq2*z.z*z.x;

float cozo8 = k8.x + k8.y - 28.0*k6.x*k2.y - 28.0*k2.x*k6.y + 68.0*k4.y*k4.x;
float cozi8 = k8.z + k8.w - 28.0*k6.z*k2.w - 28.0*k2.z*k6.w + 68.0*k4.w*k4.z;
float sizo8 = 8.0*ko*(k6.x - k6.y - 7.0*k2.y*k4.x + 7.0*k2.x*k4.y);
float sizi8 = 8.0*ki*(k6.z - k6.w - 7.0*k2.w*k4.z + 7.0*k2.z*k4.w);

float zr8 = zr2*zr2; zr8 = zr8*zr8;
z = zr8*vec3( sizo8*sizi8, cozo8, sizo8*cozi8 );

z = z + c;
//--------------------------------------


It's GLSL, should be easy to translate to  HLSL, CG or simple plain C.


Title: Re: True 3D mandelbrot type fractal
Post by: cKleinhuis on November 12, 2009, 10:26:20 PM
Since a couple of years ago I did a demo with a quaternion 4d julia set in realtime with ambient occlusion in the GPU (Kindernoiser: http://iquilezles.org/prods/#kindernoiser (http://iquilezles.org/prods/#kindernoiser)), I decided to port this little raymarcher of this morning to the GPU this afternoon. Results are promising, I get almost realtime rendering (5 frames per second) without the distance estimation optimization and some non-raytrace-based ambient occlusion.

Hi IQ
It is nice surprise to see you in Fractal Forums. I know your 4k and 64k intros and 4kGfxExe from Demoscene (scene.org). I have never made any intro or demo but I have watched every demo from famous copy-parties since I had my first Amiga 600. I can said that your 4kGfxExe are the best I know. I saw also your the newest Elevated 4kIntro. It is relay impressive (ftp://ftp.scene.org/pub/parties/2009/breakpoint09/in4k/rgba_tbc_elevated.zip)
I think we can learn a lot from you how to optimise fractal rendering and how use some capabilities like SSE, MMX, GPU. Of course if you would like to share some knowledge. Maybe we can also help you to improve your fractal intros  :D

hi there iq, i do look forward for an amazing realtime 3d fractal demo, although i might be also in creating an own one for next years breakpoint :D
perhaps we meet at the competition, and fractals will become a renaissance in the demo scene   O0


Title: Re: True 3D mandelbrot type fractal
Post by: Aexion on November 13, 2009, 01:00:37 AM
here are two renders of this system:
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html)
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html)
The Mandelbrot of this series doesn't looks good but I have tested it on many other julia equations (such as the phoenix and the newton fractal) and it looks interesting.

Hello Aexion
It is very nice to see new person in FractalForums. I saw your renderings and they looks very interesting. You have very strange iteration formula. It looks like z^2+c formula but with additional rotation by 90 degrees after each iteration. The results are awesome because there are visible lots of beautiful spirals.


Thanks Buddhi, its nice to be here.
About this iteration formula, you're right, its just a mix between the mandelbrot iteration and a normalized rotation matrix (that I have simplified for speed):

nx = x*x-z*z-0.27;
nz = 2*x*z-0.1;
ny=y;

x=a*nx +b*ny+ c*nz;
y=d*nx +e*ny+ f*nz;
z=g*nx +h*ny+ i*nz;

For some rotations, I get interesting 3d julias, but not for all.. many of them produces some sort of fractal potatoes..  :-\
Anyways, I'm still playing with them adding things like scaling and shearing, to see what happens.
 


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 13, 2009, 01:10:40 AM
here are two renders of this system:
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia1.html)
http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html (http://www.rfractals.net/gallery/main.php/v/JuliaSets/3DJulia2.html)
The Mandelbrot of this series doesn't looks good but I have tested it on many other julia equations (such as the phoenix and the newton fractal) and it looks interesting.

Hello Aexion
It is very nice to see new person in FractalForums. I saw your renderings and they looks very interesting. You have very strange iteration formula. It looks like z^2+c formula but with additional rotation by 90 degrees after each iteration. The results are awesome because there are visible lots of beautiful spirals.


On a similar theme it may be interesting to try "self-rotation" as well - performed like this in 2D complex (either pre- or post- the main iteration calculation):

    t = cabs(z)
    if t > 0
      z = z*z/t
    endif

Obviously one can use higher degrees of self-rotation i.e. rotate by multiples of "own angle".

As an aside this method increases the overall amount of chaos in a system generally leading to more strangely attractive orbits.


Title: Re: True 3D mandelbrot type fractal
Post by: cKleinhuis on November 13, 2009, 04:13:53 AM
and welcome to aexion, i almost forgot to greet you to personally

aexion is the develop of incendia fractal renderer


Title: Re: True 3D mandelbrot type fractal
Post by: fpsunflower on November 13, 2009, 07:47:10 AM
Hi everyone! Just wanted to share my experience rendering this fractal.

I'm using the analytical DE method. You can easily write a trig-free iteration formula for arbitrary powers that updates both derivative and value at the same time once you implement multiplication with these "triplex" numbers. You just need to remember the formulas for adding angles:

Code:
cos(a+b) = cos(a)*cos(b) - sin(a)*sin(b)
sin(a+b) = sin(a)*cos(b) + sin(b)*cos(a)

Its a bit more expensive than iq's version because the square roots don't cancel out anymore, but its more flexible and still way faster than the trig version (10x for my java implementation).

Another observation I haven't heard mentioned here yet: you can get semi-analytic normals without central differencing by implementing a dual arithmetic version of the distance estimation routine. Its maybe a tiny bit faster, although the normal estimation is a tiny fraction of rendering time if you are shooting many rays. Its only semi-analytic because its no more accurate than the "analytic" distance estimation is, but at least it gives you the true derivative to whatever precision you are calculating the distance with, without adding extra epsilons into your code.

Here's an image I rendered (n=7, microfacet reflection model, image based lighting and depth of field):

(http://s2.postimage.org/1oanjA.jpg) (http://www.postimage.org/image.php?v=Ts1oanjA)


Finally a question: I'm using this formula for the distance estimate:

Code:
return 0.5f * R * (float) Math.log(R) / dR;

Is the leading term 0.5 for all powers? Is the log supposed to be the natural log or the log in some other base? Does anyone have the reference to the explanation of how this formula actually works?


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 13, 2009, 08:37:34 AM
Quote
You can easily write a trig-free iteration formula for arbitrary powers...
Great! Could you give an example?

Quote
you can get semi-analytic normals without central differencing by implementing a dual arithmetic version of the distance estimation routine
Sorry, I don't understand what you mean..Could you explain?

I use the same distance formula for all powers: DE=R.ln(R)/dR, (so it is the base e log), but I advance the point on the ray by a fraction of DE. Normally 0.5 works, but sometimes I have to take something lower.

The formula relies on the so called Hubbard Douady potential. See for instance  http://iquilezles.org/www/articles/distancefractals/distancefractals.htm .


Title: Re: True 3D mandelbrot type fractal
Post by: fpsunflower on November 13, 2009, 10:14:26 AM
Quote
Sorry, I don't understand what you mean..Could you explain?

Dual numbers are explained here: http://en.wikipedia.org/wiki/Automatic_differentiation#Automatic_differentiation_using_dual_numbers

If your code is written in C++, you can get derivatives for "free" by just using operator overloading and a templated distance estimation formula.

Quote
The formula relies on the so called Hubbard Douady potential. See for instance  http://iquilezles.org/www/articles/distancefractals/distancefractals.htm .

I've looked at this and a few other pages - but none gave a clear explanation of how the formulas are derived. Perhaps I'm missing something. I found the same as you - 0.5 works in most cases (presumably because it is a lower bound). I was hoping that there was a more precise lower bound available that could let me take larger steps.


Title: Re: True 3D mandelbrot type fractal
Post by: fpsunflower on November 13, 2009, 10:35:12 AM
Quote
You can easily write a trig-free iteration formula for arbitrary powers...
Great! Could you give an example?

The exact sequence will depend on which parametrization of the sphere you are using. In my case:
Code:
        // given a triplex: (x,y,z)
        R = sqrt(x * x + y * y + z * z);
        sinph = z / R;
        cosph = sqrt(1 - sinph * sinph);
        costh = x / sqrt(x*x+y*y);
        sinth = y / sqrt(x*x+y*y);

Using this representation you can easily multiply two numbers using the formulas for cos(a+b) and sin(a+b):
Code:
        // new = a * b
        new_R = a_R * b_R;
        new_sinph = a_sinph * b_cosph + a_cosph * b_sinph;
        new_cosph = a_cosph * b_cosph - a_sinph * b_sinph;
        new_costh = a_costh * b_costh - a_sinth * b_sinth;
        new_sinth = a_sinth * b_costh + a_costh * b_sinth;

From this, you can define pow by repeated multiplication (in log(n) steps, by repeated squaring). Since in the ADE you use:
Code:
        dZ = p*Z^(p-1)*dZ + 1
        Z  = Z^p + c
You can just compute Z^(p-1), then get Z^p = Z * Z^(p-1).

To rebuild the value in cartesian form (so that you can do additions), just recombine the values:
Code:
        x = nr * ncosph * ncosth;
        y = nr * ncosph * nsinth;
        z = nr * nsinph;

Note: I picked this form because it makes the triplex "one" = (1,0,0) instead of (0,0,1) which you get when you have z=r*cos. It also means the complex (2d) mandelbrot lies on the xy plane (z=0). But you can do the same math for whatever flavor you like best.


I will leave negative powers as an exercise to the reader ;)


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 13, 2009, 10:46:27 AM
hi fpsunflower,

Quote
Code:
return 0.5f * R * (float) Math.log(R) / dR;

Is the leading term 0.5 for all powers? Is the log supposed to be the natural log or the log in some other base? Does anyone have the reference to the explanation of how this formula actually works?

The log is the natural logarithm (base e¡2.71...), yes.

The formula comes, more or less, from this sequence of steps: (assume we have the regular quadratic case)

1. We first construct a uniformization function ph(c) (also known as Bottcher coordinates) with will map the exterior od the M set to the unit circle. It's like a deformation function, a smooth deformation in fact (with no wholes or spikes, or as mathematicians call it, a holomorphica map). Since z->z^2 + c and as z grows c has less importance, in the limit (far from the origin) z->z^2. So the uniformization map is:

phi(c) = Zn ^ (1/2^n)

where n is the number of iterations (ideally infinite). Far from the origin the map is almost identity. You can see a picture of phi(c) in the first image here: http://iquilezles.org/trastero/fieldlines/ (http://iquilezles.org/trastero/fieldlines/)

2. The Hubbard-Douady potential is the next idea. It's defined as G(c) = log(phi(c)) with natural logarithm. This function is useful for demonstrating the connecteness of the M set (and is related to the theory of external rays).

G(c) = log |phi(c)| = log( Zn ^ (1/2^n) ).

You can think of G as a magneitc filed emanating from the M set, but increasing as you move away from it. It is zero inside M. As we said pchi(c) = c when far from M, so G = log|c| as you move away from M. You can see how it looks here: http://iquilezles.org/trastero/potential (http://iquilezles.org/trastero/potential).

G = log|Zn^(1/2^n))| = log |Zn| / 2^n

As with any scalar field, you can compute the gradient of it, or in other words, the maximun slope of the field, if it was interpreted as a terrain. The gradient is related to the derivatives, so you must know how to take derivatives of logarithms. Basically,

grad(G) = |dZn| / (|Zn| * 2^n)

Now, you can approximate a smooth function with a linear version of it (a first order Taylor series) with the gradient (first ortder derivative), like you can say that G(C+eps) = G(C) + eps·|grad(G)|. If we take C inside the M set and we want to compute the distance to it in a close point (C+eps), we can isolate eps int he previous formula and get

eps = distance to M = (G(C+eps)-G(C) )/grad(G(C)). But G(C) is zero because it is inside M, so  distance = G/drad(G).  Replacing now G and grad G with what we got before, and canceling out the 2^n terms, we get:

dist = |Z|·log |Z| / |dZ|

Now, I'm missing the 2 factor, and I'm not sure why. In fact, apparently the real formula is dist = 2·|Z|·log |Z| / |dZ| and then by something called the "Koebe 1/4 theorem" we know the distance must be not more than a quarted of the previous quantity, so:

dist >= 0.5 · |Z|·log |Z| / |dZ|

Apparently the 1/4 factor holds for 3D too. The 2 that I'm missing in the numerator factor Im not sure where it comes from, probably from one of those 2^n thingies, so I would say it is related to the power of the M set indeed. In that case, the distance estimator would be

DE = (power/4) · |Z|·log |Z| / |dZ|

but Im not sure. Perhapse somebody here can confirm?


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 13, 2009, 01:15:37 PM
Quote
Dual numbers are explained here: http://en.wikipedia.org/wiki/Automatic_differentiation#Automatic_differentiation_using_dual_numbers

If your code is written in C++, you can get derivatives for "free" by just using operator overloading and a templated distance estimation formula.

Thanks, I read the Wikipedia article, but I still do not see how this gives us the normal vector in a point, "for free".


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 13, 2009, 01:53:38 PM
Wow, I'm away for a couple of days, and then I miss all this!

Welcome, Daniel, Iñigo, Aexion and fpsunflower. Some cracking images from you guys, I particularly enjoyed the metallic brot render by fpsunflower, and the two images by Aexion. Iñigo, 15 minutes is fast for that, gotta make an animation!

Aexion, you've got to one of my fave fractal artists ever - I love your recent "The Hexahedral Puzzle" - it has a lovely Aztec feel about it. Still think your Sunset Castle (and Return thereof) is awesome.

Paul, wow you did powers 4-8 - that must've taken a while. Look forward to doing some speed comparisons with that along with the other techniques here...

Quote
I saw also your the newest Elevated 4kIntro

Hey, I saw that too a while back - very cool!

Bib, I'm not sure what to make of that latest blue image - maybe render a different angle and zoom in. It could be very cool...


Title: Re: True 3D mandelbrot type fractal
Post by: Daniel_P on November 13, 2009, 02:30:28 PM
So, have New Scientist, Scientific American, etc been in touch yet?

I'm guessing we might see some of these images on more than a few magazine covers in the near future.


Title: Re: True 3D mandelbrot type fractal
Post by: cKleinhuis on November 13, 2009, 03:04:56 PM
@daniel_p i think there should be at least one scientific description of what we they are doing here, it would be a pleasure
for me to collect all the informations we have here, but it would take at least 2 or 3 monthes ( hello bachelor thesis, actually i am trying to find someone who would find that interesting )

cheers  O0 :angel1: :police: :sad1:


Title: Re: True 3D mandelbrot type fractal
Post by: fpsunflower on November 13, 2009, 05:05:25 PM
Thanks, I read the Wikipedia article, but I still do not see how this gives us the normal vector in a point, "for free".

Another good explanation that describes duals in more concrete coding terms: http://homepage.mac.com/sigfpe/paper.pdf

Not quite "free", of course you need to implement your dual number class and define add, mult, sqrt, log, div, etc ...



iq: thanks for that explanation, but I also got a bit lost in those final steps about the exact leading term.


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 13, 2009, 05:14:28 PM

Bib, I'm not sure what to make of that latest blue image - maybe render a different angle and zoom in. It could be very cool...

I try to. But navigating using the parameters variations instead of "natural" 2D zooming in UF is quite tough.

I know there is nothing revolutionnary in the images I post in this thread compared to all the ground-breaking innovations we can see here, but it's just to show that zooming into 3D fractals that look like whipped cream at first sight can reveal interesting spirals and so on...


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 13, 2009, 10:43:53 PM
The formula comes, more or less, from this sequence of steps: (assume we have the regular quadratic case)
<snip>

That's interesting, I tried my own derivation of a DE formula and got it working based on the distance to the next iteration boundary.
Unfortunately I did it on scrap paper, tried several renders based on a version where the next iteration boundary was when the final magnitude on the bailout iteration became (actual final magnitude)^(1/n) where n is the divergence then realised a better method would be to actually use the smooth iteration value instead and base it on when the smooth iteration value increases by 1 :)
Anyway it worked and when I derived the smooth iteration version I basically arrived at the normal DE formula.
All I have left of my derivations is this note on a scrap of paper I had left:

"Iteratively solve the Newton for lambda where lambda is the distance aliong the ray for intersection with the bailout sphere."

i.e. iterate both the main formula and the Newton at the same time.

Here's what I got when I used the final magnitude derivation on a Quaternion:

http://makinmagic.deviantart.com/art/Improved-Quat-Minibrot-127157826

(see the comments)




Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 13, 2009, 11:37:41 PM
Just a note to anyone reading the thread who may be unfamilier with |z| as used in standard maths notation and/or as used in Fractint and Ultra Fractal.

If z is complex as (x+iy) then in standard maths notation |z| = sqrt(x^2 + y^2)

BUT in Ultra Fractal and Fractint then |z| = x^2 + y^2 and cabs(z) is used as sqrt(x^2 + y^2) (cabs for complex absolute).

I was prompted to mention this after IQ's query regarding the correct scaling of the DE value, I also couldn't work out how "0.5" was arrived at. In UF and Fractint:

0.5*log(|z|) is equivalent to log(|z|) in standard math notation :)

And at one point I considered that maybe the 0.5 came from mistranslations between fractal program and standard math notations.

But I don't think the 0.5 comes from that, I think it really comes from the fact that the value calculated is only an *estimate* and the 0.5 is simply used to avoid cases where the estimate is larger than the true distance - but that's just my opinion :)
In fact the DE value I use for the Normals is assumed to be correct without the "0.5", I do however multiply the DE value by 0.5 before using the value as a step distance during ray stepping.
Also I should mention that (based on how I had to scale the DE values used to compute the normals to get correct lighting) I found (experimentally) that the visibly correct (Ultra Fractal) final DE calculation was:

            dist = 0.5*sqrt(@mpwr-1.0)*log(magn)*sqrt(magn/|dzri|)

for a Julibrot where @mpwr is the power in z^power+c, magn is |final z| (i.e. x^2+y^2) and dzri is the final derivative value.
However looking at IQ's derivation I suspect that:

            dist = 0.25*@mpwr*log(magn)*sqrt(magn/|dzri|)

May be more accurate :) Edit: Just tried it and it doesn't seem to be better, in fact it definitely overestimates at higher powers - I not only got gradually darker and darker shading but started getting gross overstepping as well when the method using sqrt(@mpwr-1) still worked fine.
Just to add I actually checked it on quaternions and the White/Nylander.



Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 14, 2009, 05:11:39 AM
I thoroughly double checked my non-trigonometric formulas again, and I found that the formula for {x,y,z}^4 had a minus sign error. But all the other formulas came out correct. I went back and made the correction to the original post here:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8426/#msg8426


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 14, 2009, 05:30:21 AM
I thoroughly double checked my non-trigonometric formulas again, and I found that the formula for {x,y,z}^4 had a minus sign error. But all the other formulas came out correct. I went back and made the correction to the original post here:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8426/#msg8426

I'm not sure what went wrong with the z^3+c when I tried it (or the other higher powers where you use abs and sign) maybe I'm missing something obvious.
Anyway the formula I quoted here http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8475/#msg8475 can be expanded to use reals for a given power and then optimised - that formula definitely exactly matches the trig version (at least for integer powers from 2 to 60, I haven't checked fractional or negative powers).


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 14, 2009, 06:29:29 AM
Hi all,

I just updated the WIP3D formula, new link:

http://www.fractalgallery.co.uk/MMFWip3D.zip (http://www.fractalgallery.co.uk/MMFWip3D.zip)

Again unzip, copy all the text and paste into an open UF fractal window (also requires UF5).
This time the UPR is an example render of Pickover stalks (orbit trap) - note that "auto distances" is disabled and the solid threshold is much larger than used for solid on iteration/distance estimate.
Several more options in the formula plus some bugfixes in the analytical distance estimate methods.
This is actually named as a different formula so as not to cause compatibility issues with any renders you've already done :)


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 14, 2009, 11:58:58 AM
Here is a very simple general procedure to obtain sin(p.a) and cos(p.a) if you know the value for sin(a) and cos(a) :

Let S=sin(a) and C=cos(a) and make a complex number z=S+iC, and put z1=z

Do z1=z1.z,   now real(z1)=cos(2a) and imag(z1)=sin(2a)  (z1=C^2-S^2 +i.2.S.C)

Do again z1=z1.z now real(z1)=cos(3a) and imag(z1)=sin(3a)

(because (sin(2a)+i.cos(2a))(sin(a)+i.cos(a) gives as real part sin(2a)cos(a)+cos(2a)sin(a)=sin(3a) and as imaginary part cos(2a)cos(a)-sin(2a)sin(a)=cos(3a) )

...
..(the (p-1)-th time)  real(z1)=cos(pa) and imag(z1)=sin(pa)

So no need for very long complicated formulas if you want do to a non-trig p-th power...
The drawback is that you need sin(a) and cos(a) which involves a square root.

For even powers this can be adapted so that you only need (sin(a))^2 and (cos(a))^2, which does away with the square root. However, when using a distance estimate based on the derivative, one always needs also the value for sin((p-1)a) and cos((p-1)a), so getting a value for sin(a) and cos(a) cannot be avoided then.

Also, if you want to do powers<1, it is no good of course.


Title: Re: True 3D mandelbrot type fractal
Post by: Aexion on November 14, 2009, 06:20:56 PM
Wow, I'm away for a couple of days, and then I miss all this!

Aexion, you've got to one of my fave fractal artists ever - I love your recent "The Hexahedral Puzzle" - it has a lovely Aztec feel about it. Still think your Sunset Castle (and Return thereof) is awesome.


Thanks a lot Twinbee!!  :)
It's nice to be here, and BTW, your renders are absolutely amazing!


Title: Re: True 3D mandelbrot type fractal
Post by: ker2x on November 14, 2009, 06:53:49 PM
Hi all,

I just updated the WIP3D formula, new link:

http://www.fractalgallery.co.uk/MMFWip3D.zip (http://www.fractalgallery.co.uk/MMFWip3D.zip)

Again unzip, copy all the text and paste into an open UF fractal window (also requires UF5).
This time the UPR is an example render of Pickover stalks (orbit trap) - note that "auto distances" is disabled and the solid threshold is much larger than used for solid on iteration/distance estimate.
Several more options in the formula plus some bugfixes in the analytical distance estimate methods.
This is actually named as a different formula so as not to cause compatibility issues with any renders you've already done :)


Hi ! Thank you for sharing this.
I'm playing with incendia (which is awesome) since yesterday.

And with UF5 (demo ^^) and your formula.
Sadly, not good enough to understand the math behind (*sigh*) i just click here and there and found that i could do some interestring rendering with the "Truly 3D Mandelbrot". i don't know how "true" is my rendering and how it could be even close to anything related to a mandelbrot fractal but... it's nice.

I've seen the pic of "3D Mandelbrot" seen from the inside... it's truely awesome. But it look like most of 3D Mandelbrot rendering are done with custom renderer and not distributed at all... am i correct ?

Thx again !!

PS about the image below. "Truely 3D mandelbrot" after randomly playing with parameters

Edit : i finally found how to adjust parameters to have a 3D Mandelbrot, adjust accuracy and detail.
It is, mostly, all about "Solid Thresold" to be able to dive into details :)


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 14, 2009, 08:55:46 PM
Some vids based on the old M-true3D formula. Nice to watch but quite disappointing indeed :(
Watch the first one til the end you'll recognize the 2D M-set shape.
In the second one I tried to use some rotation to enhance the 3D impression
http://www.youtube.com/watch?v=mIbDAunza6Q http://www.youtube.com/watch?v=uDUWEBAk8Ys


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 14, 2009, 11:11:04 PM
On the question which factor should precede the analytical distance estimate formula :

is it
Quote
dist = 0.5*sqrt(@mpwr-1.0)*log(magn)*sqrt(magn/|dzri|)
or
Quote
dist = 0.25*@mpwr*log(magn)*sqrt(magn/|dzri|)
?

Let's change notation first : for the spherical case for any power I use DE=log(R)*sqrt(R)/(dR)/2, where dR is the derivative. So my factor is just 0.5.

To test how accurate this is, I took a Julia with seed (0,0,0) which produces a sphere of radius 1, so we now know the real distance for any point on a ray.

I'm printing the results below for a point progressing from a distance 2 from the surface of the sphere. The first column is the number of iterations, the second is the calculated DE, and the third is the real distance. As the point is still "far" away, and the number of iterations to reach bailout is low, then DE is exaggerated. (that's why an extra factor to temper DE is always needed). However, as the point gets closer, DE becomes very accurate.
The numbers are from a power 8 Julia, but I see almost exactly the same numbers for a degree 2.

power=8
start
         DE                        real distance
1 , 3.29583686625158 , 1.99999999999248
1 , 0.407849058786746 , 0.352081566866694
2 , 0.158627173103063 , 0.148157037473318
2 , 0.0711605799066145 , 0.0688434509217899
2 , 0.033810346387068 , 0.033263160968481
3 , 0.01649105643562 , 0.0163579877749456
3 , 0.00814527732540994 , 0.00811245955713247
3 , 0.00404797039654616 , 0.00403982089442678
4 , 0.00201786652103339 , 0.00201583569615593
4 , 0.00100740958383335 , 0.00100690243564117
4 , 0.000503324618422875 , 0.000503197643723752
5 , 0.000251567358870418 , 0.000251535334513164
5 , 0.000125759953482483 , 0.000125751655076556
5 , 6.28740467193265E-005 , 6.28716783381833E-005


Title: Re: True 3D mandelbrot type fractal
Post by: Buddhi on November 15, 2009, 04:59:28 PM
Hi
I'm still fighting with some kind of volumetric rendering. Now it's not fixed grid. Step depends on iteration count, perspective factor (bigger step in bigger distances). Additionally for improve performance and quality I use binary searching algorithm. I think it's quite enough for this kind rendering.
Generally I have lot's of trouble to render that deep perspective view, because for acceptable performance I have to add lots of factors to each shading algorithm. Details in background are 1000 times bigger than in foreground. For the farthest elements quality of shaders are much less accurate. I made the same for more transparent details. Without this optimisation this fractal will be rendered approximately in one month. Now it is possible in 8 hours with global illumination.

Render parameters:
resolution: 1280x1280
camera target: {-1.7844592849042, 0, 0}
zoom: 10000x
max. number of iterations: 80
fog range: between 65 and 80 iteration

(http://www.fractalforums.com/gallery/1/640_15_11_09_4_43_39.jpg)
http://www.fractalforums.com/gallery/?sa=view;id=1058


Title: Re: True 3D mandelbrot type fractal
Post by: ker2x on November 15, 2009, 06:08:14 PM
hooo fluffy \o/


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 16, 2009, 03:29:46 AM
if anybody is interested, this is the full polynomial replacement for Z->Z^8+C, simplified (still one inverse square root, but that's much faster than a square root)

Code:
// Z=(x,y,z), C=(a,b,c)

float x2 = x*x; float x4 = x2*x2;
float y2 = y*y; float y4 = y2*y2;
float z2 = z*z; float z4 = z2*z2;

float k3 = x2 + z2;
float k2 = inversesqrt( k3*k3*k3*k3*k3*k3*k3 );
float k1 = x4 + y4 + z4 - 6.0*y2*z2 - 6.0*x2*y2 + 2.0*z2*x2;
float k4 = x2 - y2 + z2;

x = a +  64.0*x*y*z*(x2-z2)*k4*(x4-6.0*x2*z2+z4)*k1*k2;
y = b + -16.0*y2*k3*k4*k4 + k1*k1;
z = c +  -8.0*y*k4*(x4*x4 - 28.0*x4*x2*z2 + 70.0*x4*z4 - 28.0*x2*z2*z4 + z4*z4)*k1*k2;


Title: Re: True 3D mandelbrot type fractal
Post by: lycium on November 16, 2009, 03:41:00 AM
thanks for this iñigo! and aexion, interesting to see you here too...

btw, this article has been featured not only on reddit but now also slashdot... twinbee's poor webserver is getting completely crushed under all the traffic, but it looks like fractalforums is (mostly) holding up  O0


Title: Re: True 3D mandelbrot type fractal
Post by: cKleinhuis on November 16, 2009, 11:48:16 AM
i just checked some traffic stats, it is not as much ... just 4 times more than on usual days ...

hope it will stay like this, traffic problems shouldnt occur, because of unlimited data transfer :)
last time google featured gaston julias birthday a few gigabytes were sucked through the lines in a few hours ( back in 2006 i think )

but 270 guests dont seem to be only bots ;)

yeah, congratulations all contributors this thread is going to be really really long ....

just nice to get mentioned ... me as "only" the site owner is very happy ...  ;) ^-^ :) ;D :D


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 16, 2009, 12:11:09 PM
Hi, I added some distance estimation to the raymarcher based on the G/|grad(G)|, which is the very basic definition of DE, so I have no confusion possible with unkown constant factors. It works fine, but it's still "slow" cause I compute the gard(G) numerically, but since I have the polynomials for the iterations I will be able to compute it analycally tomorrow. I have extracted the Jacobian already, which is a bit of a monster. The normal to the surface is simply n = J * z (a vector transformation), so I will have analytical normals too. In the meanwhile I think I should try David-Makin´s way of DE, which only uses 2 points (mine uses 4).

In the meanwhile, I made a little nice trick with orbit traps, to add color and occlusions for free. The following image (reduced from 1280x720) takes around 2 seconds to render. I expect to have it realtime soon (I'm rendering a video tonight with motion blur, it should be ready by tomorrow)

(http://iquilezles.org/trastero/f8p2.jpg)
http://iquilezles.org/trastero/f8p2.jpg (http://iquilezles.org/trastero/f8p2.jpg)

There seem to be some ambient occlusion in there, but there isn't. The trick is to use an orbit traps to fake it. Like in the 2D case, you can define a 3D geometric trap and track the orbit of Z relative to this trap. I used a simple point trap in the origin and use it´s distance to extract a fake occlusion term. It looks like thisÑ

(http://iquilezles.org/trastero/f8p3.jpg)
http://iquilezles.org/trastero/f8p3.jpg (http://iquilezles.org/trastero/f8p3.jpg)

There is no global illumination, or raycasting of the hemisphere nor a shadow ray in it or anything. So for those with "simple" raytracers that cann´t do/afford GI, this is a nice trick to increase realism (if that´s your goal at all).

I used three more line traps to add coloring to the surface, which is nicer that doing simple color=position or color=perlinnoise(position), as the orbit trap patterns naturally follow the shape of the fractal, so the features in the structure get colored in a logical manner.

I don´t know how much the analytic gradient(G) will help, but it should in theory be a x3 gain. Will continue to inform.

In the meanwhile, I was having some thoughts. The polynomial version of formulas really highlight how "asymmetric" the formulas are. I wonder if the holly grail of the true 3d M-Set shouldn´t have a bit more even formulas for x,y,z... Not completely symmetric, but at least something more reasonable?

JosLeys, so in the end which of the formulas is the correct one for DE?


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 16, 2009, 12:18:12 PM
The following image (reduced from 1280x720) takes around 2 seconds to render. I expect to have it realtime soon (I'm rendering a video tonight with motion blur, it should be ready by tomorrow)

2 seconds, waaaooo!


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 16, 2009, 12:28:04 PM
another image I took before launching the video render:

(http://www.iquilezles.org/trastero/f8p4.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 16, 2009, 12:37:22 PM
I thought mine was fast, but 2 seconds!!! Right, I see you're from the year 2050 then? ;)

Lycium's right - my server was dying (10k hits per hour), but I managed to get a lot of the content over to Amazon S3 - a great solution for bandwidth at commodity prices. This thread is linked from Slashot too. Surprised to hear only 4x as many visitors (Trifox, you must get 2500 per hour ordinarily ;) )

Congrats all :D


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 16, 2009, 12:42:44 PM
Quote
I thought mine was fast, but 2 seconds!!! Right, I see you're from the year 2050 then?

no, no, not at all, I wish I did something special to take credit for that speed, but it´s not the case. It's simply that GPUs happen to be super fast today, so even when directly progamming the brute force thing in opengl it just runs fast.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 16, 2009, 12:46:56 PM
The following image (reduced from 1280x720) takes around 2 seconds to render. I expect to have it realtime soon (I'm rendering a video tonight with motion blur, it should be ready by tomorrow)

I both hope and assume that's 2 seconds using the GPU ?
Can anyone please send me £2000 so I can get a new system ? (this P4HT is a dinosaur - only an ATI X600 too) :D


Title: Re: True 3D mandelbrot type fractal
Post by: cKleinhuis on November 16, 2009, 12:49:18 PM
Lycium's right - my server was dying (10k hits per hour), but I managed to get a lot of the content over to Amazon S3 - a great solution for bandwidth at commodity prices. This thread is linked from Slashot too. Surprised to hear only 4x as many visitors (Trifox, you must get 2500 per hour ordinarily ;) )
Congrats all :D

to be true, i am lazy and just checked the forum stats, it has an enormous count of online users for today: more than 1000.
i will check server logs tonight to give extra information ( in the fractalforums.com news thread )

enjoying it, and i have to agree with iq and twinbee that the "smearing" looks a bit odd at the renderings, but on the other hand they look for me like a hint.
so, it occurs that ~80% of the formula might be like we expect, but on the radial sections around some degrees ( could be 4 disconnected sections ) where the smearing
occurs it is somehow "not correct" but i am optimistic, because it is only a little part of the formula which might be changed to get fractal borders anywhere on
the object. in fact this object is constructed from "fractal" and "euclidian" regions ....

dup dee dup, keep it on ! enjoy this thread more from day to day!  O0 O0 O0


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 16, 2009, 12:51:10 PM
iq, how general is your GPU for programming? Can you use double types, and do all the mathematical things you want? I'm guessing the code is harder to maintain when it's threaded as well?

But, wow, so worth it for the speed...

Quote
Can anyone please send me £2000 so I can get a new system ?

Quadcores are pretty cheap - you'll love the multitasking too, though try to get 4GB of RAM too if poss - makes all the difference. I'll be upgrading to 64 bit Windows 7 so I can handle resolutions larger than 7000x7000 (yum :D )


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 16, 2009, 12:54:52 PM
<snip>
In the meanwhile I think I should try David-Makin´s way of DE, which only uses 2 points (mine uses 4).
<snip>
JosLeys, so in the end which of the formulas is the correct one for DE?

The key part of my delta DE is the storing/testing of the maxdist values at a given iteration for a given ray, for each new step distance calculated I use:

              if j<=miter
                if step<dists[j]
                  repeat
                    dists[j] = step
                    j = j + 1
                  until step>=dists[j] || j>miter
                  if j>miter
                    mdist = step
                  endif
                else
                  step = dists[j]
                endif
              else;if j>miter
                miter = miter + 1
                if step>mdist
                  step = mdist
                endif
                while miter<j
                  dists[(miter=miter+1)] = mdist
                endwhile
                dists[j] = step
              endif

Where mdist is the absolute minimum found on the ray and miter is the maximum iterations used on the ray.

With respect to the scale factor for DE I'm just about to do some testing - I think I have an older version of my formula that calculates in the global section so I can check values the way Jos did but for an entire render by setting the threshold very small indeed and assuming the final value is "correct", this should give a good idea whether values at 100* greater distance are accurate or not.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 16, 2009, 12:58:55 PM
iq, how general is your GPU for programming? Can you use double types, and do all the mathematical things you want? I'm guessing the code is harder to maintain when it's threaded as well?

But, wow, so worth it for the speed...

Quote
Can anyone please send me £2000 so I can get a new system ?

Quadcores are pretty cheap - you'll love the multitasking too, though try to get 4GB of RAM too if poss - makes all the difference. I'll be upgrading to 64 bit Windows 7 so I can handle resolutions larger than 7000x7000.

Due to my "day-job" it only really makes sense for me to upgrade to a Mac Pro so I can work from home (we develop for the iPhone/iTouch) and getting a fast one too makes it rather expensive :(


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 16, 2009, 02:10:42 PM
Hi,
I have already posted this video in another thread, but I put it here as well just to increase number of hits.
140 hits on Youtube since I posted it this morning, it's incredible!
Although I know it will be outperformed very soon by iq's videos :)
http://www.youtube.com/watch?v=LxsniUIVfEM


Title: Re: True 3D mandelbrot... CAD file output?
Post by: guytron on November 16, 2009, 07:47:37 PM
I'm interested to know if this 3D fractal figure could be output as a CAD file like a .dxf, .stl or .aoi format? 

& would anyone share the complete code for this with me? I could write the file format output part myself if I had that.

What I would like to do is have one of these rendered as a an actual object by laser sintering, fdm, cnc or some similar method.

It'd look really cool in brass or cut from silicon


Title: Re: True 3D mandelbrot... CAD file output?
Post by: David Makin on November 16, 2009, 09:20:48 PM
I'm interested to know if this 3D fractal figure could be output as a CAD file like a .dxf, .stl or .aoi format? 

& would anyone share the complete code for this with me? I could write the file format output part myself if I had that.

What I would like to do is have one of these rendered as a an actual object by laser sintering, fdm, cnc or some similar method.

It'd look really cool in brass or cut from silicon

See:

http://www.fractalforums.com/3d-fractal-generation/finding-the-edges/msg8626/#msg8626 (http://www.fractalforums.com/3d-fractal-generation/finding-the-edges/msg8626/#msg8626)



Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 16, 2009, 09:30:58 PM
<snip>
In the meanwhile I think I should try David-Makin´s way of DE, which only uses 2 points (mine uses 4).
<snip>
JosLeys, so in the end which of the formulas is the correct one for DE?

The key part of my delta DE is the storing/testing of the maxdist values at a given iteration for a given ray, for each new step distance calculated I use:

              if j<=miter
                if step<dists[j]
                  repeat
                    dists[j] = step
                    j = j + 1
                  until step>=dists[j] || j>miter
                  if j>miter
                    mdist = step
                  endif
                else
                  step = dists[j]
                endif
              else;if j>miter
                miter = miter + 1
                if step>mdist
                  step = mdist
                endif
                while miter<j
                  dists[(miter=miter+1)] = mdist
                endwhile
                dists[j] = step
              endif

Where mdist is the absolute minimum found on the ray and miter is the maximum iterations used on the ray.

With respect to the scale factor for DE I'm just about to do some testing - I think I have an older version of my formula that calculates in the global section so I can check values the way Jos did but for an entire render by setting the threshold very small indeed and assuming the final value is "correct", this should give a good idea whether values at 100* greater distance are accurate or not.


Note that using a maxdist array in this manner also cures the problem of singularities in the derivative (where it's zero or near zero) when using the analytical DE - such problems occur especially on Julia Sets.


Title: Re: True 3D mandelbrot... CAD file output?
Post by: bugman on November 16, 2009, 09:41:37 PM
I'm interested to know if this 3D fractal figure could be output as a CAD file like a .dxf, .stl or .aoi format? 

& would anyone share the complete code for this with me? I could write the file format output part myself if I had that.

What I would like to do is have one of these rendered as a an actual object by laser sintering, fdm, cnc or some similar method.

It'd look really cool in brass or cut from silicon

Yes. That would be neat. I also have a contact who has offered to create a rapid prototype of this for me. I don't think triangle formats would be very practical for this, but I think voxel data would be practical.

Also, a laser etched crystal could be created from a point cloud, which could be calculated using inverse methods if you are creating a 3D Julia set. For example, look at this beautiful one by Bathsheba Grossman:
http://www.bathsheba.com/crystal/julia/

She explains the process here:
http://www.bathsheba.com/crystal/process/


Title: Re: True 3D mandelbrot type fractal
Post by: lycium on November 16, 2009, 10:35:38 PM
Can anyone please send me £2000 so I can get a new system ? (this P4HT is a dinosaur - only an ATI X600 too) :D
i really don't want to take this offtopic thread here, but hopefully someone else can convince you that buying a dual-processor system is going to cause more money problems than it solves computing problems. why is it overpriced dual processor apple or bust?


anyway back on topic, those are really cool renders iq! i especially like the neat shading trick, hope to give that a try soon. i've also started work on a gpu implementation, though i doubt my crusty old 8800 gts will get 2 seconds per frame at that resolution. do you think it's the DE that's giving that kind of performance? my theory is that the DE regularises the computation, so neighbouring pixels will have less branch divergence.

right now i'm fighting with the watchdog timer on windows 7, which is resetting my display driver after 2 seconds of computation *grumblegrumblegrumble*


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 17, 2009, 01:44:02 AM
After Jos Leys tests using analytical DE on the zero seed Julia I thought I'd try investigation of analytical DE values on a quaternionic Mandelbrot.

I quickly found that indeed the "0.5" is correct which means that the actual DE values in my wip formula for Ultra Fractal are 2* bigger than they should be - though my step distances are OK since the default is the DE divided by two :) This of course results in a given DE threshold taking us to a point twice as close to "inside" as the specified threshold distance.

Here are the test results I did using the correctly scaled DE value.

These tests were carried out @640*480 with a magnification of 1.6 and a bailout of x^2+y^2>=1024.
Note that in the text below "worst" means "largest" rather than "most incorrect".

Quaternion z^2+c side view in parallel projection
DE Threshold 1e-6
Worst cases for entire fractal

"True" -> calculated

1.0 -> 0.828693280840216
0.1 -> 0.0756111410237615
0.01 -> 0.00826817743483479
1e-3 -> 0.00623750530621662
1e-4 -> 0.00616464060211196
1e-5 -> 0.00593556668345077

Quaternion z^2+c side view in parallel projection
DE Threshold 1e-6
Average cases for entire fractal

"True" -> calculated

1.0 -> 0.470217800965237
0.1 -> 0.0277512230487669
0.01 -> 0.0027385391736115
1e-3 -> 0.000537393167849202
1e-4 -> 0.000298006036418662
1e-5 -> 0.000183765097401958

Quaternion z^2+c pointed end view in parallel projection
DE Threshold 1e-6
Worst cases for entire fractal

"True" -> calculated

1.0 -> 0.97783685049528
0.1 -> 0.0971841767897501
0.01 -> 0.0099424008139091
1e-3 -> 0.00291127344517454
1e-4 -> 0.0028424928302291
1e-5 -> 0.00283555485322532

Quaternion z^2+c pointed end view in parallel projection
DE Threshold 1e-6
Average cases for entire fractal

"True" -> calculated

1.0 -> 0.268576868120558
0.1 -> 0.0330877709877468
0.01 -> 0.00333153377206449
1e-3 -> 0.000601747860965648
1e-4 -> 0.000318767428809674
1e-5 -> 0.000195952986975526

Quaternion z^2+c pointed end view in parallel projection
DE Threshold 1e-6
Values for the centre ray (i.e. hitting the point on the real axis)

"True" -> calculated

1.0 -> 0.97783685049528
0.1 -> 0.0971841767897501
0.01 -> 0.0099424008139091
1e-3 -> 0.000999129722927703
1e-4 -> 0.00010003123154646
1e-5 -> 9.99071625909761E-006

Quaternion z^2+c side view in parallel projection
DE Threshold 1e-16
Worst cases for entire fractal

"True" -> calculated

1.0 -> 0.828694191861107
0.1 -> 0.0756118350632922
0.01 -> 0.00826812262793161
1e-3 -> 0.00623734563239439
1e-4 -> 0.00616447654586974
1e-5 -> 0.00593548110247801
1e-6 -> 0.002967740551239
1e-7 -> 0.0014838702756195
1e-8 -> 0.000741935137809751
1e-9 -> 0.000370967568904876
1e-10 -> 0.000185483784452438
1e-11 -> 9.27418922262189E-005
1e-12 -> 4.63709461131094E-005

Quaternion z^2+c side view in parallel projection
DE Threshold 1e-16
Average cases for entire fractal

"True" -> calculated

1.0 -> 0.470218381043924
0.1 -> 0.0277514611184807
0.01 -> 0.00273875075822565
1e-3 -> 0.000537604762798528
1e-4 -> 0.000298158908926989
1e-5 -> 0.000185850698115385
1e-6 -> 9.97458957492159E-005
1e-7 -> 5.0596384017043E-005
1e-8 -> 2.53716863807056E-005
1e-9 -> 1.26919229340975E-005
1e-10 -> 6.34662886913257E-006
1e-11 -> 3.17331443456628E-006
1e-12 -> 1.58665721728314E-006

Quaternion z^2+c pointed end view in parallel projection
DE Threshold 1e-16
Worst cases for entire fractal

"True" -> calculated

1.0 -> 0.977836860473067
0.1 -> 0.097184186106234
0.01 -> 0.00994241047465512
1e-3 -> 0.00291124435480221
1e-4 -> 0.00284246358773596
1e-5 -> 0.00283552550759178
1e-6 -> 0.0019832407359585
1e-7 -> 0.00182386184009324
1e-8 -> 0.000911930920046621
1e-9 -> 0.000786028563546067
1e-10 -> 0.000786028308654553
1e-11 -> 0.00078602828316538
1e-12 -> 0.000786028280616523

Quaternion z^2+c pointed end view in parallel projection
DE Threshold 1e-16
Average cases for entire fractal

"True" -> calculated

1.0 -> 0.268571283431845
0.1 -> 0.0330876101698883
0.01 -> 0.00333120301202227
1e-3 -> 0.000602036669078832
1e-4 -> 0.000319200775195032
1e-5 -> 0.000198471399420637
1e-6 -> 0.000106430696869362
1e-7 -> 5.41934392969572E-005
1e-8 -> 2.71886867735502E-005
1e-9 -> 1.36275997817489E-005
1e-10 -> 6.84249791092663E-006
1e-11 -> 3.44994698460904E-006
1e-12 -> 1.75367152223619E-006

Quaternion z^2+c pointed end view in parallel projection
DE Threshold 1e-16
Values for the centre ray (i.e. hitting the point of the Mandy on the real axis)

"True" -> calculated

1.0 -> 0.977836860473067
0.1 -> 0.097184186106234
0.01 -> 0.00994241047465512
1e-3 -> 0.000999139471789839
1e-4 -> 0.000100040977667748
1e-5 -> 1.00004784004224E-005
1e-6 -> 1.00006323931994E-006
1e-7 -> 1.001088304125E-007
1e-8 -> 1.00620844487879E-008
1e-9 -> 1.0638804422352E-009
1e-10 -> 1.61612459695359E-010
1e-11 -> 7.17222631161621E-011
1e-12 -> 3.5861131558081E-011

I think the above shows that the problem of areas with small gradient causing erroneously high DE values is more prevalent than I previously thought even in a Mandelbrot :) As I've mentioned previously a potential cure for this is develop a DE algorithm that incorporates the second derivative in some way. For instance the way I derived the standard DE formula was based on using the Newton, a similar derivation could be made say using Householder's formula.

In the last set of figures I think the 1e-10, 1e-11 and 1e-12 results may be affected by the likelyhood that y and z in quaternionic (x,y,z,w) weren't exactly zero due to slight floating point errors in the 90 degree rotation - i.e. we didn't exactly hit the point.

I intend to redo these tests with say a degree 16 quaternion to see if the values confirm Jos Leys' suggestion that no scaling is required based on the power or to show if such scaling is necessary - and if necessary then to try and find what it should be.


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 17, 2009, 07:11:37 AM
interesting thoughts about the second derivative. For regular complex M-sets that should give these iteration rules:

ddz = p·(p-1)·z^(p-2)·dz² + p·z^(p-1)·ddz
dz = p·z^(p-1)·dz + 1
z = z^p + c

for p=2:

ddz = 2·dz² + 2·z·ddz
dz = 2·z·dz + 1
z = z² + c

I suppose for the first iteration z = 0, dz = 1, ddz = 0

The first Taylor expansion of G(c+eps) is G(c) + eps·G'(c) which leads to eps = distance = G/|G'| = the famous |z| · log|z| / |dz|

So the second order expansion should be something like G(c+eps) = G(c) + eps·G'(c) + eps²/2 · G''(c), so eps = distance = (solving the quadratic) =  (-|G'| ± sqrt( |G'|² - 2·|G''|·|G|))/|G''| I guess the solution we want is the one with the negative square root... As usual,

|G| = (1/2^n) · log |z|
|G'| = (1/2^n) · |dz| / |z|
|G''| = (1/2^n) · (|ddz|·|z|-|dz|²) / |z|²

which means that we have a huge monster:

k = |dz|² - |z|·|ddz|

distance = ( -|z|·|dz| ± sqrt(|dz|² - 2·k·log|z|) )/k

which is quite more complex that the first order distance estimator |z|·log|z|/|dz|  I might very well have made mistakes in this deductive process. Most likely with the signs...

I'm curious to see if it works, at least in the old-good-2d M-Set. Can somebody try?


Title: Re: True 3D mandelbrot type fractal
Post by: eternaleye on November 17, 2009, 07:29:49 AM
I find myself wondering if there could be a 'lazy' way to voxel-map this shape. Bear with me a sec while I figure this out.

Okay, so what you guys are doing now is creating a volume of x*y*z voxels, and iterating over those voxels checking whether there is or is not a portion of the shape in that voxel; am I correct?

If I am, there is a much more efficient way to plot it.

The trick is not to directly iterate over the voxels; rather, one subdivides the entire volume, ignoring sectors where no voxels contain parts of the shape, and recursing into sectors where some or all of the voxels _do_.

Let's say we had an 8x8x8 volume we're plotting it into.

First, we divide it into 8 4x4x4 volumes, and check whether any of these volumes is completely empty. This can be done identically to mapping the shape into a 2x2x2 volume. We then never visit such empty subvolumes again.

For each subvolume that _does_ contain part of the shape, we again split it and perform the same action. Any sub-subvolumes that are empty are discarded, and the voxels in non-empty sub-subvolumes are iterated over.

A somewhat inconvenient downside is the requirement of x==y==z && x == 2 ** n, where n is any integer.
A rather convenient upside is that, if one has exported the volumetric bitmap that results, it is trivial to import it and use it to double the (linear) resolution without recalculating the previous work.

Here's some rough C++ish pseudocode:

Code:
#include <queue>
// I'm going to assume that the function to check whether a voxel is occupied is called 'bool is_v_occ( int x, int y, int z, int size )',
// where 'size' is the length of each side of the volume the voxel is in.
// I will also assume that a 3d C++ vector of bool has already been allocated under the name 'volume'.

struct SectorSpec {
int stride, x, y, z;
SectorSpec( int str, int xnew, int ynew, int znew) {
stride = str;
x = xnew;
y = ynew;
z = znew;
}
}

void map_volume( SectorSpec* sector, Volume& vol, std::queue<SectorSpec*>& work ) {
if ( sector->stride == 1 ) {
// A sector is always 2x2x2 strides
for ( int x = sector->x; x < sector->x + 2; ++x ) {
for ( int y = sector->y; y < sector->y + 2; ++y ) {
for ( int z = sector->z; z < sector->z + 2; ++z ) {
vol[x][y][z] = is_v_occ( x, y, z, vol.size() );
}
}
}
} else {
int sz = vol.size() / sector->stride;
for ( int x = sector->x / sector->stride; x < ( sector->x / sector->stride ) + 2; ++x ) {
for ( int y = sector->y / sector->stride; y < ( sector->y / sector->stride ) + 2; ++y ) {
for ( int z = sector->z / sector->stride; z < ( sector->z / sector->stride ) + 2; ++z ) {
if( is_v_occ( x, y, z, sz ) ) {
SectorSpec* newsec = new SectorSpec(
sector->stride / 2,
x * sector->stride,
y * sector->stride,
z * sector->stride
);
work.push( newspec )
} else {
for ( int xinner = sector->x; x < sector->x + ( 2 * sector->stride ); ++x ) {
for ( int yinner = sector->y; y < sector->y + ( 2 * sector->stride ); ++y ) {
for ( int zinner = sector->z; z < sector->z + ( 2 * sector->stride ); ++z ) {
vol[xinner][yinner][zinner] = false;
}
}
}
}
}
}
}
}
}

int main() {
std::queue<SectorSpec*> sectors;
SectorSpec* seed = new SectorSpec( volume.size, 0, 0, 0 );
map_volume( seed, volume, sectors );
for ( SectorSpec* nextSec = sectors.pop(); !sectors.empty(); nextSec = sectors.pop() ) {
map_volume( nextSec, volume, sectors )
}
// volume now contains a 3d bitmap of occupied voxels. Congrats! Add your code here to do as you wish.
return( 0 );
}

EDIT: I just realized that the 'inconvenient downside' above only holds true for a naive implementation such as the one I have here. A more sophisticated implementation could eliminate that by some boundschecking and dimension-dependent stride values.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 17, 2009, 07:37:02 AM
I find myself wondering if there could be a 'lazy' way to voxel-map this shape. Bear with me a sec while I figure this out.

Okay, so what you guys are doing now is creating a volume of x*y*z voxels, and iterating over those voxels checking whether there is or is not a portion of the shape in that voxel; am I correct?

If I am, there is a much more efficient way to plot it.

The trick is not to directly iterate over the voxels; rather, one subdivides the entire volume, ignoring sectors where no voxels contain parts of the shape, and recursing into sectors where some or all of the voxels _do_.

Let's say we had an 8x8x8 volume we're plotting it into.

First, we divide it into 8 4x4x4 volumes, and check whether any of these volumes is completely empty. This can be done identically to mapping the shape into a 2x2x2 volume. We then never visit such empty subvolumes again.

For each subvolume that _does_ contain part of the shape, we again split it and perform the same action. Any sub-subvolumes that are empty are discarded, and the voxels in non-empty sub-subvolumes are iterated over.

A somewhat inconvenient downside is the requirement of x==y==z && x == 2 ** n, where n is any integer.
A rather convenient upside is that, if one has exported the volumetric bitmap that results, it is trivial to import it and use it to double the (linear) resolution without recalculating the previous work.

Here's some rough C++ish pseudocode:

Code:
#include <queue>
// I'm going to assume that the function to check whether a voxel is occupied is called 'bool is_v_occ( int x, int y, int z, int size )',
// where 'size' is the length of each side of the volume the voxel is in.
// I will also assume that a 3d C++ vector of bool has already been allocated under the name 'volume'.

struct SectorSpec {
int stride, x, y, z;
SectorSpec( int str, int xnew, int ynew, int znew) {
stride = str;
x = xnew;
y = ynew;
z = znew;
}
}

void map_volume( SectorSpec* sector, Volume& vol, std::queue<SectorSpec*>& work ) {
if ( sector->stride == 1 ) {
// A sector is always 2x2x2 strides
for ( int x = sector->x; x < sector->x + 2; ++x ) {
for ( int y = sector->y; y < sector->y + 2; ++y ) {
for ( int z = sector->z; z < sector->z + 2; ++z ) {
vol[x][y][z] = is_v_occ( x, y, z, vol.size() );
}
}
}
} else {
int sz = vol.size() / sector->stride;
for ( int x = sector->x / sector->stride; x < ( sector->x / sector->stride ) + 2; ++x ) {
for ( int y = sector->y / sector->stride; y < ( sector->y / sector->stride ) + 2; ++y ) {
for ( int z = sector->z / sector->stride; z < ( sector->z / sector->stride ) + 2; ++z ) {
if( is_v_occ( x, y, z, sz ) ) {
SectorSpec* newsec = new SectorSpec(
sector->stride / 2,
x * sector->stride,
y * sector->stride,
z * sector->stride
);
work.push( newspec )
} else {
for ( int xinner = sector->x; x < sector->x + ( 2 * sector->stride ); ++x ) {
for ( int yinner = sector->y; y < sector->y + ( 2 * sector->stride ); ++y ) {
for ( int zinner = sector->z; z < sector->z + ( 2 * sector->stride ); ++z ) {
vol[xinner][yinner][zinner] = false;
}
}
}
}
}
}
}
}
}

int main() {
std::queue<SectorSpec*> sectors;
SectorSpec* seed = new SectorSpec( volume.size, 0, 0, 0 );
map_volume( seed, volume, sectors );
for ( SectorSpec* nextSec = sectors.pop(); !sectors.empty(); nextSec = sectors.pop() ) {
map_volume( nextSec, volume, sectors )
}
// volume now contains a 3d bitmap of occupied voxels. Congrats! Add your code here to do as you wish.
return( 0 );
}

I know what you're saying and you're essentially correct, however applying such an algorithm to fractals is similar to optimisations you can make in 2D (e.g. "guessing" mode in UF) and tends to result in missed solid especially if the fractal is not connected, having said that I just realised that using analytical distance estimator for the "empty voxel" test woiuld probably largely avoid the problems.



Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 17, 2009, 07:41:19 AM
The technical name for what you are describing is "octree". I'm nos sure how many people are using voxels to do their renderings, tho, I though most are doing direct raymarching?

bib, very nice video! I like the zooming.

I have done a little video. Well, in fact I had to stop it in half rendering because after a few minutes my GPU was so hot that my computer started to show garbage pixels in the screen, and then it was all broken and unreadable!!! So I reimplemented the thing in the CPU and started over again. For 1280x720 I'm getting around 4 seconds rendering in the CPU, with a 8 core CPU (so it should be like half minute in a monocore).

Anyway, this is the half video I rendered. I will re-render it in the CPU (don't wanna risk my HW again, and I don't want to start putting Sleep() every few frames to let the GPU take some breath) and upload to the same place, so you can try the link again by tomorrow or so for the full video.

I personally think that just rotation around the set is not as interesting as zomming in as in bib's video. But well, it's a start.

www.iquilezles.org/trastero/f8p5.avi (http://www.iquilezles.org/trastero/f8p5.avi)



Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 17, 2009, 07:45:48 AM
interesting thoughts about the second derivative. For regular complex M-sets that should give these iteration rules:

ddz = p·(p-1)·z^(p-2)·dz² + p·z^(p-1)·ddz
dz = p·z^(p-1)·dz + 1
z = z^p + c

for p=2:

ddz = 2·dz² + 2·z·ddz
dz = 2·z·dz + 1
z = z² + c

I suppose for the first iteration z = 0, dz = 1, ddz = 0

The first Taylor expansion of G(c+eps) is G(c) + eps·G'(c) which leads to eps = distance = G/|G'| = the famous |z| · log|z| / |dz|

So the second order expansion should be something like G(c+eps) = G(c) + eps·G'(c) + eps²/2 · G''(c), so eps = distance = (solving the quadratic) =  (-|G'| ± sqrt( |G'|² - 2·|G''|·|G|))/|G''| I guess the solution we want is the one with the negative square root... As usual,

|G| = (1/2^n) · log |z|
|G'| = (1/2^n) · |dz| / |z|
|G''| = (1/2^n) · (|ddz|·|z|-|dz|²) / |z|²

which means that we have a huge monster:

k = |dz|² - |z|·|ddz|

distance = ( -|z|·|dz| ± sqrt(|dz|² - 2·k·log|z|) )/k

which is quite more complex that the first order distance estimator |z|·log|z|/|dz|  I might very well have made mistakes in this deductive process. Most likely with the signs...

I'm curious to see if it works, at least in the old-good-2d M-Set. Can somebody try?

Will try this evening...


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 17, 2009, 07:48:43 AM
fantastic David! I'm done with fractals for today I think, it's the turn of my CPUs to work now. As my last contribution of the day to the thread, I link to something funny I found out there:

(http://i38.tinypic.com/vqlcol.jpg)

Definitely humans are designed to find patterns.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 17, 2009, 07:55:45 AM
The technical name for what you are describing is "octree". I'm nos sure how many people are using voxels to do their renderings, tho, I though most are doing direct raymarching?

bib, very nice video! I like the zooming.

I have done a little video. Well, in fact I had to stop it in half rendering because after a few minutes my GPU was so hot that my computer started to show garbage pixels in the screen, and then it was all broken and unreadable!!! So I reimplemented the thing in the CPU and started over again. For 1280x720 I'm getting around 4 seconds rendering in the CPU, with a 8 core CPU (so it should be like half minute in a monocore).

Anyway, this is the half video I rendered. I will re-render it in the CPU (don't wanna risk my HW again, and I don't want to start putting Sleep() every few frames to let the GPU take some breath) and upload to the same place, so you can try the link again by tomorrow or so for the full video.

I personally think that just rotation around the set is not as interesting as zomming in as in bib's video. But well, it's a start.

www.iquilezles.org/trastero/f8p5.avi (http://www.iquilezles.org/trastero/f8p5.avi)




Excellent (though short) rotation anim !
As to using voxels I don't think anyone's tried it yet, I think other than raymarching the only other method tried was Buddhi who rendered many 2D slices producing full high resolution 3D data that could then be rendered quickly (to the given detail level) even with volumetric effects based on iteration values at any point.


Title: Re: True 3D mandelbrot type fractal
Post by: lycium on November 17, 2009, 07:58:28 AM
zomg, that's quite a remarkable resemblance!

i'm a little bit concerned about what you said with gpu overheating; which gpu are you using? i haven't left my gpu rendering for extended periods because i was running into the watchdog timer limit of 2 seconds, but i'm about to break the computation into smaller pieces so that i can do arbitrarily long renders... actually i'm not too worried about breaking my 8800 gts - looking for an excuse to replace it - but if it takes my other system components with it, that would suck :(


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 17, 2009, 08:13:18 AM
8600 gts here (a really low end gfx card) I think I should break the image into tiles too, otherwise I will have the same problem for huge posters like 100k x 100k pixels that will take 8 hours or so. Don't want kill my PC.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 17, 2009, 08:17:11 AM
Wow, it's all there - the eyes, nose, beard and hair!

Hi Jules, have you tried rendering large/raytraced images of the 3D set you found, and maybe higher powers too? If you know the boolean function (accepting x,y,z, and outputting true or false - i.e. in the set or not), it'd be interesting to see the output.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 17, 2009, 09:36:56 AM
I thought mine was fast, but 2 seconds!!! Right, I see you're from the year 2050 then? ;)

Lycium's right - my server was dying (10k hits per hour), but I managed to get a lot of the content over to Amazon S3 - a great solution for bandwidth at commodity prices. This thread is linked from Slashot too. Surprised to hear only 4x as many visitors (Trifox, you must get 2500 per hour ordinarily ;) )

Congrats all :D

I'm also getting a knock on effect - yesterday over 600 unique visitors, 2,113 page hits, 26,271 overall hits and a whopping 817MB of bandwidth used - I'm actually hoping it'll drop off a little otherwise I'll have to either remove at least the .mov files or fork out for some alternate space or a greater bandwidth limit (currently 15 GB/month).
Edit: Should have said my normal unique visitors per day (say last month) was around 40.



Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 17, 2009, 09:43:28 AM

www.iquilezles.org/trastero/f8p5.avi (http://www.iquilezles.org/trastero/f8p5.avi)


Excellent quality! :)
Why can't you install a special cooling system on your GPU?


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 17, 2009, 09:45:46 AM

Definitely humans are designed to find patterns.


lol

did you notice in my zoom that the shape in the last frame looks like an alien skull?


Title: Re: True 3D mandelbrot type fractal
Post by: cbuchner1 on November 17, 2009, 11:59:26 AM
Hi everbody.

I've been following this thread with great interest.

Let me bring to your attention that nVidia's Optix SDK (raytracing) has a "julia" sample where they apply the DE method to raytrace a Julia set. Frame rates are interactive on decent graphics chips. I believe it should be simple enough to modify this SDK sample to render a Mandelbulb instead. The maths is currently still a little over my head, but maybe someone of you wants to have a go at it.

Using this raytracing SDK has the nice advantage that implementing various surface properties (including reflection and refraction) is a breeze. Maybe one could even render the entire fractal transparently like a crystal (don't know if the DE method works for rays passing through the fractal though).

The Optix SDK is available free of charge (only filling in a short questionnaire is required before getting to the download) and they support are Windows and Linux in 32bit and 64 bit flavours - however nVidia do require Quadro FX or Tesla cards to run the code. This is an arbitrary limitation by nVidia and there are tools on the net to patch out that requirement. While it may not be legally sound to redistribute patched binaries, I think it's unproblematic to do some testing with it.

UPDATE: I stripped down that SDK sample to render nothing but the quaternion Julia set (the animated chrome ball is gone, so is the floor consisting of moving cubes).  I can now rotate the Julia set in a VGA sized window pretty much smoothly on a low-end GPU (nVidia GT220, I get 15-30 FPS). Let's hope it stays that way when I switch to the Mandelbulb. My next step would be to adapt the DE formula as given in this thread, but I am not sure if I can do that on my own.


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 17, 2009, 12:21:55 PM
Thanks Inigo for the tip on using an orbit trap to mimic ambient occlusion lighting.
Here is a power 7 in Ultrafractal. The orbit trap makes a big difference.
(http://www.josleys.com/gfx/4D_test_99.jpg)

Ultrafractal takes about two and a half minutes to produce this. I'm a bit less envious of the two-second GPU  versions now that I hear that they produce a fire hazard  :evil1:

I'm glad Dave volunteered to test the second derivative distance formula. It's a bit of a monster, and probably too expensive, but I wonder how it performs.


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 17, 2009, 12:45:35 PM
I'm also getting a knock on effect


Me too :)
Usually my videos on Youtube get less then 50 hits after a few weeks. But the 3D Mandelbrot Power 6 zoom got almost 2000 hits in 2 days!


Title: Re: True 3D mandelbrot type fractal
Post by: kram1032 on November 17, 2009, 04:14:02 PM
Hi :)
I talked to Twinbee about this on deviantart and he told me to come here, so here I am.
Hi lycium. :D

I had one idea for why the standard Mandelbrotset behaves that assymmetric in this 3D-Variant.
Most likely, that is, because it already does so in the 2D-Version.
Well, nearly.
In the 2D-Version, z²+c produces only mirror-symmetries and relative to the zero-point, inside the caridode, one could say, it features "single-axial radial symmetry"
z³+c features double mirror symmetries or "2-axial radial symmetry"
z4+c features 3-axial radial symmetry and so on

zn+c in general features an (n-1)-axial radial symmetry.

As things get twisted into higher dimensions, things with only one axis of symmetry start to look odd. they twist in a rather strange way and that happened to the z²+c-variant.

Though, I have a couple of ideas:
Right now, you basically use two totally unrelated angles and transform them in one and the same way to get your results.
What if you actually search for a relation between them?
One way to do this would be to interpret the two angles as complex unit vectors.

your formula for the angles then would be:

(r,theta,phi)n =
(rn,2*pi*cos(arg(z))*n,2*pi*sin(arg(z))*n)

Other relations could be thinkable... though I only can give an example which probably does not work directly.
http://www.wolframalpha.com/input/?i=sqrt%28%28x%29^2%2B1%2F%28x%29^2%29%3D2
the idea here is that one angle always has to be the inverse of the other angle. But as the angles are real-valued, so that complex solutions wouldn't work, you only get four different values to work with.

A different way to get nice angular relations might be via the riemann-sphere.
Taking the radius as is but looking at where the iteration would have been found on the riemann-sphere, express it as the two angles (the radius of 1, as said is overwritten by the resulting radius) and plot the new position accordingly.
Though, as on the bottom of that sphere, you have zero and on the top you have infinity, this might lead to a different kind of distortion. - 3D but not as spherical as the original intention^^


A very exotic variant would be a weird clifford algebra without any real part.

Something like
i*i=-j
j*j=-e
e*e=0
i*e=j
j*e=i
i*j=e
i*j*e=e*e=0

no idea if that would actually describe something usable but it might be worth a try :)
Also, for that, you would probably need to figure out, if it at all works, how it works:
is j*i=i*j or not? ^^

Ok, those where some random quick ideas. I hope, you like them ^^


Title: Re: True 3D mandelbrot type fractal
Post by: flok on November 17, 2009, 04:39:54 PM
Hi,

I've been experimenting a little with Daniel's formula. After a few hours of experimenting I somewhat succeeded in implementing the formula in Java with Povray-scene output being generated.

Put all of it on my website: http://vanheusden.com/java/3dmand/ (http://vanheusden.com/java/3dmand/)

First results are not as impressive as some (well, most) of the pictures I saw in this forum but maybe with some texture-changes or so (or higher detail rendering) it might be fun to play with it.


Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 17, 2009, 05:52:27 PM
Akkara Leith pointed out to me the reason why some people are not getting the same formulas for my higher order non-trigonometric formulas. The reason is because I was using atan(y/x) instead of atan2(y,x) for my definition of theta. I have gone back and changed this to my original posts:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8426/#msg8426
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8470/#msg8470


Title: Re: True 3D mandelbrot type fractal
Post by: bugman on November 17, 2009, 06:02:10 PM
I am continuing to play with inverse Julia sets using the MIIM method. I was quite impressed with xenodreambuie's inverse Julia sets using this method. Earlier on this thread, he presented an interesting method for finding n² valid roots for any nth order formula. When I tried to implement this method, I found that sometimes some of the roots were still invalid, but with some minor modifications, I was able to consistently get all 16 unique valid roots for the 4th order formula. Here is an example of the 4th order inverse Julia set using MIIM. I still haven't implemented soft shading yet with my point cloud renderer, but I hope to add that soon.


Title: Re: True 3D mandelbrot type fractal
Post by: JColyer on November 17, 2009, 06:25:37 PM
Hey all, I've been dabbling in fractals since I first saw the Beauty of Fractals book way back in the day.  I'm a programmer by trade but not a math geek - so most of the formulas are way over my head.  Once I see it in code I'm cool.  I just found this site/thread from the /. link yesterday about the 3d Mandelbulb, which has got me going again.  I've noticed from browsing around that a lot of folks seem "down" on Quaternions as being too smooth and boring, but I think that they're wrong.  It's all about what's on the inside, not the outside... sorry about the crappy JPG's forum limits...



Title: Re: True 3D mandelbrot type fractal
Post by: cbuchner1 on November 17, 2009, 09:55:41 PM
My next step would be to adapt the DE formula as given in this thread, but I am not sure if I can do that on my own.

 :tease2:

Some early raytracing code for Mandelbulbs requiring the Optix SDK and CUDA tool kit to be found in this posting. Optix is an API for raytracing on CUDA capable graphics chips. It will run at interactive frame rates on a GTX260 graphics cards and better, however a binary patch is required to enable Optix on anything but Tesla and Quadro Fx cards (use google to find such hackery).

Dependencies are the Optix SDK by nVidia and the CUDA toolkit V2.3 or later - both available for free for Windows and Linux. Because .zip files can't be attached here, find the source code on the nVidia forums (need to register to download the attachment)

http://forums.nvidia.com/index.php?showtopic=150985&view=findpost&p=952165

Still, I am still very dissatisfied with the shading and lighting - it is hard to make out any surface detail. But it does ressemble the 8th order Mandelbulb. In my version I'd rather call it an ugly barnacle ball. But I am onto something. I only hacked on this for about 4 hours. I am still having issues with some transparently appearing pixels where there should be a solid. Also the way the surface normals are determined give the shading a weird and grainy look.

Let me know if my iteration formulas and parameters look correct. I mostly copied the approach by JosLeys in posts #355 and #397.

I'd love to learn how to implement the orbit traps correctly to simulate global illumination.

Christian


Title: Re: True 3D mandelbrot type fractal
Post by: fractalrebel on November 17, 2009, 10:27:41 PM
Dave,

I set iterations to 1000 and bailout to 100. It really doesn't give much more detail than with your rendering. I guess we are still in search of the elusive highly detailed 3D-Mandelbrot. All of my current stuff is now in the UF database in reb.ulb.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 17, 2009, 10:28:41 PM
I'm glad Dave volunteered to test the second derivative distance formula. It's a bit of a monster, and probably too expensive, but I wonder how it performs.


Ermmm I only really volunteered to try it on the standard 2D Mandy and Julias :) But if it gets rid of the static points in the gradients on the Julias.....
Am about to try it now :)


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 17, 2009, 10:35:15 PM
Dave,

I set iterations to 1000 and bailout to 100. It really doesn't give much more detail than with your rendering. I guess we are still in search of the elusive highly detailed 3D-Mandelbrot. All of my current stuff is now in the UF database in reb.ulb.


That's great - did you include this one:

            r = zj
            zj = 2.0*zj*(real(zri) - imag(zri)) + cj
            zri = zri*zri - r*r + cri

;   *  |  r   i   j
;   ----------------
;   r  |  r   i   j
;   i  |  i  -r  -j
;   j  |  j  -j  -r

It's not really that much better (if indeed it could be said to be better) but check out the main minibrot on the spike:

http://www.youtube.com/watch?v=rIMqmDR30ks


Title: Re: True 3D mandelbrot type fractal
Post by: fractalrebel on November 17, 2009, 10:47:46 PM
Interesting! Looks like a satellite. No, I haven't tried it.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 18, 2009, 03:08:02 AM
interesting thoughts about the second derivative. For regular complex M-sets that should give these iteration rules:

ddz = p·(p-1)·z^(p-2)·dz² + p·z^(p-1)·ddz
dz = p·z^(p-1)·dz + 1
z = z^p + c

for p=2:

ddz = 2·dz² + 2·z·ddz
dz = 2·z·dz + 1
z = z² + c

I suppose for the first iteration z = 0, dz = 1, ddz = 0

The first Taylor expansion of G(c+eps) is G(c) + eps·G'(c) which leads to eps = distance = G/|G'| = the famous |z| · log|z| / |dz|

So the second order expansion should be something like G(c+eps) = G(c) + eps·G'(c) + eps²/2 · G''(c), so eps = distance = (solving the quadratic) =  (-|G'| ± sqrt( |G'|² - 2·|G''|·|G|))/|G''| I guess the solution we want is the one with the negative square root... As usual,

|G| = (1/2^n) · log |z|
|G'| = (1/2^n) · |dz| / |z|
|G''| = (1/2^n) · (|ddz|·|z|-|dz|²) / |z|²

which means that we have a huge monster:

k = |dz|² - |z|·|ddz|

distance = ( -|z|·|dz| ± sqrt(|dz|² - 2·k·log|z|) )/k

which is quite more complex that the first order distance estimator |z|·log|z|/|dz|  I might very well have made mistakes in this deductive process. Most likely with the signs...

I'm curious to see if it works, at least in the old-good-2d M-Set. Can somebody try?

It works... but....

Here's a quick UF colouring formula (for the z^2+c complex Mandy/Julias):

Code:
DE2 {
init:
  complex dz = (1,0)
  complex ddz = (0,0)
loop:
  ddz = 2.0*(sqr(dz) + #z*ddz)
  dz = 2.0*dz*#z
  if @mandy
    dz = dz + 1.0
  endif
final:
  float g = log(cabs(#z))
  float g1 = 2.0*cabs(dz)/cabs(#z)
  float g2 = 2.0*(cabs(ddz)*cabs(#z)-|dz|)/|#z|
  if @mode==0
    #index = g/g1
  elseif 2.0*g2*g>sqr(g1)
    #solid = true
  else
    #index = (g1 - sqrt(sqr(g1) - 2.0*g2*g))/g2
  endif
default:
  param mandy
    default = true
  endparam
  param mode
    enum = "Original" "New"
    default = 1
  endparam
}

The problem is I couldn't find a way of getting the colouring correct in the areas where we need better DE (when the sqrt is negative as IQ surmised) i.e. at the "static points" in say the derivative of a disconnected Julia Set.
Testing for the negative square root identifies the problem areas fine though.
There must be a way to make the DE continuous into the negative square root areas but I couldn't find it - I did investigate keeping all values complex further through the calculations but couldn't find a satisfactory solution - maybe someone more familiar with the original derivation can work out a method along those lines - a couple of the attempts I did coloured the offending areas apparently correctly but introduced problems elsewhere :(

I should add that this DE does look visually better when used on the Mandelbrot and you'll note I added factors of 2 to |G'| and |G''|.

Note that it's easy to compare the "original" DE and this new version by simply changing the "mode" parameter.


Title: Re: True 3D mandelbrot type fractal
Post by: JackOfTraDeZ on November 18, 2009, 05:40:41 AM
Can anyone give me a formula for one of these that works in FRACTINT?
I will try to animate it. I've been looking over this thread and most of the math is over my head, or in a form I can't know how to translate into BASIC or for the fractint formula parser.


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 18, 2009, 08:36:06 AM
wow David, thanks for trying! I think I will give it a try too and see it by myself, I'm still surprised (and happy!) it "kind of worked" :) Want to see with my own eyes this negative square root problem. Could you send me a mail or create another thread or something? I feel we are gonna pollute this thread a bit with non-3d-true-m-set topics.

Speaking of what, because I'm back to the cyber-live again I just uploaded the complete my-first-power8-mset-video of the other day. Same link: http://www.iquilezles.org/trastero/f8p5.avi (http://www.iquilezles.org/trastero/f8p5.avi)


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 18, 2009, 10:56:33 AM
hey, indeed it works:

(http://www.iquilezles.org/trastero/distance2.png)
 
Top half image is the first order classic DE, the bottom half is the new second order DE we just "discovered". The image seems to make sense to me.

Red points are the sqrt(-) areas. It seems indeed one should catalog them as "inside", I think you are right. Good work David also on having discovered the 2 factor issue in G' and G'', and in the sign of G'. Fantastic.

We made the analysis a bit in the amateur way, perhaps we should inform a real mathematician so they actually PROVE it's correct. Not sure then if this discovery will be useful or not (we will discover it in this thread probably), but if it happens to be we could update Wikipedia... (dreaming). By the way, why were we trying to find a better DE in the first place?, I already forgot. Was it to improve the raymarching?

These are the "final" expressions after David's correction/findings that produce the image I just linked to, just for the shake of documentation:

DE1 = G/|G'|
DE2 = |G'-sqrt(G'² - 2·G·G'')| / |G''|

with  

G=log|z|
G'=2|dz|/|z|
G''=2|(|ddz|·|z| - |dz|²)|/|z|²

that expand to

DE2 = | |dz| - sqrt(|dz|² - ||ddz|·|z| - |dz|²|·log|z|) | · |z| / (|ddz|·|z| - |dz|²)
DE1 = |z|·log|z|/(2·|dz|)

I used these expanded versions for rendering. I will eventually find where the 1/2 is coming from in G' and G'' ...






Title: Re: True 3D mandelbrot type fractal
Post by: JackOfTraDeZ on November 18, 2009, 02:52:57 PM
awesome video. AWESOME!  loox like an ancient work of pottery or sculpture.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 18, 2009, 05:44:42 PM
Red points are the sqrt(-) areas. It seems indeed one should catalog them as "inside", I think you are right. Good work David also on having discovered the 2 factor issue in G' and G'', and in the sign of G'. Fantastic.

I should point out that if you try it on a Julia instead I think you'll find a problem with simply assigning the negative square root areas as "inside", here the problem of singularities in the derivative producing over-stepping in the original DE is replaced by areas of negative square root which if made "inside" will produce solid where there shouldn't be any.
For example try it on a disconnected Julia.

Really a solution is required that would make the DE2 value/colouring continuous into the negative square root areas even on disconnected Julias.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 18, 2009, 05:57:27 PM
Can anyone give me a formula for one of these that works in FRACTINT?
I will try to animate it. I've been looking over this thread and most of the math is over my head, or in a form I can't know how to translate into BASIC or for the fractint formula parser.

For the basic iteration of the original formula I think you should be able to use this fairly easily in Fractint:

            ztemp = ((r=cabs(zri)) + flip(zj))^@mpwr
            zri = real(ztemp)*(zri/r)^@mpwr + cri
            zj = -imag(ztemp) + cj

ztemp, zri and cri complex
r, zj, cj and @mpwr real (though @mpwr could be complex)

In the above the normal "bailout test" magnitude in Fractint terms would be |zri|+zj*zj

For Paul Nylander's latest suggestion just remove the minus from the zj term.

If you're asking how to render 3D fractals using ray-marching in Fractint then I suggest adapting an existing Fractint 3D formula, I'm sure there are quite a few available.

One thing I'd be interested in is if someone can provide the calculation for the derivative using complex and reals in a similar manner to the basic iteration above.



Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 18, 2009, 07:03:24 PM
Quote
Quote
Red points are the sqrt(-) areas. It seems indeed one should catalog them as "inside", I think you are right. Good work David also on having discovered the 2 factor issue in G' and G'', and in the sign of G'. Fantastic.

I should point out that if you try it on a Julia instead I think you'll find a problem with simply assigning the negative square root areas as "inside", here the problem of singularities in the derivative producing over-stepping in the original DE is replaced by areas of negative square root which if made "inside" will produce solid where there shouldn't be any.
For example try it on a disconnected Julia.

Really a solution is required that would make the DE2 value/colouring continuous into the negative square root areas even on disconnected Julias.

ok, got it. I will try J set then.


Title: Re: True 3D mandelbrot type fractal
Post by: twinbee on November 18, 2009, 08:49:25 PM
Awesome animations like IQ's make me want to study B-Splines/NURBS... Curved paths are too underused in 3D and 2D fractal animations :)


Title: Re: True 3D mandelbrot type fractal
Post by: shanest on November 18, 2009, 11:06:43 PM
Hello,

I just found this thread in the last couple of days because of the publicity of twinbee's Mandelbulb article.

At anyrate, I'd love to get in and dabble with this stuff myself.  I have pretty strong background in both Math and programming, but haven't experimented with fractals since playing around in Mathematica 5 years ago and have never done much graphics-based programming.

What is the best way to get started with this?  In particular, how would I write something like twinbee's custom raymarcher?  Those images are absolutely beautiful.

In general, I'd prefer to know of solutions that are free/open-source and cross-platform (Linux is my standard OS) besides Xaos.  I'm not adverse to trying to write something on my own, but basically just want to get exploring in the easiest way possible.


Title: Re: True 3D mandelbrot type fractal
Post by: cbuchner1 on November 18, 2009, 11:17:12 PM
al, I'd prefer to know of solutions that are free/open-source and cross-platform (Linux is my standard OS) besides Xaos.  I'm not adverse to trying to write something on my own, but basically just want to get exploring in the easiest way possible.

You could modify an existing Quaternion Julia raymarcher. Hint: there's a Quaternion Julia primitive in Povray that is most likely based on a raymarching approach - it could be hacked to represent a Mandelbulb primitive instead. I did the same hack to a julia raymarcher in a GPU accelerated raytracing SDK by nVidia. It took me 3 hours from start to "first light", but I still need to tweak the lighting. My renders look pretty bland.

See posts #355 and #397 for some working DE formula. But I am having trouble with the factor 0.5 in front of the depth estimate. In some scenarios this number is too big, leading to overstepping and transparencies where there should be a solid object.

And how on earth would I add orbit traps to a DE based raymarcher to fake global illumination? ...

Christian


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 18, 2009, 11:26:42 PM
Hello,

I just found this thread in the last couple of days because of the publicity of twinbee's Mandelbulb article.

At anyrate, I'd love to get in and dabble with this stuff myself.  I have pretty strong background in both Math and programming, but haven't experimented with fractals since playing around in Mathematica 5 years ago and have never done much graphics-based programming.

What is the best way to get started with this?  In particular, how would I write something like twinbee's custom raymarcher?  Those images are absolutely beautiful.

In general, I'd prefer to know of solutions that are free/open-source and cross-platform (Linux is my standard OS) besides Xaos.  I'm not adverse to trying to write something on my own, but basically just want to get exploring in the easiest way possible.

The easiest free route to anything fractal where you want to write your own formulas is probably ChaosPro:

http://www.chaospro.de/

Though as with Ultra Fractal this will not produce the fastest possible routines since that's always going to be better coded directly in C/C++ etc. or better still for a GPU (if you've got good cooling) :)

If you want to try in ChaosPro my UF formula here:

http://www.fractalgallery.co.uk/MMFWip3D.zip

includes many of the formulas discussed in this thread using basic Phong rendering and is fairly easily adaptable to work in ChaosPro - just remove all references to the use of the fBm (to get the formula from the zip, download & install the trial version of UF5, run it and "Update Public Formulas" from the Options menu, unzip the above file, copy all the text from the txt file and then paste into the open fractal window in UF5. Then when the parameter file has pasted click on the edit formula button (top right)  and you then have the text source for the UF fornula which you can transfer/adapt to ChaosPro.

Arrgh - apologies, I missed that you said "cross-platform" and Linux :)


Title: Re: True 3D mandelbrot type fractal
Post by: kram1032 on November 19, 2009, 01:44:14 AM
Yet an other idea:
I found this nice set (sorry for the super small size^^)

It's the z-th root of z+c

(x+y i)^(1/(x+y i))+a+b*i

In polar coordinates, that would be

r = ee-pi arg(r ei pi x)/(r x)

phi = tan-12 (cos((e-pi log(r2))/(2 r x)),-sin((e-pi log(r2))/(2 r x)))

(I hope, I didn't do an error on the angle^^)

How would that look in 3D? :)


Title: Re: True 3D mandelbrot type fractal
Post by: JColyer on November 19, 2009, 02:54:06 AM
ok so here's the my first volumetric rendering of the 3dmandelbulb.  still tweaking the orbital distance algorithm.  i think it kinda looks like a wood cut for some reason...



Title: Re: True 3D mandelbrot type fractal
Post by: LionHeart on November 19, 2009, 03:23:56 AM
I must have a play with some of these equations and if I can figure it out, add them to my program ManpWIN.

Thanks to everyone who contributed to this most interesting thread.

Paul the LionHeart (http://www.deleeuw.com.au/images/LeoLion.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: ZsquaredplusC on November 19, 2009, 04:48:30 AM
Hello all.  Very interesting progress so far.

Twinbee...  any chance of you extending your article so it has a page 3 titled "for coders" or something similar?  ie, a pseudo code structure for someone wanting to try these formulas out who is more programming inclined rather than mathematically inclined.

Assuming that the reader has a basic raytracer or raymarcher coded up and have the ability to have a ray starting from the "camera" and know the "direction" the ray is going, then you step a certain amount along the ray and repeatedly try the mandelbulb formula to see if the point is inside or outside the set and plot the point in 3D space accordingly.

The basic code would be along the lines of

for y=1 to bitmapheight do
begin
      for x=1 to bitmapwidth do
      begin
             <calculate vector of ray direction from camera to pixel location in 3d space>
             <now we have the starting point in XYZ coords (this would be the bitmap XY coordinate converted to XYZ space in 3d)>
             <feed the point XYZ into distance estimator>
             <test point returned from distance estimator by iterating it through the iteration loops>
             if ((x^2+y^2+z^2)>4) or (iterations>256) then giveup  else XYZ is a valid point so raytrace the point
     end
end


Questions...  :hmh:
1. The z triplet and c triplet both have 3 xyz parameters
2. So Z starts as (1,0,0) and C starts as (X,Y,Z) when iterating the formula?
3. Does the distance estimator calc happen while the iteration happens?
4. Am I on the right track?

It would also be nice to have a series of "DistanceEstimatorNylander" "IterateNylander", "DistanceEstimatorMakin" "IterateMakin" snippets of code depending on who first came up with the idea.  Looking back over this thread shows many attempts that may not be the true 3d mandelbrot type, but never the less result in interesting results.  It would be great to have some info along the lines of "the above picture uses the following formula by whoever" and have the relevant snippet/change in code for distance estimation and iteration.

Or even a basic sample code for distance estimation and iteration of the now classic ^8 result.  Enough to get the basic framework going and have a play with these sort of images.

Keep going regardless guys.  There is some great results in this thread so far.


Title: Re: True 3D mandelbrot type fractal
Post by: s31415 on November 19, 2009, 05:34:08 AM
Hi,

Just some questions and comments, which may already have been discussed, I didn't have the courage to go through the 36 pages of comments.
I looked into the squaring formula described there:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg4109/#msg4109
I think that up to basic trigonometric identities and a parity transformation (multiply every coordinates by -1), it boils down to:
newx = r^2 * cos(2*yang) * cos(2*zang);
newy = r^2 * cos(2*yang) * sin(2*zang);
newz = r^2 * sin(2*yang);
What basically says that you square the radius and multiply both spherical coordinates by 2. So first question:
- Is the inversion necessary? What happens if you drop it and use the formulas above instead?
With both the formulas above and the original ones, the complex plane is embedded as the plane slicing the sphere through the equator, so we recover the standard M-set there. Note that (also in both cases) a neighborhood of the north pole is mapped to a thin band close to the equator, so this transformation is not continuous (unlike complex square operation in 2d). I think you can see the hallmark of this fact in some images.
Now let us look at a meridian circle (ie zang = constant or constant + pi, and take the constant to be zero to keep things simple) and the behaviour of the points living there. A point at yang = 0 will stay there, so the points in the complex plane stay there, that's a good thing. A point with non-zero yang will be mapped to a point with 2*yang until you reach yang = pi/4, which is mapped to the north pole of the sphere. Now something strange happens when you go on increasing yang: the point comes backwards with a value of yang equal to pi - 2*oldyang (because sin(x) = sin(pi-x) ). Intuitively, I would like it to continue past the north pole... So you would need a condition so that when yang is larger than pi/4, zang is switched to zang + pi. So second question:
- Did anybody try this, and if so what are the results?

Keep these impressive images coming! 

Best,

Sam
 


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 19, 2009, 08:55:56 AM
Spy, I think the change of sign was an fix they made to correct the wrong cartesian2polar change of coordinates they were making (same for all those +PI/2 etc you see in the beginning of the thread). I believe most of the latest images in the thread are created with the """correct""" formula (in whatever xyz, xzy system). At leas I'm using the correct version (for the "standard" academic xyz coordinate system). I'm not going to re-post it here, it's just a few pages before this one.


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 19, 2009, 08:58:11 AM
good work JColyer. I can definitely see the effect of the orbit trap, although I guess you can still tune it a bit more indeed. I like the feeling of your rendering, it's different.


Title: Re: True 3D mandelbrot type fractal
Post by: lycium on November 19, 2009, 09:59:38 AM
oh man, word of this thing has spread so far... it's really incredible (and to think i have a picture of a quadratic 3d mandelbrot on a mug from april last year!). even my (usually uninteresting) google alerts for "ray tracing" are turning up things related to this, it looks like there are a lot of people doing gpu ray tracing of this thing: http://frictionalgames.blogspot.com/2009/11/fractional-fun.html

i'm interested to hear from the experiences of others on implementing this on the gpu. personally i'm seeing less-than-ideal numerical results from the gpu (need a reference cpu implementation), especially in the finite difference normal estimate, and the polynomial versions are also WAY faster than the ones using trig.


Title: Re: True 3D mandelbrot type fractal
Post by: iq on November 19, 2009, 11:21:10 AM
cool, the guy links to my site :)

thing is GPU programming is so simple, and it's so convenient for raytracing and raymarching (few examples here http://www.iquilezles.org/www/material/nvscene2008/rwwtt.pdf, but I know of other 30 works that have been released since them). Basically, you write your code in GLSL which is 90% equal to C, but with already built-in vector types and geometric functions. I usually port my code (like the Z8+C M-set of this thread) back and forth to CPU and GPU in a matter of five minutes, since it's so similar (I´m trying to avoid the word "identical") to regular C monothread programming. As for the numerical precision, for most practical applications the 32 bit floating point arithmetic is enough. You can of course want to zoom deeper in a fractal, but well, you ALWAYS can want to go deeper and that doesn't necessarily make the experience more interesting. Anyway, GPU coding is easy for anybody already using any programing language as C, UltraFractal, Basic, whatever. All this is true for regular simple to medium type of applications (like rendering fractals). More complex things can get a bit more difficult, but not that much really.


Title: Re: True 3D mandelbrot type fractal
Post by: lycium on November 19, 2009, 11:24:26 AM
to be more specific about the gpu precision issues, they don't support denorms yet and i'm sure this makes a difference for finite difference normal estimation since the subtracted values should necessarily be very close.

of course, ideal would be to get analytic normals; it would be nice if you could post your jacobian matrix for the z8 :)


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 19, 2009, 11:47:47 AM
Mandelbulb 18th order
(http://www.fractalforums.com/gallery/1/492_18_11_09_11_28_01.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: bib on November 19, 2009, 01:36:17 PM
http://www.youtube.com/watch?v=afa7lU_yHy8


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 19, 2009, 01:48:02 PM
Quote
Now something strange happens when you go on increasing yang: the point comes backwards with a value of yang equal to pi - 2*oldyang (because sin(x) = sin(pi-x) ). Intuitively, I would like it to continue past the north pole... So you would need a condition so that when yang is larger than pi/4, zang is switched to zang + pi. So second question:
- Did anybody try this, and if so what are the results?

I did try this some time ago. The results are not dramatically different.
See these images (low res quick renders) of the degree 8.  
The only difference appears to be that if the point being iterated is allowed to go across the poles, then the bulbs are aligned (see the second image below) instead of staggered..


Title: Re: True 3D mandelbrot type fractal
Post by: flok on November 19, 2009, 03:36:37 PM
I calculated the 3d mandelbrot and exported it as a povray-script. Then added a hollow green box around it with some lights. Texture is glass. The results are not by far as stunning as some others i've seen here though.

(http://vanheusden.com/java/3dmand/scenedw-5.jpg)


Title: Re: True 3D mandelbrot type fractal
Post by: JosLeys on November 19, 2009, 04:05:14 PM
How about four dimensions?

I wondered what we would get on a 3-dimensional sphere. (Note that a normal sphere is two-dimensional : you need just two numbers to pinpoint your position, longitude and latitude)

So for a 3-sphere, we need three angles, like this :

sx=R^(@pow/2)*cos(@pow*mu)+csx
sy=R^(@pow/2)*cos(@pow*ph)*sin(@pow*th)*sin(@pow*mu)+csy
sz=R^(@pow/2)*sin(@pow*ph)*sin(@pow*th)*sin(@pow*mu)+csz
sw=R^(@pow/2)*cos(@pow*th)*sin(@pow*mu)+csw
R=sx*sx+sy*sy+sz*sz+sw*sw
RR=sqrt(R)
mu=acos(sx/RR)
ph=atan2(sy+i*sz)
th=acos(sw/(RR*sin(mu)))

Unless I did something wrong,the results are disappointing. There is a lot less elegant detail to be found. Seems the more we go away from two dimensions, the less interesting. See below the power two and power 8 Mandelbrot sets.
The pictures are orthogonal projections (just omitting the fourth coordinate)


Title: Re: True 3D mandelbrot type fractal
Post by: fractalrebel on November 19, 2009, 07:37:53 PM
For those of you interested in rendering the Mandelbulbs and corresponding Juliabulbs in UltraFractal 5, I have just updated the UF database with my latest changes to 3DFractalRaytrace and the plugins for the Mandelbulb and the Juliabulb. I have gotten my gradient function working correctly for the two plugins, which really involved gettiang the correct derivative functions.


Title: Re: True 3D mandelbrot type fractal
Post by: kram1032 on November 19, 2009, 07:58:12 PM
@JosLeys

Spherical Coordinates are 3D. You need only two values to get to any point on the surface. But if you want to have a not-fixed radius (which is the case, here), you have your third dimension ;)

Maybe, try to rotate in 4D-style? That might give some nice results...
Though, if you go for 4D, maybe you find a way to unify julia with Mandelbrot (not in the Buddhagram way^^) - that probably will lead to more interesting details, as no artifical extension way has to be done then...

Also, omitting one axis probably might not be the best way... what's about a full 4D -> 2D projection? (Or is that equivalent to dropping an axis?)


As said before, doing that direct conversion from 2D to 3D seems a bit odd...
The Mset lies inside an algebratic vector-space, where new calculation rules apply, which results in that nice shape.
Adding just another axis which does the very same as the second axis, where no correspondance is between the two axes, whill likely destroy details. (Especially on the M²-Set, as that doesn't even have radial symmetries)

In a true extension, all axes would comunicate with each other, I guess...
Quaternionic has the "problem" of 2*4D, rather than the 2*2D in Complex numbers (2* because there are the two real and the two imaginary parts)

Maybe, we could try to develop a small algebra just for that...

for instance...

x*x=-x
y*y=-y
z*z=-z
x*y=z
y*z=x
x*z=y
x*y*z=0

that would be the simplest case I can think of.... (a*b*c=0 to avoid a fourth Dimension being formed,  a, b and c are axial units like i,j and k with the quaternions)

Of course, it's very likely, that this algebra wouldn't hold under any conditions, but for a Mandelbrot-Set, it should be possible to work with :)

x,y,z are the units from above...

(n*x+k*y+j*z)²+a*x+b*y+c*z =

j²*z^2+2*j*k*y*z+2*j*n*x*z+k^2*y^2+2*k*n*x*y+n^2*x^2*+a*x+b*y+c*z=

-j²z + 2*j*k*x + 2*j*n*y -k²y + 2*k*n*z -n²x + a*x + b*y + c*z

split into the three parts:

nx -> (-n²+2jk+a)x
ky -> (-k²+2jn+b)y
jz -> (-k²+2kn+c)z

not actually toooo hard formulae... they seem to be closely related to the imaginary part of the Mandelbrot, though. If I'm unlucky, this will nearly look like the quaternion variant...

As long as no exponential or stuff is needed, which you'd first have to figure out, this algebra should hold easily...

for instance, x*x*y*z*z*z=x²*y*z³=-x*y*-z*z=-x*y*-(z²)=-x*y*z=0
xn=
x | n is an odd
-x | n is an even

scalars in front of the units simply get extended with the very same rules as always...


Title: Re: True 3D mandelbrot type fractal
Post by: cbuchner1 on November 19, 2009, 09:30:48 PM

I've tried power of 27, but that starts looking more and more like a ball.

So here's a power of 5, rendered on my GPU in phong shading.



Title: Re: True 3D mandelbrot type fractal
Post by: fractalrebel on November 19, 2009, 10:05:18 PM
Something doesn't look quite right here. Maybe it's your rotation angle(s), but I don't think so. Here is my version of z^5 + c:


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 19, 2009, 10:24:53 PM

I've tried power of 27, but that starts looking more and more like a ball.

So here's a power of 5, rendered on my GPU in phong shading.

Looks like gross over-stepping in the ray-marching ?


Title: Re: True 3D mandelbrot type fractal
Post by: cbuchner1 on November 19, 2009, 10:28:03 PM
Hmm, so far my power 8 looked pretty much like anyone else's.

(http://img690.imageshack.us/img690/7200/sobu.jpg)

Here's my entire distance estimator in plain CUDA-C. A float3 is a vector with elements .x, .y, and .z.
x is the float3 vector with the current coordinate on the ray (elements x.x, x.y, x.z) - poor naming, I know.
I am using the trigonometric version (polar coordinates mostly). Let me know if something smells fishy.

Code:
    float R  = sqrtf(x.x*x.x + x.y*x.y + x.z*x.z);
    float th = atan2(x.y, x.x);
    float ph = atan2(x.z, sqrtf(x.x*x.x + x.y*x.y));

    float3 dz;
    const float c = 1.0f;
    dz.x = 1.0f;
    dz.y = 0.0f;
    dz.z = 0.0f;
    float ph_dz = 0.0f;
    float th_dz = 0.0f;
    float R_dz  = 1.0f;

    const float sq_threshold = 4.0f;   // divergence threshold

    // Iterate to compute the distance estimator.
    int i = m_max_iterations;

    const float p = power;             // power of fractal
    while( i-- )
    {
      // derivative
      dz.x = p*powf(R, p-1.0f) * R_dz*cosf(ph_dz+(p-1.0f)*ph)*cos(th_dz+(p-1.0f)*th)+c;
      dz.y = p*powf(R, p-1.0f) * R_dz*cosf(ph_dz+(p-1.0f)*ph)*sin(th_dz+(p-1.0f)*th);
      dz.z = p*powf(R, p-1.0f) * R_dz*sinf(ph_dz+(p-1.0f)*ph                       );
      
      R_dz  = sqrtf(dz.x*dz.x + dz.y*dz.y + dz.z*dz.z);
      th_dz = atan2(dz.y, dz.x);
      ph_dz = acos(dz.z/R_dz);
      
      // new x,y,z coordinate
      x.x = powf(R, p) * cosf(p*ph)*cos(p*th) + x.x;
      x.y = powf(R, p) * cosf(p*ph)*sin(p*th) + x.y;
      x.z = powf(R, p) * sinf(p*ph)           + x.z;

      R  = sqrtf(x.x*x.x + x.y*x.y + x.z*x.z);
      th = atan2(x.y, x.x);
      ph = atan2(x.z, sqrtf(x.x*x.x + x.y*x.y));

      // Stop when we know the point diverges.
      if( R > sq_threshold )
        break;
    }
    return  0.5 * R * logf(R)/R_dz;


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 19, 2009, 10:52:20 PM
Hmm, so far my power 8 looked pretty much like anyone else's.
Here's my entire distance estimator in plain CUDA-C. A float3 is a vector with elements .x, .y, and .z.
x is the float3 vector with the current coordinate on the ray (elements x.x, x.y, x.z) - poor naming, I know.
I am using the trigonometric version (polar coordinates mostly). Let me know if something smells fishy.


This is wrong:

      ph_dz = acos(dz.z/R_dz);

Change to:

      ph_dz = asin(dz.z/R_dz);

Also this is correct:

      ph = atan2(x.z, sqrtf(x.x*x.x + x.y*x.y));

but this is quicker:

      ph = asin(x.z, R);

Also it's not causing the main problem but the distance estimate will be considerably more accurate if you increase the allowed bailout to say 11 or more (I have testing R^2 against 128 as the minimum option in my UF formula).

In addition, although I don't know CUDA, I'd guess that precomputing the sines and cosines will be considerably faster than calling sin() and cos() twice with the same argument - also does CUDA not have a sincos() function ?



Title: Re: True 3D mandelbrot type fractal
Post by: cbuchner1 on November 19, 2009, 11:17:02 PM
Thanks for the corrections.

My power 5 looks less mutant now. And some other weird effects (such as banding effects in flat surface regions) are gone. In addition to the errors you found, I was not adding a constant c vector in each iteration - instead I was adding the current x vector in some kind of recursive feedback loop. I am surprised it even gave sane images.

Here's the cleaned up code where I also renamed x to z.

Code:
    float R  = sqrtf(z.x*z.x + z.y*z.y + z.z*z.z);
    float th = atan2(z.y, z.x);
    float ph = asinf(z.z / R);

    float3 dz;
    const float3 c = z;
    float ph_dz = 0.0f;
    float th_dz = 0.0f;
    float R_dz  = 1.0f;

    const float sq_threshold = 4.0f;   // divergence threshold

    // Iterate to compute the distance estimator.
    int i = m_max_iterations;

    const float p = power;             // power of fractal
    while( i-- )
    {
      // derivative
      dz.x = p*powf(R, p-1.0f) * R_dz*cosf(ph_dz+(p-1.0f)*ph)*cos(th_dz+(p-1.0f)*th)+1.0f;
      dz.y = p*powf(R, p-1.0f) * R_dz*cosf(ph_dz+(p-1.0f)*ph)*sin(th_dz+(p-1.0f)*th);
      dz.z = p*powf(R, p-1.0f) * R_dz*sinf(ph_dz+(p-1.0f)*ph                       );
      
      R_dz  = sqrtf(dz.x*dz.x + dz.y*dz.y + dz.z*dz.z);
      th_dz = atan2(dz.y, dz.x);
      ph_dz = asinf(dz.z/R_dz);
      
      // new x,y,z coordinate
      z.x = powf(R, p) * cosf(p*ph)*cos(p*th) + c.x;
      z.y = powf(R, p) * cosf(p*ph)*sin(p*th) + c.y;
      z.z = powf(R, p) * sinf(p*ph)           + c.z;

      R  = sqrtf(z.x*z.x + z.y*z.y + z.z*z.z);
      th = atan2(z.y, z.x);
      ph = asinf(z.z / R);

      // Stop when we know the point diverges.
      if( R > sq_threshold )
        break;
    }
    return  0.5 * R * logf(R)/R_dz;



And finally after optimization (sincosf etc...) the computation part looks like this:

      // derivative dz iteration
      float pP_ = p*powf(R, p-1.0f);
      float c1, s1;   sincosf(ph_dz+(p-1.0f)*ph, &s1, &c1);
      float s1_, c1_; sincosf(th_dz+(p-1.0f)*th, &s1_, &c1_);
      dz.x = pP_ * R_dz*c1*c1_+1.0f;
      dz.y = pP_ * R_dz*c1*s1_;
      dz.z = pP_ * R_dz*s1;
      
      // polar coordinates of derivative dz
      R_dz  = sqrtf(dz.x*dz.x + dz.y*dz.y + dz.z*dz.z);
      th_dz = atan2(dz.y, dz.x);
      ph_dz = asinf(dz.z /R_dz);
      
      // z iteration
      float P_ = powf(R, p);
      float s2,c2;    sincosf(p*ph, &s2, &c2);
      float s2_, c2_; sincosf(p*th, &s2_, &c2_);
      z.x = P_ * c2*c2_ + c.x;
      z.y = P_ * c2*s2_ + c.y;
      z.z = P_ * s2    + c.z;

      // polar coordinates of z
      R  = sqrtf(z.x*z.x + z.y*z.y + z.z*z.z);
      th = atan2(z.y, z.x);
      ph = asinf(z.z / R);



Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 19, 2009, 11:19:42 PM
@kram1032:

Given your suggestion then if you haven't seen them yet you may be interested in my earlier attempts at something "true 3D" for z^2+c:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8689/#msg8689
http://www.fractalforums.com/3d-fractal-generation/3d-pickover-stalks/msg8420/#msg8420
http://www.fractalforums.com/3d-fractal-generation/3d-pickover-stalks/msg8416/#msg8416
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8231/#msg8231
http://www.fractalforums.com/images-showcase-(rate-my-fractal)/%27real%27-3d-mandelbrot-attempt/msg7366/#msg7366
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7358/#msg7358
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7235/#msg7235


Title: Re: True 3D mandelbrot type fractal
Post by: shanest on November 19, 2009, 11:22:26 PM
Hello,

I just found this thread in the last couple of days because of the publicity of twinbee's Mandelbulb article.

At anyrate, I'd love to get in and dabble with this stuff myself.  I have pretty strong background in both Math and programming, but haven't experimented with fractals since playing around in Mathematica 5 years ago and have never done much graphics-based programming.

What is the best way to get started with this?  In particular, how would I write something like twinbee's custom raymarcher?  Those images are absolutely beautiful.

In general, I'd prefer to know of solutions that are free/open-source and cross-platform (Linux is my standard OS) besides Xaos.  I'm not adverse to trying to write something on my own, but basically just want to get exploring in the easiest way possible.

The easiest free route to anything fractal where you want to write your own formulas is probably ChaosPro:

http://www.chaospro.de/

Though as with Ultra Fractal this will not produce the fastest possible routines since that's always going to be better coded directly in C/C++ etc. or better still for a GPU (if you've got good cooling) :)

If you want to try in ChaosPro my UF formula here:

http://www.fractalgallery.co.uk/MMFWip3D.zip

includes many of the formulas discussed in this thread using basic Phong rendering and is fairly easily adaptable to work in ChaosPro - just remove all references to the use of the fBm (to get the formula from the zip, download & install the trial version of UF5, run it and "Update Public Formulas" from the Options menu, unzip the above file, copy all the text from the txt file and then paste into the open fractal window in UF5. Then when the parameter file has pasted click on the edit formula button (top right)  and you then have the text source for the UF fornula which you can transfer/adapt to ChaosPro.

Arrgh - apologies, I missed that you said "cross-platform" and Linux :)


For now, I'm running UF5 under WINE and it appears to work well.

I can't, however, figure out how to get your 3D code or the 3DRaytracerFormula plugin.

I've updated the public forums, but if I paste the text into the "Open Fractal" window, the program just crashes on me.

What's the easiest way to get your renderer up and running?  I'd love to explore this construction and make some changes myself.


Title: Re: True 3D mandelbrot type fractal
Post by: David Makin on November 19, 2009, 11:33:28 PM
In addition to the errors you found, I was not adding a constant c vector in each iteration - instead I was adding the current x vector in some kind of recursive feedback loop. I am surprised it even gave sane images.

I missed that (I never thought to check the constant), glad it seems to be fixed now.

Another point - if you make the +1.0f in the iterated derivative into a passed parameter of either 0 or 1 then you have a routine that works for Mandelbrots (1) or Julias (0).

I don't suppose an ATI X600 or even an ATI X1900XT are CUDA-enabled ? :D


Title: Re: True 3D mandelbrot type fractal
Post by: cKleinhuis on November 19, 2009, 11:56:16 PM
This topic has been locked because the main thread theme has reached some kind of a result, and is simply far to big now  O0

further discussion about the formula and renderings, or implementation details should from now on be discussed in the dedicated boards:

general discussion should take place at
http://www.fractalforums.com/the-3d-mandelbulb/

implementation details or further details about the formula
http://www.fractalforums.com/mandelbulb-implementation/

further modifications of the formula, or the formula itself should be discussed here:
http://www.fractalforums.com/theory/

impressions from implemented formulas can be showed of there
http://www.fractalforums.com/mandelbulb-renderings/


well done people!
 :police: