Isosurfaces
Home Up Isosurfaces GPR

 

Welcome to Chris Smemoe's C S 555 Project home page

Description of the Project

How I do it

Sample Cases

Get the Program

Description of the Project

For my project, I generate and render iso-surfaces for a three-dimensional grid.   For transient data sets, I animate the iso-surface at each transient time step.

How I do it

Step 1: Read in gridded data

Here is an example of the file format I can read into this program:

GRID3D                   //File Header
ORIGIN 0.0 0.0 0.0  //Grid origin
STEP 9.0 9.0 9.0    //X Y Z Grid cell size
DIM 31 11 11          //Dimensions of the grid
DATA 9                  //Number of data values per grid vertex
15318.906 15668.906 16018.906 16368.906 16718.906 17068.906 17418.906 17768.906 18118.906 //Actual data values for each vertex (continues for all data values)

Step 2: Compute the iso-surfaces based on the current iso-value and the current frame

function isiContourVolume(grid, scalarindex, isovalues, numisovalues)

Traverse all the voxel cells, generating triangles and point gradients using the marching cubes algorithm.

For all grid vertices in the k-direction (z-layer)
For all grid vertices in the j-direction (y-row)
For all grid vertices in the i-direction (x-vertex)

Compute the x, y, and z locations and grid vertex array indices of each vertex adjacent to the current vertex.

If the scalar data values for each vertex are all inside or outside of the iso-surface value, return.

For each surrounding node which the gradient is not computed, compute the gradient.

For each iso-value for which we are determining an iso-surface...

Determine the case (0->255) from the marching cubes case table.

Build a triangle from the determined case (given the case)

  1. Get each edge that makes up the triangle-given the edge ID from the case table, we can determine the vertex ID's for each edge on the triangle.
  2. Compute the intersection point and gradient for each triangle vertex using linear interpolation between the vertices.

Step 3: Turn the iso-surfaces into polygons that can be raytraced

Step 4: Raytrace or draw the polygons in wireframe mode (based on which option is selected) for the currently selected frame.  If an animation is selected, perform steps 2-3 for each time frame.

Sample Cases

I ran 2 sample animation cases.  Both cases show pollutant concentrations in a groundwater contaminant plume.

Case 1: Data set 1 with a 1000 PPM Threshold Value

Image

Case 2: Data set 2 with a 4000 PPM Threshold Value

Image

Get the Program

This program requires Owenlook to run.  If you don't have this GUI or its source code, tough luck!  However, you can download the program and edit the source code so it fits your own GUI.

Sorry, no documentation yet.  This is a work in progress.  Let me know if you have any problems or additions to the program.  I'll update the code.

A binary version of this program compiled for the DEC Alpha is included in this FREE package (in Unix-compressed format).

smegraph.tar.Z [Click here to download]