Welcome to Fractal Forums

Fractal Software => Mandelbulber Gallery => Topic started by: mclarekin on July 30, 2017, 10:18:05 AM




Title: Mbulb v1.21
Post by: mclarekin on July 30, 2017, 10:18:05 AM
Mbulb v1.21

(http://nocache-nocookies.digitalgott.com/gallery/20/8347_30_07_17_10_18_05.jpeg)

http://www.fractalforums.com/index.php?action=gallery;sa=view;id=20506

Mbulb v1.21


Title: Re: Mbulb v1.21
Post by: Sabine on August 06, 2017, 06:36:27 PM
 88) Photorealism!  :yes:


Title: Re: Mbulb v1.21
Post by: mclarekin on August 07, 2017, 07:18:23 AM
@ sabine

here is a mandelbulb frag that includes MandelbulberVersion as an option.    The formula is the Mandelbulb base that I use in Mandelbulber V1.21 openCL.

It has abs() options, and some axis swapping options (with start stop controls).




Title: Re: Mbulb v1.21
Post by: Sabine on August 23, 2017, 02:16:51 PM
Thank you for sharing, @mclarekin! Adore the abs-functions here, real fun to run into a burning ship at the second checkbox I tick;)

Coincidentally, I was trying to port cubicquat from mb3d to fragm as it behaves like a burning ship if p=abs(p) is added... or so it should, but I have no clue how to go about with the DE. Tried to steal from Fragm's quatJulia4D-example, but no joy:( Do you have time/energy/courage to take a look?


Title: Re: Mbulb v1.21
Post by: mclarekin on August 24, 2017, 11:58:15 AM
Sure. I haven't even looked at that formula yet.

Post your frag and I give it a try.


Title: Re: Mbulb v1.21
Post by: Sabine on August 24, 2017, 09:54:51 PM
@mclarekin Oh thank you for having a look! As usual I am totally lost when attempting to find something even remotely correct DE-ish 88) :dink:
Attached is as far as I got (basically copying and pasting dark-beams goodness). There is a definite change in structure when I check the Abs4D, could with some fantasy and good-will look like something burning ship-like. But Dreadful DE!!!
Also the cz is from the QuaternionMandelbrot4D, as I had no idea how to construct the p.w-part, but I am almost sure it should just be 0.0...



Title: Re: Mbulb v1.21
Post by: Sabine on August 25, 2017, 12:59:46 AM
Sorry, just took another look, maybe the detail set to -5,5 is not the best way to start exploring  :embarrass:
Hopefully a better .frag attached below... 88)


Title: Re: Mbulb v1.21
Post by: mclarekin on August 28, 2017, 01:12:10 PM
@sabine

I have had a look.  Cubic quat is like the Quaternion4D in Mandelbulber so I have just used it as a base.  

So far I have just set up  4 enable checkBoxes to do an  abs() on each axis, followed by Quaternion4D,

So now I can make all the xyzw combinations of  abs().

This functions as a 3D quat if initialW = 0

This formula is using Delta DE (not Analytical DE)

From memory,  this was best but I should revisit the decision to refresh my mind.

With Fragmentarium I would not no what equates to Delta DE ??  But I will have a look sometime soon.

Anyway it looks something like this for now.

Code:
bool AbsX   etc

float initialW  (-2.0, 0.0, 2.0 )
vec4 z = vec4( p3, initialW)


float X_twist;   ( ?, 0, ?)
float Y_twist;   ( ?, 0, ?)
slider scale1222   { 1.0, 2.0, 2.0, 0.0} maybe max min 5.0 -5.0
slider julia0000   { 0.0, 0.0, 0.0, 0.0} maybe max min 5.0 -5.0
slider scaleC1111   { 1.0, 1.0, 1.0, 1.0} maybe max min 5.0 -5.0

float initialC = z;
vec4 C = initialC * scaleC1111;

 now iterate


if (AbsX) z.x = abs(z.x);
if (AbsY) z.y = abs(z.y);
if (AbsZ) z.z = abs(z.z);
if (AbsW) z.w = abs(z.w);

vec4 temp01 = z * scale1222;
CVector4 oldZ = z;
z.x = temp01.x * z.x - z.y * z.y - z.z * z.z - z.w * z.w
+ (C.y * X_twist);
z.y =  temp01.y * oldZ.x + C.x * Y_twist;
z.z =  temp01.z * oldZ.x;
z.w =  temp01.w * oldZ.x; // +wadd;

z += C + julia0000;





Title: Re: Mbulb v1.21
Post by: mclarekin on August 28, 2017, 02:27:46 PM
This is my current base  pseudo code.

Code:
bool AbsX   etc

float initialW  (-2.0, 0.0, 2.0 )
vec4 z = vec4( p3, initialW)


float X_twist;   ( ?, 0, ?)
float Y_twist;   ( ?, 0, ?)
slider scale1222   { 1.0, 2.0, 2.0, 2.0} maybe max min 5.0 -5.0
slider  preScale  { 1.0, 1.0, 1.0, 1.0} maybe max min 5.0 -5.0
slider julia0000   { 0.0, 0.0, 0.0, 0.0} maybe max min 5.0 -5.0
slider scaleC1111   { 1.0, 1.0, 1.0, 1.0} maybe max min 5.0 -5.0

float initialC = z;
vec4 C = initialC * scaleC1111;

 now iterate


if (AbsX) z.x = abs(z.x);
if (AbsY) z.y = abs(z.y);
if (AbsZ) z.z = abs(z.z);
if (AbsW) z.w = abs(z.w);

vec4 mul = z * preScale;
vec4 oldZ = z;
CVector4 oldZ = z;

z.x = mul.x * z.x - mul.y * z.y - mul.z * z.z - mul.w * z.w
+ (C.y * X_twist);
z.y =  oldZ.y * oldZ.x;
z.z =  oldZ.z * oldZ.x;
z.w =  oldZ.w * oldZ.x; // +wadd;
z *= scale1222;
z.y += C.x * Y_twist;
z += C + julia0000;


Title: Re: Mbulb v1.21
Post by: Sabine on August 29, 2017, 04:20:32 PM
@mclarekin Thank you so much for looking into this!

I have had  a look at  Syntopia's piece on DE's and

Quote
.....Another approach is to take the gradient of the escape length: dr=|∇|zn|| – while it is not clear to me why this is valid, it work in many cases as we will see:....

Code:
int last = 0;
float escapeLength(in vec3 pos)
{
vec3 z = pos;
for( int i=1; i<Iterations; i++ )
{
z = BulbPower(z, Power) + pos;
float r2 = dot(z,z);
if ((r2 > Bailout && last==0) || (i==last))
{
last = i;
return length(z);
}
}
return length(z);
}

float DE(vec3 p) {
last = 0;
float r = escapeLength(p);
if (r*r<Bailout) return 0.0;
gradient = (vec3(escapeLength(p+xDir*EPS), escapeLength(p+yDir*EPS), escapeLength(p+zDir*EPS))-r)/EPS;
return 0.5*r*log(r)/length(gradient);
}




and also read the thread by Buddhi and David Makin about their Delta DE-approach. Must read that again and again, maybe some day my brain will allow me to make proper sense of it!  :embarrass: How to bring this to frag... maybe it has been done before? I will have a look at the examples....

Also am trying to get your latest code ready for fragm, will take me another evening or two as I run from one error into the the next (fragm can be so unforgiving to me forgetting about semicolons, invalid type-combinations and such  :D ) But hey, keeps me from turning to organized crime and such;)