Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

VRML File Structure
Drawing: Shape node
Geometry Nodes:
Example: Chessboard
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Let the Music Play
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Information about your world
Definition for Auxiliary Nodes

;koHcC XF$S$Nbn',AȦ2Er[5~}_vU͇(e;s\f`]UU7~HM7Gr|}N`+~ !}EַKMHvA)Ȯf3;l:`Ո.Y1baЄ[2aA,ypmY+ܝqwow>qnM#}:)NsD90lY+L1z3aoDdo|:uGn 2,H͆ pFTE(d*d|CFX F>"u~㤸{˱kr M^Rj1[DO-$P]cO{XYb-"0iL%#'!#{, )gLoi`P5/eYJGJ@4Q.H{fb(M U,&I=+!;ʾcr ӸG~aeBs?x2ʝy%^Ej#?,ax/R`Ғɽ1}͖ӕs+0Zy vWNc7sҾ;i_9FÀ1DCxу~L S1{o-u&_+]yR7L! n2?3c衺iTY6yK7xڞ`ǐ\ Fml$}nsouf/'L$0v xgIyl4ܞqp;b(* g< "qjc?PE}nSSV)WI/ :KRz )oE_զ۠|?JV7w5rbCX;!n!EIń4I=)LѰl,>y,Q@Gh_4Dob;dPzksI{]\_b󠾟T*}Փ3({>p&(spqlN;#3yf*I7?Yj4iy8;=;J߯NlouQqt|چs !{lzt:mڧY>NKsYxYSMG.65Z i g.%L0pZ-;+`sFR={ilփukAt.#%2% dD~:M C Ƽ/#šǏzgx ~O+0V7`45>lVF7uPz#T7(8*Ds'x?,!3%a$!(M%D\uLR´K[ndgAdYXGlKe梞 ?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t՛d_,rGaxc? =qȧ=Q?v_1ՕAts7 Q_rI;^}ɚMA Ǔgx\ .rܐK(+ږg~JKq*90ĉ eʶ Q]@V:#?o USbj_P}n̓dHȨz$\Ch38$bŬ5]?L< |Wz qJXAswO/~~< y m$w̙$/"Z!6&"CI; qP ׄj3qg{UȋZֺ|:H5x'=eGa;.f@2R)n&xd)8]Ġ@DpGE]r2G#,.Se+ n$  *fR2U3AߎSer5Q ;*&.s?MY؎ cc?*^ˡZ@ZL?(Ǒ ol_9Sپvp m^O}$Ec&& (jDKVk{ ƬDʕ92D la׳@] >4K$1z7fWˡ.)} ]/JtѺ2uۃ yGĪ)He C45*#P!5hqv=]WMQ>n2;FŒ'\#V,j{F5+5q` |(Y4B>.ɌVeYnacI4K̅$5rKs6PbnDj4z+8۰ V{o!zKKUVx#'C˺a7ʡ[Fa }-2zlA@G A3ҷ0w~[m)4).^K+y|m`4%jȔQjVۇ @U :TeF2PRd(JT^)_ڔA[d u{ݹ`]$NS4Vj:Y׵J813Zdؗs&Qv&jtnNN߂*P@Q{Y0 ȑ,Ae+>Wu\Y )綨 E>%ʊnlaXDYkM"^`N]i,Wy=[#SՐr^|6җ>e9#ESpt,FShiRJ![jȵaX19{q߹1"Gox8싽sϵ?WmnW敏Ι__`> ػ7:| Cc9VۋUĕk-h߄2[}k[NH-Ѡ>>`:"u- n cZ%Y. pt@Lo>~z!@cj߀LFo:Cnx}-IbHU+C@zg1t߄>Ŵna"݅(`?й

ElevationGrid Node

The ElevationGrid node specifies a grid of points, each with a used defined height. This node is useful to create meshes, see Lighting, or to build a terrain.

An ElevationGrid is built in the XZ plane, starting from the origin and expanding in the positive direction of the axes. The shape of an ElevationGrid is defined by the following fields:
  • xDimension: the number of points in the grid along the X axis.
  • zDimension: the number of grid points in the Z axis.
  • xSpacing: the distance between two adjacent points in the X axis direction.
  • zSpacing: the distance between two adjacent points in the Z axis direction.
  • height: a list of floating point values specifying the height for each point in the grid. The points are ordered left to right and top to bottom.
  • The other fields for this node are:

    The color field defines a Color node. This node defines a list of colors to apply to the faces. The color is optional, the default values being applied if the field is not specified. If a Material node is specified the default color is the emissive color from this node. Note that both the default emissive color and background are black, so if no color is specified and the default background is used you won't be able to see the faces.

    The colorPerVertex is a boolean field which defines how the colors are applied. The meaning is similar to the IndexedLineSet case.

    texCoord specifies a TextureCoordinate node.

    There are 2 normal fields which have the same meaning than the color fields but applied to normals. The normal field defines a Normal node.

    The ccw field specifies if the points which define a face are present counterclockwise, TRUE, or clockwise or unknown order, FALSE. A face has two sides and sometimes it is important to know which is the front side, and which is the back side. So let's assume you're defining s single face perpendicular to the Z axis and ccw is TRUE. If the face is defined counterclockwise then the front side is the side facing you. Otherwise the back side is facing you. If ccw is FALSE then the opposite occurs.

    The solid field determines if the browser should draw both sides of a face or just the front side. VRML assumes by default, solid is TRUE that the faces in an IndexedFaceSet form a solid shape. In this case there is no need to draw the back sides of each face. If solid is FALSE then the browser will draw both sides of each face.

    The convex field specifies if the faces being defined in coordIndex are convex or not. VRML can only draw convex faces. When presented with concave faces, the browser splits the face into smaller convex faces. This is a time consuming task. If you are sure that all your faces are convex then setting this field to TRUE tells the browser not to worry splitting the faces, and therefore saving time. The creaseAngle specifies an angle threshold. If two adjacent faces make an angle bigger than the creaseAngle then you'll see clearly where the two faces meet, the edge linking the two faces is sharp. Otherwise the edge linking the two faces will be smooth.

    ElevationGrid {
    xDimension 0
    xSpacing 0.0
    zDimension 0
    zSpacing 0.0
    height [ ]
    color NULL
    colorPerVertex TRUE
    normal NULL
    normalPerVertex TRUE
    texCoord NULL
    ccw TRUE
    convex TRUE
    solid TRUE
    creaseAngle 0.0

    The following figure depicts the grid built using this node using a list of heights with all elements equal to 0.0.