Package pygeodesy :: Module vector3d |
[frames] | no frames]

# Module vector3d

Generic 3-D vector base class Vector3d and function sumOf.

Pure Python implementation of vector-based functions by (C) Chris Veness 2011-2015 published under the same MIT Licence**, see Vector-based geodesy.

Version: 20.07.29

Classes
| VectorError Vector3d or `*Nvector` issue.
| Vector3d Generic 3-D vector manipulation.

Functions
intersections2(center1, rad1, center2, rad2, sphere=True, Vector=None, **Vector_kwds) Compute the intersection of two spheres or circles, each defined by a center point and radius. |
sumOf(vectors, Vector=<class 'pygeodesy.vector3d.Vector3d'>, **Vector_kwds) Compute the vectorial sum of several vectors. |

Variables
| __all__ = `_ALL_LAZY.vector3d`

Function Details

### intersections2 (center1, rad1, center2, rad2, sphere=True, Vector=None, **Vector_kwds) |
Compute the intersection of two spheres or circles, each defined by a center point and radius. Arguments: `center1` - Center of the first sphere or circle (Vector3d, `Vector3Tuple` or `Vector4Tuple`). `rad1` - Radius of the first sphere or circle (same units as the `center1` coordinates). `center2` - Center of the second sphere or circle (Vector3d, `Vector3Tuple` or `Vector4Tuple`). `rad2` - Radius of the second sphere or circle (same units as the `center1` and `center2` coordinates). `sphere` - If `True` compute the center and radius of the intersection of two spheres. If `False`, ignore the `z`-component and compute the intersection of two circles (`bool`). `Vector` - Class to return intersections (Vector3d or `Vector3Tuple`) or `None` for Vector3d. `Vector_kwds` - Optional, additional `Vector` keyword arguments, ignored if `Vector=None`. Returns: 2-Tuple of the `center` and `radius` of the intersection of the spheres if `sphere` is `True`. The `radius` is `0.0` for abutting spheres. Otherwise, a 2-tuple of the intersection points of two circles. For abutting circles, both intersection points are the same `Vector` instance. Raises: `IntersectionError` - Concentric, invalid or non-intersecting spheres or circles. `UnitError` - Invalid `rad1` or `rad2`. See Also: Sphere-Sphere and circle-circle intersections.

### sumOf (vectors, Vector=<class 'pygeodesy.vector3d.Vector3d'>, **Vector_kwds) |
Compute the vectorial sum of several vectors. Arguments: `vectors` - Vectors to be added (Vector3d[]). `Vector` - Optional class for the vectorial sum (Vector3d). `Vector_kwds` - Optional `Vector` keyword arguments, ignored if `Vector=None`. Returns: Vectorial sum (`Vector`). Raises: `VectorError` - No `vectors`.