Fri Nov 14 17:11:54 2025 geometry_test(): python version: 3.10.12 numpy version: 1.26.4 Test geometry(). angle_degree_test(): angle_degree() computes an angle. X Y Theta atan2(y,x) angle_degree 1.000000 0.000000 0.000000 0.000000 0.000000 0.866025 0.500000 30.000000 30.000000 30.000000 0.500000 0.866025 60.000000 60.000000 60.000000 0.000000 1.000000 90.000000 90.000000 90.000000 -0.500000 0.866025 120.000000 120.000000 120.000000 -0.866025 0.500000 150.000000 150.000000 150.000000 -1.000000 0.000000 180.000000 180.000000 180.000000 -0.866025 -0.500000 210.000000 -150.000000 210.000000 -0.500000 -0.866025 240.000000 -120.000000 240.000000 -0.000000 -1.000000 270.000000 -90.000000 270.000000 0.500000 -0.866025 300.000000 -60.000000 300.000000 0.866025 -0.500000 330.000000 -30.000000 330.000000 1.000000 -0.000000 360.000000 -0.000000 360.000000 angle_half_test(): angle_half() is given P1, P2, P3, forming an angle. It finds P4 so P4, P2, P3 is half the angle. Original Angle Half Angle 0.000000 0.000000 0.523599 0.261799 1.047198 0.523599 1.570796 0.785398 2.094395 1.047198 2.617994 1.308997 3.141593 1.570796 3.665191 4.974188 4.188790 5.235988 4.712389 5.497787 5.235988 5.759587 5.759587 6.021386 6.283185 6.283185 angle_radian_test(): angle_radian() computes an angle in radians. X Y Theta atan2(y,x) angle_radian 1.000000 0.000000 0.000000 0.000000 0.000000 0.866025 0.500000 30.000000 0.523599 0.523599 0.500000 0.866025 60.000000 1.047198 1.047198 0.000000 1.000000 90.000000 1.570796 1.570796 -0.500000 0.866025 120.000000 2.094395 2.094395 -0.866025 0.500000 150.000000 2.617994 2.617994 -1.000000 0.000000 180.000000 3.141593 3.141593 -0.866025 -0.500000 210.000000 -2.617994 3.665191 -0.500000 -0.866025 240.000000 -2.094395 4.188790 -0.000000 -1.000000 270.000000 -1.570796 4.712389 0.500000 -0.866025 300.000000 -1.047198 5.235988 0.866025 -0.500000 330.000000 -0.523599 5.759587 1.000000 -0.000000 360.000000 -0.000000 6.283185 annulus_area_test(): annulus_area() computes the centroid of a circular annulus. The circle has center 5.000000 3.000000 The inner radius is R1 = 2.000000 The outer radius is R2 = 3.000000 Area: 15.707963 annulus_sector_area_test(): annulus_sector_area() computes the centroid of a circular annulus. The circle has center [5. 3.] The inner radius is R1 = 2.0 The outer radius is R2 = 3.0 The first angle is THETA1 = 0.5235987755982988 The second angle is THETA2 = 1.0471975511965976 Area: 1.308996938995747 ball01_sample_2d_test(): ball01_sample_2d() samples the unit ball in 2d; A few sample values: -0.115400 -0.980850 0.658096 0.232845 -0.867167 0.037434 -0.109966 0.558190 -0.856724 -0.335009 Number of sample points = 1000 Now average the points, which should get a value close to zero, and closer as N_SAMPLE increases. Average: [-0.00609918 -0.00798539] Now average the distance of the points from the center, which should be 1/sqrt(2) = 0.7071067811865475 Average: 0.6599243266245908 Now average the angle THETA which should be PI Average: 3.1399403648333983 ball01_sample_3d_test(): ball01_sample_3d() samples the unit ball in 3d; A few sample values: 0.617669 0.206942 -0.343258 -0.437163 0.439489 -0.645098 0.186677 -0.553611 -0.251310 0.690097 0.246425 0.160777 -0.458546 0.540413 -0.425824 Number of sample points = 1000 Now average the points, which should get a value close to zero, and closer as N_SAMPLE increases. Average: [0.00964502 0.01489219 0.00151284] Now average the distance of the points from the center, which should be the 1/2^(1/dim_num) = 0.7937005259840998 Average: 0.7413306323741081 Now average the angle THETA, which should be PI. Average: 3.0246192743231823 Now average the angle PHI, which should be PI/2. Average: 1.5323772277483403 ball01_sample_nd_test(): ball_unit_sample_nd() samples the unit ball in N dimensions; A few sample values: -0.513147 0.278913 0.782490 0.417479 0.683253 -0.424586 -0.285635 0.557331 0.544552 -0.156849 -0.697053 -0.510223 -0.191518 0.435246 0.271281 Number of sample points = 1000 Now average the points, which should get a value close to zero, and closer as N increases. Average: -0.002369 -0.003146 -0.011531 Now average the distance of the points from the center, which should be the 1/2^(1/dim_num) = 0.7937005259840998 Average: 0.7475700896205542 ball01_volume_test(): ball01_volume() returns the volume of the unit ball. ball01_volume() = 4.18879 circle_area_test(): circle_area() computes the area of a circle of radius R. R Area 1.000000 3.141593 2.000000 12.566371 4.000000 50.265482 8.000000 201.061930 circle_dia2imp_2d_test(): circle_dia2imp_2d() converts a diameter to an implicit circle in 2D. point P1: [-0.08073418 7.54648713] point P2: [ 4.08073418 -1.54648713] The implicit circle: Radius = 5.000000 Center = ( 2.000000, 3.000000 ) circle_imp_point_dist_2d_test(): circle_imp_point_dist_2d() checks, by finding the distance D from a point (X,Y) to a circle. Circle has center (0.000000,0.000000) and radius 5.000000 X Y D 1.4495 5.9065 1.0818 3.9385 -4.0680 0.6622 -5.3939 7.2556 4.0409 8.3584 -8.0946 6.6356 3.3952 4.8579 0.9267 -5.6227 -1.3766 0.7887 -0.4802 -5.0397 0.0625 7.0140 -7.0526 4.9466 8.5721 7.2424 6.2220 -2.4448 -1.6374 2.0575 circle_imp_print_2d_test(): circle_imp_print_2d() prints a circle definition. An example circle: Radius = 2.000000 Center = ( 5.000000, -2.000000 ) circle_lune_angle_by_height_2d_test(): circle_lune_angle_by_height_2d() computes the angle of a circular lune based on the "height" of the circular triangle. R H Angle 2.000000 -2.000000 6.283185 2.000000 -1.666667 5.111814 2.000000 -1.333333 4.601048 2.000000 -1.000000 4.188790 2.000000 -0.666667 3.821266 2.000000 -0.333333 3.476489 2.000000 0.000000 3.141593 2.000000 0.333333 2.806696 2.000000 0.666667 2.461919 2.000000 1.000000 2.094395 2.000000 1.333333 1.682137 2.000000 1.666667 1.171371 2.000000 2.000000 0.000000 circle_lune_area_by_angle_2d_test(): circle_lune_area_by_angle_2d() computes the area of a circular lune, defined by joining the endpoints of a circular arc. R Theta1 Theta2 Area 2.000000 0.000000 0.000000 0.000000 2.000000 0.000000 0.523599 0.047198 2.000000 0.000000 1.047198 0.362344 2.000000 0.000000 1.570796 1.141593 2.000000 0.000000 2.094395 2.456739 2.000000 0.000000 2.617994 4.235988 2.000000 0.000000 3.141593 6.283185 2.000000 0.000000 3.665191 8.330383 2.000000 0.000000 4.188790 10.109631 2.000000 0.000000 4.712389 11.424778 2.000000 0.000000 5.235988 12.204026 2.000000 0.000000 5.759587 12.519173 2.000000 0.000000 6.283185 12.566371 circle_lune_area_by_height_2d_test(): circle_lune_area_by_height_2d() computes the area of a circular lune based on the "height" of the circular triangle. R H Area 2.000000 -2.000000 12.566371 2.000000 -1.666667 12.066198 2.000000 -1.333333 11.189712 2.000000 -1.000000 10.109631 2.000000 -0.666667 8.899612 2.000000 -0.333333 7.610320 2.000000 0.000000 6.283185 2.000000 0.333333 4.956051 2.000000 0.666667 3.666759 2.000000 1.000000 2.456739 2.000000 1.333333 1.376659 2.000000 1.666667 0.500173 2.000000 2.000000 0.000000 circle_lune_height_by_angle_2d_test(): circle_lune_height_by_angle_2d() computes the height of the triangle of a circular lune, given the subtended angle. R Angle Height 2.000000 0.000000 2.000000 2.000000 0.523599 1.931852 2.000000 1.047198 1.732051 2.000000 1.570796 1.414214 2.000000 2.094395 1.000000 2.000000 2.617994 0.517638 2.000000 3.141593 0.000000 2.000000 3.665191 -0.517638 2.000000 4.188790 -1.000000 2.000000 4.712389 -1.414214 2.000000 5.235988 -1.732051 2.000000 5.759587 -1.931852 2.000000 6.283185 -2.000000 circle_sector_area_2d_test(): circle_sector_area_2d() computes the area of a circular sector, defined by joining the endpoints of a circular arc. R Theta1 Theta2 Area 2.000000 0.000000 0.000000 0.000000 2.000000 0.000000 0.523599 1.047198 2.000000 0.000000 1.047198 2.094395 2.000000 0.000000 1.570796 3.141593 2.000000 0.000000 2.094395 4.188790 2.000000 0.000000 2.617994 5.235988 2.000000 0.000000 3.141593 6.283185 2.000000 0.000000 3.665191 7.330383 2.000000 0.000000 4.188790 8.377580 2.000000 0.000000 4.712389 9.424778 2.000000 0.000000 5.235988 10.471976 2.000000 0.000000 5.759587 11.519173 2.000000 0.000000 6.283185 12.566371 circle_triangle_area_2d_test(): circle_triangle_area_2d() computes the area of a circular triangle. R Theta1 Theta2 Area 2.000000 0.000000 0.000000 0.000000 2.000000 0.000000 0.523599 1.000000 2.000000 0.000000 1.047198 1.732051 2.000000 0.000000 1.570796 2.000000 2.000000 0.000000 2.094395 1.732051 2.000000 0.000000 2.617994 1.000000 2.000000 0.000000 3.141593 0.000000 2.000000 0.000000 3.665191 -1.000000 2.000000 0.000000 4.188790 -1.732051 2.000000 0.000000 4.712389 -2.000000 2.000000 0.000000 5.235988 -1.732051 2.000000 0.000000 5.759587 -1.000000 2.000000 0.000000 6.283185 -0.000000 circle01_length_test(): circle01_length() returns the length of the unit circle. circle01_length() = 6.28319 circles_intersect_area_2d_test(): circles_intersect_area_2d() determines the area of the intersection of two circes of radius R1 and R2, with a distance D between the centers. R1 R2 D Area 1.000000 0.500000 1.500000 0.000000 1.000000 0.500000 1.000000 0.350767 1.000000 0.500000 0.500000 0.785398 1.000000 1.000000 1.500000 0.453312 1.000000 1.000000 1.000000 1.228370 1.000000 1.000000 0.000000 3.141593 circles_intersect_points_2d_test(): circles_intersect_points_2d() determines the intersections of two circles in 2D. The first circle: Radius = 5.000000 Center = ( 0.000000, 0.000000 ) The second circle: Radius = 0.500000 Center = ( 5.000000, 5.000000 ) The circles do not intersect. The second circle: Radius = 5.000000 Center = ( 7.071068, 7.071068 ) The circles intersect at two points: X Y 3.535329 3.535739 3.535739 3.535329 The second circle: Radius = 3.000000 Center = ( 4.000000, 0.000000 ) The circles intersect at two points: X Y 4.000000 3.000000 4.000000 -3.000000 The second circle: Radius = 3.000000 Center = ( 6.000000, 0.000000 ) The circles intersect at two points: X Y 4.333333 2.494438 4.333333 -2.494438 The second circle: Radius = 5.000000 Center = ( 0.000000, 0.000000 ) The circles coincide (infinite intersection). cone_volume_test(): cone_volume() computes the volume of a cone. R H ConeVolume 1.00000000 1.00000000 1.04719755 1.00000000 2.00000000 2.09439510 1.00000000 4.00000000 4.18879020 1.00000000 8.00000000 8.37758041 1.00000000 16.00000000 16.75516082 1.00000000 1.00000000 1.04719755 2.00000000 1.00000000 4.18879020 4.00000000 1.00000000 16.75516082 8.00000000 1.00000000 67.02064328 16.00000000 1.00000000 268.08257311 cube01_volume_test(): cube01_volume() returns the volume of the unit cube. cube01_volume() = 1 cylinder_volume_test(): cylinder_volume() returns the volume of a cylinder. cylinder_volume() = 471.23889803846896 Exact volume = 471.23889803846896 degrees_to_radians_test(): degrees_to_radians() converts an angle from degrees to radians. Degrees Radians Degrees -60.000000 -1.047198 -60.000000 -30.000000 -0.523599 -30.000000 0.000000 0.000000 0.000000 30.000000 0.523599 30.000000 60.000000 1.047198 60.000000 90.000000 1.570796 90.000000 120.000000 2.094395 120.000000 150.000000 2.617994 150.000000 180.000000 3.141593 180.000000 210.000000 3.665191 210.000000 240.000000 4.188790 240.000000 270.000000 4.712389 270.000000 300.000000 5.235988 300.000000 330.000000 5.759587 330.000000 360.000000 6.283185 360.000000 390.000000 6.806784 390.000000 420.000000 7.330383 420.000000 disk01_area_test(): disk01_area() returns the area of the unit disk. disk01_area() = 3.14159 disk01_quarter_area_test(): disk01_quarter_area() returns the area of the unit quarter disk. disk01_quarter_area() = 0.785398 hexagon01_area_test(): hexagon01_area() returns the area of the unit hexagon. hexagon01_area() = 2.598076211353316 hyperball01_volume_test(): hyperball01_volume() returns the volume of the unit hyperball in M dimensions. M Volume 1 2 2 3.14159 3 4.18879 4 4.9348 5 5.26379 6 5.16771 7 4.72477 8 4.05871 9 3.29851 10 2.55016 hypercube01_volume_test(): hypercube01_volume() returns the volume of the unit hypercube in M dimensions. hypercube01_volume(3) = 1 hypersphere01_area_test(): hypersphere01_area() returns the volume of the unit hypersphere. M Area 1 2 2 6.28319 3 12.5664 4 19.7392 5 26.3189 6 31.0063 7 33.0734 8 32.4697 9 29.6866 10 25.5016 i4_ceiling_test(): i4_ceiling() evaluates the "ceiling" of a real number. R8 i4_ceiling(R8) -53.0837 -53 31.9877 32 53.3730 54 -23.1371 -23 -53.1810 -53 75.0235 76 -52.7604 -52 87.4812 88 -89.4411 -89 -56.9674 -56 i4_log_10_test(): i4_log_10(): whole part of log base 10, X, i4_log_10 0 0 1 0 2 0 3 0 9 0 10 1 11 1 99 1 101 2 -1 0 -2 0 -3 0 -9 0 i4_modp_test(): i4_modp() factors a number into a multiple M and a positive remainder R. Number Divisor Multiple Remainder 107 50 2 7 107 -50 -2 7 -107 50 -3 43 -107 -50 3 43 Repeat using Python % Operator: 107 50 2 7 107 -50 -3 -43 -107 50 -3 43 -107 -50 2 -7 i4_wrap_test(): i4_wrap() forces an integer to lie within given limits. ILO = 4 IHI = 8 I i4_wrap(I) -10 5 -9 6 -8 7 -7 8 -6 4 -5 5 -4 6 -3 7 -2 8 -1 4 0 5 1 6 2 7 3 8 4 4 5 5 6 6 7 7 8 8 9 4 10 5 11 6 12 7 13 8 14 4 15 5 16 6 17 7 18 8 19 4 20 5 line_exp2imp_test(): line_exp2imp() converts explicit to implicit lines. Implicit line A, B, C = 1.000000 2.000000 3.000000 point P1: [-0.6 -1.2] point P2: [-1.2 -0.9] Recovered A, B, C = 0.238095 0.476190 0.714286 line_exp_perp_test(): line_exp_perp() is given an explicit line (P1,P2), and another point P3. It then finds a point P4 on (P1,P2) so that (P1,P2) is perpendicular to (P3,P4). point P1: [1. 3.] point P2: [4. 0.] point P3: [0. 0.] point P4: [2. 2.] point P3: [ 5. -1.] point P4: [ 5. -1.] point P3: [5. 3.] point P4: [3. 1.] lines_exp_int_test(): lines_exp_int() finds intersections of two explicit lines in 2D. P1 0.000000 2.000000 P2 4.000000 0.000000 Q1 0.000000 -1.000000 Q2 1.000000 0.000000 Intersection at 2.000000 1.000000 P1 0.000000 2.000000 P2 4.000000 0.000000 Q1 0.000000 0.250000 Q2 0.500000 0.000000 Lines are parallel, no intersection. P1 0.000000 2.000000 P2 4.000000 0.000000 Q1 0.000000 2.000000 Q2 4.000000 0.000000 Lines are coincident. lines_imp_int_test(): lines_imp_int() finds the intersection of two lines written in implicit form. Line 1 coefficients: 1.000000 2.000000 -4.000000 Line 2 coefficients: 1.000000 -1.000000 -1.000000 Intersection at 2.000000 1.000000 Line 1 coefficients: 1.000000 2.000000 -4.000000 Line 2 coefficients: 2.000000 4.000000 -1.000000 Lines are parallel, no intersection. Line 1 coefficients: 1.000000 2.000000 -4.000000 Line 2 coefficients: -3.000000 -6.000000 12.000000 Lines are coincident. polar_to_xy_test(): polar_to_xy() converts (R,Theta) to (X,Y); xy_to_polar() converts (X,Y) to (R,Theta). R T ===> X Y => R T 0.829988 4.484676 -0.187370 -0.808562 0.829988 4.484676 0.001182 4.450739 -0.000306 -0.001141 0.001182 4.450739 0.529834 5.392652 0.333264 -0.411897 0.529834 5.392652 1.129276 6.228048 1.127560 -0.062233 1.129276 6.228048 1.971355 1.993722 -0.809104 1.797662 1.971355 1.993722 0.937249 2.509108 -0.755949 0.554055 0.937249 2.509108 0.215730 0.320965 0.204713 0.068059 0.215730 0.320965 2.882552 4.041150 -1.792823 -2.257187 2.882552 4.041150 2.509562 1.757098 -0.464837 2.466136 2.509562 1.757098 2.056235 1.995272 -0.846845 1.873755 2.056235 1.995272 polygon_area_test(): polygon_area() computes the area of a polygon. Number of polygonal vertices = 4 The polygon vertices: Row: 0 1 Col 0 : 1 0 1 : 2 1 2 : 1 2 3 : 0 1 Exact area is 2 The computed area is 2 Number of polygonal vertices = 8 The polygon vertices: Row: 0 1 Col 0 : 0 0 1 : 3 0 2 : 3 3 3 : 2 3 4 : 2 1 5 : 1 1 6 : 1 2 7 : 0 2 Exact area is 6 The computed area is 6 pyramid_volume_test(): pyramid_volume() returns the volume of a pyramid. Radius Height Volume 9.5401 7.9375 963.2256 3.2949 8.3280 120.5461 4.6854 3.6993 108.2818 5.3714 7.2652 279.4828 3.3016 6.8283 99.2414 pyramid01_volume_test(): pyramid01_volume() returns the volume of the unit pyramid. pyramid01_volume() = 1.33333 r8_acos_test(): r8_acos() computes the arc-cosine of an angle. C r8_acos(C) ACOS(C) -1.16667 3.14159 -1 3.14159 3.14159 -0.833333 2.55591 2.55591 -0.666667 2.30052 2.30052 -0.5 2.0944 2.0944 -0.333333 1.91063 1.91063 -0.166667 1.73824 1.73824 0 1.5708 1.5708 0.166667 1.40335 1.40335 0.333333 1.23096 1.23096 0.5 1.0472 1.0472 0.666667 0.841069 0.841069 0.833333 0.585686 0.585686 1 0 0 1.16667 0 r8_sign_test(): r8_sign() returns the sign of an R8. R8 r8_sign(R8) -1.2500 -1 -0.2500 -1 0.0000 1 0.5000 1 9.0000 1 r8mat_det_4d_test(): r8mat_det_4d() computes the determinant of a 4 by 4 matrix Matrix: Col: 0 1 2 3 Row 0 : 1 1 1 1 1 : 1 10 100 1000 2 : 1 4 16 64 3 : 1 2 4 8 r8mat_det_4d computes determinant: -2592 Exact determinant is -2592 r8mat_solve_test(): r8mat_solve() solves linear systems. The linear system: Col: 0 1 2 3 4 Row 0 : 1 2 3 14 7 1 : 4 5 6 32 16 2 : 7 8 0 23 7 Factored matrix and solutions: Col: 0 1 2 3 4 Row 0 : 1 0 0 1 1 1 : 0 1 0 2 0 2 : 0 0 1 3 2 r8vec_indicator1_test(): r8vec_indicator1() returns the 1-based indicator matrix. the 1-based indicator vector: [ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.] radec_to_xyz_test(): xyz_to_radec() converts RADEC to XYZ coordinates. radec_to_xyz() converts XYZ to RADEC coordinates. P1 RA DEC P2 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 6.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 90.000000 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 3.000000 35.264390 0.577350 0.577350 0.577350 5.000000 -2.000000 -1.000000 -1.453427 -10.519735 0.912871 -0.365148 -0.182574 -2.000000 -2.000000 -2.000000 -9.000000 -35.264390 -0.577350 -0.577350 -0.577350 radians_to_degrees_test(): radians_to_degrees() converts an angle from radians to degrees. Degrees Radians Degrees -60.000000 -1.047198 -60.000000 -30.000000 -0.523599 -30.000000 0.000000 0.000000 0.000000 30.000000 0.523599 30.000000 60.000000 1.047198 60.000000 90.000000 1.570796 90.000000 120.000000 2.094395 120.000000 150.000000 2.617994 150.000000 180.000000 3.141593 180.000000 210.000000 3.665191 210.000000 240.000000 4.188790 240.000000 270.000000 4.712389 270.000000 300.000000 5.235988 300.000000 330.000000 5.759587 330.000000 360.000000 6.283185 360.000000 390.000000 6.806784 390.000000 420.000000 7.330383 420.000000 rtp_to_xyz_test(): rtp_to_xyz() converts XYZ to (R,Theta,Phi) coordinates. xyz_to_rtp() converts (R,Theta,Phi) to XYZ coordinates. X1 Y1 Z1 R THETA PHI X2 Y2 Z2 -1.4337 -0.2171 -1.5958 2.1562 3.2919 2.4040 -1.4337 -0.2171 -1.5958 2.5171 -1.6452 -1.0172 3.1744 5.7043 1.8970 2.5171 -1.6452 -1.0172 0.3342 -1.4059 -1.7710 2.2858 4.9458 2.4572 0.3342 -1.4059 -1.7710 2.2022 2.8412 -0.6195 3.6477 0.9114 1.7415 2.2022 2.8412 -0.6195 -0.1345 2.4571 -0.4844 2.5081 1.6255 1.7652 -0.1345 2.4571 -0.4844 segment_point_dist_test(): segment_point_dist() computes the distance from a point to a line segment. segment endpoint p1: [1. 2.] segment endpoint p2: [3. 4.] test point p: [2. 3.] Distance to segment = 0 test point p: [4. 5.] Distance to segment = 1.41421 test point p: [1. 4.] Distance to segment = 1.41421 test point p: [0. 0.] Distance to segment = 2.23607 segment_point_near_test(): segment_point_near() computes the nearest point from a line segment to a point in 2D. TEST = 0 P1 = 0.200863 0.021287 P2 = 0.285769 0.263458 P = 0.478103 0.174515 PN = 0.279052 0.244302 DIST = 0.210929 T = 0.920900 TEST = 1 P1 = 0.420500 0.438559 P2 = 0.334066 0.988089 P = 0.251257 0.282966 PN = 0.420500 0.438559 DIST = 0.229897 T = 0.000000 TEST = 2 P1 = 0.179242 0.171439 P2 = 0.509799 0.993375 P = 0.804111 0.676114 PN = 0.440945 0.822168 DIST = 0.391435 T = 0.791703 simplex01_volume_test(): simplex01_volume() returns the volume of the unit simplex in M dimensions. M Volume 1 1 2 0.5 3 0.166667 4 0.0416667 5 0.00833333 6 0.00138889 7 0.000198413 8 2.48016e-05 9 2.75573e-06 sphere_triangle_angles_to_area_test(): sphere_triangle_angles_to_area() takes the angles of a spherical triangle and determines the area. Sphere has radius 1.0 inches 1.0 side A: 90.0 degrees 1.5707963267948966 radians side B: 90.0 degrees 1.5707963267948966 radians side C: 90.0 degrees 1.5707963267948966 radians area of spherical triangle = 1.5707963267948966 (radians) correct area = 1.5707963267948966 (radians) Sphere has radius 10.0 inches 10.0 side A: 117.96666666666667 degrees 2.0589067409359774 radians side B: 93.23 degrees 1.6271704616343134 radians side C: 70.34333333333333 degrees 1.2277227734945446 radians area of spherical triangle = 177.2207322475042 (radians) sphere_triangle_sides_to_angles_test(): sphere_triangle_sides_to_angles() takes the sides of a spherical triangle and determines the angles. Sphere has radius 10.0 inches 10.0 side A: 121.25666666666666 degrees 2.116328073326591 radians 21.163280733265907 inches side B: 104.91166666666666 degrees 1.8310540070881174 radians 18.310540070881174 inches side C: 65.70833333333333 degrees 1.1468267626646071 radians 11.468267626646071 inches angle A = 2.0588666435567733 (radians) angle A = 117.96436925606875 (degrees) Correct = 117.96666666666667 (radians) angle B = 1.6271360660977374 (radians) angle B = 93.22802928092011 (degrees) Correct = 93.23 (radians) angle C = 1.2277397869197484 (radians) angle C = 70.34430813079258 (degrees) Correct = 70.34333333333333 (radians) sphere_triangle_sides_to_area_test(): sphere_triangle_sides_to_area() takes the sides of a spherical triangle and determines the area. Sphere has radius 1.0 inches 1.0 side A: 90.0 degrees 1.5707963267948966 radians 1.5707963267948966 inches side B: 90.0 degrees 1.5707963267948966 radians 1.5707963267948966 inches side C: 90.0 degrees 1.5707963267948966 radians 1.5707963267948966 inches Computed area = 1.5707963267948966 Alternate computed area = 1.5707963267948966 Exact area = 1.5707963267948966 Sphere has radius 10.0 inches 10.0 side A: 121.25666666666666 degrees 2.116328073326591 radians 21.163280733265907 inches side B: 104.91166666666666 degrees 1.8310540070881174 radians 18.310540070881174 inches side C: 65.70833333333333 degrees 1.1468267626646071 radians 11.468267626646071 inches Computed area = 177.2149842984466 Alternate computed area = 177.2149842984466 sphere_triangle_vertices_to_sides_test(): sphere_triangle_vertices_to_sides() takes the XYZ coordinates of the vertices of a spherical triangle and determines the geodesic length of the triangle sides. Sphere has radius 3958.8 miles vertex A xyz = ( 609.2780755663857 , -3148.190792166084 , 2321.5883361945994 ) vertex B xyz = ( 614.4546462213573 , -3143.195869295621 , 2326.985744472865 ) vertex C xyz = ( 630.8742663827949 , -3148.7790571634455 , 2315.0130775407847 ) side A = 21.074195483723443 miles side B = 22.582668636653082 miles side C = 8.993230183289798 miles side A = 0.005323379681651875 radians side B = 0.005704422713108286 radians side C = 0.002271706118846569 radians side A = 0.3050071885043482 degrees side B = 0.3268393460196712 degrees side C = 0.130159172903953 degrees sphere01_area_test(): sphere01_area() returns the area of the unit sphere. sphere01_area() = 12.566370614359172 sphere01_area_values_test(): sphere01_area_values() stores areas of the unit sphere in N dimensions. N sphere01_area(N) 1 2.0000000000000000 2 6.2831853071795862 3 12.5663706143591707 4 19.7392088021787195 5 26.3189450695716189 6 31.0062766802998198 7 33.0733617923198082 8 32.4696970113341479 9 29.6865801246483585 10 25.5016403987734499 11 20.7251426732889001 12 16.0231532262550687 13 11.8381738121826796 14 8.3897034104910890 15 5.7216492123495666 16 3.7652900857422908 17 2.3966788175913640 18 1.4786259590003079 19 0.8858104195716824 20 0.5161378278002812 sphere01_volume_values_test(): sphere01_volume_values() stores values of the sphere01_volume function. N sphere01_volume(X) 1 2.0000000000000000 2 3.1415926535897931 3 4.1887902047863914 4 4.9348022005446790 5 5.2637890139143249 6 5.1677127800499703 7 4.7247659703314007 8 4.0587121264167676 9 3.2985089027387069 10 2.5501640398773451 11 1.8841038793899001 12 1.3352627688545891 13 0.9106287547832831 14 0.5992645293207921 15 0.3814432808233045 16 0.2353306303588932 17 0.1409811069171390 18 0.0821458866111282 19 0.0466216010300885 20 0.0258068913900141 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 Row: 0 1 2 Col 0 : 1 4 3 1 : 2 4 3 2 : 1 6 3 3 : 1 4 4 (X,Y,Z) (XSI1,XSI2,XSI3,XSI4): 1.373886 4.052200 3.032667 0.567347 0.373886 0.026100 0.032667 1.000818 4.000010 3.000021 0.999156 0.000818 0.000005 0.000021 1.051626 4.019402 3.024107 0.914566 0.051626 0.009701 0.024107 1.030626 4.020287 3.009332 0.949898 0.030626 0.010144 0.009332 1.146882 4.028841 3.042588 0.796110 0.146882 0.014421 0.042588 1.370867 4.056263 3.049954 0.551047 0.370867 0.028131 0.049954 1.318919 4.026122 3.001440 0.666580 0.318919 0.013061 0.001440 1.138599 4.091844 3.030281 0.785198 0.138599 0.045922 0.030281 1.127865 4.115276 3.005247 0.809250 0.127865 0.057638 0.005247 1.108730 4.074321 3.055826 0.798284 0.108730 0.037161 0.055826 tetrahedron_centroid_test(): tetrahedron_centroid() computes the centroid of a tetrahedron Tetrahedron vertices: Row: 0 1 2 Col 0 : 0 0.942809 -0.333333 1 : -0.816496 -0.816496 -0.333333 2 : 0.816496 -0.816496 -0.333333 3 : 0 0 1 tetrahedron centroid: [ 0.0000000e+00 -1.7254575e-01 2.5000000e-07] 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 Row: 0 1 2 Col 0 : 1 4 3 1 : 2 4 3 2 : 1 6 3 3 : 1 4 4 (X,Y,Z) (XSI1,XSI2,XSI3,XSI4): 1.166673 4.210572 3.120778 0.607264 0.166673 0.105286 0.120778 1.382689 4.061287 3.017180 0.569488 0.382689 0.030643 0.017180 1.117030 4.039226 3.006688 0.856669 0.117030 0.019613 0.006688 1.192357 4.101458 3.009419 0.747495 0.192357 0.050729 0.009419 1.326938 4.071122 3.011591 0.625910 0.326938 0.035561 0.011591 1.226728 4.002182 3.001289 0.770891 0.226728 0.001091 0.001289 1.326642 4.001754 3.000881 0.671599 0.326642 0.000877 0.000881 1.086943 4.003842 3.000280 0.910856 0.086943 0.001921 0.000280 1.150563 4.095028 3.063948 0.737975 0.150563 0.047514 0.063948 1.161307 4.010454 3.011032 0.822435 0.161307 0.005227 0.011032 tetrahedron_volume_test(): tetrahedron_volume() computes the volume of a tetrahedron Tetrahedron vertices Row: 0 1 2 Col 0 : 0 0.942809 -0.333333 1 : -0.816496 -0.816496 -0.333333 2 : 0.816496 -0.816496 -0.333333 3 : 0 0 1 Volume = 0.638429 tp_to_xyz_test(): tp_to_xyz() converts (Theta,Phi) to normalized XYZ coordinates. xyz_to_tp() converts XYZ to (Theta,Phi) coordinates. T P X Y Z T P 2.3975 2.6044 -0.3765 0.3466 -0.8591 2.3975 2.6044 5.9295 1.8147 0.9103 -0.3361 -0.2415 5.9295 1.8147 2.9056 0.1857 -0.1795 0.0432 0.9828 2.9056 0.1857 0.5920 2.6445 0.3957 0.2661 -0.8790 0.5920 2.6445 3.2155 0.0975 -0.0971 -0.0072 0.9952 3.2155 0.0975 0.2380 1.6154 0.9708 0.2355 -0.0446 0.2380 1.6154 triangle_angles_test(): triangle_angles() computes the angles of a triangle. Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 Radians Degrees 0.785398 45 1.5708 90 0.785398 45 triangle_area_test(): triangle_area() computes the area of a triangle. Triangle vertices (columns) Col: 0 1 2 Row 0 : 0 0 1 1 : 1 0 0 Triangle area is 0.5 triangle_barycentric_test(): triangle_barycentric() converts XY coordinates to barycentric XSI coordinates in a triangle. Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 X Y XSI 0.250000 0.250000 0.500000 0.250000 0.250000 0.750000 0.250000 0.000000 0.750000 0.250000 1.000000 1.000000 -1.000000 1.000000 1.000000 11.000000 0.500000 -10.500000 11.000000 0.500000 0.000000 1.000000 -0.000000 0.000000 1.000000 0.500000 -10.000000 10.500000 0.500000 -10.000000 0.600000 0.600000 -0.200000 0.600000 0.600000 triangle_centroid_test(): triangle_centroid() computes the centroid of a triangle Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0 1 triangle centroid: [0.33333333 0.33333333] Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 0.866025 triangle centroid: [0.5 0.28867513] Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 10 triangle centroid: [0.5 3.33333333] Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 10 2 triangle centroid: [3.66666667 0.66666667] triangle_circumcircle_test(): triangle_circumcircle() computes the circumcenter of a triangle. Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0 1 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0 1 triangle_circumcenter: [0.5 0.5] Circumradius: 0.707107 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 0.866025 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 0.866025 triangle_circumcenter: [0.5 0.28867513] Circumradius: 0.57735 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 10 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 10 triangle_circumcenter: [0.5 4.9875] Circumradius: 5.0125 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 10 2 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 10 2 triangle_circumcenter: [ 0.5 23.5] Circumradius: 23.5053 triangle_contains_point_test() triangle_contains_point() reports if a point is inside a triangle Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 X Y Inside 0.25 0.25 True 0.75 0.25 True 1 1 False 11 0.5 False 0 1 True 0.5 -10 False 0.6 0.6 False Repeat the test, but reverse the triangle vertex ordering. Triangle vertices (reversed): Row: 0 1 Col 0 : 1 0 1 : 0 0 2 : 0 1 X Y Inside 0.25 0.25 False 0.75 0.25 False 1 1 False 11 0.5 False 0 1 False 0.5 -10 False 0.6 0.6 False triangle_contains_point_1_test() triangle_contains_point_1() reports if a point is inside a triangle Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 X Y Inside 0.25 0.25 True 0.75 0.25 True 1 1 False 11 0.5 False 0 1 True 0.5 -10 False 0.6 0.6 False Repeat the test, but reverse the triangle vertex ordering. Triangle vertices (reversed): Row: 0 1 Col 0 : 1 0 1 : 0 0 2 : 0 1 X Y Inside 0.25 0.25 True 0.75 0.25 True 1 1 False 11 0.5 False 0 1 True 0.5 -10 False 0.6 0.6 False triangle_diameter_test(): triangle_diameter() computes the diameter of the SMALLEST circle around a triangle. Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : -2 2 Diameter = 6 Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 5 4 2 : 6 6 Diameter = 4.47214 Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : 4 2 Diameter = 4.24264 triangle_edge_length_test(): triangle_edge_length() computes the edge lengths of a triangle. Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : -2 2 triangle edge lengths: [4.24264069 4.24264069 6. ] Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 5 4 2 : 6 6 triangle edge lengths: [2.23606798 2.23606798 4.47213595] Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : 4 2 triangle edge lengths: [4.24264069 4.24264069 0. ] triangle_incircle_test(): triangle_incircle() computes the incircle of a triangle. Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 triangle incenter: [0.29289322 0.29289322] Incircle radius is 0.292893 triangle_orientation_test(): triangle_orientation() determines orientation of a triangle. Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : -2 2 The points are counterclockwise. Triangle vertices: Row: 0 1 Col 0 : 1 5 1 : 4 2 2 : 1 -1 The points are clockwise. Triangle vertices: Row: 0 1 Col 0 : 1 5 1 : 2 7 2 : 3 9 The points are colinear. Triangle vertices: Row: 0 1 Col 0 : 1 5 1 : 4 2 2 : 1 5 The points are not distinct. triangle_orthocenter_test(): triangle_orthocenter() computes the orthocenter of a triangle. Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0 1 triangle orthocenter: [0. 0.] Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 0.866025 triangle orthocenter: [0.5 0.28867514] Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 10 triangle orthocenter: [0.5 0.025] Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 10 2 triangle orthocenter: [ 10. -45.] triangle_point_dist_test(): triangle_point_dist() computes the distance between a point and a triangle. Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 P DIST 0.25 0.25 0.25 0.75 0.25 0 1 1 0.707107 11 0.5 10.0125 0 1 0 0.5 -10 10 0.6 0.6 0.141421 triangle_point_near_test(): triangle_point_near() computes the nearest triangle point to a point. Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 P PN 0.25 0.25 0 0.25 0.75 0.25 0.75 0.25 1 1 0.5 0.5 11 0.5 1 0 0 1 0 1 0.5 -10 0.5 0 0.6 0.6 0.5 0.5 triangle_quality_test(): triangle_quality() computes the quality of a triangle. Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0 1 Quality = 0.828427 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 0.866025 Quality = 1 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0.5 10 Quality = 0.189775 Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 10 2 Quality = 0.00833469 triangle_reference_sample_test(): triangle_reference_sample() samples the reference triangle. Triangle vertices: Row: 0 1 Col 0 : 0 0 1 : 1 0 2 : 0 1 Sample points (X,Y) and (XSI1,XSI2,XSI3) coordinates: 0.184436 0.111792 0.703772 0.184436 0.111792 0.0219659 0.347756 0.630278 0.0219659 0.347756 0.349883 0.255495 0.394622 0.349883 0.255495 0.399055 0.0776096 0.523335 0.399055 0.0776096 0.308654 0.15101 0.540336 0.308654 0.15101 0.932364 0.0604888 0.00714702 0.932364 0.0604888 0.244981 0.731325 0.0236948 0.244981 0.731325 0.153816 0.633743 0.212441 0.153816 0.633743 0.583796 0.0154929 0.400711 0.583796 0.0154929 0.35087 0.422759 0.226371 0.35087 0.422759 triangle_sample_test(): triangle_sample() samples a triangle. Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : -2 2 Sample points (X,Y) and (XSI1,XSI2,XSI3) coordinates: 1.21893 3.51966 0.283211 0.506553 0.210236 -0.855494 2.25898 0.147587 0.0863282 0.766085 2.21363 3.1903 0.503889 0.396768 0.0993438 0.992179 2.29595 0.449371 0.0986509 0.451978 1.95622 3.02464 0.488598 0.341546 0.169856 1.98462 2.95833 0.504383 0.319442 0.176175 1.23923 2.20528 0.505658 0.0684274 0.425915 0.307507 2.16227 0.357539 0.0540905 0.58837 1.03093 3.90065 0.188379 0.633551 0.17807 0.900623 4.71997 0.0301086 0.906657 0.0632344 triangle_xsi_to_xy_test(): triangle_xsi_to_xy() converts XSI to XY coordinates. We verify that (X,Y) -> (XSI1,XSI2,XSI3) -> (X,Y) works properly. Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : -2 2 Sample points: 1 3 0.333333 0.333333 0.333333 1 3 3 0 1.16667 -0.666667 0.5 3 2.22045e-16 2.54038 2.45541 0.680827 0.151805 0.167368 2.54038 2.45541 -0.83851 2.13774 0.170626 0.045912 0.783462 -0.83851 2.13774 1.10813 4.10044 0.167948 0.700147 0.131905 1.10813 4.10044 1.11232 2.92831 0.364003 0.309435 0.326562 1.11232 2.92831 0.791751 2.64346 0.358048 0.214487 0.427465 0.791751 2.64346 -0.334319 2.64771 0.169662 0.215903 0.614435 -0.334319 2.64771 2.99365 2.65977 0.722314 0.219923 0.0577632 2.99365 2.65977 1.27594 4.26784 0.168015 0.755948 0.0760364 1.27594 4.26784 triangle_xy_to_xsi_test(): triangle_xy_to_xsi() converts XY to XSI coordinates. Verify that (X,Y) -> (XSI1,XSI2,XSI3) -> (X,Y) works properly. Triangle vertices: Row: 0 1 Col 0 : 4 2 1 : 1 5 2 : -2 2 Sample points: 1 3 0.333333 0.333333 0.333333 1 3 3 0 1.16667 -0.666667 0.5 3 2.22045e-16 0.354037 2.6761 0.279656 0.225368 0.494977 0.354037 2.6761 0.121725 3.79695 0.0541294 0.598983 0.346888 0.121725 3.79695 0.549511 3.58898 0.160088 0.52966 0.310251 0.549511 3.58898 2.06686 2.05579 0.668511 0.0185975 0.312892 2.06686 2.05579 2.13643 2.69841 0.573003 0.232803 0.194194 2.13643 2.69841 0.725813 2.97349 0.292055 0.324495 0.38345 0.725813 2.97349 0.383336 3.94056 0.0737964 0.646853 0.279351 0.383336 3.94056 1.08002 2.73757 0.390408 0.245855 0.363736 1.08002 2.73757 triangle01_area_test(): triangle01_area() computes the area of the unit triangle. Triangle vertices (columns) Col: 0 1 2 Row 0 : 0 0 1 1 : 1 0 0 Triangle area is 0.5 triangle01_sample_test(): triangle01_sample() samples the unit triangle. Triangle vertices: Row: 0 1 Col 0 : 0 1 1 : 0 0 2 : 1 0 Sample points (X,Y): Sample points: Row: 0 1 Col 0 : 0.0634364 0.601785 1 : 0.302863 0.134413 2 : 0.0789996 0.439717 3 : 0.0289892 0.159202 4 : 0.173388 0.588318 5 : 0.0310941 0.12396 6 : 0.509283 0.347072 7 : 0.984931 0.0134529 8 : 0.419241 0.359166 9 : 0.451285 0.291541 triangle_3d_area_cross_product_test(): triangle_3d_area_cross_product() computes the area of a triangle in 3D. Triangle vertices: [[1. 2. 3. ] [2.4142137 3.4142137 3. ] [1.7071068 2.7071068 4. ]] Computed area is 1.0000000973169176 triangle_3d_area_heron_test(): triangle_3d_area_heron() computes the area of a triangle in 3D. Triangle vertices: [[1. 2. 3. ] [2.4142137 3.4142137 3. ] [1.7071068 2.7071068 4. ]] Computed area is 1.0000000973169179 wedge01_volume_test(): wedge01_volume() returns the volume of the unit wedge. wedge01_volume() = 1 xy_to_polar_test(): xy_to_polar() converts (X,Y) to (R,Theta). polar_to_xy() converts (R,Theta) to (X,Y); X Y ===> R T => X Y -0.879972 1.726862 1.938145 2.042077 -0.879972 1.726862 -0.152249 -0.772764 0.787619 4.517861 -0.152249 -0.772764 -0.548986 -0.741523 0.922628 4.075093 -0.548986 -0.741523 -1.402064 -0.923853 1.679073 3.724215 -1.402064 -0.923853 0.759080 -0.719404 1.045823 5.524617 0.759080 -0.719404 -0.050993 0.393036 0.396330 1.699817 -0.050993 0.393036 -0.470395 0.433875 0.639937 2.396559 -0.470395 0.433875 0.443381 0.357637 0.569641 0.678760 0.443381 0.357637 0.988632 0.085169 0.992293 0.085936 0.988632 0.085169 0.815086 1.242382 1.485893 0.990168 0.815086 1.242382 xyz_to_radec_test(): xyz_to_radec() converts RADEC to XYZ coordinates. radec_to_xyz() converts XYZ to RADEC coordinates. P1 RA DEC P2 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 6.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 90.000000 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 3.000000 35.264390 0.577350 0.577350 0.577350 5.000000 -2.000000 -1.000000 -1.453427 -10.519735 0.912871 -0.365148 -0.182574 -2.000000 -2.000000 -2.000000 -9.000000 -35.264390 -0.577350 -0.577350 -0.577350 xyz_to_rtp_test(): xyz_to_rtp() converts (R,Theta,Phi) to XYZ coordinates. rtp_to_xyz() converts XYZ to (R,Theta,Phi) coordinates. X1 Y1 Z1 R THETA PHI X2 Y2 Z2 -1.5029 2.8915 1.1656 3.4609 2.0501 1.2273 -1.5029 2.8915 1.1656 -1.4321 -1.6670 -1.1121 2.4631 4.0026 2.0393 -1.4321 -1.6670 -1.1121 2.8529 2.7321 0.2502 3.9581 0.7638 1.5075 2.8529 2.7321 0.2502 2.7361 1.3419 -1.6191 3.4508 0.4560 2.0592 2.7361 1.3419 -1.6191 2.3494 1.2165 0.3339 2.6667 0.4778 1.4452 2.3494 1.2165 0.3339 xyz_to_tp_test(): xyz_to_tp() converts XYZ to (Theta,Phi) coordinates. tp_to_xyz() converts (Theta,Phi) to normalized XYZ coordinates. P1 T P P2 0.426263 -0.869753 -0.248657 5.168083 1.822090 0.426263 -0.869753 -0.248657 -0.371721 -0.345802 -0.861536 3.890884 2.609085 -0.371721 -0.345802 -0.861536 -0.324074 -0.630514 -0.705286 4.237617 2.353623 -0.324074 -0.630514 -0.705286 -0.530030 -0.841256 0.106570 4.150169 1.464024 -0.530030 -0.841256 0.106570 -0.503566 -0.852436 0.140619 4.178808 1.429710 -0.503566 -0.852436 0.140619 -0.538220 0.096469 0.837265 2.964239 0.578534 -0.538220 0.096469 0.837265 geometry_test(): Normal end of execution. Fri Nov 14 17:11:54 2025