Descriptions and Samples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    deutsche Version

rocket 2 overview arch (for doors and bridges)

Cube by Tube

The Construction of a Cube-shaped Frame of Tubes.

Objects: "sphere", "cylinder".
Methods: "union", "declare"
frontview, view from right and topview

Construction in details:

The tubes are arranged symetrically arround the center. The edges are formed by spheres of the same radius as the cylinders. Defining the radius using the "declare"-statement makes it easy to change it. the complet cube is defined as a new object named "BigCube1", therefor it is easy to kann er durch repeat using this object by the statement

"object{BigCube1 rotate< ... > translate< ...>}" 

- as the next sample demonstrates.

//=======================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:
Sample1 Cube 600x450
Click here for the complete scene description for POV-Ray:
".txt" file or ".pov" file

A variation of this subject:

Changing the line in the description
marked with
//<---1 as follows:

camera {Cam1}
and the lines starting with the mark //<---2 as follows:
               color_map{[0    color Blue]          
                         [0.45 color White]
                         [0.55 color White]
                         [1.0  color Blue]}
               scale 2 translate<0,-1,0>}
and the line with the mark //<---3 as follows:
#declare R = 0.25   //radius of the tubes
and also the lines from the mark //<---4 as follows:
texture{Polished_Chrome
        pigment{quick_color rgb<1,0.8,0>}
        finish {ambient 0.1 diffuse 0.9 phong 1}}
//---- end of cubiform frame definition --------------
//---------------- drawing ---------------------------
union{
 object{BigCube1 scale 0.7 translate< 0.0, 0.0, 0.0>}
 object{BigCube1 scale 0.4 translate< 0.7, 0.7,-0.7>}
 rotate<-45,65,0> rotate<10,0,0> translate<0.3,0.8,0>}
------------------------------------------- end ------
results in following image:
Sample2 Cube 600x450

rocket 2 overview arch (for doors and bridges)

© Friedrich A. Lohmüller, 2003     email email: (legacy email redacted)