SPHERE_TRIANGLE_QUAD
Estimate Integrals over Spherical Triangles
SPHERE_TRIANGLE_QUAD
is a MATLAB library which
estimates the integral of a scalar function
F(X,Y,Z) over a spherical triangle on the unit sphere.
Three methods of estimation are very crude and cannot be improved:

the centroid rule, based on a single function value.

the vertex rule, which averages the vertex values.

the midside rule, which averages the midside values.
One method of estimation uses random sampling, the Monte Carlo method,
whose accuracy can be improved by increasing the number of sample points.
Another method is based on the centroid rule, but allows the
user to decompose the original spherical triangle into collection
of smaller triangles. The accuracy of the estimate should improve
as the size of these triangles decreases.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
SPHERE_TRIANGLE_QUAD is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
RANDOM_DATA,
a MATLAB library which
generates sample points for
various probability distributions, spatial dimensions, and geometries;
SPHERE_GRID,
a MATLAB library 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 unit sphere.
SPHERE_QUAD,
a MATLAB library which
approximates an integral over the surface of the unit sphere
by applying a triangulation to the surface;
SPHERE_TRIANGLE_MONTE_CARLO,
a MATLAB library which
estimates the integral of a function over a spherical triangle
using the Monte Carlo method.
STROUD,
a MATLAB library which
approximates the integral of a function on the surface or in the interior
of a variety of geometric shapes.
Reference:

Jacob Goodman, Joseph ORourke, editors,
Handbook of Discrete and Computational Geometry,
Second Edition,
CRC/Chapman and Hall, 2004,
ISBN: 1584883014,
LC: QA167.H36.
Source Code:

r8_acos.m,
computes the arc cosine function, with argument truncation.

r8_asin.m,
computes the arc sine function, with argument truncation.

r8_atan.m,
computes the arc tangent function.

r8_uniform_01.m,
returns a unit pseudorandom R8.

r8vec_norm.m,
returns the L2 norm of an R8VEC.

r8vec_normalize.m,
normalizes an R8VEC.

r8vec_polarize.m,
polarizes an R8VEC.

r8vec_transpose_print.m,
prints an R8VEC, "transposed".

sphere01_sample.m,
picks random points on the unit sphere in 3D.

sphere01_angles_to_area.m,
area of a triangle on the unit sphere.

sphere01_distance_xyz.m,
computes greatcircle distance on a sphere.

sphere01_triangle_project.m,
projects from plane to spherical triangle.

sphere01_triangle_project2.m,
projects from plane to spherical triangle.

sphere01_triangle_quad_00.m,
quadrature over a triangle on the unit sphere.

sphere01_triangle_quad_01.m,
quadrature over a triangle on the unit sphere.

sphere01_triangle_quad_02.m,
quadrature over a triangle on the unit sphere.

sphere01_triangle_quad_03.m,
quadrature over a triangle on the unit sphere.

sphere01_triangle_quad_icos1c.m,
centroid rule, subdivide then project.

sphere01_triangle_quad_icos1m.m,
midpoint rule, subdivide then project.

sphere01_triangle_quad_icos1v.m,
vertex rule, subdivide then project.

sphere01_triangle_quad_icos2v.m,
vertex rule, subdivide then project.

sphere01_triangle_sample.m,
sample spherical triangle on unit sphere.

sphere01_triangle_quad_sides_to_angles.m,
angles of triangle on unit sphere.

sphere01_triangle_vertices_to_area.m,
area of triangle on unit sphere.

sphere01_triangle_vertices_to_centroid.m,
centroid of triangle on unit sphere.

sphere01_triangle_vertices_to_midpoint.m,
midsides of triangle on unit sphere.

sphere01_triangle_vertices_to_sides.m,
sides of triangle on unit sphere.

timestamp.m,
prints the current YMDHMS date as a time stamp.
Examples and Tests:

sphere_triangle_quad_test.m,
a sample problem.

sphere_triangle_quad_test_output.txt,
the output file.

sphere_triangle_quad_test01.m,
tests SPHERE01_TRIANGLE_QUAD_01, 02, 03.

sphere_triangle_quad_test02.m,
tests SPHERE01_TRIANGLE_QUAD_00.

sphere_triangle_quad_test03.m,
tests SPHERE01_TRIANGLE_QUAD_ICOS1C.

sphere_triangle_quad_test04.m,
tests SPHERE01_TRIANGLE_QUAD_ICOS1M.

sphere_triangle_quad_test05.m,
tests SPHERE01_TRIANGLE_QUAD_ICOS1V.

sphere_triangle_quad_test06.m,
tests SPHERE01_TRIANGLE_QUAD_ICOS2V.

polyterm_exponent.m,
gets or sets the exponents for the polynomial term.

polyterm_value_3d.m,
evaluates a single polynomial term in 3D.
You can go up one level to
the MATLAB source codes.
Last revised on 23 April 2014.