Warning: X does not support locale en_US.UTF-8 29-Jul-2023 19:12:51 triangle_test(): MATLAB/Octave version 9.14.0.2206163 (R2023a) 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 0 1.0000 0 0.5000 0.8660 Centroid: (0.5,0.288675) Triangle vertices: 0 0 1.0000 0 0.5000 10.0000 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 0 1.0000 0 0.5000 0.8660 Circumradius: 0.577350 Circumcenter: (0.500000,0.288675) Triangle vertices: 0 0 1.0000 0 0.5000 10.0000 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.2426 4.2426 0 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 0 1.0000 0 0.5000 0.8660 Orthocenter: (0.500000,0.288675) Triangle vertices: 0 0 1.0000 0 0.5000 10.0000 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 0 1.0000 0 0.5000 0.8660 Quality = 1.000000 Triangle vertices: 0 0 1.0000 0 0.5000 10.0000 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.085034 0.817586 0.097380 0.085034 0.817586 0.030869 0.325483 0.643648 0.030869 0.325483 0.717645 0.077565 0.204790 0.717645 0.077565 0.239124 0.288605 0.472271 0.239124 0.288605 0.034357 0.944165 0.021477 0.034357 0.944165 0.011675 0.385330 0.602995 0.011675 0.385330 0.503482 0.474867 0.021651 0.503482 0.474867 0.767655 0.126929 0.105416 0.767655 0.126929 0.054724 0.594708 0.350568 0.054724 0.594708 0.036054 0.854006 0.109940 0.036054 0.854006 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: 1.483910 4.342579 0.190222 0.780860 0.028919 -1.346421 2.182472 0.078518 0.060824 0.860658 -0.344363 2.598760 0.176146 0.199587 0.624267 0.399487 3.571794 0.137949 0.523931 0.338120 1.155366 4.013061 0.190384 0.671020 0.138595 1.398959 4.440552 0.159735 0.813517 0.026748 2.348405 3.505813 0.473765 0.501938 0.024297 2.295105 2.165063 0.688340 0.055021 0.256639 0.706341 3.707723 0.166436 0.569241 0.264323 0.974887 4.823647 0.025207 0.941216 0.033578 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 1.254659 3.228926 0.337622 0.409642 0.252736 1.254659 3.228926 -0.712067 2.537562 0.125062 0.179187 0.695751 -0.712067 2.537562 2.067980 2.661706 0.567712 0.220569 0.211719 2.067980 2.661706 0.703147 2.708282 0.332478 0.236094 0.431428 0.703147 2.708282 -0.433591 2.619837 0.157762 0.206612 0.635626 -0.433591 2.619837 1.352549 2.504834 0.474619 0.168278 0.357103 1.352549 2.504834 1.177012 4.033299 0.190619 0.677766 0.131615 1.177012 4.033299 2.449371 2.519134 0.655040 0.173045 0.171916 2.449371 2.519134 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 0.060612 3.938604 0.020335 0.646201 0.333464 0.060612 3.938604 1.191249 3.781417 0.234972 0.593806 0.171222 1.191249 3.781417 0.736414 3.936954 0.133243 0.645651 0.221105 0.736414 3.936954 0.374307 2.642146 0.288693 0.214049 0.497258 0.374307 2.642146 -1.547989 2.115272 0.056123 0.038424 0.905453 -1.547989 2.115272 1.473141 3.911582 0.260260 0.637194 0.102546 1.473141 3.911582 2.542350 2.860665 0.613614 0.286888 0.099498 2.542350 2.860665 0.549822 4.051260 0.083094 0.683753 0.233153 0.549822 4.051260 triangle_test(): Normal end of execution. 29-Jul-2023 19:12:52