16-May-2025 05:16:21 sphere_delaunay_test(): MATLAB/Octave version 6.4.0 Test sphere_delaunay(). sphere_delaunay_test01(): Choose random points on the unit sphere. sphere_delaunay() computes the Delaunay triangulation. triangulation_neighbor_triangles() gets triangle neighbors. stri_vertices_to_areas() gets triangle areas. Data points: Row: 1 2 3 Col 1: -0.176564 -0.0211549 0.984062 2: -0.777321 -0.549899 0.305585 3: 0.567715 -0.654949 0.498741 4: 0.95217 0.285309 -0.109415 5: -0.968234 0.0638413 0.241759 6: 0.542216 -0.347479 -0.765023 7: -0.96164 0.119394 0.24697 8: 0.272194 0.202507 0.940692 9: 0.0877945 -0.0894437 0.992115 10: 0.419096 -0.901583 0.107269 Check Euler's formula on a sphere: Faces = 16 Vertices = 10 Edges = 24 F+V-E-2 = 0 Delaunay triangles Row: 1 2 3 Col 1: 1 2 9 2: 1 5 2 3: 1 7 5 4: 1 8 7 5: 1 9 8 6: 2 3 9 7: 2 5 6 8: 2 6 10 9: 2 10 3 10: 3 4 8 11: 3 8 9 12: 3 10 4 13: 4 6 7 14: 4 7 8 15: 4 10 6 16: 5 7 6 Triangle neighbors Row: 1 2 3 Col 1: 6 5 2 2: 7 1 3 3: 16 2 4 4: 14 3 5 5: 11 4 1 6: 11 1 9 7: 16 8 2 8: 15 9 7 9: 12 6 8 10: 14 11 12 11: 5 6 10 12: 15 10 9 13: 16 14 15 14: 4 10 13 15: 8 13 12 16: 13 7 3 Spherical area of triangles 1: 0.141099 2: 0.404857 3: 0.0363372 4: 0.223064 5: 0.0465161 6: 0.738617 7: 1.18391 8: 1.01864 9: 0.41056 10: 0.783995 11: 0.173362 12: 0.367475 13: 4.45789 14: 1.75552 15: 0.700052 16: 0.124484 Area sum = 12.566371 4 * PI = 12.566371 sphere_delaunay_test02() Choose random points on the unit sphere. sphere_delaunay() computes the Delaunay triangulation. Display an image of the Delaunay triangulation. Data points: Row: 1 2 3 Col 1: -0.754046 -0.521809 -0.39891 2: -0.515781 0.786696 -0.339234 3: 0.845575 -0.532327 -0.0403799 4: 0.344367 0.350967 0.870766 5: 0.961113 0.0159708 -0.275695 6: 0.509615 0.114073 -0.852807 7: -0.599506 0.290361 0.745844 8: 0.336991 0.526694 -0.780404 9: 0.639935 0.0780834 0.764451 10: 0.629689 -0.591684 0.50339 11: -0.0876484 -0.839968 0.53551 12: -0.81366 -0.17912 0.553059 13: 0.0679723 0.483425 0.872743 14: 0.393157 0.27875 -0.8762 15: -0.904056 0.343812 -0.25392 16: 0.56053 -0.787985 0.254726 17: -0.690392 -0.341224 -0.637907 18: 0.163235 0.985791 -0.0396343 19: -0.567692 -0.470045 0.675858 20: 0.528719 0.770721 0.355592 21: -0.633515 -0.736787 -0.23623 22: 0.994643 -0.0389586 0.0957509 23: 0.972314 -0.210078 0.102341 24: 0.405997 -0.64923 0.643169 25: -0.261214 0.898824 -0.351971 26: 0.394598 0.873565 0.284916 27: 0.318061 -0.475224 -0.820366 28: -0.68501 0.681898 -0.256468 29: -0.473079 0.78652 -0.396966 30: -0.782258 0.484964 0.391001 31: 0.233323 0.906838 0.351007 32: -0.115918 -0.965839 -0.231774 33: -0.728914-0.000174703 0.684605 34: -0.841918 0.447195 0.301977 35: -0.436617 -0.721626 0.537235 36: -0.573816 -0.403149 -0.712885 37: -0.727858 -0.148079 0.669549 38: -0.319307 -0.942477 -0.0988991 39: -0.0435841 -0.929944 -0.365109 40: 0.275384 -0.958235 -0.0771327 41: -0.991898 -0.126347 -0.0132027 42: -0.929199 -0.102498 0.355082 43: -0.422286 0.558323 -0.714108 44: 0.322399 -0.804348 -0.499082 45: 0.322677 -0.52783 -0.785669 46: -0.164585 0.665149 0.728347 47: -0.136458 -0.983125 0.121834 48: 0.934184 0.356101 0.0221793 49: -0.2224 -0.974419 0.0323331 50: 0.0717905 0.32708 -0.942266 51: 0.0920635 -0.549932 -0.83012 52: -0.731134 0.258468 0.631377 53: -0.3137 0.28925 -0.904393 54: 0.860866 0.186317 -0.473493 55: 0.307687 0.386473 -0.869464 56: -0.42107 -0.70818 -0.566729 57: -0.0796492 0.971363 -0.22385 58: 0.623885 -0.0773368 -0.77768 59: -0.488363 0.474273 -0.732507 60: 0.0175487 -0.985833 0.166807 61: 0.0145644 -0.899742 0.436178 62: -0.27585 0.948207 0.15751 63: -0.327981 0.854868 -0.402031 64: -0.937172 0.0301353 0.347563 65: -0.87523 0.386683 0.2906 66: 0.0638028 -0.127983 -0.989722 67: -0.7621 0.561644 -0.322117 68: -0.814836 0.161053 -0.55687 69: 0.401082 -0.816098 0.416073 70: 0.955374 -0.106193 -0.275651 71: 0.702789 -0.696446 0.145085 72: 0.822376 0.460679 -0.333875 73: -0.704065 0.47686 0.52621 74: 0.971058 0.142153 -0.191934 75: -0.354519 -0.868164 0.347286 76: 0.323243 -0.85161 -0.412643 77: 0.629218 -0.627789 -0.45822 78: 0.573295 0.100745 -0.813132 79: 0.462451 -0.835075 -0.297975 80: 0.148099 -0.947673 0.282811 81: 0.507048 0.808622 0.298385 82: -0.794974 0.569475 0.209081 83: 0.443112 0.0432625 -0.895422 84: -0.812685 -0.580071 -0.0553215 85: 0.319402 -0.540051 0.77867 86: -0.637229 0.0314447 0.770033 87: -0.979277 -0.196158 -0.0503929 88: 0.324822 -0.905797 -0.272071 89: 0.847487 0.53053 0.0174285 90: 0.578517 0.168767 0.79802 91: -0.134792 0.984193 0.114873 92: 0.785069 0.593534 0.177154 93: 0.721815 -0.560597 0.40585 94: 0.943441 -0.178448 -0.279421 95: 0.0325458 0.86472 -0.501198 96: 0.81836 0.0334833 -0.573729 97: 0.536134 -0.715028 -0.44866 98: -0.150687 0.274707 -0.949647 99: -0.270494 -0.140016 -0.952486 100: -0.666095 -0.651438 -0.363243 Figure 1: Delaunay triangulation with TRISURF Graphics saved as "test02_plot1.png". Graphics saved as "test02_plot2.png". Figure 2: Delaunay triangulation with PATCH. sphere_delaunay_test03(): sphere_gridpoints_icos2() chooses points on the unit sphere. sphere_delaunay() computes the Delaunay triangulation. Display an image of the Delaunay triangulation. Data points: Row: 1 2 3 Col 1: 0.850651 0.525731 0 2: 0.850651 -0.525731 0 3: 0.525731 0 0.850651 4: 0.525731 0 -0.850651 5: 0 0.850651 0.525731 6: 0 0.850651 -0.525731 7: 0 -0.850651 0.525731 8: 0 -0.850651 -0.525731 9: -0.525731 0 0.850651 10: -0.525731 0 -0.850651 11: -0.850651 0.525731 0 12: -0.850651 -0.525731 0 13: 1 3.33067e-16 0 14: 0.809017 0.309017 0.5 15: 0.809017 0.309017 -0.5 16: 0.5 0.809017 0.309017 17: 0.5 0.809017 -0.309017 18: 0.809017 -0.309017 0.5 19: 0.809017 -0.309017 -0.5 20: 0.5 -0.809017 0.309017 21: 0.5 -0.809017 -0.309017 22: 0.309017 0.5 0.809017 23: 0.309017 -0.5 0.809017 24: 5.55112e-17 0 1 25: 0.309017 0.5 -0.809017 26: 0.309017 -0.5 -0.809017 27: 5.55112e-17 0 -1 28: 0 1-5.55112e-17 29: -0.309017 0.5 0.809017 30: -0.5 0.809017 0.309017 31: -0.309017 0.5 -0.809017 32: -0.5 0.809017 -0.309017 33: 0 -1-5.55112e-17 34: -0.309017 -0.5 0.809017 35: -0.5 -0.809017 0.309017 36: -0.309017 -0.5 -0.809017 37: -0.5 -0.809017 -0.309017 38: -0.809017 0.309017 0.5 39: -0.809017 -0.309017 0.5 40: -0.809017 0.309017 -0.5 41: -0.809017 -0.309017 -0.5 42: -1-5.55112e-17 0 Triangles Row: 1 2 3 Col 1: 1 13 15 2: 1 14 13 3: 1 15 17 4: 1 16 14 5: 1 17 16 6: 2 13 18 7: 2 18 20 8: 2 19 13 9: 2 20 21 10: 2 21 19 11: 3 14 22 12: 3 18 14 13: 3 22 24 14: 3 23 18 15: 3 24 23 16: 4 15 19 17: 4 19 26 18: 4 25 15 19: 4 26 27 20: 4 27 25 21: 5 16 28 22: 5 22 16 23: 5 28 30 24: 5 29 22 25: 5 30 29 26: 6 17 25 27: 6 25 31 28: 6 28 17 29: 6 31 32 30: 6 32 28 31: 7 20 23 32: 7 23 34 33: 7 33 20 34: 7 34 35 35: 7 35 33 36: 8 21 33 37: 8 26 21 38: 8 33 37 39: 8 36 26 40: 8 37 36 41: 9 24 29 42: 9 29 38 43: 9 34 24 44: 9 38 39 45: 9 39 34 46: 10 27 36 47: 10 31 27 48: 10 36 41 49: 10 40 31 50: 10 41 40 51: 11 30 32 52: 11 32 40 53: 11 38 30 54: 11 40 42 55: 11 42 38 56: 12 35 39 57: 12 37 35 58: 12 39 42 59: 12 41 37 60: 12 42 41 61: 13 14 18 62: 13 19 15 63: 14 16 22 64: 15 25 17 65: 16 17 28 66: 18 23 20 67: 19 21 26 68: 20 33 21 69: 22 29 24 70: 23 24 34 71: 25 27 31 72: 26 36 27 73: 28 32 30 74: 29 30 38 75: 31 40 32 76: 33 35 37 77: 34 39 35 78: 36 37 41 79: 38 42 39 80: 40 41 42 Figure 1: Delaunay triangulation with TRISURF Graphics saved as "test03_plot1.png". Graphics saved as "test03_plot2.png". Figure 2: Delaunay triangulation with PATCH. sphere_delaunay_test(): Normal end of execution. 16-May-2025 05:16:25