JosLeys Kleinian Group Variations

  • 2 Replies
  • 245 Views

0 Members and 1 Guest are viewing this topic.

Offline trafassel

  • *
  • Fractal Fanatic
  • ***
  • Posts: 37
« on: September 12, 2018, 03:08:29 AM »
Linear line of separation and extended folding.

// Gestaltlupe Formula:
public double LOSx=0;
public double LOSy=0;
public double KleinR;
public double KleinI;
public double minBailout;
public bool useLineOfSeparation;
public double losXScale;
public double losYScale;
public bool classicFolding;
public double zs;
public override bool GetBool(double x,double y,double z)
{
  double losXScaleFactor=losXScale*2.0*Math.PI;
  double jx,jy,jz;
  if (_isJulia)
  {
    jx=_jx;
    jy=_jy;
    jz=_jz;
  }
  else
  {
    jx=x;
    jy=y;
    jz=z;
    x=_jx;
    y=_jy;
    z=_jz;
  }
  for (int i=0;i < _cycles;  i++)
  {
    if(classicFolding)
    {
      x=x%2;
      z=z%2;
      while(Math.Abs(x)>0.5)
      {
        if(x>0.5)x=1-x;
        if(x<-0.5)x=-1-x;
      }
      while(Math.Abs(z)>0.5)
      {
        if(z>0.5)z=1-z;
        if(z<-0.5)z=-1-z;
      }
    }
    else
    {
      x=x-Math.Floor(x+0.5);
      z=z-Math.Floor(z+0.5);
    }
    if(useLineOfSeparation)
    {
      if (y >=LOSy+KleinR*(0.5+losYScale*(x)))
      {
        x=KleinI-x;
        y=KleinR-y;
        z=-zs*z;
      }
    }
    double xx=x*x,yy=y*y,zz=z*z;
    double r=xx+yy+zz;
    if(r>0)
    {
      x /=r;
      y /=r;
      z /=r;
      if(r>0.00000000001 && i>2)
      {
        Red+=xx/r;
        Green+=yy/r;
        Blue+=zz/r;
      }
      if(r<minBailout)return false;
    }
    x=KleinI+x;
    y=KleinR-y;
    z=-z;
    x+=jx;
    y+=jy;
    z+=jz;
  }
  return true;
}

public override void Init()
{
  base.Init();
  if(GetString("intern.Formula.TempUpdateVal")!="789aa147972a8a558d25a6b7e4d210fa")
  {
    SetParameterBulk("Formula.Parameters: classicFolding=1 KleinI=0.009828904647462 KleinR=1.95409610447188 LOSx=0 losXScale=0 LOSy=0.3 losYScale=-0.6 minBailout=0.3 useLineOfSeparation=1 zs=-1 Formula.Static: Cycles=99 Julia=1 jx=0.026 jy=-0.022 jz=0 Scene: CenterX=5.73474421250101 CenterY=1.0959603439525 CenterZ=-3.10428195727539 Radius=0.0509876305851325 Transformation.Camera: AngleX=111.889205636214 AngleY=7.89161900064529 AngleZ=172.783555796052 IsometricProjection=0 Position=1 intern.Formula: TempUpdateVal=789aa147972a8a558d25a6b7e4d210fa");
  }
}



Linkback: https://fractalforums.org/image-threads/25/josleys-kleinian-group-variations/1847/

Offline trafassel

  • *
  • Fractal Fanatic
  • ***
  • Posts: 37
« Reply #1 on: September 16, 2018, 01:24:01 AM »
Same formula, but with less parameters.

public double LOSy=0;
public double KleinR;
public double KleinI;
public double minBailout;
public bool useLineOfSeparation;
public double losYScale;
// Escape time algorithm for Kleinian group limit sets from JosLeys and Knighty.
// http://www.fractalforums.com/index.php?topic=24728.0
public override bool GetBool(double x, double y, double z)
{
  double jx, jy, jz;
  if (_isJulia)
  {
    jx = _jx;
    jy = _jy;
    jz = _jz;
  }
  else
  {
    jx = x;
    jy = y;
    jz = z;
    x = _jx;
    y = _jy;
    z = _jz;
  }
  for (int i = 0;i < _cycles;  i++)
  {
    x=x%2;
    z=z%2;
    while(Math.Abs(x)>0.5)
    {
      if(x>0) x = 1-x;
      else x = -1-x;
    }
    while(Math.Abs(z)>0.5)
    {
      if(z>0) z = 1-z;
      else z = -1-z;
    }
    if(useLineOfSeparation)
    {
      if ( y >= LOSy+losYScale*x)
      {
        x = KleinI-x;
        y = KleinR-y;
      }
    }
    double xx=x*x,yy=y*y,zz=z*z;
    double r=xx+yy+zz;
    if(r>0)
    {
      x /= r;
      y /= r;
      z /= r;
      if(r>0.00000000001 && i>2)
      {
        Red+=xx/r;
        Green+=yy/r;
        Blue+=zz/r;
      }
      if(r<minBailout) return false;
    }
    y = - y;
    z = -z;
    x+= jx;
    y+= jy;
    z+= jz;
  }
  return true;
}

// Parameters


public override void Init()
{
  base.Init();
  if(GetString("intern.Formula.TempUpdateVal")!="e8b0b60bb63ce0251b91632bd6a7111e")
  {
    SetParameterBulk("Formula.Parameters: KleinI=0.009828904647462 KleinR=1.95409610447188 LOSy=1.061 losYScale=-0.23 minBailout=0.26 useLineOfSeparation=1 Formula.Static: Cycles=99 Julia=1 jx=0.035828904647462 jy=1.93209610447188 jz=0 Scene: CenterX=6.10045210856169 CenterY=0.829893641423711 CenterZ=-4.00931033080474 Radius=3.47612962004208E-05 Transformation.Camera: AngleX=-165.661479864796 AngleY=21.2063977841397 AngleZ=113.770236935814 IsometricProjection=0 Position=1 intern.Formula: TempUpdateVal=e8b0b60bb63ce0251b91632bd6a7111e");
  }
}

Offline pauldelbrot

  • *
  • 3f
  • ******
  • Posts: 1514
« Reply #2 on: September 16, 2018, 08:57:55 AM »
O.o


xx
Kleinian group cusp

Started by birational on Fractal Image Gallery

0 Replies
93 Views
Last post November 09, 2018, 05:48:15 PM
by birational
xx
Kleinian group cusp (right half failed)

Started by birational on Fractal Image Gallery

0 Replies
97 Views
Last post November 06, 2018, 10:53:42 PM
by birational
xx
(4K) The Golden Ferns of JosLeys-Kleinian--"Pretty"--3D Fractal Animation Music Video

Started by Paigan0 on Fractal Image Gallery

1 Replies
255 Views
Last post December 02, 2017, 09:55:05 AM
by hgjf2
clip
JosLeys' Strange Attractor

Started by kosalos on Programming

0 Replies
268 Views
Last post August 22, 2018, 09:07:25 AM
by kosalos
xx
Schottky group (on Riemann sphere)

Started by birational on Fractal Image Gallery

0 Replies
145 Views
Last post December 04, 2018, 01:23:58 AM
by birational