Package pygeodesy :: Module elliptic :: Class Elliperim
[frames] | no frames]

Class Elliperim

object --+
         |
        Elliperim

Singleton with various methods to compute the perimeter of an ellipse.

Instance Methods
 
AGM(self, a, b, maxit=53)
Compute the perimeter of an ellipse with semi-axes a and b using the AGM (Arithmetic-Geometric Mean) method.
 
Arc43(self, a, b)
Compute the perimeter (and arcs) of an ellipse with semi-axes a and b using the 4-Arc approximation.
 
E2k(self, a, b)
Compute the perimeter of an ellipse with semi-axes a and b using E(k), the complete elliptic integral of the 2nd kind.
 
GK(self, a, b)
Compute the perimeter of an ellipse with semi-axes a and b using the Gauss-Kummer series, and here, b / a > 0.75.
 
HG(self, a, b, maxit=53)
Compute the perimeter of an ellipse with semi-axes a and b using the HG (HyperGeometric Gauss-Kummer) series.
 
R2(self, a, b)
Compute the perimeter of an ellipse with semi-axes a and b using Ramanujan's 2nd approximation, b / a > 0.9.
 
arc(self, a, b, deg2, deg1=0)
Compute the length of elliptic arc (deg2 - deg1), both counter-clockwise from semi-axis a to b of the ellipse.
 
arc_(self, a, b, rad2, rad1=0)
Compute the length of elliptic arc (rad2 - rad1), both counter-clockwise from semi-axis a to b of the ellipse.
 
e2k(self, a, b, E_ab=None)
Compute the perimeter of an ellipse with semi-axes a and b using SciPy's ellipe function or method E_ab, otherwise None.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

AGM (self, a, b, maxit=53)

 

Compute the perimeter of an ellipse with semi-axes a and b using the AGM (Arithmetic-Geometric Mean) method.

Arguments:
  • maxit - Number of iterations (int).
Returns:
Perimeter (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b or no convergence for maxit iterations.

Arc43 (self, a, b)

 

Compute the perimeter (and arcs) of an ellipse with semi-axes a and b using the 4-Arc approximation.

Returns:
3-Tuple (p, Ra, Rb) with perimeter p, arc radius Ra at the major and arc radius Rb at the minor semi-axis (meter, same units as semi-axes a and b.
Raises:
  • ValueError - Invalid a or b.

E2k (self, a, b)

 

Compute the perimeter of an ellipse with semi-axes a and b using E(k), the complete elliptic integral of the 2nd kind.

Returns:
Perimeter (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b.

GK (self, a, b)

 

Compute the perimeter of an ellipse with semi-axes a and b using the Gauss-Kummer series, and here, b / a > 0.75.

Returns:
Perimeter (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b.

HG (self, a, b, maxit=53)

 

Compute the perimeter of an ellipse with semi-axes a and b using the HG (HyperGeometric Gauss-Kummer) series.

Arguments:
  • maxit - Number of iterations (int), sufficient for b / a > 0.125.
Returns:
Perimeter (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b or no convergence for maxit iterations.

R2 (self, a, b)

 

Compute the perimeter of an ellipse with semi-axes a and b using Ramanujan's 2nd approximation, b / a > 0.9.

Returns:
Perimeter (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b.

arc (self, a, b, deg2, deg1=0)

 

Compute the length of elliptic arc (deg2 - deg1), both counter-clockwise from semi-axis a to b of the ellipse.

Arguments:
  • deg2 - End angle of the elliptic arc (degrees).
  • deg1 - Start angle of the elliptic arc (degrees).
Returns:
Arc length, signed (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b.

arc_ (self, a, b, rad2, rad1=0)

 

Compute the length of elliptic arc (rad2 - rad1), both counter-clockwise from semi-axis a to b of the ellipse.

Arguments:
  • rad2 - End angle of the elliptic arc (radians).
  • rad1 - Start angle of the elliptic arc (radians).
Returns:
Arc length, signed (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b.

e2k (self, a, b, E_ab=None)

 

Compute the perimeter of an ellipse with semi-axes a and b using SciPy's ellipe function or method E_ab, otherwise None.

Arguments:
  • E_ab - Alternate Elliperim(a, b) method to use in case SciPy's ellipe is not available.
Returns:
Perimeter (meter, same units as semi-axes a and b).
Raises:
  • ValueError - Invalid a or b.