3D Landscape Generation in VRML
Generator part of the Design
 

The program is supposed to be a editor in 2D that generates VRML-worlds.  It will for example be able to generate landscapes with fences, rivers and walk-paths.

The GUI part of the program will interpret the users' commands to build the data-structures of the program.  These data-structures will be the objects which the user wants to be part of the landscape.  When the user wants the landscape to be exported as a VRML file, the generator will convert the data-structures to a human-readable VRML-file.

 

 

This part of the design document will explain the role of the generator.
 


The Data Structures

The have decided to use at least the following data-structures:
 

It should be noted that other standard VRML-nodes, e.g. sound-nodes, scripting-nodes and routing, can be included in the scene by using inlined objects.

Path objects are objects that represent a piecewise linear path when viewed from above.  The user for example clicks with the mouse where the circles are, from left to right.  These circles are when stored as (x,y) coordinates in a vector in appropriate data structure.
 

Non-curved Path
 
When the user asks for a generation of the landscape (or even when the user adds a new point) the path is represented as a curved path.  This generation makes a challenge to the generator.  Some Spline curves may be used for this.  Even though the path is curved in the output VRML-file the path is simply stored as a vector of coordinates in the program.
 
Curved Path
 

There is the possibility that the Extrusion-node in the WRML-specification will be useful to generate this kind of a path.  It is hard to say whether it will help, at this stage in the design.
 


Inlined objects

Inlined objects come very handy in our program.  The reason is that we can for example easily scale, move, rotate objects.  It's also easy to add an anchor to object.  Here is an example of how we would include a another WRML file in our scene and move it (10,10,10) relative to the origin.
 

 

 
 
 
 

 
The VRML-code generated for the whole scene will not be a complex hierarchy.  Objects will always be a child of the main scene,
 
 
 but never child of an another object.
 
 
 
This will simplify the project without loosing important functionality.
 
 
 
 
 
Berlin, 13th of July,
Alfred Hauksson
hauksson@cs.tu-berlin.de