• January 20, 2022, 12:32:33 AM

4D Mandelbox
Previous Image | Next Image
Description:
public bool invyz;
public double bailout;
double minbail;
public double maxr;
public bool foldy;
public bool foldz;
public bool is2d;
bool inverse;
public bool variant1;
public double jx2;
public double jy2;
public double jz2;
public double _jk;
public double _jk2;
public double _k;
public override bool GetBool(double x,double y,double z)
{
double jx,jy,jz;
double jk;
double jk2;
double k;
if (_isJulia)
{
jx=_jx;
jy=_jy;
jz=_jz;
k=_k;
jk=_jk;
jk2=_jk2;
}
else
{
jx=x;
jy=y;
jz=z;
x=_jx;
y=_jy;
z=_jz;
k=_jk;
jk=_k;
jk2=_jk2;
}
double xx=x * x;
double yy=y * y;
double zz=z * z;
double kk=k * k;
double r=Math.Sqrt(xx+yy+zz+kk);
for (int n=1;n < _cycles;  n++)
{
x=x%2;
while(Math.Abs(x)>0.5)
{
if(x>0.5)x=1-x;
if(x<-0.5)x=-1-x;
}
if(foldy)
{
if (y > 0.5)y=1.0-y;
else if (y <-0.5)y=-1.0-y;
}
if(foldz)
{
z=z%2;
while(Math.Abs(z)>0.5)
{
if(z>0.5)z=1-z;
if(z<-0.5)z=-1-z;
}
}
else
{
if (z > 0.5)z=1.0-z;
else if (z <-0.5)z=-1.0-z;
}
{
k=k%2;
while(Math.Abs(k)>0.5)
{
if(k>0.5)k=1-k;
if(k<-0.5)k=-1-k;
}
}
xx=x*x;
yy=y*y;
zz=z*z;
kk=k*k;
r=xx+yy+zz+kk;
if(r!=0)
{
Red+=xx/r;
Green+=yy/r;
Blue+=(zz+kk)/r;
if(maxr==0 || r<maxr)
{
x/=r;
y/=r;
z/=r;
k/=r;
}
}
if (bailout >0 && r > bailout)
{
return is2d;
}
if(minbail>0 && r<minbail)return is2d&inverse;
if(invyz)
{
y=-y;
z=-z;
}
if(n%2==0 || !variant1)
{
x+=jx;
y+=jy;
z+=jz;
k+=jk;
}
else
{
x+=jx2;
y+=jy2;
z+=jz2;
k+=jk2;
}
}
return true;
}

// Gestaltlupe.com parameters
public override void Init()
{
base.Init();
if(GetString("intern.Formula.TempUpdateVal")!="293128b906f67101cf416357842655fa")
{
SetParameterBulk("Formula.Parameters: _jk=0.5 _jk2=0 _k=0.494516129032258 bailout=6.5 foldy=0 foldz=1 invyz=1 is2d=0 jx2=0 jy2=1.5 jz2=-0.5 maxr=1 variant1=0 Formula.Static: Cycles=102 Julia=1 jx=0 jy=-2 jz=0 Scene: CenterX=-0.970223557824604 CenterY=-0.116573579606255 CenterZ=0.906070448207375 Radius=0.141741085819681 Transformation.Camera: AngleX=64.7298096495594 AngleY=10.9794370544914 AngleZ=-161.733116786023 IsometricProjection=0 Position=1 intern.Formula: TempUpdateVal=293128b906f67101cf416357842655fa");
}
}

Stats:
Views: 108
Total Favorities: 1 View Who Favorited
Filesize: 330.88kB
Height: 1200 Width: 1200
Posted by: trafassel July 05, 2020, 11:18:16 PM

Rating: by 3 members.
Total Likes: 3