#VRML V2.0 utf8 Flower, Evgeny Demidov, 14 August 2000 NavigationInfo{ type "EXAMINE" } Viewpoint{ description "start" position 0 0 10} Background{ skyColor .5 .5 1} DEF ROOT Transform{ scale 5 5 5 translation -1.5 0 0 children[]} DEF Polyhedron Script { eventIn SFBool Plus eventIn SFBool Minus eventOut MFNode new_f field SFNode ROOT USE ROOT directOutput TRUE url ["javascript: function initialize(){ MaxIt = 15; strArr = new MFString(); strArr.length = MaxIt; strArr[0] = 'DEF F0 Transform{ children[ '+ 'DEF L0 Shape{ appearance Appearance{ material Material{ diffuseColor 1 1 0}} '+ 'geometry IndexedFaceSet{ solid FALSE convex FALSE coord Coordinate{ '+ 'point[.15 0 0,.2 .1 -.04,.2 .08 -.015,.2 .1 0,.2 .08 .015,.2 .1 .04]} '+ 'coordIndex[0 1 2 3 4 5] }} '+ 'Transform{ rotation 1 0 0 1.26 children USE L0} '+ 'Transform{ rotation 1 0 0 -1.26 children USE L0} '+ 'Transform{ rotation 1 0 0 2.52 children USE L0} '+ 'Transform{ rotation 1 0 0 -2.52 children USE L0} '+ 'DEF B0 Shape{ appearance Appearance{ material Material{ emissiveColor 0 1 0}} '+ 'geometry IndexedLineSet{ coord Coordinate{ point[0 0 0,.15 0 0]} '+ 'coordIndex[0 1]}} ]} '+ 'DEF F2 Transform{ children[ '+ 'DEF F1 Transform{ rotation 0 0 1 1.57 children USE F0} '+ 'Transform{ rotation 1 0 0 1.26 children USE F1} '+ 'Transform{ rotation 1 0 0 -1.26 children USE F1} '+ 'Transform{ rotation 1 0 0 2.52 children USE F1} '+ 'Transform{ rotation 1 0 0 -2.52 children USE F1} ]}'; for ( i= 1; i0)){ ROOT.removeChildren = new_f; iter--; new_f = Browser.createVrmlFromString( strArr[iter] ); ROOT.addChildren = new_f; } } "]} # Controls DEF Clock TimeSensor{ cycleInterval 15} DEF Animation OrientationInterpolator{ key [ 0, .5, 1 ] keyValue [ 1 0 0 0, 1 0 0 3.14, 1 0 0 6.28 ]} Transform{ translation -4 -1 0 rotation 1 0 0 1.57 children[ Shape{ appearance Appearance{ material Material{ diffuseColor 1 0 0}} geometry Cylinder{ height .2 radius .25}} DEF tsRot TouchSensor{} ]} Transform{ translation -4 1 0 children[ Shape{ appearance Appearance{ material Material{ diffuseColor 1 0 0}} geometry Box{ size .4 .4 .2 }} DEF tsPlus TouchSensor{} ]} Transform{ translation -4 0 0 children[ Shape{ appearance Appearance{ material Material{ diffuseColor 0 1 0}} geometry Box{ size .4 .4 .2 }} DEF tsMinus TouchSensor{} ]} ROUTE tsPlus.isActive TO Polyhedron.Plus ROUTE tsMinus.isActive TO Polyhedron.Minus ROUTE tsRot.touchTime TO Clock.startTime ROUTE Clock.fraction_changed TO Animation.set_fraction ROUTE Animation.value_changed TO ROOT.rotation