将3D点转换为2D点坐标系,反之亦然

时间:2012-03-28 17:57:44

标签: math 3d geometry 2d

我正在尝试将点(x,y,z)转换为点(u,v)。我在维基中使用过方程式:

http://en.wikipedia.org/wiki/N-vector#Converting_latitude.2Flongitude_to_n-vector

将点(3,2)转换为3D

as:

 x=Math.cos(lat)*Math.cos(lon);
 y=Math.cos(lat)*Math.sin(lon);
 z=Math.sin(lat);

从3D点到2D:

v=Math.asin(z);   
u=Math.atan2(y,x);

但问题是它没有给出从转换点(3,2)到3D的相同值 然后再次2D,这不等于(3,2)

1 个答案:

答案 0 :(得分:0)

您正在使用的三角函数期望它们以弧度为单位输入,您给出的纬度和经度以度为单位。

相关问题