Here are two sample VRML parts. The first is just a box. Displayed on the VRML
player, it animates, changing color, rotating, translating, stretching, etc.
The second is a table from a set of free VRML objects downloaded from the net.
Doug Gehringer
Sun Microsystems
#VRML V2.0 utf8
WorldInfo {
title "interp"
}
#Background
#{
# skyColor [ 0.490 0.690 1.000 ]
#}
Viewpoint {
position 0 0 8
orientation 0 1 0 0
fieldOfView 0.4
}
NavigationInfo {
type "WALK"
speed 5
}
Transform {
children [
DEF TOUCH_SENSOR TouchSensor {}
DEF CUBE_TRANSFORM Transform {
children [
Shape {
appearance Appearance {
material DEF CUBE_COLOR Material {
diffuseColor 1.0 0.0 0.0
}
}
geometry Box {
size 1.5 1.5 1.5
}
}
]
}
]
}
DEF TIMER TimeSensor {
loop FALSE
startTime 0
stopTime 6
cycleInterval 6
}
DEF COL_INTERPOLATOR ColorInterpolator {
key [ 0, .333, 0.667, 1]
keyValue [ 1.0 0.0 0.0,
0.0 1.0 0.0,
0.0 0.0 1.0,
1.0 0.0 0.0]
}
DEF ROT_INTERPOLATOR OrientationInterpolator {
key [ 0, 0.5, 1]
keyValue [ 0.577 0.577 0.577, 0.0
0.577 0.577 0.577, 3.0
0.577 0.577 0.577, 0.0]
}
DEF TRANS_INTERPOLATOR PositionInterpolator {
key [ 0, .333, 0.667, 1]
keyValue [ 0.0 0.0 0.0,
-1.0 -1.0 0.0,
1.0 1.0 0.0,
0.0 0.0 0.0 ]
}
DEF SCALE_INTERPOLATOR PositionInterpolator {
key [ 0, .333, 0.667, 1]
keyValue [ 1.0 1.0 1.0,
2.0 1.0 0.5,
0.5 2.0 1.0,
1.0 1.0 1.0 ]
}
DEF SCALE_ROT_INTERPOLATOR OrientationInterpolator {
key [ 0, 0.5, 1]
keyValue [-0.577 0.577 0.577, 0.0
-0.577 0.577 0.577, 2.0
-0.577 0.577 0.577, 0.0]
}
ROUTE TOUCH_SENSOR.touchTime TO TIMER.startTime
ROUTE TIMER.fraction TO COL_INTERPOLATOR.set_fraction
ROUTE COL_INTERPOLATOR.value_changed TO CUBE_COLOR.set_diffuseColor
ROUTE TIMER.fraction TO ROT_INTERPOLATOR.set_fraction
ROUTE ROT_INTERPOLATOR.value_changed TO CUBE_TRANSFORM.set_rotation
ROUTE TIMER.fraction TO TRANS_INTERPOLATOR.set_fraction
ROUTE TRANS_INTERPOLATOR.value_changed TO CUBE_TRANSFORM.set_translation
ROUTE TIMER.fraction TO SCALE_INTERPOLATOR.set_fraction
ROUTE SCALE_INTERPOLATOR.value_changed TO CUBE_TRANSFORM.set_scale
ROUTE TIMER.fraction TO SCALE_ROT_INTERPOLATOR.set_fraction
ROUTE SCALE_ROT_INTERPOLATOR.value_changed TO CUBE_TRANSFORM.set_scaleOrientation
#VRML V2.0 utf8
WorldInfo {
title "02table7"
info [ "Copyright (c) 1996 3Name3D / Yglesias Wallock Divekar, Inc.",
"A gift to the VRML community from 3Name3D, http://www.ywd.com",
"This object may not be resold. Proper credit must be given for
commercial use of this object. Please see that this notice is
always included with the object.",
"Cyberprops and 3Name3D are trademarks of Yglesias Wallock Divekar, Inc." ]
}
NavigationInfo {
type "EXAMINE"
}
Viewpoint {
position -1.37918 1.15454 1.71706
orientation -0.512977 -0.853719 -0.0895425 0.756114
fieldOfView 0.785398
}
Group {
children [
DEF legs Shape {
appearance Appearance {
material DEF brown Material {
ambientIntensity 0.253
diffuseColor 0.45 0.31 0.209
specularColor 0.181 0.0685 0.0474
emissiveColor 0 0 0
shininess 0.0106
transparency 0
}
texture NULL
textureTransform NULL
}
geometry IndexedFaceSet {
coord DEF all_verts_1 Coordinate {
point [ -0.722 0.631 0.43,
-0.722 0.631 0.358,
-0.722 0.631 -0.358,
-0.722 0.631 -0.43,
-0.722 0.71 0.43,
-0.722 0.71 0.358,
-0.722 0.71 -0.358,
-0.722 0.71 -0.43,
-0.721 0.552 0.429,
-0.721 0.552 0.359,
-0.721 0.552 -0.359,
-0.721 0.552 -0.429,
-0.719 0.472 0.427,
-0.719 0.472 0.361,
-0.719 0.472 -0.361,
-0.719 0.472 -0.427,
-0.717 0.393 0.425,
-0.717 0.393 0.363,
-0.717 0.393 -0.363,
-0.717 0.393 -0.425,
-0.714 0.314 0.422,
-0.714 0.314 0.366,
-0.714 0.314 -0.366,
-0.714 0.314 -0.422,
-0.712 0.235 0.42,
-0.712 0.235 0.367,
-0.712 0.235 -0.368,
-0.712 0.235 -0.42,
-0.709 0.156 0.417,
-0.709 0.156 0.37,
-0.709 0.156 -0.37,
-0.709 0.156 -0.417,
-0.707 0.0771 0.415,
-0.707 0.0771 0.373,
-0.707 0.0771 -0.373,
-0.707 0.0771 -0.415,
-0.704 -0.0017 0.412,
-0.704 -0.0017 0.376,
-0.704 -0.00168 -0.376,
-0.704 -0.00168 -0.412,
-0.668 -0.0017 0.412,
-0.668 -0.0017 0.376,
-0.668 -0.00168 -0.376,
-0.668 -0.00168 -0.412,
-0.665 0.0771 0.415,
-0.665 0.0771 0.373,
-0.665 0.0771 -0.373,
-0.665 0.0771 -0.415,
-0.662 0.156 0.417,
-0.662 0.156 0.37,
-0.662 0.156 -0.37,
-0.662 0.156 -0.417,
-0.66 0.235 0.42,
-0.66 0.235 0.367,
-0.66 0.235 -0.368,
-0.66 0.235 -0.42,
-0.658 0.314 0.422,
-0.658 0.314 0.366,
-0.658 0.314 -0.366,
-0.658 0.314 -0.422,
-0.655 0.393 0.425,
-0.655 0.393 0.363,
-0.655 0.393 -0.363,
-0.655 0.393 -0.425,
-0.653 0.472 0.427,
-0.653 0.472 0.361,
-0.653 0.472 -0.361,
-0.653 0.472 -0.427,
-0.651 0.552 0.429,
-0.651 0.552 0.359,
-0.651 0.552 -0.359,
-0.651 0.552 -0.429,
-0.65 0.71 0.43,
-0.65 0.71 0.358,
-0.65 0.71 -0.358,
-0.65 0.71 -0.43,
-0.65 0.631 0.43,
-0.65 0.631 0.358,
-0.65 0.631 -0.358,
-0.65 0.631 -0.43,
0.65 0.631 0.43,
0.65 0.631 0.358,
0.65 0.631 -0.358,
0.65 0.631 -0.43,
0.65 0.71 0.43,
0.65 0.71 0.358,
0.65 0.71 -0.358,
0.65 0.71 -0.43,
0.651 0.552 0.429,
0.651 0.552 0.359,
0.651 0.552 -0.359,
0.651 0.552 -0.429,
0.653 0.472 0.427,
0.653 0.472 0.361,
0.653 0.472 -0.361,
0.653 0.472 -0.427,
0.655 0.393 0.425,
0.655 0.393 0.363,
0.655 0.393 -0.363,
0.655 0.393 -0.425,
0.658 0.314 0.422,
0.658 0.314 0.366,
0.658 0.314 -0.366,
0.658 0.314 -0.422,
0.66 0.235 0.42,
0.66 0.235 0.367,
0.66 0.235 -0.368,
0.66 0.235 -0.42,
0.662 0.156 0.417,
0.662 0.156 0.37,
0.662 0.156 -0.37,
0.662 0.156 -0.417,
0.665 0.0771 0.415,
0.665 0.0771 0.373,
0.665 0.0771 -0.373,
0.665 0.0771 -0.415,
0.668 -0.0017 0.412,
0.668 -0.0017 0.376,
0.668 -0.00168 -0.376,
0.668 -0.00168 -0.412,
0.704 -0.0017 0.412,
0.704 -0.0017 0.376,
0.704 -0.00168 -0.376,
0.704 -0.00168 -0.412,
0.707 0.0771 0.415,
0.707 0.0771 0.373,
0.707 0.0771 -0.373,
0.707 0.0771 -0.415,
0.709 0.156 0.417,
0.709 0.156 0.37,
0.709 0.156 -0.37,
0.709 0.156 -0.417,
0.712 0.235 0.42,
0.712 0.235 0.367,
0.712 0.235 -0.368,
0.712 0.235 -0.42,
0.714 0.314 0.422,
0.714 0.314 0.366,
0.714 0.314 -0.366,
0.714 0.314 -0.422,
0.717 0.393 0.425,
0.717 0.393 0.363,
0.717 0.393 -0.363,
0.717 0.393 -0.425,
0.719 0.472 0.427,
0.719 0.472 0.361,
0.719 0.472 -0.361,
0.719 0.472 -0.427,
0.721 0.552 0.429,
0.721 0.552 0.359,
0.721 0.552 -0.359,
0.721 0.552 -0.429,
0.722 0.71 0.43,
0.722 0.71 0.358,
0.722 0.71 -0.358,
0.722 0.71 -0.43,
0.722 0.631 0.43,
0.722 0.631 0.358,
0.722 0.631 -0.358,
0.722 0.631 -0.43,
-0.73 0.583 0.438,
-0.73 0.592 0.438,
-0.73 0.583 0.349,
-0.73 0.592 0.349,
-0.73 0.583 -0.349,
-0.73 0.592 -0.349,
-0.73 0.583 -0.438,
-0.73 0.592 -0.438,
-0.641 0.583 0.438,
-0.641 0.592 0.438,
-0.641 0.583 0.349,
-0.641 0.592 0.349,
-0.641 0.583 -0.349,
-0.641 0.592 -0.349,
-0.641 0.583 -0.438,
-0.641 0.592 -0.438,
0.641 0.583 0.438,
0.641 0.592 0.438,
0.641 0.583 0.349,
0.641 0.592 0.349,
0.641 0.583 -0.349,
0.641 0.592 -0.349,
0.641 0.583 -0.438,
0.641 0.592 -0.438,
0.73 0.583 0.438,
0.73 0.592 0.438,
0.73 0.583 0.349,
0.73 0.592 0.349,
0.73 0.583 -0.349,
0.73 0.592 -0.349,
0.73 0.583 -0.438,
0.73 0.592 -0.438,
-0.695 0.608 0.403,
-0.695 0.624 0.403,
-0.695 0.608 -0.403,
-0.695 0.624 -0.403,
-0.686 0.624 0.394,
-0.686 0.71 0.394,
-0.686 0.624 -0.394,
-0.686 0.71 -0.394,
-0.667 0.608 0.375,
-0.667 0.71 0.375,
-0.667 0.608 -0.375,
-0.667 0.71 -0.375,
0.667 0.608 0.375,
0.667 0.71 0.375,
0.667 0.608 -0.375,
0.667 0.71 -0.375,
0.686 0.624 0.394,
0.686 0.71 0.394,
0.686 0.624 -0.394,
0.686 0.71 -0.394,
0.695 0.608 0.403,
0.695 0.624 0.403,
0.695 0.608 -0.403,
0.695 0.624 -0.403,
-0.762 0.71 0.47,
-0.762 0.735 0.47,
-0.762 0.71 -0.47,
-0.762 0.735 -0.47,
0.762 0.71 0.47,
0.762 0.735 0.47,
0.762 0.71 -0.47,
0.762 0.735 -0.47 ]
}
color NULL
coordIndex [ 123, 122, 118, 119, -1, 117, 121, 120,
116, -1, 36, 37, 41, 40, -1, 39,
43, 42, 38, -1, 44, 32, 36, 40,
-1, 45, 44, 40, 41, -1, 33, 45,
41, 37, -1, 32, 33, 37, 36, -1,
48, 28, 32, 44, -1, 49, 48, 44,
45, -1, 29, 49, 45, 33, -1, 28,
29, 33, 32, -1, 52, 24, 28, 48,
-1, 53, 52, 48, 49, -1, 25, 53,
49, 29, -1, 24, 25, 29, 28, -1,
56, 20, 24, 52, -1, 57, 56, 52,
53, -1, 21, 57, 53, 25, -1, 20,
21, 25, 24, -1, 60, 16, 20, 56,
-1, 61, 60, 56, 57, -1, 17, 61,
57, 21, -1, 16, 17, 21, 20, -1,
64, 12, 16, 60, -1, 65, 64, 60,
61, -1, 13, 65, 61, 17, -1, 12,
13, 17, 16, -1, 68, 8, 12, 64,
-1, 69, 68, 64, 65, -1, 9, 69,
65, 13, -1, 8, 9, 13, 12, -1,
76, 0, 8, 68, -1, 77, 76, 68,
69, -1, 1, 77, 69, 9, -1, 0,
1, 9, 8, -1, 72, 4, 0, 76,
-1, 73, 72, 76, 77, -1, 5, 73,
77, 1, -1, 4, 5, 1, 0, -1,
46, 34, 38, 42, -1, 47, 46, 42,
43, -1, 35, 47, 43, 39, -1, 34,
35, 39, 38, -1, 50, 30, 34, 46,
-1, 51, 50, 46, 47, -1, 31, 51,
47, 35, -1, 30, 31, 35, 34, -1,
54, 26, 30, 50, -1, 55, 54, 50,
51, -1, 27, 55, 51, 31, -1, 26,
27, 31, 30, -1, 58, 22, 26, 54,
-1, 59, 58, 54, 55, -1, 23, 59,
55, 27, -1, 22, 23, 27, 26, -1,
62, 18, 22, 58, -1, 63, 62, 58,
59, -1, 19, 63, 59, 23, -1, 18,
19, 23, 22, -1, 66, 14, 18, 62,
-1, 67, 66, 62, 63, -1, 15, 67,
63, 19, -1, 14, 15, 19, 18, -1,
70, 10, 14, 66, -1, 71, 70, 66,
67, -1, 11, 71, 67, 15, -1, 10,
11, 15, 14, -1, 78, 2, 10, 70,
-1, 79, 78, 70, 71, -1, 3, 79,
71, 11, -1, 2, 3, 11, 10, -1,
74, 6, 2, 78, -1, 75, 74, 78,
79, -1, 7, 75, 79, 3, -1, 6,
7, 3, 2, -1, 124, 112, 116, 120,
-1, 125, 124, 120, 121, -1, 113, 125,
121, 117, -1, 112, 113, 117, 116, -1,
128, 108, 112, 124, -1, 129, 128, 124,
125, -1, 109, 129, 125, 113, -1, 108,
109, 113, 112, -1, 132, 104, 108, 128,
-1, 133, 132, 128, 129, -1, 105, 133,
129, 109, -1, 104, 105, 109, 108, -1,
136, 100, 104, 132, -1, 137, 136, 132,
133, -1, 101, 137, 133, 105, -1, 100,
101, 105, 104, -1, 140, 96, 100, 136,
-1, 141, 140, 136, 137, -1, 97, 141,
137, 101, -1, 96, 97, 101, 100, -1,
144, 92, 96, 140, -1, 145, 144, 140,
141, -1, 93, 145, 141, 97, -1, 92,
93, 97, 96, -1, 148, 88, 92, 144,
-1, 149, 148, 144, 145, -1, 89, 149,
145, 93, -1, 88, 89, 93, 92, -1,
156, 80, 88, 148, -1, 157, 156, 148,
149, -1, 81, 157, 149, 89, -1, 80,
81, 89, 88, -1, 152, 84, 80, 156,
-1, 153, 152, 156, 157, -1, 85, 153,
157, 81, -1, 84, 85, 81, 80, -1,
126, 114, 118, 122, -1, 127, 126, 122,
123, -1, 115, 127, 123, 119, -1, 114,
115, 119, 118, -1, 130, 110, 114, 126,
-1, 131, 130, 126, 127, -1, 111, 131,
127, 115, -1, 110, 111, 115, 114, -1,
134, 106, 110, 130, -1, 135, 134, 130,
131, -1, 107, 135, 131, 111, -1, 106,
107, 111, 110, -1, 138, 102, 106, 134,
-1, 139, 138, 134, 135, -1, 103, 139,
135, 107, -1, 102, 103, 107, 106, -1,
142, 98, 102, 138, -1, 143, 142, 138,
139, -1, 99, 143, 139, 103, -1, 98,
99, 103, 102, -1, 146, 94, 98, 142,
-1, 147, 146, 142, 143, -1, 95, 147,
143, 99, -1, 94, 95, 99, 98, -1,
150, 90, 94, 146, -1, 151, 150, 146,
147, -1, 91, 151, 147, 95, -1, 90,
91, 95, 94, -1, 158, 82, 90, 150,
-1, 159, 158, 150, 151, -1, 83, 159,
151, 91, -1, 82, 83, 91, 90, -1,
154, 86, 82, 158, -1, 155, 154, 158,
159, -1, 87, 155, 159, 83, -1, 86,
87, 83, 82, -1 ]
normal NULL
texCoord NULL
creaseAngle 0
}
}
DEF leg_det Shape {
appearance Appearance {
material USE brown
texture NULL
textureTransform NULL
}
geometry IndexedFaceSet {
coord USE all_verts_1
color NULL
coordIndex [ 163, 161, 169, 171, -1, 170, 168, 160,
162, -1, 167, 165, 173, 175, -1, 174,
172, 164, 166, -1, 179, 177, 185, 187,
-1, 186, 184, 176, 178, -1, 183, 181,
189, 191, -1, 190, 188, 180, 182, -1,
160, 161, 163, 162, -1, 168, 169, 161,
160, -1, 170, 171, 169, 168, -1, 162,
163, 171, 170, -1, 164, 165, 167, 166,
-1, 172, 173, 165, 164, -1, 174, 175,
173, 172, -1, 166, 167, 175, 174, -1,
176, 177, 179, 178, -1, 184, 185, 177,
176, -1, 186, 187, 185, 184, -1, 178,
179, 187, 186, -1, 180, 181, 183, 182,
-1, 188, 189, 181, 180, -1, 190, 191,
189, 188, -1, 182, 183, 191, 190, -1 ]
normal NULL
texCoord NULL
creaseAngle 0
}
}
DEF edge Shape {
appearance Appearance {
material USE brown
texture NULL
textureTransform NULL
}
geometry IndexedFaceSet {
coord USE all_verts_1
color NULL
coordIndex [ 200, 202, 203, 201, -1, 192, 194, 202,
200, -1, 193, 195, 194, 192, -1, 196,
198, 195, 193, -1, 197, 199, 198, 196,
-1, 202, 206, 207, 203, -1, 194, 214,
206, 202, -1, 195, 215, 214, 194, -1,
198, 210, 215, 195, -1, 199, 211, 210,
198, -1, 206, 204, 205, 207, -1, 214,
212, 204, 206, -1, 215, 213, 212, 214,
-1, 210, 208, 213, 215, -1, 211, 209,
208, 210, -1, 204, 200, 201, 205, -1,
212, 192, 200, 204, -1, 213, 193, 192,
212, -1, 208, 196, 193, 213, -1, 209,
197, 196, 208, -1 ]
normal NULL
texCoord NULL
creaseAngle 0
}
}
DEF top Shape {
appearance Appearance {
material USE brown
texture NULL
textureTransform NULL
}
geometry IndexedFaceSet {
coord USE all_verts_1
color NULL
coordIndex [ 217, 221, 223, 219, -1, 222, 220, 216,
218, -1, 216, 217, 219, 218, -1, 220,
221, 217, 216, -1, 222, 223, 221, 220,
-1, 218, 219, 223, 222, -1 ]
normal NULL
creaseAngle 0
}
}
]
}