Distance of a circle to a line in 3d

Calculate the nearest points on a circle with respect to a line in 3d
73 téléchargements
Mise à jour 5 sept. 2023

Afficher la licence

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.

Citation pour cette source

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. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2022b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
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.
New version with total new algorithm derived from https://www.geometrictools.com/Documentation/DistanceToCircle3.pdf

1.0.0.0

edited title of submission