X3D Model Documentation: Towers.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <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'>
  4       <head>
  5            <meta name='titlecontent='Towers.x3d'/>
  6            <meta name='descriptioncontent='This world illustrates the use of translation, rotation, and scaling to build a multi-level tower.'/>
  7            <meta name='creatorcontent='David R. Nadeau, John L. Moreland, Michael M. Heck'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='1 July 1998'/>
 10            <meta name='translatedcontent='2 February 2014'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent='originals/towers.wrl'/>
 13            <meta name='referencecontent='http://www.siggraph.org/s98'/>
 14            <meta name='referencecontent='http://www.siggraph.org/s98/conference/courses/18.html'/>
 15            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0051.htm'/>
 16            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/>
 17            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dResources.html'/>
 18            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Towers.x3d'/>
 19            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 20            <meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
 21            <meta name='licensecontent='../license.html'/>
 22       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: BlurImage, HalfLevel, OneLevel, Part, Thing, ThingSpinner, ThingTimer

Index for Viewpoint node: Viewpoint_1
-->
 23       <Scene>
 24            <!-- 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. -->
 25            <!-- 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. -->
 26            <!-- A glowing, rotating cube is added to the top of the generic tower. An OrientationInterpolator keeps the cube rotating. -->
 27            <!-- Things to experiment with: -->
 28            <!-- Add sound! -->
 29            <!-- 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! -->
 30            <WorldInfo info='"Copyright (c) 1997, David R. Nadeau"title='The Tower'/>
 31            <Viewpoint description='Entry vieworientation='1.0 0.0 0.0 0.2position='0.0 1.6 20.0'/>
 32            <NavigationInfo headlight='falsespeed='2.0'/>
 33            <Background skyAngle='1.37 1.57skyColor='0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.0'/>
 34            <DirectionalLight ambientIntensity='0.2direction='1.0 -0.5 -1.0'/>
 35            <DirectionalLight ambientIntensity='0.2color='0.0 0.3 1.0direction='-1.0 1.0 -1.0intensity='0.7'/>
 36            <Transform scale='0.4 0.4 0.4'>
 37 
               <!-- Transform OneLevel is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
               <Transform DEF='OneLevelscale='2.0 1.0 2.0translation='0.0 3.5 0.0'>
 38 
                    <!-- Group HalfLevel is a DEF node that has 1 USE node: USE_1 -->
                    <Group DEF='HalfLevel'>
 39 
                         <!-- Transform Part is a DEF node that has 5 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5 -->
                         <Transform DEF='Partrotation='0.0 1.0 0.0 0.26translation='0.0 0.0 7.73'>
 40                                <Inline   url=' "TowerPart.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TowerPart.x3d" "TowerPart.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TowerPart.wrl" '/>
 41                           </Transform>
 42                           <Transform rotation='0.0 1.0 0.0 0.52'>
 43                                <Transform USE='Part'/>
 44                           </Transform>
 45                           <Transform rotation='0.0 1.0 0.0 1.05'>
 46                                <Transform USE='Part'/>
 47                           </Transform>
 48                           <Transform rotation='0.0 1.0 0.0 1.57'>
 49                                <Transform USE='Part'/>
 50                           </Transform>
 51                           <Transform rotation='0.0 1.0 0.0 2.09'>
 52                                <Transform USE='Part'/>
 53                           </Transform>
 54                           <Transform rotation='0.0 1.0 0.0 2.62'>
 55                                <Transform USE='Part'/>
 56                           </Transform>
 57                      </Group>
 58                      <Transform rotation='0.0 1.0 0.0 3.14'>
 59                           <Group USE='HalfLevel'/>
 60                      </Transform>
 61                      <Transform translation='0.0 3.5 0.0'>
 62                           <Shape>
 63                                <Appearance>
 64                                     <TextureTransform/>
 65                                     <Material ambientIntensity='0.6'/>
 66                                     <ImageTexture   url=' "marble_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/marble_g.jpg " '/>
 67                                </Appearance>
 68                                <Cylinder height='0.05radius='8.2side='false'/>
 69                           </Shape>
 70                      </Transform>
 71                 </Transform>
 72                 <Shape>
 73                      <Appearance>
 74                           <Material diffuseColor='0.0 0.0 0.0transparency='0.25'/>
 75                      </Appearance>
 76                      <Cylinder bottom='falseheight='0.05radius='16.4side='false'/>
 77                 </Shape>
 78                 <Transform rotation='0.0 1.0 0.0 0.26scale='0.8 0.9 0.8translation='0.0 7.0 0.0'>
 79                      <Transform USE='OneLevel'/>
 80                 </Transform>
 81                 <Transform scale='0.6 0.8 0.6translation='0.0 13.3 0.0'>
 82                      <Transform USE='OneLevel'/>
 83                 </Transform>
 84                 <Transform rotation='0.0 1.0 0.0 0.26scale='0.4 0.7 0.4translation='0.0 18.9 0.0'>
 85                      <Transform USE='OneLevel'/>
 86                 </Transform>
 87 
               <!-- ROUTE information for Thing node:  [from ThingSpinner.value_changed to set_rotation ] -->
               <Transform DEF='Thingtranslation='0.0 31.0 0.0'>
 88                      <Transform rotation='-1.0 1.0 1.0 0.785'>
 89                           <Shape>
 90                                <Appearance>
 91                                     <Material ambientIntensity='1.0diffuseColor='0.0 1.0 0.0'/>
 92 
                                   <!-- ImageTexture BlurImage is a DEF node that has 1 USE node: USE_1 -->
                                   <ImageTexture DEF='BlurImage'   url=' "fire_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/fire_g.jpg " '/>
 93                                </Appearance>
 94                                <Box size='3.0 3.0 3.0'/>
 95                           </Shape>
 96                      </Transform>
 97                 </Transform>
 98            </Transform>
 99            <Shape>
100                 <Appearance>
101                      <TextureTransform scale='5.0 5.0'/>
102                      <Material ambientIntensity='0.8diffuseColor='0.0 1.0 0.3'/>
103                      <ImageTexture USE='BlurImage'/>
104                 </Appearance>
105                 <IndexedFaceSet coordIndex='0 1 2 3 -1'>
106                      <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'/>
107                 </IndexedFaceSet>
108            </Shape>
109 
          <!-- ROUTE information for ThingTimer node:  [from fraction_changed to ThingSpinner.set_fraction ] -->
          <TimeSensor DEF='ThingTimercycleInterval='4.0loop='truestartTime='1.0'/>
110 
          <!-- 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'/>
111            < ROUTE  fromNode='ThingTimer' fromField='fraction_changed' toNode='ThingSpinner' toField='set_fraction'/>
112            < ROUTE  fromNode='ThingSpinner' fromField='value_changed' toNode='Thing' toField='set_rotation'/>
113       </Scene>
114  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: BlurImage, HalfLevel, OneLevel, Part, Thing, ThingSpinner, ThingTimer

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Background, Box, Coordinate, Cylinder, DirectionalLight, Group, head, ImageTexture, IndexedFaceSet, Inline, Material, meta, NavigationInfo, OrientationInterpolator, ROUTE, Scene, Shape, TextureTransform, TimeSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table with 2 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

ThingTimer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
ThingSpinner
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
ThingSpinner
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
Thing
Transform
set_rotation
SFRotation
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TowersIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Towers.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

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