查找两个全等三角形之间的旋转角形、两个、全等

由网友(呆萌的欧尼酱)分享简介:我工作的三维网格分析工具。目前,我正在试图确定在三维空间和mdash两个全等三角形之间的轮换,我们将称之为农行和 DEF 。I'm working on a 3D mesh parsing tool. Currently, I'm trying to determine the rotation between t...

我工作的三维网格分析工具。目前,我正在试图确定在三维空间和mdash两个全等三角形之间的轮换,我们将称之为农行 DEF

I'm working on a 3D mesh parsing tool. Currently, I'm trying to determine the rotation between two congruent triangles in 3D space—we'll call them ABC and DEF.

我能够把点 A D 到相同的位置,现在需要确定的旋转这将使 DEF 在同一平面上,并在同一方向为农行,但我不熟悉不够的数学来做到这一点。谁能告诉我怎样才能解决呢?

I'm able to translate points A and D to the same location and now need to determine a rotation that would place DEF on the same plane and in the same orientation as ABC but I'm not familiar enough with the math to do it. Can anyone tell me how I can tackle this?

我一直在想用 AB的积 DE 来确定旋转轴,则点积找到一个角度,然后又做了四元数出其中;但我不知道这是否会始终正确对齐。

I've been thinking of using the cross product of AB and DE to determine a rotation axis, then the dot product to find an angle, then making a quaternion out of them; but I don't know if that will always properly align them.

我是弄错了上述想法?它会始终对准三角形?如果不会,什么是另类的方式找到一个旋转?

Am I mistaken about the above idea? Will it always align the triangles? If it won't, what is an alternative way to find a rotation?

推荐答案

您与您的第一部分旋转AB到DE(或其他方式)的权利。但这只对准一个边缘。要调整其他两个,你仍然需要旋转下向F(你的第一个旋转后)。留点角,轴可以通过只旋转三角形到对方的两个面法线使用建议的方法来计算(从你的问题我想你知道如何计算面法线三角形)。

Your right with your first part rotating AB onto DE (or the other way). But this only aligns one edge. To align the other two, you still need to rotate C onto F (after your first rotation). The neccessary angle and axis can be computed by just rotating the two face normals of the triangles onto each other using your proposed approach (from your question I suppose you know how to compute the face normal of a triangle).

编辑:所以采取这些步骤依次是:

So take these steps in order:

翻译到ð AB旋转到DE 旋转下向F根据旋转三角形的面法线到对方

您必须采取已经部分转化的三角形(步骤2之后)的面法线,但它可能是它们是相同的原有的(不知道这一点)。然后,你可以拼接这些转换成一个。

You have to take the face normals of the already partly transformed triangles (after step 2), but it could be that they are the same as the original ones (not sure about that). You can then just concatenate those transformations into one.

阅读全文

相关推荐

最新文章