cbuchner1


« Reply #465 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.
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=952165Still, 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


« Last Edit: November 17, 2009, 09:58:40 PM by cbuchner1 »

Logged




fractalrebel


« Reply #466 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 3DMandelbrot. All of my current stuff is now in the UF database in reb.ulb.



Logged




David Makin


« Reply #467 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



Logged




David Makin


« Reply #468 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 3DMandelbrot. 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:



Logged




fractalrebel


« Reply #469 on: November 17, 2009, 10:47:46 PM » 

Interesting! Looks like a satellite. No, I haven't tried it.



Logged




David Makin


« Reply #470 on: November 18, 2009, 03:08:02 AM » 

interesting thoughts about the second derivative. For regular complex Msets that should give these iteration rules:
ddz = p·(p1)·z^(p2)·dz² + p·z^(p1)·ddz dz = p·z^(p1)·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 · logz / 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·zdz²) / z²
which means that we have a huge monster:
k = dz²  z·ddz
distance = ( z·dz ± sqrt(dz²  2·k·logz) )/k
which is quite more complex that the first order distance estimator z·logz/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 oldgood2d MSet. Can somebody try?
It works... but.... Here's a quick UF colouring formula (for the z^2+c complex Mandy/Julias): 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.


« Last Edit: November 18, 2009, 03:13:00 AM by David Makin »

Logged




JackOfTraDeZ


« Reply #471 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.



Logged




iq
Guest


« Reply #472 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 non3dtruemset topics. Speaking of what, because I'm back to the cyberlive again I just uploaded the complete myfirstpower8msetvideo of the other day. Same link: http://www.iquilezles.org/trastero/f8p5.avi



Logged




iq
Guest


« Reply #473 on: November 18, 2009, 10:56:33 AM » 

hey, indeed it works: 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=logz G'=2dz/z G''=2(ddz·z  dz²)/z² that expand to DE2 =  dz  sqrt(dz²  ddz·z  dz²·logz)  · z / (ddz·z  dz²) DE1 = z·logz/(2·dz) I used these expanded versions for rendering. I will eventually find where the 1/2 is coming from in G' and G'' ...


« Last Edit: November 18, 2009, 10:58:31 AM by iq »

Logged




JackOfTraDeZ


« Reply #474 on: November 18, 2009, 02:52:57 PM » 

awesome video. AWESOME! loox like an ancient work of pottery or sculpture.



Logged




David Makin


« Reply #475 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 overstepping 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.


« Last Edit: November 18, 2009, 06:04:10 PM by David Makin »

Logged




David Makin


« Reply #476 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 raymarching 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.


« Last Edit: November 18, 2009, 05:59:49 PM by David Makin »

Logged




iq
Guest


« Reply #477 on: November 18, 2009, 07:03:24 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 overstepping 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.



Logged




twinbee


« Reply #478 on: November 18, 2009, 08:49:25 PM » 

Awesome animations like IQ's make me want to study BSplines/NURBS... Curved paths are too underused in 3D and 2D fractal animations



Logged




shanest
Guest


« Reply #479 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 graphicsbased 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/opensource and crossplatform (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.



Logged




