【问题标题】:Algorithm to find the coordinates of a point which is the reflection of a point about a line in 3D [closed]查找点坐标的算法,该点是点在 3D 中关于一条线的反射 [关闭]
【发布时间】:2014-05-09 21:38:06
【问题描述】:

我目前正在使用 Matlab 进行一个项目,我需要找到反映在一条线上的点的坐标。我知道如何在 2D 中做到这一点,但在 3D 中,事情变得越来越丑陋。

所以,我们有一条线穿过两个点 A(x1,y1,z1) 和 B(x2,y2,z2)。 P1(x0,y0,z0) 反射在那条线上,我需要一个算法来找到 P1 的反射坐标。

【问题讨论】:

  • 这个问题似乎跑题了,因为它是关于数学/几何的(试试math.stackexchange.com)。
  • 我需要这个问题的算法。所以,我最好编辑内容。
  • 听起来你需要方程,这使它成为一个纯粹的几何问题。
  • 这个问题可以看一下吗:link

标签: algorithm matlab geometry


【解决方案1】:

首先,求点P到AB线的投影L。

L = A + AB * ScalarProduct(AB, AP) / ScalarProduct(AB, AB)

然后计算反射

P' = P + 2*(L-P) = 2*L-P

【讨论】:

  • 非常感谢.. :)
猜你喜欢
  • 1970-01-01
  • 2021-03-13
  • 2021-03-22
  • 2019-03-20
  • 1970-01-01
  • 1970-01-01
  • 2016-11-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多