Logo by Pauldelbrot - Contribute your own Logo!
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. October 25, 2014, 06:13:52 AM


Login with username, password and session length



Pages: 1 ... 34 35 [36] 37   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: True 3D mandelbrot type fractal  (Read 278530 times)
0 Members and 1 Guest are viewing this topic.
cbuchner1
Fractal Phenom
******
Posts: 441


« Reply #525 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: 2269



Makin' Magic Fractals
WWW
« Reply #526 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
kram1032
Fractal Senior
******
Posts: 1587


« Reply #527 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? smiley


* Crownbutterfly.png (8.86 KB, 200x200 - viewed 945 times.)
Logged
JColyer
Guest
« Reply #528 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...



* 3d_mandelbulb_set_1.jpg (232.65 KB, 1280x1024 - viewed 991 times.)
Logged
LionHeart
Alien
***
Posts: 20


« Reply #529 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
Logged
ZsquaredplusC
Guest
« Reply #530 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...  huh?
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.
Logged
s31415
Conqueror
*******
Posts: 110



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

iq
Guest
« Reply #532 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.
Logged
iq
Guest
« Reply #533 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.
Logged
iq
Guest
« Reply #534 on: November 19, 2009, 11:21:10 AM »

cool, the guy links to my site smiley

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.
Logged
bib
Global Moderator
Fractal Senior
******
Posts: 2003



@bib993
WWW
« Reply #535 on: November 19, 2009, 11:47:47 AM »

Mandelbulb 18th order
Logged

Between order and disorder reigns a delicious moment. (Paul ValÚry)
bib
Global Moderator
Fractal Senior
******
Posts: 2003



@bib993
WWW
« Reply #536 on: November 19, 2009, 01:36:17 PM »

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

Between order and disorder reigns a delicious moment. (Paul ValÚry)
JosLeys
Iterator
*
Posts: 199


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


* 4D_test_niet_over_kop_8.jpg (72.68 KB, 500x500 - viewed 834 times.)

* 4D_test_over_kop_8.jpg (73.8 KB, 500x500 - viewed 792 times.)
Logged
flok
Guest
« Reply #538 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.

Logged
JosLeys
Iterator
*
Posts: 199


WWW
« Reply #539 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)


* 4D_test_102b.jpg (55.02 KB, 500x500 - viewed 1188 times.)

* 4D_test_102c.jpg (77.58 KB, 500x500 - viewed 1431 times.)
Logged
Pages: 1 ... 34 35 [36] 37   Go Down
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Implementation: 3D mandelbrot type fractal 3D Fractal Generation « 1 2 » steamraven 26 17228 Last post December 08, 2011, 04:27:52 PM
by Alef
Re: True 3D mandelbrot type fractal Mandelbulb Software shanest 2 8169 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 260 47672 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 1762 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 1159 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.334 seconds with 30 queries. (Pretty URLs adds 0.018s, 2q)