Marching will tetrahedra

Introduction

This method is intended to represent the Surface definite by \ {(X, there, Z) \ in \ mathbb {R} ^3, F (X, there, Z) =0 \} , with F a function definite on space. The basic principle is identical to the Marching cubes .

It will be noted whereas the marching cubic is a technique having been the subject of a copyright, whereas the technique of the marching tetrahedra was creates to circumvent this patent.

Once one knows that one must trace the Isosurface on the cube, one will break up this cube is tetrahedrons. One can, for example to break up the cube into 6 tetrahedrons.

On each tetrahedron, one will build the isosurface. As one does not have any more that 4 points in the structure considered, one has only 16 case to consider, which by parity, is reduced to 8 cases. The various cases are here exposed:

Each point of intersection between the isosurface and the tetrahedron is calculated by linear interpolation between the 2 points of the corresponding tetrahedron. For the remainder, the method is the same one as for Marching Cube.

Implementation

A tetrahedron is completely determined by the 4 points which compose it. One can implement the method of the marching will tetraedra in the following way: one starts by creating a procedure PolygoniseTri . This procedure takes in parameter (for example):

  • a isovalor
  • the number of the 4 points of the cube C which composes the tetrahedron.

One starts by creating a number which codes the positive and negative tops: M According to this number, one creates the triangles of the isosurface directly, at the same time as one calculates the coordinates of the points. It will be noted that to the maximum 2 triangles compose surface on a tetrahedron. The output data are for example:

  • a number n_Tri which indicates the number of triangles created (1 or 2)
  • a table Tab_Tri of size n_Tri which contains the triangles in the form of a structure Triangle .
For a cube like this one, the call which makes it possible to create the isosurface on all the cube is:
  • PolygoniseTri (isovalor, 2,7,3,1);

  • PolygoniseTri (isovalor, 0,7,1,3);

  • PolygoniseTri (isovalor, 6,1,7,2);

  • PolygoniseTri (isovalor, 0,1,7,4);

  • PolygoniseTri (isovalor, 1,4,5,7);

  • PolygoniseTri (isovalor, 1,7,5,6);

See too

Random links:Puchevillers | Saint-Amand-in-Puisaye | Ichthyosaure | Disc of Poincaré | Stanislas-Arthur-Xavier Touchet | Grande_épave