#VRML V2.0 utf8 #papillon.wrl Sebastien Marnier 12/97 Group { children [ Viewpoint { position -0.8 0.1 0.2 orientation 0 1 0 5.06 } Transform { translation -0.25 0 0 #La tete est une sphere children [ DEF boule Shape { appearance Appearance { material Material { diffuseColor 0.3 0.3 0.3 specularColor 1 1 1 } } geometry Sphere { radius 0.05 } } Transform { #ses antennes deux lignes translation 0 0 0 children [ Shape { geometry IndexedLineSet { coord Coordinate { point [ 0 0 0, -0.1 0.05 -0.1, -0.2 -0.02 -0.03, -0.1 0.05 0.1, -0.2 -0.02 0.03 ] } colorPerVertex FALSE color Color { color [ 0.6 0.6 0.6 ] } coordIndex [ 0, 1, 2, -1, 0, 3, 4, -1 ] colorIndex [ 0,0 ] } } ] } Transform { #Le corps une sphere deformee par scale translation 0.24 0 0 scale 4.1 1 1 children [ USE boule ] } Transform { #queue translation 0.5 -0.05 0 rotation 0 0 1 5.93 scale 2 1 1 children [ USE boule ] } ] } Transform { #les ailes une forme avec des faces rotation 1 0 0 0.78 children [ DEF aile Shape { #donne le nom "aile" a la forme geometry IndexedFaceSet { coord Coordinate { #definir les points x y z point [ -0.2 0 0, -0.25 0.1 0, -0.25 0.3 0, -0.1 0.5 0, 0.1 0.5 0, 0.2 0.4 0, 0.2 0.3 0, 0.3 0.35 0, 0.4 0.35 0, 0.45 0.3 0, 0.45 0.2 0, 0.4 0.1 0, 0.2 0 0 ] } color Color { #les differentes couleurs color [ 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1, 1 0 1, ] } solid FALSE #ce n'est pas un volume #definir les faces et attribuer les couleurs coordIndex [ 0, 1, 2, 3, 4, 5, 6, 12,-1, 6,7, 8, 9, 10, 11, 12, -1 ] colorIndex [ 0, 1, 2, 3, 4, 5, 6, 0, -1, 5,1, 2, 3, 4, 5, 6, -1 ] } } ] } Transform { #reutilise l'aile rotation 1 0 0 5.50 children [ USE aile ] } ] }