auromat.coordinates.intersection module

auromat.coordinates.intersection.ellipsoidLineIntersection(a, b, lineOrigin, lineDirection, directed=True)[source]

Return the ellipsoid-line intersection points.

Note:

The ellipsoid is assumed to be at (0,0,0).

Parameters:
  • a – equatorial axis of the ellipsoid of revolution
  • b – polar axis of the ellipsoid of revolution
  • lineOrigin – x,y,z vector
  • lineDirection – x,y,z array of vectors; not required to be unit vectors
  • directed (bool) – True, if the line should be directed. In that case, the first intersection along the line is returned. If False, then the line is infinite in both ends and the intersection which is closest to the line origin is returned.
Return type:

vector or array of vectors

auromat.coordinates.intersection.ellipsoidLineIntersects(a, b, lineOrigin, lineDirection, directed=True)[source]

As ellipsoidLineIntersection() but returns an array of booleans instead of the intersection points.

auromat.coordinates.intersection.sphereLineIntersection(sphereRadius, lineOrigin, lineDirection, directed=True)[source]

Return the sphere-line intersection points.

Parameters:
  • sphereRadius – radius of sphere with origin [0,0,0]
  • lineOrigin – point, e.g. [1,2,3]
  • lineDirection – unit vector or array of unit vectors
  • directed (bool) – True, if the line should be directed. In that case, the first intersection along the line is returned. If False, then the line is infinite in both ends and the intersection which is closest to the line origin is returned.
Return type:

vector or array of vectors