#VRML V2.0 utf8 # CAP5805 Computer Simulation # Final Project # Laurentiu Iancu # liancu@cise.ufl.edu # Metaphor EXTERNPROTO MetaphorPlace [ exposedField SFVec3f translation exposedField SFRotation rotation exposedField SFColor diffuseColor ] "metaphorprotos.wrl#MetaphorPlace" EXTERNPROTO MetaphorBaggage [ exposedField SFVec3f translation exposedField SFColor diffuseColor exposedField SFFloat transparency exposedField SFVec3f localtranslation exposedField SFRotation localrotation exposedField SFVec3f localcenter ] "metaphorprotos.wrl#MetaphorBaggage" EXTERNPROTO MetaphorClaw [ exposedField SFVec3f translation exposedField SFColor diffuseColor exposedField SFVec3f localtranslation ] "metaphorprotos.wrl#MetaphorClaw" EXTERNPROTO MetaphorTransition [ exposedField SFVec3f translation exposedField SFColor diffuseColor ] "metaphorprotos.wrl#MetaphorTransition" EXTERNPROTO MetaphorTrolley [ exposedField SFVec3f translation exposedField SFRotation rotation exposedField SFColor diffuseColor ] "metaphorprotos.wrl#MetaphorTrolley" DEF Metaphor Transform { children [ MetaphorPlace { translation -23.5 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF BaggageL5F MetaphorBaggage { translation -23.03 0.6 0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 -0.36 }, MetaphorTransition { translation -21.15 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, MetaphorTrolley { translation -18.8 2.5 1.0 rotation 0 1 0 3.141593 }, DEF ClawL4F MetaphorClaw { # claw left 4 front (moves clockwise) translation -18.8 1.65 1.75 # z=0.25 on the opposite shaft }, DEF PlaceL4 MetaphorPlace { translation -18.8 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF BaggageL4B MetaphorBaggage { translation -18.33 0.6 -0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 0.36 }, MetaphorTransition { translation -16.45 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, MetaphorTrolley { translation -14.1 2.5 -1.0 }, DEF ClawL3B MetaphorClaw { # claw left 3 back (moves counterclockwise) translation -14.1 1.65 -1.75 # z=-0.25 on the opposite shaft }, DEF PlaceL3 MetaphorPlace { translation -14.1 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF BaggageL3F MetaphorBaggage { translation -13.63 0.6 0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 -0.36 }, MetaphorTransition { translation -11.75 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, MetaphorTrolley { translation -9.4 2.5 1.0 rotation 0 1 0 3.141593 # diffuseColor 1.0 0.0 0.0 }, DEF ClawL2F MetaphorClaw { # claw left 2 front (moves clockwise) translation -9.4 1.65 1.75 }, DEF PlaceL2 MetaphorPlace { translation -9.4 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF BaggageL2B MetaphorBaggage { translation -8.93 0.6 -0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 0.36 }, MetaphorTransition { translation -7.05 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, MetaphorTrolley { translation -4.7 2.5 -1.0 # diffuseColor 0.0 0.0 1.0 }, DEF ClawL1B MetaphorClaw { # claw left 1 back (moves counterclockwise) translation -4.7 1.65 -1.75 }, DEF PlaceL1 MetaphorPlace { translation -4.7 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF BaggageL1F MetaphorBaggage { translation -4.23 0.6 0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 -0.36 }, MetaphorTransition { translation -2.35 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, DEF BaggageC0B MetaphorBaggage { translation 0.47 0.6 -0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 0.36 }, DEF PlaceC0 MetaphorPlace { # central Petri place: spatial origin of metaphor translation 0.0 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF ClawC0F MetaphorClaw { # claw center 0 front (moves clockwise) translation 0.0 1.65 1.75 }, MetaphorTrolley { translation 0.0 2.5 1.0 rotation 0 1 0 3.141593 }, MetaphorTransition { translation 2.35 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, DEF BaggageR1F MetaphorBaggage { translation 5.17 0.6 0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 -0.36 }, DEF PlaceR1 MetaphorPlace { translation 4.7 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF ClawR1B MetaphorClaw { # claw right 1 back (moves counterclockwise) translation 4.7 1.65 -1.75 }, MetaphorTrolley { translation 4.7 2.5 -1.0 }, MetaphorTransition { translation 7.05 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, DEF BaggageR2B MetaphorBaggage { translation 9.87 0.6 -0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 0.36 }, DEF PlaceR2 MetaphorPlace { translation 9.4 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF ClawR2F MetaphorClaw { # claw right 2 front (moves clockwise) translation 9.4 1.65 1.75 }, MetaphorTrolley { translation 9.4 2.5 1.0 rotation 0 1 0 3.141593 # diffuseColor 1.0 0.0 0.0 }, MetaphorTransition { translation 11.75 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, DEF BaggageR3F MetaphorBaggage { translation 14.57 0.6 0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 -0.36 }, DEF PlaceR3 MetaphorPlace { translation 14.1 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF ClawR3B MetaphorClaw { # claw right 3 back (moves counterclockwise) translation 14.1 1.65 -1.75 }, MetaphorTrolley { translation 14.1 2.5 -1.0 # diffuseColor 0.0 0.0 1.0 }, MetaphorTransition { translation 16.45 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, DEF BaggageR4B MetaphorBaggage { translation 19.27 0.6 -0.47 # diffuseColor 1.0 0.0 1.0 localcenter 0.47 0.0 0.36 }, DEF PlaceR4 MetaphorPlace { translation 18.8 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF ClawR4F MetaphorClaw { # claw right 4 front (moves clockwise) translation 18.8 1.65 1.75 }, MetaphorTrolley { translation 18.8 2.5 1.0 rotation 0 1 0 3.141593 }, MetaphorTransition { translation 21.15 1.25 0.0 diffuseColor 0.5 1.0 0.25 }, DEF PlaceR5 MetaphorPlace { translation 23.5 0.0 0.0 # diffuseColor 1.0 1.0 0.0 }, DEF ClawR5B MetaphorClaw { # claw right 5 back (moves counterclockwise) translation 23.5 1.65 -1.75 }, MetaphorTrolley { translation 23.5 2.5 -1.0 }, Sound { # sound emitted by claws when moving on trolleys source DEF MetaphorSound AudioClip { url "metaphor.wav" loop TRUE # start and stop times controlled by script startTime 0.0 stopTime 1.0 } minFront 100.0 minBack 100.0 maxFront 10000.0 maxBack 10000.0 }, DEF ClawTouchSensor TouchSensor { # triggers movement of claws enabled TRUE } ] } DEF SoundScript Script { # set start and stop times of sound emitted by claws url "javascript: function set_touchTime (bool, timeStamp) { beginTime_changed = timeStamp; endTime_changed = timeStamp + 20.0; }" eventIn SFTime set_touchTime eventOut SFTime beginTime_changed eventOut SFTime endTime_changed } DEF ClawScript Script { # triggers movement of claws eventIn SFTime set_time eventOut SFTime beginTime_changed url "javascript: function set_time (something, timestamp) { beginTime_changed = timestamp; }" } DEF ClawClock TimeSensor { # sets time for movement of claws enabled TRUE loop FALSE cycleInterval 20.0 } DEF ClawFPosition PositionInterpolator { # controls position of clockwise-bound claws key [ 0.000000, 0.171296, 0.185185, 0.199074, 0.212963, 0.226852, 0.240741, 0.254630, 0.277778, 0.300926, 0.314815, 0.328704, 0.476852, 0.500000, 0.523148, 0.546296, 0.717593, 0.731481, 0.745370, 0.759259, 0.773148, 0.787037, 0.800926, 0.814815, 0.828704, 1.000000 ] keyValue [ 0.000 0.000 0.000, -3.700 0.000 0.000, -3.987 0.000 -0.057, -4.230 0.000 -0.220, -4.393 0.000 -0.463, -4.450 0.000 -0.750, -4.393 0.000 -1.037, -4.230 0.000 -1.280, -4.230 -0.500 -1.280, -4.230 0.000 -1.280, -3.987 0.000 -1.443, -3.700 0.000 -1.500, -0.470 0.000 -1.500, -0.470 -0.500 -1.500, -0.470 0.000 -1.500, 0.000 0.000 -1.500, 3.700 0.000 -1.500, 3.987 0.000 -1.443, 4.230 0.000 -1.280, 4.393 0.000 -1.037, 4.450 0.000 -0.750, 4.393 0.000 -0.463, 4.230 0.000 -0.220, 3.987 0.000 -0.057, 3.700 0.000 0.000, 0.000 0.000 0.000 ] } DEF ClawBPosition PositionInterpolator { # position of counterclockwise-bound claws key [ 0.000000, 0.171296, 0.185185, 0.199074, 0.212963, 0.226852, 0.240741, 0.254630, 0.277778, 0.300926, 0.314815, 0.328704, 0.476852, 0.500000, 0.523148, 0.546296, 0.717593, 0.731481, 0.745370, 0.759259, 0.773148, 0.787037, 0.800926, 0.814815, 0.828704, 1.000000 ] keyValue [ 0.000 0.000 0.000, -3.700 0.000 0.000, -3.987 0.000 0.057, -4.230 0.000 0.220, -4.393 0.000 0.463, -4.450 0.000 0.750, -4.393 0.000 1.037, -4.230 0.000 1.280, -4.230 -0.500 1.280, -4.230 0.000 1.280, -3.987 0.000 1.443, -3.700 0.000 1.500, -0.470 0.000 1.500, -0.470 -0.500 1.500, -0.470 0.000 1.500, 0.000 0.000 1.500, 3.700 0.000 1.500, 3.987 0.000 1.443, 4.230 0.000 1.280, 4.393 0.000 1.037, 4.450 0.000 0.750, 4.393 0.000 0.463, 4.230 0.000 0.220, 3.987 0.000 0.057, 3.700 0.000 0.000, 0.000 0.000 0.000 ] } ROUTE ClawTouchSensor.touchTime TO ClawScript.set_time ROUTE ClawScript.beginTime_changed TO ClawClock.set_startTime ROUTE ClawClock.fraction_changed TO ClawFPosition.set_fraction ROUTE ClawFPosition.value_changed TO ClawL4F.set_localtranslation ROUTE ClawFPosition.value_changed TO ClawL2F.set_localtranslation ROUTE ClawFPosition.value_changed TO ClawC0F.set_localtranslation ROUTE ClawFPosition.value_changed TO ClawR2F.set_localtranslation ROUTE ClawFPosition.value_changed TO ClawR4F.set_localtranslation ROUTE ClawClock.fraction_changed TO ClawBPosition.set_fraction ROUTE ClawBPosition.value_changed TO ClawL3B.set_localtranslation ROUTE ClawBPosition.value_changed TO ClawL1B.set_localtranslation ROUTE ClawBPosition.value_changed TO ClawR1B.set_localtranslation ROUTE ClawBPosition.value_changed TO ClawR3B.set_localtranslation ROUTE ClawBPosition.value_changed TO ClawR5B.set_localtranslation DEF BaggageFPosition PositionInterpolator { # controls position of pieces of baggage F key [ 0.000000, 0.171296, 0.185185, 0.199074, 0.212963, 0.226852, 0.240741, 0.254630, 0.277778, 0.300926, 0.314815, 0.328704, 0.476852, 0.500000, 0.523148, 0.546296, 0.717593, 0.731481, 0.745370, 0.759259, 0.773148, 0.787037, 0.800926, 0.814815, 0.828704, 1.000000 ] keyValue [ 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.500 0.000, 0.243 0.500 -0.163, 0.530 0.500 -0.220, 3.760 0.500 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220, 3.760 0.000 -0.220 ] } DEF BaggageBPosition PositionInterpolator { # controls position of pieces of baggage B key [ 0.000000, 0.171296, 0.185185, 0.199074, 0.212963, 0.226852, 0.240741, 0.254630, 0.277778, 0.300926, 0.314815, 0.328704, 0.476852, 0.500000, 0.523148, 0.546296, 0.717593, 0.731481, 0.745370, 0.759259, 0.773148, 0.787037, 0.800926, 0.814815, 0.828704, 1.000000 ] keyValue [ 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.000 0.000, 0.000 0.500 0.000, 0.243 0.500 0.163, 0.530 0.500 0.220, 3.760 0.500 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220, 3.760 0.000 0.220 ] } DEF BaggageRotation OrientationInterpolator { # controls rotation of all baggage key [ 0.000000, 0.171296, 0.185185, 0.199074, 0.212963, 0.226852, 0.240741, 0.254630, 0.277778, 0.300926, 0.314815, 0.328704, 0.476852, 0.500000, 0.523148, 0.546296, 0.717593, 0.731481, 0.745370, 0.759259, 0.773148, 0.787037, 0.800926, 0.814815, 0.828704, 1.000000 ] keyValue [ 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000, 0 1 0 0.000000 0 1 0 1.186116, 0 1 0 1.282281, 0 1 0 1.378453, 0 1 0 1.474624, 0 1 0 1.570796, 0 1 0 1.666968, 0 1 0 1.763140, 0 1 0 1.859312, 0 1 0 1.955484, 0 1 0 3.141593 ] } ROUTE ClawClock.fraction_changed TO BaggageFPosition.set_fraction ROUTE ClawClock.fraction_changed TO BaggageRotation.set_fraction ROUTE BaggageFPosition.value_changed TO BaggageL5F.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageL5F.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceL4.set_rotation ROUTE BaggageFPosition.value_changed TO BaggageL3F.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageL3F.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceL2.set_rotation ROUTE BaggageFPosition.value_changed TO BaggageL1F.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageL1F.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceC0.set_rotation ROUTE BaggageFPosition.value_changed TO BaggageR1F.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageR1F.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceR2.set_rotation ROUTE BaggageFPosition.value_changed TO BaggageR3F.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageR3F.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceR4.set_rotation ROUTE ClawClock.fraction_changed TO BaggageBPosition.set_fraction ROUTE BaggageBPosition.value_changed TO BaggageL4B.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageL4B.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceL3.set_rotation ROUTE BaggageBPosition.value_changed TO BaggageL2B.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageL2B.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceL1.set_rotation ROUTE BaggageBPosition.value_changed TO BaggageC0B.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageC0B.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceR1.set_rotation ROUTE BaggageBPosition.value_changed TO BaggageR2B.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageR2B.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceR3.set_rotation ROUTE BaggageBPosition.value_changed TO BaggageR4B.set_localtranslation ROUTE BaggageRotation.value_changed TO BaggageR4B.set_localrotation ROUTE BaggageRotation.value_changed TO PlaceR5.set_rotation ROUTE ClawTouchSensor.touchTime TO SoundScript.set_touchTime ROUTE SoundScript.beginTime_changed TO MetaphorSound.set_startTime ROUTE SoundScript.endTime_changed TO MetaphorSound.set_stopTime