【问题标题】:Calculate 3D point coordinates using horizontal and vertical angles and slope distance使用水平和垂直角度以及斜距计算 3D 点坐标
【发布时间】:2015-08-17 15:38:23
【问题描述】:

我正在尝试学习如何使用原点的 XYZ 坐标、水平和垂直角度以及 3d 距离来计算点的 XYZ 坐标。我可以通过将点投影到 2D 平面上简单地进行计算,但是在 3D 中是否有更直接的方法?

我试图了解测量全站仪如何根据其测量位置、测量到新点的 3d(坡度)距离以及瞄准新点的测量水平和垂直角度来计算新点位置地点。

谢谢,

E

【问题讨论】:

标签: 3d coordinates trigonometry


【解决方案1】:

只是关于约定的注释:2D polar coordinates 经常使用(radius, theta),其中theta 是“水平”或“方位角”角度。它的范围从:theta=0,X 轴上的 2D 点 (x,y) = (radius,0),到:XY 平面上的theta=2*PI - 随着theta 的增加,逆时针方向。现在来混淆视听......

3D spherical coordinates(保持右手坐标系)经常使用坐标:(radius, theta, phi)。在这种情况下,theta 用于“垂直”或“天顶”角度,范围从theta=0(Z 轴)到theta=PI(-Z 轴)。 phi 用于方位角。

其他教科书将使用不同的约定 - 但这似乎受到物理学家和(某些)数学教科书的青睐。 重要的是你选择一个约定并始终如一地使用它。

如下:

radius:到点的距离。给定笛卡尔坐标中的点(x,y,z),我们有(毕达哥拉斯)半径:r = sqrt(x * x + y * y + z * z),例如,0 <= radius < +infinity

theta:天顶角,其中theta=0 在正上方(+Z 轴),theta=PI 在正下方(-Z 轴),theta=PI/2是您认为 0 度的“仰角”,例如,
0 <= theta <= PI

phi:方位角,其中phi=0 指向“右”(+X 轴),当您“逆时针”转动时,phi=PI/2(+Y轴)、phi=PI(-X 轴)、phi=3*PI/2(-Y 轴)和 phi=2*PI - 等效于 phi=0(返回 +X 轴)。例如,0 <= phi < 2*PI


伪代码:(标准数学库三角函数)

从(radius, theta, phi)你可以找到点(x,y,z):

x = radius * sin(theta) * cos(phi);
y = radius * sin(theta) * sin(phi);
z = radius * cos(theta);

相反,您可以找到(radius, theta, phi) 来自 (x,y,z):

radius = sqrt(x * x + y * y + z * z);
theta = acos(z / radius);
phi = atan2(y, x);

注意:在最终等式中使用atan2 很重要,不是 atan!

【讨论】:

  • 我的英雄 - 我正在寻找这个。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-07-10
  • 1970-01-01
  • 2022-01-15
  • 1970-01-01
  • 2017-05-18
  • 2016-06-19
  • 1970-01-01
相关资源
最近更新 更多