地球纬度&经度纬度和经度在3D球体上的经度

时间:2013-03-04 21:47:52

标签: geolocation geometry

我之前从未做过这样的事情,但我正在做的是制作一个3D球体(它有像地球一样的纹理),就像我希望使用特定谷歌地图的纬度和经度在其上绘制位置一样。如果我想知道,我的球体半径明显小于地球半径,这仍然会影响纬度和经度值到xyz的位置,给出以下公式:

tx = radiusOfSphere * cos(latitude) * cos(longitude);
ty = radiusOfSphere * -sin(latitude);
tz = radiusOfSphere * cos(latitude) * sin(longitude);

1 个答案:

答案 0 :(得分:1)

  • tx ^ 2 + ty ^ 2 + tz ^ 2 = radius ^ 2& math = radius ^ 2,所以你在你的球体上。
  • 如果纬度= 0,那么ty = 0,所以你在与赤道平行的圆上。
  • 如果经度= 0,那么tz = 0,所以你在经络上。

只需检查您是否在 xyz 而不是 xzy zyx ,并且North是x> 0且East y> 0,或者任何符号与3D渲染软件的视角兼容。