-
Notifications
You must be signed in to change notification settings - Fork 57
/
sphere_triangle_quad.html
322 lines (291 loc) · 10.1 KB
/
sphere_triangle_quad.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<html>
<head>
<title>
SPHERE_TRIANGLE_QUAD - Estimate Integrals over Spherical Triangles
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
SPHERE_TRIANGLE_QUAD <br> Estimate Integrals over Spherical Triangles
</h1>
<hr>
<p>
<b>SPHERE_TRIANGLE_QUAD</b>
is a MATLAB library which
estimates the integral of a scalar function
F(X,Y,Z) over a spherical triangle on the unit sphere.
</p>
<p>
Three methods of estimation are very crude and cannot be improved:
<ul>
<li>
the centroid rule, based on a single function value.
</li>
<li>
the vertex rule, which averages the vertex values.
</li>
<li>
the midside rule, which averages the midside values.
</li>
</ul>
</p>
<p>
One method of estimation uses random sampling, the Monte Carlo method,
whose accuracy can be improved by increasing the number of sample points.
</p>
<p>
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.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>SPHERE_TRIANGLE_QUAD</b> is available in
<a href = "../../c_src/sphere_triangle_quad/sphere_triangle_quad.html">a C version</a> and
<a href = "../../cpp_src/sphere_triangle_quad/sphere_triangle_quad.html">a C++ version</a> and
<a href = "../../f77_src/sphere_triangle_quad/sphere_triangle_quad.html">a FORTRAN77 version</a> and
<a href = "../../f_src/sphere_triangle_quad/sphere_triangle_quad.html">a FORTRAN90 version</a> and
<a href = "../../m_src/sphere_triangle_quad/sphere_triangle_quad.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../m_src/random_data/random_data.html">
RANDOM_DATA</a>,
a MATLAB library which
generates sample points for
various probability distributions, spatial dimensions, and geometries;
</p>
<p>
<a href = "../../f_src/sphere_grid/sphere_grid.html">
SPHERE_GRID</a>,
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.
</p>
<p>
<a href = "../../f_src/sphere_quad/sphere_quad.html">
SPHERE_QUAD</a>,
a MATLAB library which
approximates an integral over the surface of the unit sphere
by applying a triangulation to the surface;
</p>
<p>
<a href = "../../f_src/sphere_triangle_monte_carlo/sphere_triangle_monte_carlo.html">
SPHERE_TRIANGLE_MONTE_CARLO</a>,
a MATLAB library which
estimates the integral of a function over a spherical triangle
using the Monte Carlo method.
</p>
<p>
<a href = "../../m_src/stroud/stroud.html">
STROUD</a>,
a MATLAB library which
approximates the integral of a function on the surface or in the interior
of a variety of geometric shapes.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ul>
<li>
Jacob Goodman, Joseph ORourke, editors,<br>
Handbook of Discrete and Computational Geometry,<br>
Second Edition,<br>
CRC/Chapman and Hall, 2004,<br>
ISBN: 1-58488-301-4,<br>
LC: QA167.H36.
</li>
</ul>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "r8_acos.m">r8_acos.m</a>,
computes the arc cosine function, with argument truncation.
</li>
<li>
<a href = "r8_asin.m">r8_asin.m</a>,
computes the arc sine function, with argument truncation.
</li>
<li>
<a href = "r8_atan.m">r8_atan.m</a>,
computes the arc tangent function.
</li>
<li>
<a href = "r8_uniform_01.m">r8_uniform_01.m</a>,
returns a unit pseudorandom R8.
</li>
<li>
<a href = "r8vec_norm.m">r8vec_norm.m</a>,
returns the L2 norm of an R8VEC.
</li>
<li>
<a href = "r8vec_normalize.m">r8vec_normalize.m</a>,
normalizes an R8VEC.
</li>
<li>
<a href = "r8vec_polarize.m">r8vec_polarize.m</a>,
polarizes an R8VEC.
</li>
<li>
<a href = "r8vec_transpose_print.m">r8vec_transpose_print.m</a>,
prints an R8VEC, "transposed".
</li>
<li>
<a href = "sphere01_sample.m">sphere01_sample.m</a>,
picks random points on the unit sphere in 3D.
</li>
<li>
<a href = "sphere01_angles_to_area.m">sphere01_angles_to_area.m</a>,
area of a triangle on the unit sphere.
</li>
<li>
<a href = "sphere01_distance_xyz.m">sphere01_distance_xyz.m</a>,
computes great-circle distance on a sphere.
</li>
<li>
<a href = "sphere01_triangle_project.m">sphere01_triangle_project.m</a>,
projects from plane to spherical triangle.
</li>
<li>
<a href = "sphere01_triangle_project2.m">sphere01_triangle_project2.m</a>,
projects from plane to spherical triangle.
</li>
<li>
<a href = "sphere01_triangle_quad_00.m">sphere01_triangle_quad_00.m</a>,
quadrature over a triangle on the unit sphere.
</li>
<li>
<a href = "sphere01_triangle_quad_01.m">sphere01_triangle_quad_01.m</a>,
quadrature over a triangle on the unit sphere.
</li>
<li>
<a href = "sphere01_triangle_quad_02.m">sphere01_triangle_quad_02.m</a>,
quadrature over a triangle on the unit sphere.
</li>
<li>
<a href = "sphere01_triangle_quad_03.m">sphere01_triangle_quad_03.m</a>,
quadrature over a triangle on the unit sphere.
</li>
<li>
<a href = "sphere01_triangle_quad_icos1c.m">sphere01_triangle_quad_icos1c.m</a>,
centroid rule, subdivide then project.
</li>
<li>
<a href = "sphere01_triangle_quad_icos1m.m">sphere01_triangle_quad_icos1m.m</a>,
midpoint rule, subdivide then project.
</li>
<li>
<a href = "sphere01_triangle_quad_icos1v.m">sphere01_triangle_quad_icos1v.m</a>,
vertex rule, subdivide then project.
</li>
<li>
<a href = "sphere01_triangle_quad_icos2v.m">sphere01_triangle_quad_icos2v.m</a>,
vertex rule, subdivide then project.
</li>
<li>
<a href = "sphere01_triangle_sample.m">sphere01_triangle_sample.m</a>,
sample spherical triangle on unit sphere.
</li>
<li>
<a href = "sphere01_triangle_sides_to_angles.m">sphere01_triangle_quad_sides_to_angles.m</a>,
angles of triangle on unit sphere.
</li>
<li>
<a href = "sphere01_triangle_vertices_to_area.m">sphere01_triangle_vertices_to_area.m</a>,
area of triangle on unit sphere.
</li>
<li>
<a href = "sphere01_triangle_vertices_to_centroid.m">sphere01_triangle_vertices_to_centroid.m</a>,
centroid of triangle on unit sphere.
</li>
<li>
<a href = "sphere01_triangle_vertices_to_midpoint.m">sphere01_triangle_vertices_to_midpoint.m</a>,
midsides of triangle on unit sphere.
</li>
<li>
<a href = "sphere01_triangle_vertices_to_sides.m">sphere01_triangle_vertices_to_sides.m</a>,
sides of triangle on unit sphere.
</li>
<li>
<a href = "timestamp.m">timestamp.m</a>,
prints the current YMDHMS date as a time stamp.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "sphere_triangle_quad_test.m">sphere_triangle_quad_test.m</a>,
a sample problem.
</li>
<li>
<a href = "sphere_triangle_quad_test_output.txt">sphere_triangle_quad_test_output.txt</a>,
the output file.
</li>
<li>
<a href = "sphere_triangle_quad_test01.m">sphere_triangle_quad_test01.m</a>,
tests SPHERE01_TRIANGLE_QUAD_01, 02, 03.
</li>
<li>
<a href = "sphere_triangle_quad_test02.m">sphere_triangle_quad_test02.m</a>,
tests SPHERE01_TRIANGLE_QUAD_00.
</li>
<li>
<a href = "sphere_triangle_quad_test03.m">sphere_triangle_quad_test03.m</a>,
tests SPHERE01_TRIANGLE_QUAD_ICOS1C.
</li>
<li>
<a href = "sphere_triangle_quad_test04.m">sphere_triangle_quad_test04.m</a>,
tests SPHERE01_TRIANGLE_QUAD_ICOS1M.
</li>
<li>
<a href = "sphere_triangle_quad_test05.m">sphere_triangle_quad_test05.m</a>,
tests SPHERE01_TRIANGLE_QUAD_ICOS1V.
</li>
<li>
<a href = "sphere_triangle_quad_test06.m">sphere_triangle_quad_test06.m</a>,
tests SPHERE01_TRIANGLE_QUAD_ICOS2V.
</li>
<li>
<a href = "polyterm_exponent.m">polyterm_exponent.m</a>,
gets or sets the exponents for the polynomial term.
</li>
<li>
<a href = "polyterm_value_3d.m">polyterm_value_3d.m</a>,
evaluates a single polynomial term in 3D.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../m_src.html">
the MATLAB source codes</a>.
</p>
<hr>
<i>
Last revised on 23 April 2014.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial html skeleton created by HTMLINDEX. -->
</html>