<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D version='3.0' profile='Immersive' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.0.xsd'>
  <head>
    <meta content='KelpPrototype.x3d' name='title'/>
    <meta content='Creates Kelp Prototype - this file uses Bulb and is used by KelpExamplesNoBase.' name='description'/>
    <meta content='Joseph Cannon, Dan DeVos' name='creator'/>
    <meta content='18 March 1999' name='created'/>
    <meta content='28 December 2002' name='modified'/>
    <meta content='http://web.nps.navy.mil/~brutzman/kelp' name='reference'/>
    <meta content='KelpForestDesignPaperWeb3dSymposiumFebruary2002.pdf' name='reference'/>
    <meta content='http://www.web3d.org/x3d/content/examples/Basic/KelpForestExhibit/KelpForestDesignPaperWeb3dSymposiumFebruary2002.pdf' name='reference'/>
    <meta content='http://www.web3d.org/x3d/content/examples/Basic/KelpForestExhibit/Teaching3d-KelpForestCaseStudy.pdf' name='reference'/>
    <meta content='All content has permissions for free use.  &#10;Please provide credit to the Naval Postgraduate School (NPS)&#10;Modeling Virtual Environments and Simulation (MOVES) Institute.' name='accessRights'/>
    <meta content='brutzman@nps.navy.mil' name='contact'/>
    <meta content='http://www.web3d.org/x3d/content/examples/Basic/KelpForestExhibit/KelpPrototype.x3d' name='identifier'/>
    <meta content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html' name='generator'/>
    <meta name='license' content='../../license.html'/>
  </head>
  <Scene>
    <ProtoDeclare name='Kelp'>
      <ProtoInterface>
        <field accessType='inputOutput' name='frontBladeSize' type='SFVec3f' value='0.7 0.7 0.7'/>
        <field accessType='inputOutput' name='frontSideBladeHeight' type='SFVec3f' value='0.0 4.0 0.0'/>
        <field accessType='inputOutput' name='rightBladeSize' type='SFVec3f' value='0.7 0.7 0.7'/>
        <field accessType='inputOutput' name='rightSideBladeHeight' type='SFVec3f' value='0.0 12.0 0.0'/>
        <field accessType='inputOutput' name='rearBladeSize' type='SFVec3f' value='0.4 0.4 0.4'/>
        <field accessType='inputOutput' name='rearSideBladeHeight' type='SFVec3f' value='0.0 20.0 0.0'/>
        <field accessType='inputOutput' name='leftBladeSize' type='SFVec3f' value='0.4 0.4 0.4'/>
        <field accessType='inputOutput' name='leftSideBladeHeight' type='SFVec3f' value='0.0 24.0 0.0'/>
      </ProtoInterface>
      <ProtoBody>
        <Group>
          <Transform DEF='stipe' center='0.0 -16.0 0.0' rotation='0.0 0.0 0.0  0.0' translation='0.0 14.0 0.0'>
            <Shape DEF='stemShape'>
              <Appearance DEF='kelpColor'>
                <Material diffuseColor='0.882 0.757 0.184'/>
              </Appearance>
              <Cylinder bottom='false' height='28.0' radius='0.2' top='false'/>
            </Shape>
            <Transform DEF='horizontalStipe' center='0.0 16.0 0.0' rotation='0.0 0.0 1.0  1.571' scale='0.5 0.3 0.5' translation='1.3 0.0 0.0'>
              <Transform>
                <Shape USE='stemShape'/>
              </Transform>
              <Transform DEF='blade_X1' rotation='0.0 1.0 0.0  1.0' translation='0.0 12.0 0.0'>
                <Transform DEF='bladeRotateZ' rotation='0.0 0.0 1.0  -1.2'>
                  <Transform DEF='BLADE' center='-0.5 0.0 0.0' translation='1.0 0.0 0.0'>
                    <Inline DEF='bulb' url='"KelpBulb.wrl"&#10;"http://www.web3d.org/x3d/content/examples/Basic/KelpForestExhibit/KelpBulb.wrl"&#10;"KelpBulb.x3d"&#10;"http://www.web3d.org/x3d/content/examples/Basic/KelpForestExhibit/KelpBulb.x3d"'/>
                  </Transform>
                </Transform>
              </Transform>
              <Transform DEF='blade_X2' rotation='0.0 1.0 0.0  -1.0'>
                <Transform USE='bladeRotateZ'/>
              </Transform>
              <Transform DEF='blade_X3' rotation='0.0 1.0 0.0  4.342' translation='0.0 -12.0 0.0'>
                <Transform USE='bladeRotateZ'/>
              </Transform>
            </Transform>
            <Transform translation='0.0 14.0 0.0'>
              <Shape>
                <Appearance USE='kelpColor'/>
                <Extrusion creaseAngle='1.57' crossSection='0.2 0.0, 0.184 -0.076, 0.142 -0.142, 0.076 -0.184, 0.0 -0.2, -0.076 -0.184, -0.142 -0.142, -0.184 -0.076, -0.2 -0.0, -0.184 0.076, -0.142 0.142, -0.076 0.184, 0.0 0.2, 0.076 0.184, 0.142 0.142, 0.184 0.076, 0.2 0.0, ' scale='1.0 1.0, 0.8 0.8, 0.7 0.7, 0.6 0.6, 0.5 0.5,' spine='0.0 0.0 0.0, 0.15 0.77 0.0, 0.59 1.41 0.0, 1.23 1.85 0.0, 2.0 2.0 0.0, '/>
              </Shape>
            </Transform>
          </Transform>
          <Transform DEF='blade_Y1' rotation='0.0 0.0 1.0  1.2'>
            <IS>
              <connect nodeField='scale' protoField='frontBladeSize'/>
              <connect nodeField='translation' protoField='frontSideBladeHeight'/>
            </IS>
            <Transform USE='BLADE'/>
          </Transform>
          <Transform DEF='blade_Y2' rotation='0.0 1.0 0.0  4.2'>
            <IS>
              <connect nodeField='scale' protoField='rightBladeSize'/>
              <connect nodeField='translation' protoField='rightSideBladeHeight'/>
            </IS>
            <Transform DEF='bladeToTheSide' rotation='1.0 0.0 0.0  3.142'>
              <Transform rotation='0.0 0.0 1.0  -1.2'>
                <Transform DEF='rotateBlade90' center='-0.5 0.0 0.0' rotation='1.0 0.0 0.0  1.571' translation='1.0 0.0 0.0'>
                  <Inline USE='bulb'/>
                </Transform>
              </Transform>
            </Transform>
          </Transform>
          <Transform DEF='blade_Y3' rotation='0.0 1.0 0.0  3.2'>
            <IS>
              <connect nodeField='scale' protoField='rearBladeSize'/>
              <connect nodeField='translation' protoField='rearSideBladeHeight'/>
            </IS>
            <Transform DEF='Blade-Z' rotation='1.0 0.0 0.0  3.142'>
              <Transform rotation='0.0 0.0 1.0  -1.2'>
                <Transform USE='BLADE'/>
              </Transform>
            </Transform>
          </Transform>
          <Transform DEF='blade_Y4' rotation='0.0 1.0 0.0  1.2'>
            <IS>
              <connect nodeField='scale' protoField='leftBladeSize'/>
              <connect nodeField='translation' protoField='leftSideBladeHeight'/>
            </IS>
            <Transform USE='bladeToTheSide'/>
          </Transform>
          <TimeSensor DEF='Clock' cycleInterval='5.5' loop='true'/>
          <OrientationInterpolator DEF='horizontalStipeMover' key=' 0.0 0.25 0.5 0.75 1.0' keyValue='0.0 0.0 1.0  1.471, 0.0 0.0 1.0  1.571, 0.0 0.0 1.0  1.671, 0.0 0.0 1.0  1.571, 0.0 0.0 1.0  1.471, '/>
          <OrientationInterpolator DEF='verticalStipeMover' key=' 0.0 0.25 0.5 0.75 1.0' keyValue='0.0 0.0 1.0  0.1, 0.0 0.0 1.0  0.0, 0.0 0.0 1.0  -0.1, 0.0 0.0 1.0  0.0, 0.0 0.0 1.0  0.1, '/>
          <OrientationInterpolator DEF='bladePath1' key=' 0.0 0.5 1.0' keyValue='0.0 0.0 1.0  0.3, 0.0 0.0 1.0  -0.3, 0.0 0.0 1.0  0.3, '/>
        </Group>
        <ROUTE fromField='fraction_changed' fromNode='Clock' toField='set_fraction' toNode='horizontalStipeMover'/>
        <ROUTE fromField='fraction_changed' fromNode='Clock' toField='set_fraction' toNode='verticalStipeMover'/>
        <ROUTE fromField='value_changed' fromNode='horizontalStipeMover' toField='set_rotation' toNode='horizontalStipe'/>
      </ProtoBody>
    </ProtoDeclare>
    <!-- Example use of this prototype is in KelpNoBase.x3d, .wrl -->
    <Viewpoint description='click message to view example' position='0 0 8'/>
    <!-- Redirection text in case a user examines this PROTO file via a 3D browser: -->
    <Anchor DEF='TouchTextForExample' description='KelpNoBase' parameter='target=_blank' url='"KelpExamplesNoBase.wrl"&#10;"http://www.web3d.org/x3d/content/examples/Basic/course/KelpExamplesNoBase.wrl"&#10;"KelpExamplesNoBase.x3d"&#10;"http://www.web3d.org/x3d/content/examples/Basic/course/KelpExamplesNoBase.x3d"'>
      <Shape>
        <Appearance>
          <Material diffuseColor='0 1 1' emissiveColor='0 1 1'/>
        </Appearance>
        <Text string='"KelpPrototype.wrl"&#10;"is a Prototype (PROTO) definition file."&#10;""&#10;"To see an example scene using 3 instances of"&#10;"this new node,"&#10;"click this text and view"&#10;"KelpNoBase.wrl"'>
          <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.5'/>
        </Text>
      </Shape>
    </Anchor>
  </Scene>
</X3D>
