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

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

问题描述

我正在研究 3D 网格解析工具.目前,我正在尝试确定 3D 空间中两个全等三角形之间的旋转——我们将它们称为 ABCDEF.

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.

我能够将点 AD 转换到相同的位置,现在需要确定将 DEF 置于与 ABC 相同的平面和相同的方向,但我对数学不够熟悉,无法做到这一点.谁能告诉我如何解决这个问题?

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?

我一直在考虑用ABDE的叉积来确定一个旋转轴,然后点积找到一个角度,然后做一个四元数在他们之中;但我不知道这是否会始终正确对齐它们.

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(或其他方式).但这只会对齐一条边.要对齐其他两个,您仍然需要将 C 旋转到 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. 将 A 翻译成 D
  2. 将AB旋转到DE
  3. 通过将三角形的面法线相互旋转来将 C 旋转到 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天全站免登陆