#VRML V2.0 utf8 # CAP5805 HW02 (DoubleHelix) # Sukitti Punak # THE DOUBLE HELIX Group { children [ WorldInfo { title "Double Helix" } PointLight { location 4.0 4.0 4.0 intensity 0.5 ambientIntensity 0.2 } Background { skyColor [ 0.0 0.2 0.7, 0.0 0.5 1.0, 1.0 1.0 1.0 ] skyAngle [ 0 0.571 ] } # define view points Viewpoint { position 0 0 55 description "Original (Front) View" } Viewpoint { position 0 0 -55 orientation 0 1 0 3.14 description "Back Side View" } Viewpoint { position 0 0 -55 orientation 1 0 0 3.14 description "Up Side Down" } Viewpoint { position 0 10 20 description "Top Close Up 1" } Viewpoint { position 0 10 -20 orientation 0 1 0 3.14 description "Top Close Up 2" } Viewpoint { position 0 -10 20 description "Bottom Close Up 1" } Viewpoint { position 0 -10 -20 orientation 0 1 0 3.14 description "Bottom Close Up 2" } Viewpoint { position 0 -30 40 orientation 1 0 0 0.6 description "Look Up" } Viewpoint { position 0 25 40 orientation 1 0 0 -0.6 description "Look Down" } Viewpoint { position 0 0 40 orientation 0 0 1 1.57 description "90 Deg Rotate" } Viewpoint { position 0 0 40 orientation 0 0 1 -1.57 description "-90 Deg Rotate" } # end define view points ] } # the top disk Group { children [ Transform { translation 0 15 0 children [ Shape { appearance Appearance { material Material { shininess 1.0 } texture ImageTexture { url "texture01.jpg" } } geometry Cylinder { radius 10 height 1 } } ] } DEF Touch TouchSensor { } ] } # the bottom disk Group { children [ Transform { translation 0 -15 0 children [ Shape { appearance Appearance { material Material { shininess 0.9 } texture ImageTexture { url "texture01.jpg" } } geometry Cylinder { radius 10 height 1 } } ] } ] } # the center wire Group { children [ Transform { translation 0 0 0 children [ Shape { appearance Appearance { material Material { shininess 1 } } geometry Cylinder { radius 0.5 height 29 } } ] } ] } # the left helix Group { children [ # load the left helix from lHelix.wrl DEF LHELIX Inline { url "leftHelix.wrl" } ] } # the right helix Group { children [ # load the right helix from lHelix.wrl DEF RHELIX Inline { url "rightHelix.wrl" } ] } # the center ball Group { children [ DEF cBall Transform { translation 0 13 0 children [ Shape { appearance Appearance { material Material { diffuseColor 0 0.8 0 } } geometry Sphere { radius 2 } } ] } DEF cTouch TouchSensor { } # Sound Sound { source DEF cAudio AudioClip { description "song" url "Barcelona.wav" loop TRUE startTime 0 stopTime 1.0 } minFront 7 maxFront 90 minBack 0.5 maxBack 5 } # time filter DEF cTimeFilter Script { url "javascript: function set_boolean( bool, timeStamp ) { begin_time = timeStamp; end_time = timeStamp+12; }" eventIn SFBool set_boolean eventOut SFTime begin_time eventOut SFTime end_time } # Animation clock DEF cClock TimeSensor { cycleInterval 12.0 enabled TRUE } # Animation path DEF cBallPath PositionInterpolator { key [ 0.00, 0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 0.22, 0.24, 0.26, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42, 0.44, 0.46, 0.48, 0.50, 0.52, 0.54, 0.56, 0.58, 0.60, 0.62, 0.64, 0.66, 0.68, 0.70, 0.72, 0.74, 0.76, 0.78, 0.80, 0.82, 0.84, 0.86, 0.88, 0.90, 0.92, 0.94, 0.96, 0.98, 1.00 ] keyValue [ 0 13.00 0 0 12.48 0 0 11.96 0 0 11.44 0 0 10.92 0 0 10.40 0 0 9.88 0 0 9.36 0 0 8.84 0 0 8.32 0 0 7.80 0 0 7.28 0 0 6.76 0 0 6.24 0 0 5.72 0 0 5.20 0 0 4.68 0 0 4.16 0 0 3.64 0 0 3.12 0 0 2.60 0 0 2.08 0 0 1.56 0 0 1.04 0 0 0.52 0 0 0.00 0 0 -0.52 0 0 -1.04 0 0 -1.56 0 0 -2.08 0 0 -2.60 0 0 -3.12 0 0 -3.64 0 0 -4.16 0 0 -4.68 0 0 -5.20 0 0 -5.72 0 0 -6.24 0 0 -6.76 0 0 -7.28 0 0 -7.80 0 0 -8.32 0 0 -8.84 0 0 -9.36 0 0 -9.88 0 0 -10.40 0 0 -10.92 0 0 -11.44 0 0 -11.96 0 0 -12.48 0 0 -13.00 0 ] } ] } # the left ball Group { children [ DEF lBall Transform { translation -6.3640 13.7500 6.3640 children [ Shape { appearance Appearance { material Material { diffuseColor 0.8 0 0 } } geometry Sphere { radius 1 } } ] } DEF lTouch TouchSensor { } # Sound Sound { source DEF lAudio AudioClip { description "song" url "secredMusic01.wav" loop TRUE startTime 0 stopTime 1.0 } minFront 10 maxFront 100 minBack 0.5 maxBack 5 } # time filter DEF lTimeFilter Script { url "javascript: function set_boolean( bool, timeStamp ) { begin_time = timeStamp; end_time = timeStamp+4; }" eventIn SFBool set_boolean eventOut SFTime begin_time eventOut SFTime end_time } # Animation clock DEF lClock TimeSensor { cycleInterval 4.0 enabled TRUE } # Animation path DEF lBallPath PositionInterpolator { key [ 0 0.0091 0.0182 0.0273 0.0364 0.0455 0.0545 0.0636 0.0727 0.0818 0.0909 0.1000 0.1091 0.1182 0.1273 0.1364 0.1455 0.1545 0.1636 0.1727 0.1818 0.1909 0.2000 0.2091 0.2182 0.2273 0.2364 0.2455 0.2545 0.2636 0.2727 0.2818 0.2909 0.3000 0.3091 0.3182 0.3273 0.3364 0.3455 0.3545 0.3636 0.3727 0.3818 0.3909 0.4000 0.4091 0.4182 0.4273 0.4364 0.4455 0.4545 0.4636 0.4727 0.4818 0.4909 0.5000 0.5091 0.5182 0.5273 0.5364 0.5455 0.5545 0.5636 0.5727 0.5818 0.5909 0.6000 0.6091 0.6182 0.6273 0.6364 0.6455 0.6545 0.6636 0.6727 0.6818 0.6909 0.7000 0.7091 0.7182 0.7273 0.7364 0.7455 0.7545 0.7636 0.7727 0.7818 0.7909 0.8000 0.8091 0.8182 0.8273 0.8364 0.8455 0.8545 0.8636 0.8727 0.8818 0.8909 0.9000 0.9091 0.9182 0.9273 0.9364 0.9455 0.9545 0.9636 0.9727 0.9818 0.9909 1.0000 ] keyValue [ -6.3640 13.7500 6.3640 -5.2901 13.5000 7.2812 -4.0859 13.2500 8.0191 -2.7812 13.0000 8.5595 -1.4079 12.7500 8.8892 -0.0000 12.5000 9.0000 1.4079 12.2500 8.8892 2.7812 12.0000 8.5595 4.0859 11.7500 8.0191 5.2901 11.5000 7.2812 6.3640 11.2500 6.3640 7.2812 11.0000 5.2901 8.0191 10.7500 4.0859 8.5595 10.5000 2.7812 8.8892 10.2500 1.4079 9.0000 10.0000 0.0000 8.8892 9.7500 -1.4079 8.5595 9.5000 -2.7812 8.0191 9.2500 -4.0859 7.2812 9.0000 -5.2901 6.3640 8.7500 -6.3640 5.2901 8.5000 -7.2812 4.0859 8.2500 -8.0191 2.7812 8.0000 -8.5595 1.4079 7.7500 -8.8892 0.0000 7.5000 -9.0000 -1.4079 7.2500 -8.8892 -2.7812 7.0000 -8.5595 -4.0859 6.7500 -8.0191 -5.2901 6.5000 -7.2812 -6.3640 6.2500 -6.3640 -7.2812 6.0000 -5.2901 -8.0191 5.7500 -4.0859 -8.5595 5.5000 -2.7812 -8.8892 5.2500 -1.4079 -9.0000 5.0000 -0.0000 -8.8892 4.7500 1.4079 -8.5595 4.5000 2.7812 -8.0191 4.2500 4.0859 -7.2812 4.0000 5.2901 -6.3640 3.7500 6.3640 -5.2901 3.5000 7.2812 -4.0859 3.2500 8.0191 -2.7812 3.0000 8.5595 -1.4079 2.7500 8.8892 -0.0000 2.5000 9.0000 1.4079 2.2500 8.8892 2.7812 2.0000 8.5595 4.0859 1.7500 8.0191 5.2901 1.5000 7.2812 6.3640 1.2500 6.3640 7.2812 1.0000 5.2901 8.0191 0.7500 4.0859 8.5595 0.5000 2.7812 8.8892 0.2500 1.4079 9.0000 0 0.0000 8.8892 -0.2500 -1.4079 8.5595 -0.5000 -2.7812 8.0191 -0.7500 -4.0859 7.2812 -1.0000 -5.2901 6.3640 -1.2500 -6.3640 5.2901 -1.5000 -7.2812 4.0859 -1.7500 -8.0191 2.7812 -2.0000 -8.5595 1.4079 -2.2500 -8.8892 0.0000 -2.5000 -9.0000 -1.4079 -2.7500 -8.8892 -2.7812 -3.0000 -8.5595 -4.0859 -3.2500 -8.0191 -5.2901 -3.5000 -7.2812 -6.3640 -3.7500 -6.3640 -7.2812 -4.0000 -5.2901 -8.0191 -4.2500 -4.0859 -8.5595 -4.5000 -2.7812 -8.8892 -4.7500 -1.4079 -9.0000 -5.0000 -0.0000 -8.8892 -5.2500 1.4079 -8.5595 -5.5000 2.7812 -8.0191 -5.7500 4.0859 -7.2812 -6.0000 5.2901 -6.3640 -6.2500 6.3640 -5.2901 -6.5000 7.2812 -4.0859 -6.7500 8.0191 -2.7812 -7.0000 8.5595 -1.4079 -7.2500 8.8892 -0.0000 -7.5000 9.0000 1.4079 -7.7500 8.8892 2.7812 -8.0000 8.5595 4.0859 -8.2500 8.0191 5.2901 -8.5000 7.2812 6.3640 -8.7500 6.3640 7.2812 -9.0000 5.2901 8.0191 -9.2500 4.0859 8.5595 -9.5000 2.7812 8.8892 -9.7500 1.4079 9.0000 -10.0000 0.0000 8.8892 -10.2500 -1.4079 8.5595 -10.5000 -2.7812 8.0191 -10.7500 -4.0859 7.2812 -11.0000 -5.2901 6.3640 -11.2500 -6.3640 5.2901 -11.5000 -7.2812 4.0859 -11.7500 -8.0191 2.7812 -12.0000 -8.5595 1.4079 -12.2500 -8.8892 -0.0000 -12.5000 -9.0000 -1.4079 -12.7500 -8.8892 -2.7812 -13.0000 -8.5595 -4.0859 -13.2500 -8.0191 -5.2901 -13.5000 -7.2812 -6.3640 -13.7500 -6.3640 ] } ] } # the right ball Group { children [ DEF rBall Transform { translation 4.9497 13.7500 4.9497 children [ Shape { appearance Appearance { material Material { diffuseColor 0 0 0.8 } } geometry Sphere { radius 1 } } ] } DEF rTouch TouchSensor { } # Sound Sound { source DEF rAudio AudioClip { description "song" url "MichaelAngelo.wav" loop TRUE startTime 0 stopTime 1.0 } minFront 10 maxFront 100 minBack 0.5 maxBack 5 } # time filter DEF rTimeFilter Script { url "javascript: function set_boolean( bool, timeStamp ) { begin_time = timeStamp; end_time = timeStamp+8; }" eventIn SFBool set_boolean eventOut SFTime begin_time eventOut SFTime end_time } # Animation clock DEF rClock TimeSensor { cycleInterval 8.0 enabled TRUE } # Animation path DEF rBallPath PositionInterpolator { key [ 0 0.0091 0.0182 0.0273 0.0364 0.0455 0.0545 0.0636 0.0727 0.0818 0.0909 0.1000 0.1091 0.1182 0.1273 0.1364 0.1455 0.1545 0.1636 0.1727 0.1818 0.1909 0.2000 0.2091 0.2182 0.2273 0.2364 0.2455 0.2545 0.2636 0.2727 0.2818 0.2909 0.3000 0.3091 0.3182 0.3273 0.3364 0.3455 0.3545 0.3636 0.3727 0.3818 0.3909 0.4000 0.4091 0.4182 0.4273 0.4364 0.4455 0.4545 0.4636 0.4727 0.4818 0.4909 0.5000 0.5091 0.5182 0.5273 0.5364 0.5455 0.5545 0.5636 0.5727 0.5818 0.5909 0.6000 0.6091 0.6182 0.6273 0.6364 0.6455 0.6545 0.6636 0.6727 0.6818 0.6909 0.7000 0.7091 0.7182 0.7273 0.7364 0.7455 0.7545 0.7636 0.7727 0.7818 0.7909 0.8000 0.8091 0.8182 0.8273 0.8364 0.8455 0.8545 0.8636 0.8727 0.8818 0.8909 0.9000 0.9091 0.9182 0.9273 0.9364 0.9455 0.9545 0.9636 0.9727 0.9818 0.9909 1.0000 ] keyValue [ 4.9497 13.7500 4.9497 4.1145 13.5000 5.6631 3.1779 13.2500 6.2370 2.1631 13.0000 6.6574 1.0950 12.7500 6.9138 0.0000 12.5000 7.0000 -1.0950 12.2500 6.9138 -2.1631 12.0000 6.6574 -3.1779 11.7500 6.2370 -4.1145 11.5000 5.6631 -4.9497 11.2500 4.9497 -5.6631 11.0000 4.1145 -6.2370 10.7500 3.1779 -6.6574 10.5000 2.1631 -6.9138 10.2500 1.0950 -7.0000 10.0000 0.0000 -6.9138 9.7500 -1.0950 -6.6574 9.5000 -2.1631 -6.2370 9.2500 -3.1779 -5.6631 9.0000 -4.1145 -4.9497 8.7500 -4.9497 -4.1145 8.5000 -5.6631 -3.1779 8.2500 -6.2370 -2.1631 8.0000 -6.6574 -1.0950 7.7500 -6.9138 -0.0000 7.5000 -7.0000 1.0950 7.2500 -6.9138 2.1631 7.0000 -6.6574 3.1779 6.7500 -6.2370 4.1145 6.5000 -5.6631 4.9497 6.2500 -4.9497 5.6631 6.0000 -4.1145 6.2370 5.7500 -3.1779 6.6574 5.5000 -2.1631 6.9138 5.2500 -1.0950 7.0000 5.0000 -0.0000 6.9138 4.7500 1.0950 6.6574 4.5000 2.1631 6.2370 4.2500 3.1779 5.6631 4.0000 4.1145 4.9497 3.7500 4.9497 4.1145 3.5000 5.6631 3.1779 3.2500 6.2370 2.1631 3.0000 6.6574 1.0950 2.7500 6.9138 0.0000 2.5000 7.0000 -1.0950 2.2500 6.9138 -2.1631 2.0000 6.6574 -3.1779 1.7500 6.2370 -4.1145 1.5000 5.6631 -4.9497 1.2500 4.9497 -5.6631 1.0000 4.1145 -6.2370 0.7500 3.1779 -6.6574 0.5000 2.1631 -6.9138 0.2500 1.0950 -7.0000 0 0.0000 -6.9138 -0.2500 -1.0950 -6.6574 -0.5000 -2.1631 -6.2370 -0.7500 -3.1779 -5.6631 -1.0000 -4.1145 -4.9497 -1.2500 -4.9497 -4.1145 -1.5000 -5.6631 -3.1779 -1.7500 -6.2370 -2.1631 -2.0000 -6.6574 -1.0950 -2.2500 -6.9138 -0.0000 -2.5000 -7.0000 1.0950 -2.7500 -6.9138 2.1631 -3.0000 -6.6574 3.1779 -3.2500 -6.2370 4.1145 -3.5000 -5.6631 4.9497 -3.7500 -4.9497 5.6631 -4.0000 -4.1145 6.2370 -4.2500 -3.1779 6.6574 -4.5000 -2.1631 6.9138 -4.7500 -1.0950 7.0000 -5.0000 -0.0000 6.9138 -5.2500 1.0950 6.6574 -5.5000 2.1631 6.2370 -5.7500 3.1779 5.6631 -6.0000 4.1145 4.9497 -6.2500 4.9497 4.1145 -6.5000 5.6631 3.1779 -6.7500 6.2370 2.1631 -7.0000 6.6574 1.0950 -7.2500 6.9138 0.0000 -7.5000 7.0000 -1.0950 -7.7500 6.9138 -2.1631 -8.0000 6.6574 -3.1779 -8.2500 6.2370 -4.1145 -8.5000 5.6631 -4.9497 -8.7500 4.9497 -5.6631 -9.0000 4.1145 -6.2370 -9.2500 3.1779 -6.6574 -9.5000 2.1631 -6.9138 -9.7500 1.0950 -7.0000 -10.0000 0.0000 -6.9138 -10.2500 -1.0950 -6.6574 -10.5000 -2.1631 -6.2370 -10.7500 -3.1779 -5.6631 -11.0000 -4.1145 -4.9497 -11.2500 -4.9497 -4.1145 -11.5000 -5.6631 -3.1779 -11.7500 -6.2370 -2.1631 -12.0000 -6.6574 -1.0950 -12.2500 -6.9138 -0.0000 -12.5000 -7.0000 1.0950 -12.7500 -6.9138 2.1631 -13.0000 -6.6574 3.1779 -13.2500 -6.2370 4.1145 -13.5000 -5.6631 4.9497 -13.7500 -4.9497 ] } ] } # center ball animation ROUTE cClock.fraction_changed TO cBallPath.set_fraction ROUTE cBallPath.value_changed TO cBall.set_translation # left ball animation ROUTE lClock.fraction_changed TO lBallPath.set_fraction ROUTE lBallPath.value_changed TO lBall.set_translation # left ball animation ROUTE rClock.fraction_changed TO rBallPath.set_fraction ROUTE rBallPath.value_changed TO rBall.set_translation # link center ball clock and sound to switch ROUTE Touch.isActive_changed TO cTimeFilter.set_boolean ROUTE cTouch.isActive_changed TO cTimeFilter.set_boolean ROUTE cTimeFilter.begin_time_changed TO cClock.set_startTime ROUTE cTimeFilter.begin_time_changed TO cAudio.set_startTime ROUTE cTimeFilter.end_time_changed TO cAudio.set_stopTime # link left ball clock and sound to switch ROUTE Touch.isActive_changed TO lTimeFilter.set_boolean ROUTE lTouch.isActive_changed TO lTimeFilter.set_boolean ROUTE lTimeFilter.begin_time_changed TO lClock.set_startTime ROUTE lTimeFilter.begin_time_changed TO lAudio.set_startTime ROUTE lTimeFilter.end_time_changed TO lAudio.set_stopTime # link right ball clock and sound to switch ROUTE Touch.isActive_changed TO rTimeFilter.set_boolean ROUTE rTouch.isActive_changed TO rTimeFilter.set_boolean ROUTE rTimeFilter.begin_time_changed TO rClock.set_startTime ROUTE rTimeFilter.begin_time_changed TO rAudio.set_startTime ROUTE rTimeFilter.end_time_changed TO rAudio.set_stopTime