| Cover | TOC | Chap | Prev Chap | Prev Fig | Next Fig | Next Chap |
|
Figure 8.4
An animation that rotates a coordinate system and the column built within it. |
|
|
Click on the image to view the VRML scene. |
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Rotating cylinder
DEF Column Transform {
rotation 0.0 0.0 1.0 0.0
children Shape {
appearance Appearance {
material Material { }
}
geometry Cylinder {
height 1.0
radius 0.2
}
}
},
# Animation clock
DEF Clock TimeSensor {
cycleInterval 4.0
loop TRUE
},
# Animation path
DEF ColumnPath OrientationInterpolator {
key [ 0.0, 0.50, 1.0 ]
keyValue [
0.0 0.0 1.0 0.0,
0.0 0.0 1.0 3.14,
0.0 0.0 1.0 6.28
]
}
]
}
ROUTE Clock.fraction_changed TO ColumnPath.set_fraction
ROUTE ColumnPath.value_changed TO Column.set_rotation