<?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='Immersiveversion='3.0xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation=' http://www.web3d.org/specifications/x3d-3.0.xsd '>
<head>
<meta name='titlecontent='FormulaOneRaceCar.x3d'/>
<meta name='descriptioncontent='A FormulaOne Race Car running in a predefined path'/>
<meta name='creatorcontent='Athanasopoulos,Vasileios'/>
<meta name='createdcontent='08/02/2002'/>
<meta name='modifiedcontent='08/26/2002'/>
<meta name='subjectcontent='Formula One Race Car'/>
<meta name='identifiercontent=' http://www.web3d.org/x3d/content/examples/Basic/StudentProjects/FormulaOneRaceCar.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent='../license.html'/>
</head>
<!--

Index for DEF nodes: axis1, axis2, BACK, CAR, CLOCK, CLOCK1, CLOCK2, COVER, COVERSENS, DRAG, elastic, elastic1, Engine, exhaust, FORMULA, FRONT, MOVE, POS1, POS2, rad, SOUNDSOURCE, TURN, Viewpoints, wheel1, wheel2, wheel3, wheel4
Index for Viewpoint images: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5, Viewpoint_6, Viewpoint_7, Viewpoint_8
-->
<Scene>
<Viewpoint description='Formula One Race Carorientation='-1 1 1 1position='6 8 8'/>
<DirectionalLight direction='5 0 0'/>
<Viewpoint description='Bottomorientation='1 0 0 1.57position='0 -25 -8'/>
<!-- Scene graph nodes are added here -->
<Background groundColor='0 0 0skyColor='0 0 1'/>
<!-- CAR ROUTEs:  [from DRAG.translation_changed to set_translation ] [from MOVE.value_changed to set_translation ] -->
<Transform DEF='CARrotation='0 1 0 -1.57'>
<LOD DEF='Viewpointsrange='200'>
<Group>
<Viewpoint description='Frontorientation='0 1 0 1.57position='10 2 0'/>
<Viewpoint description='Rightposition='0 2 10'/>
<Viewpoint description='Leftorientation='0 1 0 3.14position='0 1.5 -14'/>
<Viewpoint description='Backorientation='0 1 0 -1.57position='-10 0.85 0'/>
<Viewpoint description='Toporientation='1 0 0 -1.57position='0 15 0.5'/>
</Group>
<WorldInfo info='null node'/>
</LOD>
<Group>
<!-- FORMULA ROUTE:  [from TURN.value_changed to set_rotation ] -->
<Transform DEF='FORMULA'>
<Transform rotation='1 0 0 -1.57'>
<!-- "BACK WHEELS & AXIS" -->
<Group>
<Transform rotation='1 0 0 1.57translation='0 -2.8 0'>
<Group>
<!-- BACK ROUTE:  [from POS1.value_changed to set_rotation ] -->
<Transform DEF='BACK'>
<Transform DEF='wheel1rotation='0 0 1 1.57translation='1.5 0 0'>
<!-- "OUTER WHEEL CYLINDER" -->
<Shape DEF='elastic'>
<Appearance>
<Material diffuseColor='0 0 0'/>
</Appearance>
<Cylinder height='0.92radius='0.65'/>
</Shape>
<!-- "INNER WHEEL CYLINDER" -->
<Shape>
<Appearance>
<Material diffuseColor='.5 .5 .5'/>
</Appearance>
<Cylinder height='.92radius='.45'/>
</Shape>
</Transform>
<Transform translation='1.912 0 0'>
<Shape DEF='rad'>
<Appearance>
<Material/>
</Appearance>
<Box size='0.1 0.90 0.05'/>
</Shape>
</Transform>
<Transform rotation='1 0 0 1.57translation='1.912 0 0'>
<Shape>
<Appearance>
<Material/>
</Appearance>
<Box size='0.1 0.90 0.05'/>
</Shape>
</Transform>
<Transform DEF='wheel2rotation='0 0 1 1.57translation='-1.5 0 0'>
<!-- "OUTER WHEEL CYLINDER" -->
<Shape USE='elastic'/>
<!-- "INNER WHEEL CYLINDER" -->
<Shape>
<Appearance>
<Material diffuseColor='.5 .5 .5'/>
</Appearance>
<Cylinder height='.92radius='.45'/>
</Shape>
</Transform>
<Transform translation='-1.912 0 0'>
<Shape USE='rad'/>
</Transform>
<Transform rotation='1 0 0 1.57translation='-1.912 0 0'>
<Shape>
<Appearance>
<Material/>
</Appearance>
<Box size='0.1 0.90 0.05'/>
</Shape>
</Transform>
<Transform DEF='axis1rotation='0 0 1 1.57'>
<Shape>
<Appearance>
<Material diffuseColor='0 0 0'/>
</Appearance>
<Cylinder height='3.96radius='.12'/>
</Shape>
</Transform>
</Transform>
<!-- CLOCK1 ROUTE:  [from fraction_changed to POS1.set_fraction ] -->
<TimeSensor DEF='CLOCK1cycleInterval='2loop='true'/>
<!-- POS1 ROUTEs:  [from CLOCK1.fraction_changed to set_fraction ] [from value_changed to BACK.set_rotation ] -->
<OrientationInterpolator DEF='POS1key='0 0.5 1keyValue='1 0 0 0 1 0 0 -3.14 1 0 0 -6.28'/>
</Group>
<ROUTE fromNode='CLOCK1fromField='fraction_changedtoNode='POS1toField='set_fraction'/>
<ROUTE fromNode='POS1fromField='value_changedtoNode='BACKtoField='set_rotation'/>
</Transform>
</Group>
<!-- "FRONT WHEELS & AXIS" -->
<Group>
<Transform rotation='1 0 0 1.57translation='0 2.65 0'>
<Group>
<!-- FRONT ROUTE:  [from POS2.value_changed to set_rotation ] -->
<Transform DEF='FRONT'>
<Transform DEF='wheel3rotation='0 0 1 1.57translation='1.5 0 0'>
<!-- "OUTER WHEEL CYLINDER" -->
<Shape DEF='elastic1'>
<Appearance>
<Material diffuseColor='0 0 0'/>
</Appearance>
<Cylinder height='0.92radius='0.65'/>
</Shape>
<!-- "INNER WHEEL CYLINDER" -->
<Shape>
<Appearance>
<Material diffuseColor='.5 .5 .5'/>
</Appearance>
<Cylinder height='.92radius='.45'/>
</Shape>
</Transform>
<Transform translation='1.912 0 0'>
<Shape USE='rad'/>
</Transform>
<Transform rotation='1 0 0 1.57translation='1.912 0 0'>
<Shape>
<Appearance>
<Material/>
</Appearance>
<Box size='0.1 .90 .05'/>
</Shape>
</Transform>
<Transform DEF='wheel4rotation='0 0 1 1.57translation='-1.5 0 0'>
<!-- "OUTER WHEEL CYLINDER" -->
<Shape USE='elastic'/>
<!-- "INNER WHEEL CYLINDER" -->
<Shape>
<Appearance>
<Material diffuseColor='.5 .5 .5'/>
</Appearance>
<Cylinder height='.92radius='.45'/>
</Shape>
</Transform>
<Transform translation='-1.912 0 0'>
<Shape USE='rad'/>
</Transform>
<Transform rotation='1 0 0 1.57translation='-1.912 0 0'>
<Shape>
<Appearance>
<Material/>
</Appearance>
<Box size='0.1 .90 .05'/>
</Shape>
</Transform>
<Transform DEF='axis2rotation='0 0 1 1.57'>
<Shape>
<Appearance>
<Material diffuseColor='0 0 0'/>
</Appearance>
<Cylinder height='3.96radius='.12'/>
</Shape>
</Transform>
</Transform>
<!-- CLOCK2 ROUTE:  [from fraction_changed to POS2.set_fraction ] -->
<TimeSensor DEF='CLOCK2cycleInterval='2loop='true'/>
<!-- POS2 ROUTEs:  [from CLOCK2.fraction_changed to set_fraction ] [from value_changed to FRONT.set_rotation ] -->
<OrientationInterpolator DEF='POS2key='0 0.5 1keyValue='1 0 0 0 1 0 0 -3.14 1 0 0 -6.28'/>
<ROUTE fromNode='CLOCK2fromField='fraction_changedtoNode='POS2toField='set_fraction'/>
<ROUTE fromNode='POS2fromField='value_changedtoNode='FRONTtoField='set_rotation'/>
</Group>
</Transform>
</Group>
<!-- "CAR BODY" -->
<Group>
<!-- "CAR BODY" -->
<Transform scale='1 4 0.5'>
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Sphere/>
</Shape>
<Transform rotation='1 0 0 0translation='0 0.2 0.976'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0transparency='.5'/>
<ImageTexture
  url='nplogo.jpg'/>
</Appearance>
<Box size='0.7 .2 .0000001'/>
</Shape>
</Transform>
</Transform>
<Group/>
<!-- "PILOT'S COVER SHELL" -->
<!-- COVER ROUTE:  [from COVERSENS.rotation_changed to set_rotation ] -->
<Transform DEF='COVERcenter='0 0 0.535scale='.5 0.9 0.3translation='0 -1 0'>
<Shape>
<Appearance>
<Material transparency='0.55'/>
</Appearance>
<Sphere radius='1.3'/>
</Shape>
<!-- COVERSENS ROUTE:  [from rotation_changed to COVER.set_rotation ] -->
<CylinderSensor DEF='COVERSENSdiskAngle='0.262maxAngle='3.57'/>
</Transform>
<ROUTE fromNode='COVERSENSfromField='rotation_changedtoNode='COVERtoField='set_rotation'/>
<!-- "PILOT'S HEAD" -->
<Transform translation='0 -1.3 0.5'>
<Viewpoint description='Driverorientation='1 0 0 1.350position='0 0.25 -0.015'/>
<Transform rotation='1 0 0 1.67translation='0 0.7 -0.2'>
<Shape>
<Appearance>
<Material diffuseColor='1 0 0transparency='.5'/>
<ImageTexture
  url='front.jpg'/>
</Appearance>
<Box size='0.9 0.8 0.01'/>
</Shape>
</Transform>
<Transform rotation='1 0 0 1.67translation='0 0.701 -0.2'>
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Box size='0.9 0.8 0.01'/>
</Shape>
</Transform>
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Sphere radius='0.25'/>
</Shape>
</Transform>
<!-- "FRONT-HORIZONTAL PANEL-TEXTURES " -->
<Transform translation='0 3.80 -0.3'>
<!-- "FRONT (HORIZONTAL) PANEL" -->
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Box size='3.94 .6 .03'/>
</Shape>
<!-- "FRONT-RIGHT (OUTER)VERTICAL PANEL" -->
<Transform translation='0.35 -0.2 0.15'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='.03 0.16 0.28'/>
</Shape>
</Transform>
<!-- "FRONT-LEFT (OUTER)VERTICAL PANEL -->
<Transform translation='-0.35 -0.2 0.15'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='.03 0.16 0.28'/>
</Shape>
</Transform>
<!-- "BACK TEXT" -->
<Transform rotation='0 0 1 -3.14translation='1.40 -7.20 1.05'>
<Transform rotation='1 0 0 0.266'>
<Shape>
<Appearance>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Text string='MV-4204solid='true'>
<FontStyle size='.8style='BOLD'/>
</Text>
</Shape>
</Transform>
</Transform>
<!-- "FRONT RIGHT TEXT" -->
<Transform rotation='0 0 1 -3.14translation='2.2 0.2 0'>
<Transform translation='.5 .020 0.05'>
<Shape>
<Appearance>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Text string='VRMLsolid='true'>
<FontStyle size='.4style='BOLD'/>
</Text>
</Shape>
</Transform>
</Transform>
<!-- "FRONT LEFT TEXT" -->
<Transform rotation='0 0 1 3.14translation='-2.1 0.2 0'>
<Transform translation='-1.5 0.01 0.05'>
<Shape>
<Appearance>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Text string='VRMLsolid='true'>
<FontStyle size='.4style='BOLD'/>
</Text>
</Shape>
</Transform>
</Transform>
<!-- "FRONT-RIGHT (INNER)VERTICAL PANEL -->
<Transform translation='1.95 0.01 0.05'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='0.03 .6 .1'/>
</Shape>
</Transform>
<!-- "FRONT-LEFT (INNER)VERTICAL PANEL -->
<Transform translation='-1.95 0.01 0.05'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='0.03 .6 .1'/>
</Shape>
</Transform>
</Transform>
<!-- "BACK (INCLINED) UPPER PANEL" -->
<Transform rotation='1 0 0 -0.2translation='0 -3.57 0.75'>
<Shape>
<Appearance>
<Material diffuseColor='1 0 0'/>
</Appearance>
<Box size='3.94 0.8 0.04'/>
</Shape>
<Transform translation='1.95 0 0.1'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='0.04 0.8 0.2'/>
</Shape>
</Transform>
<Transform translation='-1.95 0 0.1'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='0.04 0.8 0.2'/>
</Shape>
</Transform>
</Transform>
<!-- "HORIZONTAL PART OF THE CAR" -->
<Transform rotation='0 0 1 1.57scale='1 1 0.05translation='0 -0.15 0'>
<Shape>
<Appearance>
<Material diffuseColor='.2 1 0'/>
<ImageTexture
  url='nplogo.jpg'/>
</Appearance>
<Cylinder height='3.95radius='1.9'/>
</Shape>
<!-- "RIGHT TEXT" -->
<Transform rotation='0 0 1 -3.14translation='0.6 1.65 2'>
<Shape>
<Appearance>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Text string='NPSsolid='true'>
<FontStyle size='.8style='BOLD'/>
</Text>
</Shape>
</Transform>
<!-- "LEFT TEXT" -->
<Transform rotation='0 0 1 -6.28translation='-0.8 -1.65 2'>
<Shape>
<Appearance>
<Material diffuseColor='1 1 0'/>
</Appearance>
<Text string='NPSsolid='true'>
<FontStyle size='.8style='BOLD'/>
</Text>
</Shape>
</Transform>
</Transform>
<!-- "BACK-LEFT VERTICAL PANEL" -->
<Transform translation='-0.42 -3.4 0.35'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='.06 0.26 0.7'/>
</Shape>
</Transform>
<!-- "BACK-RIGHT VERTICAL PANEL" -->
<Transform translation='0.42 -3.4 0.35'>
<Shape>
<Appearance>
<Material diffuseColor='0.2 1 0'/>
</Appearance>
<Box size='.06 0.26 0.7'/>
</Shape>
</Transform>
<!-- "EXHAUST" -->
<Transform translation='0.2 -3.88 0'>
<Shape DEF='exhaust'>
<Appearance>
<Material diffuseColor='0 0 0'/>
</Appearance>
<Cylinder height='.25radius='.05'/>
</Shape>
</Transform>
<!-- "EXHAUST" -->
<Transform translation='-0.2 -3.88 0'>
<Shape USE='exhaust'/>
</Transform>
</Group>
</Transform>
<Sound DEF='Engine'>
<AudioClip DEF='SOUNDSOURCEdescription='V12loop='true'
  url=' "f3.wav" "f1.wav" "f2.wav" '/>
</Sound>
</Transform>
<!-- MOVE ROUTEs:  [from CLOCK.fraction_changed to set_fraction ] [from value_changed to CAR.set_translation ] -->
<Script DEF='MOVE'>
<field name='set_fractiontype='SFFloataccessType='inputOnly'/>
<field name='value_changedtype='SFVec3faccessType='outputOnly'/>
<field name='radiustype='SFFloatvalue='10accessType='initializeOnly'/>
<field name='turnstype='SFFloatvalue='1accessType='initializeOnly'/>
<![CDATA[
          function set_fraction (fraction,eventTime) {
 value_changed[0]=radius*Math.sin(turns*fraction*6.28);
 value_changed[1]=0;
 value_changed[2]=radius*Math.cos(turns*fraction*6.28)}
        
]]>
</Script>
<!-- TURN ROUTEs:  [from CLOCK.fraction_changed to set_fraction ] [from value_changed to FORMULA.set_rotation ] -->
<Script DEF='TURN'>
<field name='set_fractiontype='SFFloataccessType='inputOnly'/>
<field name='value_changedtype='SFRotationaccessType='outputOnly'/>
<field name='radiustype='SFFloatvalue='1accessType='initializeOnly'/>
<field name='turnstype='SFFloatvalue='1accessType='initializeOnly'/>
<![CDATA[
          function set_fraction (fraction,eventTime){
 value_changed[0]=0;
 value_changed[1]=1;
 value_changed[2]=0;
 value_changed[3]=fraction*6.28}
        
]]>
</Script>
<!-- DRAG ROUTE:  [from translation_changed to CAR.set_translation ] -->
<PlaneSensor DEF='DRAG'/>
<!-- CLOCK ROUTEs:  [from fraction_changed to MOVE.set_fraction ] [from fraction_changed to TURN.set_fraction ] -->
<TimeSensor DEF='CLOCKcycleInterval='8.0loop='true'/>
</Group>
<ROUTE fromNode='DRAGfromField='translation_changedtoNode='CARtoField='set_translation'/>
<ROUTE fromNode='CLOCKfromField='fraction_changedtoNode='MOVEtoField='set_fraction'/>
<ROUTE fromNode='MOVEfromField='value_changedtoNode='CARtoField='set_translation'/>
<ROUTE fromNode='CLOCKfromField='fraction_changedtoNode='TURNtoField='set_fraction'/>
<ROUTE fromNode='TURNfromField='value_changedtoNode='FORMULAtoField='set_rotation'/>
</Transform>
</Scene>
</X3D>
<!--

Index for DEF nodes: axis1, axis2, BACK, CAR, CLOCK, CLOCK1, CLOCK2, COVER, COVERSENS, DRAG, elastic, elastic1, Engine, exhaust, FORMULA, FRONT, MOVE, POS1, POS2, rad, SOUNDSOURCE, TURN, Viewpoints, wheel1, wheel2, wheel3, wheel4
Index for Viewpoint images: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5, Viewpoint_6, Viewpoint_7, Viewpoint_8
-->

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