Title: Inverted Menger Sponge Post by: trafassel on December 18, 2016, 09:15:15 AM Inverted Menger Sponge (http://nocache-nocookies.digitalgott.com/gallery/19/999_18_12_16_9_15_15.jpeg) http://www.fractalforums.com/index.php?action=gallery;sa=view;id=19863 // Please remove this after pressing the box above two times. This sets the position. public override void Init(){base.Init();if(GetString("intern.Formula.TempUpdateVal")!="43454d7d68fddcf192143262682d933f"){SetParameterBulk("Scene: CenterX=0.0943303508326203 CenterY=0.63668925376446 CenterZ=-0.100730183001073 Radius=0.11667506936911 Transformation.Camera: AngleX=-21.432389015681 AngleY=2.50643728825066 AngleZ=-15.6335199621586 IsometricProjection=1 Position=1 View: DephAdd=250");}} public override bool GetBool(double x,double y,double z) { double boxSize=2.9; double holeSize=1.1; double scale=2.2; for (int n=1;n < 14; n++) { if(Math.Abs(x)>=holeSize && Math.Abs(y)>=holeSize && Math.Abs(z)>=holeSize) return false; if(x> holeSize) x-=scale*holeSize; if(x<-holeSize) x+=scale*holeSize; if(y> holeSize) y-=scale*holeSize; if(y<-holeSize) y+=scale*holeSize; if(z> holeSize) z-=scale*holeSize; if(z<-holeSize) z+=scale*holeSize; x*=boxSize; y*=boxSize; z*=boxSize; } return true; } |