News: Support us via Flattr FLATTR Link  Welcome, Guest. Please login or register. October 01, 2022, 10:29:54 AM 1 Hour 1 Day 1 Week 1 Month Forever Login with username, password and session length

## The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!

OpenCL & hybrid formula Previous Image | Next Image
Description: Image rendered using Mandelbulber 1.19
This is a trial with hybrid fractal defined as a custom formula. Used "Delta DE" distance estimation and "linear DE mode"

init:
Code:

float power = consts->fractal.power;
float tgladDE = 1.0f;
float3 ones = 1.0f;
float3 foldingLimit = consts->fractal.mandelbox.foldingLimit;
float3 foldingValue = consts->fractal.mandelbox.foldingValue;
float scale = consts->fractal.mandelbox.scale;
colourMin = 0.0f;

iterations:
Code:

z = fabs(z + ones) - fabs(z - ones) - z;
float rr = dot(z,z);
float m = 2.0f;
if (rr < mr2) m = native_divide(2.0f, mr2);
else if (rr < fr2) m = native_divide(2.0f,rr);

z = z * m;

if(i>4)
{
float x2 = z.x * z.x;
float y2 = z.y * z.y;
float z2 = z.z * z.z;
float temp = 1.0 - z2 / (x2 + y2);
float newx = (x2 - y2) * temp;
float newy = 2.0 * z.x * z.y * temp;
float newz = -2.0 * z.z * sqrt(x2 + y2);
z.x = newx + c.x;
z.y = newy + c.y;
z.z = newz + c.z;
z.z *= consts->fractal.custom;
}
else
{
z += c;
}

r = distance(z, orbitTrap);

#if _orbitTrapsEnabled
if (i >= consts->fractal.fakeLightsMinIter && i <= consts->fractal.fakeLightsMaxIter) distFromOrbitTrap += (1.0f/(r*r));
#endif

//iteration terminate condition
if(r>1024.0f)
{
dist = r / fabs(tgladDE);
out.colourIndex = colourMin / i * 300.0f;
break;
}

Stats:
Total Favorities: 2 View Who Favorited
Filesize: 653.65kB
Height: 1080 Width: 1920
Discussion Topic: View Topic
Keywords: mandelbulber hybrid opencl
Posted by: Buddhi November 19, 2013, 06:23:58 PM

Rating:     by 3 members.