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

Kleinian Group 112.10302
Previous Image | Next Image
Description: // Escape time algorithm for Kleinian group limit sets from JosLeys and Knighty.
// http://www.fractalforums.com/index.php?topic=24728.0
// Small modification in line of separation compared to Kleinian_test15-bis.frag:
// Change scale from 0.2 to 0.1 and remove x-translation.
public override void Init()
{
base.Init();
if(GetString("intern.Formula.TempUpdateVal")!="51532b7a12e09959693210c0e512ffbf")
{
SetParameterBulk("Formula.Parameters: bailout=9 box_size_x=0.5 box_size_y=0 box_size_z=0.5 KleinI=-0.033 KleinR=1.94 losScale=0.1 minBailout=0.25 useLineOfSeparation=1 Formula.Static: Cycles=44 Julia=1 jx=0 jy=0 jz=0 Scene: CenterX=4.65261700975822 CenterY=1.21069676611542 CenterZ=0.95446213517343 Radius=0.00783400456513604 Transformation.Camera: AngleX=65.0528340203052 AngleY=-4.02927136476102 AngleZ=-163.761451217425 IsometricProjection=0 Position=1 intern.Formula: TempUpdateVal=51532b7a12e09959693210c0e512ffbf");
}
}
public double KleinR;
public double KleinI;
public double box_size_x;
public double box_size_y;
public double box_size_z;
public double bailout;
public double minBailout;
public bool useLineOfSeparation;
public double losScale;
public override bool GetBool(double x,double y,double z)
{
double f=KleinI<0 ?-1:1 ;
for (int i=0;i < _cycles;  i++)
{
double vxx=x+box_size_x;
double vxz=z+box_size_z;
double vax=2.0 * box_size_x ;
double vaz=2.0 * box_size_z;
x=vxx-vax*Math.Floor(vxx/vax)-box_size_x;
y-=KleinR*Math.Floor(y/KleinR);
z=vxz-vaz*Math.Floor(vxz/vaz)-box_size_z ;
if(useLineOfSeparation)
{
if (y >=KleinR * (0.5+losScale* Math.Sin(f * Math.PI * x / box_size_x)))
{
x=-KleinI-x;
y=KleinR-y;
z=-z;
}
}
double xx=x*x;
double yy=y*y;
double 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;
if(r>bailout)return false;
}
x=-KleinI-x;
y=KleinR+y;
}
return true;
}

Stats:
Total Favorities: 0 View Who Favorited
Filesize: 253.31kB
Height: 1200 Width: 1200
Discussion Topic: View Topic
Keywords: Kleinian Gestaltlupe
Posted by: trafassel December 28, 2016, 03:49:00 AM

Rating: by 2 members.