geometryarea

ellipse

Only available under a commercial licence
COST (GBP)
this unit 1.60
sub units 1.60
add a commercial licence to your cart
0
viewed 2140 times and licensed 1 times
www.codecogs.com/d-ox/geometry/area/ellipse.php
Other modules that are used by this module. We add these to the cart for you whenever you add this module, unless you already own enough licences for them. Click for details
Controller: CodeCogs    Contact Controller

Interface

#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.
Click for details on using CodeCogs in ExcelReal cc_ellipse (Real a, Real b, Real h)
This function is available as a Microsoft Excel add-in.

Function Documentation

Add calculator to your site or email
 
doubleellipsedoublea
doubleb
doubleh )[inline]
This module computes the area of the ellipse segment formed between an ellipse that is tangent to a reference line and another line parallel to this reference line, found at a given distance from it.

Solution

Let us consider an ellipse \mathcal{E} with semiaxis a parallel to the reference line and semiaxis b perpendicular to this reference line, with the equation:
(1)
\displaystyle \mathcal{E}: \quad \frac{x^2}{a^2} + \frac{(y-b)^2}{b^2} = 1
The center of the ellipse is at (0,b) . We also consider a line d parallel to the reference line at a distance h \geq 0 from it. The filled shape in the next image represents the area we must find.

1/ellipse01-378.jpg
In order to compute the area by integration, we need to make the substitutions x \rightarrow y and y \rightarrow x , which makes the figure rotate 90^\circ clockwise. The filled shape in the next image represents half the area we must find.

1/ellipse02-378.jpg
The new ellipse is tangent to the Y-axis and its center is found at (b,0) , while the area of the shape remains the same after this coordinates transformation. In order to compute it we will first consider the equation of the equation of the new ellipse:
(2)
\displaystyle \mathcal{E}_\mathrm{new}: \quad \frac{(x-b)^2}{b^2} + \frac{y^2}{a^2} = 1
with positive y solution of the form:
(3)
\displaystyle y = \frac{a}{b}\sqrt{x(2b-x)}.

Further information available when you purchase a licence.

Example:
#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
Parameters:
asemiaxis of the ellipse parallel to the reference line
bsemiaxis of the ellipse perpendicular to the reference line
hthe distance between line d and the reference line
Returns:
The area of the desired shape.
Authors:
Lucian Bentea, Eduard Bentea (September 2006)
Source Code:
Register

- To get code register with CodeCogs. Already a Member, then Login.


Last Modified: 2 Feb 08 @ 14:10     Page Rendered: 2008-05-09 15:58:31

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional