13-Dec-2022 20:37:18 triangle_distance_test(): MATLAB/Octave version 4.2.2 Test triangle_distance(). triangle_distance_histogram_test MATLAB/Octave version 4.2.2 Test triangle_distance_histogram. Number of sample points N = 10000 Equilateral triangle vertices: ( 0, 0 ) ( 1, 0 ) ( 0.5, 0.866025 ) Unit right triangle vertices: ( 0, 0 ) ( 1, 0 ) ( 0, 1 ) 345 right triangle Vertices: ( 0, 0 ) ( 3, 0 ) ( 0, 4 ) scalene triangle Vertices: ( 0.75, 0.9 ) ( 0, 0.2 ) ( 0.95, 0.65 ) triangle_distance_stats_test MATLAB/Octave version 4.2.2 Test triangle_distance_stats. Number of sample points N = 10000 Equilateral triangle vertices: ( 0, 0 ) ( 1, 0 ) ( 0.5, 0.866025 ) Estimated mu = 0.365664 Exact mu = 0.364792 Estimated var = 0.033622 Unit right triangle vertices: ( 0, 0 ) ( 1, 0 ) ( 0, 1 ) Estimated mu = 0.413021 Exact mu = 0.414293 Estimated var = 0.050355 345 right triangle Vertices: ( 0, 0 ) ( 3, 0 ) ( 0, 4 ) Estimated mu = 1.47171 Estimated var = 0.650274 scalene triangle Vertices: ( 0.75, 0.9 ) ( 0, 0.2 ) ( 0.95, 0.65 ) Estimated mu = 0.298515 Estimated var = 0.0372951 triangle_equilateral_distance_pdf_test(): MATLAB/Octave version 4.2.2 Test triangle_equilateral_distance_pdf, probability density function for the distance D between between a pair of random points in an equilateral triangle. Triangle vertices: ( 0, 0 ) ( 1, 0 ) ( 0.5, 0.866025 ) Graphics saved as "triangle_equilateral_distance_pdf.png" Graphics saved in "triangle_equilateral_distance_compare.png" triangle_right_distance_pdf_test(): MATLAB/Octave version 4.2.2 Test triangle_right_distance_pdf, probability density function for the distance D between a pair of random points in a right triangle. Triangle vertices: ( 0, 0 ) ( 5, 0 ) ( 0, 12 ) Graphics saved as "triangle_right_distance_pdf.png" Graphics saved in "triangle_right_distance_compare.png" triangle_right_error_test MATLAB/Octave version 4.2.2 Test triangle_right_error, which reports right triangle error a^2+b^2-c^2 Triangle #1: ( 0, 0 ) ( 3, 0 ) ( 0, 4 ) Right triangle error is 0 Triangle #2: ( 4, 0 ) ( 0, 0 ) ( 0, 3 ) Right triangle error is 0 Triangle #3: ( 0.1, 0 ) ( 3, 0.2 ) ( 0.3, 4 ) Right triangle error is 2.76 Triangle #4: ( 0.556667, 0.130157 ) ( 0.536587, 0.97147 ) ( 0.630033, 0.608731 ) Right triangle error is -0.333483 triangle_sample_test MATLAB/Octave version 4.2.2 Test triangle_sample, which uniformly samples a triangle. Number of points N = 10000 Vertices: V1 = 0.750000 0.900000 V2 = 0.000000 0.200000 V3 = 0.950000 0.650000 Graphics saved as "triangle_sample_test.png" triangle_sides_test MATLAB/Octave version 4.2.2 Test triangle_sides, which reports the lengths of the sides of a triangle. Triangle #1: ( 0, 0 ) ( 3, 0 ) ( 0, 4 ) a = 3, b = 4, c = 5 Triangle #2: ( 4, 0 ) ( 0, 0 ) ( 0, 3 ) a = 3, b = 4, c = 5 Triangle #3: ( 0.1, 0 ) ( 3, 0.2 ) ( 0.3, 4 ) a = 2.90689, b = 4.005, c = 4.66154 Triangle #4: ( 0.0633988, 0.0194592 ) ( 0.64324, 0.253408 ) ( 0.941798, 0.112169 ) a = 0.33028, b = 0.625258, c = 0.883278 triangle_distance_test(): Normal end of execution. 13-Dec-2022 20:39:16