I have downloaded the .fract and note you are doing the comparison with rotation, In a previous post we discussed how rotation is added at a different place in the loop between the two formulas. In M3D it is added
after the addCpixel, in Mandelbulber it is
before the addCpixel. You cannot compare minR between the two formulas unless you first remove this difference.
Alternatively in V2.09 there is now an addCpixel option placed before the rotation in Amazing Surf UI.
Here is the code showing the difference between the two formulas (assuming Darkbeam's .m3f is still current)
Scale = Scale + Scale_vary*(abs(Scale)-1)
x = TgladFold(x,fold)
y = TgladFold(y,fold)
// z is not folded
if SorC != 0
rr = x*x + y*y // cylinder shape for inversion (sometimes buggy but can be cool)
else
rr = x*x + y*y + z*z // sphere shape for inversion (works better)
endif
if rr < sqr(Min_R) then m = Scale/sqr(Min_R) else
if rr < 1 then m = Scale/rr else m = Scale
x = x * m + Cy
y = y * m + Cx
z = z * m + Cz
Rotate3D(x,y,z,angles)
/**
* amazing surf from Mandelbulber3D. Formula proposed by Kali, with features added by Darkbeam
* @reference ????
* This formula has a c.x c.y SWAP
*/
void AmazingSurfIteration(CVector3 &z, CVector3 c, const cFractal *fractal, sExtendedAux &aux)
{
aux.actualScale =
aux.actualScale + fractal->mandelboxVary4D.scaleVary * (fabs(aux.actualScale) - 1.0);
z.x = fabs(z.x + fractal->transformCommon.additionConstant111.x)
- fabs(z.x - fractal->transformCommon.additionConstant111.x) - z.x;
z.y = fabs(z.y + fractal->transformCommon.additionConstant111.y)
- fabs(z.y - fractal->transformCommon.additionConstant111.y) - z.y;
// no z fold
double r2;
r2 = z.Dot(z);
if (fractal->transformCommon.functionEnabledFalse) // force cylinder fold
r2 -= z.z * z.z;
// if (r2 < 1e-21)
// r2 = 1e-21;
double m;
double sqrtMinR = sqrt(fractal->transformCommon.minR05);
// if (sqrtMinR < 1e-21 && sqrtMinR > -1e-21)
// sqrtMinR = (sqrtMinR > 0) ? 1e-21 : -1e-21;
if (r2 < sqrtMinR)
m = aux.actualScale / sqrtMinR;
else
{
if (r2 < 1.0)
m = aux.actualScale / r2;
else
m = aux.actualScale;
}
z *= m * fractal->transformCommon.scale1 + 1.0 * (1.0 - fractal->transformCommon.scale1);
aux.DE = aux.DE * fabs(m) + 1.0;
if (fractal->transformCommon.addCpixelEnabledFalse)
z += CVector3(c.y, c.x, c.z) * fractal->transformCommon.constantMultiplier111;
z = fractal->transformCommon.rotationMatrix.RotateVector(z);
}
if (fractals.IsJuliaEnabled(sequence))
{
CVector3 juliaC = fractals.GetJuliaConstant(sequence) * fractals.GetConstantMultiplier(sequence);
z += CVector3(juliaC.y, juliaC.x, juliaC.z);
}
else
{
z += CVector3(c.y, c.x, c.z) * fractals.GetConstantMultiplier(sequence);
}