<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.1//EN"   "http://www.web3d.org/specifications/x3d-3.1.dtd">
<X3D profile='Immersiveversion='3.1xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation=' http://www.web3d.org/specifications/x3d-3.1.xsd '>
<head>
<component level='3name='Interpolation'/>
<meta name='titlecontent='CoordinateInterpolator2dExample.x3d'/>
<meta name='descriptioncontent='Example to interpolate using CoordinateInterpolator2D - click geometry to activate animation loop.'/>
<meta name='creatorcontent='Don Brutzman, Jeff Weekley, Jane Wu'/>
<meta name='createdcontent='9 October 2001'/>
<meta name='modifiedcontent='30 January 2008'/>
<meta name='subjectcontent='CoordinateInterpolator2D'/>
<meta name='identifiercontent=' http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter07-EventAnimationInterpolation/CoordinateInterpolator2dExample.x3d '/>
<meta name='referencecontent=' http://www.web3d.org/x3d/content/examples/Basic/development/CoordinateInterpolator2dExample.x3d '/>
<meta name='generatorcontent='X3D-Edit, http://www.web3d.org/x3d/content/README.X3D-Edit.html'/>
<meta name='licensecontent='../../license.html'/>
</head>
<!--

Index for DEF nodes: AnimatedCrossSectionExtrusion, Clock, InterpolateCrossSection, Toucher
Index for Viewpoint image: Viewpoint_1
-->
<Scene>
<Viewpoint description='Click to activate animationorientation='1 0 0 -0.4position='0 4 10'/>
<!-- Clock ROUTEs:  [from Toucher.isActive to enabled ] [from Toucher.touchTime to startTime ] [from fraction_changed to InterpolateCrossSection.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='5enabled='falseloop='true'/>
<!-- InterpolateCrossSection ROUTEs:  [from Clock.fraction_changed to set_fraction ] [from value_changed to AnimatedCrossSectionExtrusion.set_crossSection ] -->
<CoordinateInterpolator2D DEF='InterpolateCrossSectionkey='0 0.45 0.9 1keyValue='1 1 1 -1 -1 -1 -1 1 1 1 2 2 2 -2 -1 -1 -1 1 2 2 1 1 1 -1 -1 -1 -1 1 1 1 1 1 1 -1 -1 -1 -1 1 1 1'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='InterpolateCrossSectiontoField='set_fraction'/>
<Transform translation='0.25 1 0'>
<!-- &amp; is the XML escape character code for ampersand character -->
<!-- Toucher ROUTEs:  [from isActive to Clock.enabled ] [from touchTime to Clock.startTime ] -->
<TouchSensor DEF='Toucherdescription='click & hold shape to animate Extrusion'/>
<ROUTE fromNode='ToucherfromField='isActivetoNode='ClocktoField='enabled'/>
<!-- also reset clock to restart -->
<ROUTE fromNode='ToucherfromField='touchTimetoNode='ClocktoField='startTime'/>
<Shape>
<Appearance>
<Material diffuseColor='0.2 0.8 0.4'/>
</Appearance>
<!-- AnimatedCrossSectionExtrusion ROUTE:  [from InterpolateCrossSection.value_changed to set_crossSection ] -->
<Extrusion DEF='AnimatedCrossSectionExtrusionspine='-4 0 -2 -1 0 -2 2 0 1 2 0 4'/>
</Shape>
<ROUTE fromNode='InterpolateCrossSectionfromField='value_changedtoNode='AnimatedCrossSectionExtrusiontoField='set_crossSection'/>
</Transform>
<Transform translation='-1.5 -1 2'>
<Billboard axisOfRotation='0 0 0'>
<Shape>
<Text string='"click & hold shape" "to animate Extrusion"solid='true'>
<FontStyle family='SANSjustify='"MIDDLE" "MIDDLE"size='0.8'/>
</Text>
<Appearance>
<Material diffuseColor='0.8 0.4 0.2'/>
</Appearance>
</Shape>
</Billboard>
</Transform>
</Scene>
</X3D>
<!--

Index for DEF nodes: AnimatedCrossSectionExtrusion, Clock, InterpolateCrossSection, Toucher
Index for Viewpoint image: Viewpoint_1
-->

<!-- Tag color codes: <Node DEF='idName' attribute='value'/> -->