Distance of a circle to a line in 3d
版本 2.1.0.0 (3.6 KB) 作者:
Johannes Korsawe
Calculate the nearest points on a circle with respect to a line in 3d
A line is defined by a point and a vector in 3d.
A circle is defined by a midpoint and a radius and the normal vector of the supporting plane, the circle lies inside.
This function calculates the nearest point (and the minimal distance) of a circle to a line in 3d.
Function is not vectorized, as too many special cases can occur.
I have not developed the algorithm itself. The algorithm has been originally implemented by David Eberly, Geometric Tools, Redmond WA 98052 !
Kudos also to Aaron T. Becker's Robot Swarm Lab's comments on an erroneous case.
See also: https://www.geometrictools.com/Documentation/DistanceToCircle3.pdf and https://www.geometrictools.com/GTE/Mathematics/DistLine3Circle3.h with only minor changes on variable names and calculations.
引用格式
Johannes Korsawe (2024). Distance of a circle to a line in 3d (https://www.mathworks.com/matlabcentral/fileexchange/59800-distance-of-a-circle-to-a-line-in-3d), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2022b
兼容任何版本
平台兼容性
Windows macOS Linux类别
- Mathematics and Optimization > Mapping Toolbox > Data Analysis > Vector Data >
- Radar > Mapping Toolbox > Data Analysis > Vector Data >
在 Help Center 和 MATLAB Answers 中查找有关 Vector Data 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
2.1.0.0 | Fixed for erroneous case as suggested by Aaron T. Becker's Robot Swarm Lab |
||
2.0.0.0 | First version was generally wrong and correct only in special cases.
|
||
1.0.0.0 | edited title of submission |