public class MarchingTetrahedra
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
MarchingTetrahedra.GridPointData |
class |
MarchingTetrahedra.GridPointGenerator |
Constructor and Description |
---|
MarchingTetrahedra() |
Modifier and Type | Method and Description |
---|---|
PolygonalMesh |
createMesh(double[] vals,
Vector3d minCoord,
Vector3d cellWidths,
Vector3i res,
double iso)
Creates an isosurface mesh from a 3D grid of values.
|
public PolygonalMesh createMesh(double[] vals, Vector3d minCoord, Vector3d cellWidths, Vector3i res, double iso)
res.x
X res.y
X
res.z
cells, with the x, y, and z widths of each cell given
by cellWidths
, and a minimum vertex located at
minCoord
. The number of vertices along the x, y, and z axes
is hence numVX = res.x+1
, numVY = res.y+1
, and
numVZ = res.z+1
. The values at each vertex are stored in the
array vals
, and arranged, for the vertex at (i, j,
k)
by
val[vertex(i,j,k)] = [i + j*numVX + k*numVX*numVY];
vals
- contains grid values at each vertexminCoord
- value of minimum vertex at (0, 0, 0)cellWidths
- widths of each grid cell along the x, y, and z
axesres
- number of cells along each of the x, y, and z axesiso
- value to be used to create the isosurface