【问题标题】:Rotate/Translate a plane from one normal to another将平面从一个法线旋转/平移到另一个法线
【发布时间】:2013-10-30 23:43:57
【问题描述】:

我有一个法线为 (0,1,0) 的平面,即它是一个 x-z 平面。我有了新的常态和距离。我想将我的原始平面转换为新平面的法线/距离。

为了计算旋转,我简单地取了两条法线的叉积,然后通过点积得到角度。然后我旋转了它。如何沿着新常态移动飞机?如果我的原始平面起源于 (0,0,0),我是否只需将其平移 (Nx*d, Ny*d, Nz*d) (其中 N = 新法线,d = 与原点的距离)?

【问题讨论】:

  • 听起来对我来说,假设原来的飞机经过原点......
  • 这个问题似乎是题外话,因为它属于 math.stackexchange.com

标签: graphics 3d geometry linear-algebra


【解决方案1】:

如何沿新法线移动飞机?

我认为你的提议是正确的。

假设您用 unit normaldistance 表示平面,即从原点到平面的距离。然后,您可以进行如下任何翻译,

m_distance += m_normal.Dot(translation); \\ translation will be (Nx*d, Ny*d, Nz*d) in your case. 
m_normal; \\ normal stay the same, as translation won't change the direction of the plan.

在这种情况下实际上 m_distance = m_distance + d。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-14
    • 2013-01-18
    • 2012-10-10
    • 1970-01-01
    • 1970-01-01
    • 2021-07-19
    • 2011-01-06
    • 1970-01-01
    相关资源
    最近更新 更多