pygeodesy.ellipses.Ellipse

Package pygeodesy :: Module ellipses :: Class Ellipse |
[frames] | no frames]

# Class Ellipse

      object --+
               |
    named._Named --+
                   |
                  Ellipse

Class to compute attributes of a 2-D ellipse, like perimeter, area and arcs.

Instance Methods
__init__(self, a, b, **name) New Ellipse with semi-axes `a` and `b`. |
arc(self, 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, rad2, rad1=0) Compute the length of elliptic arc `(rad2 - rad1)`, both counter-clockwise from semi-axis `a` to `b` of the ellipse. |
Roc_(self, rad_x, *y) Compute the radius of curvature at angle `rad radians` or at point `(x, y)` on this ellipse. |
sideOf(self, x, y, eps=2.220446049250313e-16) Return a `positive`, `negative` or `0` scalar if point `(x, y)` is `outside`, `inside` respectively `on` this ellipse. |
toEllipsoid(self) Return an Ellipsoid from this ellipse's `a` and `b` semi-axes. |
toTriaxial_(self, c=2.220446049250313e-16) Return a Triaxial_ from this ellipse's `a` and `b` semi-axes with `c` as minor semi-axis. |
Inherited from `named._Named`: `__format__`, `__imatmul__`, `__matmul__`, `__repr__`, `__rmatmul__`, `__str__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toRepr`, `toStr`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| a Return semi-axis `a` of this ellipse (`meter`, conventionally).
| area Return the area of this ellipse (`meter**2`, conventionally).
| b Return semi-axis `b` of this ellipse (`meter`, conventionally).
| foci Get the foci lengths (`meter`, conventionally), `positive` if the ellipse is oblate with foci on semi-axis `a`, `negative` if prolate with foci on semi-axis `b` or `0` if circular with coincident foci in the ellipse' center.
| isCircular Is this ellipse circular? (`bool`)
| isFlat Is this ellipse "flat", too pro-/oblate? (`bool`)
| isOblate Is this ellipse oblate? (`bool`)
| isProlate Is this ellipse prolate? (`bool`)
| perimeterAGM Compute the perimeter of this ellipse using the Arithmetic-Geometric Mean formula (`meter`, same units as semi-axes `a` and `b`).
| perimeter4Arc3 Compute the perimeter (and arcs) of this ellipse using the 4-Arc approximation as a 3-Tuple `(P, Ra, Rb)` with perimeter `P`, arc radii `Ra` and `Rb` at the respective semi-axes (all in `meter`, same units as semi-axes `a` and `b`).
| perimeterGK Compute the perimeter of this ellipse using the Gauss-Kummer series, `b / a > 0.75` (`meter`, same units as semi-axes `a` and `b`).
| perimeter2k Compute the perimeter of this ellipse using the complete integral of the 2nd kind, `Elliptic.cE` (`meter`, same units as semi-axes `a` and `b`).
| perimeter2k_ Compute the perimeter of this ellipse using SciPy's ellipe function if available, otherwise use property `perimeter2k` (`meter`, same units as semi-axes `a` and `b`).
| perimeterHGK Compute the perimeter of this ellipse using the Hypergeometric Gauss-Kummer series (`meter`, same units as semi-axes `a` and `b`).
| perimeter2R Compute the perimeter of this ellipse using Ramanujan's 2nd approximation, `b / a > 0.9` (`meter`, same units as semi-axes `a` and `b`).
| R2 Compute the authalic radius of this ellipse, `sqrt(a * b)` (`meter`, same units as semi-axes `a` and `b`).
Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof`, `typename` Inherited from `object`: `__class__`

Method Details

### __init__ (self, a, b, **name) (Constructor) |
New Ellipse with semi-axes `a` and `b`. The ellipse is oblate if `a > b`, prolate if `a < b` circular if `a == b` and "flat" if `min(a, b) near 0`. Arguments: `a` - X semi-axis length (`meter`, conventionally). `b` - Y semi-axis length (`meter`, conventionally). Raises: `ValueError` - Invalid `a` or `b`. Overrides: object.__init__

### arc (self, 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`).

### arc_ (self, 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`).

### Roc_ (self, rad_x, *y) |
Compute the radius of curvature at angle `rad radians` or at point `(x, y)` on this ellipse. Returns: Curvature (`meter`, same units as semi-axes `a` and `b`). Raises: `ValueError` - `(x, y)` not located on the ellipse.

Property Details

### a Return semi-axis `a` of this ellipse (`meter`, conventionally). Get method: a(self) - Return semi-axis `a` of this ellipse (`meter`, conventionally). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### area Return the area of this ellipse (`meter**2`, conventionally). Get method: area(self) - Return the area of this ellipse (`meter**2`, conventionally). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### b Return semi-axis `b` of this ellipse (`meter`, conventionally). Get method: b(self) - Return semi-axis `b` of this ellipse (`meter`, conventionally). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### foci Get the foci lengths (`meter`, conventionally), `positive` if the ellipse is oblate with foci on semi-axis `a`, `negative` if prolate with foci on semi-axis `b` or `0` if circular with coincident foci in the ellipse' center. Get method: foci(self) - Get the foci lengths (`meter`, conventionally), `positive` if the ellipse is oblate with foci on semi-axis `a`, `negative` if prolate with foci on semi-axis `b` or `0` if circular with coincident foci in the ellipse' center. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### isCircular Is this ellipse circular? (`bool`) Get method: isCircular(self) - Is this ellipse circular? (`bool`) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### isFlat Is this ellipse "flat", too pro-/oblate? (`bool`) Get method: isFlat(self) - Is this ellipse "flat", too pro-/oblate? (`bool`) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### isOblate Is this ellipse oblate? (`bool`) Get method: isOblate(self) - Is this ellipse oblate? (`bool`) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### isProlate Is this ellipse prolate? (`bool`) Get method: isProlate(self) - Is this ellipse prolate? (`bool`) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### perimeterAGM Compute the perimeter of this ellipse using the Arithmetic-Geometric Mean formula (`meter`, same units as semi-axes `a` and `b`). Get method: perimeterAGM(self) - Compute the perimeter of this ellipse using the Arithmetic-Geometric Mean formula (`meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### perimeter4Arc3 Compute the perimeter (and arcs) of this ellipse using the 4-Arc approximation as a 3-Tuple `(P, Ra, Rb)` with perimeter `P`, arc radii `Ra` and `Rb` at the respective semi-axes (all in `meter`, same units as semi-axes `a` and `b`). Get method: perimeter4Arc3(self) - Compute the perimeter (and arcs) of this ellipse using the 4-Arc approximation as a 3-Tuple `(P, Ra, Rb)` with perimeter `P`, arc radii `Ra` and `Rb` at the respective semi-axes (all in `meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### perimeterGK Compute the perimeter of this ellipse using the Gauss-Kummer series, `b / a > 0.75` (`meter`, same units as semi-axes `a` and `b`). Get method: perimeterGK(self) - Compute the perimeter of this ellipse using the Gauss-Kummer series, `b / a > 0.75` (`meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### perimeter2k Compute the perimeter of this ellipse using the complete integral of the 2nd kind, `Elliptic.cE` (`meter`, same units as semi-axes `a` and `b`). Get method: perimeter2k(self) - Compute the perimeter of this ellipse using the complete integral of the 2nd kind, `Elliptic.cE` (`meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### perimeter2k_ Compute the perimeter of this ellipse using SciPy's ellipe function if available, otherwise use property `perimeter2k` (`meter`, same units as semi-axes `a` and `b`). Get method: perimeter2k_(self) - Compute the perimeter of this ellipse using SciPy's ellipe function if available, otherwise use property `perimeter2k` (`meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### perimeterHGK Compute the perimeter of this ellipse using the Hypergeometric Gauss-Kummer series (`meter`, same units as semi-axes `a` and `b`). Get method: perimeterHGK(self) - Compute the perimeter of this ellipse using the Hypergeometric Gauss-Kummer series (`meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### perimeter2R Compute the perimeter of this ellipse using Ramanujan's 2nd approximation, `b / a > 0.9` (`meter`, same units as semi-axes `a` and `b`). Get method: perimeter2R(self) - Compute the perimeter of this ellipse using Ramanujan's 2nd approximation, `b / a > 0.9` (`meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### R2 Compute the authalic radius of this ellipse, `sqrt(a * b)` (`meter`, same units as semi-axes `a` and `b`). Get method: R2(self) - Compute the authalic radius of this ellipse, `sqrt(a * b)` (`meter`, same units as semi-axes `a` and `b`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.