Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Amazing Box, Amazing Surf and variations => Topic started by: pupukuusikko on January 17, 2017, 11:06:19 PM




Title: Twistbox - spiralling -1 scale box variant
Post by: pupukuusikko on January 17, 2017, 11:06:19 PM
I found an interesting addition to the already versatile scale -1 box scene.

Formula is very simple, normal -1 box with swapping of the signs of x and z (inspired by josleys's kleinian and trafassels following work).
Still, the effect with suitable folding (fold>1) and julia coordinates is quite unique, with overwhelmingly abundant spirals ;)
The code is below, full frag is also attached, though DE would need some tuning.

Code:

float  minibox(vec3 z)
{
vec3 pos = z;
float DF = 1.0;
for (int i = 0; i < Box_Iterations ; i++)
{
z.xyz = clamp(z.xyz, -fold, fold)*2. - z.xyz;
float r =dot2(z);
z/=-r;
DF/= r;
z.xz*=-1.;
z+=(Julia ? JuliaC : pos);
orbitTrap = min(orbitTrap, abs(vec4(z,dot(z,z))));
}
float r = length(z); //(dot2(z));
return 0.2*sqrt(r)/DF;
}


(http://i.imgur.com/kGT7Lst.jpg)



(http://i.imgur.com/EUs40dP.jpg)




Title: Re: Twistbox - spiralling -1 scale box variant
Post by: DarkBeam on January 18, 2017, 12:12:36 AM
Tried already the dwsel crazy mod folds?
I moved the topic to the appropriate section too
http://www.fractalforums.com/amazing-box-amazing-surf-and-variations/kaliset-plus-boxfold-nice-new-2d-fractal/15/


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: Crist-JRoger on January 18, 2017, 01:10:12 PM
we have hyperactive fractal developer for Frag  ;D  :joy:


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: pupukuusikko on January 22, 2017, 10:39:13 AM
we have hyperactive fractal developer for Frag  ;D  :joy:

Nah, just some childish excitement of a noob, it will pass quickly ;)

@luca: thanks for the relevant link, I might explore the foldings some time, but
the current formula seems nice and continuous with the default boxfold too.


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: DarkBeam on January 22, 2017, 11:57:41 AM
please look at the kleinian other topics. I cannot remove the separation line...
Do you know some workaround?
Should I add a divergent bailout? ...


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: DarkBeam on January 22, 2017, 11:59:47 AM
Code:

float  minibox(vec3 z)
{
vec3 pos = z;
float DF = 1.0;
for (int i = 0; i < Box_Iterations ; i++)
{
z.xyz = clamp(z.xyz, -fold, fold)*2. - z.xyz;
float r =dot2(z);
z/=-r;
DF/= r;
z.xz*=-1.;
z+=(Julia ? JuliaC : pos);
orbitTrap = min(orbitTrap, abs(vec4(z,dot(z,z))));
}
float r = length(z); //(dot2(z));
return 0.2*sqrt(r)/DF;
}

Also here you definitely should check if R is > 1e20 or < 1e-20 to avoid numerical trouble...


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: Sabine on January 31, 2017, 01:14:19 PM
Love this formula, great fun, Pupukuusikko, thank you!


(http://orig06.deviantart.net/c5cf/f/2017/031/8/7/spiralbox_ii_by_sabine62-daxd813.png)


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: Crist-JRoger on January 31, 2017, 02:32:19 PM
Super!  :dink:


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: Crist-JRoger on February 07, 2017, 05:39:06 PM
very slow  :'(

(http://pre05.deviantart.net/266c/th/pre/f/2017/038/1/2/creation_by_c_jr-day7g7i.jpg) (http://orig12.deviantart.net/de38/f/2017/038/1/2/creation_by_c_jr-day7g7i.jpg)


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: DarkBeam on February 08, 2017, 06:54:53 PM
Correct me if I am wrong. This is Buddhi's Amazing box, with a rotation of (180, 180, 0). In MB3D you should get it that way (use ABoxPlatinum).
Johan/Kraftwerk - try plsss :help: :thanks1:


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: pupukuusikko on February 08, 2017, 09:03:42 PM
Correct me if I am wrong. This is Buddhi's Amazing box, with a rotation of (180, 180, 0). In MB3D you should get it that way (use ABoxPlatinum).
Johan/Kraftwerk - try plsss :help: :thanks1:

I tried it without success. There is probably a difference in ballfold part?

my formula has just unconditional p.xyz/=r, whereas abox in mb3d has

if rr < sqr(Min_R) then
   m = Scale/sqr(Min_R)
else if rr < 1 then
   m = Scale/rr
else m = Scale
..
p.xyz*=m




Title: Re: Twistbox - spiralling -1 scale box variant
Post by: DarkBeam on February 08, 2017, 09:59:32 PM
Sorry I did not notice :(


Title: Re: Twistbox - spiralling -1 scale box variant
Post by: mclarekin on February 09, 2017, 02:56:10 AM
My two cents. It looks like buddhis mandebox with a variation to the DE calc. 

In the Mandelbox, the Fixed Radius and Minimum Radius  (now called maxR2 and minR2) are variables.  We  set  maxR2 to very big number and minR2 to zero  and it is pseudo unconditional. ( i think??)