// PoVRay 3.1 Scene File "tetranet1.pov" // created by Friedrich Lohmueller, 1999 #include "colors.inc" #include "textures.inc" global_settings { assumed_gamma 2.7 } // camera ----------------------------------------------------------- #declare Cam1_location = <10.0 , 4.0 ,-6.0>; #declare Cam1 = camera {ultra_wide_angle angle 80 location Cam1_location up y right x // use quadratic image size !!!! look_at < 3.25 , 1.65 , 0.0>} camera{Cam1} // sun -------------------------------------------------------------- light_source{<1500,2500,-2500> color White*0.5} light_source{Cam1_location color rgb<0.9,0.9,1>*0.1} // sky -------------------------------------------------------------- sphere{<0,0,0>,1 hollow texture{pigment{gradient <0,1,0> color_map{[0 color White] [1 color Plum]} } finish {ambient 1 diffuse 0} } scale 10000} // ------------------------------------------------------------------ //---------------------------------------------------------------------------------- #macro Ball_Tetrahedron_Net(EndLevel,AtomRadius,LinkRadius,Atom_Texture,Conect_Texture ) #local Top_D = sqrt(3)/6; // Top distance in z-direction from x-axis #local H_Tetra = sqrt(2/3); // height of the Tetrahedron #local Dummy = sphere{<0,0,0>,0.1 pigment{color Clear}} union{ #local Level = 0; #while ( Level < EndLevel ) #local NrX = 0; // start X #local EndNr = EndLevel-Level ; // end X #while ( NrX< EndNr ) #local NrZ = 0; // start Z //#local EndNr = EndLevel-Level-NrX; // end Z #while (NrZ< EndNr-NrX) union{ sphere {<0,0,0>,AtomRadius texture{Atom_Texture}} #if (Level > 0) cylinder {<-0.5,-H_Tetra, -Top_D>,<0,0,0>,LinkRadius texture{Conect_Texture}} cylinder {< 0.0,-H_Tetra,2*Top_D>,<0,0,0>,LinkRadius texture{Conect_Texture}} cylinder {< 0.5,-H_Tetra, -Top_D>,<0,0,0>,LinkRadius texture{Conect_Texture}} #end // of #if #if (NrX < EndNr-NrZ-1) cylinder {<0,0,0>,<1,0,0>,LinkRadius texture{Conect_Texture}} #end // of #if #if (NrZ < EndNr-NrX-1) cylinder {<0,0,0>,<0.5,0,3*Top_D>,LinkRadius texture{Conect_Texture}} #end // of #if #if (NrX > 0) cylinder {<0,0,0>,<-0.5,0,3*Top_D>,LinkRadius texture{Conect_Texture}} #end // of #if object{Dummy} translate< (Level*0.5)+NrX+NrZ*0.5, Level*H_Tetra, (Level*1/3)+NrZ> }// end of union #local NrZ = NrZ + 1; #end // --------------- Schleifen-Ende Z #local EndNr = EndLevel-Level; #local NrX = NrX + 1; #end // --------------- Schleifen-Ende X #local Level = Level + 1; #end // --------------- Schleifen-Ende Levels } #end// of macro Ball_Pyramid(Atom, Levels, NetRadius, Conect_Texture ) //--------------------------------------------------------------------------------- #declare BallTexture = texture{Polished_Chrome pigment{color rgb<1,0.8,0.2>*0.8} finish {ambient 0.2 diffuse 0.75 phong 1}} #declare Cyltexture = texture{Polished_Chrome pigment{color rgb<0.8,0.7,0.6>} finish {ambient 0.2 diffuse 0.75 phong 1}} //------------------------------------------------------------------------ object{ Ball_Tetrahedron_Net(5,0.2,0.05,BallTexture,Cyltexture) translate<0,0,0>} //---------------------------------------------------------------------end