06 August 2023 10:51:45 PM geompack_test(): C version Test GEOMPACK(). 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.000000 3.000000 1: 4.000000 7.000000 2: 5.000000 13.000000 3: 2.000000 7.000000 4: 6.000000 9.000000 5: 12.000000 10.000000 6: 3.000000 4.000000 7: 6.000000 6.000000 8: 3.000000 10.000000 9: 8.000000 7.000000 10: 5.000000 13.000000 11: 10.000000 6.000000 Number of triangles is NTRI = 15 The Delaunay triangles: Row: 0 1 2 Col 0: 1 7 8 1: 1 8 10 2: 1 10 12 3: 2 4 9 4: 2 5 8 5: 2 7 4 6: 2 8 7 7: 2 9 5 8: 3 5 9 9: 3 6 5 10: 5 6 10 11: 5 9 11 12: 5 10 8 13: 5 11 6 14: 6 12 10 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.184183 9.563176 1: 8.295092 5.616954 2: 4.153071 0.661187 3: 2.575778 1.099568 4: 0.438290 6.339657 5: 0.617272 4.495390 6: 4.013063 7.546735 7: 7.972870 0.018384 8: 8.975041 3.507523 9: 0.945448 0.136169 10: 8.590969 8.408475 11: 1.231039 0.075124 Rearranged array Left index = 4 Key index = 5 Right index = 6 Left half: Row: 0 1 Col 0: 1.231039 0.075124 1: 0.945448 0.136169 2: 0.617272 4.495390 3: 0.438290 6.339657 Key: Row: 0 1 Col 0: 2.184183 9.563176 Right half: Row: 0 1 Col 0: 4.013063 7.546735 1: 7.972870 0.018384 2: 8.975041 3.507523 3: 2.575778 1.099568 4: 8.590969 8.408475 5: 4.153071 0.661187 6: 8.295092 5.616954 TEST03 R82VEC_SORT_QUICK_A sorts a vector as part of a quick sort. Using initial random number seed = 123456789 Before sorting: Row: 0 1 Col 0: 2.184183 9.563176 1: 8.295092 5.616954 2: 0.438290 0.661187 3: 1.231039 1.099568 4: 0.438290 6.339657 5: 0.617272 4.495390 6: 8.590969 8.408475 7: 7.972870 0.018384 8: 8.975041 3.507523 9: 0.945448 0.136169 10: 8.590969 8.408475 11: 1.231039 0.075124 Sorted array: Row: 0 1 Col 0: 0.438290 0.661187 1: 0.438290 6.339657 2: 0.617272 4.495390 3: 0.945448 0.136169 4: 1.231039 0.075124 5: 1.231039 1.099568 6: 2.184183 9.563176 7: 7.972870 0.018384 8: 8.295092 5.616954 9: 8.590969 8.408475 10: 8.590969 8.408475 11: 8.975041 3.507523 TEST05 R8TRIS2 computes the Delaunay triangulation of a pointset in 2D. R8TRIS2 computed the Delaunay triangulation with no errors detected. TRIANGULATION_ORDER3_PRINT Information defining a triangulation. The number of nodes is 9 Node coordinates Row: 0 1 Col 0: 0.000000 0.000000 1: 0.000000 1.000000 2: 0.200000 0.500000 3: 0.300000 0.600000 4: 0.400000 0.500000 5: 0.600000 0.400000 6: 0.600000 0.500000 7: 1.000000 0.000000 8: 1.000000 1.000000 The number of triangles is 12 Sets of three nodes are used as vertices of the triangles. For each triangle, the nodes are listed in counterclockwise order. Triangle nodes Row: 0 1 2 Col 0: 1 0 2 1: 2 0 4 2: 1 2 3 3: 3 2 4 4: 5 6 4 5: 4 0 5 6: 6 3 4 7: 8 3 6 8: 5 0 7 9: 6 5 7 10: 6 7 8 11: 1 3 8 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 0 7 2 11 2 7 8 3 12 3 8 1 4 1 1 1 0 TEST06 For a triangle in 2D: TRIANGLE_CIRCUMCENTER_2D computes the circumcenter. The triangle Row: 0 1 Col 0: 0.000000 0.000000 1: 1.000000 0.000000 2: 0.000000 1.000000 Circumcenter 0: 0.500000 1: 0.500000 The triangle Row: 0 1 Col 0: 0.000000 0.000000 1: 1.000000 0.000000 2: 0.500000 0.866025 Circumcenter 0: 0.500000 1: 0.288675 The triangle Row: 0 1 Col 0: 0.000000 0.000000 1: 1.000000 0.000000 2: 0.500000 10.000000 Circumcenter 0: 0.500000 1: 4.987500 The triangle Row: 0 1 Col 0: 0.000000 0.000000 1: 1.000000 0.000000 2: 10.000000 2.000000 Circumcenter 0: 0.500000 1: 23.500000 TEST07 TRIANGULATION_ORDER3_PLOT can plot a triangulation. TRIANGULATION_ORDER3_PLOT has created an Encapsulated PostScript file (EPS) containing an image of the triangulation. This file is called "triangulation_plot.eps". TEST08 TRIANGULATION_ORDER3_PRINT prints out a triangulation. TRIANGULATION_ORDER3_PRINT Information defining a triangulation. The number of nodes is 9 Node coordinates Row: 0 1 Col 0: 0.000000 0.000000 1: 0.000000 1.000000 2: 0.200000 0.500000 3: 0.300000 0.600000 4: 0.400000 0.500000 5: 0.600000 0.400000 6: 0.600000 0.500000 7: 1.000000 0.000000 8: 1.000000 1.000000 The number of triangles is 12 Sets of three nodes are used as vertices of the triangles. For each triangle, the nodes 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_test(): Normal end of execution. 06 August 2023 10:51:45 PM