Logo by mclarekin - Contribute your own Logo!
News: Support us via Flattr FLATTR Link
Welcome, Guest. Please login or register. April 23, 2014, 11:13:40 AM

Login with username, password and session length

Pages: [1]   Go Down
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 918 times)
0 Members and 1 Guest are viewing this topic.
« 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)
Posts: 92

« 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

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};
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;
Posts: 193

Programmer and Web Developer at EVL of UIC

« 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
Fractal Schemer
Posts: 971

« 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:
« 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
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Gradient Coloring ! ManyFractals Gallery rickz65 0 424 Last post March 19, 2010, 10:22:31 PM
by rickz65
Coloring the Mandelbulb Theory « 1 2 3 4 » trafassel 48 4210 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 1809 Last post October 23, 2012, 05:48:56 PM
by Alef
Multiwave coloring for Mandelbrot UltraFractal « 1 2 » Pauldelbrot 17 1470 Last post April 02, 2013, 12:43:19 AM
by Pauldelbrot
Coloring add-on Fragmentarium Kali 6 397 Last post November 29, 2013, 08:57:39 AM

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.274 seconds with 30 queries. (Pretty URLs adds 0.012s, 2q)