14-Oct-2022 22:41:56 ellipse_test(): MATLAB/Octave version 4.2.2 Test ellipse() ellipse_area1_test(): ellipse_area1() computes the area of an ellipse. R = 10 Matrix A in ellipse definition x*A*x=r^2: 5 1 1 2 Area = 104.72 ellipse_area2_test(): ellipse_area2() computes the area of an ellipse. Ellipse: 5 * x^2 + 2 * xy + 2 * y^2 = 10 Area = 104.72 ellipse_area3_test(): ellipse_area3() computes the area of an ellipse. Ellipse: (x/10)^2 + (y/3.33333)^2 = 1 Area = 104.72 ellipse_aspect_ratio_test(): ellipse_aspect_ratio() computes the aspect ratio of an ellipse. A B Aspect 1.0 0.0 0.000000 1.0 0.1 0.100000 1.0 0.2 0.200000 1.0 0.3 0.300000 1.0 0.4 0.400000 1.0 0.5 0.500000 1.0 0.6 0.600000 1.0 0.7 0.700000 1.0 0.8 0.800000 1.0 0.9 0.900000 1.0 1.0 1.000000 ellipse_eccentricity_test(): ellipse_eccentricity() computes the eccentricity of an ellipse. A B Ecc 1.0 0.0 1.000000 1.0 0.1 0.994987 1.0 0.2 0.979796 1.0 0.3 0.953939 1.0 0.4 0.916515 1.0 0.5 0.866025 1.0 0.6 0.800000 1.0 0.7 0.714143 1.0 0.8 0.600000 1.0 0.9 0.435890 1.0 1.0 0.000000 ellipse_eccentricity_test Normal end of execution. ellipse_flattening_test(): ellipse_flattening() computes the flattening of an ellipse. A B Flat 1.0 0.0 1.000000 1.0 0.1 0.900000 1.0 0.2 0.800000 1.0 0.3 0.700000 1.0 0.4 0.600000 1.0 0.5 0.500000 1.0 0.6 0.400000 1.0 0.7 0.300000 1.0 0.8 0.200000 1.0 0.9 0.100000 1.0 1.0 0.000000 ellipse_point_dist_2d_test(): ellipse_point_dist_2d() is given a point P, and finds the distance to an ellipse in 2D. The ellipse is (X/A)^2 + (Y/B)^2 = 1 A = 3.000000 B = 2.000000 P DIST -1.200000 3.900000 2.012360 -0.800000 3.600000 1.652439 -0.400000 3.300000 1.313793 0.000000 3.000000 1.000000 0.400000 2.700000 0.715386 0.800000 2.400000 0.465363 1.200000 2.100000 0.257003 1.600000 1.800000 0.099982 2.000000 1.500000 0.007981 2.400000 1.200000 0.000000 2.800000 0.900000 0.097827 3.200000 0.600000 0.311499 3.600000 0.300000 0.623086 4.000000 0.000000 1.000000 4.400000 -0.300000 1.416401 4.800000 -0.600000 1.856811 5.200000 -0.900000 2.312465 ellipse_point_near_2d_test(): ellipse_point_near_2d() is given a point P, and finds the nearest point PN on an ellipse in 2D. The ellipse is (X/A)^2 + (Y/B)^2 = 1 A = 3.000000 B = 2.000000 P PN -1.200000 3.900000 -0.823689 1.923138 -0.800000 3.600000 -0.583461 1.961810 -0.400000 3.300000 -0.309401 1.989335 0.000000 3.000000 0.000000 2.000000 0.400000 2.700000 0.344958 1.986734 0.800000 2.400000 0.723898 1.940902 1.200000 2.100000 1.132592 1.851994 1.600000 1.800000 1.562334 1.707384 2.000000 1.500000 1.995923 1.493138 2.400000 1.200000 2.400000 1.200000 2.800000 0.900000 2.719790 0.843996 3.200000 0.600000 2.908697 0.489662 3.600000 0.300000 2.984218 0.204879 4.000000 0.000000 3.000000 0.000000 4.400000 -0.300000 2.992027 -0.145716 4.800000 -0.600000 2.976051 -0.252210 5.200000 -0.900000 2.958199 -0.332704 ellipse_points_2d_test(): ellipse_points_2d() returns points along an ellipse. Graphics saved as "ellipse_points_2d_test.png" ellipse_points_arc_2d_test(): ellipse_points_arc_2d() returns points on an elliptical arc. The ellipse has center 5.000000 -2.000000 radii R1 = 3.000000, R2 = 1.000000 and angle PSI = 0.523599 The arc extends from THETA1 = 1.570796 to THETA2 = 6.283185 Sample points: 4.50000 -1.13397 3.54382 -1.77392 2.80933 -2.44829 2.40835 -3.05441 2.40192 -3.50000 2.79103 -3.71723 3.51644 -3.67303 4.46770 -3.37413 5.50000 -2.86603 6.45618 -2.22608 7.19067 -1.55171 7.59165 -0.94559 7.59808 -0.50000 ellipse_quadratic_to_standard_test(): ellipse_quadratic_to_standard() converts the equation of an ellipse from quadratic form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0. to standard form: ( ( x - x0 ) cos ( theta ) + ( y - y0 ) sin ( theta ) ) / a^2 + ( - ( x - x0 ) sin ( theta ) + ( y - y0 ) cos ( theta ) ) / b^2 = 1 Quadratic form parameters: A = 4 B = 0 C = 9 D = 8 E = -36 F = 4 Standard form parameters: a = 3 b = 2 theta = 0 x0 = -1 y0 = 2 ellipse_standard_to_quadratic_test(): ellipse_standard_to_quadratic() converts the equation of an ellipse from standard form: ( ( x - x0 ) cos ( theta ) + ( y - y0 ) sin ( theta ) ) / a^2 + ( - ( x - x0 ) sin ( theta ) + ( y - y0 ) cos ( theta ) ) / b^2 = 1 to quadratic form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0. Standard form parameters: a = 3 b = 2 theta = 0 x0 = -1 y0 = 2 Quadratic form parameters: A = 4 B = -0 C = 9 D = 8 E = -36 F = 4 ellipsoid_area_test(): ellipsoid_area_test() computes the surface area of the ellipsoid (x/a)^2+(y/b)^2+(z/c)^2=1 A B C Area 1 0.8 0.625 8.152 1 1 0.5 8.672 1 1 1 12.57 2 1 0.25 13.7 2 3 4 111.5 ellipse_test(): Normal end of execution. 14-Oct-2022 22:41:56