Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Theory => Topic started by: trafassel on April 30, 2010, 01:11:00 AM




Title: Coloring the Mandelbulb
Post by: trafassel on April 30, 2010, 01:11:00 AM
Found on top of the spine (view is from inside the set).

Let (x,y,z) be the coordinate of the last point in the iteration.

The rgb-Values of the surface color is given by red=x*x; green=y*y and blue=z*z.


Title: Re: Coloring the Mandelbulb
Post by: trafassel on April 30, 2010, 07:23:01 AM
Zoom in the last scene with 13 iterations.


Title: Re: Coloring the Mandelbulb
Post by: reesej2 on April 30, 2010, 09:01:04 AM
Interesting notion. It seems to only yield coherent patterns in the sections where the iteration rate's too low to show all the details, but the pattern that it does yield looks sort of like a picture of what's going to be there as you iterate. I assume the pattern changes slightly as you modify the iteration count, but are there substantial changes? All in all, I like the idea.


Title: Re: Coloring the Mandelbulb
Post by: Nahee_Enterprises on April 30, 2010, 01:30:17 PM
Yes, definitely an interesting coloring method going on there.    :D

It would have been quite unique to use a photograph used for the coloring, for example somebody's face.  
Imagine all of those little faces at the end of those "stalks".
 :rotfl:
 


Title: Re: Coloring the Mandelbulb
Post by: trafassel on May 01, 2010, 07:28:08 PM
Instead of faces i would prefer a strawberry.


Title: Re: Coloring the Mandelbulb
Post by: trafassel on May 02, 2010, 12:10:52 AM
Same Mandelbulb scene (its exactly the same 3D body), but 1 more iteration steps for coloring.



Title: Re: Coloring the Mandelbulb
Post by: kram1032 on May 02, 2010, 01:31:43 PM
how does this perform on a smooth iteration animation?


Title: Re: Coloring the Mandelbulb
Post by: Nahee_Enterprises on May 02, 2010, 01:36:05 PM
Instead of faces i would prefer a strawberry.

That would work just as well.  Whatever image a person wanted to use for the coloring of an area would make for some very interesting "bulbs".  

Same Mandelbulb scene (its exactly the same 3D body), but 1 more iteration steps for coloring.

These additional images were interesting also.
 


Title: Re: Coloring the Mandelbulb
Post by: stigomaster on May 02, 2010, 03:26:49 PM
Why does there not seem to be areas where the colors are more blended? Everything looks like it's either red, green or blue and not mixed.


Title: Re: Coloring the Mandelbulb
Post by: reesej2 on May 02, 2010, 10:02:51 PM
That's true. It looks like the transitions between colors are just so fast you can't really see them, probably because of the normal behavior of the points as they iterate--it looks like the points tend to stay near axes.


Title: Re: Coloring the Mandelbulb
Post by: trafassel on May 02, 2010, 10:12:55 PM
Colored combination of the last 2 pictures ( with Paint.Net ).


Title: Re: Coloring the Mandelbulb
Post by: Nahee_Enterprises on May 03, 2010, 02:42:38 PM
Colored combination of the last 2 pictures ( with Paint.Net ). 

Ahhhh...  now we are getting somewhere!!!    :)
 


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on May 03, 2010, 08:33:35 PM
looks like the colouring could be iteration-additive or something, so that you automatically mix all the colours per iteration to do a final either nice and smooth or boring (that has to be tried out^^) gradient :)


Title: Re: Coloring the Mandelbulb
Post by: trafassel on May 10, 2010, 11:54:27 PM
The color combination works, but some drawings are are weird.



Title: Re: Coloring the Mandelbulb
Post by: kram1032 on May 11, 2010, 08:53:55 PM
looks a lot like a wave pattern :)


Title: Re: Coloring the Mandelbulb
Post by: trafassel on May 13, 2010, 01:37:20 AM
Same color method; 10 iterations.


Title: Re: Coloring the Mandelbulb
Post by: reesej2 on May 13, 2010, 01:56:13 AM
Wow, very nice! Looks amazing.


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on May 13, 2010, 11:11:46 AM
That looks pretty good :)


Title: Re: Coloring the Mandelbulb
Post by: KRAFTWERK on May 14, 2010, 10:40:08 AM
WOW, it looks like those fabrics which changes "metallic" colours due to the light angle.

Really amazing!


Title: Re: Coloring the Mandelbulb
Post by: cbuchner1 on May 14, 2010, 11:23:46 AM

Soap bubble!


Title: Strawberry as 2D poster
Post by: trafassel on May 14, 2010, 12:09:48 PM
Color combination is given by (Gestaltlupe formula):

        public override void Init() {
          base.Init();
          additionalPointInfo=new AdditionalPointInfo();
          gr1=GetDouble("Formula.Static.Cycles");
          int tempGr=(int)gr1;
          gr1=gr1- tempGr;
          gr1=1-gr1;
          gr1*=2.4;
        }

 double gr1=0;

        public override long InSet(double ar, double ai, double aj,  double br, double bi, double bj, double bk, long zkl, bool invers) {
            double aar, aai, aaj;
            long tw;
            int n;
            int pow = 8; // n=8 entspricht dem Mandelbulb
                double gr =Math.Pow(10,gr1)+1.0;  //   10; // Ab diesem Wert liegt mit Sicherheit Nichtzugehörigkeit zur Menge vor.
            double theta, phi;

            double r_n = 0;
            aar = ar * ar; aai = ai * ai; aaj = aj * aj;
            tw = 0L;
            double r = Math.Sqrt(aar + aai + aaj);

             double      phi_pow;
             double       theta_pow;
             double    sin_theta_pow;
              double  rn_sin_theta_pow;

additionalPointInfo.red=0;
additionalPointInfo.green=0;
additionalPointInfo.blue=0;

double red=0; double green=0; double blue=0;

            for (n = 1; n < zkl; n++) {

                theta = Math.Atan2(Math.Sqrt(aar + aai), aj);
                phi = Math.Atan2(ai, ar);
                r_n = Math.Pow(r, pow);

                phi_pow=phi*pow;
                theta_pow=theta*pow;
                sin_theta_pow=Math.Sin(theta_pow);
               rn_sin_theta_pow=r_n* sin_theta_pow;


                ar =  rn_sin_theta_pow * Math.Cos(phi_pow)+br;
                ai = rn_sin_theta_pow * Math.Sin(phi_pow)+bi;
                aj = r_n * Math.Cos(theta_pow)+bj;

                aar = ar * ar; aai = ai * ai; aaj = aj * aj;
                r = Math.Sqrt(aar + aai + aaj);

if(n>2) {
/*
double arPos=ar; if(arPos<0) arPos=-ar;
double aiPos=ai; if(aiPos<0) aiPos=-ai;
double ajPos=aj; if(ajPos<0) ajPos=-aj;
red+=Math.Abs(ar)/r;
green+=Math.Abs(ai)/r;
blue+=Math.Abs(aj)/r;
*/

if(ar>0)
  red+=ar/r;
if(ai>0)
  green+=ai/r;
if(aj>0)
  blue+=aj/r;

}

                if (r > gr) { tw = n; break; }

            }

additionalPointInfo.red=red;
additionalPointInfo.green=green;
additionalPointInfo.blue=blue;


            if (invers) {
                if (tw == 0)
                    tw = 1;
                else
                    tw = 0;
            }

            return (tw);

        }


Title: Strawberry Colored
Post by: trafassel on May 14, 2010, 12:12:40 PM
Colors on a flat surface.


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on May 14, 2010, 12:18:02 PM
also nice but obviously, the shape adds a lot to it. :)


Title: Re: Coloring the Mandelbulb
Post by: trafassel on May 21, 2010, 09:23:23 AM
I don't think so. It seems, as the color "knows" how the shape looks in higher iterations. And perhaps this is fundamental for all variants of the mandelbulb fractal.

(http://files.me.com/trafassel/ovqp7l)


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on May 21, 2010, 11:50:49 AM
With adding a lot to it, I meant things like shadow.
That colour pattern lacks of shadow. No wonder: Where should it come from? :)


Title: Re: Coloring the Mandelbulb
Post by: trafassel on June 01, 2010, 10:51:52 PM
Same picture as the spine in the gallery, but with post processing (Paint.Net).


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on June 03, 2010, 11:50:37 AM
nice :D A metallic soap bubble :)


Title: Re: Coloring the Mandelbulb
Post by: trafassel on June 05, 2010, 10:48:12 PM
Stereo image

(http://files.me.com/trafassel/fm3zww)(http://files.me.com/trafassel/vnk2lm)


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on June 06, 2010, 06:44:40 PM
hard to think of it as stereo with this arrangement :P
But it looks very nice :)


Title: Re: Coloring the Mandelbulb
Post by: cKleinhuis on June 06, 2010, 07:20:01 PM
use CTRL - +/-
to lower the zoom, to see it side by side


Title: Re: Coloring the Mandelbulb
Post by: reesej2 on June 08, 2010, 06:53:41 AM
I can't seem to make it go side-by-side... but I can turn my head just enough to make it work. Cool!


Title: Re: Coloring the Mandelbulb
Post by: trafassel on June 08, 2010, 09:52:55 AM
Next time i combine both pictures in one bitmap. You can also use two webbrowsers side by side.



Title: Re: Coloring the Mandelbulb
Post by: kram1032 on June 08, 2010, 02:54:48 PM
The Ctrl - idea works but the text now is ridiculously small xD


Title: Re: Coloring the Mandelbulb
Post by: klixon on June 08, 2010, 05:05:57 PM
The Ctrl - idea works but the text now is ridiculously small xD
Then you should press CTRL-0 (that's a zero) to reset the zoom-factor ;)


Title: Re: Coloring the Mandelbulb
Post by: bib on June 08, 2010, 08:26:00 PM
Stereo image


Cool!


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on June 08, 2010, 09:52:36 PM
klixon: I know. I'd just like to read and see images at the same time :)


Title: Re: Coloring the Mandelbulb
Post by: trafassel on June 15, 2010, 09:23:27 PM
Color distribution inside the mandelbulb.

http://www.youtube.com/watch?v=j4_9rtHfDDU


Title: Re: Coloring the Mandelbulb
Post by: trafassel on June 23, 2010, 11:51:13 PM
Same coloring method, other fractal (formula 21 type).


The solution of a 2 coloring problem on a fractal map.


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on June 24, 2010, 10:36:48 AM
it seems underexposured (dark) to me but it looks nice :)


Title: Re: Coloring the Mandelbulb
Post by: M Benesi on June 27, 2010, 03:42:22 AM
I've been using the orbital color scheme since I discovered how to implement it in ChaosPro, and it's pretty nice.  I decided to mess around today, and changed the values I picked out of the iterations.  

  First, I'm using what I call a "complex triplex" formula type.  It runs quite a bit faster than the trig versions, and I just threw in some further optimizations that shaved an extra second off of a small (444x444) zoomed in 10 iteration z^9 bulb.  

  I was using the values r (the magnitude of x,y and z at the end of an iteration), x, y, and z to assign colors.  Well, I decided to simply take the components of the 2 complex numbers after I take them to the nth power, and ended up with a similar, but slightly more interesting color scheme (will put code after image):

z^3:
(http://lh5.ggpht.com/_gbC_B2NkUEo/TCanhYaJ-YI/AAAAAAAAAg0/muECr6NKCkU/pretty%20coloring%20tree.jpg)
z^7 4d:
(http://lh6.ggpht.com/_gbC_B2NkUEo/TCaprRFKEbI/AAAAAAAAAg8/aOV2AB8aRdo/disco%20ball.jpg)
z^9:
(http://lh6.ggpht.com/_gbC_B2NkUEo/TCaq9N3P87I/AAAAAAAAAhE/trg1Fj99D2Y/quick%20and%20prett.jpg)

Code:
r1=sqrt(sqr(sy)+sqr(sz));

// this series for n=11, 13,15,16,17 shaves a bit of time off of calculations (halves time used)

//I just found out that ChaosPro's compiler automatically does this for
// certain powers: 2-10,12,14   so I rewrote the script to cover the powers (up to 17)
// that it didn't aut0matically do it for

if (n==11) {
r3=sqr(sqr(sqr(r1)))*sqr(r1)*r1;
} else if (n==13) {
r3=sqr(sqr(sqr(r1)))*sqr(sqr(r1))*r1;
} else if (n==15) {
r3=sqr(sqr(sqr(r1)))*sqr(sqr(r1))*sqr(r1)*r1;
} else if (n==16) {
r3=sqr(sqr(sqr(sqr(r1))));
} else if (n==17) {
r3=sqr(sqr(sqr(sqr(r1))))*r1;
}  else {
r3=r1^n;
}

r3=r3^(-1);   //  instead of dividing by r3 below, I avoid division by zero errors by taking it to the -1 power here

victor=complex(sx,r1);
bravo=complex(sy,sz);

if (n==11) {
victor=sqr(sqr(sqr(victor)))*sqr(victor)*victor;
} else if (n==13) {
victor=sqr(sqr(sqr(victor)))*sqr(sqr(victor))*victor;
} else if (n==15) {
victor=sqr(sqr(sqr(victor)))*sqr(sqr(victor))*sqr(victor)*victor;
} else if (n==16) {
victor=sqr(sqr(sqr(sqr(victor))));
} else if (n==17) {
victor=sqr(sqr(sqr(sqr(victor))))*victor;
}  else {
victor=victor^n;
}

if (n==11) {
bravo=sqr(sqr(sqr(bravo)))*sqr(bravo)*bravo;
} else if (n==13) {
bravo=sqr(sqr(sqr(bravo)))*sqr(sqr(bravo))*bravo;
} else if (n==15) {
bravo=sqr(sqr(sqr(bravo)))*sqr(sqr(bravo))*sqr(bravo)*bravo;
} else if (n==16) {
bravo=sqr(sqr(sqr(sqr(bravo))));
} else if (n==17) {
bravo=sqr(sqr(sqr(sqr(bravo))))*bravo;
}  else {
bravo=bravo^n;
}

nx=part_r(victor);
ny=part_i(victor)*part_r(bravo)*r3;   // this is the part I would have divided by r3, it's better to multiply and never
nz=part_i(victor)*part_i(bravo)*r3;  // get a division by zero error...

if (juliaMode) {
sx=nx+cr;
sy=ny+ci;
sz=nz+cj;
} else {
sx=nx+(pixelr);
if (absmode) {
sy=ny+(pixeli);
} else {
sy=ny+abs(pixeli);
}
sz=nz+(pixelj);
}
if (rXmodeb) {
z=quaternion(real(bravo),imag(bravo),real(victor),imag(victor));  // this is the new method, using components
  // before all math is applied to them (the addition of pixel components, plus multiplication by r3)
} else if (rXmodec) {
z=quaternion(sx,sy,sz,0);
r=cabs(z);
z=quaternion(r,sx,sy,sz);    // normal orbital coloring method
} else {
z=quaternion(sx,sy,sz,0);   // my initial mistake
}
bail=abs(sx)+abs(sy)+abs(sz);


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on June 29, 2010, 07:39:51 PM
as said in the other thread:
Great :D


Title: Re: Coloring the Mandelbulb
Post by: trafassel on August 15, 2010, 04:35:46 AM
Stereo Images (cross eye).


Title: Re: Coloring the Mandelbulb
Post by: kram1032 on August 15, 2010, 12:28:23 PM
O.o
What a colourful danger for the eyes lol


Title: Re: Coloring the Mandelbulb
Post by: trafassel on August 16, 2010, 05:40:50 PM
Same scene, higher iterations. Prostproduction is done with Paint.Net.



Title: Re: Coloring the Mandelbulb
Post by: trafassel on August 18, 2010, 11:26:06 PM
Classic overlay coloring for all i



Title: Re: Coloring the Mandelbulb
Post by: trafassel on August 18, 2010, 11:31:52 PM
Classic overlay coloring for all i


Title: Re: Coloring the Mandelbulb
Post by: trafassel on August 18, 2010, 11:43:16 PM
Overlay coloring for the weighted sum of (x,y,z) in the iteration step i-2,i-1 and i.


Title: Re: Coloring the Mandelbulb
Post by: trafassel on August 23, 2010, 09:52:33 PM
Coloring (r,g,b) as weighted sum of (x,y,z) in the iteration step n-2,n-1 and n in a smooth iteration movie.

http://www.youtube.com/watch?v=mfGCzAjCzfM 



Title: Re: Coloring the Mandelbulb
Post by: M Benesi on September 06, 2010, 04:40:06 AM
  I've written some algorithms for ChaosPro, capturing various parts of the mathematics for various coloring styles. 

  As I use complex triplex algebra rather than trig to do my calculations (for speed, 2x as fast on my comp), I have the option of using parts of the complex numbers (rather than simply using x,y, and z components after an iteration, I can use the parts of the complex numbers).  Using the complex portions (prior to adding in pixel values/finishing the iteration calculation) makes for some very distinct coloring patterns.

  I also "average" the components (not simply taking the last component, or a specific iteration's component values).  It's not really an average, rather it's the total magnitude of the component over all iterations:
x_component =sqrt (new_x^2 + x_component^2)   // same for y, z, or whatever...

  I like doing this, instead of calculating standard average because... I don't know.  I just do.

  Anyways, you can get awesome contrasts when using HSLA lighting mode (hue/saturation/luminosity/alpha channel) by using the correct component to assign luminosity.  It really helps enhance the details of the fractal. 

  Following are a couple images:
(http://lh4.ggpht.com/_gbC_B2NkUEo/TIRT6ox5MaI/AAAAAAAAAoc/kh8uvAfilJY/alive.jpg)
(http://lh3.ggpht.com/_gbC_B2NkUEo/TIRT6kRQLEI/AAAAAAAAAoY/AA9dcqMytmc/space%20platform.jpg)
  (http://lh6.ggpht.com/_gbC_B2NkUEo/TIRT6Vr8kLI/AAAAAAAAAoQ/a2MMpyQfDnc/happy%20fun%20ball.jpg)

  (http://lh4.ggpht.com/_gbC_B2NkUEo/TIKuZMDdp5I/AAAAAAAAAnM/sddZ-zB3INY/8th%20order%20mandelbrot%20gold%20big.jpg)