Logo by Trifox - Contribute your own Logo!
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. June 30, 2015, 10:17:17 AM


Login with username, password and session length



Pages: 1 ... 30 31 [32] 33 34   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: True 3D mandelbrot type fractal  (Read 298926 times)
0 Members and 1 Guest are viewing this topic.
David Makin
Global Moderator
Fractal Senior
******
Posts: 2276



Makin' Magic Fractals
WWW
« Reply #465 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 smiley But if it gets rid of the static points in the gradients on the Julias.....
Am about to try it now smiley
Logged

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

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



Makin' Magic Fractals
WWW
« Reply #466 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:

<a href="http://www.youtube.com/v/rIMqmDR30ks&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/rIMqmDR30ks&rel=1&fs=1&hd=1</a>
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
fractalrebel
Fractal Lover
**
Posts: 211



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

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

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



Makin' Magic Fractals
WWW
« Reply #468 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 + pz^(p-1)ddz
dz = pz^(p-1)dz + 1
z = z^p + c

for p=2:

ddz = 2dz + 2zddz
dz = 2zdz + 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) + epsG'(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) + epsG'(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| - 2klog|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 sad

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

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
JackOfTraDeZ
Explorer
****
Posts: 52



WWW
« Reply #469 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 #470 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" smiley 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
Logged
iq
Guest
« Reply #471 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' - 2GG'')| / |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'' ...




« Last Edit: November 18, 2009, 10:58:31 AM by iq » Logged
JackOfTraDeZ
Explorer
****
Posts: 52



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

awesome video. AWESOME!  loox like an ancient work of pottery or sculpture.
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2276



Makin' Magic Fractals
WWW
« Reply #473 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.
« Last Edit: November 18, 2009, 06:04:10 PM by David Makin » Logged

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

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



Makin' Magic Fractals
WWW
« Reply #474 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.

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

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
iq
Guest
« Reply #475 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.
Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #476 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 smiley
Logged
shanest
Guest
« Reply #477 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.
Logged
cbuchner1
Fractal Phenom
******
Posts: 443


« Reply #478 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
« Last Edit: November 18, 2009, 11:19:45 PM by cbuchner1 » Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2276



Makin' Magic Fractals
WWW
« Reply #479 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) smiley

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 smiley
« Last Edit: November 18, 2009, 11:28:28 PM by David Makin » Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Pages: 1 ... 30 31 [32] 33 34   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Implementation: 3D mandelbrot type fractal 3D Fractal Generation « 1 2 » steamraven 25 18277 Last post December 08, 2011, 04:27:52 PM
by Alef
Re: True 3D mandelbrot type fractal Other / General Discussion shanest 2 8654 Last post November 20, 2009, 03:24:26 AM
by fractalrebel
True 3D mandelbrot fractal (search for the holy grail continues) 3D Fractal Generation « 1 2 ... 17 18 » illi 259 47979 Last post November 25, 2010, 12:57:55 AM
by cKleinhuis
New fractal type... latest 3d type.. a z^2 for Benoit Images Showcase (Rate My Fractal) M Benesi 0 2106 Last post October 21, 2010, 07:14:00 AM
by M Benesi
My First Mandelbrot...Okay not true. Images Showcase (Rate My Fractal) Zephitmaal 3 1475 Last post January 07, 2012, 04:30:36 PM
by Pauldelbrot

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.278 seconds with 28 queries. (Pretty URLs adds 0.013s, 2q)