Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => (new) Theories & Research => Topic started by: DarkBeam on November 03, 2011, 04:56:55 PM




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){
   r=x*x+y*y+z*z;
   for(i=0;i<10 && r<bailout;i++){
      rotate1(x,y,z);
     
      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;}
     
      // rotate2(x,y,z); simplify the formula discarding rotations

      x=scale*x-(scale-1);
      y=scale*y-(scale-1);
      z=scale*z-(scale-1);
      r=x*x+y*y+z*z;
   }
   return (sqrt(r)-2)*scale^(-i);//the estimated distance
}

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... :-\