Welcome to Fractal Forums

Fractal Software => Mandelbulber => Topic started by: mclarekin on February 14, 2016, 05:39:44 AM




Title: Bulb - Quaternion Hybrids
Post by: mclarekin on February 14, 2016, 05:39:44 AM
In Mandelbulber dev. V2.07 there are some new squaring formulas added. When coding them I  look at what I call the "base shapes", being the base formula without any constants added (i.e no add Cpixel, no add Julia Constant). Attached image shows that they render as approx. spheres.

The following posts will show some basic hybridisation.



Title: Re: Bulb - Quaternion Hybrids
Post by: M Benesi on February 14, 2016, 07:45:46 AM
  M3D Sym 3... beautiful.  I think my dad will be partial to the Julia bulb one, for an entertaining reason. 


Title: Re: Bulb - Quaternion Hybrids
Post by: mclarekin on February 14, 2016, 08:33:24 AM
The following hybrids all have a mandelbulb pwr 2 as the second formula in the sequence, and run one iteration each. In three of these examples I added a small amount of addition constant to "bring out" the pattern, other than that there is still no addition of constants therefore the hybrids are still approx spheres.

Changing the power of the mandelbulb will change the pattern.

At this stage adding some constants or other tweaks will create  a large range of  hybrids. The Mandlbulbs,  Julia Bulbs and standard quaternion all work with each other and use the same fast analytic DE.


Title: Re: Bulb - Quaternion Hybrids
Post by: mclarekin on February 14, 2016, 09:44:55 AM
In previous quaternions I had added some internal scaling, that worked OK with Delta DE but would not work with analytic DE.
So I tried a vector based DE calculation adjustment that I had used with Benesi Mag transforms, and the smooth sphere turned into a ribbed sphere. Now when I use this Quaternion 3DE to make hybrids, the beginning base shape is textured rather than smooth.

Quote

 aux.r_dz = aux.r_dz * 2.0 * aux.r;
  z = CVector3(z.x * z.x - z.y * z.y - z.z * z.z, z.x * z.y, z.x * z.z);  // Quaternion base shape

  CVector3 temp = z;
  double tempL = temp.Length();
  z *= fractal->transformCommon.constantMultiplier122; // internal scaling, default  (1,2,2)
  if (tempL < 1e-21)
    tempL = 1e-21;
  double avgScale = z.Length() / tempL;
  aux.r_dz *= avgScale;



Title: Re: Bulb - Quaternion Hybrids
Post by: mclarekin on February 14, 2016, 10:38:02 AM
M3D's msltoe sym3 formula seems to suit the Quaternion 3DE hybridisation, as it was smoothish in its Julia form, so it could handle extra texture. This Quaternion 3DE was added to the sym3 UI, with "start/stop at" iteration parameters. The attached images show a comparison of sym3  hybridised with the standard Quat and the Quat 3DE, with the quaternion  part starting at different iterations


Title: Re: Bulb - Quaternion Hybrids
Post by: mclarekin on February 14, 2016, 11:09:08 AM
Now I add  a -0.8 to the x-axis (julia constant/offset/shift/addition constant/translation) to create something like msltoe's original image, and the differences in surface texture can be seen. Standard DE  to the left, and Quat 3DE on the right.  Both images have the quaternion part "late starting" at iteration 5.


Title: Re: Bulb - Quaternion Hybrids
Post by: mclarekin on February 14, 2016, 11:44:42 PM
Both images above, had the quaternion part "late starting" at iteration 5.  That was to make them look like a Msltoe Julia Bulb. The attached images have the quat part starting at iteration 0. The Julia Bulb is greatly distorted by the quaternion influence.


Title: Re: Bulb - Quaternion Hybrids
Post by: mclarekin on February 15, 2016, 01:00:43 AM
Now when standard DE is too smooth and 3D Vector based DE is too textured, a parameter is added to vary the influence.  The attached images demonstrate changing the influence from 0 (none) to  1 (full) , and also 4.
The influence factor can also be dropped to say - 0.3 before the DE calculation goes bad.  So what we have is a tool for distorting a smooth bulb surface, albeit this  is a DE tweak not a fractal tweak.

Code:
  {
    aux.r_dz = aux.r_dz * 2.0 * z.Length();
    z = CVector3(z.x * z.x - z.y * z.y - z.z * z.z, z.x * z.y, z.x * z.z);
    if (fractal->transformCommon.functionEnabledAxFalse)
    {
      CVector3 temp = z;
      double tempL = temp.Length();
      z *= CVector3(1.0, 2.0, 2.0); // mult. scale (1,2,2)
      if (tempL < 1e-21) tempL = 1e-21;
      double avgScale = z.Length()/tempL;
 [color=red]     //aux.r_dz *= avgScale * fractal->transformCommon.scaleA1;
      double tempAux = aux.r_dz * avgScale;
      aux.r_dz = aux.r_dz + (tempAux - aux.r_dz) * fractal->transformCommon.scaleA1;[/color]
    }
    else
    {
      z *= CVector3(1.0, 2.0, 2.0); // mult. scale (1,2,2)
    }
  }


Title: Re: Bulb - Quaternion Hybrids
Post by: mclarekin on February 15, 2016, 04:14:59 AM
When we create bulb_quat hybrids as two separate formulas with their own UI, we can further manipulate the quaternion influence by entering the number of iterations that are run with the first formula before commencing on the next. The attached images are created by  setting a sequence of the bulb to run for 3 iterations then the quaternion for 3 iterations and then back to the bulb etc. With the additional control that the quaternion can only run between iteration 7 and iteration 23. The image on the left has 0.0  Quaternion 3DE texturing influence, whereas the image on the right has the parameter set to 0.8.