#VRML V2.0 utf8
#Beispiel 06
#Das Flaechenmodell eines Polyeders: Jeder Punkt erhaelt eine eigene Farbe.
#colorPerVertex TRUE gestaltet Farbuebergaenge.
Background { skyColor 0.3 0.3 0.3 }
Shape
{ appearance Appearance { material Material {} }
geometry IndexedFaceSet
{ solid FALSE
coord Coordinate
{ point [ 2, 2,0, -2, 2,0, -2,-2,0, 2,-2,0, 0, 0,3 ]
}
coordIndex
[ 0,1,4,0,-1, 1,2,4,1,-1, 2,3,4,2,-1, 3,0,4,3,-1 ]
colorPerVertex TRUE
color Color { color [ 0 0 1 0 1 0 0 0 1 0 1 0 1 0 0 ] }
}
}
|
#VRML V2.0 utf8
WorldInfo {
title " Eine Rutsche "
info [" VRML 2.0-Tutorial, Robert Warnke","Homepage: http://rowa.giso.de "]
}
Shape {
appearance Appearance { material Material { } }
geometry Extrusion { creaseAngle 1.57 endCap FALSE beginCap FALSE solid FALSE
crossSection
[ -1 0, -0.92 -.38, -0.71 -0.71, -0.38 -0.92,
0 -1, 0.38 -.92, 0.71 -.71, .92 -.38, 1 0,
]
# Spirale
spine
[ 2 0 -0, 1.85 0.12 -.77,
1.41 0.24 -1.41, 0.77 0.36 -1.85,
0 0.48 -2, -0.77 0.60 -1.85,
-1.41 0.72 -1.41, -1.85 0.84 -0.77,
-2 0.97 0, -1.85 1.08 0.77,
-1.41 1.20 1.41, -0.77 1.32 1.85,
0 1.44 2, 0.77 1.56 1.85,
1.41 1.68 1.41, 1.85 1.80 0.77,
2 1.92 0, 1.85 2.04 -0.77,
1.41 2.16 -1.41, 0.77 2.28 -1.85,
0 2.40 -2, -0.77 2.52 -1.85,
-1.41 2.64 -1.41, -1.85 2.76 -0.77,
-2 2.88 0, -1.85 3.00 0.77,
-1.41 3.12 1.41, -0.77 3.24 1.85,
0 3.36 2, 0.77 3.48 1.85,
1.41 3.60 1.41, 1.85 3.72 0.77,
2 3.84 0,
]
}
}
|
#VRML V2.0 utf8
Viewpoint { jump FALSE description "Starting Point" }
Group {
children
[ DirectionalLight { direction 0 -1 0 }
Transform
{ translation -8 0 10
children
Shape { appearance Appearance { material Material { transparency 0.5 } }
geometry Sphere { radius 1}
}
}
Transform
{ translation 0 -1 0
children
Shape { appearance Appearance { material Material { diffuseColor 0 1 0 } }
geometry Box { size 30 0.2 30 }
}
}
Transform
{ translation 2 0 0
children
Shape { appearance Appearance { material Material { diffuseColor 0 0.2 0.7 } }
geometry Cylinder { }
}
}
DEF GuideTransform Transform
{ children
[ DEF TourGuide Viewpoint { jump FALSE },
DEF ProxSensor ProximitySensor { size 50 50 50 }
DEF StartTour TouchSensor { },
Transform
{ translation 0.6 0.4 8
children
Shape
{ appearance Appearance { material Material { diffuseColor 1 0.6 0 } }
geometry Sphere { radius 0.2 }
}
}
]
}
]
}
DEF GuidePI PositionInterpolator {
key [ 0 0.2 0.3 0.5 0.6 0.8 0.9 1 ]
keyValue [ 0 0 0 0 0 -5 2 0 -5 2 6 -15 -4 6 -15 -4 0 -5 0 0 -5 0 0 0
]
}
DEF GuideRI OrientationInterpolator {
key [ 0, 0.2, 0.3, 0.5, 0.6, 0.8, 0.9, 1 ]
keyValue [ 0 1 0 0, 0 1 0 0, 0 1 0 1.2, 0 1 0 3, 0 1 0 3.5, 0 1 0 5, 0 1 0 0, 0 1 0 0,
]
}
DEF TS TimeSensor { cycleInterval 30 } # 60 second tour
ROUTE ProxSensor.isActive TO StartTour.set_enabled
ROUTE StartTour.touchTime TO TS.startTime
ROUTE TS.isActive TO TourGuide.set_bind
ROUTE TS.fraction_changed TO GuidePI.set_fraction
ROUTE TS.fraction_changed TO GuideRI.set_fraction
ROUTE GuidePI.value_changed TO GuideTransform.set_translation
ROUTE GuideRI.value_changed TO GuideTransform.set_rotation
|
#VRML V2.0 utf8
Viewpoint { jump FALSE description "Starting Point" }
Group {
children
[ DirectionalLight { direction 0 -1 0 }
Transform
{ translation -8 0 10
children
Shape { appearance Appearance { material Material { transparency 0.5 } }
geometry Sphere { radius 1}
}
}
Transform
{ translation 0 -1 0
children
Shape { appearance Appearance { material Material { diffuseColor 0 1 0 } }
geometry Box { size 30 0.2 30 }
}
}
Transform
{ translation 2 0 0
children
Shape { appearance Appearance { material Material { diffuseColor 0 0.2 0.7 } }
geometry Cylinder { }
}
}
DEF GuideTransform Transform
{ children
[ DEF TourGuide Viewpoint { jump FALSE },
DEF ProxSensor ProximitySensor { size 50 50 50 }
DEF StartTour TouchSensor { },
Transform
{ translation 0.6 0.4 8
children
Shape
{ appearance Appearance { material Material { diffuseColor 1 0.6 0 } }
geometry Sphere { radius 0.2 }
}
}
]
}
]
}
DEF GuidePI PositionInterpolator {
key [ 0 0.2 0.3 0.5 0.6 0.8 0.9 1 ]
keyValue [ 0 0 0 0 0 -5 2 0 -5 2 6 -15 -4 6 -15 -4 0 -5 0 0 -5 0 0 0
]
}
DEF GuideRI OrientationInterpolator {
key [ 0, 0.2, 0.3, 0.5, 0.6, 0.8, 0.9, 1 ]
keyValue [ 0 1 0 0, 0 1 0 0, 0 1 0 1.2, 0 1 0 3, 0 1 0 3.5, 0 1 0 5, 0 1 0 0, 0 1 0 0,
]
}
DEF TS TimeSensor { cycleInterval 30 } # 60 second tour
ROUTE ProxSensor.isActive TO StartTour.set_enabled
ROUTE StartTour.touchTime TO TS.startTime
ROUTE TS.isActive TO TourGuide.set_bind
ROUTE TS.fraction_changed TO GuidePI.set_fraction
ROUTE TS.fraction_changed TO GuideRI.set_fraction
ROUTE GuidePI.value_changed TO GuideTransform.set_translation
ROUTE GuideRI.value_changed TO GuideTransform.set_rotation
|
#VRML V2.0 utf8
Transform
{ children
Shape { appearance Appearance { material Material {}}
geometry Extrusion { endCap FALSE beginCap FALSE solid FALSE
crossSection
[ 3 0, 2.97 0.39, 2.89 0.78, 2.77 1.14, 2.59 1.50, 2.38 1.82, 2.12 2.12,
1.82 2.38, 1.50 2.59, 1.14 2.77, 0.78 2.89, 0.39 2.97, 0 3, -0.39 2.97,
-0.78 2.89, -1.14 2.77, -1.50 2.59, -1.82 2.38, -2.12 2.12, -2.38 1.82, -2.59 1.50,
-2.77 1.14, -2.89 0.78, -2.97 0.39, -3 0, -2.97 -0.39, -2.89 -0.78, -2.77 -1.14,
-2.59 -1.50, -2.38 -1.82, -2.12 -2.12, -1.82 -2.38, -1.50 -2.59, -1.14 -2.77, -0.78 -2.89,
-0.39 -2.97, 0 -3, 0.39 -2.97, 0.78 -2.89, 1.14 -2.77, 1.50 -2.59, 1.82 -2.38,
2.12 -2.12, 2.38 -1.82, 2.59 -1.50, 2.77 -1.14, 2.89 -0.78, 2.97 -0.39, 3 0
]
spine
[ 0 0 0, 0 -0.130 0, 0 -0.258 0, 0 -0.382 0,
0 -0.5 0, 0 -0.608 0, 0 -0.707 0, 0 -0.793 0,
0 -0.866 0, 0 -0.923 0, 0 -0.965 0, 0 -0.991 0,
0 -1 0, 0 -0.991 0, 0 -0.965 0, 0 -0.923 0,
0 -0.866 0, 0 -0.793 0, 0 -0.707 0, 0 -0.608 0,
0 -0.5 0, 0 -0.382 0, 0 -0.258 0, 0 -0.130 0,
0 0 0 ]
scale
[ 1 1 , 0.997 0.997, 0.988 0.988, 0.974 0.974,
0.955 0.955, 0.931 0.931, 0.902 0.902, 0.869 0.869,
0.833 0.833, 0.794 0.794, 0.752 0.752, 0.710 0.710,
0.666 0.666, 0.623 0.623, 0.580 0.580, 0.539 0.539,
0.5 0.5 , 0.463 0.463, 0.430 0.430, 0.402 0.402,
0.377 0.377, 0.358 0.358, 0.344 0.344, 0.336 0.336,
0.333 0.333 ]
}
}
}
|