Post : Iso Surfaces


By C. Benoit and S. Péron

Isosurfaces are generated using the Marching-Cubes or Marching-Tetras algorithm.
When starting from an hexa mesh, marching cube can be used to generate a TRI mesh or a QUAD dominant mesh.
QUAD dominant isosurfaces look smoother and have less elements.

In Cassiopee, computing an isosurface of field 'Field' for value 12. by marching tetras is performed by: iso = P.isoSurf(A, 'Field', 12.).
Computing an isosurface of field 'Field' for value 12. by marching cubes: iso = P.isoSurfMC(A, 'Field', 12.).

Iso surface of Q crtieria for a slat extracted with Marching tetra (1.9 M elements) with Marching cube (0.8 M elements)


Modifying the marching-cubes algorithm to generate QUAD dominant meshes is quite simple. Starting from Paul Bourke implementation, we introduce a new table:
int quadTable[256][17] =
{{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 0
{ 0, 8, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 3, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 3, 3, 1, 2, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 2, 10, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 10, 8, 3, 10, 9, 8, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 11, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 8, 11, 2, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 9, 0, 0, 2, 3, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 10
{ 1, 2, 11, 9, 9, 8, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 1, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 10, 1, 8, 11, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 11, 9, 0, 11, 10, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 7, 8, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 7, 3, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 9, 9, 8, 4, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 7, 1, 9, 7, 3, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 10, 10, 8, 4, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 20
{ 0, 3, 7, 4, 1, 2, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 0, 2, 10, 8, 4, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 10, 9, 7, 2, 7, 3, 3, 7, 9, 4, 4, -1, -1, -1, -1,-1},
{ 8, 4, 7, 7, 3, 11, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{11, 2, 4, 7, 2, 0, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 0, 1, 1, 8, 4, 7, 7, 2, 3, 11, 11, -1, -1, -1, -1,-1},
{ 4, 7, 11, 9, 9, 11, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 11, 10, 1, 7, 8, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 10, 11, 4, 1, 0, 4, 4, 7, 11, 4, 4, -1, -1, -1, -1,-1},
{ 4, 7, 8, 8, 9, 0, 11, 10, 11, 0, 3, 3, -1, -1, -1, -1,-1}, // 30
{ 4, 7, 11, 9, 9, 11, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 4, 4, 0, 8, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 8, 3, 5, 4, 3, 1, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 10, 10, 9, 5, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 0, 8, 8, 1, 2, 10, 10, 4, 9, 5, 5, -1, -1, -1, -1,-1},
{ 4, 2, 10, 5, 4, 0, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 10, 5, 3, 3, 5, 4, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 4, 4, 2, 3, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 40
{ 0, 8, 11, 2, 4, 9, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 5, 4, 2, 3, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 8, 1, 5, 2, 8, 11, 11, 4, 8, 5, 5, -1, -1, -1, -1,-1},
{10, 11, 3, 1, 9, 5, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 9, 5, 5, 0, 8, 1, 1, 8, 11, 10, 1, -1, -1, -1, -1,-1},
{ 5, 4, 0, 11, 5, 11, 10, 10, 11, 0, 3, 3, -1, -1, -1, -1,-1},
{ 5, 4, 8, 10, 10, 8, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 3, 0, 5, 7, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 7, 1, 1, 5, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 50
{ 1, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 7, 8, 10, 1, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{10, 1, 2, 2, 9, 5, 3, 0, 5, 7, 3, 3, -1, -1, -1, -1,-1},
{ 8, 2, 5, 0, 8, 5, 7, 7, 10, 5, 2, 2, -1, -1, -1, -1,-1},
{ 2, 10, 5, 3, 3, 5, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 7, 5, 9, 8, 3, 11, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 7, 7, 9, 0, 2, 7, 2, 7, 11, 11, -1, -1, -1, -1,-1},
{ 2, 3, 11, 11, 0, 1, 7, 8, 1, 5, 7, 7, -1, -1, -1, -1,-1},
{11, 2, 1, 7, 7, 1, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 7, 8, 1, 10, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 60
{ 5, 7, 0, 9, 7, 11, 0, 0, 0, 1, 10, 11, -1, -1, -1, -1,-1},
{11, 10, 0, 3, 10, 5, 0, 0, 8, 0, 5, 7, -1, -1, -1, -1,-1},
{11, 10, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{10, 6, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 3, 3, 5, 10, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 0, 1, 1, 5, 10, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 9, 8, 3, 5, 10, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 6, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 6, 5, 3, 0, 8, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 0, 6, 5, 0, 2, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 70
{ 5, 9, 8, 2, 5, 2, 6, 6, 3, 2, 8, 8, -1, -1, -1, -1,-1},
{ 2, 3, 11, 11, 10, 6, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 11, 2, 10, 6, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 9, 9, 2, 3, 11, 11, 5, 10, 6, 6, -1, -1, -1, -1,-1},
{ 5, 10, 6, 6, 1, 9, 2, 2, 2, 9, 8, 11, -1, -1, -1, -1,-1},
{ 6, 5, 3, 11, 5, 1, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 11, 5, 0, 5, 1, 1, 5, 11, 6, 6, -1, -1, -1, -1,-1},
{ 3, 11, 6, 0, 0, 6, 5, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 6, 5, 9, 11, 11, 9, 8, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 5, 10, 6, 6, 4, 7, 8, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 80
{ 4, 7, 3, 0, 6, 5, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 9, 0, 0, 5, 10, 6, 6, 8, 4, 7, 7, -1, -1, -1, -1,-1},
{10, 6, 5, 5, 1, 9, 3, 7, 7, 9, 4, 4, -1, -1, -1, -1,-1},
{ 1, 5, 6, 2, 4, 7, 8, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 6, 5, 3, 0, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 8, 4, 7, 7, 0, 9, 5, 6, 0, 2, 6, 6, -1, -1, -1, -1,-1},
{ 7, 3, 9, 4, 3, 2, 9, 9, 5, 6, 2, 9, -1, -1, -1, -1,-1},
{ 3, 11, 2, 2, 7, 8, 4, 4, 10, 6, 5, 5, -1, -1, -1, -1,-1},
{ 5, 10, 6, 6, 2, 4, 7, 11, 4, 2, 0, 0, -1, -1, -1, -1,-1},
{ 0, 1, 9, 9, 4, 7, 8, 8, 2, 3, 11, 11, 5, 10, 6, 6,-1}, // 90
{ 9, 1, 2, 11, 9, 4, 7, 11, 5, 10, 6, 6, -1, -1, -1, -1,-1},
{ 8, 4, 7, 7, 1, 5, 11, 3, 5, 11, 6, 6, -1, -1, -1, -1,-1},
{ 1, 5, 6, 11, 1, 0, 11, 11, 0, 4, 7, 11, -1, -1, -1, -1,-1},
{ 0, 9, 5, 6, 0, 3, 11, 6, 8, 4, 7, 7, -1, -1, -1, -1,-1},
{ 5, 6, 11, 9, 4, 7, 11, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 6, 10, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 6, 10, 9, 0, 8, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 6, 10, 1, 6, 4, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 8, 3, 6, 8, 6, 4, 4, 6, 1, 10, 10, -1, -1, -1, -1,-1},
{ 1, 2, 4, 9, 2, 6, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 100
{ 3, 0, 8, 8, 1, 2, 4, 9, 2, 6, 4, 4, -1, -1, -1, -1,-1},
{ 0, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 3, 8, 4, 4, 2, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 6, 10, 9, 11, 2, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 2, 11, 8, 4, 6, 10, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 11, 2, 2, 0, 1, 6, 4, 6, 1, 10, 10, -1, -1, -1, -1,-1}, // autre combinaison possible avec le dernier triangle
{ 1, 10, 6, 4, 4, 8, 1, 1, 1, 2, 11, 8, -1, -1, -1, -1,-1},
{ 9, 6, 4, 4, 3, 11, 6, 9, 9, 1, 3, 3, -1, -1, -1, -1,-1},
{ 8, 11, 1, 0, 11, 6, 1, 1, 1, 4, 6, 9, -1, -1, -1, -1,-1},
{ 0, 3, 11, 6, 0, 6, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 110
{ 4, 6, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 6, 7, 8, 10, 8, 9, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 3, 7, 10, 0, 9, 10, 10, 6, 7, 10, 10, -1, -1, -1, -1,-1},
{ 1, 10, 6, 7, 0, 1, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 10, 6, 7, 1, 7, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 6, 6, 1, 6, 8, 9, 8, 6, 7, 7, -1, -1, -1, -1,-1},
{ 1, 2, 6, 9, 6, 7, 9, 9, 0, 3, 7, 9, -1,-1, -1, -1, -1},
{ 0, 6, 7, 8, 6, 0, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 3, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 3, 11, 11, 6, 8, 9, 10, 8, 6, 7, 7, -1, -1, -1, -1,-1}, // 120
{ 0, 2, 11, 7, 0, 7, 10, 9, 6, 7, 10, 10, -1, -1, -1, -1,-1},
{ 0, 1, 7, 8, 1, 10, 6, 7, 2, 3, 11, 11, -1, -1, -1, -1,-1},
{ 1, 2, 11, 7, 1, 10, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 6, 8, 9, 8, 6, 7, 7, 1, 6, 11, 3, -1, -1, -1, -1,-1},
{ 0, 9, 1, 1, 11, 6, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 6 , 7, 8, 0, 3, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 7, 11, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 7, 6, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 0, 8, 8, 11, 7, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 9, 9, 11, 7, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 130
{ 1, 3, 8, 9, 11, 7, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{10, 1, 2, 2, 6, 11, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 10, 10, 3, 0, 8, 8, 6, 11, 7, 7, -1, -1, -1, -1,-1},
{ 0, 2, 10, 9, 6, 11, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 6, 11, 7, 7, 2, 3, 8, 10, 10, 9, 8, 8, -1, -1, -1, -1,-1},
{ 2, 3, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 6, 7, 8, 6, 2, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 6, 7, 3, 0, 1, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 6, 2, 2, 1, 6, 7, 8, 1, 9, 8, 8, -1, -1, -1, -1,-1},
{ 1, 10, 6, 7, 1, 3, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 140
{ 1, 10, 6, 7, 0, 1, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 3, 7, 10, 0, 10, 9, 9, 6, 10, 7, 7, -1, -1, -1, -1,-1},
{ 6, 7, 8, 10, 8, 10, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 6, 8, 4, 4, 11, 8, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 3, 11, 6, 0, 4, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 6, 11, 8, 9, 0, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 4, 6, 6, 3, 9, 6, 11, 9, 3, 1, 1, -1, -1, -1, -1,-1},
{ 4, 6, 11, 8, 2, 10, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 10, 10, 0, 3, 11, 6, 0, 4, 6, 6, -1, -1, -1, -1,-1},
{ 4, 6, 11, 8, 0, 9, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 150
{ 2, 3, 9, 10, 9, 4, 3, 3, 3, 11, 6, 4, -1, -1, -1, -1,-1},
{ 8, 2, 3, 3, 2, 8, 4, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 9, 0, 0, 2, 3, 8, 4, 2, 4, 6, 6, -1, -1, -1, -1,-1},
{ 1, 2, 4, 9, 2, 4, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 8, 1, 3, 3, 8, 4, 6, 6, 6, 8, 1, 10, -1, -1, -1, -1,-1},
{ 0, 1, 10, 6, 6, 0, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 8, 4, 6, 3, 6, 10, 9, 0, 3, 9, 9, -1, -1, -1, -1,-1},
{ 4, 6, 10, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 9, 5, 5, 7, 6, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 160
{ 0, 8, 3, 3, 4, 9, 5, 5, 11, 7, 6, 6, -1, -1, -1, -1,-1},
{ 0, 1, 5, 4, 7, 6, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{11, 7, 6, 6, 8, 3, 4, 4, 3, 1, 5, 4, -1, -1, -1, -1,-1},
{ 9, 5, 4, 4, 10, 1, 2, 2, 7, 6, 11, 11, -1, -1, -1, -1,-1},
{ 6, 11, 7, 7, 1, 2, 10, 10, 0, 8, 3, 3, 4, 9, 5, 5,-1},
{ 7, 6, 11, 11, 5, 4, 10, 10, 0, 2, 10, 4, -1, -1, -1, -1,-1},
{ 3, 5, 4, 8, 2, 10, 5, 3, 11, 7, 6, 6, -1, -1, -1, -1,-1},
{ 2, 6, 7, 3, 5, 4, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 5, 4, 4, 0, 6, 7, 8, 0, 6, 2, 2, -1, -1, -1, -1,-1},
{ 2, 6, 7, 3, 0, 1, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 170
{ 2, 6, 7, 8, 1, 5, 2, 8, 4, 8, 5, 5, -1, -1, -1, -1,-1},
{ 9, 5, 4, 4, 1, 10, 6, 7, 1, 3, 7, 7, -1, -1, -1, -1,-1},
{ 1, 10, 6, 7, 0, 1, 7, 8, 9, 5, 4, 4, -1, -1, -1, -1,-1},
{ 0, 4, 10, 3, 4, 10, 5, 5, 6, 10, 3, 7, -1, -1, -1, -1,-1},
{ 6, 10, 8, 7, 4, 5, 10, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 5, 9, 11, 6, 11, 8, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 6, 11, 3, 0, 9, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 5, 11, 8, 0, 1, 5, 5, 5, 6, 11, 11, -1, -1, -1, -1,-1},
{ 3, 5, 6, 11, 5, 3, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 10, 10, 5, 11, 8, 9, 11, 5, 6, 6, -1, -1, -1, -1,-1}, // 180
{ 0, 6, 11, 3, 0, 9, 5, 6, 1, 2, 10, 10, -1, -1, -1, -1,-1},
{ 5, 6, 11, 8, 0, 5, 2, 8, 10, 5, 2, 2, -1, -1, -1, -1,-1},
{ 3, 5, 6, 11, 2, 3, 5, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 5, 9, 8, 5, 6, 2, 2, 3, 8, 2, 2, -1, -1, -1, -1,-1},
{ 0, 9, 5, 6, 0, 6, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 5, 8, 5, 6, 8, 8, 3, 2, 6, 8, -1, -1, -1, -1,-1},
{ 1, 2, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 3, 6, 10, 3, 6, 9, 8, 5, 6, 9, 9, -1, -1, -1, -1,-1},
{ 0, 1, 10, 6, 0, 9, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 3, 8, 8, 5, 6, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 190
{10, 5, 6, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 7, 5, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 7, 5, 10, 11, 5, 8, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 7, 5, 10, 11, 1, 9, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 7, 5, 10, 11, 1, 3, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 11, 7, 7, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 3, 3, 1, 2, 11, 7, 1, 7, 5, 5, -1, -1, -1, -1,-1},
{ 9, 7, 5, 5, 2, 9, 7, 11, 9, 0, 2, 2, -1, -1, -1, -1,-1},
{ 2, 5, 7, 11, 2, 5, 9, 8, 3, 2, 8, 8, -1, -1, -1, -1,-1},
{ 2, 10, 5, 3, 3, 7, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 200
{ 0, 5, 2, 8, 8, 7, 5, 5, 10, 2, 5, 5, -1, -1, -1, -1,-1},
{ 9, 0, 1, 1, 2, 10, 5, 3, 5, 3, 7, 7, -1, -1, -1, -1,-1},
{ 1, 2, 8, 9, 8, 7, 2, 2, 2, 10, 5, 7, -1, -1, -1, -1,-1},
{ 1, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 7, 8, 1, 7, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 3, 5, 9, 5, 3, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 5, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 5, 8, 4, 4, 5, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 5, 0, 4, 4, 0, 5, 10, 11, 11, 3, 0, 0, -1, -1, -1, -1,-1},
{ 0, 1, 9, 9, 4, 10, 11, 8, 10, 4, 5, 5, -1, -1, -1, -1,-1}, // 210
{ 4, 5, 10, 11, 11, 3, 4, 4, 1, 3, 9, 4, -1, -1, -1, -1,-1},
{ 2, 1, 5, 8, 2, 11, 8, 8, 4, 5, 8, 8, -1, -1, -1, -1,-1},// Combinaison pas super
{ 0, 4, 11, 3, 1, 5, 11, 4, 2, 11, 1, 1, -1, -1, -1, -1,-1},
{ 0, 2, 5, 9, 2, 11, 5, 5, 4, 5, 11, 8, -1, -1, -1, -1,-1},
{ 9, 4, 5, 5, 2, 11, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 10, 5, 3, 3, 8, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 4, 5, 10, 4, 2, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 10, 5, 3, 3, 8, 4, 5, 0, 1, 9, 9, -1, -1, -1, -1,-1},
{ 2, 10, 5, 4, 1, 2, 4, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 8, 4, 5, 3, 5, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 220
{ 0, 4, 5, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 8, 4, 5, 0, 3, 5, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 9, 4, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 9, 11, 7, 9, 10, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 8, 3, 3, 4, 9, 11, 7, 9, 10, 11, 11, -1, -1, -1, -1,-1},
{10, 11, 4, 1, 1, 4, 0, 0, 7, 4, 11, 11, -1, -1, -1, -1,-1},
{ 3, 8, 4, 1, 1, 10, 4, 4, 10, 11, 7, 4, -1, -1, -1, -1,-1},
{ 4, 9, 11, 7, 1, 2, 11, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 9, 11, 7, 1, 2, 11, 9, 0, 8, 3, 3, -1, -1, -1, -1,-1},
{ 2, 11, 7, 4, 2, 4, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 230
{ 2, 11, 7, 4, 2, 4, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 10, 9, 7, 2, 3, 7, 7, 7, 4, 9, 9, -1, -1, -1, -1,-1},
{ 4, 9, 10, 7, 10, 2, 7, 7, 0, 2, 7, 8, -1, -1, -1, -1,-1},
{ 2, 3, 7, 10, 7, 4, 10, 10, 0, 1, 10, 4, -1, -1, -1, -1,-1},
{ 1, 10, 2, 2, 8, 7, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 7, 4, 9, 7, 1, 3, 3, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 7, 4, 9, 0, 1, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 4, 7, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 4, 8, 7, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 240
{ 0, 3, 11, 9, 11, 9, 10, 10, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 1, 10, 8, 8, 10, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 3, 11, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 2, 11, 11, 1, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 9, 11, 3, 1, 2, 11, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 2, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 3, 2, 11, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 3, 8, 10, 10, 8, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 2, 10, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 2, 3, 8, 10, 0, 1, 10, 8, -1, -1, -1, -1, -1, -1, -1, -1,-1}, // 250
{ 1, 10, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 1, 3, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 9, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{ 0, 3, 8, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1},
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1}}; // 255

Used this way:
for (E_Int j=0; quadTable[cubeindex][j] != -1; j+=4)
{
ciso1[nquad] = nptsSav + indir[quadTable[cubeindex][j]];
ciso2[nquad] = nptsSav + indir[quadTable[cubeindex][j+1]];
ciso3[nquad] = nptsSav + indir[quadTable[cubeindex][j+2]];
ciso4[nquad] = nptsSav + indir[quadTable[cubeindex][j+3]];
nquad++;
}

More: Gallery - Help forum - Tutorials - Download - Citation - Contribute - Reference documentation -