#VRML V2.0 utf8 WorldInfo { title "pumpHouse1.4.wrl" info ["DTG of last update: 081200Jun98", "Added: ", "Updated: cycleInterval to 5.5", "Modeled by: Todd Gagnon and Mark A. Boyd", ] } Group{ children[ Shape{ appearance DEF pumpHouse Appearance{ material Material{ diffuseColor .82 .78 .74 } } geometry IndexedFaceSet{ coord Coordinate { point [ 0 0 0 #0 2 0 0 #1 2 1.75 0 #2 0 1.75 0 #3 0.625 0.75 0 #4 1 0.75 0 #5 1 1.6 0 #6 0.625 1.6 0 #7 0.625 0.75 -.65 #8 1 0.75 -.65 #9 1 1.6 -.65 #10 0.625 1.6 -.65 #11 2 0 -2.7 #12 2 1.75 -2.7 #13 2 2.5 -1 #14 0 0 -2.7 #15 0 1.75 -2.7 #16 0 2.5 -1 #17 ] } coordIndex[ #pump houes front 0, 1, 5, 4, -1, 5, 1, 2, 6, -1, 6, 2, 3, 7, -1, 3, 0, 4, 7, -1, #pumpHouse right side 1, 12, 13, 2, -1,, 2, 13, 14, -1, #pumpHouse back 12, 15, 16, 13, -1, #pumpHouse left side 15, 0, 3, 16, -1, 16, 3, 17, -1, #pump arm hole 9, 5, 6, 10, -1, 8, 9, 10, 11, -1, 4, 8, 11, 7, -1, 4, 5, 9, 8, -1, 11, 10, 6, 7, -1, #front roof 3, 2, 14, 17, -1, #back roof 13, 16, 17, 14, -1, ] }#end geometry IndexedFaceSet pumpHouse }#end Shape pumpHouse Transform { translation .8 -.65 .5 scale .91 .6 .3 children [ Shape { appearance Appearance { material Material { diffuseColor .749 .694 .651 } } geometry Cylinder { top FALSE bottom FALSE } } ] } ] } Group { children[ Transform{ translation 1 1.1 -1.5 scale .5 .5 .5 children[ DEF PISTON Transform { children [ #Piston itself Transform { translation 0 -.2 0 scale 1.8 1.2 .6 children [ Shape { appearance Appearance { material Material { diffuseColor .427 .427 .420 } } geometry Cylinder { radius 0.98 height 1.0 } } ] } #Left Cylinder Rod DEF CylinderRod Transform { translation -0.25 0.75 0.00 rotation 0.00 0.00 -1.00 0.523599 children [ Shape { appearance USE pumpHouse geometry Cylinder { radius 0.1 height 1.0 } } ] } #Right Cylinder Rod Transform { translation 1.00 0.60 0.00 rotation 0.00 0.00 1.00 1.047198 children USE CylinderRod } #Ball connector for cylinder rods Transform { translation 0.0 1.2 0.0 children [ Shape{ appearance USE pumpHouse geometry Sphere { radius 0.15 } } ] }#end Ball connector Transform #Rocker Arm One DEF ROCKERARM1 Transform { center 0.0 -0.4 0.0 children [ Shape{ appearance USE pumpHouse geometry Cylinder { radius 0.1 height 1.8 } } #Ball connector between Rocker Arm1 and Rocker Arm2 Transform { translation 0.0 0.95 0.0 children[ Shape { appearance USE pumpHouse geometry Sphere { radius 0.15 } } ] } #Animation path for Rocker Arm1 DEF ROCKER1Path PositionInterpolator { key [ 0.00, 0.30, 0.32, 0.50, 0.75, 1.00 ] keyValue [ 0.0 2.0 -0.25, 0.0 1.8 -0.35, 0.0 1.8 -0.35, 0.0 2.0 -0.25, 0.0 2.0 -0.12, 0.0 2.0 -0.25 ] } DEF ROCKER1Rotation OrientationInterpolator { key [ 0.00, 0.30, 0.32, 0.50, 0.75, 1.00 ] keyValue [ -1.0 0.0 0.0 0.523599, -1.0 0.0 0.0 1.0471976, -1.0 0.0 0.0 1.0471976, -1.0 0.0 0.0 0.523599, -1.0 0.0 0.0 0.2617994, -1.0 0.0 0.0 0.523599 ] } ] }#end Rocker Arm1 Transform #Rocker Arm Two DEF ROCKERARM2 Transform { center 0.0 0.7 0.0 children [ Shape{ appearance USE pumpHouse geometry Cylinder { radius 0.1 height 1.8 } } #Ball connector for Rocker arm2 Transform { translation 0.0 -0.95 0.0 children [ Shape { appearance USE pumpHouse geometry Sphere { radius 0.15 } } ] } #Animation path for Rocker Arm2 DEF ROCKER2Path PositionInterpolator { key [ 0.00, 0.30, 0.32, 0.50, 0.75, 1.00 ] keyValue [ 0.0 1.95 -1.00, 0.0 1.2 -1.60, 0.0 1.20 -1.60, 0.0 1.95 -1.00, 0.0 2.20 -0.65, 0.0 1.95 -1.00 ] } DEF ROCKER2Rotation OrientationInterpolator { key [ 0.00, 0.30, 0.32, 0.50, 0.75, 1.00 ] keyValue [ 1.0 0.0 0.0 0.523599, 1.0 0.0 0.0 0.400000, 1.0 0.0 0.0 0.400000, 1.0 0.0 0.0 0.523599, 1.0 0.0 0.0 1.570796, 1.0 0.0 0.0 0.523599 ] } ] }#end Rocker Arm2 Transform ] }#end PISTON Transform #Animation clock DEF PISTONClock TimeSensor { cycleInterval 5.5 loop TRUE } #Animation path DEF PISTONPath PositionInterpolator { key [ 0.00, 0.30, 0.32, 0.50, 0.75, 1.00 ] keyValue [ -0.4 -2.3 4.0, -0.4 -1.5 4.0, -0.4 -1.5 4.0, -0.4 -2.3 4.0, -0.4 -3.3 4.0, -0.4 -2.3 4.0 ] } ] }#end PISTON Group ] } ROUTE PISTONClock.fraction_changed TO PISTONPath.set_fraction ROUTE PISTONPath.value_changed TO PISTON.set_translation ROUTE PISTONClock.fraction_changed TO ROCKER1Path.set_fraction ROUTE ROCKER1Path.value_changed TO ROCKERARM1.set_translation ROUTE PISTONClock.fraction_changed TO ROCKER1Rotation.set_fraction ROUTE ROCKER1Rotation.value_changed TO ROCKERARM1.set_rotation ROUTE PISTONClock.fraction_changed TO ROCKER2Path.set_fraction ROUTE ROCKER2Path.value_changed TO ROCKERARM2.set_translation ROUTE PISTONClock.fraction_changed TO ROCKER2Rotation.set_fraction ROUTE ROCKER2Rotation.value_changed TO ROCKERARM2.set_rotation