29-Jul-2023 19:26:49 triangle_test(): MATLAB/Octave version 5.2.0 Test triangle(). triangle_angles_test(): triangle_angles() computes the angles of a triangle. Triangle vertices: 0 1 0 0 1 0 Radians Degrees 0.785398 45.000000 1.570796 90.000000 0.785398 45.000000 triangle_area_test(): triangle_area() computes the area of a triangle. Triangle vertices: 0 1 0 0 1 0 Triangle area is 0.5 triangle_centroid_test(): triangle_centroid_2d() computes the centroid of a triangle Triangle vertices: 0 0 1 0 0 1 Centroid: (0.333333,0.333333) Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 0.86603 Centroid: (0.5,0.288675) Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 10.00000 Centroid: (0.5,3.33333) Triangle vertices: 0 0 1 0 10 2 Centroid: (3.66667,0.666667) triangle_circumcircle_test(): triangle_circumcircle() computes the circumcenter of a triangle. Triangle vertices: 0 0 1 0 0 1 Circumradius: 0.707107 Circumcenter: (0.500000,0.500000) Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 0.86603 Circumradius: 0.577350 Circumcenter: (0.500000,0.288675) Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 10.00000 Circumradius: 5.012500 Circumcenter: (0.500000,4.987500) Triangle vertices: 0 0 1 0 10 2 Circumradius: 23.505319 Circumcenter: (0.500000,23.500000) triangle_contains_point_test(): triangle_contains_point() reports if a point is inside a triangle Triangle vertices: 0 1 0 0 1 0 X Y Inside 0.250000 0.250000 true 0.750000 0.250000 true 1.000000 1.000000 false 11.000000 0.500000 false 0.000000 1.000000 true 0.500000 -10.000000 false 0.600000 0.600000 false triangle_diameter_test(): triangle_diameter() computes the diameter of the SMALLEST circle around a triangle. Triangle vertices: 4 2 1 5 -2 2 Diameter = 6.000000 Triangle vertices: 4 2 5 4 6 6 Diameter = 6.000000 Triangle vertices: 4 2 1 5 4 2 Diameter = 0.000000 triangle_edge_length_test(): triangle_edge_length() computes the edge lengths of a triangle. Triangle vertices: 4 2 1 5 -2 2 Edge lengths: 4.2426 4.2426 6.0000 Triangle vertices: 4 2 5 4 6 6 Edge lengths: 2.2361 2.2361 4.4721 Triangle vertices: 4 2 1 5 4 2 Edge lengths: 4.24264 4.24264 0.00000 triangle_incircle_test(): triangle_incircle() computes the incircle of a triangle. Triangle vertices: 0 1 0 0 1 0 Incircle radius: 0.292893 Incircle center: (0.292893,0.292893) triangle_orientation_test(): triangle_orientation()_determines orientation of a triangle. Triangle vertices: 4 2 1 5 -2 2 The points are counterclockwise. Triangle vertices: 1 5 4 2 1 -1 The points are clockwise. Triangle vertices: 1 5 2 7 3 9 The points are colinear. Triangle vertices: 1 5 4 2 1 5 The points are not distinct. triangle_orthocenter_test(): triangle_orthocenter() computes the orthocenter of a triangle. Triangle vertices: 0 0 1 0 0 1 Orthocenter: (0.000000,0.000000) Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 0.86603 Orthocenter: (0.500000,0.288675) Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 10.00000 Orthocenter: (0.500000,0.025000) Triangle vertices: 0 0 1 0 10 2 Orthocenter: (10.000000,-45.000000) triangle_point_dist_test(): triangle_point_dist() computes the distance between a point and a triangle. Triangle vertices: 0 1 0 0 1 0 P DIST 0.250000 0.250000 0.250000 0.750000 0.250000 0.000000 1.000000 1.000000 0.707107 11.000000 0.500000 10.012492 0.000000 1.000000 0.000000 0.500000 -10.000000 10.000000 0.600000 0.600000 0.141421 triangle_point_near_test(): triangle_point_near() computes the nearest triangle point to a point. Triangle vertices: 0 1 0 0 1 0 P PN 0.250000 0.250000 0.000000 0.250000 0.750000 0.250000 0.750000 0.250000 1.000000 1.000000 0.500000 0.500000 11.000000 0.500000 1.000000 0.000000 0.000000 1.000000 0.000000 1.000000 0.500000 -10.000000 0.500000 0.000000 0.600000 0.600000 0.500000 0.500000 triangle_quality_test(): triangle_quality() computes the quality of a triangle. Triangle vertices: 0 0 1 0 0 1 Quality = 0.828427 Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 0.86603 Quality = 1.000000 Triangle vertices: 0.00000 0.00000 1.00000 0.00000 0.50000 10.00000 Quality = 0.189775 Triangle vertices: 0 0 1 0 10 2 Quality = 0.008335 triangle_reference_sample_test(): triangle_reference_sample() samples the reference triangle. Triangle vertices: 0 0 1 0 0 1 Sample points (X,Y) and (XSI1,XSI2,XSI3) coordinates: 0.118386 0.644481 0.237133 0.118386 0.644481 0.171758 0.703125 0.125117 0.171758 0.703125 0.346378 0.455341 0.198281 0.346378 0.455341 0.703486 0.125629 0.170884 0.703486 0.125629 0.753852 0.037199 0.208949 0.753852 0.037199 0.134734 0.263268 0.601998 0.134734 0.263268 0.269931 0.603774 0.126295 0.269931 0.603774 0.073383 0.614645 0.311972 0.073383 0.614645 0.325528 0.389887 0.284585 0.325528 0.389887 0.476422 0.074434 0.449144 0.476422 0.074434 triangle_sample_test(): triangle_sample() samples a triangle. Triangle vertices: 4 2 1 5 -2 2 Sample points (X,Y) and (XSI1,XSI2,XSI3) coordinates: 2.708349 3.086813 0.603589 0.362271 0.034140 0.453095 3.787081 0.111002 0.595694 0.293304 1.858541 2.686703 0.528640 0.228901 0.242459 1.159688 4.112211 0.174579 0.704070 0.121350 2.324177 3.327252 0.499487 0.442417 0.058095 0.735065 3.651086 0.180663 0.550362 0.268975 -0.095407 3.080976 0.137269 0.360325 0.502405 -1.784468 2.095928 0.019934 0.031976 0.948090 1.094652 3.701127 0.232254 0.567042 0.200704 0.942139 2.813640 0.354750 0.271213 0.374037 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: 4 2 1 5 -2 2 Sample points: 1.000000 3.000000 0.333333 0.333333 0.333333 1.000000 3.000000 3.000000 0.000000 1.166667 -0.666667 0.500000 3.000000 0.000000 2.231350 2.927113 0.550706 0.309038 0.140256 2.231350 2.927113 1.683054 2.659914 0.503857 0.219971 0.276172 1.683054 2.659914 0.097406 3.119738 0.162945 0.373246 0.463809 0.097406 3.119738 1.374783 2.752468 0.437052 0.250823 0.312125 1.374783 2.752468 -0.386205 2.216412 0.232897 0.072137 0.694966 -0.386205 2.216412 2.741958 2.956193 0.630961 0.318731 0.050308 2.741958 2.956193 3.545628 2.311395 0.872372 0.103798 0.023830 3.545628 2.311395 -0.625167 2.454949 0.153314 0.151650 0.695036 -0.625167 2.454949 triangle_xy_to_xsi_test(): triangle_xy_to_xsi() converts XY to XSI coordinates. We verify that (X,Y) -> (XSI1,XSI2,XSI3) -> (X,Y) works properly. Triangle vertices: 4 2 1 5 -2 2 Sample points: 1.000000 3.000000 0.333333 0.333333 0.333333 1.000000 3.000000 3.000000 0.000000 1.166667 -0.666667 0.500000 3.000000 0.000000 2.234089 2.687796 0.591049 0.229265 0.179686 2.234089 2.687796 2.660739 3.294663 0.561013 0.431554 0.007433 2.660739 3.294663 0.613880 2.064369 0.424919 0.021456 0.553625 0.613880 2.064369 2.239117 3.141666 0.516242 0.380555 0.103203 2.239117 3.141666 0.214114 2.121084 0.348838 0.040361 0.610800 0.214114 2.121084 0.103407 2.010034 0.348895 0.003345 0.647760 0.103407 2.010034 0.134088 3.336207 0.132980 0.445402 0.421617 0.134088 3.336207 1.966939 3.258736 0.451367 0.419579 0.129054 1.966939 3.258736 triangle_test(): Normal end of execution. 29-Jul-2023 19:26:49