查找两个全等三角形之间的旋转 [英] Finding rotation between two congruent triangles

查看:198
本文介绍了查找两个全等三角形之间的旋转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的三维网格分析工具。目前,我正在试图确定在三维空间和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:

  1. 翻译到ð
  2. AB旋转到DE
  3. 旋转下向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.

这篇关于查找两个全等三角形之间的旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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