10-May-2023 11:31:05 sphere_delaunay_test(): MATLAB/Octave version 5.2.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.653092 0.0491937 -0.755679 2: 0.977313 0.129547 -0.167562 3: 0.127707 -0.270014 -0.95435 4: -0.77964 0.626021 -0.0161145 5: 0.897317 -0.0751336 0.434945 6: 0.559389 0.722773 -0.405812 7: 0.346191 -0.790582 0.505107 8: -0.0294137 0.99948 0.0131944 9: 0.549184 0.798582 0.246301 10: -0.186515 -0.290367 0.938562 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 3 7 2: 1 4 8 3: 1 6 3 4: 1 7 10 5: 1 8 6 6: 1 10 4 7: 2 3 6 8: 2 5 7 9: 2 6 9 10: 2 7 3 11: 2 9 5 12: 4 10 8 13: 5 9 10 14: 5 10 7 15: 6 8 9 16: 8 10 9 Triangle neighbors Row: 1 2 3 Col 1: 10 4 3 2: 12 5 6 3: 7 1 5 4: 14 6 1 5: 15 3 2 6: 12 2 4 7: 3 9 10 8: 14 10 11 9: 15 11 7 10: 1 7 8 11: 13 8 9 12: 16 2 6 13: 16 14 11 14: 4 8 13 15: 16 9 5 16: 13 15 12 Spherical area of triangles 1: 1.29205 2: 0.48563 3: 0.745877 4: 1.91594 5: 0.775975 6: 1.18299 7: 0.592403 8: 0.293122 9: 0.279971 10: 1.32778 11: 0.325887 12: 0.997817 13: 0.855065 14: 0.480661 15: 0.228078 16: 0.787131 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.668652 -0.658364 -0.345631 2: -0.14875 0.191743 -0.970107 3: 0.9523 -0.302355 -0.0412946 4: -0.676943 0.295643 0.67405 5: 0.324529 0.899196 -0.293474 6: 0.576773 -0.703477 0.415275 7: -0.402588 -0.791752 0.459404 8: 0.526628 0.140439 0.838415 9: 0.42587 0.604206 -0.673476 10: -0.964935 -0.257751 -0.0496505 11: 0.9258 -0.332499 0.17983 12: 0.400094 0.859931 0.316928 13: -0.875502 0.183118 -0.447174 14: -0.876258 -0.167028 0.451966 15: 0.54551 0.524155 0.653972 16: -0.760937 -0.559592 0.328377 17: -0.278959 0.123431 -0.952338 18: -0.146562 -0.664259 0.732994 19: -0.562737 0.196085 -0.803042 20: -0.241499 0.915542 0.321655 21: -0.382936 0.676189 0.629387 22: 0.19097 -0.346807 0.918289 23: -0.19381 0.920747 -0.338619 24: 0.771595 0.00409918 -0.636101 25: -0.598804 0.120464 0.791784 26: -0.388584 0.756808 -0.525589 27: 0.779483 0.0648482 -0.623057 28: -0.199504 0.975753 0.0900252 29: 0.152184 0.98811 -0.0218598 30: 0.125593 0.335938 0.933473 31: 0.454151 0.82105 -0.345865 32: 0.164813 -0.567191 -0.806927 33: -0.10341 0.990465 0.0910271 34: -0.136458 -0.943583 0.301711 35: -0.486878 -0.308322 0.817244 36: -0.719012 -0.687391 0.102542 37: 0.322298 -0.228498 -0.918647 38: -0.296951 0.648193 0.701189 39: -0.876888 0.442384 0.188053 40: 0.734216 0.433443 0.522545 41: -0.0553966 -0.799254 -0.598434 42: 0.00120052 -0.257071 0.966392 43: 0.434491 0.87085 -0.229865 44: -0.462153 -0.293938 -0.836669 45: 0.498094 0.357695 0.789909 46: -0.882688 0.275696 0.380597 47: 0.632904 0.642534 0.431952 48: -0.4623 -0.862819 -0.204502 49: 0.89934 -0.0562395 0.433619 50: 0.752662 0.617041 -0.229696 51: -0.247567 -0.949171 -0.194384 52: 0.636693 -0.768297 -0.0658938 53: -0.184514 -0.787612 -0.587896 54: 0.700196 0.693525 -0.169552 55: -0.142937 -0.918532 0.368603 56: -0.766979 0.640612 0.0368743 57: 0.589658 0.78975 0.169111 58: 0.306667 0.928202 -0.210704 59: -0.960631 -0.268354 0.0719297 60: -0.524987 0.842434 0.121219 61: -0.924445 0.26335 0.275768 62: -0.576022 0.447857 -0.683829 63: -0.0410764 0.7308 0.681355 64: -0.267851 -0.838292 -0.474893 65: 0.795981 0.0506522 0.603199 66: 0.528914 -0.847944 0.035213 67: 0.416493 0.909053 -0.0125344 68: 0.369569 0.921854 -0.116637 69: 0.745361 -0.658066 -0.106707 70: 0.375907 -0.596815 -0.708876 71: -0.586532 0.535205 -0.607894 72: -0.219719 0.295273 -0.929805 73: 0.206395 -0.0391702 -0.977684 74: -0.228675 -0.48438 0.844443 75: -0.78193 -0.547035 -0.298894 76: 0.692634 -0.246659 0.677803 77: -0.805384 0.483135 0.343419 78: -0.27129 0.962348 -0.0169681 79: 0.831296 0.433592 -0.347772 80: 0.671437 -0.636213 -0.380008 81: -0.256592 -0.533684 -0.805818 82: -0.321158 0.605245 0.728379 83: -0.945184 0.184266 0.26958 84: -0.946985 0.132862 0.292517 85: 0.0543127 -0.37039 -0.927287 86: 0.0588755 0.569572 0.81983 87: -0.0156156 -0.999013 -0.0415768 88: -0.921537 -0.299438 -0.247196 89: -0.165773 -0.706568 0.687954 90: 0.147356 -0.17321 0.973799 91: -0.754141 -0.394843 0.524758 92: 0.677665 -0.567957 -0.467114 93: 0.17808 0.797299 0.576717 94: 0.00733616 -0.241746 0.970312 95: -0.225177 -0.103284 0.968828 96: -0.983039 -0.180201 0.0340819 97: -0.960902 -0.184329 -0.206615 98: 0.737331 -0.300674 0.604928 99: -0.200396 0.642698 0.739446 100: -0.764002 -0.388979 0.514778 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. 10-May-2023 11:31:08