lunes, 23 de abril de 2012

NODO ELEVATION GRID


Este nodo crea una cuadrícula rectangular con alturas variables, lo que la hace especialmente útil para modelar el terreno o un relieve y para la creación de otras superficies en el espacio. 
Sintaxis:
Shape{
                geometry ElevationGrid{
                xDimension     Número de columnas en X
                xSpacing          Espaciado entre columnas en X
                zDimension     Número de filas en Z
                zSpacing           Espaciado entre filas en z
height   [Puntos separados por comas DEBEN DE SER EL TOTAL           ENTRE LA MULTIPLICACIÓN DEL VALOR DE xDimension y zDimension
solid TRUE ó FALSE
                    }

**Si se desea se puede utilizar el nodo Transform

Ejemplo (utilizar botones de navegación):

#VRML V2.0 utf8


Shape {
            appearance Appearance {
              texture ImageTexture{url ["blanco.jpg"]}
                                  }
                        geometry ElevationGrid {
                                   xDimension 11
                                   zDimension 5
                                   xSpacing 5
                                   solid FALSE
                                   height [
                                               5.0, 1.0, 8.0, 5.7, 6.0,
                                               7.2, 12.0, 13.0,14.2,2,
                                       2.1, .5, 3, 2.1, 3.1,
                                       1.1, 2.1, 1.5, .7, .85
                                       5.2, 2.1, .35, .22, 1.5,
                                               2.7, 3.2, 2.1, 8.6, 7.4,
                                               1.111, 3.1, 4.1, 5.2, 3.2,
                                       2.5, 3.25, 7.4, 2.58,.005,
                                       3.22, 2.31, 5.5, 4.4, 6.6,
                                               15.25, 2.7, 4.69, 1.7, 1.4,
                                               2.3, 6.8, 3.2, 4.2, 6.99
                                   ]
                                   }
                        }

                        Transform {
                                   translation      22.5 0 0
                                   rotation 0 0 0 0
                                   children [
                                  
                        Shape {
                                                appearance    Appearance {
                        texture ImageTexture{url ["pasto.jpg"]}
                                               }
                                                          geometry Box {
                                                                                       size   200 1 30
                                                                                                             }
                                                                                                 }
                                                                                     ]
                                                                          }

Transform {
            translation 17 10 -10
    rotation 0 0 0 0    
            children [
Shape{
  appearance Appearance {
          texture ImageTexture{url ["luna.jpg"]}

    }
      geometry Sphere {
      radius 12
    }
}

]
}



No hay comentarios:

Publicar un comentario