sphere_lebedev_rule, a C code which computes a Lebedev quadrature rule over the surface of the unit sphere in 3D.
Vyacheslav Lebedev determined a family of 65 quadrature rules for the unit sphere, increasing in precision from 3 to 131, by 2 each time. This software library computes any one of a subset of 32 of these rules.
Each rule is defined as a list of N values of theta, phi, and w. Here:
Of course, each pair of values (thetai, phii) has a corresponding Cartesian representation:
xi = cos ( thetai ) * sin ( phii )which may be more useful when evaluating integrands.
yi = sin ( thetai ) * sin ( phii )
zi = cos ( phii )
The integral of a function f(x,y,z) over the surface of the unit sphere can be approximated by
integral f(x,y,z) = 4 * pi * sum ( 1 <= i <= N ) f(xi,yi,zi)
The information on this web page is distributed under the MIT license.
sphere_lebedev_rule is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version.
c_rule, a C code which computes a quadrature rule which estimates the integral of a function f(x), which might be defined over a one dimensional region (a line) or more complex shapes such as a circle, a triangle, a quadrilateral, a polygon, or a higher dimensional region, and which might include an associated weight function w(x).
sphere_exactness, a C code which tests the monomial exactness of a quadrature rule on the surface of the unit sphere in 3D.
sphere_grid, a C code which provides a number of ways of generating grids of points, or of points and lines, or of points and lines and faces, over the surface of the unit sphere in 3D.
sphere_quad, a C code which approximates an integral by applying a triangulation over the surface of the unit sphere in 3D.