DSMeskalito [2013-10-31 04:52:59 +0000 UTC]
Thank you! timemit , I have long worked with preset psevdokleynian
#define USE_INF_NORM
// Maximum iterations
uniform int MI; slider[0,5,20]
// Size
uniform float Size; slider[0,1,2]
// Cubic fold Size
uniform vec3 CSize; slider[(0,0,0),(1,1,1),(2,2,2)]
// Julia constant
uniform vec3 C; slider[(-2,-2,-2),(0,0,0),(2,2,2)]
// Basic shape DE Offset
uniform float DEoffset; slider[0,0,0.01]
// Basic shape Translation
uniform vec3 Offset; slider[(-2,-2,-2),(0,0,0),(2,2,2)]
//Basic shape
// Menger Number of iterations.
uniform int MnIterations; slider[0,2,20]
uniform int ColorIterations; slider[0,2,20]
// Menger Scale parameter. A perfect Menger is 3.0
uniform float MnScale; slider[0.00,3.0,4.00]
// Menger Scaling center
uniform vec3 MnOffset; slider[(0,0,0),(1,1,1),(2,2,2)]
float Menger(vec3 z)
{
float r;
int n = 0;
// Fold
z = abs(z);
if (z.x if (z.x if (z.y if (z.z<1./3.){ z.z -=2.*( z.z-1./3.);}
while (n < MnIterations && dot(z,z)<100.0) {
z=MnScale* (z-MnOffset)+MnOffset;
// Fold
z = abs(z);
if (z.x if (z.x< z.z){ z.xz = z.zx;}
if (z.y if (z.z<1./3.*MnOffset.z){ z.z -=2.*( z.z-1./3.*MnOffset.z);}
r = dot(z-MnOffset, z-MnOffset);
//orbitTrap = min(orbitTrap, abs(vec4(z,r)));
n++;
}
//return (length(z)-sqrt(3.) ) * pow(Scale, float(-n));
return float(z.x-MnOffset) * pow(MnScale, float(-n));
}
float Thing2(vec3 p){
//Just scale=1 Julia box
#ifdef USE_INF_NORM
vec3 p1=abs(p);
float r2=max(p1.x,max(p1.y,p1.z));
#else
float r2=dot(p,p);
#endif
float DEfactor=1.;
for(int i=0;i p=2.*clamp(p, -CSize, CSize)-p;
r2=dot(p,p);
//orbitTrap = min(orbitTrap, abs(vec4(p,r2)));
float k=max(Size/r2,1.);
p*=k;DEfactor*=k;
p+=C;
#ifdef USE_INF_NORM
p1=abs(p);
r2=max(p1.x,max(p1.y,p1.z));
#else
r2=dot(p,p);
#endif
if (i < ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(p,r2)));
}
//Call basic shape and scale its DE
return abs(0.5*Menger(p-Offset)/DEfactor-DEoffset);
}
float DE(vec3 p){
return Thing2(p);//RoundBox(p, CSize, Offset);
}
#preset default
FOV = 0.39024
Eye = -3.4785,-2.85408,4.5172
Target = -5.77023,-9.92507,1.61285
Up = 0.95238,-0.278327,0.124526
EquiRectangular = false
FocalPlane = 0.1
Aperture = 0.002
Gamma = 1.89815
ToneMapping = 3
Exposure = 1.16328
Brightness = 1
Contrast = 1.1386
Saturation = 0.8602
GaussianWeight = 1
AntiAliasScale = 2
Detail = -3.22126
DetailAO = -2.92859
FudgeFactor = 1
MaxRaySteps = 1143
Dither = 0.49123
NormalBackStep = 1
AO = 0,0,0,0.79012
Specular = 0.63529
SpecularExp = 49.091
SpecularMax = 10
SpotLight = 0,0.666667,0.498039,0.35294
SpotLightDir = -0.375,-0.0625
CamLight = 1,1,1,1
CamLightMin = 0
Glow = 1,1,1,0
GlowMax = 20
Fog = 0
HardShadow = 0
ShadowSoft = 2
Reflection = 0.25641
DebugSun = false
BaseColor = 0.333333,1,1
OrbitStrength = 0.4026
X = 0.5,0.6,0.6,-0.45632
Y = 1,0.6,0,0.6699
Z = 0.8,0.78,1,-0.32038
R = 0.4,0.7,1,0.11764
BackgroundColor = 1,0.666667,0
GradientBackground = 0.3
CycleColors = false
Cycles = 1.1
EnableFloor = true
FloorNormal = 0.02474,-0.0246,-6e-05
FloorHeight = 0.2381
FloorColor = 0.333333,0.666667,0.498039
MI = 14
Size = 0.4486
CSize = 1.74,0.5,0.72
C = -0.0174,0.05216,1.1652
DEoffset = 0
Offset = 0.01836,-0.15384,0.85716
MnIterations = 3
ColorIterations = 3
MnScale = 1.88504
MnOffset = 1.77778,0.96296,1.06172
#endpreset
👍: 0 ⏩: 0