I made it as clone of AmazingBox. First versions of it was not very exeptional. Throught it generated something like storehouse of rounded cut boxes. But that is boring. However the last version seems better and some transformations could be interesting and I think deserve post.
///VERSION of spherefold, by analytical function
temp := abs(x) + abs(y) + abs(z);
intradius :=round(temp);
temp := ( abs( intradius - Min_R ) - abs( intradius + Min_R) +1 );
x := x * temp ;
y := y * temp ;
z := z * temp ;
Here is spherefold like transformation. radius = abs(x) + abs(y) + abs(z) generates diamond shape, who acts like sphere. (With diamond I meant just rotated cube.) Here visual differences are few, but I hadn't tested it on the full spherefold. It is mutch faster than quadratic based radiuss.
This required integer number or else fractal is mess.
Alsou one can try -> radiuss = power ( x*x*x*x , y*y*y*y ,z*z*z*z , 0.25 ); That would be significantly slower and pillow shaped.
///Addition
x := x + Addition ;
y := y + Addition ;
z := z + Addition ;
I would remove this but then variables of older saved files would not be compatible. It mostly just moves it around.
[CONSTANTS]
.Double sqrt_1_2 = 0.707106781186548
.Double sqrt_1_3 = 0.577350269189626
.Double sqrt_2_3 = 0.816496580927726
.Double sqt13TOsqt12 = 0.408248290463863
.Double sqt23TOsqt12 = 0.577350269189626
///Benesi to Mag / pine transformation
temp := x * sqt23TOsqt12 - z * sqt13TOsqt12 ;
z1 := x * sqrt_1_3 + z * sqrt_2_3;
y1 := y * sqrt_1_2;
x1 := temp - y1 ;
y1 := temp + y1 ;
I took the code from Benesi JIT formula and further optimised by adding two more constants. I have no idea how this works, I hadn't looked deeper into. More importantly it looks good. The result is fixed rotation.
///adding this transformation at the regulated amount.
temp:= (1-vBenesiRotation);
x:=x1*vBenesiRotation + x*temp;
y:=y1*vBenesiRotation + y*temp;
z:=z1*vBenesiRotation + z*temp;
I wanted to add a switch and added this. It not only switches it on or off (0 or 1), but moves vector along the line between these two points. And the values <0 and >1 is meaningfull, too.
///folds of different lenght
x := x + abs(x- FoldX) - abs(x+ FoldX) ;
y := y + abs(y- vFoldY) - abs(y+ vFoldY) ;
z := z + abs(z- vFoldZ) - abs(z+ vFoldZ) ;
One operation less than boxfold.
/// sigma function based Fish eye lense like transformation together with scale
temp:= scale/(antiFisheye+1);
temp:= (antiFisheye + sqrt( x*x + y*y + z*z ) )*temp;
x := temp * x ;
y := temp * y ;
z := temp * z ;
It is not quite a trigonometric fisheye like in Apophysis, but the effect could be simmilar. This transformation is responsible why boxes looks like heaps of some real life things, they are slightly round.
// + C
x := x + PIteration3D^.J1;
y := y + PIteration3D^.J2;
z := z + PIteration3D^.J3;
end;
[END]
Formula version 1.2
* * *
By Edgar Malinovsky
That's all. It's here:
http://www.fractalforums.com/mandelbulb-3d/em-formulas-for-mandelbulb3d/Effect of BenesiToMag:
In attachment plain version