<?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 profile='Immersive' version='3.0'
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'
xsd:noNamespaceSchemaLocation
='
http://www.web3d.org/specifications/x3d-3.0.xsd
'>
<head>
</head>
<!--
-->
<Scene>
<!-- Computational cost of Extrusion compared to IndexedFaceSet: quicker to download, takes time to calculate polygonal faces and normals during initial loading, equally fast at run time. -->
<!-- Authoring capabilities of Extrusion compared to IndexedFaceSet: can be more complicated to express, but also can provide great detail with much less effort. -->
<!-- Animation considerations: computational cost of modifying spine and recalcuting all polygons/shading during each screen redraw is extremely high, though authorability remains very simple. -->
<!-- First position and rotate viewpoint into positive-X-Y-Z octant using a Transform -->
<Transform rotation='0 1 0 0.758' translation='10 5 10'>
</Transform>
<Transform rotation='0 1 0 -1.57' translation='-10 4 0'>
<Viewpoint description='Snake head' orientation='1 0 0 -0.6' position='0 0 0'/>
</Transform>
<!-- Snake -->
<Transform translation='0 0.3 0'>
</Transform>
<!-- Animation clock -->
<!--
CLOCK ROUTE:
[
from fraction_changed to SNAKE_WIGGLE.set_fraction
]
-->
<TimeSensor DEF='CLOCK' cycleInterval='4' loop='true'/>
<!-- each keyValue block corresponds to spine position at time 0.0, 0.25, 0.5, 0.75 and 1.0 (matching endpoints are closed so that looping is continuous) -->
<!-- Animate the snake spine -->
<!--
SNAKE_WIGGLE ROUTEs:
[
from CLOCK.fraction_changed to set_fraction
]
[
from value_changed to SNAKE.set_spine
]
-->
<CoordinateInterpolator DEF='SNAKE_WIGGLE' key='0.0 0.25 0.50 0.75 1.0' keyValue='-4.100 0 0.000 -4.0 0 0.000 -3.529 0 0.674 -3.059 0 0.996 -2.588 0 0.798 -2.118 0 0.184 -1.647 0 -0.526 -1.176 0 -0.962 -0.706 0 -0.895 -0.235 0 -0.361 0.235 0 0.361 0.706 0 0.895 1.176 0 0.962 1.647 0 0.526 2.118 0 -0.184 2.588 0 -0.798 3.059 0 -0.996 3.529 0 -0.674 4.0 0 0.000 -4.100 0 -1.000 -4.0 0 -1.000 -3.529 0 -0.739 -3.059 0 -0.092 -2.588 0 0.603 -2.118 0 0.983 -1.647 0 0.850 -1.176 0 0.274 -0.706 0 -0.446 -0.235 0 -0.932 0.235 0 -0.932 0.706 0 -0.446 1.176 0 0.274 1.647 0 0.850 2.118 0 0.983 2.588 0 0.603 3.059 0 -0.092 3.529 0 -0.739 4.0 0 -1.000 -4.100 0 0.000 -4.0 0 0.000 -3.529 0 -0.674 -3.059 0 -0.996 -2.588 0 -0.798 -2.118 0 -0.184 -1.647 0 0.526 -1.176 0 0.962 -0.706 0 0.895 -0.235 0 0.361 0.235 0 -0.361 0.706 0 -0.895 1.176 0 -0.962 1.647 0 -0.526 2.118 0 0.184 2.588 0 0.798 3.059 0 0.996 3.529 0 0.674 4.0 0 0.000 -4.100 0 1.000 -4.0 0 1.000 -3.529 0 0.739 -3.059 0 0.092 -2.588 0 -0.603 -2.118 0 -0.983 -1.647 0 -0.850 -1.176 0 -0.274 -0.706 0 0.446 -0.235 0 0.932 0.235 0 0.932 0.706 0 0.446 1.176 0 -0.274 1.647 0 -0.850 2.118 0 -0.983 2.588 0 -0.603 3.059 0 0.092 3.529 0 0.739 4.0 0 1.000 -4.100 0 0.000 -4.0 0 0.000 -3.529 0 0.674 -3.059 0 0.996 -2.588 0 0.798 -2.118 0 0.184 -1.647 0 -0.526 -1.176 0 -0.962 -0.706 0 -0.895 -0.235 0 -0.361 0.235 0 0.361 0.706 0 0.895 1.176 0 0.962 1.647 0 0.526 2.118 0 -0.184 2.588 0 -0.798 3.059 0 -0.996 3.529 0 -0.674 4.0 0 0.0'/>
<ROUTE fromNode='CLOCK' fromField='fraction_changed' toNode='SNAKE_WIGGLE' toField='set_fraction'/>
<ROUTE fromNode='SNAKE_WIGGLE' fromField='value_changed' toNode='SNAKE' toField='set_spine'/>
</Scene>
</X3D>
<!--
-->
<!--
Color key:
<X3dNode
DEF='idName' field='value'/>
matches
<XmlElement
DEF='idName' attribute='value'/>
-->
<!--
Additional help information about X3D scenes:
X3D Resources,
X3D Scene Authoring Hints
and
X3D Tooltips
-->