#VRML V2.0 utf8 NavigationInfo{ type "EXAMINE" } Viewpoint{ description "[100]"} Viewpoint{ position 7 0 7 orientation 0 1 0 .785 description "[110]"} Viewpoint{ position 6.6 6.6 6.6 orientation -1 1 0 .955 description "[111]"} Transform{ translation 1 1 1 children[ Shape{ appearance Appearance{ material Material{ diffuseColor .5 .5 1 transparency .5}} geometry Box{ }}]} DEF XForm Transform{ children[] } Script{ field SFNode XForm USE XForm directOutput TRUE url ["javascript: function initialize() { var i,j,k, n=2, is=1,js,ks, Str = ''; for ( i= -n; i<= n; i++) { js = is; sj=''; for ( j= -n; j<= n; j++) { ks = js; sk = ''; for ( k= -n; k<= n; k++) { if (ks > 0) sk += 'Cl{ trans '+i+' '+j+' '+k+'}'; ks = -ks;} sj += sk; js = -js;} Str += sj; is = -is;} XForm.addChildren = Browser.createVrmlFromString( 'PROTO Cl[ field SFVec3f trans 0 0 0]{'+ 'Transform{ translation IS trans children['+ 'Shape{ appearance Appearance{ material Material{ diffuseColor 1 1 0 } }'+ 'geometry Sphere{ radius 0.2 }}]}}' + Str ); }"] }