07-Aug-2023 08:50:47 geompack_test(): MATLAB 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.018811 0.021574 0 0.445858 0.163747 0 0.197433 0.144315 1 0.081048 0.084470 1 0.183341 0.396497 1 0.116407 0.267163 0 0.367144 0.228072 1 0.001997 0.074678 TEST01 POINTS_DELAUNAY_NAIVE_2D computes the Delaunay triangulation of a set of points. The points: Row: 1 2 Col 1 7.000000 3.000000 2 4.000000 7.000000 3 5.000000 13.000000 4 2.000000 7.000000 5 6.000000 9.000000 6 12.000000 8.000000 7 3.000000 4.000000 8 6.000000 6.000000 9 3.000000 10.000000 10 8.000000 7.000000 11 5.000000 13.000000 12 10.000000 6.000000 The Delaunay triangles: Row: 1 2 3 Col 1 1 7 8 2 1 8 10 3 1 10 12 4 2 4 9 5 2 5 8 6 2 7 4 7 2 8 7 8 2 9 5 9 3 5 9 10 3 6 5 11 5 6 10 12 5 9 11 13 5 10 8 14 5 11 6 15 6 12 10 TEST02 R82VEC_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.184183 9.563176 2 8.295092 5.616954 3 4.153071 0.661187 4 2.575778 1.099568 5 0.438290 6.339657 6 0.617272 4.495390 7 4.013063 7.546735 8 7.972870 0.018384 9 8.975041 3.507523 10 0.945448 0.136169 11 8.590969 8.408475 12 1.231039 0.075124 Rearranged array Left index = 4 Key index = 5 Right index = 6 Left half: Row: 1 2 Col 1 1.231039 0.075124 2 0.945448 0.136169 3 0.617272 4.495390 4 0.438290 6.339657 Key: Row: 1 2 Col 1 2.184183 9.563176 Right half: Row: 1 2 Col 1 4.013063 7.546735 2 7.972870 0.018384 3 8.975041 3.507523 4 2.575778 1.099568 5 8.590969 8.408475 6 4.153071 0.661187 7 8.295092 5.616954 TEST03 R82VEC_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.184183 9.563176 2 8.295092 5.616954 3 0.438290 0.661187 4 1.231039 1.099568 5 0.438290 6.339657 6 0.617272 4.495390 7 8.590969 8.408475 8 7.972870 0.018384 9 8.975041 3.507523 10 0.945448 0.136169 11 8.590969 8.408475 12 1.231039 0.075124 Sorted array: Row: 1 2 Col 1 0.438290 0.661187 2 0.438290 6.339657 3 0.617272 4.495390 4 0.945448 0.136169 5 1.231039 0.075124 6 1.231039 1.099568 7 2.184183 9.563176 8 7.972870 0.018384 9 8.295092 5.616954 10 8.590969 8.408475 11 8.590969 8.408475 12 8.975041 3.507523 TEST05 R8TRIS2 computes the Delaunay triangulation of a pointset in 2D. ierror = 1 ierror = 1 ierror = 1 ierror = 1 ierror = 1 ierror = 1 ierror = 1 ierror = 1 ierror = 1 TRIANGULATION_PRINT Information defining a triangulation. The number of points is 9 Point coordinates Row: 1 2 Col 1 0.000000 0.000000 2 0.000000 1.000000 3 0.200000 0.500000 4 0.300000 0.600000 5 0.400000 0.500000 6 0.600000 0.400000 7 0.600000 0.500000 8 1.000000 0.000000 9 1.000000 1.000000 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 vertices: Row: 1 2 Col 1 0.000000 0.000000 2 1.000000 0.000000 3 0.000000 1.000000 The circumcenter 1 0.500000 2 -0.500000 The triangle vertices: Row: 1 2 Col 1 0.000000 0.000000 2 1.000000 0.000000 3 0.500000 0.866025 The circumcenter 1 0.500000 2 -0.288675 The triangle vertices: Row: 1 2 Col 1 0.000000 0.000000 2 1.000000 0.000000 3 0.500000 10.000000 The circumcenter 1 0.500000 2 -4.987500 The triangle vertices: Row: 1 2 Col 1 0.000000 0.000000 2 1.000000 0.000000 3 10.000000 2.000000 The circumcenter 1 0.500000 2 -23.500000 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.000000 0.000000 2 0.000000 1.000000 3 0.200000 0.500000 4 0.300000 0.600000 5 0.400000 0.500000 6 0.600000 0.400000 7 0.600000 0.500000 8 1.000000 0.000000 9 1.000000 1.000000 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_test(): Normal end of execution. 07-Aug-2023 08:50:47