A Brief Overview
To use a program to create VRML models from given data sets and geometries a standardized data format is needed. While later versions of this program might be robust enough to handle a variety of different formats, for the design and development of the program one specific form is needed.
To explain the choice of this format some background information on VRML is needed. VRML 97 uses a right handed coordinate system. However, it is not the more conventional system where the z axis denotes vertical depth. Instead, the x axis goes horizontally across the screen, using the sign convention that right is positive (see picture to the right). The y axis traverses the screen in the vertical direction, with the standard sign convention of up being positive. Finally, the z axis denotes positions going in and out of the screen, where out of the screen is positive. Keeping this in mind, the standard (x, y, z) location would be represented as (z, x, y) in VRML. So to start it would make sense to get a data set of this form.
The next major concern is the terrain/environment that will encompass the simulation. The quickest, and easiest way to create this from raw data is using an elevation grid. An elevation grid in VRML is created in the xz plane with by defining a grid size by giving it a x and z dimensions. Each grid square gets its elevation value (height) from a matrix, where the zero position corresponds to the back left square on the grid and each position of the matrix corresponds to a grid location. The grid square numbering scheme is as follows, starting from the back left it increases by one every square to the right, when it has reached the edge of the grid, it moves one square location forward (out of the screen), and begins again from the left edge of the grid (see image below). So to create the terrain model, a data set with height values, starting from the northwest corner and ending with the southeast corner would be needed, with negative depths being given negative signs. Scaling is a key concern, so the length of each edge of the grid square would have to be known as well as a scaling factor if needed for the depth.
The Data & The Program
The most feasible way for the program to use the data would be in consort with a series of options and open fields that the user would specify. These fields would allow the data set to be best optimized for VRML. Based on the initial study done on the use of VRML for flow visualization, it has been found that the best way to optimize the program for a specific data set will depend primarily on the number of particles released at a time. In order to use and optimize a data set based on three space locations(1), and to allow for different options to be implemented, the data set should be of a form that is relatively easy to manipulate. So using the previous study, a data set of the form (z, x, y)(2) should be used, where a location is defined for each particle at every time interval.
Where the subscript value denotes the particle number, and the superscript value denotes the time interval. However, because there will be locations given for particles while they remain at their origins until the time of their release a larger portion of the data set will be removed. It is still useful to have it there initially because it allows the program to be able to implement more options. The program itself combine the environment and data set into one VRML file meanwhile creating a control panel modeled after VCR and stereo controls with added options. The data for the elevation grid will be in a matrix of the form described in the previous section. However, the z and x dimensions will have to be specified in the program by the user.
1. Determined by grid square location and depth
2. Based on the standard right hand coordinate system.