<?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='Towers.x3d'/>
<meta name='descriptioncontent='This world illustrates the use of translation, rotation, and scaling to build a multi-level tower.'/>
<meta name='creatorcontent='David R. Nadeau, John L. Moreland, Michael M. Heck'/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='1 July 1998'/>
<meta name='translatedcontent='2 February 2014'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent='originals/towers.wrl'/>
<meta name='referencecontent=' http://www.siggraph.org/s98 '/>
<meta name='referencecontent=' http://www.siggraph.org/s98/conference/courses/18.html '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0051.htm '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Towers.x3d '/>
<meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
<meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

Index for DEF nodes : BlurImage, HalfLevel, OneLevel, Part, Thing, ThingSpinner, ThingTimer

Index for Viewpoint image : Viewpoint_1
-->
<Scene>
<!-- A tower is built starting with a single pole and archway inlined from towerprt.wrl. This part is instanced 12 times around the perimeter of the tower by doing successive rotations. Add a cylinder for the ceiling, and a level is complete. -->
<!-- A level is then instanced three more times to build the next three upper levels of the tower. Each instance moves up to the next level, then scales the generic level down a bit and puts it there. This repeated scaling is what gives the tower it's diminishing size for the upper levels. -->
<!-- A glowing, rotating cube is added to the top of the generic tower. An OrientationInterpolator keeps the cube rotating. -->
<!-- Things to experiment with: -->
<!-- Add sound! -->
<!-- Add a spiraling ramp that leads to the upper levels. Perhaps put something interesting on each level. Perhaps make the rotating cube on top do something... such as be an Anchor leading to another world! -->
<WorldInfo info='"Copyright (c) 1997, David R. Nadeau"title='The Tower'/>
<Viewpoint description='Entry vieworientation='1.0 0.0 0.0 0.2position='0.0 1.6 20.0'/>
<NavigationInfo headlight='falsespeed='2.0'/>
<Background skyAngle='1.37 1.57skyColor='0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.0'/>
<DirectionalLight ambientIntensity='0.2direction='1.0 -0.5 -1.0'/>
<DirectionalLight ambientIntensity='0.2color='0.0 0.3 1.0direction='-1.0 1.0 -1.0intensity='0.7'/>
<Transform scale='0.4 0.4 0.4'>
<Transform DEF='OneLevelscale='2.0 1.0 2.0translation='0.0 3.5 0.0'>
<Group DEF='HalfLevel'>
<Transform DEF='Partrotation='0.0 1.0 0.0 0.26translation='0.0 0.0 7.73'> </Transform>
<Transform rotation='0.0 1.0 0.0 0.52'>
<Transform USE='Part'/>
</Transform>
<Transform rotation='0.0 1.0 0.0 1.05'>
<Transform USE='Part'/>
</Transform>
<Transform rotation='0.0 1.0 0.0 1.57'>
<Transform USE='Part'/>
</Transform>
<Transform rotation='0.0 1.0 0.0 2.09'>
<Transform USE='Part'/>
</Transform>
<Transform rotation='0.0 1.0 0.0 2.62'>
<Transform USE='Part'/>
</Transform>
</Group>
<Transform rotation='0.0 1.0 0.0 3.14'>
<Group USE='HalfLevel'/>
</Transform>
<Transform translation='0.0 3.5 0.0'>
<Shape>
<Appearance>
<TextureTransform/>
<Material ambientIntensity='0.6'/>
<ImageTexture
  url=' "marble_g.jpg" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/marble_g.jpg" '/>
</Appearance>
<Cylinder height='0.05radius='8.2side='false'/>
</Shape>
</Transform>
</Transform>
<Shape>
<Appearance>
<Material diffuseColor='0.0 0.0 0.0transparency='0.25'/>
</Appearance>
<Cylinder bottom='falseheight='0.05radius='16.4side='false'/>
</Shape>
<Transform rotation='0.0 1.0 0.0 0.26scale='0.8 0.9 0.8translation='0.0 7.0 0.0'>
<Transform USE='OneLevel'/>
</Transform>
<Transform scale='0.6 0.8 0.6translation='0.0 13.3 0.0'>
<Transform USE='OneLevel'/>
</Transform>
<Transform rotation='0.0 1.0 0.0 0.26scale='0.4 0.7 0.4translation='0.0 18.9 0.0'>
<Transform USE='OneLevel'/>
</Transform>
<!-- ROUTE information for Thing node:  [from ThingSpinner.value_changed to set_rotation ] -->
<Transform DEF='Thingtranslation='0.0 31.0 0.0'>
<Transform rotation='-1.0 1.0 1.0 0.785'>
<Shape>
<Appearance>
<Material ambientIntensity='1.0diffuseColor='0.0 1.0 0.0'/>
<ImageTexture DEF='BlurImage'
  url=' "fire_g.jpg" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/fire_g.jpg" '/>
</Appearance>
<Box size='3.0 3.0 3.0'/>
</Shape>
</Transform>
</Transform>
</Transform>
<Shape>
<Appearance>
<TextureTransform scale='5.0 5.0'/>
<Material ambientIntensity='0.8diffuseColor='0.0 1.0 0.3'/>
<ImageTexture USE='BlurImage'/>
</Appearance>
<IndexedFaceSet coordIndex='0 1 2 3 -1'>
<Coordinate point='-40.0 0.0 80.0 40.0 0.0 80.0 40.0 0.0 -40.0 -40.0 0.0 -40.0'/>
</IndexedFaceSet>
</Shape>
<!-- ROUTE information for ThingTimer node:  [from fraction_changed to ThingSpinner.set_fraction ] -->
<TimeSensor DEF='ThingTimercycleInterval='4.0loop='truestartTime='1.0'/>
<!-- ROUTE information for ThingSpinner node:  [from ThingTimer.fraction_changed to set_fraction ] [from value_changed to Thing.set_rotation ] -->
<OrientationInterpolator DEF='ThingSpinnerkey='0.0 0.5 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 3.14 0.0 1.0 0.0 6.28'/>
<ROUTE fromNode='ThingTimerfromField='fraction_changedtoNode='ThingSpinnertoField='set_fraction'/>
<ROUTE fromNode='ThingSpinnerfromField='value_changedtoNode='ThingtoField='set_rotation'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : BlurImage, HalfLevel, OneLevel, Part, Thing, ThingSpinner, ThingTimer

Index for Viewpoint image : Viewpoint_1
-->

<!-- 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)
-->

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