#VRML V2.0 utf8 NavigationInfo{ type "EXAMINE" } Background{ skyColor 0 .5 0} Viewpoint{ position 0 0 10 description "[100]"} Viewpoint{ position 7 0 7 orientation 0 1 0 .785 description "[110]"} Viewpoint{ position 5.8 5.8 5.8 orientation -1 1 0 .955 description "[111]"} DEF XForm Transform{ scale 2 2 2 children[ Shape{ appearance Appearance{ material Material{ diffuseColor .75 .75 1 transparency .5}} geometry IndexedFaceSet{ solid FALSE coord Coordinate{ point[1 1 1,1 1 -1,1 -1 1,1 -1 -1, -1 -1 -1,-1 -1 1,-1 1 -1,-1 1 1]} coordIndex[0 2 3 1 -1 0 7 5 2 -1 0 1 6 7 -1 4 5 7 6 -1 4 6 1 3 -1 4 3 2 5]}} ]} Script{ field SFNode XForm USE XForm directOutput TRUE url ["javascript: function initialize() { var i,j,k, n=1, is=1,js,ks, sum, Str = ''; for ( i= -n; i<= n; i++) { js = 1; sj=''; for ( j= -n; j<= n; j++) { ks = 1; sk = ''; for ( k= -n; k<= n; k++) { sum = is+js+ks; if (sum == 3) sk += 'Ti{ trans '+i+' '+k+' '+j+'}'; if (sum == 1) sk += 'O{ trans '+i+' '+k+' '+j+'}'; if (sum == -3) sk += 'Sr{ trans '+i+' '+k+' '+j+'}'; ks = -ks;} sj += sk; js = -js;} Str += sj; is = -is;} XForm.addChildren = Browser.createVrmlFromString( 'PROTO Ti[ field SFVec3f trans 0 0 0]{'+ 'Transform{ translation IS trans children[ '+ 'Anchor{ description \"Ti\" children '+ 'Shape{ appearance Appearance{ material Material{ diffuseColor 0 0 1}}'+ 'geometry Sphere{ radius 0.15 }}}]}}'+ 'PROTO Sr[ field SFVec3f trans 0 0 0]{'+ 'Transform{ translation IS trans children[ '+ 'Anchor{ description \"Sr\" children '+ 'Shape{ appearance Appearance{ material Material{ diffuseColor 1 0 0}}'+ 'geometry Sphere{ radius 0.15 }}}]}}'+ 'PROTO O[ field SFVec3f trans 0 0 0]{'+ 'Transform{ translation IS trans children[ '+ 'Anchor{ description \"O\" children '+ 'Shape{ appearance Appearance{ material Material{ diffuseColor 1 1 1}}'+ 'geometry Sphere{ radius 0.2 }}}]}}' + Str ); }"] }