Distance Between a Triangle and a Point

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

查看许可证

This function finds the shortest distance between a triangle and a point in 3d space using nonlinear constrained optimization.
function d=DistanceTrianglePoint(vt1,vt2,vt3,vp)
where:
vt1 is (3*1) coordinate vector for the first vertex of the triangle.
vt2 is (3*1) coordinate vector for the second vertex of the triangle.
vt3 is (3*1) coordinate vector for the third vertex of the triangle.
vp is (3*1) coordinate vector of the point.
d is the shortest distance between the triangle and the point.

引用格式

Ayad Al-Rumaithi (2024). Distance Between a Triangle and a Point (https://www.mathworks.com/matlabcentral/fileexchange/123605-distance-between-a-triangle-and-a-point), 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