Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => (new) Theories & Research => Topic started by: msltoe on February 22, 2016, 10:45:47 PM




Title: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: msltoe on February 22, 2016, 10:45:47 PM
(http://nocache-nocookies.digitalgott.com/gallery/18/803_22_02_16_11_44_10.png)
Here's the code:

Code:
rad2=0.5;
norm = x*x+y*y+z*z;
 while (iter<imax) {

   (*nfunc)++;

   r2 = x*x + y*y + z*z;

   if (r2 < rad2*rad2) {

    maxnorm = ((double) (abs(i+j) % 12))/11.0;
    iter=imax+1;

   }  else {

    x = x*1.7;
    y = y*1.7;
    z = z*1.7;
    r1 = x*x + (y-1.0)*(y-1.0) + z*z;

    x1 = 3.0 * x / r1;
    y1 = 3.0 * (y-1.0) / r1+1.9;
    z1 = 3.0 * z / r1;

    i = (int)round(x1);
    j = (int)round(z1);

      x = x1 - round(x1);
      y = y1;
      z = z1 - round(z1);

   }

   norm = x*x+y*y+z*z;

   iter++;
 }

 if (iter == imax) {iter = imax - 1;}

 *minnorm = maxnorm;
 return(iter);
}


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: ericr on February 23, 2016, 02:34:21 PM
It is Wonderfull and amazing
I hope that it will existe on mandelbulb3d
Ericr


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: msltoe on February 23, 2016, 07:58:20 PM
Thanks ericr!

Showing the versatility of using a conformal mapping, here's a Riemann cactus:
(https://farm2.staticflickr.com/1658/25192550956_4a4250e79d_o_d.png)


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: cKleinhuis on February 24, 2016, 12:34:56 AM
spike, and it looks promising for use in hybrid formulas:)


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on February 24, 2016, 04:52:06 AM
Beautiful bulbs  O0
 I will try and code it for  Mandelbulber.  But my last attempt I created the hairy reimann sphere bulbs, so I still  need to learn more maths.


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: trafassel on March 02, 2016, 08:31:09 PM
Thank you for sharing you code. I did'nt understand any of it. For instance I have no idea of maxnorm, minnorm, i and j, so i omited in my implementation.

A typical bailout (if norm>bailout then return false) adds a balloon to each center of the spheres.






Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on March 02, 2016, 11:44:54 PM
@ Msltoe  To use the formula for making hybrids I had to modify    if (r2 < rad2 * rad2) ( I could not have   iter=imax+1;).   I enable the smooth inside function when "inside" is visible, otherwise disable to save render time.  Attached image shows  is a slice showing the internal symmetry.
 
@trafassel. i and j confused me, then  Msltoe explained in another post that i and j were used only for coloring so could be omitted.

@ericr.  This is the formula for the Mandelbulber images. With bailout  range of 1.0 to 2.4.

Code:
//RiemannSphereMsltoe     Variation2---------------------------------- 
  //http://www.fractalforums.com/new-theories-and-research/another-way-to-make-my-riemann-sphere-'bulb'-using-a-conformal-transformation/
void RiemannSphereMsltoeV2Iteration(CVector3 &z, const cFractal *fractal)
{
  double rad2 = fractal->transformCommon.minR05; // radius variable, default = 0.5
  double r2 = z.x * z.x + z.y * z.y + z.z * z.z + 1e-061;
  if (r2 < rad2 * rad2)
  {
    if (fractal->transformCommon.functionEnabled)
      z *=  rad2 * ((r2 * 0.1) + 0.4) * 1.18 /r2; // smooth inside
  } // if internal smooth function is not enabled → z = z;
  else
  {
    z *= fractal->transformCommon.constantMultiplier222; //1.7; 1.7, 1.7 //1st scale variable, default vect3 (1.7, 1.7, 1.7)
    double r1 = z.x * z.x + (z.y-1.0)*(z.y-1.0) + z.z * z.z;// used to normalise about (0, -1, 0)
    CVector3 newZ = z;
    newZ.x = z.x / r1; //normalise
    newZ.y = (z.y - 1.0) / r1;
    newZ.z = z.z / r1;
    newZ *= fractal->transformCommon.scale3;// 2nd scale variable , default = double (3.0)
    z.x = newZ.x - round(newZ.x);
    z.y = newZ.y + fractal->transformCommon.offset105;// y offset variable, default = double (1.9);
    z.z = newZ.z - round(newZ.z);
  }
}
// Bailout setting range 1.0 to 2.4,


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: msltoe on March 03, 2016, 12:06:18 AM
@trafassel and @mclarekin sorry for confusing you with my crazy i, j, and iter stuff.
It's all coloring (i,j) and termination conditions (iter=imax+1) to make solid smooth shapes.
To get the spikes in the second picture, it's an interior cone formula, something like x*x+y*y < z*z that trigger a termination of the loop but still calling it "interior."
I think you guys have gotten the main idea though.

A few other ideas to consider:
the x-round(x) stuff is just periodic cubic tiling. There are a few other 3-D tilings out there https://en.wikipedia.org/wiki/Bravais_lattice.
Also, we are only employing scaling, translation and sphere inversion. The rotation matrix might make for some spiral-like shapes.




Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on March 03, 2016, 04:09:36 AM
@msltoe

My logic was incorrect, I now see that I can still use     iter=imax+1; when making hybrids, it will just mean that any initial point inside r2 < rad2 * rad2 will not be further iterated in the hybrid loop after the first iteration. The other formula(s) in the hybrid loop,  will in subsequent iterations, move the remaining points either inside (and be terminated) or outside (continue being iterated).  I also could even put the same r2 < rad2 * rad2 termination in other formulas in the hybrid loop as well.   Infinite possibilities yet again  ;D

BTW.  With Distance Estimation for this fractal  I generally use deltaDE method with logarithmic function, but I can sometimes use linear function and get a slightly different "texture" to the image.

The attached image is a "Sym4 then  Riemann V2" alternating sequence , with the Riemann formula stopping at iteration number 4.


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on March 03, 2016, 04:23:04 AM
and when I remove the Riemann V2 , the pure sym4 image looks like this. A huge change.


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: msltoe on March 03, 2016, 01:26:34 PM
@mclarekin I set iter=imax+1 and then after the loop I always set iter = iter - 1. This means that a loop that ended because it ran out of iterations will not be interior, but the solid smooth shapes (forced exit, iter=imax+1) will be interior.


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on March 05, 2016, 12:42:49 AM
Thanks Msltoe for advice. O0 Soon I will return to this formula, and hopefully get it running properly. I plan to include some checkboxes to enable different interior modes e.g. sphere, cone etc. I am enjoying this maths/programming learning curve. :)


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on March 11, 2016, 07:33:12 AM
I understand more  ;D, two offsets, two scales and an inversion. I like this version a lot. I have still to get back to the interior modes

Code:
//RiemannSphereMsltoe     Variation2----------------------------------
  //http://www.fractalforums.com/new-theories-and-research/another-way-to-make-my-riemann-sphere-'bulb'-using-a-conformal-transformation/
void RiemannSphereMsltoeV2Iteration(CVector3 &z, const cFractal *fractal)
{
  double rad2; // radius default = 0.5
  double r2 = z.x * z.x + z.y * z.y + z.z * z.z;// r2 or point radius squared
  if (r2 < rad2 * rad2)
  {
    if (fractal->transformCommon.functionEnabled)// smooth inside
      z *=  rad2 * ((r2 * 0.1 * thickness factor) + 0.4 * thickness factor) * 1.18 * fudge factor /r2; // defaults = 1.0
  } // if internal smooth function is not enabled → z = z;
  else
  {
    double shift; //first offset default = 1.0
    z *= first scale; //1st scale variable, default vect3 (1.7, 1.7, 1.7),
    double r1 = z.x * z.x + (z.y-shift)*(z.y-shift) + z.z * z.z  + 1e-061;// r1 = length^2,
    CVector3 newZ = z;
    newZ.x = z.x / r1; //inversions by length^2
    newZ.y = (z.y - shift) / r1;
    newZ.z = z.z / r1;
    newZ *= second scale;// 2nd scale variable , default = double (3.0)
    z.x = newZ.x - round(newZ.x); // form of tiling,
    z.y = newZ.y + second shift ;// y offset variable, default = double (1.9);
    z.z = newZ.z - round(newZ.z);
  }
}


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on March 17, 2016, 09:58:37 AM
This is the current code I am using with Mandelbulber dev version.  I have added in an option of sine function at the end (copied from a different msltoe version).


Code:
//RiemannBulbMsltoe Mod2----------------------------------
  //http://www.fractalforums.com/new-theories-and-research/another-way-to-make-my-riemann-sphere-'bulb'-using-a-conformal-transformation/
void RiemannBulbMsltoeMod2Iteration(CVector3 &z, int i, const cFractal *fractal)
{
  double rad2 = fractal->transformCommon.minR05; // radius default = 0.5
  double r2 = z.x * z.x + z.y * z.y + z.z * z.z;// r2 or point radius squared
  if (r2 < rad2 * rad2)
  {
    if (fractal->transformCommon.functionEnabled)
      z *= rad2 * ((r2 * 0.1) + 0.4) * 1.18 * fractal->transformCommon.scaleA1 /r2; // smooth inside
    else
    {
      z *= fractal->transformCommon.constantMultiplier111;
    }
  } // if internal smooth function is not enabled → z = z * scale, default vect3(1,1,1)
  else
  {
    z *= fractal->transformCommon.constantMultiplier222; //1st scale variable, default vect3 (1.7, 1.7, 1.7),

    double shift = fractal->transformCommon.offset1;
    double r1 = z.x * z.x + (z.y-shift)*(z.y-shift) + z.z * z.z  + 1e-061;// r1 = length^2,

    z.x = z.x / r1; // inversions by length^2
    z.y = (z.y - shift) / r1;
    z.z = z.z / r1;

    z *= fractal->transformCommon.scale3;// 2nd scale variable , default = double (3.0)
    z.y = z.y + fractal->transformCommon.offset105;// y offset variable, default = double (1.9);

    if (fractal->transformCommon.functionEnabledx)
    {
      z.x = z.x - round(z.x); // periodic cubic tiling,
      z.z = z.z - round(z.z);
    }
    if (fractal->transformCommon.functionEnabledxFalse)
    {
      z.x = fabs(sin(M_PI * z.x * fractal->transformCommon.scale1));
      z.z = fabs(sin(M_PI * z.z * fractal->transformCommon.scale1));
    }
  }
}


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transf...
Post by: gannjondal on April 07, 2016, 11:32:57 PM
Could not resist to create a (JIT) m3f for Mandelbulb3D.

Here an example (a hybrid of 2 x the same m3f with different values):
(http://nocache-nocookies.digitalgott.com/gallery/18/13136_07_04_16_11_20_23.jpeg)

The m3f does contain some add-ons which are explained in the info section of the formula.

One example about the structures that can be created with different tile, and post calculation types can be found at
(http://pre15.deviantart.net/e0d4/th/pre/i/2016/088/5/6/riemann_style___different_approach_by_gannjondal-d9wy643.jpg)

I am attaching 3 files:

  • JIT_gnj_RiemannBulbMsltoe_04.m3f - The 'actual' m3f
  • JIT_gnj_TiledSpheresMsltoe_04.m3f - When starting I had made a mistake which caused the inversion to be ignored, only second scaling, and tiling did occur.
      But I found that this 'error' could be good used in hybrids
  • m3d1-0313aNEW-035i-XXL-v190.m3p - param file for the first picture (different colors, as my map is not publicly available)


Params of the first picture for copy & paste:
Mandelbulb3Dv18{
g.....r3...ZF...w....I.....K3TPHcGl2.fVT7e2oiq/EttXj90jo2zPxHSF7Y8Jqza8hoUIBOovj
................................P/sm.TCUfz1..........RlI0...............y.2...wD
...Uz6...........I.0/....2Ek2...70....k4.....Ei3equEUgnD/.EZ67uD..2b1dNaNu1....G
/JEnAnQD1E../2U.ddm2P7itz4LRnnUjF3yD/rog8CmTIz1...........U5.....y1...sD...../..
.z1...kDXttbE5EZkxX5ycJhBuCEzsEqJOmaPOoj0rEeTB0fkwHLe3VW1//NzkWwa.EF/hqDFjPera9z
8xXvkTDBt2kOzyDsJj11RBqDUoAnAtnD..........UNaNmD.A....sD..G.....................
..kSIsuFVf5VzqAnAt1...sD....zw1....................................2AD5Ew....k1.
.....CnAnz1.......kzHzzzz1.I.w7.C....EB....A....C0fm8g0.UKU3....S....A28...mMN5I
...U.qFG9yzb2zzz1Q.9zz7f216.qAmzn5ye..ktPnvka6zD6A72QifFDz9............25xzFrA0.
.Ub96aAIVzv01se7Umvxz0..........2Q13.oF2A...0/M3UlKVzaFxHuLqndpj.Q7P0vNKpy1.n6nz
n5ye...0.p4HE3zD.u41pmERLz1..........E/6Q..QgU/..UdiYhaTH.A8nAaEFBI1.1UY9GDoC2zD
/EU0.wzzz1...................................o4Pj.kg9CbvOhFKbB3.iesQbDfB2F39.Iik
duRbElIH4/kplidvUSpF.p0.Z4cOi1fLkFp8.A9XntSfZ7rHh.ksv8evnmaH.p0.zS7UijvQ7NYF.c9a
2uSguhYGo.UhHibv..EsUa3feeWCNqGQIJ36wk8EwyLsUa3f................................
E....6E.F2E.....I....c....UG7FpLbtaOT7JOZpKMitaEplaMBB5PoxKNT/1B................
...................wzAWEGmEcQSwCnAnAnAnAvznAnAnAnAnyz........U.EaNaNaNaNyz1.....
...sz.........zD........kz1.....................................................
.....................2.....3....8....cIGIxpNidqLGZKNh3aPi7IRg7KHnl4RjJqLkE1.....
.....................2gmVKYhnj.ENEUJCoWgxyP8QxckpXG..dNaNaNaNavDai7lU.fQMznQc3Nv
wxHlz0KtE9mqt9zD........kz1........wzMua210gmN.E................................
................................}
{Titel: m3d1-0313aNEW-035i-XXL-v190}

Hope that's ok :-)


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: mclarekin on April 08, 2016, 06:57:08 AM
Nice work and information  O0 O0 O0


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: msltoe on April 08, 2016, 02:19:16 PM
@gannjondal: Thanks for spreading the formula to the Mandelbulb3D crowd. Also, I like how all the ridges connect in the 2nd picture.


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: M Benesi on April 09, 2016, 02:15:30 AM
popped in to do a drive by <clap>.    O0

 


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: ericr on April 09, 2016, 05:06:08 PM
Sorry but i usé thé parm paste,copy and i don t have your fractal i have nothing
I usé your 2 formulas but no !!!!!!!!


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: ericr on April 10, 2016, 11:33:51 AM
sorry again but yet all goes very well 
it is find and wonderfull and I do the same !!!!!!!!!!
nice day


Title: Re: Another way to make my Riemann sphere "bulb" using a conformal transformation
Post by: gannjondal on April 10, 2016, 10:20:36 PM

@msltoe + mclarekin:  Thank you very much for sharing your knowledge, and for explaining the details. That did help quite much :angel1:

Regarding the second picture: 
I tried several ways to change the last step, i.e. the tiling, mainly with some remembrance to something what had been done in good old UF.
It's amazing what effects can come up if trying to use common 2D effects to 3D.
 
One combination proved to be particular fruitful. The connections come up more or less automatically through the usage of sin and cos:

Code:
// original tiling
  x := x_tmp - Round(x_tmp);
  z := z_tmp - Round(z_tmp);

-->

// changed tiling
 else if Type_Tiling = 2 then
   begin
     x_diff := sin(x_tmp);
     z_diff := cos(z_tmp);
   end
   
   .....
   
 else if Type_PostCalc = 6 then
   begin
     tmp1 := x_diff*x_diff;
     SinCos(z_diff, stmp2, ctmp2);
     x := tmp1 + (1-ctmp2)/2;
     z := tmp1 + (1+stmp2)/2;
   end

The effect is too strong to use it in the full formula.
But if using in hybrids like [n times full formula (almost unchanged) -> tile formula only with changed tiling] things like the second picture can come up.


@ericr:  Great to hear that it finally works  :happy: