Distance Between Two Line Segments

버전 1.0.2 (1.57 KB) 작성자: Ayad Al-Rumaithi
Finds the shortest distance between two line segments in 3d space.
다운로드 수: 8
업데이트 날짜: 2023/9/12

라이선스 보기

These functions find the shortest distance between two line segments in 3d space using analytic expression and nonlinear constrained optimization.
function d=Distance2LinesA(va1,va2,vb1,vb2): finds the distance using analytic expression based on the equations in: https://stackoverflow.com/a/67102941
function d=Distance2LinesN(va1,va2,vb1,vb2): finds the distance using nonlinear constrained optimization.
where:
va1 is (3*1) coordinate vector for the first point of line segment a.
va2 is (3*1) coordinate vector for the second point of line segment a.
vb1 is (3*1) coordinate vector for the first point of line segment b.
vb2 is (3*1) coordinate vector for the second point of line segment b.
d is the shortest distance between line segment a and line segment b.

인용 양식

Ayad Al-Rumaithi (2024). Distance Between Two Line Segments (https://www.mathworks.com/matlabcentral/fileexchange/123600-distance-between-two-line-segments), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2017b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
태그 태그 추가

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.2

description

1.0.1

added analytic expression

1.0.0