tetrahedron_grid, a C++ code which generates a grid of points over the interior of a tetrahedron in 3D.
Starting with any 4 points A, B, C and D that define a tetrahedron, we can divide each edge of the tetrahedron into N subintervals, and create a tetrahedral grid. This defines ((N+1)*(N+2)*(N+3))/6 points that lie on the intersections of grid lines.
The library includes a routine which allows the user to pick an arbitrary tetrahedron and an arbitrary number of subdivisions. It then returns the tetrahedral gridpoints defined by that choice.
The information on this web page is distributed under the MIT license.
tetrahedron_grid is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
cpp_grid, a C++ code which generates a regular grid of points inside a variety of regions in one, two, three or many dimensions.