forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
geometry.html
2182 lines (2142 loc) · 74 KB
/
geometry.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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<head>
<title>
GEOMETRY - Geometric Calculations
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
GEOMETRY <br> Geometric Calculations
</h1>
<hr>
<p>
<b>GEOMETRY</b>
is a C++ library which
performs certain geometric calculations in 2, 3 and N space.
</p>
<p>
These calculations include angles, areas, containment, distances,
intersections, lengths, and volumes.
</p>
<p>
Some geometric objects can be described in a variety of ways.
For instance, a line has implicit, explicit and parametric
representations. The names of routines often will specify
the representation used, and there are routines to convert
from one representation to another.
</p>
<p>
Another useful task is the delineation of a standard geometric
object. For instance, there is a routine that will return
the location of the vertices of an octahedron, and others to
produce a series of "equally spaced" points on a circle, ellipse,
sphere, or within the interior of a triangle.
</p>
<p>
An open source directory of computational geometry routines is available
at <a href = "http://www.cgal.org/">http://www.cgal.org</a>,
the Computational Geometry Algorithms Library.
</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>GEOMETRY</b> is available in
<a href = "../../c_src/geometry/geometry.html">a C version</a> and
<a href = "../../cpp_src/geometry/geometry.html">a C++ version</a> and
<a href = "../../f77_src/geometry/geometry.html">a FORTRAN77 version</a> and
<a href = "../../f_src/geometry/geometry.html">a FORTRAN90 version</a> and
<a href = "../../m_src/geometry/geometry.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Programs:
</h3>
<p>
<a href = "../../f_src/dutch/dutch.html">
DUTCH</a>,
a FORTRAN90 library which
carries out various computational geometry tasks.
</p>
<p>
<a href = "../../cpp_src/geompack/geompack.html">
GEOMPACK</a>,
a C++ library which
computes the Delaunay triangulation and Voronoi diagram of 2D data.
</p>
<p>
<a href = "../../cpp_src/polygon_moments/polygon_moments.html">
POLYGON_MOMENTS</a>,
a C++ library which
computes arbitrary moments of a polygon.
</p>
<p>
<a href = "../../cpp_src/table_delaunay/table_delaunay.html">
TABLE_DELAUNAY</a>,
a C++ program which
reads a
file of 2d point coordinates and computes the Delaunay triangulation.
</p>
<p>
<a href = "../../cpp_src/tet_mesh/tet_mesh.html">
TET_MESH</a>,
a C++ library which
defines and analyzes
tetrahedral meshes.
</p>
<p>
<a href = "../../cpp_src/tetrahedron_properties/tetrahedron_properties.html">
TETRAHEDRON_PROPERTIES</a>,
a C++ program which
computes properties of a tetrahedron
whose vertex coordinates are read from a file.
</p>
<p>
<a href = "../../datasets/tetrahedrons/tetrahedrons.html">
TETRAHEDRONS</a>,
a dataset directory which
contains examples of tetrahedrons;
</p>
<p>
<a href = "../../datasets/triangles/triangles.html">
TRIANGLES</a>,
a dataset directory which
contains examples of triangles;
</p>
<p>
<a href = "../../c_src/triangulate/triangulate.html">
TRIANGULATE</a>,
a C program which
triangulates a (possibly nonconvex) polygon.
</p>
<p>
<a href = "../../cpp_src/triangulation/triangulation.html">
TRIANGULATION</a>,
a C++ library which
defines and analyzes triangulations.
</p>
<p>
<a href = "../../cpp_src/triangulation_display_opengl/triangulation_display_opengl.html">
TRIANGULATION_DISPLAY_OPENGL</a>,
a C++ program which
reads files defining a triangulation and displays an image
using Open GL.
</p>
<p>
<a href = "../../cpp_src/triangulation_triangle_neighbors/triangulation_triangle_neighbors.html">
TRIANGULATION_TRIANGLE_NEIGHBORS</a>,
a C++ program which
reads data defining a triangulation, determines the neighboring
triangles of each triangle, and writes that information to a file.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Gerard Bashein, Paul Detmer,<br>
Centroid of a Polygon,<br>
in Graphics Gems IV,<br>
edited by Paul Heckbert,<br>
AP Professional, 1994,<br>
ISBN: 0123361559,<br>
LC: T385.G6974.
</li>
<li>
SF Bockman,<br>
Generalizing the Formula for Areas of Polygons to Moments,<br>
American Mathematical Society Monthly,<br>
Volume 96, Number 2, February 1989, pages 131-132.
</li>
<li>
Adrian Bowyer, John Woodwark,<br>
A Programmer's Geometry,<br>
Butterworths, 1983,<br>
ISBN: 0408012420.
</li>
<li>
Paulo Cezar Pinto Carvalho, Paulo Roma Cavalcanti,<br>
Point in Polyhedron Testing Using Spherical Polygons,<br>
in Graphics Gems V,<br>
edited by Alan Paeth,<br>
Academic Press, 1995,<br>
ISBN: 0125434553,<br>
LC: T385.G6975.
</li>
<li>
Daniel Cohen,<br>
Voxel Traversal along a 3D Line,<br>
in Graphics Gems IV,<br>
edited by Paul Heckbert,<br>
AP Professional, 1994,<br>
ISBN: 0123361559,<br>
LC: T385.G6974.
</li>
<li>
Thomas Cormen, Charles Leiserson, Ronald Rivest,<br>
Introduction to Algorithms,<br>
MIT Press, 2001,<br>
ISBN: 0262032937,<br>
LC: QA76.C662.
</li>
<li>
Marc deBerg, Marc Krevald, Mark Overmars,
Otfried Schwarzkopf,<br>
Computational Geometry,<br>
Springer, 2000,<br>
ISBN: 3-540-65620-0,<br>
LC: QA448.D38.C65.
</li>
<li>
Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,<br>
LINPACK User's Guide,<br>
SIAM, 1979,<br>
ISBN13: 978-0-898711-72-1,<br>
LC: QA214.L56.
</li>
<li>
James Foley, Andries vanDam, Steven Feiner, John Hughes,<br>
Computer Graphics, Principles and Practice,<br>
Second Edition,<br>
Addison Wesley, 1995,<br>
ISBN: 0201848406,<br>
LC: T385.C5735.
</li>
<li>
Martin Gardner,<br>
The Mathematical Carnival,<br>
Knopf, 1975,<br>
ISBN: 0394494067,<br>
LC: QA95.G286.
</li>
<li>
Priamos Georgiades,<br>
Signed Distance From Point To Plane,<br>
in Graphics Gems III,<br>
edited by David Kirk,<br>
Academic Press, 1992,<br>
ISBN: 0124096735,<br>
LC: T385.G6973.
</li>
<li>
Branko Gruenbaum, Geoffrey Shephard,<br>
Pick's Theorem,<br>
The American Mathematical Monthly,<br>
Volume 100, Number 2, February 1993, pages 150-161.
</li>
<li>
John Harris, Horst Stocker,<br>
Handbook of Mathematics and Computational Science,<br>
Springer, 1998,<br>
ISBN: 0-387-94746-9,<br>
LC: QA40.S76.
</li>
<li>
Barry Joe,<br>
GEOMPACK - a software package for the generation of meshes
using geometric algorithms,<br>
Advances in Engineering Software,<br>
Volume 13, 1991, pages 325-331.
</li>
<li>
Anwei Liu, Barry Joe,<br>
Quality Local Refinement of Tetrahedral Meshes Based
on 8-Subtetrahedron Subdivision,<br>
Mathematics of Computation,<br>
Volume 65, Number 215, July 1996, pages 1183-1200.
</li>
<li>
Jack Kuipers,<br>
Quaternions and Rotation Sequences,<br>
Princeton, 1998,<br>
ISBN: 0691102988,<br>
LC: QA196.K85.
</li>
<li>
Robert Miller,<br>
Computing the Area of a Spherical Polygon,<br>
in Graphics Gems IV,<br>
edited by Paul Heckbert,<br>
Academic Press, 1994,<br>
ISBN: 0123361559,<br>
LC: T385.G6974.
</li>
<li>
Albert Nijenhuis, Herbert Wilf,<br>
Combinatorial Algorithms for Computers and Calculators,<br>
Second Edition,<br>
Academic Press, 1978,<br>
ISBN: 0-12-519260-6,<br>
LC: QA164.N54.
</li>
<li>
Atsuyuki Okabe, Barry Boots, Kokichi Sugihara, Sung Nok Chiu,<br>
Spatial Tesselations:
Concepts and Applications of Voronoi Diagrams,<br>
Second Edition,<br>
Wiley, 2000,<br>,
ISBN: 0-471-98635-6,<br>
LC: QA278.2.O36.
</li>
<li>
Joseph ORourke,<br>
Computational Geometry,<br>
Second Edition,<br>
Cambridge, 1998,<br>
ISBN: 0521649765,<br>
LC: QA448.D38.
</li>
<li>
Edward Saff, Arno Kuijlaars,<br>
Distributing Many Points on a Sphere,<br>
The Mathematical Intelligencer,<br>
Volume 19, Number 1, 1997, pages 5-11.
</li>
<li>
Philip Schneider, David Eberly,<br>
Geometric Tools for Computer Graphics,<br>
Elsevier, 2002,<br>
ISBN: 1558605940,<br>
LC: T385.S334.
</li>
<li>
Peter Schorn, Frederick Fisher,<br>
Testing the Convexity of a Polygon,<br>
in Graphics Gems IV,<br>
edited by Paul Heckbert,<br>
AP Professional, 1994,<br>
ISBN: 0123361559,<br>
LC: T385.G6974.
</li>
<li>
Moshe Shimrat,<br>
Algorithm 112:
Position of Point Relative to Polygon,<br>
Communications of the ACM,<br>
Volume 5, Number 8, August 1962, page 434.
</li>
<li>
Kenneth Stephenson,<br>
Introduction to Circle Packing,
The Theory of Discrete Analytic Functions,<br>
Cambridge, 2005,<br>
ISBN: 0521823560,<br>
LC: QA640.7S74.
</li>
<li>
Allen VanGelder,<br>
Efficient Computation of Polygon Area and Polyhedron Volume,<br>
in Graphics Gems V, <br>
edited by Alan Paeth,<br>
AP Professional, 1995,<br>
ISBN: 0125434553,<br>
LC: T385.G6975.
</li>
<li>
Daniel Zwillinger, Steven Kokoska,<br>
Standard Probability and Statistical Tables,<br>
CRC Press, 2000,<br>
ISBN: 1-58488-059-7,<br>
LC: QA273.3.Z95.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "geometry.cpp">geometry.cpp</a>, the source code.
</li>
<li>
<a href = "geometry.hpp">geometry.hpp</a>, the include file.
</li>
<li>
<a href = "geometry.sh">geometry.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "geometry_prb.cpp">geometry_prb.cpp</a>,
a sample calling program.
</li>
<li>
<a href = "geometry_prb.sh">geometry_prb.sh</a>,
commands to compile and run the sample program.
</li>
<li>
<a href = "geometry_prb_output.txt">geometry_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>ANGLE_BOX_2D</b> "boxes" an angle defined by three points in 2D.
</li>
<li>
<b>ANGLE_CONTAINS_RAY_2D</b> determines if an angle contains a ray, in 2D.
</li>
<li>
<b>ANGLE_DEG_2D</b> returns the angle in degrees swept out between two rays in 2D.
</li>
<li>
<b>ANGLE_HALF_2D</b> finds half an angle in 2D.
</li>
<li>
<b>ANGLE_RAD_2D</b> returns the angle in radians swept out between two rays in 2D.
</li>
<li>
<b>ANGLE_RAD_3D</b> returns the angle between two vectors in 3D.
</li>
<li>
<b>ANGLE_RAD_ND</b> returns the angle between two vectors in ND.
</li>
<li>
<b>ANGLE_TURN_2D</b> computes a turning angle in 2D.
</li>
<li>
<b>ANGLEI_DEG_2D</b> returns the interior angle in degrees between two rays in 2D.
</li>
<li>
<b>ANGLEI_RAD_2D</b> returns the interior angle in radians between two rays in 2D.
</li>
<li>
<b>ANNULUS_AREA_2D</b> computes the area of a circular annulus in 2D.
</li>
<li>
<b>ANNULUS_SECTOR_AREA_2D</b> computes the area of an annular sector in 2D.
</li>
<li>
<b>ANNULUS_SECTOR_CENTROID_2D</b> computes the centroid of an annular sector in 2D.
</li>
<li>
<b>r8_atan</b> computes the inverse tangent of the ratio Y / X.
</li>
<li>
<b>BALL_UNIT_SAMPLE_2D</b> picks a random point in the unit ball in 2D.
</li>
<li>
<b>BALL_UNIT_SAMPLE_3D</b> picks a random point in the unit ball in 3D.
</li>
<li>
<b>BALL_UNIT_SAMPLE_ND</b> picks a random point in the unit ball in ND.
</li>
<li>
<b>BASIS_MAP_3D</b> computes the matrix which maps one basis to another.
</li>
<li>
<b>BOX_01_CONTAINS_POINT_2D</b> reports if a point is contained in the unit box in 2D.
</li>
<li>
<b>BOX_01_CONTAINS_POINT_ND</b> reports if a point is contained in the unit box in ND.
</li>
<li>
<b>BOX_CONTAINS_POINT_2D</b> reports if a point is contained in a box in 2D.
</li>
<li>
<b>BOX_CONTAINS_POINT_ND</b> reports if a point is contained in a box in ND.
</li>
<li>
<b>BOX_RAY_INT_2D:</b> intersection ( box, ray ) in 2D.
</li>
<li>
<b>BOX_SEGMENT_CLIP_2D</b> uses a box to clip a line segment in 2D.
</li>
<li>
<b>CIRCLE_ARC_POINT_NEAR_2D</b> : nearest point on a circular arc.
</li>
<li>
<b>CIRCLE_AREA_2D</b> computes the area of a circle in 2D.
</li>
<li>
<b>CIRCLE_DIA2IMP_2D</b> converts a diameter to an implicit circle in 2D.
</li>
<li>
<b>CIRCLE_EXP_CONTAINS_POINT_2D</b> determines if an explicit circle contains a point in 2D.
</li>
<li>
<b>CIRCLE_EXP2IMP_2D</b> converts a circle from explicit to implicit form in 2D.
</li>
<li>
<b>CIRCLE_IMP_CONTAINS_POINT_2D</b> determines if an implicit circle contains a point in 2D.
</li>
<li>
<b>CIRCLE_IMP_LINE_PAR_INT_2D:</b> ( implicit circle, parametric line ) intersection in 2D.
</li>
<li>
<b>CIRCLE_IMP_POINT_DIST_2D:</b> distance ( implicit circle, point ) in 2D.
</li>
<li>
<b>CIRCLE_IMP_POINT_DIST_SIGNED_2D:</b> signed distance ( implicit circle, point ) in 2D.
</li>
<li>
<b>CIRCLE_IMP_POINT_NEAR_2D:</b> nearest ( implicit circle, point ) in 2D.
</li>
<li>
<b>CIRCLE_IMP_POINTS_2D</b> returns N equally spaced points on an implicit circle in 2D.
</li>
<li>
<b>CIRCLE_IMP_POINTS_3D</b> returns points on an implicit circle in 3D.
</li>
<li>
<b>CIRCLE_IMP_POINTS_ARC_2D</b> returns N points on an arc of an implicit circle in 2D.
</li>
<li>
<b>CIRCLE_IMP_PRINT_2D</b> prints an implicit circle in 2D.
</li>
<li>
<b>CIRCLE_IMP_PRINT_2D</b> prints an implicit circle in 3D.
</li>
<li>
<b>CIRCLE_IMP2EXP_2D</b> converts a circle from implicit to explicit form in 2D.
</li>
<li>
<b>CIRCLE_LLR2IMP_2D</b> converts a circle from LLR to implicit form in 2D.
</li>
<li>
<b>CIRCLE_LUNE_AREA_2D</b> returns the area of a circular lune in 2D.
</li>
<li>
<b>CIRCLE_LUNE_CENTROID_2D</b> returns the centroid of a circular lune in 2D.
</li>
<li>
<b>CIRCLE_PPR2IMP_3D</b> converts a circle from PPR to implicit form in 3D.
</li>
<li>
<b>CIRCLE_PPR2IMP_2D</b> converts a circle from PPR to implicit form in 2D.
</li>
<li>
<b>CIRCLE_SECTOR_AREA_2D</b> computes the area of a circular sector in 2D.
</li>
<li>
<b>CIRCLE_SECTOR_CENTROID_2D</b> returns the centroid of a circular sector in 2D.
</li>
<li>
<b>CIRCLE_SECTOR_CONTAINS_POINT_2D</b> : is a point inside a circular sector?
</li>
<li>
<b>CIRCLE_SECTOR_PRINT_2D</b> prints a circular sector in 2D.
</li>
<li>
<b>CIRCLE_TRIANGLE_AREA_2D</b> returns the area of a circle triangle in 2D.
</li>
<li>
<b>CIRCLE_TRIPLE_ANGLE_2D</b> returns an angle formed by three circles in 2D.
</li>
<li>
<b>CIRCLES_IMP_INT_2D:</b> finds the intersection of two implicit circles in 2D.
</li>
<li>
<b>CONE_AREA_3D</b> computes the surface area of a right circular cone in 3D.
</li>
<li>
<b>CONE_CENTROID_3D</b> returns the centroid of a cone in 3D.
</li>
<li>
<b>CONE_VOLUME_3D</b> computes the volume of a right circular cone in 3D.
</li>
<li>
<b>CONV3D</b> converts 3D data to a 2D projection.
</li>
<li>
<b>COS_DEG</b> returns the cosine of an angle given in degrees.
</li>
<li>
<b>COT_DEG</b> returns the cotangent of an angle given in degrees.
</li>
<li>
<b>COT_RAD</b> returns the cotangent of an angle.
</li>
<li>
<b>CSC_DEG</b> returns the cosecant of an angle given in degrees.
</li>
<li>
<b>CUBE_SHAPE_3D</b> describes a cube in 3D.
</li>
<li>
<b>CUBE_SIZE_3D</b> gives "sizes" for a cube in 3D.
</li>
<li>
<b>CYLINDER_POINT_DIST_3D</b> determines the distance from a cylinder to a point in 3D.
</li>
<li>
<b>CYLINDER_POINT_DIST_SIGNED_3D:</b> signed distance from cylinder to point in 3D.
</li>
<li>
<b>CYLINDER_POINT_INSIDE_3D</b> determines if a cylinder contains a point in 3D.
</li>
<li>
<b>CYLINDER_POINT_NEAR_3D:</b> nearest point on a cylinder to a point in 3D.
</li>
<li>
<b>CYLINDER_SAMPLE_3D</b> samples a cylinder in 3D.
</li>
<li>
<b>CYLINDER_VOLUME_3D</b> determines the volume of a cylinder in 3D.
</li>
<li>
<b>DEGREES_TO_RADIANS</b> converts an angle from degrees to radians.
</li>
<li>
<b>DGE_DET</b> computes the determinant of a matrix factored by SGE_FA.
</li>
<li>
<b>DGE_FA</b> factors a general matrix.
</li>
<li>
<b>DGE_SL</b> solves a system factored by SGE_FA.
</li>
<li>
<b>DIRECTION_PERT_3D</b> randomly perturbs a direction vector in 3D.
</li>
<li>
<b>DIRECTION_UNIFORM_2D</b> picks a random direction vector in 2D.
</li>
<li>
<b>DIRECTION_UNIFORM_3D</b> picks a random direction vector in 3D.
</li>
<li>
<b>DIRECTION_UNIFORM_ND</b> generates a random direction vector in ND.
</li>
<li>
<b>DISK_POINT_DIST_3D</b> determines the distance from a disk to a point in 3D.
</li>
<li>
<b>DMS_TO_RADIANS</b> converts an angle from degrees/minutes/seconds to radians.
</li>
<li>
<b>DODEC_SHAPE_3D</b> describes a dodecahedron in 3D.
</li>
<li>
<b>DODEC_SIZE_3D</b> gives "sizes" for a dodecahedron in 3D.
</li>
<li>
<b>DUAL_SHAPE_3D</b> constructs the dual of a shape in 3D.
</li>
<li>
<b>DUAL_SIZE_3D</b> determines sizes for a dual of a shape in 3D.
</li>
<li>
<b>ELLIPSE_AREA_2D</b> returns the area of an ellipse in 2D.
</li>
<li>
<b>ELLIPSE_POINT_DIST_2D</b> finds the distance from a point to an ellipse in 2D.
</li>
<li>
<b>ELLIPSE_POINT_NEAR_2D</b> finds the nearest point on an ellipse in 2D.
</li>
<li>
<b>ELLIPSE_POINTS_2D</b> returns N points on an tilted ellipse in 2D.
</li>
<li>
<b>ELLIPSE_POINTS_ARC_2D</b> returns N points on a tilted elliptical arc in 2D.
</li>
<li>
<b>ENORM0_ND</b> computes the Euclidean norm of a (X-Y) in N space.
</li>
<li>
<b>GET_SEED</b> returns a random seed for the random number generator.
</li>
<li>
<b>GLOB2LOC_3D</b> converts from a global to a local coordinate system in 3D.
</li>
<li>
<b>HALFPLANE_CONTAINS_POINT_2D</b> reports if a half-plane contains a point in 2d.
</li>
<li>
<b>HALFSPACE_IMP_TRIANGLE_INT_3D:</b> intersection ( implicit halfspace, triangle ) in 3D.
</li>
<li>
<b>HALFSPACE_NORM_TRIANGLE_INT_3D:</b> intersection ( normal halfspace, triangle ) in 3D.
</li>
<li>
<b>HALFSPACE_TRIANGLE_INT_3D:</b> intersection ( halfspace, triangle ) in 3D.
</li>
<li>
<b>HAVERSINE</b> computes the haversine of an angle.
</li>
<li>
<b>HELIX_SHAPE_3D</b> computes points on a helix in 3D.
</li>
<li>
<b>HEXAGON_AREA_2D</b> returns the area of a regular hexagon in 2D.
</li>
<li>
<b>HEXAGON_CONTAINS_POINT_2D</b> finds if a point is inside a hexagon in 2D.
</li>
<li>
<b>HEXAGON_SHAPE_2D</b> returns points on the unit regular hexagon in 2D.
</li>
<li>
<b>HEXAGON_UNIT_AREA_2D</b> returns the area of a unit regular hexagon in 2D.
</li>
<li>
<b>HEXAGON_VERTICES_2D</b> returns the vertices of the unit hexagon in 2D.
</li>
<li>
<b>I4_DEDEKIND_FACTOR</b> computes a function needed for a Dedekind sum.
</li>
<li>
<b>I4_DEDEKIND_SUM</b> computes the Dedekind sum of two I4's.
</li>
<li>
<b>I4_FACTORIAL2</b> computes the double factorial function N!!
</li>
<li>
<b>I4_GCD</b> finds the greatest common divisor of two I4's.
</li>
<li>
<b>I4_LCM</b> computes the least common multiple of two I4's.
</li>
<li>
<b>I4_MAX</b> returns the maximum of two I4's.
</li>
<li>
<b>I4_MIN</b> returns the smaller of two I4's.
</li>
<li>
<b>I4_MODP</b> returns the nonnegative remainder of I4 division.
</li>
<li>
<b>I4_SIGN</b> returns the sign of an I4.
</li>
<li>
<b>I4_SWAP</b> switches two I4's.
</li>
<li>
<b>I4_UNIFORM</b> returns a scaled pseudorandom I4.
</li>
<li>
<b>I4_WRAP</b> forces an I4 to lie between given limits by wrapping.
</li>
<li>
<b>I4COL_COMPARE</b> compares columns I and J of an I4COL
</li>
<li>
<b>I4COL_FIND_ITEM</b> searches an I4COL for a given value.
</li>
<li>
<b>I4COL_FIND_PAIR_WRAP</b> wrap searches an I4COL for a pair of items.
</li>
<li>
<b>I4COL_SORT_A</b> ascending sorts the columns of an integer array.
</li>
<li>
<b>I4COL_SORTED_UNIQUE_COUNT</b> counts unique elements in an ICOL array.
</li>
<li>
<b>I4COL_SWAP</b> swaps two columns of an integer array.
</li>
<li>
<b>I4MAT_PRINT</b> prints an I4MAT, with an optional title.
</li>
<li>
<b>I4MAT_PRINT_SOME</b> prints some of an I4MAT.
</li>
<li>
<b>I4MAT_TRANSPOSE_PRINT</b> prints an I4MAT, transposed.
</li>
<li>
<b>I4MAT_TRANSPOSE_PRINT_SOME</b> prints some of an I4MAT, transposed.
</li>
<li>
<b>I4ROW_COMPARE</b> compares two rows of an I4ROW.
</li>
<li>
<b>I4ROW_SORT_A</b> ascending sorts the rows of an I4ROW.
</li>
<li>
<b>I4ROW_SWAP</b> swaps two rows of an I4ROW.
</li>
<li>
<b>I4VEC_COPY</b> copies an I4VEC.
</li>
<li>
<b>I4VEC_HEAP_D</b> reorders an I4VEC into a descending heap.
</li>
<li>
<b>I4VEC_INDICATOR_NEW</b> sets an I4VEC to the indicator vector.
</li>
<li>
<b>I4VEC_LCM</b> returns the least common multiple of an I4VEC.
</li>
<li>
<b>I4VEC_PRINT</b> prints an I4VEC.
</li>
<li>
<b>I4VEC_PRODUCT</b> multiplies the entries of an I4VEC.
</li>
<li>
<b>I4VEC_REVERSE</b> reverses the elements of an I4VEC.
</li>
<li>
<b>I4VEC_SORT_HEAP_A</b> ascending sorts an I4VEC using heap sort.
</li>
<li>
<b>I4VEC_SORTED_UNIQUE</b> finds unique elements in a sorted I4VEC.
</li>
<li>
<b>I4VEC_UNIFORM_NEW</b> returns a scaled pseudorandom I4VEC.
</li>
<li>
<b>I4VEC_ZERO</b> zeroes an I4VEC.
</li>
<li>
<b>I4VEC2_COMPARE</b> compares pairs of integers stored in two vectors.
</li>
<li>
<b>I4VEC2_SORT_A</b> ascending sorts a vector of pairs of integers.
</li>
<li>
<b>I4VEC2_SORTED_UNIQUE</b> finds unique elements in a sorted I4VEC2.
</li>
<li>
<b>ICOS_SHAPE</b> describes a icosahedron.
</li>
<li>
<b>ICOS_SIZE</b> gives "sizes" for an icosahedron.
</li>
<li>
<b>LINE_EXP_IS_DEGENERATE_ND</b> finds if an explicit line is degenerate in ND.
</li>
<li>
<b>LINE_EXP_NORMAL_2D</b> computes the unit normal vector to a line in 2D.
</li>
<li>
<b>LINE_EXP_PERP_2D</b> computes a line perpendicular to a line and through a point.
</li>
<li>
<b>LINE_EXP_POINT_DIST_2D:</b> distance ( explicit line, point ) in 2D.
</li>
<li>
<b>LINE_EXP_POINT_DIST_3D:</b> distance ( explicit line, point ) in 3D.
</li>
<li>
<b>LINE_EXP_POINT_DIST_SIGNED_2D:</b> signed distance ( explicit line, point ) in 2D.
</li>
<li>
<b>LINE_EXP_POINT_NEAR_2D</b> computes the point on an explicit line nearest a point in 2D.
</li>
<li>
<b>LINE_EXP_POINT_NEAR_3D:</b> nearest point on explicit line to point in 3D.
</li>
<li>
<b>LINE_EXP2IMP_2D</b> converts an explicit line to implicit form in 2D.
</li>
<li>
<b>LINE_EXP2PAR_2D</b> converts a line from explicit to parametric form in 2D.
</li>
<li>
<b>LINE_EXP2PAR_3D</b> converts an explicit line into parametric form in 3D.
</li>
<li>
<b>LINE_IMP_IS_DEGENERATE_2D</b> finds if an implicit point is degenerate in 2D.
</li>
<li>
<b>LINE_IMP_POINT_DIST_2D:</b> distance ( implicit line, point ) in 2D.
</li>
<li>
<b>LINE_IMP_POINT_DIST_SIGNED_2D:</b> signed distance ( implicit line, point ) in 2D.
</li>
<li>
<b>LINE_IMP2EXP_2D</b> converts an implicit line to explicit form in 2D.
</li>
<li>
<b>LINE_IMP2PAR_2D</b> converts an implicit line to parametric form in 2D.
</li>
<li>
<b>LINE_PAR_POINT_DIST_2D:</b> distance ( parametric line, point ) in 2D.
</li>
<li>
<b>LINE_PAR_POINT_DIST_3D:</b> distance ( parametric line, point ) in 3D.
</li>
<li>
<b>LINE_PAR_POINT_NEAR_2D:</b> nearest point on parametric line to point in 2D.
</li>
<li>
<b>LINE_PAR_POINT_DIST_3D:</b> distance ( parametric line, point ) in 3D.
</li>
<li>
<b>LINE_PAR2EXP_2D</b> converts a parametric line to explicit form in 2D.
</li>
<li>
<b>LINE_PAR2EXP_2D</b> converts a parametric line to explicit form in 3D.
</li>
<li>
<b>LINE_PAR2IMP_2D</b> converts a parametric line to implicit form in 2D.
</li>
<li>
<b>LINES_EXP_ANGLE_3D</b> finds the angle between two explicit lines in 3D.
</li>
<li>
<b>LINES_EXP_ANGLE_ND</b> returns the angle between two explicit lines in ND.
</li>
<li>
<b>LINES_EXP_DIST_3D</b> computes the distance between two explicit lines in 3D.
</li>
<li>
<b>LINES_EXP_DIST_3D_2</b> computes the distance between two explicit lines in 3D.
</li>
<li>
<b>LINES_EXP_EQUAL_2D</b> determines if two explicit lines are equal in 2D.
</li>
<li>
<b>LINES_EXP_INT_2D</b> determines where two explicit lines intersect in 2D.
</li>
<li>
<b>LINES_EXP_NEAR_3D</b> computes nearest points on two explicit lines in 3D.
</li>
<li>
<b>LINES_EXP_PARALLEL_2D</b> determines if two lines are parallel in 2D.
</li>
<li>
<b>LINES_EXP_PARALLEL_3D</b> determines if two lines are parallel in 3D.
</li>
<li>
<b>LINES_IMP_ANGLE_2D</b> finds the angle between two implicit lines in 2D.
</li>
<li>
<b>LINES_IMP_DIST_2D</b> determines the distance between two implicit lines in 2D.
</li>
<li>
<b>LINES_IMP_INT_2D</b> determines where two implicit lines intersect in 2D.
</li>
<li>
<b>LINES_PAR_ANGLE_2D</b> finds the angle between two parametric lines in 2D.
</li>
<li>
<b>LINES_PAR_ANGLE_3D</b> finds the angle between two parametric lines in 3D.
</li>
<li>
<b>LINES_PAR_DIST_3D</b> finds the distance between two parametric lines in 3D.
</li>
<li>
<b>LINES_PAR_INT_2D</b> determines where two parametric lines intersect in 2D.
</li>
<li>
<b>LOC2GLOB_3D</b> converts from a local to global coordinate system in 3D.
</li>
<li>
<b>LVEC_PRINT</b> prints a logical vector.
</li>
<li>
<b>MINABS</b> finds a local minimum of F(X) = A * abs ( X ) + B.
</li>
<li>
<b>MINQUAD</b> finds a local minimum of F(X) = A * X^2 + B * X + C.
</li>
<li>
<b>OCTAHEDRON_SHAPE_3D</b> describes an octahedron in 3D.
</li>
<li>
<b>OCTAHEDRON_SIZE_3D</b> returns size information for an octahedron in 3D.
</li>
<li>
<b>PARABOLA_EX</b> finds the extremal point of a parabola determined by three points.
</li>
<li>
<b>PARABOLA_EX2</b> finds the extremal point of a parabola determined by three points.
</li>
<li>
<b>PARALLELOGRAM_AREA_2D</b> computes the area of a parallelogram in 2D.
</li>
<li>
<b>PARALLELOGRAM_AREA_3D</b> computes the area of a parallelogram in 3D.
</li>
<li>