DEF REDBOX_TRANSFORM Transform { translation -5 0 0 rotation 0 1 0 .5 children DEF REDBOX_SHAPE Shape { appearance Appearance { material Material { diffuseColor .6 0 0 } } geometry DEF IFS IndexedFaceSet { 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, 1, 3, 2, -1, 4, 5, 7, 6, -1, 6, 7, 1, 0, -1, 2, 3, 5, 4, -1, 6, 0, 2, 4, -1, 1, 7, 5, 3, -1 ] } #end IndexedFaceSet } #end of Shape } #end of Transform Background { color 1 1 1 } DEF BLUEBOX_TRANSFORM Transform { translation 0 0 0 rotation 1 0 0 .3 children DEF BLUEBOX_SHAPE Shape { appearance Appearance { material Material { diffuseColor 0 .6 0 } } geometry USE IFS } #end of Shape } #end of Transform DEF GREENBOX_TRANSFORM Transform { translation 5 0 0 rotation 1 0 0 .3 children DEF GREENBOX_SHAPE Shape { appearance Appearance { material Material { diffuseColor 0 0 .5 } } geometry USE IFS } #end of Shape } #end of Transform Viewpoint { position 0 0 15 }