#VRML V2.0 utf8 # draw a simple Dalek and have it march back and forth DEF T Transform # T is connected to interpolators { children [ Transform # base { children Shape { appearance Appearance { material Material { diffuseColor 0.3 0.3 0.7 } } geometry Cone { bottom TRUE side TRUE bottomRadius 0.5 height 2 } } translation 0.0 1.0 0.0 } Transform # neck { children Shape { appearance Appearance { material Material { diffuseColor 0.3 0.7 0.3 } } geometry Cylinder { bottom FALSE top FALSE radius 0.2 height 0.8 } } translation 0.0 1.4 0.0 } Transform # top { children Shape { appearance Appearance { material Material { diffuseColor 0.7 0.3 0.3 } } geometry Sphere { radius 0.21 } } translation 0.0 1.8 0.0 } Transform # gun { children Shape { appearance Appearance { material Material { diffuseColor 0.3 0.3 0.3 } } geometry Cylinder { bottom FALSE top TRUE radius 0.05 height 1.0 } } translation 0.7 1.1 0.0 rotation 0 0 -1 1.3 } Transform # eye { children Shape { appearance Appearance { material Material { diffuseColor 0.3 0.3 0.3 } } geometry Cylinder { bottom FALSE top TRUE radius 0.03 height 0.6 } } translation 0.5 1.85 0.0 rotation 0 0 -1 1.5 } ] #end children } #end T Transform DEF TS TimeSensor { stopTime -1 loop TRUE cycleInterval 10 } DEF Posn PositionInterpolator # march backwards and forwards { key [ 0 0.25 0.5 0.75 1] keyValue [ -2 0 0 2 0 0 2 0 0 -2 0 0 -2 0 0] } DEF Orient OrientationInterpolator # face direction of movement { key [ 0 0.25 0.5 0.75 1] keyValue [ 0 -1 0 0 0 -1 0 0 0 -1 0 3.14 0 -1 0 3.14 0 -1 0 0 ] } ROUTE TS.fraction_changed TO Orient.set_fraction ROUTE Orient.value_changed TO T.set_rotation ROUTE TS.fraction_changed TO Posn.set_fraction ROUTE Posn.value_changed TO T.set_translation # L.Allison, Department of Computer Science, Monash University, Australia 3168