用于计算三维网格表面上两点之间的最短路径的算法 [英] Algorithm to calculate the shortest path between two points on the surface of a 3D mesh

查看:620
本文介绍了用于计算三维网格表面上两点之间的最短路径的算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个算法来计算以下内容:

我有:


  1. 3D三角形网格。三角形不一定在一个平面上。两个相邻三角形的范数向量之间的夹角小于90度。

  2. 两点。这两点位于三角形网格的边缘或网格的三角形内。

我需要计算表示网格上两点之间最短路径的折线。

最简单和/或最有效的策略是什么?

解决方案

现在,您的问题没有明确定义;根据用于将线段投影到网格上的方向,可以有许多解决方案。

选择投影方向后,将网格平铺到垂直于投影方向的平面。此时,您的网格是2d边(线段)的集合;只需确定每条边与目标线段的交点(如果有的话)即可。




编辑



现在更新的问题已经很好定义。由于我对原始问题(上文)的回答已被标记为已接受,可能这意味着以下评论中提供的信息实际上是正在被接受的更新问题。我会总结一下:


I am looking for an algorithm to calculate the following:

I have:

  1. A 3D triangle mesh. The triangles do not necessarily lie in one plane. The angle between the norm vectors of two neighbouring triangles is less then 90 degrees.

  2. Two points. The two points lie either on an edge of the triangle mesh or inside a triangle of the mesh.

I need to calculate the polyline which represents the shortest path between the two points on the mesh.

What is the simplest and/or most effective strategy to do this?

解决方案

As it stands, your problem is not well defined; there can be many solutions depending on the direction used to "project" the line segment onto the mesh.

Once you have chosen the direction of projection, flatten the mesh onto a plane perpendicular to the direction of projection. At this point, your mesh is a collection of 2d edges (line segments); just determine the intersection (if any) of each edge with your target line segment.


Edit:

The updated question is now well defined. Since my answer to the original question (above) has been marked as accepted, presumably that means the information given in the comments below are actually what was really being "accepted" for the update question. I'll summarize:

这篇关于用于计算三维网格表面上两点之间的最短路径的算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆