#include <codecogs/geometry/area/ellipse.h>
using namespace Geometry::Area;
| double | ellipse (double a, double b, double h)[inline] Computes the area of the ellipse segment determined by the intersection of an ellipse and a line parallel to the reference line. | |
| Real | cc_ellipse (Real a, Real b, Real h) This function is available as a Microsoft Excel add-in. |
| doubleellipse( | double | a | |
| double | b | ||
| double | h | )[inline] |


Further information available when you purchase a licence.
#include <codecogs/geometry/area/ellipse.h> #include <stdio.h> int main() { // the value of the height double h = 0.973; // the length of the semiaxes for the first ellipse (a>b) double a1 = 1.925, b1 = 1.309; // display the lenghts of the semiaxes for the first ellipse and the value of the height printf("a1 = %.3lf\nb1 = %.3lf\nh = %.3lf\n\n", a1, b1, h); // display the area for the first ellipse printf("Area is %.5lf\n\n",Geometry::Area::ellipse(a1, b1, h)); // the length of the semiaxes for the second ellipse (a<b) double a2 = 1.125, b2 = 2.345; // display the lenghts of the semiaxes for the second ellipse and the value of the height printf("a2 = %.3lf\nb2 = %.3lf\nh = %.3lf\n\n", a2, b2, h); // display the area for the first ellipse printf("Area is %.5lf\n",Geometry::Area::ellipse(a2, b2, h)); return 0; }Output:
a1 = 1.925 b1 = 1.309 h = 0.973 Area is 2.67888 a2 = 1.125 b2 = 2.345 h = 0.973 Area is 1.24346
| a | semiaxis of the ellipse parallel to the reference line |
| b | semiaxis of the ellipse perpendicular to the reference line |
| h | the distance between line |