News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. August 31, 2014, 02:16:14 AM


Login with username, password and session length



Pages: [1]   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: Coloring mandelbulb  (Read 1028 times)
0 Members and 1 Guest are viewing this topic.
khyperia
Guest
« on: March 03, 2012, 04:07:11 AM »

I made a mandelbulb program (from scratch) in C#, but my current coloring algorithm is... underwhelming. A quick render I did is over here- http://khyperia.deviantart.com/art/The-tunnel-to-everywhere-288260051 (basic information about the program is also on that page)

My question is this- What is a good coloration method for a 3d fractal? Currently I'm doing "orbit trapping", where I take the smallest absolute value and use that for color. This, however, produces the rather dull, everything-the-same-color look in that image I linked. I also cannot use total iterations until escape, as the final point I use is at an unknown (yet very small) distance away from the fractal, so the result would be quite random. What other coloring methods are there, and how do I implement them?
(google has failed me on this, not many people have done the mandelbulb so documentation is sparse)
Logged
Mrz00m
Safarist
******
Posts: 99


« Reply #1 on: March 06, 2012, 05:50:15 AM »

does this help? i think i modded it abit, the original formula is from mandelbulber1.11 name mandelbulb.cl


Code:
float th0 = (native_divide((z.y),r));
float ph0 = atan2(z.y, z.x);
float rp = native_powr(r, power - 1.0f);
float th = th0 * power;
float ph = ph0 * power;
float cth = cos(th);
r_dz = rp * r_dz * power + 1.0f;
rp *= r;
z = (float4) {cth * native_cos(ph), cth * native_sin(ph), sin(th), 0.0f};
z*=rp;
z+=c;
r = fast_length(z);
if (r < colourMin) colourMin = r;
if(r>4.0f || any(isinf(z)))
{
distance = 0.5f * r * native_log(r) / (r_dz);
out.colourIndex = colourMin * 5000.0;
break;
}
Logged
asimes
Iterator
*
Posts: 194

Programmer and Web Developer at EVL of UIC


asimes
WWW
« Reply #2 on: March 06, 2012, 06:13:33 PM »

Hello, Mrz00m put a link on my own Mandelbulb coloring question to here. I figured I might as well share that incase any of my questions are similar enough to yours. The topic is here: http://www.fractalforums.com/programming/basic-3d-fractal-coloring/

I had tried distance estimation but don't know how to calculate a derivative so I had to simplify the equation (which makes for a lousy distance estimation). The distance estimation equation can be found here: http://www.subblue.com/blog/2009/12/13/mandelbulb
Logged
Alef
Fractal Schemer
****
Posts: 996



WWW
« Reply #3 on: March 06, 2012, 06:39:52 PM »

Looks nice. Maybe you should look at Chaos pro database.

Actually interesting are orbit traps with displacement. Colour by orbit=cabs(z+2); Probably you will see nice dots around regions where z=-2. Of corse if colour goes around, what allredy are implemented in Chaos pro engine.

Tray exponent smoothing calculated just from the first few iterations. But using  |z+somenumber|. Actualy it is in Chaos Pro database as number seeker colouring.

Look at my code:
http://www.chaospro.de/formulas/display.php?fileid=224
« Last Edit: March 06, 2012, 06:44:39 PM by Asdam » Logged

P.E.A.C.H. - please examine and critique honestly.
Pages: [1]   Go Down
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Coloring the Mandelbulb Theory « 1 2 3 4 » trafassel 48 4329 Last post September 06, 2010, 04:40:06 AM
by M Benesi
Land of Coloring Images Showcase (Rate My Fractal) Thunderwave 2 514 Last post September 20, 2010, 11:10:33 PM
by Thunderwave
A new look into escapetime fractals using abs & inner coloring New Theories & Research « 1 2 » Kali 18 1847 Last post October 23, 2012, 05:48:56 PM
by Alef
Coloring add-on Fragmentarium Kali 6 475 Last post November 29, 2013, 08:57:39 AM
by SCORPION
What's coloring you prefer (for M-Set) Help & Support SeryZone 7 169 Last post May 04, 2014, 08:44:57 AM
by SeryZone

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

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