@ Youhn. I only post the super sharp and smooth ones, lol

. But seriously, considering openCL is single precision, Mandelbulber custom formulas renders great images if I don't get to close.

@ TruthSerum,

Firstly: Quote from Buddhi's v1.xx code

//There are three types of formulas:

//1) which uses analytic distance estimation: trig_DE, trig_optim (default)

//2) IFS formulas and Mandelbox: menger_sponge, tglad, smoothMandelbox, kaleidoscopic, mandelboxVaryScale4D

//3) rest of formulas, which uses "delta DE" algorithm for distance estimation.

Except that user Zebastian has recently explained that in OpenCL we use Analytic DE also for quarternions, so I am using dist = 0.5f * r * native_log(r) / rp;

.

From my experience Delta DE generally produces a more grainy looking image. In Mandelbulber v1.xx, Delta DE is used if Hybrid is enabled, however by experimentation some hybrids can produce reasonable images. But generally I avoid formulas that use this type of DE.

This image was made from the following openCL basic quarternion formula, with 3D rotation and fabs added.

Hi Buddhi, following is the basic code I now use for quarternions, set up with 7 parameters to tweek. (I sometimes also add in box fold and mandelbox 3D rotation and fabs.)

Code:

// This file has all commands which are executed once before iteration loop.

// It can be used to initialize all variables and do some preliminary calculations

// all available variables are defined in mandelbulber_cl_data.h

// quart Jc4 addition like Julia, c4 = c4 * point

float4 newz = 0.0f;

float4 zp = (float4){1.0f, 0.0f, 0.0f, 0.0f};

float4 z4 = (float4){z.x, z.y, z.z, 0.0f};

//float4 c4 = (float4){c.x, c.y, c.z, 0.0f};

//contant addition

float4 Jc4 = (float4){consts->fractal.custom[3], consts->fractal.custom[4], consts->fractal.custom[5], consts->fractal.custom[6]};

// constant point multiplier

float4 c4 = (float4){consts->fractal.custom[9] * point.x, consts->fractal.custom[10] * point.y, consts->fractal.custom[11] * point.z, 0.0f};

Code:

// QU+c4+Jc4

// This file has all commands which are executed inside iteration loop

// for(i = 0; i < N; i++)

// example is based on Quarternion formula

// z is a main 3-dimentional iterated vector

// c4 and Jc4 are constant variables like in Mandelbrot set: z(n+1) = z(n)^2 + c

// r is a length of z vector

// basic quarternion

zp = 2.0 * quaternionMul(z4, zp);

newz = quaternionSqr(z4);

z4 = newz + c4 + Jc4;

r = length(z4);

if (r < colourMin) colourMin = r;

if(r>40.0f || any(isinf(z4)))

{

float rp = length(zp);

dist = 0.5f * r * native_log(r) / rp;

out.colourIndex = colourMin * 5000.0f;

break;

}

I have been experimenting with adding a C constant (which can be a Julia coordinate) and adding also a point multiplier constant .

i.e z = z * m + Jc3 + c3 for mandelbox, z+=( Jc3 + c3) for mandelbulb

This approach gives more parameters to tweek, and you can morph/animate between normal and Julia.

So maybe consider this approach for formulas .

As always, thanks so much for this software, I have fun and have also learnt a bit about programming.