{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Interactive",
    "@version":"3.3",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.3.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"CylinderSensorPumpHouse.x3d"
          },
          {
            "@name":"description",
            "@content":"A CylinderSensor changes the viewing position of a positive-displacement cylinder pump house."
          },
          {
            "@name":"creator",
            "@content":"Todd Gagnon and Mark A. Boyd"
          },
          {
            "@name":"translator",
            "@content":"Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html"
          },
          {
            "@name":"created",
            "@content":"8 June 1998"
          },
          {
            "@name":"translated",
            "@content":"20 December 2002"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"KelpTank.x3d"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/PumpHouse.x3d"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter08UserInteractivity/CylinderSensorPumpHouse.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"generator",
            "@content":"Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"17 April 2026"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "WorldInfo":
            {
              "@title":"CylinderSensorPumpHouse.x3d"
            }
          },
          { "Background":
            {
              "@skyColor":[1,1,1]
            }
          },
          { "Viewpoint":
            {
              "@DEF":"AdjustableView",
              "@description":"Adjustible Viewpoint",
              "@position":[0.02,0.45,5]
            }
          },
          { "Transform":
            {
              "@translation":[1.75,1,0],
              "-children":[
                { "CylinderSensor":
                  {
                    "@DEF":"Mover",
                    "@description":"click and drag to rotate",
                    "@diskAngle":1.56,
                    "@maxAngle":0.3,
                    "@minAngle":-0.3
                  }
                },
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0.9,0.9,0.9]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                          "@size":[1,1.25,0.02]
                        }
                      }
                  }
                },
                { "Transform":
                  {
                    "-children":[
                      { "Transform":
                        {
                          "-children":[
                            { "Transform":
                              {
                                "@rotation":[1,0,0,1.57],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@DEF":"Indicator",
                                            "-material":
                                              { "Material":
                                                {
                                                  "@diffuseColor":[1,0,0]
                                                }
                                              }
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":0.3,
                                            "@radius":0.3
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "Transform":
                        {
                          "@rotation":[1,0,0,-1.57],
                          "-children":[
                            { "Transform":
                              {
                                "@DEF":"Handle",
                                "-children":[
                                  { "Transform":
                                    {
                                      "@rotation":[0,0,1,-1.57],
                                      "@translation":[0.25,0,0],
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"Indicator"
                                                }
                                              },
                                            "-geometry":
                                              { "Cone":
                                                {
                                                  "@bottomRadius":0.1,
                                                  "@height":0.6
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                { "ROUTE":
                  {
                    "@fromField":"rotation_changed",
                    "@fromNode":"Mover",
                    "@toField":"rotation",
                    "@toNode":"Handle"
                  }
                },
                { "ROUTE":
                  {
                    "@fromField":"rotation_changed",
                    "@fromNode":"Mover",
                    "@toField":"orientation",
                    "@toNode":"AdjustableView"
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[0.91,0.6,0.3],
                    "@translation":[0.8,-0.65,0.5],
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0.749,0.694,0.651]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cylinder":
                              {
                                "@bottom":false,
                                "@top":false
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Group":
                  {
                    "-children":[
                      { "Shape":
                        {
                          "-appearance":
                            { "Appearance":
                              {
                                "@DEF":"PumpHouseAppearance",
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0.82,0.78,0.74]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "IndexedFaceSet":
                              {
                                "@coordIndex":[0,1,5,4,-1,5,1,2,6,-1,6,2,3,7,-1,3,0,4,7,-1,1,12,13,2,-1,2,13,14,-1,12,15,16,13,-1,15,0,3,16,-1,16,3,17,-1,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,3,2,14,17,-1,13,16,17,14,-1],
                                "-coord":
                                  { "Coordinate":
                                    {
                                      "@point":[0.0,0.0,0.0,2.0,0.0,0.0,2.0,1.75,0.0,0.0,1.75,0.0,0.625,0.75,0.0,1.0,0.75,0.0,1.0,1.6,0.0,0.625,1.6,0.0,0.625,0.75,-0.65,1.0,0.75,-0.65,1.0,1.6,-0.65,0.625,1.6,-0.65,2.0,0.0,-2.7,2.0,1.75,-2.7,2.0,2.5,-1.0,0.0,0.0,-2.7,0.0,1.75,-2.7,0.0,2.5,-1.0]
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "TouchSensor":
                        {
                          "@DEF":"PumpTouched",
                          "@description":"touch to activate"
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@scale":[0.5,0.5,0.5],
                    "@translation":[1.0,1.1,-1.5],
                    "-children":[
                      { "Transform":
                        {
                          "@DEF":"PistonTransform",
                          "-children":[
                            { "Transform":
                              {
                                "@scale":[1.8,1.2,0.6],
                                "@translation":[0.0,-0.2,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "-material":
                                              { "Material":
                                                {
                                                  "@diffuseColor":[0.427,0.427,0.42]
                                                }
                                              }
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.0,
                                            "@radius":0.98
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"CylinderRod",
                                "@rotation":[0.0,0.0,-1.0,0.523599],
                                "@translation":[-0.25,0.75,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.0,
                                            "@radius":0.1
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@rotation":[0.0,0.0,1.0,1.047198],
                                "@translation":[1.0,0.6,0.0],
                                "-children":[
                                  { "Transform":
                                    {
                                      "@USE":"CylinderRod"
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@translation":[0.0,1.2,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Sphere":
                                          {
                                            "@radius":0.15
                                          }
                                        }
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"RockerArm1",
                                "@center":[0.0,-0.4,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.8,
                                            "@radius":0.1
                                          }
                                        }
                                    }
                                  },
                                  { "Transform":
                                    {
                                      "@translation":[0.0,0.95,0.0],
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"PumpHouseAppearance"
                                                }
                                              },
                                            "-geometry":
                                              { "Sphere":
                                                {
                                                  "@radius":0.15
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  { "PositionInterpolator":
                                    {
                                      "@DEF":"Rocker1Path",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@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]
                                    }
                                  },
                                  { "OrientationInterpolator":
                                    {
                                      "@DEF":"Rocker1Rotation",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@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]
                                    }
                                  }
                                ]
                              }
                            },
                            { "Transform":
                              {
                                "@DEF":"RockerArm2",
                                "@center":[0.0,0.7,0.0],
                                "-children":[
                                  { "Shape":
                                    {
                                      "-appearance":
                                        { "Appearance":
                                          {
                                            "@USE":"PumpHouseAppearance"
                                          }
                                        },
                                      "-geometry":
                                        { "Cylinder":
                                          {
                                            "@height":1.8,
                                            "@radius":0.1
                                          }
                                        }
                                    }
                                  },
                                  { "Transform":
                                    {
                                      "@translation":[0.0,-0.95,0.0],
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"PumpHouseAppearance"
                                                }
                                              },
                                            "-geometry":
                                              { "Sphere":
                                                {
                                                  "@radius":0.15
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  { "PositionInterpolator":
                                    {
                                      "@DEF":"Rocker2Path",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@keyValue":[0.0,1.95,-1.0,0.0,1.2,-1.6,0.0,1.2,-1.6,0.0,1.95,-1.0,0.0,2.2,-0.65,0.0,1.95,-1.0]
                                    }
                                  },
                                  { "OrientationInterpolator":
                                    {
                                      "@DEF":"Rocker2Rotation",
                                      "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                                      "@keyValue":[1.0,0.0,0.0,0.523599,1.0,0.0,0.0,0.4,1.0,0.0,0.0,0.4,1.0,0.0,0.0,0.523599,1.0,0.0,0.0,1.570796,1.0,0.0,0.0,0.523599]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "TimeSensor":
                        {
                          "@DEF":"PistonClock",
                          "@cycleInterval":5.5,
                          "@enabled":false,
                          "@loop":true
                        }
                      },
                      { "PositionInterpolator":
                        {
                          "@DEF":"PistonPath",
                          "@key":[0.0,0.3,0.32,0.5,0.75,1.0],
                          "@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]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"PumpTouched",
              "@toField":"enabled",
              "@toNode":"PistonClock"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"PistonPath"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"PistonPath",
              "@toField":"set_translation",
              "@toNode":"PistonTransform"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker1Path"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker1Path",
              "@toField":"set_translation",
              "@toNode":"RockerArm1"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker1Rotation"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker1Rotation",
              "@toField":"set_rotation",
              "@toNode":"RockerArm1"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker2Path"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker2Path",
              "@toField":"set_translation",
              "@toNode":"RockerArm2"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"PistonClock",
              "@toField":"set_fraction",
              "@toNode":"Rocker2Rotation"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"Rocker2Rotation",
              "@toField":"set_rotation",
              "@toNode":"RockerArm2"
            }
          }
        ]
    }
  }
}