Logo by Transdimensional - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 22, 2018, 06:20:59 PM


Login with username, password and session length


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


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 2435 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
Fractal Lover
**
Posts: 204


« 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
Fractal Lover
**
Posts: 212



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 Supremo
*****
Posts: 1174



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

fractal catalisator
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 5389 Last post September 06, 2010, 04:40:06 AM
by M Benesi
A new look into escapetime fractals using abs & inner coloring (new) Theories & Research « 1 2 » Kali 18 2065 Last post October 23, 2012, 05:48:56 PM
by Alef
Coloring add-on Fragmentarium Kali 6 1298 Last post November 29, 2013, 08:57:39 AM
by SCORPION
What's coloring you prefer (for M-Set) Help & Support SeryZone 7 202 Last post May 04, 2014, 08:44:57 AM
by SeryZone
Coloring Fragmentarium « 1 2 3 4 5 » M Benesi 68 2959 Last post April 18, 2016, 08:31:51 PM
by Crist-JRoger

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

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