24 October 2012 08:05:31 AM GEOMPACK_PRB C++ version Test the GEOMPACK library. TEST005 DIAEDG determines whether two triangles with a common edge need to "swap" diagonals. If swapping is indicated, then ALPHA_MIN should increase. Swap ALPHA_MIN ALPHA_MIN Unswapped Swapped 1 0.163708 0.196797 1 0.144478 0.388063 1 0.0188105 0.0215744 0 0.445858 0.163747 0 0.197433 0.144315 1 0.0810479 0.0844697 1 0.183341 0.396497 1 0.116407 0.267163 0 0.367144 0.228072 1 0.00199687 0.0746785 TEST01 POINTS_DELAUNAY_NAIVE_2D computes the Delaunay triangulation of a set of points. The points: Row: 0 1 Col 0: 7 3 1: 4 7 2: 5 13 3: 2 7 4: 6 9 5: 12 10 6: 3 4 7: 6 6 8: 3 10 9: 8 7 10: 5 13 11: 10 6 Number of triangles is NTRI = 15 The Delaunay triangles: Row: 0 1 2 Col 0: 0 6 7 1: 0 7 9 2: 0 9 11 3: 1 3 8 4: 1 4 7 5: 1 6 3 6: 1 7 6 7: 1 8 4 8: 2 4 8 9: 2 5 4 10: 4 5 9 11: 4 8 10 12: 4 9 7 13: 4 10 5 14: 5 11 9 TEST02 D2VEC_PART_QUICK_A reorders a D2 vector as part of a quick sort. Using initial random number seed = 123456789 Before rearrangment: Row: 0 1 Col 0: 2.18418 9.56318 1: 8.29509 5.61695 2: 4.15307 0.661187 3: 2.57578 1.09957 4: 0.43829 6.33966 5: 0.617272 4.49539 6: 4.01306 7.54673 7: 7.97287 0.0183837 8: 8.97504 3.50752 9: 0.945448 0.136169 10: 8.59097 8.40847 11: 1.23104 0.0751236 Rearranged array Left index = 4 Key index = 5 Right index = 6 Left half: Row: 0 1 Col 0: 1.23104 0.0751236 1: 0.945448 0.136169 2: 0.617272 4.49539 3: 0.43829 6.33966 Key: Row: 0 1 Col 0: 2.18418 9.56318 Right half: Row: 0 1 Col 0: 4.01306 7.54673 1: 7.97287 0.0183837 2: 8.97504 3.50752 3: 2.57578 1.09957 4: 8.59097 8.40847 5: 4.15307 0.661187 6: 8.29509 5.61695 TEST03 R82VEC_SORT_QUICK_A sorts a D2 vector as part of a quick sort. Using initial random number seed = 123456789 Before sorting: Row: 0 1 Col 0: 2.18418 9.56318 1: 8.29509 5.61695 2: 0.43829 0.661187 3: 1.23104 1.09957 4: 0.43829 6.33966 5: 0.617272 4.49539 6: 8.59097 8.40847 7: 7.97287 0.0183837 8: 8.97504 3.50752 9: 0.945448 0.136169 10: 8.59097 8.40847 11: 1.23104 0.0751236 Sorted array: Row: 0 1 Col 0: 0.43829 0.661187 1: 0.43829 6.33966 2: 0.617272 4.49539 3: 0.945448 0.136169 4: 1.23104 0.0751236 5: 1.23104 1.09957 6: 2.18418 9.56318 7: 7.97287 0.0183837 8: 8.29509 5.61695 9: 8.59097 8.40847 10: 8.59097 8.40847 11: 8.97504 3.50752 TEST05 R8TRIS2 computes the Delaunay triangulation of a pointset in 2D. R8TRIS2 computed the Delaunay triangulation with no errors detected. TRIANGULATION_PRINT Information defining a triangulation. The number of points is 9 Point coordinates Row: 0 1 Col 0: 0 0 1: 0 1 2: 0.2 0.5 3: 0.3 0.6 4: 0.4 0.5 5: 0.6 0.4 6: 0.6 0.5 7: 1 0 8: 1 1 The number of triangles is 12 Sets of three points are used as vertices of the triangles. For each triangle, the points are listed in counterclockwise order. Triangle nodes Row: 0 1 2 Col 0: 2 1 3 1: 3 1 5 2: 2 3 4 3: 4 3 5 4: 6 7 5 5: 5 1 6 6: 7 4 5 7: 9 4 7 8: 6 1 8 9: 7 6 8 10: 7 8 9 11: 2 4 9 On each side of a given triangle, there is either another triangle, or a piece of the convex hull. For each triangle, we list the indices of the three neighbors, or (if negative) the codes of the segments of the convex hull. Triangle neighbors Row: 0 1 2 Col 0: -28 2 3 1: 1 6 4 2: 1 4 12 3: 3 2 7 4: 10 7 6 5: 2 9 5 6: 8 4 5 7: 12 7 11 8: 6 -34 10 9: 5 9 11 10: 10 -38 8 11: 3 8 -3 The number of boundary points is 4 The segments that make up the convex hull can be determined from the negative entries of the triangle neighbor list. # Tri Side N1 N2 1 9 2 1 8 2 11 2 8 9 3 12 3 9 2 4 1 1 2 1 TEST06 For a triangle in 2D: TRIANGLE_CIRCUMCENTER_2D computes the circumcenter. The triangle Row: 0 1 Col 0: 0 0 1: 1 0 2: 0 1 Circumcenter 1 0.5 2 -0.5 The triangle Row: 0 1 Col 0: 0 0 1: 1 0 2: 0.5 0.866025 Circumcenter 1 0.5 2 -0.288675 The triangle Row: 0 1 Col 0: 0 0 1: 1 0 2: 0.5 10 Circumcenter 1 0.5 2 -4.9875 The triangle Row: 0 1 Col 0: 0 0 1: 1 0 2: 10 2 Circumcenter 1 0.5 2 -23.5 TEST07 TRIANGULATION_PLOT_EPS can plot a triangulation. TRIANGULATION_PLOT_EPS has created an Encapsulated PostScript file (EPS) containing an image of the triangulation. This file is called triangulation_plot.eps TEST08 TRIANGULATION_PRINT prints out a triangulation. TRIANGULATION_PRINT Information defining a triangulation. The number of points is 9 Point coordinates Row: 0 1 Col 0: 0 0 1: 0 1 2: 0.2 0.5 3: 0.3 0.6 4: 0.4 0.5 5: 0.6 0.4 6: 0.6 0.5 7: 1 0 8: 1 1 The number of triangles is 12 Sets of three points are used as vertices of the triangles. For each triangle, the points are listed in counterclockwise order. Triangle nodes Row: 0 1 2 Col 0: 2 1 3 1: 3 1 6 2: 2 3 4 3: 4 3 5 4: 7 4 5 5: 5 3 6 6: 7 5 6 7: 9 4 7 8: 6 1 8 9: 7 6 8 10: 7 8 9 11: 2 4 9 On each side of a given triangle, there is either another triangle, or a piece of the convex hull. For each triangle, we list the indices of the three neighbors, or (if negative) the codes of the segments of the convex hull. Triangle neighbors Row: 0 1 2 Col 0: -28 2 3 1: 1 9 6 2: 1 4 12 3: 3 6 5 4: 8 4 7 5: 4 2 7 6: 5 6 10 7: 12 5 11 8: 2 -34 10 9: 7 9 11 10: 10 -38 8 11: 3 8 -3 The number of boundary points is 4 The segments that make up the convex hull can be determined from the negative entries of the triangle neighbor list. # Tri Side N1 N2 1 9 2 1 8 2 11 2 8 9 3 12 3 9 2 4 1 1 2 1 GEOMPACK_PRB Normal end of execution. 24 October 2012 08:05:31 AM