Title: Folding, IFS, raytracing and continuity Post by: DarkBeam on November 03, 2011, 04:56:55 PM This problem obsesses me from a long time and I really cannot see a solution in the horizon. :'( Let's talk about this formula; Code: sierpinski3(x,y,z){Discard the bells and whistles and talk about the folding. if(x+y<0){x1=-y;y=-x;x=x1;} if(x+z<0){x1=-z;z=-x;x=x1;} if(y+z<0){y1=-z;z=-y;y=y1;} This folds with continuity the 3D space. Sierpinski pyramid is a 3D symmetric solid fractal. It has a constant scale for all his transforms and all transforms are linear. Plus rotation is costantly zero. With all those simplifications we can raytrace the fractal with a surprisingly elegant formula and without using any special flag (except for the scale correction *scale^(-i) ). The variables x,y,z are and stay continuous even after the folding. The problem is; is it possible to write a continuous transformation for x,y,z, without using additional memory flags or techniques, for non symmetrical or differently symmetrical IFS? For example, can anybody write a simple formula for the Dragon curve in 2D without using any flag, without branch cuts or creating discontinuity in the x,y,z vector field? :D The mystery continues... :-\ |