#VRML V2.0 utf8 #
##ex-normal.wrl # example of Normal node ### defining colors to a IndexedFaceSet (1 surface) by associating ### normal to vertices # Camera Viewpoint { position 1 6 1 orientation 1 0 0 -1.5 fieldOfView 0.785398 } Transform { translation -1 0 -1 children [ Shape { geometry IndexedFaceSet { ccw TRUE # normal following the direction # of the right hand rule (see coordIndex # order under); so pointing to the viewer solid FALSE # when FALSE polygon sides are always # displayed regardless of the viewing direction coordIndex [ 0,1,2, -1 ] # defining a face coord Coordinate { point [ 0 0 0, 2.5 0 3.5, 0 0 2, 2 3 2 ] } # defining and associating colors to vertices colorIndex [ 0,1,2,-1] colorPerVertex TRUE # signalizes we use one color per face color Color { color [ 1 0 0 , 1 1 0 , 0 1 0] } # defining and associating normals to vertices normalIndex [ 0,1,2,-1] normalPerVertex TRUE normal Normal { vector [ 0 1 0, 0 -1 0, 0 1 0 ] } } } ] } #