如何找到如果3D对象在另一个3D对象(容器)适合? [英] How to find if a 3D object fits in another 3D object (the container)?

查看:163
本文介绍了如何找到如果3D对象在另一个3D对象(容器)适合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鉴于两个3D对象,我怎么能找到,如果选择一个适合里面的第二个(和找对象的在容器中的位置)。

Given two 3d objects, how can I find if one fits inside the second (and find the location of the object in the container).

的对象应该被平移和旋转,以适应容器 - 但不能修改,否则

The object should be translated and rotated to fit the container - but not modified otherwise.

其他并发症:

  1. 同样的情况 - 而是寻找最适合的解决方案,即使它不是一个正确的匹配(最小化不适合在容器中的物体的体积)

  1. The same situation - but look for the best fit solution, even if it's not a proper match (minimize the volume of the object that doesn't fit in the container)

弹性对象的支持 - 找到最适合同时最大限度地减少了物体的失真

Support for elastic objects - find the best fit while minimizing the "distortion" in the objects

这是一个pretty的一般性的问题 - 我不希望一个完整的解决方案。 任何指针有关文件\文章\库\工具将是有益的。

This is a pretty general question - and I don't expect a complete solution. Any pointers to relevant papers \ articles \ libraries \ tools would be useful

推荐答案

考虑一个多边形(三角形)的目标对象研究。对于这个多边形,发现在其他几何图形(源)相当于多边形,即。该边的长度,所述边缘之间的角度,面积都应该是相同的。如果只有一个匹配,找到刚性变换矩阵,它改变了顶点方式: X'= M * X 。由于 X' X 是众所周知的匹配多边形的所有点,这应该是可行的线性代数。

Consider one polygon(triangle) in the target object. For this polygon, find the equivalent polygon in the other geometry (source), ie. the length of the sides, angle between the edges, area should all be the same. If there's just one match, find the rigid transform matrix, that alters the vertices that way : X' = M*X. Since X' AND X are known for all the points on the matched polygons, this should be doable with linear algebra.

如果你想要的多边形的顶点之间的一对一映射,遍历以相同的顺序的多边形的边缘,并作出这样的一一映射聚每个顶点到顶点的另一个查找表。如果你有一个半边数据结构您的3D对象的那会简化这个过程很大。

If you want a one-one mapping between the vertices of the polygon, traverse the edges of the polygons in the same order, and make a lookup table that maps each vertex one one poly to a vertex in another. If you have a half edge data structure of your 3d object that'll simplify this process a great deal.

如果您发现多个匹配的多边形,无论从点遍历源多边形,并保持与目标相匹配的多边形及其附近的多边形。继续,直到其中一次突破,之后就可以做同样的步骤,一个匹配的版本。

If you find more than one matching polygon, traverse the source polygon from both the points, and keep matching their neighbouring polygons with the target polygons. Continue until one of them breaks, after which you can do the same steps as the one-match version.

目前是比较严重的解决方案that're上市的此处,但我觉得上面的方法将正常工作。

There're more serious solutions that're listed here, but I think the method above will work as well.

这篇关于如何找到如果3D对象在另一个3D对象(容器)适合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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