leg


  
  PROTO Leg [
      exposedField SFRotation kneeBend 0 0 1 0
      exposedField SFRotation ankleBend 0 0 1 0 
  ] {
      Transform {
          rotation IS ankleBend
          children Transform {
              translation 0 0.15 0
              children [
                  Shape {
                      geometry Cylinder { top FALSE height 0.3 radius 0.1 }
                      appearance Appearance {
                          material DEF PANT_MAT Material {
                              diffuseColor 0 0 0.7
                          }
                      }
                  }
                  Transform {
                      translation 0 0.15 0
                      children [
                          Shape {
                              appearance Appearance {
                                  material USE PANT_MAT 
                              }
                              geometry Sphere { radius 0.1 }
                          }
                          Transform {
                              rotation IS kneeBend
                              children Transform {
                                  translation 0 0.15 0
                                  children [
                                      Shape {
                                          geometry Cylinder { top FALSE bottom FALSE height 0.3 radius 0.1 }
                                          appearance Appearance {
                                               material  USE PANT_MAT 
                                          }
                                      }
                                  ]
                              }
                          }
                      ]
                  } 
              ]
          }
      }
  }