//=======================Cube formed with tubes =====
#declare R = 0.20; //radius of the tubes
#declare BigCube1 = union{
sphere{<-1,-1,-1>,R} sphere{< 1,-1,-1>,R}// 8 angles
sphere{<-1,-1, 1>,R} sphere{< 1,-1, 1>,R}
sphere{<-1, 1,-1>,R} sphere{< 1, 1,-1>,R}
sphere{<-1, 1, 1>,R} sphere{< 1, 1, 1>,R}
cylinder {<-1,-1,-1>,< 1,-1,-1>,R}// 4 in x-direction
cylinder {<-1,-1, 1>,< 1,-1, 1>,R}
cylinder {<-1, 1,-1>,< 1, 1,-1>,R}
cylinder {<-1, 1, 1>,< 1, 1, 1>,R}
cylinder {<-1,-1,-1>,<-1, 1,-1>,R}// 4 in y-direction
cylinder {<-1,-1, 1>,<-1, 1, 1>,R}
cylinder {< 1,-1,-1>,< 1, 1,-1>,R}
cylinder {< 1,-1, 1>,< 1, 1, 1>,R}
cylinder {<-1,-1,-1>,<-1,-1, 1>,R}// 4 in z-direction
cylinder {<-1, 1,-1>,<-1, 1, 1>,R}
cylinder {< 1,-1,-1>,< 1,-1, 1>,R}
cylinder {< 1, 1,-1>,< 1, 1, 1>,R}
texture{pigment{color rgb<1,0.8,0>}
finish{ambient 0.15 diffuse 0.85 phong 1}}
}//------ end of cube-shaped frame definition -------
//------------- drawing -----------------------------
object{BigCube1 scale 0.7
rotate<0,60,0> translate<0,1.2,0>}
//-------------------------------------------- end -- |
This produces the following image:
|