Welcome to Fractal Forums

Fractal Software => Gestaltlupe Gallery => Topic started by: trafassel on February 29, 2016, 10:48:11 PM




Title: Mandelbulb Plant
Post by: trafassel on February 29, 2016, 10:48:11 PM
Mandelbulb Plant

(http://nocache-nocookies.digitalgott.com/gallery/18/999_29_02_16_10_48_10.jpeg)

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

My first spirals in a power 2 Mandelbulb variant.


Title: Re: Mandelbulb Plant
Post by: Chillheimer on February 29, 2016, 11:56:52 PM
nice one!


Title: Re: Mandelbulb Plant
Post by: cKleinhuis on March 01, 2016, 01:59:08 AM
wow, what a nice shot, it really looks plant like ;)


Title: Re: Mandelbulb Plant
Post by: mclarekin on March 02, 2016, 02:14:14 AM
@ Trafassel.  Very plant like. O0 O0 O0

I tried coding it into Mandelbulber, but my  maths and programming was not good enough.

 I noted with my attempted code below::

  Line 3 ->    x1 not used later.

  Line 5 ->     z.y = 0, then I cannot see it being given another value before being used later in the code to multiply.

  code ->        if(x2 * z.x < 0.0) spin=!spin;//  I don't understand what is happening.






Code:
  double power = fractal->bulb.power;
  double phi = atan2(z.y, z.x);
  double x1= z.x;          // x1 ???? not used ------------------
  z.x = cos(-phi) * z.x - sin(-phi) * z.y;
  z.y = 0.0; // what???? -----------------------------------------
  double theta = atan2(-z.z, -z.x);

  if (fractal->transformCommon.functionEnabledFalse)
    theta = theta + M_PI;

  theta=(power - 1.0) * theta;
  double x2 = z.x;
  double re = cos(theta);
  double im = sin(theta);
  double a = re * z.x - im * z.z;
  z.z = re * z.z + im * z.x;
  z.x = a;
  //if(x2 * z.x < 0.0) spin=!spin;// switch off spin ????---------
  re = cos(power * phi);
  im = sin(power * phi);
  a = re * z.x - im * z.y;  // line 5 above   z.y = 0 ????--------
  z.y = re * z.y + im * z.x;
  z.x = a;

  CVector3 z2 = z * z;
  double r = z2.x + z2.y + z2.z;
  r=pow( r, (power - 1.0) / 2.0);
  z *=r;
  z.y +=c.z; // axis swap
  z.x +=c.x;
  z.z +=c.y;