N dimension regular triangular grid
Function to build a regular triangular grid in dimension Ndim
in which each vertex lays on the Ndim-sphere of radius step.
The simplex thereby defined by each cell is the regular Ndim-simplex.
Support : nicolas.douillet@free.fr
Please rate if it helped you. Thanks.
Function to build a regular triangular grid in dimension Ndim
in which each vertex lays on the Ndim-sphere of radius step.
The simplex thereby defined by each cell is the regular Ndim-simplex.
Support : nicolas.douillet@free.fr
Please rate if it helped you. Thank you
Algorithm principle : shifting/recentering square grids/layers from a dimension
to the center of the grid/layer of the previous dimension.
Initial purpose and use : best regular grid for sampling a parameter space
and solving inverse problems in dimension > 3.
The advantages of triangular grid versus square grid are mostly
a better density and the best isotropy. These advantages are growing
with the dimension Ndim.
For complexity matters, the resulting grid M lays in the hypercube [umin umax]^n.
In case you have some parameters varying in a wider range than
some others, you may take this maximum range as input and just "cut" M in
the other dimensions/directions at the threshold you whish with the help of
functions such as find, and : (colon operator).
For instance, this grid allows a 6 equidistant points neighborood in dimension 2 :
(i-1,j+1) (i,j+1) (i+1,j+1)
\ | /
\ | /
|
(i-1,j) ____ (i,j) ____ (i+1,j)
|
/ | \
/ | \
(i-1,j-1) (i,j-1) (i+1,j-1)
Cite As
Nicolas Douillet (2026). N dimension regular triangular grid (https://www.mathworks.com/matlabcentral/fileexchange/73041-n-dimension-regular-triangular-grid), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
