8._ En el nodo ElevationGrid vamos a realizar una figura de acuerdo a las coordenadas que nosotros le indiquemos, en éste no necesitamos mucho las coordenadas de cada punto, solo unas pocas, aquí se va a utilizar Xdimension, Xspacing, Zdimension, Zspacing, en los cuales vamos a agregar el espacio que queremos que ocupe z, el de x y de cuantos cuadros estamos hablando, posteriormente solo agregaremos las dimensiones de Y, y así nos va quedando nuestra figura, pondré la sintaxis de este nodo y posteriormente la figura que nos queda con la sintaxis...
#VRML V2.0 utf8
Transform{
translation 0.0 0.0 0
scale 2.0 2.0 2.0
children [
Shape {
appearance Appearance {
material Material { }
}
geometry ElevationGrid {
xDimension 10
xSpacing 10
zDimension 3
zSpacing 20
height [
2, 1, 4, 2, 8, 4, 4, 2, 2, 1,
16, 8, 32, 16, 64, 32, 32, 16, 16,8,
2, 1, 4, 2,8, 4, 4, 2, 2, 1
]
color Color {
color [
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
]
}
colorPerVertex FALSE
solid FALSE
}
}
]
}
Transform{
translation 0.0 0.0 0
scale 2.0 2.0 2.0
children [
Shape {
appearance Appearance {
material Material { }
}
geometry ElevationGrid {
xDimension 10
xSpacing 10
zDimension 3
zSpacing 20
height [
-2, -1, -4, -2, -8, -4, -4, -2, -2, -1,
-16, -8, -32, -16, -64, -32, -32, -16, -16, -8,
-2, -1, -4, -2, -8, -4, -4, -2, -2, -1
]
color Color {
color [
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
]
}
colorPerVertex FALSE
solid FALSE
}
}
]
}
Transform{
translation 0.0 0.0 0
scale 2.0 2.0 2.0
children [
Shape {
appearance Appearance {
material Material { }
}
geometry ElevationGrid {
xDimension 10
xSpacing 10
zDimension 3
zSpacing 20
height [
2, 1, 4, 2, 8, 4, 4, 2, 2, 1,
16, 8, 32, 16, 64, 32, 32, 16, 16,8,
2, 1, 4, 2,8, 4, 4, 2, 2, 1
]
color Color {
color [
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
]
}
colorPerVertex FALSE
solid FALSE
}
}
]
}
Transform{
translation 0.0 0.0 0
scale 2.0 2.0 2.0
children [
Shape {
appearance Appearance {
material Material { }
}
geometry ElevationGrid {
xDimension 10
xSpacing 10
zDimension 3
zSpacing 20
height [
-2, -1, -4, -2, -8, -4, -4, -2, -2, -1,
-16, -8, -32, -16, -64, -32, -32, -16, -16, -8,
-2, -1, -4, -2, -8, -4, -4, -2, -2, -1
]
color Color {
color [
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
.7 .1 .1
]
}
colorPerVertex FALSE
solid FALSE
}
}
]
}
A continuación pongo el resultado de este nodo :
Regresar al Indice...
hollla
ResponderBorrarchllao
Borrar