#VRML V2.0 utf8 NavigationInfo{ type "EXAMINE" } Viewpoint{ position 0 0 40 description "[110]"} Viewpoint{ position 40 0 0 orientation 0 1 0 1.57 description "[-110]"} Viewpoint{ position 0 40 0 orientation 1 0 0 -1.57 description "Top"} DEF XForm Transform{ children[] } Script{ field SFNode XForm USE XForm directOutput TRUE url ["javascript: function initialize() { var i,j, n=6, Str = ''; for ( i= -n; i<= n; i+=4) { sj = ''; for ( j= -n; j<= n; j+=4) sj += 'Ga{ trans '+(1.414*(i-1))+' -1 '+(1.414*(j-1))+'} As{ trans '+ (1.414*(i-1))+' -3 '+(1.414*(j+1))+'} Ga{ trans '+(1.414*(i+1))+' 3 '+ (1.414*(j+1))+'} As{ trans '+(1.414*(i+1))+' 1 '+(1.414*(j-1))+'}'; Str += sj;} XForm.addChildren = Browser.createVrmlFromString( 'PROTO Ga[ field SFVec3f trans 0 0 0]{'+ 'Transform{ translation IS trans children['+ 'Shape{ appearance Appearance{ material Material{ emissiveColor 1 1 1}}'+ 'geometry IndexedLineSet{ coord Coordinate{'+ 'point[0 0 0,0 -1 1.414,0 -1 -1.414,1.414 1 0,-1.414 1 0]}'+ 'coordIndex[0 1 -1 0 2 -1 0 3 -1 0 4]}}'+ 'Shape{ appearance Appearance{ material Material{ diffuseColor 1 1 1}}'+ 'geometry Sphere{ radius 0.5 }}]}}'+ 'PROTO As[ field SFVec3f trans 0 0 0]{'+ 'Transform{ translation IS trans children[ '+ 'Shape{ appearance Appearance{ material Material{ emissiveColor 1 1 1}}'+ 'geometry IndexedLineSet{ coord Coordinate{'+ 'point[0 0 0,0 1 1.414,0 1 -1.414,1.414 -1 0,-1.414 -1 0]}'+ 'coordIndex[0 1 -1 0 2 -1 0 3 -1 0 4]}}'+ 'Shape{ appearance Appearance{ material Material{ diffuseColor .8 .8 1}}'+ 'geometry Sphere{ radius 0.5 }}]}}' + Str ); }"] }