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='title' content='Floater.x3d'/> |
6 | <meta name='description' content='Floating pads world: a collection of white pads are created. Each pad slides back and forth horizontally or vertically at its own speed. A green light illuminates the tops of the pads while a blue light illuminates the bottoms.'/> |
7 | <meta name='creator' content='David R. Nadeau'/> |
8 | <meta name='translator' content='Don Brutzman'/> |
9 | <meta name='created' content='1 July 1998'/> |
10 | <meta name='translated' content='2 February 2014'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='Image' content='Floater.png'/> |
13 | <meta name='reference' content='originals/floater.wrl'/> |
14 | <meta name='reference' content='http://www.siggraph.org/s98'/> |
15 | <meta name='reference' content='http://www.siggraph.org/s98/conference/courses/18.html'/> |
16 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0008.htm'/> |
17 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0135htm'/> |
18 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/> |
19 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dResources.html'/> |
20 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Floater.x3d'/> |
21 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
22 | <meta name='generator' content='X3D-Edit, https://savage.nps.edu/X3D-Edit'/> |
23 | <meta name='license' content='../license.html'/> |
24 | </head> |
25 | <Scene> |
26 | <!-- Complexity is created from simplicity via two tricks: --> |
27 | <!-- 1. Create a set of simple shapes, then repeat the same shapes several times. In this case, there are only 7 original pads moving left and right. Those 7 are repeated again, but turned around the Y axis so that they slide front to back. The same 7 are repeated again, but rotated around the Z axis so that they slide up and down. The effect is one of a complex bunch of moving shapes when in reality there are only 7. --> |
28 | <!-- 2. Give each moving shape a slightly different cycle interval for its animation. This makes all the movement out of sync, which again creates the appearance of complexity. --> |
29 | <!-- A PROTO is used to create a new Pad node that incorporates a box shape, a time sensor, a position interpolator, and routes to connect them together. Fields to the Pad node control the initial placement of the pad, and it's animation cycle interval. --> |
30 | <!-- Add textures. Particularly try adding a texture with a transparency (alpha) channel. Using transparency textures you can add stripes, checks, or whatever to the pads. One approach that looks interesting is to add a cloud texture, but make the sky behind the clouds transparent in the texture. When mapped, this creates a blobby indistinct shape on each pad. --> |
31 | <!-- Add a Transform node around the entire group of pads, then use an OrientationInterpolator and TimeSensor to slowly spin the world. Remembering the complexity tricks above, you can create a complex tumble by using three nested Transform nodes (X, Y, and Z), each with its own OrientationInterpolator and TimeSensor. Give the three TimeSensors slightly different cycleInterval values (such as 5.0, 7.0, and 11.0). Prime numbers are good choices. Since the cycle times are different for the three spins, they don't sync up, and it looks like a chaotic tumble. --> |
32 | <WorldInfo info='"Copyright (c) 1996, David R. Nadeau"' title='Floating Pads World'/> |
33 | <Viewpoint description='Entry view' position='0.0 1.6 10.0'/> |
34 | <NavigationInfo headlight='false'/> |
35 | <Background skyColor='0.0 0.1 0.4'/> |
36 | <DirectionalLight color='0.3 1.0 0.3' direction='0.5 -1.0 -0.7'/> |
37 | <DirectionalLight color='0.0 0.3 1.0' direction='-0.5 1.0 0.7'/> |
38 | <ProtoDeclare name='Pad'> |
39 | <ProtoInterface> |
40 | <field name='rotation' type='SFRotation' value='0.0 0.0 1.0 0.0' accessType='inputOutput'/> |
41 | <field name='cycleInterval' type='SFTime' value='10.0' accessType='inputOutput'/> |
42 | <field name='translation' type='SFVec3f' value='0.0 0.0 0.0' accessType='inputOutput'/> |
43 | </ProtoInterface> |
44 | <ProtoBody> |
45 | <Collision enabled='false'> |
46 | <Transform> |
47 | <IS> |
48 | <connect nodeField='translation' protoField='translation'/> |
49 | <connect nodeField='rotation' protoField='rotation'/> |
50 | </IS> |
51 |
<!-- ROUTE information for Movee node:
[from Mover.value_changed to set_translation
]
-->
<Transform DEF='Movee'> |
52 | <Shape> |
53 | <Appearance> |
54 | <Material diffuseColor='1.0 1.0 1.0'/> |
55 | </Appearance> |
56 | <Box size='4.0 0.2 2.0'/> |
57 | </Shape> |
58 |
<!-- ROUTE information for Clock node:
[from fraction_changed to Mover.set_fraction
]
-->
<TimeSensor DEF='Clock' loop='true' startTime='1.0'> |
59 | <IS> |
60 | <connect nodeField='cycleInterval' protoField='cycleInterval'/> |
61 | </IS> |
62 | </TimeSensor> |
63 |
<!-- ROUTE information for Mover node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to Movee.set_translation
]
-->
<PositionInterpolator DEF='Mover' key='0.0 0.5 1.0' keyValue='-10.0 0.0 0.0 10.0 0.0 0.0 -10.0 0.0 0.0'/> |
64 | </Transform> |
65 | </Transform> |
66 | </Collision> |
67 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='Mover' toField='set_fraction'/> |
68 | < ROUTE fromNode='Mover' fromField='value_changed' toNode='Movee' toField='set_translation'/> |
69 | </ProtoBody> |
70 | </ProtoDeclare> |
71 | <ProtoInstance name='Pad'> |
72 | <fieldValue name='cycleInterval' value='10.0'/> |
73 | <fieldValue name='translation' value='0.0 4.0 0.0'/> |
74 | </ProtoInstance> |
75 | <ProtoInstance name='Pad'> |
76 | <fieldValue name='cycleInterval' value='12.0'/> |
77 | <fieldValue name='translation' value='-2.0 0.0 -2.0'/> |
78 | </ProtoInstance> |
79 | <ProtoInstance name='Pad'> |
80 | <fieldValue name='cycleInterval' value='14.0'/> |
81 | <fieldValue name='translation' value='2.0 6.0 -4.0'/> |
82 | </ProtoInstance> |
83 | <ProtoInstance name='Pad'> |
84 | <fieldValue name='cycleInterval' value='16.0'/> |
85 | <fieldValue name='translation' value='-4.0 2.0 -8.0'/> |
86 | </ProtoInstance> |
87 | <ProtoInstance name='Pad'> |
88 | <fieldValue name='cycleInterval' value='18.0'/> |
89 | <fieldValue name='translation' value='0.0 -6.0 -10.0'/> |
90 | </ProtoInstance> |
91 | <ProtoInstance name='Pad'> |
92 | <fieldValue name='cycleInterval' value='10.0'/> |
93 | <fieldValue name='translation' value='4.0 -2.0 -10.0'/> |
94 | </ProtoInstance> |
95 | <ProtoInstance name='Pad'> |
96 | <fieldValue name='cycleInterval' value='8.0'/> |
97 | <fieldValue name='translation' value='0.0 -4.0 -0.0'/> |
98 | </ProtoInstance> |
99 | <ProtoInstance name='Pad'> |
100 | <fieldValue name='rotation' value='0.0 1.0 0.0 1.571'/> |
101 | <fieldValue name='cycleInterval' value='10.0'/> |
102 | <fieldValue name='translation' value='0.0 4.0 0.0'/> |
103 | </ProtoInstance> |
104 | <ProtoInstance name='Pad'> |
105 | <fieldValue name='rotation' value='0.0 1.0 0.0 1.571'/> |
106 | <fieldValue name='cycleInterval' value='12.0'/> |
107 | <fieldValue name='translation' value='-2.0 0.0 -2.0'/> |
108 | </ProtoInstance> |
109 | <ProtoInstance name='Pad'> |
110 | <fieldValue name='rotation' value='0.0 1.0 0.0 1.571'/> |
111 | <fieldValue name='cycleInterval' value='14.0'/> |
112 | <fieldValue name='translation' value='2.0 6.0 -4.0'/> |
113 | </ProtoInstance> |
114 | <ProtoInstance name='Pad'> |
115 | <fieldValue name='rotation' value='0.0 1.0 0.0 1.571'/> |
116 | <fieldValue name='cycleInterval' value='16.0'/> |
117 | <fieldValue name='translation' value='-4.0 2.0 -8.0'/> |
118 | </ProtoInstance> |
119 | <ProtoInstance name='Pad'> |
120 | <fieldValue name='rotation' value='0.0 1.0 0.0 1.571'/> |
121 | <fieldValue name='cycleInterval' value='18.0'/> |
122 | <fieldValue name='translation' value='0.0 -6.0 -10.0'/> |
123 | </ProtoInstance> |
124 | <ProtoInstance name='Pad'> |
125 | <fieldValue name='rotation' value='0.0 1.0 0.0 1.571'/> |
126 | <fieldValue name='cycleInterval' value='10.0'/> |
127 | <fieldValue name='translation' value='4.0 -2.0 -10.0'/> |
128 | </ProtoInstance> |
129 | <ProtoInstance name='Pad'> |
130 | <fieldValue name='rotation' value='0.0 1.0 0.0 1.571'/> |
131 | <fieldValue name='cycleInterval' value='8.0'/> |
132 | <fieldValue name='translation' value='0.0 -4.0 -0.0'/> |
133 | </ProtoInstance> |
134 | <ProtoInstance name='Pad'> |
135 | <fieldValue name='rotation' value='0.0 0.0 1.0 1.571'/> |
136 | <fieldValue name='cycleInterval' value='10.0'/> |
137 | <fieldValue name='translation' value='0.0 4.0 0.0'/> |
138 | </ProtoInstance> |
139 | <ProtoInstance name='Pad'> |
140 | <fieldValue name='rotation' value='0.0 0.0 1.0 1.571'/> |
141 | <fieldValue name='cycleInterval' value='12.0'/> |
142 | <fieldValue name='translation' value='-2.0 0.0 -2.0'/> |
143 | </ProtoInstance> |
144 | <ProtoInstance name='Pad'> |
145 | <fieldValue name='rotation' value='0.0 0.0 1.0 1.571'/> |
146 | <fieldValue name='cycleInterval' value='14.0'/> |
147 | <fieldValue name='translation' value='2.0 6.0 -4.0'/> |
148 | </ProtoInstance> |
149 | <ProtoInstance name='Pad'> |
150 | <fieldValue name='rotation' value='0.0 0.0 1.0 1.571'/> |
151 | <fieldValue name='cycleInterval' value='16.0'/> |
152 | <fieldValue name='translation' value='-4.0 2.0 -8.0'/> |
153 | </ProtoInstance> |
154 | <ProtoInstance name='Pad'> |
155 | <fieldValue name='rotation' value='0.0 0.0 1.0 1.571'/> |
156 | <fieldValue name='cycleInterval' value='18.0'/> |
157 | <fieldValue name='translation' value='0.0 -6.0 -10.0'/> |
158 | </ProtoInstance> |
159 | <ProtoInstance name='Pad'> |
160 | <fieldValue name='rotation' value='0.0 0.0 1.0 1.571'/> |
161 | <fieldValue name='cycleInterval' value='10.0'/> |
162 | <fieldValue name='translation' value='4.0 -2.0 -10.0'/> |
163 | </ProtoInstance> |
164 | <ProtoInstance name='Pad'> |
165 | <fieldValue name='rotation' value='0.0 0.0 1.0 1.571'/> |
166 | <fieldValue name='cycleInterval' value='8.0'/> |
167 | <fieldValue name='translation' value='0.0 -4.0 -0.0'/> |
168 | </ProtoInstance> |
169 | </Scene> |
170 | </X3D> |
Event Graph ROUTE Table entries 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.
Clock
TimeSensor fraction_changed SFFloat |
Mover
PositionInterpolator set_fraction SFFloat |
then
|
Mover
PositionInterpolator value_changed SFVec3f |
Movee
Transform set_translation SFVec3f |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
ProtoInstance Pad |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
<!--
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)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->