sphere_triangle_quad
    
    
    
      sphere_triangle_quad,
      a MATLAB code 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 information on this web page is distributed under the MIT license.
    
    
      Languages:
    
    
      sphere_triangle_quad is available in
      a C version and
      a C++ version and
      a Fortran90 version and
      a MATLAB version and
      an Octave version.
    
    
      Related Data and Programs:
    
    
      
      sphere_triangle_quad_test
    
    
      
      random_data,
      a MATLAB code which
      generates sample points for 
      various probability distributions, spatial dimensions, and geometries;
    
    
      
      sphere_grid, 
      a MATLAB 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 unit sphere.
    
    
      
      sphere_quad,
      a MATLAB code which 
      approximates an integral over the surface of the unit sphere 
      by applying a triangulation to the surface;
    
    
      
      sphere_triangle_monte_carlo,
      a MATLAB code which
      estimates the integral of a function over a spherical triangle 
      using the monte carlo method.
    
    
      
      stroud_rule, 
      a MATLAB code 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: 1-58488-301-4,
 LC: QA167.H36.
      Source Code:
    
    
      
        - 
          polyterm_exponent.m,
          gets or sets the exponents for the polynomial term.
        
- 
          polyterm_value_3d.m,
          evaluates a single polynomial term in 3D.
        
- 
          r8_uniform_01.m,
          returns a unit pseudorandom R8.
        
- 
          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 great-circle 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.
        
    
      Last revised on 12 January 2021.