sphere_grid, a MATLAB code which constructs a variety of sets of points over the surface of a sphere in 3D.
A grid on a sphere may mean a set of points, or a set of points and lines that connect them, or a set of points, lines that connect them, and the faces that are bounded by those lines.
A grid may be desired which simply organizes areas. In that case, something like the latitude and longitude lines on a globe may be sufficient, even though "evenly spaced" latitude and longitude lines result in grid cells that are close to rectangular near the equator, but become more asymmetric near the poles.
A grid may also be desired for sampling, that is, for choosing a set of points that are well spread across the sphere. A simple Monte Carlo approach can be used, although this means that the data is only well spread out in the long view; there may be local clusters and gaps.
Other grids are generated by drawing a spiral on the surface of the sphere, and choosing points at regular spacings along that line, or by projecting an icosahedron onto the surface of the sphere, which divides the surface into 20 congruent spherical triangles, and then dealing with the simpler issue of choosing points from the triangles.
The computer code and data files described and made available on this web page are distributed under the MIT license
sphere_grid is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
ball_grid, a MATLAB code which computes a grid of points over the interior of a ball in 3d.
circle_arc_grid, a MATLAB code which computes points equally spaced along a circular arc;
cube_grid, a MATLAB code which computes a grid of points over the interior of a cube in 3d.
disk_grid, a MATLAB code which computes a grid of points over the interior of a disk in 2d.
ellipse_grid, a MATLAB code which computes a grid of points over the interior of an ellipse in 2d.
ellipsoid_grid, a MATLAB code which computes a grid of points over the interior of an ellipsoid in 3d.
hypercube_grid, a MATLAB code which computes a grid of points over the interior of a hypercube in m dimensions.
line_grid, a MATLAB code which computes a grid of points over the interior of a line segment in 1d.
polygon_grid, a MATLAB code which generates a grid of points over the interior of a polygon in 2d.
pyramid_grid, a MATLAB code which computes a grid of points over the interior of the unit pyramid in 3d;
simplex_grid, a MATLAB code which generates a grid of points over the interior of a simplex in m dimensions.
sphere_cvt, a MATLAB code which creates a mesh of well-separated points using centroidal voronoi tessellations over the surface of the unit sphere in 3d.
sphere_delaunay, a MATLAB code which computes the delaunay triangulation of points on a sphere.
sphere_fibonacci_grid, a MATLAB code which computes a grid of points using the fibonacci spiral over the surface of a sphere in 3d.
sphere_grid, a dataset directory which contains grids of points, lines, triangles or quadrilaterals on a sphere;
sphere_lebedev_rule, a MATLAB code which computes lebedev quadrature rules over the surface of the unit sphere in 3d.
sphere_llq_grid, a MATLAB code which uses longitudes and latitudes to create grids of points, lines, and quadrilaterals on the surface of the unit sphere in 3d.
sphere_stereograph, a MATLAB code which computes the stereographic mapping between points on the unit sphere and points on the plane z = 1.
sphere_llq_grid, a MATLAB code which computes a grid of quadrilaterals bounded by latitude and longitude lines over the surface of a sphere in 3d.
sphere_llt_grid, a MATLAB code which computes a grid of triangles bounded by latitude and longitude lines over the surface of a sphere in 3d.
sphere_voronoi, a MATLAB code which computes the voronoi diagram of points on a sphere.
square_grid, a MATLAB code which computes a grid of points over the interior of a square in 2d.
tetrahedron_grid, a MATLAB code which computes a grid of points over the interior of a tetrahedron in 3d.
triangle_grid, a MATLAB code which computes a grid of points over the interior of a triangle in 2d.
wedge_grid, a MATLAB code which computes a grid of points over the interior of the unit wedge in 3d.