Welcome to Fractal Forums

Fractal Software => Mandelbulber Gallery => Topic started by: fractower on April 06, 2011, 08:51:21 PM




Title: Interacting 8th order bulbs
Post by: fractower on April 06, 2011, 08:51:21 PM
Interacting 8th order  bulbs

(http://nocache-nocookies.digitalgott.com/gallery/6/2792_06_04_11_8_51_21.jpeg)

http://www.fractalforums.com/index.php?action=gallery;sa=view;id=6548

Spatially separated bulbs are allowed to influence one another. Additional orbit traps are created when one bulb maps to another. This creates bulblets in one orientation and bands in another.

Hacked mandelbulber 0.97 fractal.cpp.

          case trig:
         {
                 // offset and rototate bulb 1
                 CVector3 p1(1.5,0,0);
                 CVector3 z1 = z - p1;
            double temp = z1.x;
            z1.x = z1.z;
            z1.z = -temp;
            double r1 = z1.Length();
            double rp1 = pow(r1, p);
            double th1 = z1.GetAlfa();
            double ph1 = -z1.GetBeta();
            CVector3 rot1((p) * th1, (p) * ph1);
            z1 = rot1 * rp1;
            temp = z1.x;
            z1.x =  - z1.z;
            z1.z =  temp;

            // offset bulb2
                 CVector3 p2(-1.5,0,0);
                 CVector3 z2 = z - p2;
            double r2 = z2.Length();
            double rp2 = pow(r2, p);
            double th2 = z2.GetAlfa();
            double ph2 = -z2.GetBeta();
            CVector3 rot2(p * th2, p * ph2);
            z2 = rot2 * rp2;

            // calculate zone of influence for each bulb
            double w1, w2;
            w1 = 1.0/(1.0 + z1.Length()/(z2.Length()+.00001));
            w2 = 1.0/(1.0 + z2.Length()/(z1.Length()+.00001));
            w1 = w1 * w1;
            w2 = w2 * w2;

            // Merge bulbs together.
            z = z1 * w1 + z2 * w2;
            z = z * (1.0/(z.Length()+.00001)) *
                (z1.Length() * w1 + z2.Length() * w2)+constant;
            r = z.Length();
            break;
         }