Distance Between Two Triangles

版本 1.0.1 (1.3 KB) 作者: Ayad Al-Rumaithi
Finds the shortest distance between two triangles in 3d space.
7.0 次下载
更新时间 2024/9/22

查看许可证

This function finds the shortest distance between two triangles in 3d space using nonlinear constrained optimization.
function d=Distance2Triangles(va1,va2,va3,vb1,vb2,vb3)
where:
va1 is (3*1) coordinate vector for the first vertex of triangle a.
va2 is (3*1) coordinate vector for the second vertex of triangle a.
va3 is (3*1) coordinate vector for the third vertex of triangle a.
vb1 is (3*1) coordinate vector for the first vertex of triangle b.
vb2 is (3*1) coordinate vector for the second vertex of triangle b.
vb3 is (3*1) coordinate vector for the third vertex of triangle b.
d is the shortest distance between triangle a and triangle b.

引用格式

Ayad Al-Rumaithi (2024). Distance Between Two Triangles (https://www.mathworks.com/matlabcentral/fileexchange/123620-distance-between-two-triangles), 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.1

Added website

1.0.0