Welcome to Fractal Forums

Fractal Art => Images Showcase (Rate My Fractal) => Topic started by: 3dickulus on December 04, 2016, 01:42:26 AM




Title: Folding Menger
Post by: 3dickulus on December 04, 2016, 01:42:26 AM
Every once in a while I render something with Fragmentarium that makes me do a double take...
(http://nocache-nocookies.digitalgott.com/gallery/19/9032_04_12_16_1_37_27.jpeg) (http://www.fractalforums.com/index.php?action=gallery;sa=view;id=19822)
Origin: Knighty's Menger-Sphere.frag, Darkbeam's folding routine, Roquen's domain mashup


Title: Re: Folding Menger
Post by: Sabine on December 04, 2016, 12:15:21 PM
Interesting combination, great results!
I'll have a closer look at your .frag, looks like great fun to explore, especially Roquen's domain mashup, completely new to me!


Title: Re: Folding Menger
Post by: DarkBeam on December 04, 2016, 01:31:33 PM
Excuse me what is my folding routine? :snore: :embarrass:


Title: Re: Folding Menger
Post by: 3dickulus on December 04, 2016, 05:23:06 PM
from the fragment code attached to first post...
Code:
//DarkBeam's "fold"... reinterpreted... it's more than a fold, much more! Just awesome!
float DBFold(vec3 p, float fo, float g){
if(p.z>p.y) p.yz=p.zy;//Diagonal fold
//Tis is slightly different from the original fold in order to make it continuous in this context
float vx=p.x-2.*fo;
float vy=p.y-4.*fo;
  float v=max(abs(vx+fo)-fo,vy);
float v1=max(vx-g,p.y);
v=min(v,v1);
return min(v,p.x);
}
//the coordinates are pushed/pulled in parallel
vec3 DBFoldParallel(vec3 p, vec3 fo, vec3 g){
vec3 p1=p;
p.x=DBFold(p1,fo.x,g.x);
p.y=DBFold(p1.yzx,fo.y,g.y);
p.z=DBFold(p1.zxy,fo.z,g.z);
return p;
}
//serial version
vec3 DBFoldSerial(vec3 p, vec3 fo, vec3 g){
p.x=DBFold(p,fo.x,g.x);
p.y=DBFold(p.yzx,fo.y,g.y);
p.z=DBFold(p.zxy,fo.z,g.z);
return p;
}

more folding from 2013 sphereFold boxFold mengerFold octo?
    http://www.fractalforums.com/animations-showcase-(rate-my-short-animation)/the-art-of-folding-t18074/
    fragment attached @ the above animation link



Title: Re: Folding Menger
Post by: 3dickulus on December 04, 2016, 09:32:31 PM
jff, this is a montage of the other presets in the fragment attached to first post...


Title: Re: Folding Menger
Post by: DarkBeam on December 04, 2016, 10:47:46 PM
Now I remember thanks :)