capVTE 1.4 Data Format

© 2003 CAP Lab 2003
Virginia Tech

capVTE was written by Lubos Brieda with the assistance of Dr. Joseph Wang, Raed Kafafy, Julien Pierru, Ryan Stillwater and Binh Tran. Julien is currently working on designing a network interface for capVTE.

The input data set for capVTE consists of one or more ascii files starting with the following header:
vte 1.4 ascii

The header is then followed by one or more of the following commands:
INSERT
TITLE
DESCRIPTION
GEOMETRY
GRID
GLYPHS
A # preceding any line indicates that that line should be ignored.


INSERT

Syntax: INSERT file_name
The INSERT command processes the contents of the vte file file_name . The inserted file must be a valid .vte file - i.e., it must have the proper header.
Example: INSERT geometry.vte

TITLE

Syntax: TITLE text
The TITLE command is used to add a short description to the visualization window. The text will be printed in the lower left corner of the window. The text should not exceed 25 characters.
Example: TITLE ion optics

DESCRIPTION

Syntax: DESCRIPTION text
This command is used to print a longer (up to 500 characters) description of the dataset. Currently, the text is only printed in the console window. Future versions of capVTE will provide an option to read the description through the GUI.
Example: DESCRIPTION This data was generated by XYZ on MM/DD/YYYY to simulate ABC

GEOMETRY

Syntax:
GEOMETRY type
GEOMETRY_COLORS noc
r1 g1 b1 a1
...
rnoc gnoc bnoc anoc
GEOMETRY_COLORS_END
NODES non
x1 y1 z1 color1
...
xnon ynon znon colornon
NODES_END
CELLS noe
node11 node21 node31
...
node1noe node2noe node3noe
CELLS_END
GEOMETRY_END


This block command is used to include a geometry into the visualization domain. Multiple geometries can be included, however, at this time, geometry animation is not possible. This functionality will be added in the future. The type directive following GEOMETRY must be triangular_mesh, as capVTE currently only supports geometries made up of triangular polygons.

The GEOMETRY block consists of several sub-blocks - GEOMETRY_COLORS, NODES and CELLS. The NODES block must contain non nodes, each specifying the point's x,y,z position, as well as an index to the color table. The color representation is specified using the GEOMETRY_COLORS block, where every color is specified using its RGBA value. Each component must range from 0 to 1. The A(lpha) component specifies opacity: 0 indicates a completely transparent node, while 1 is completely opaque. The connectivity is given using the CELLS block. Node indexing goes from 1 to non (instead of the C 0 to non-1 indexing).

Example:
GEOMETRY triangular_mesh
GEOMETRY_COLORS 1
0.8 0 0.2 0.9
GEOMETRY_COLORS_END
NODES 3
1 0 0 1
0 1 0 1
0 0 1 1
NODES_END
CELLS 1
1 2 3
CELLS_END
GEOMETRY_END


GRID

Syntax:
GRID
NODES Nx Ny Nz
SPACING dx dy dz
ORIGIN x0 y0 z0
COMPONENTS noc name1 ... namenoc
FRAME
n1c1 ... n1cnoc ... nNx*Ny*Nzcnoc
FRAME_END
[FRAME
....
FRAME_END]

GRID_END

This command is used to load in the 3D data containing the simulation results. The topology of the grid is specified by the NODES, SPACING and ORIGIN commands. Each grid node can contain multiple scalar values, the number of these and their respective names is specified by the COMPONENTS command.

The grid can contain multiple frames. This feature can be used to create an animation showing a time dependant change in countour plots or in the isosurface. Each frame is specified using a FRAME/FRAME_END block. The scalars values making up the grid are specified by starting with the first scalar for the first node. The following code could be used to generate output in a compatible format:

for k=0:k_max
 for j=0:j_max
  for i=0:i_max
   for c=0;c_max
     output data[i][j][k][c]

Example:
GRID
NODES 2 2 2
SPACING 1 1 1
ORIGIN 0 0 0
COMPONENTS 1 data
FRAME
0.1 0.2 0.3 0.3 0.2 0.1 0 0
FRAME_END
FRAME
0.2 0.1 0.3 0.4 0.1 0 -0.1 0
FRAME_END
GRID_END

GLYPHS

Syntax:
GLYPHS type
GLYPHS_GEOMETRY noi
geometry1 size1 r1 g1 b1 a1
...
geometrynoi sizenoi rnoi gnoi bnoi anoi
GLYPHS_GEOMETRY_END
FRAME nog x1 y1 z1 [i1 j1 k1] geometry1
...
xnog ynog znog [inog jnog knog] geometrynog
FRAME_END
[FRAME nog
...
FRAME_END]

GLYPHS_END

This block is used to add glyphs (small geometries) to the dataset. The glyphs can be scaled and rotated according to their vector data, making them useful for visualization of vector fields. Glyphs can also be used to animate the particle flow. Two types of glyphs are currently available, pvt and pt. The former specifies each glyphs using its position, vector data and a geometry index. The later omits the vector component, and thus glyphs of this type cannot be scaled or oriented. The geometry of each glyph is specified by the GLYPHS_GEOMETRY block. The geometry must be one of the following: cloud, triangle, wedge, lo_res_code, med_res_cone, hi_res_cone, cube, lo_res_sphere, med_res_sphere, hi_res_sphere. The RGBA components range from 0 to 1.

Examples:
GLYPHS pvt
GLYPHS_GEOMETRY 2
wedge 0.5 0 1 0 1
cloud 0.9 1 1 0 0.5
GLYPHS_GEOMETRY_END
FRAME 2
0.1 0.2 0 0.9 0.1 0 1
0 0.1 -0.2 0.1 0 0.2 2
FRAME_END
FRAME 3
1.0 0.3 0 0.5 0.1 -0.1 1
0.1 0.1 0 0.2 -0.1 0.3 2
0 0.4 0.2 0.3 0.3 0.1 1
FRAME_END
GLYPHS_END

Please contact Lubos Brieda for additional information.