## X3D Example Archives: Conformance Nist, Geometry, Elevation Grid

 ElevationGrid is a geometry node defining a rectangular height field, with default values for a 1m by 1m square at height 0. Vertices corresponding to ElevationGrid height values define quadrilaterals, which are placed above or below a flat surface. Hint: the height array defines (xDimension-1)*(zDimension-1) quadrilaterals. X3D Tooltips of interest: ElevationGrid. X3D Specification sections of interest: 13 Geometry3D component, 13.2 Concepts and 13.3.4 ElevationGrid. X3D Examples Archives of related interest: VRML 2 Sourcebook:  Chapter 14 Elevation Grid X3D for Web Authors: Chapter 06 Geometry Points Lines Polygons
14 X3D Models       X3D Model Descriptions
default grid Test default field values. This test attempts to draw an ElevationGrid using mostly default values. The test should generate a flat default colored surface with two heights of length 1 on the right side.
heights 16000 Test browser support of 16000 heights for ElevationGrid. A 125 by 128 ElevationGrid is drawn in the local coordinate system. This will result in grid with 16000 heights as required by the VRML specifications.
test ccwsolid Test ccw field. The same ElevationGrid is drawn twice (one in top of the other). For the top one the ccw and solid fields are both set to false (disabling backface culling). For the bottom one the ccw and solid fields are both set to true (enabling backface culling). The test should generate two ElevationGrids. The first one should show both sides of of the grid. The second one should only show the front side of the grid.
test color Test face coloring using Color node. A 12 by 13 grid is defined in the local coordinate system. The ColorPerVertex field is set to false. There should be 12 colored horizontal rows. The colors should be (in order from the back): Red, Green, Blue, clear Blue, Yellow, Red, Green, Blue, clear Blue, Yellow, Red and Green.
test colorvertex Test colorPerVertex set to true. This test attempts to color the vertices of an ElevationGrid. The colorPerVertex field is set to true and 156 colors are defined via a Color node.
test crease Angle Test creaseAngle. This test draws the same ElevationGrid twice each one with a different value for the creaseAngle field. The top grid uses a creaseAngle value of 0.0, while the bottom one uses a creaseAngle value of 6.27 radians. This should cause the bottom grid to be drawn with smoother surfaces.
test deftext Test browser ability to completely map one ImageTexture onto the image texture should map once on the surface of the ElevationGrid. ImageTexture should map once onto the surface of the IndexedFaceSet, with the S (horizontal) axis of the texture corresponding to the X axis of the geometry.
test height Test height field. A 12 by 13 ElevationGrid is drawn in the local coordinate system. All but ten heights are set to zero. The test should generate a grid with a total of ten heights above zero. There should be two heights of length 2.0 (back), three heights of length 1.5, three heights of length 1.0 and two heights of length 0.7 meters. Heights should be drawn in size order (from taller) in the back to lowest (at front).
test negheights Test negative heights. This test attempts to draw an ElevationGrid using positive and negative values for the height field. The test should generate a grid with ten heights > 0. The rest of the heights should be 0.
test normalfaces This test apply normals to the quadrilateral of an ElevationGrid. The test should generate a montanious looking grid with a default colored surface with a darken ground and lighted mountains.
test normalvertices This test apply normals to the vertices of an ElevationGrid. The test should generate a flat default colored surface. The outside part of the surface should be illuminated, the The area immediatelly inside should be dark and the center of the surface should also be illuminated.
test textcoord Test browser ability to completely map one ImageTexture onto the image texture should map once on the surface of the ElevationGrid. ImageTexture should map once onto the surface of the IndexedFaceSet, with the S ( horizontal ) axis of the texture corresponding to the X axis of the geometry. A set of texture coordinates are used to apply
test x Spacing This test illustrates the effect of redefining the zSpacing field for the same ElevationGrid. The same grid is drawn three times increasing the xSpacing field by one from the back to the front. Each grid is rotated 1.0 radians along the X axis to better illustrate such effect.
test z Spacing This test illustrates the effect of redefining the zSpacing field for the same ElevationGrid. The same grid is drawn three times increasing the zSpacing field by one from top to bottom. Each grid is rotated 1.0 radians along the Y axis to better illustrate such effect.
 Master source-code model archive is under subversion control at https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/Geometry/ElevationGrid

The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.