News: Did you know ? you can use LaTex inside Postings on fractalforums.com!

## The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!

 Pages: 1 ... 30 31 [32] 33 34 ... 37   Go Down
 Author Topic: True 3D mandelbrot type fractal  (Read 533677 times) Description: 0 Members and 2 Guests are viewing this topic.
iq
Guest
 « Reply #465 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;
 « Last Edit: November 16, 2009, 05:18:55 AM by iq » Logged
lycium
Fractal Supremo

Posts: 1158

 « Reply #466 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
 Logged

cKleinhuis
Fractal Senior

Posts: 7044

formerly known as 'Trifox'

 « Reply #467 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 ...
 « Last Edit: November 16, 2009, 11:50:34 AM by Trifox » Logged

---

divide and conquer - iterate and rule - chaos is No random!
iq
Guest
 « Reply #468 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

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

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?
 Logged
bib
Global Moderator
Fractal Senior

Posts: 2070

At the borders...

 « Reply #469 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!
 Logged

Between order and disorder reigns a delicious moment. (Paul Valéry)
iq
Guest
 « Reply #470 on: November 16, 2009, 12:28:04 PM »

another image I took before launching the video render:

 Logged
twinbee
Fractal Fertilizer

Posts: 383

 « Reply #471 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
 Logged
iq
Guest
 « Reply #472 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.
 Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2286

 « Reply #473 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)
 Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
cKleinhuis
Fractal Senior

Posts: 7044

formerly known as 'Trifox'

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

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

---

divide and conquer - iterate and rule - chaos is No random!
twinbee
Fractal Fertilizer

Posts: 383

 « Reply #475 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 )
 « Last Edit: November 16, 2009, 12:57:34 PM by twinbee » Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2286

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

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

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

Posts: 2286

 « Reply #477 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
 Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
bib
Global Moderator
Fractal Senior

Posts: 2070

At the borders...

 « Reply #478 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
 Logged

Between order and disorder reigns a delicious moment. (Paul Valéry)
guytron
Guest
 « Reply #479 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
 Logged
 Pages: 1 ... 30 31 [32] 33 34 ... 37   Go Down