Logo by mario837 - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. March 28, 2024, 09:47:10 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1] 2   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Another way to make my Riemann sphere "bulb" using a conformal transformation  (Read 2593 times)
0 Members and 1 Guest are viewing this topic.
msltoe
Iterator
*
Posts: 187


« on: February 22, 2016, 10:45:47 PM »


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);
}
« Last Edit: February 22, 2016, 11:45:10 PM by msltoe » Logged
ericr
Fractal Fanatic
****
Posts: 318


« Reply #1 on: February 23, 2016, 02:34:21 PM »

It is Wonderfull and amazing
I hope that it will existe on mandelbulb3d
Ericr
Logged
msltoe
Iterator
*
Posts: 187


« Reply #2 on: February 23, 2016, 07:58:20 PM »

Thanks ericr!

Showing the versatility of using a conformal mapping, here's a Riemann cactus:
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #3 on: February 24, 2016, 12:34:56 AM »

spike, and it looks promising for use in hybrid formulas:)
Logged

---

divide and conquer - iterate and rule - chaos is No random!
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #4 on: February 24, 2016, 04:52:06 AM »

Beautiful bulbs  afro
 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.
Logged
trafassel
Fractal Bachius
*
Posts: 531


trafassel
« Reply #5 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.






* Data844pic10547s1.jpg (246.85 KB, 1200x1200 - viewed 518 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #6 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+1wink.   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,


* msltoe riemV2 ggg9 600.jpg (137.4 KB, 600x600 - viewed 507 times.)
Logged
msltoe
Iterator
*
Posts: 187


« Reply #7 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.


Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #8 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  grin

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.


* msltoe sym4 riemV2 deh2 800.jpg (210.03 KB, 800x600 - viewed 509 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #9 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.


* msltoe sym4 riemV2 deh2 no riem.jpg (216.92 KB, 700x525 - viewed 507 times.)
Logged
msltoe
Iterator
*
Posts: 187


« Reply #10 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.
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #11 on: March 05, 2016, 12:42:49 AM »

Thanks Msltoe for advice. afro 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. smiley
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #12 on: March 11, 2016, 07:33:12 AM »

I understand more  grin, 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);
  }
}


* msltoe riemV2 hhh3 2400.jpg (170.03 KB, 1000x838 - viewed 518 times.)
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #13 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));
    }
  }
}
Logged
gannjondal
Forums Freshman
**
Posts: 17


« Reply #14 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):


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


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 :-)

* JIT_gnj_RiemannBulbMsltoe_04.m3f (11.02 KB - downloaded 310 times.)
* JIT_gnj_TiledSpheresMsltoe_04.m3f (8.6 KB - downloaded 302 times.)
* m3d1-0313aNEW-035i-XXL-v190.m3p (1.93 KB - downloaded 306 times.)
Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Translucency/Refraction in the "bulb" software Programming « 1 2 » David Makin 26 6179 Last post January 26, 2012, 10:57:12 AM
by ker2x
One way to make a "real" 3-d mandelbrot set The 3D Mandelbulb Tater 1 3089 Last post October 05, 2014, 10:16:42 AM
by hgjf2
Benesi "pinetree" (fold+bulb) (new) Theories & Research « 1 2 ... 6 7 » M Benesi 92 4517 Last post December 16, 2015, 02:05:05 AM
by thargor6
Another way to make a "3D Mandelbrot" Theory Tater 3 6403 Last post June 02, 2016, 12:59:51 AM
by Tater
The Temples of Sphere Inks -- "Higgs Boson" + "Celestial Monks" Mandelbulber Gallery paigan0 0 4160 Last post September 14, 2016, 10:42:06 PM
by paigan0

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.243 seconds with 24 queries. (Pretty URLs adds 0.012s, 2q)