distance2curve

Find the closest point on a (n-dimensional) curve to any given point or set of points

이 제출물을 팔로우합니다

I've seen many people ask for a way to find the closest point on a curve from some given point in space. If the curve is a piecewise linear one, this is not too difficult, since this reduces to finding the closest point on a line segment, and then testing each line segment. (With care, you need not test EVERY line segment.)

For a cubic spline however, this becomes more difficult, but still doable in a mathematical sense without an explicit optimization. Not too much more than roots is necessary.

Distance2curve allows you to specify a set of general points in an n-dimensional space as a connected space curve. A spline (or pchip) is then fit in terms of arc length along the curve, and the closest point identified.

인용 양식

John D'Errico (2026). distance2curve (https://kr.mathworks.com/matlabcentral/fileexchange/34869-distance2curve), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 준 파일: jdugge/xy2sn

카테고리

Help CenterMATLAB Answers에서 Interpolation에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.1.0.0

Bug fix: if nargout >= 2

1.0.0.0