distance3d.distance.point_to_circle¶
- distance3d.distance.point_to_circle(point, center, radius, normal, epsilon=1e-06)[source]¶
Compute the shortest distance between point and circle (only line).
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.
- centerarray, shape (3,)
Center of the circle.
- radiusfloat
Radius of the circle.
- normalarray, shape (3,)
Normal to the plane in which the circle lies.
- epsilonfloat, optional (default: 1e-6)
Values smaller than epsilon are considered to be 0.
- Returns:
- distfloat
The shortest distance between point and circle.
- closest_point_circlearray, shape (3,)
Closest point on the circle.