#default{pigment{rgb 1}} #declare xsize=200; #declare ysize=100; #declare tt=0; #declare m1=xsize*.5; #declare m2=xsize; #declare m3=xsize*.75; #declare m4=xsize*.25; camera{location <0,0,-800> look_at<0,0,0> angle 36 orthographic} light_source{<-m1,m2,-m3> color rgb <1,1,1> shadowless} /* light_source{ color rgb <1,1,1>*.7 shadowless} light_source{ color rgb <1,1,1>*.4 shadowless} light_source{<-m2,-m1,-m3> color rgb <1,1,1>*.1 shadowless} light_source{<-m1,m2,-m3> color rgb <1,.9,.2>*.25 shadowless} light_source{ color rgb <.2,.4,1>*.25 shadowless} */ background{rgb<87,123,158>/255} #declare front= box{<-xsize/2,-ysize/2,-0.001> pigment{rgb<1,0,0>} } #declare back= box{<-xsize/2,-ysize/2,0> pigment{rgb<0,0,1>} } #declare origami=object{front} union{ object{front} object{back} } #declare mx0=xsize*2; #declare mx1=xsize; #declare mx2=xsize*.5; #declare my2=ysize*.5; #declare my4=ysize*.25; #macro stage1a(rot1,rot2,rot3) object{origami translate x*-mx2 rotate z*45 clipped_by{box{<-mx0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*-45 translate x*mx2 } #end #macro stage1b(rot1,rot2,rot3) object{origami translate x*-mx2 rotate z*45 clipped_by{box{<-mx0,mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*-45 translate x*mx2 } #end #macro stage2a(rot1,rot2,rot3) object{origami translate x*-mx2 rotate z*-45 clipped_by{box{<-mx0,mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*45 translate x*mx2 } #end #macro stage2b(rot1,rot2,rot3) object{origami translate x*-mx2 rotate z*-45 clipped_by{box{<-mx0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*45 translate x*mx2 } #end #macro stage3a(rot1,rot2,rot3) difference { object{origami} box{<-mx1/3,my2/2,-mx0>} translate y*-my4 rotate rot1 rotate rot2 rotate rot3 translate y*my4 } #end #macro stage3b(rot1,rot2,rot3) /*intersection { object{origami} box{<-mx1/3,my2/2,-mx0>} translate y*-my4 rotate rot1 rotate rot2 rotate rot3 translate y*my4 } */ object{origami clipped_by{box{<-mx1/3,my2/2,-mx0>}} translate y*-my4 rotate rot1 rotate rot2 rotate rot3 translate y*my4 } #end #macro stage4a(rot1,rot2,rot3) difference { object{origami} box{<-mx1/3,-my2/2,-mx0>} translate y*my4 rotate rot1 rotate rot2 rotate rot3 translate y*-my4 } #end #macro stage4b(rot1,rot2,rot3) /*intersection { object{origami} box{<-mx1/3,-my2/2,-mx0>} translate y*my4 rotate rot1 rotate rot2 rotate rot3 translate y*-my4 } */ object{origami clipped_by{box{<-mx1/3,-my2/2,-mx0>}} translate y*my4 rotate rot1 rotate rot2 rotate rot3 translate y*-my4 } #end #macro stage5a(rot1,rot2,rot3) object{origami translate x*mx1/3 clipped_by{box{<0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 translate -x*mx1/3 } #end #macro stage5b(rot1,rot2,rot3) difference{ object{origami translate x*mx1/3} box{<0,-mx0,-mx0>} rotate rot1 rotate rot2 rotate rot3 translate -x*mx1/3 } #end #macro stage6a(rot1,rot2,rot3) object{origami translate x*mx2 rotate z*30 clipped_by{box{<0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*-30 translate x*-mx2 } #end #macro stage6b(rot1,rot2,rot3) object{origami translate x*mx2 rotate z*30 clipped_by{box{<-mx0,-mx0,-mx0><0,mx0,mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*-30 translate x*-mx2 } #end #macro stage7a(rot1,rot2,rot3) object{origami translate x*mx2 rotate z*-30 clipped_by{box{<0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*30 translate x*-mx2 } #end #macro stage7b(rot1,rot2,rot3) object{origami translate x*mx2 rotate z*-30 clipped_by{box{<-mx0,-mx0,-mx0><0,mx0,mx0>}} rotate rot1 rotate rot2 rotate rot3 rotate z*30 translate x*-mx2 } #end #macro stage8a(rot1,rot2,rot3) object{origami clipped_by{box{<-mx0,mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 } #end #macro stage8b(rot1,rot2,rot3) object{origami clipped_by{box{<-mx0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 } #end #macro stage9a(rot1,rot2,rot3) object{origami translate -y*ysize/6 clipped_by{box{<-mx0,mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 translate y*ysize/6 } #end #macro stage9b(rot1,rot2,rot3) object{origami translate -y*ysize/6 clipped_by{box{<-mx0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 translate y*ysize/6 } #end #macro stage10a(rot1,rot2,rot3) object{origami translate y*ysize/6 clipped_by{box{<-mx0,mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 translate -y*ysize/6 } #end #macro stage10b(rot1,rot2,rot3) object{origami translate y*ysize/6 clipped_by{box{<-mx0,-mx0,-mx0>}} rotate rot1 rotate rot2 rotate rot3 translate -y*ysize/6 } #end //////////////////////////////////////////////////// //////////////////////////////////////////////////// //////// //////////////////////////////// //////// START //////////////////////////////// //////// //////////////////////////////// //////////////////////////////////////////////////// //////////////////////////////////////////////////// #declare origami=object{origami translate z*0.0009} #declare origami=union{ stage1a(0,0,0) stage1b(x*-180,0,0) } #declare origami=union{ stage2a(0,0,0) stage2b(x*180,0,0) } #declare origami=union{ stage3a(0,0,0) stage3b(x*-180,0,0) } #declare origami=union{ stage4a(0,0,0) stage4b(x*180,0,0) } #declare origami=object{origami translate z*-0.002} #declare origami=union{ stage6a(0,0,0) stage6b(y*180,0,0) } #declare origami=union{ stage7a(0,0,0) stage7b(y*180,0,0) } #declare origami=object{origami translate z*0.002} #declare origami=union{ stage5a(0,0,0) stage5b(y*-180,0,0) } #declare origami=union{ stage10a(0,0,0) stage10b(x*-80,0,0) } #declare origami=union{ stage9a(x*80,0,0) stage9b(0,0,0) } #declare origami=union{ stage8a(x*-80,0,0) stage8b(0,0,0) } #declare origami=union{ stage8a(0,0,0) stage8b(x*80,0,0) } object{origami rotate x*52 rotate y*26 } //eof