distance3d.distance.point_to_ellipsoid

distance3d.distance.point_to_ellipsoid(point, ellipsoid2origin, radii, distance_to_surface=False, epsilon=1e-16, max_iter=64)[source]

Compute the shortest distance between point and ellipsoid.

Implementation adapted from 3D Game Engine Design by David H. Eberly.

Geometric Tools, Inc. http://www.geometrictools.com Copyright (c) 1998-2006. All Rights Reserved

The Wild Magic Version 4 Foundation Library source code is supplied under the terms of the license agreement (http://www.geometrictools.com/License/Wm4FoundationLicense.pdf) and may not be copied or disclosed except in accordance with the terms of that agreement.

Parameters:
pointarray, shape (3,)

3D point.

ellipsoid2originarray, shape (4, 4)

Pose of the ellipsoid.

radiiarray, shape (3,)

Radii of the ellipsoid.

distance_to_surfacebool, optional (default: False)

Compute distance to surface or volume otherwise.

epsilonfloat, optional (default: 1e-16)

Values smaller than epsilon are considered to be 0.

max_iterint, optional (default: 64)

Maximum number of iterations of the optimization.

Returns:
distfloat

Shortest distance.

closest_point_ellipsoidarray, shape (3,)

Closest point on ellipsoid.