Welcome to Fractal Forums

Fractal Software => Mandelbulber => Topic started by: taurus on September 13, 2016, 11:27:34 AM




Title: a_surf silent comparison
Post by: taurus on September 13, 2016, 11:27:34 AM
After some discussions about implementation differences of a_surf, I felt, that no one really understood my words. So I made a little animation about my observations.
Assumptions not discussed there:
@minR=1  implementations of m3d and Bulber are "quality" equal - this means, the visual result has similar properties. Beyond one a_surf simply falls apart - im m3d earlier than in bulber.
What I call logarithmic downscale, is a 10 keyframe CatmullRom interpolated, logarithmic ladder (gives best results). Linear means linear...
Watch fast and think fast. There's a lot of anomalies, that can be discussed.
I really hope, that leads to the REAL differences. Not because I want them to be equal, but I hope this difference might be used as mod in related formulas like a_box and derivates.
Have fun!

https://vimeo.com/182517931


Title: Re: a_surf silent comparison
Post by: taurus on October 24, 2016, 01:13:49 AM
I remember a preface in a Peitgen Book, where Benoit Mandelbrot wrote about Fractal Geometry as an experimental branch of math. Theese Times seem to be over. It has been degenerated into simple coding skills. Understanding is not necessary. I really regret that!
But as the hope dies last here's the logarithmic animation, to examine yourself. I think, further words are pointless.

have fun!


Title: Re: a_surf silent comparison
Post by: mclarekin on October 24, 2016, 03:41:00 AM
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)

Code:
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)

Code:
	
/**
 * 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);
}


Title: Re: a_surf silent comparison
Post by: taurus on October 24, 2016, 09:52:10 PM
What shall I do with this? Learn to code?
I tried with the last set of recepies you provided - like swapping julia x and y and moving the place of the addition of c - without any change of that particular behaviour. And we don't talk about a little difference, we talk about a numerical ratio of 1:1000.
That's exactly what I mean with my last post. I'm sure you didn't even try. You are not able or not willing to try and watch beyond your horizon, so I'm not willing too!


Title: Re: a_surf silent comparison
Post by: mclarekin on October 25, 2016, 03:18:05 AM
The difference is in what happens to minR parameter,  it can be  used as minR, minR * minR, sqrt(minR), minR^3 or anything.
It is just relative size of this parameter condition after any maths, compared to  the length of z.


M3D A-surf       minR of 0.5 becomes 0.25
Mandelbulber Asurf          minR of 0.5 becomes 0.707
In newer formulas like Mandlebulber A_surf_mod and multi  minR parameter of  0.5 remains at 0.5 , as there is no need for the additional maths as we are just comparing length z with a condition (an arbitrary  number of the users choosing)).