如何判断一个形状是否可以通过

发布于 2024-08-31 07:03:36 字数 172 浏览 4 评论 0原文

我有一个复杂的多边形(可能是凹的)和它的一些边缘标记为入口/出口点。该多边形内部有可能存在一个或多个任意形状的障碍物。我可以使用什么方法来确定一对入口/出口边缘之间是否存在一定宽度的路径?

通读完这个问题后,它看起来像是一个家庭作业类型——但事实并非如此。我只是希望至少有一些可以追踪的线索,因为这对我来说是新的。

I have a complex polygon (possibly concave) and a few of its edges marked as entry/exit points. there is a possibility that inside this polygon may lie one or more blockades of arbitrary shape. what approaches could I use to determine whether a path of certain width exists between a pair of entry/exit edges?

having read through the question it looks like a homework type - it is not. I just wish to have a at least a few leads I could pursue, as this is new to me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你是暖光i 2024-09-07 07:03:36

查看运动规划 - 那里有大量信息。

Take a look at Motion Planning - there's a wealth of information there.

最笨的告白 2024-09-07 07:03:36

这取决于路线是否需要有宽度。如果必须移动的对象具有有限的大小,则需要采用域多边形与移动对象的多边形的 Minkowski 差值,然后尝试通过该对象进行路由。

精确计算路径的一种方法是计算多边形的可见性图。可见性图的顶点对应于域多边形的顶点(可能在障碍物所在的地方有孔),并且如果两个顶点可以彼此“看到”,则通过边连接它们。如果存在一组连接入口和出口的边,则该形状是可以通过的。您还可以计算最短路径等内容。以简单的方式计算可见性图并不难,但速度很慢。有非常先进的算法可以做到这一点,但它们(据我所知)尚未实现。几年前我尝试过实施,但效果平平。它们中的大多数使用精确算术假设顶点处于一般位置,而实际应用将使用浮点数。

It depends on if the route needs to have a width to it. If the object that has to move through has a finite size, you need to take the Minkowski difference of your domain polygon with the moving object's polygon, then you try to route through that.

One way to compute paths exactly is to compute the visibility graph of the polygon. The visibility graph has vertices corresponding to the vertices of the domain polygon (possibly with holes where the obstacles are), and two vertices are connected by an edge if they can "see" each other. The shape is passable if there exists a set of edges joining an entry to an exit. You can also compute things like shortest paths. Computing the visibility graph in a naive way is not hard, but slow. There are very advanced algorithms for doing it, but they (AFAIK) have not been implemented. I tried implementing a few several years ago, with only mediocre results. Most of them assume vertices in general position, using exact arithmetic, whereas practical applications would use floating point numbers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文