10 November 2006 01:37:55 PM GEOMPACK_PRB A set of test programs for the C++ version of GEOMPACK. TEST01 POINTS_DELAUNAY_NAIVE_2D computes the Delaunay triangulation of a set of points. The points: Row: 1 2 Col 1 7 3 2 4 7 3 5 13 4 2 7 5 6 9 6 12 10 7 3 4 8 6 6 9 3 10 10 8 7 11 5 13 12 10 6 Number of triangles is NTRI = 15 The Delaunay triangles: Row: 1 2 3 Col 1 0 6 7 2 0 7 9 3 0 9 11 4 1 3 8 5 1 4 7 6 1 6 3 7 1 7 6 8 1 8 4 9 2 4 8 10 2 5 4 11 4 5 9 12 4 8 10 13 4 9 7 14 4 10 5 15 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: 1 2 Col 1 2.18418 9.56318 2 8.29509 5.61695 3 4.15307 0.661187 4 2.57578 1.09957 5 0.43829 6.33966 6 0.617272 4.49539 7 4.01306 7.54673 8 7.97287 0.0183837 9 8.97504 3.50752 10 0.945448 0.136169 11 8.59097 8.40847 12 1.23104 0.0751236 Rearranged array Left index = 4 Key index = 5 Right index = 6 Left half: Row: 1 2 Col 1 1.23104 0.0751236 2 0.945448 0.136169 3 0.617272 4.49539 4 0.43829 6.33966 Key: Row: 1 2 Col 1 2.18418 9.56318 Right half: Row: 1 2 Col 1 4.01306 7.54673 2 7.97287 0.0183837 3 8.97504 3.50752 4 2.57578 1.09957 5 8.59097 8.40847 6 4.15307 0.661187 7 8.29509 5.61695 TEST03 D2VEC_SORT_QUICK_A sorts a D2 vector as part of a quick sort. Using initial random number seed = 123456789 Before sorting: Row: 1 2 Col 1 2.18418 9.56318 2 8.29509 5.61695 3 0.43829 0.661187 4 1.23104 1.09957 5 0.43829 6.33966 6 0.617272 4.49539 7 8.59097 8.40847 8 7.97287 0.0183837 9 8.97504 3.50752 10 0.945448 0.136169 11 8.59097 8.40847 12 1.23104 0.0751236 Sorted array: Row: 1 2 Col 1 0.43829 0.661187 2 0.43829 6.33966 3 0.617272 4.49539 4 0.945448 0.136169 5 1.23104 0.0751236 6 1.23104 1.09957 7 2.18418 9.56318 8 7.97287 0.0183837 9 8.29509 5.61695 10 8.59097 8.40847 11 8.59097 8.40847 12 8.97504 3.50752 TEST05 DTRIS2 computes the Delaunay triangulation of a pointset in 2D. DTRIS2 computed the Delaunay triangulation with no errors detected. TRIANGULATION_PRINT Information defining a triangulation. The number of points is 9 Point coordinates Row: 1 2 Col 1 0 0 2 0 1 3 0.2 0.5 4 0.3 0.6 5 0.4 0.5 6 0.6 0.4 7 0.6 0.5 8 1 0 9 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: 1 2 3 Col 1 2 1 3 2 3 1 5 3 2 3 4 4 4 3 5 5 6 7 5 6 5 1 6 7 7 4 5 8 9 4 7 9 6 1 8 10 7 6 8 11 7 8 9 12 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: 1 2 3 Col 1 -28 2 3 2 1 6 4 3 1 4 12 4 3 2 7 5 10 7 6 6 2 9 5 7 8 4 5 8 12 7 11 9 6 -34 10 10 5 9 11 11 10 -38 8 12 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: 1 2 Col 1 0 0 2 1 0 3 0 1 Circumcenter 1 0.5 2 -0.5 The triangle Row: 1 2 Col 1 0 0 2 1 0 3 0.5 0.866025 Circumcenter 1 0.5 2 -0.288675 The triangle Row: 1 2 Col 1 0 0 2 1 0 3 0.5 10 Circumcenter 1 0.5 2 -4.9875 The triangle Row: 1 2 Col 1 0 0 2 1 0 3 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: 1 2 Col 1 0 0 2 0 1 3 0.2 0.5 4 0.3 0.6 5 0.4 0.5 6 0.6 0.4 7 0.6 0.5 8 1 0 9 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: 1 2 3 Col 1 2 1 3 2 3 1 6 3 2 3 4 4 4 3 5 5 7 4 5 6 5 3 6 7 7 5 6 8 9 4 7 9 6 1 8 10 7 6 8 11 7 8 9 12 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: 1 2 3 Col 1 -28 2 3 2 1 9 6 3 1 4 12 4 3 6 5 5 8 4 7 6 4 2 7 7 5 6 10 8 12 5 11 9 2 -34 10 10 7 9 11 11 10 -38 8 12 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. 10 November 2006 01:37:55 PM