- #VRML V2.0 utf8
-
- PROTO une_sphere
-
- [
- field SFFloat sradius .5
- field SFColor couleurde 1 0 0
- field SFFloat _height 0
- field SFColor couleurun 1 0 0
- field SFVec3f trans 0 0 0
- field SFRotation rot 0 0 0 0
- field SFFloat cradius .1
- ]
-
- {
- Transform {
- children [
- Transform {
- children Shape {
- geometry Sphere { radius IS cradius }
- appearance Appearance {
- material Material {
- diffuseColor IS couleurun
- }
- }
- }
-
-
- }
-
- Transform {
- children Shape {
- geometry Cylinder { radius IS sradius height IS _height}
- appearance Appearance {
- material Material {
- diffuseColor IS couleurde
- }
- }
- }
- translation 0 -1 0
- }
-
- ]
- translation IS trans
- rotation IS rot
- }
-
- }
-
- #Face Avant
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 }
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 0 0 rot 0 0 1 -1.57}
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 -2 0 rot 1 0 0 3.14}
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 0 -2 0 rot 0 0 1 1.57}
-
- #Face Ariere
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 0 0 -2}
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 0 -2 rot 0 0 1 -1.57}
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 -2 -2 rot 1 0 0 3.14}
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 0 -2 -2 rot 0 0 1 1.57}
-
-
- #Arrete Gauche
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 }
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 trans 0 -2 0 }
- #Arrete Droite
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 trans 2 0 0 }
- une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 trans 2 -2 0 }
#VRML V2.0 utf8
PROTO une_sphere
[
field SFFloat sradius .5
field SFColor couleurde 1 0 0
field SFFloat _height 0
field SFColor couleurun 1 0 0
field SFVec3f trans 0 0 0
field SFRotation rot 0 0 0 0
field SFFloat cradius .1
]
{
Transform {
children [
Transform {
children Shape {
geometry Sphere { radius IS cradius }
appearance Appearance {
material Material {
diffuseColor IS couleurun
}
}
}
}
Transform {
children Shape {
geometry Cylinder { radius IS sradius height IS _height}
appearance Appearance {
material Material {
diffuseColor IS couleurde
}
}
}
translation 0 -1 0
}
]
translation IS trans
rotation IS rot
}
}
#Face Avant
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 }
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 0 0 rot 0 0 1 -1.57}
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 -2 0 rot 1 0 0 3.14}
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 0 -2 0 rot 0 0 1 1.57}
#Face Ariere
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 0 0 -2}
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 0 -2 rot 0 0 1 -1.57}
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 2 -2 -2 rot 1 0 0 3.14}
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 trans 0 -2 -2 rot 0 0 1 1.57}
#Arrete Gauche
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 }
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 trans 0 -2 0 }
#Arrete Droite
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 trans 2 0 0 }
une_sphere { sradius .1 cradius .3 _height 2 couleurun 1 0 0 couleurde 0 1 0 rot 1 0 0 1.57 trans 2 -2 0 }