<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.3.xsd '>
<head>
<meta name='titlecontent='KelpExamplesNoBase.x3d'/>
<meta name='descriptioncontent='Creates 3 instances of Kelp that sway.'/>
<meta name='creatorcontent='Joseph Cannon, Dan DeVos, Don Brutzman'/>
<meta name='createdcontent='25 September 1998'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent=' http://faculty.nps.edu/brutzman/kelp '/>
<meta name='referencecontent='KelpForestDesignPaperWeb3dSymposiumFebruary2002.pdf'/>
<meta name='referencecontent=' https://x3dgraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/KelpForestDesignPaperWeb3dSymposiumFebruary2002.pdf '/>
<meta name='referencecontent=' https://x3dgraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/Teaching3d-KelpForestCaseStudy.pdf '/>
<meta name='accessRightscontent='All content has permissions for free use. Please provide credit to the Naval Postgraduate School (NPS) Modeling Virtual Environments and Simulation (MOVES) Institute.'/>
<meta name='identifiercontent=' https://x3dgraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/KelpExamplesNoBase.x3d '/>
<meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for ExternProtoDeclare definition : Kelp

Index for DEF nodes : Clock0, KelpPath0, KelpPath1, KelpPath2, KelpTransform0, KelpTransform1, KelpTransform2, TimeDelay1, TimeDelay2
-->
<Scene>
<WorldInfo title='KelpExamplesNoBase.x3d'/>
<ExternProtoDeclare name='Kelpappinfo='Kelp strands and bulbs with no base'
  url=' "KelpPrototype.x3d#Kelp" "https://x3dgraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/KelpPrototype.x3d#Kelp" "KelpPrototype.wrl#Kelp" "https://x3dgraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/KelpPrototype.wrl#Kelp" '>
<field name='frontBladeSizetype='SFVec3faccessType='inputOutput'/>
<field name='rearSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
<field name='frontSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
<field name='rightBladeSizetype='SFVec3faccessType='inputOutput'/>
<field name='rightSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
<field name='leftBladeSizetype='SFVec3faccessType='inputOutput'/>
<field name='rearBladeSizetype='SFVec3faccessType='inputOutput'/>
<field name='leftSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
</ExternProtoDeclare>
<Group>
<!-- ROUTE information for KelpTransform0 node:  [from KelpPath0.value_changed to set_rotation ] -->
<Transform DEF='KelpTransform0scale='0.3 0.3 0.3'>
<ProtoInstance name='Kelp'/>
</Transform>
<!-- ROUTE information for KelpTransform1 node:  [from KelpPath1.value_changed to set_rotation ] -->
<Transform DEF='KelpTransform1rotation='0.0 1.0 0.0 5.5scale='0.29 0.29 0.29translation='-0.5 0.0 0.0'>
<ProtoInstance name='Kelp'>
<fieldValue name='rearSideBladeHeightvalue='0.0 15.0 0.0'/>
<fieldValue name='frontBladeSizevalue='0.4 0.4 0.4'/>
<fieldValue name='frontSideBladeHeightvalue='0.0 23.0 0.0'/>
<fieldValue name='rightBladeSizevalue='0.4 0.4 0.4'/>
<fieldValue name='rightSideBladeHeightvalue='0.0 20.0 0.0'/>
<fieldValue name='leftBladeSizevalue='0.7 0.7 0.7'/>
<fieldValue name='rearBladeSizevalue='0.7 0.7 0.7'/>
<fieldValue name='leftSideBladeHeightvalue='0.0 6.0 0.0'/>
</ProtoInstance>
</Transform>
<!-- ROUTE information for KelpTransform2 node:  [from KelpPath2.value_changed to set_rotation ] -->
<Transform DEF='KelpTransform2scale='0.3 0.3 0.3translation='0.5 0.0 0.5'>
<ProtoInstance name='Kelp'>
<fieldValue name='rearSideBladeHeightvalue='0.0 18.0 0.0'/>
<fieldValue name='frontBladeSizevalue='0.7 0.7 0.7'/>
<fieldValue name='frontSideBladeHeightvalue='0.0 8.0 0.0'/>
<fieldValue name='rightBladeSizevalue='0.7 0.7 0.7'/>
<fieldValue name='rightSideBladeHeightvalue='0.0 16.0 0.0'/>
<fieldValue name='leftBladeSizevalue='0.7 0.7 0.7'/>
<fieldValue name='rearBladeSizevalue='0.4 0.4 0.4'/>
<fieldValue name='leftSideBladeHeightvalue='0.0 13.0 0.0'/>
</ProtoInstance>
</Transform>
</Group>
<Group>
<!-- ==================== -->
<!-- ROUTE information for Clock0 node:  [from fraction_changed to KelpPath0.set_fraction ] [from fraction_changed to TimeDelay1.set_fraction ] [from fraction_changed to TimeDelay2.set_fraction ] -->
<TimeSensor DEF='Clock0cycleInterval='5.5loop='true'/>
<!-- ==================== -->
<!-- ROUTE information for KelpPath0 node:  [from Clock0.fraction_changed to set_fraction ] [from value_changed to KelpTransform0.set_rotation ] -->
<OrientationInterpolator DEF='KelpPath0key='0.0 0.05 0.25 0.45 0.5 0.55 0.75 0.95 1.0keyValue='0 0 1 0.1 0 0 1 0.095 0 0 1 0 0 0 1 -0.095 0 0 1 -0.1 0 0 1 -0.095 0 0 1 0 0 0 1 0.095 0 0 1 0.1'/>
<ROUTE fromNode='Clock0fromField='fraction_changedtoNode='KelpPath0toField='set_fraction'/>
<ROUTE fromNode='KelpPath0fromField='value_changedtoNode='KelpTransform0toField='set_rotation'/>
<!-- ==================== -->
<!-- ROUTE information for TimeDelay1 node:  [from Clock0.fraction_changed to set_fraction ] [from value_changed to KelpPath1.set_fraction ] -->
<Script DEF='TimeDelay1'>
<field name='set_fractiontype='SFFloataccessType='inputOnly'/>
<field name='value_changedtype='SFFloataccessType='outputOnly'/>
<![CDATA[
        
ecmascript:

function set_fraction (value, timestamp)
{
	delay = 0.25;
	delayedValue = value + (delay/5.5); // delay/interval, seconds
	if (delayedValue > 1) delayedValue--;
	value_changed = delayedValue;

//	Browser.print ('TimeDelay1 value=' + value + ', value_changed=' + value_changed);
}

      
]]>
</Script>
<!-- ROUTE information for KelpPath1 node:  [from TimeDelay1.value_changed to set_fraction ] [from value_changed to KelpTransform1.set_rotation ] -->
<OrientationInterpolator DEF='KelpPath1key='0.0 0.05 0.25 0.45 0.5 0.55 0.75 0.95 1.0keyValue='0 0 1 0.1 0 0 1 0.095 0 0 1 0 0 0 1 -0.095 0 0 1 -0.1 0 0 1 -0.095 0 0 1 0 0 0 1 0.095 0 0 1 0.1'/>
<ROUTE fromNode='Clock0fromField='fraction_changedtoNode='TimeDelay1toField='set_fraction'/>
<ROUTE fromNode='TimeDelay1fromField='value_changedtoNode='KelpPath1toField='set_fraction'/>
<ROUTE fromNode='KelpPath1fromField='value_changedtoNode='KelpTransform1toField='set_rotation'/>
<!-- ==================== -->
<!-- ROUTE information for TimeDelay2 node:  [from Clock0.fraction_changed to set_fraction ] [from value_changed to KelpPath2.set_fraction ] -->
<Script DEF='TimeDelay2'>
<field name='set_fractiontype='SFFloataccessType='inputOnly'/>
<field name='value_changedtype='SFFloataccessType='outputOnly'/>
<![CDATA[
        
ecmascript:

function set_fraction (value, timestamp)
{
	delay = 0.5;
	delayedValue = value + (delay/5.5); // delay/interval, seconds
	if (delayedValue > 1) delayedValue--;
	value_changed = delayedValue;

//	Browser.print ('TimeDelay2 value=' + value + ', value_changed=' + value_changed);
}

      
]]>
</Script>
<!-- ROUTE information for KelpPath2 node:  [from TimeDelay2.value_changed to set_fraction ] [from value_changed to KelpTransform2.set_rotation ] -->
<OrientationInterpolator DEF='KelpPath2key='0.0 0.05 0.25 0.45 0.5 0.55 0.75 0.95 1.0keyValue='0 0 1 0.1 0 0 1 0.095 0 0 1 0 0 0 1 -0.095 0 0 1 -0.1 0 0 1 -0.095 0 0 1 0 0 0 1 0.095 0 0 1 0.1'/>
<ROUTE fromNode='Clock0fromField='fraction_changedtoNode='TimeDelay2toField='set_fraction'/>
<ROUTE fromNode='TimeDelay2fromField='value_changedtoNode='KelpPath2toField='set_fraction'/>
<ROUTE fromNode='KelpPath2fromField='value_changedtoNode='KelpTransform2toField='set_rotation'/>
</Group>
</Scene>
</X3D>
<!--

Index for ExternProtoDeclare definition : Kelp

Index for DEF nodes : Clock0, KelpPath0, KelpPath1, KelpPath2, KelpTransform0, KelpTransform1, KelpTransform2, TimeDelay1, TimeDelay2
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
    <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources and X3D Scene Authoring Hints. -->