vr2-5-19.wrl


[ VRML source code ]

#VRML V2.0 utf8
#vr2-5-19.wrl
#sharp pencil
DEF Bottle Transform {
  children [
    DEF Timer TimeSensor {
      cycleInterval 4.0
      loop TRUE
    },
    DEF Rot OrientationInterpolator {
      key [0.0, 0.2, 0.4, 0.6, 0.7, 0.9, 1.0]
      keyValue [ 
        0 1 0 0.5,
        0 1 0 1.0,
        0 1 0 1.5,
        0 1 0 2.0,
        0 1 0 2.5,
        0 1 0 3.0,
        0 1 0 3.1415
      ]
    }, 
  Transform {
    scale 1 1 0.2  
    children Shape {
      appearance Appearance {
        material Material {
          diffuseColor 1 1 0.5
        }
      }
      geometry Cylinder {
        radius 10
        height 15 
      }
    }
  },
  Transform {
    scale 1 1 0.2  
    children Shape {
      appearance Appearance {
        material Material {
          diffuseColor 1 0 1
        }
      }
      geometry Cylinder {
        radius 11
        height 12 
      }
    }
  },
  Transform {
    translation 0 10 0
    scale 1 1 0.2
    children Shape {
      appearance Appearance {
        material Material {
          diffuseColor 1 1 0.5
        }
      }
      geometry Cone {
        bottomRadius 9
        height 5 
      }
    }
  },
  Transform {
    translation 0 11 0
    children Shape {
      appearance Appearance {
        material Material {
          diffuseColor 1 1 0.5
        }
      }
      geometry Cylinder {
        radius 1
        height 3 
      }
    }
  },
  Transform {
    translation 0 12 0
    rotation 1 0 0 3.141592
    children Shape {
      appearance Appearance {
        material Material {
          diffuseColor 1 1 0
        }
      }
      geometry Cone {
        bottomRadius 1
        height 2 
      }
    }
  }
  ]
}
DEF PS ProximitySensor { 
  size 20 20 50 
}
ROUTE PS.enterTime TO Timer.set_startTime
ROUTE Timer.fraction_changed TO Rot.set_fraction
ROUTE Rot.value_changed TO Bottle.set_rotation
ROUTE PS.exitTime TO Timer.set_stopTime