17-Dec-2022 23:00:51 tetrahedron_test(): MATLAB/Octave version 4.2.2 tetrahedron() computes tetrahedron quantities. tetrahedron_barycentric_test(): tetrahedron_barycentric() converts XYZ to XSI. We are computing the XSI coordinates just to verify that the points are inside the tetrahedron. tetrahedron vertices: 1 2 1 1 4 4 6 4 3 3 3 4 (X,Y,Z) (XSI1,XSI2,XSI3,XSI4): 1.118456 4.002526 3.026692 0.853589 0.118456 0.001263 0.026692 1.127245 4.024838 3.047952 0.812384 0.127245 0.012419 0.047952 1.243398 4.015791 3.005611 0.743095 0.243398 0.007896 0.005611 1.013699 4.001569 3.002968 0.982549 0.013699 0.000785 0.002968 1.238361 4.014301 3.040871 0.713617 0.238361 0.007150 0.040871 1.037863 4.081740 3.030864 0.890404 0.037863 0.040870 0.030864 1.817036 4.006450 3.005054 0.174685 0.817036 0.003225 0.005054 1.179638 4.006105 3.000707 0.816602 0.179638 0.003052 0.000707 1.039648 4.475105 3.008637 0.714163 0.039648 0.237552 0.008637 1.634827 4.060702 3.002578 0.332244 0.634827 0.030351 0.002578 tetrahedron_centroid_test(): tetrahedron_centroid() computes the centroid of a tetrahedron; tetrahedron vertices: 0.00000 -0.81650 0.81650 0.00000 0.94281 -0.81650 -0.81650 0.00000 -0.33333 -0.33333 -0.33333 1.00000 tetrahedron centroid: 0.00000 -0.17255 0.00000 tetrahedron_circumsphere_test(): tetrahedron_circumsphere() computes the circumsphere of a tetrahedron. tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.81650 tetrahedron circumsphere center: 0.00000 0.00000 0.20412 Circumsphere radius is 0.612372 tetrahedron_contains_point_test(): tetrahedron_contains_point() finds if a point is inside a tetrahderon; tetrahedron vertices: 0.00000 -0.81650 0.81650 0.00000 0.94281 -0.81650 -0.81650 0.00000 -0.33333 -0.33333 -0.33333 1.00000 P, Inside_Tetra? 0.081650 -0.244949 0.600000 1 -1.469693 -3.021943 -0.200000 0 -0.898146 0.672598 -0.200000 0 tetrahedron_dihedral_angles_test(): tetrahedron_dihedral_angles() computes the dihedral angles of a tetrahedron. tetrahedron1 vertices: 0.00000 -0.81650 0.81650 0.00000 0.94281 -0.81650 -0.81650 0.00000 -0.33333 -0.33333 -0.33333 1.00000 Dihedral angles: 1.2815 1.2815 1.0337 1.0213 1.3744 1.3744 tetrahedron2 vertices: 0 1 0 0 0 0 1 0 0 0 0 1 Dihedral angles: 1.57080 1.57080 1.57080 0.95532 0.95532 0.95532 tetrahedron3 vertices: 0 1 0 0 0 0 2 0 0 0 0 4 Dihedral angles: 1.57080 1.57080 1.57080 1.35081 1.11916 0.50974 tetrahedron4 vertices: 0 1 0 1 0 0 1 1 0 0 0 1 Dihedral angles: 0.78540 0.78540 2.09440 2.18628 0.61548 0.61548 tetrahedron_edge_length_test(): tetrahedron_edge_length() computes the edge lengths; tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.81650 Edge lengths: 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 tetrahedron_edges_test(): tetrahedron_edges() computes the edges; tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.81650 Edges: -0.86603 0.50000 0.00000 tetrahedron_face_angles_test(): tetrahedron_face_angles() computes the 6 pairwise angles of the 4 faces of a tetrahedron. tetrahedron1 vertices: 0.00000 -0.81650 0.81650 0.00000 0.94281 -0.81650 -0.81650 0.00000 -0.33333 -0.33333 -0.33333 1.00000 Face angles: 0.86904 1.01961 1.01961 1.08952 1.13628 0.90871 0.90871 1.08952 1.13628 1.21328 1.21328 0.96255 tetrahedron2 vertices: 0 1 0 0 0 0 1 0 0 0 0 1 Face angles: 1.57080 1.57080 1.57080 1.04720 0.78540 0.78540 0.78540 1.04720 0.78540 0.78540 0.78540 1.04720 tetrahedron3 vertices: 0 1 0 0 0 0 2 0 0 0 0 4 Face angles: 1.57080 1.57080 1.57080 1.46212 1.10715 1.32582 1.10715 1.15928 0.46365 0.24498 0.46365 0.52020 tetrahedron4 vertices: 0 1 0 1 0 0 1 1 0 0 0 1 Face angles: 1.57080 0.95532 0.95532 1.04720 0.78540 1.57080 1.57080 1.04720 0.78540 0.61548 0.61548 1.04720 tetrahedron_face_areas_test(): tetrahedron_face_areas() computes the areas of the 4 faces of a tetrahedron. tetrahedron1 vertices: 0.00000 -0.81650 0.81650 0.00000 0.94281 -0.81650 -0.81650 0.00000 -0.33333 -0.33333 -0.33333 1.00000 Face areas: 1.4365 1.3491 1.3491 1.2766 tetrahedron2 vertices: 0 1 0 0 0 0 1 0 0 0 0 1 Face areas: 0.50000 0.50000 0.50000 0.86603 tetrahedron3 vertices: 0 1 0 0 0 0 2 0 0 0 0 4 Face areas: 1.0000 2.0000 4.0000 4.5826 tetrahedron4 vertices: 0 1 0 1 0 0 1 1 0 0 0 1 Face areas: 0.50000 0.70711 0.70711 0.86603 tetrahedron_insphere_test(): tetrahedron_insphere() computes the insphere of a tetrahedron. tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.81650 insphere center: -0.00000 0.00000 0.20412 Insphere radius is 0.204124 tetrahedron_lattice_layer_point_next_test(): tetrahedron_lattice_layer_point_next() returns the next point in a tetrahedron lattice layer defined by: C(4) - 1 < X(1)/C(1) + X(2)/C(2) +X(3)/C(3) <= C(4). N = 3 C = 2 3 4 Layer 0 1 0 0 0 No more. Layer 1 1 1 0 0 2 2 0 0 3 0 1 0 4 1 1 0 5 0 2 0 6 0 3 0 7 0 0 1 8 1 0 1 9 0 1 1 10 0 2 1 11 0 0 2 12 1 0 2 13 0 1 2 14 0 0 3 15 0 0 4 No more. Layer 2 1 3 0 0 2 4 0 0 3 2 1 0 4 3 1 0 5 1 2 0 6 2 2 0 7 1 3 0 8 2 3 0 9 0 4 0 10 1 4 0 11 0 5 0 12 0 6 0 13 2 0 1 14 3 0 1 15 1 1 1 16 2 1 1 17 1 2 1 18 2 2 1 19 0 3 1 20 1 3 1 21 0 4 1 22 0 5 1 23 2 0 2 24 3 0 2 25 1 1 2 26 2 1 2 27 0 2 2 28 1 2 2 29 0 3 2 30 1 3 2 31 0 4 2 32 1 0 3 33 2 0 3 34 0 1 3 35 1 1 3 36 0 2 3 37 1 2 3 38 0 3 3 39 1 0 4 40 2 0 4 41 0 1 4 42 1 1 4 43 0 2 4 44 0 3 4 45 0 0 5 46 1 0 5 47 0 1 5 48 0 2 5 49 0 0 6 50 1 0 6 51 0 1 6 52 0 0 7 53 0 0 8 No more. tetrahedron_lattice_point_next_test(): tetrahedron_lattice_point_next() returns the next lattice point in a tetrahedron defined by: 0 <= X(1)/C(1) + X(2)/C(2) + X(3)/C(3) <= C(4). N = 3 C = 4 3 2 1 1 0 0 0 2 1 0 0 3 2 0 0 4 0 1 0 5 1 1 0 No more. tetrahedron_quality1_test(): tetrahedron_quality1() computes quality measure #1 for a tetrahedron. tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.81650 0.81650 Tetrahedron quality is 0.580468 tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.40825 Tetrahedron quality is 0.732051 tetrahedron_quality2_test(): tetrahedron_quality2() computes quality measure #2 for a tetrahedron. tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.81650 0.81650 Tetrahedron quality is 0.565770 tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.40825 Tetrahedron quality is 0.732051 tetrahedron_quality3_test(): tetrahedron_quality3() computes quality measure #3 for a tetrahedron. tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.81650 0.81650 Tetrahedron quality is 0.686829 tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.40825 Tetrahedron quality is 0.839947 tetrahedron_quality4_test(): tetrahedron_quality4() computes quality measure #4 for a tetrahedron. tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.81650 0.81650 Tetrahedron quality is 0.476642 tetrahedron vertices: 0.57735 -0.28868 -0.28868 0.00000 0.00000 0.50000 -0.50000 0.00000 0.00000 0.00000 0.00000 0.40825 Tetrahedron quality is 0.621320 tetrahedron_rhombic_shape_test(): tetrahedron_rhombic_size() returns dimension information; tetrahedron_rhombic_shape() returns face and order info. We will use this information to compute the areas and centers of each face. Number of points = 10 Number of edges = 6 Number of faces = 4 Maximum face order = 6 shape_print(): Information about a polytope. The number of vertices is 10 Vertices: Index X Y Z 1 -0.816497 0.000000 0.000000 2 0.000000 -0.577350 0.000000 3 0.000000 0.577350 0.000000 4 0.000000 0.000000 0.816497 5 -0.408248 -0.288675 0.000000 6 -0.408248 0.288675 0.000000 7 -0.408248 0.000000 0.408248 8 0.000000 0.000000 0.000000 9 0.000000 -0.288675 0.408248 10 0.000000 0.288675 0.408248 The number of faces is 4 The maximum order of any face is 6 Index Order Indices of Nodes in Face 1 2 3 4 5 6 1 6 1 5 2 9 4 7 2 6 2 8 3 10 4 9 3 6 3 6 1 7 4 10 4 6 1 6 3 8 2 5 Face Order Area 1 6 0.471405 2 6 0.471405 3 6 0.471405 4 6 0.471405 Face Center 1 -0.272166 -0.192450 0.272166 2 0.000000 0.000000 0.272166 3 -0.272166 0.192450 0.272166 4 -0.272166 0.000000 0.000000 tetrahedron_sample_test(): tetrahedron_sample() samples a tetrahedron. We are computing the XSI coordinates just to verify that the points are inside the tetrahedron. tetrahedron vertices: 1 2 1 1 4 4 6 4 3 3 3 4 (X,Y,Z) (XSI1,XSI2,XSI3,XSI4): 1.215331 4.002483 3.014438 0.768989 0.215331 0.001241 0.014438 1.008574 4.000541 3.001052 0.990104 0.008574 0.000271 0.001052 1.077963 4.058159 3.070923 0.822035 0.077963 0.029080 0.070923 1.124977 4.110105 3.053248 0.766722 0.124977 0.055053 0.053248 1.190782 4.002073 3.004062 0.804119 0.190782 0.001037 0.004062 1.678344 4.002122 3.004373 0.316222 0.678344 0.001061 0.004373 1.008890 4.094834 3.029444 0.914249 0.008890 0.047417 0.029444 1.051267 4.001202 3.014011 0.934120 0.051267 0.000601 0.014011 1.156445 4.067312 3.006626 0.803273 0.156445 0.033656 0.006626 1.098489 4.002248 3.000912 0.899475 0.098489 0.001124 0.000912 tetrahedron_shape_test(): tetrahedron_size() returns dimension information; tetrahedron_shape() returns face and order info. We will use this information to compute the areas and centers of each face. Number of points = 4 Number of edges = 6 Number of faces = 4 Maximum face order = 3 shape_print(): Information about a polytope. The number of vertices is 4 Vertices: Index X Y Z 1 0.942809 0.000000 -0.333333 2 -0.471405 0.816497 -0.333333 3 -0.471405 -0.816497 -0.333333 4 0.000000 0.000000 1.000000 The number of faces is 4 The maximum order of any face is 3 Index Order Indices of Nodes in Face 1 2 3 1 3 1 3 2 2 3 1 2 4 3 3 1 4 3 4 3 2 3 4 Face Order Area 1 3 1.154701 2 3 1.154701 3 3 1.154701 4 3 1.154701 Face Center 1 -0.000000 0.000000 -0.333333 2 0.157135 0.272166 0.111111 3 0.157135 -0.272166 0.111111 4 -0.314270 0.000000 0.111111 tetrahedron_solid_angles_test(): tetrahedron_solid_angles() computes the solid angles associated with the vertices of a tetrahedron. tetrahedron1 vertices: 0.00000 -0.81650 0.81650 0.00000 0.94281 -0.81650 -0.81650 0.00000 -0.33333 -0.33333 -0.33333 1.00000 solid angles: 0.45509 0.53566 0.53566 0.64103 tetrahedron2 vertices: 0 1 0 0 0 0 1 0 0 0 0 1 solid angles: 1.57080 0.33984 0.33984 0.33984 tetrahedron3 vertices: 0 1 0 0 0 0 2 0 0 0 0 4 solid angles: 1.57080 0.33984 0.33984 0.33984 tetrahedron4 vertices: 0 1 0 1 0 0 1 1 0 0 0 1 solid angles: 0.52360 0.44556 0.44556 0.18376 tetrahedron_volume_test(): tetrahedron_volume() computes the volume of a tetrahedron; tetrahedron vertices: 0.00000 -0.81650 0.81650 0.00000 0.94281 -0.81650 -0.81650 0.00000 -0.33333 -0.33333 -0.33333 1.00000 Volume = 0.638429 tetrahedron01_lattice_point_num_test(): tetrahedron01_lattice_point_num() counts lattice points inside the unit tetrahedron. 0 1 1 4 2 10 3 20 4 35 5 56 6 84 7 120 8 165 9 220 10 286 tetrahedron01_volume_test(): tetrahedron01_volume() returns the volume of the unit tetrahedron. Unit tetrahedron volume = 0.166667 tetrahedron_test(): Normal end of execution. 17-Dec-2022 23:00:51