在极坐标系下绘制任意取向三轴椭球体与平面相交的最佳方法是什么?飞机在给定纬度的经度范围内飞行。在
下面的代码应该画出一个球体阵列与一个具有纬度平面的平面的交点(球体有中心坐标:sphere_x,sphere_y,sphere_z;距离原点的距离:sphere_dist;球面半径:sphere_rad。)
for i in range(len(hole_rad)):
deltaz = (sphere_dist[i]*np.cos(sphere_lat[i]*degtorad))*np.tan(plane_lat*degtorad)-sphere_dist[i]*np.sin(sphere_lat[i]*degtorad)
if np.abs(deltaz)<sphere_radius[i]:
rprime = sphere_rad[i]*np.sin(np.arccos(abs(deltaz)/(sphere_rad[i])));
x = rprime * np.sin(newtheta)+sphere_x[i]*H0
y = rprime * np.cos(newtheta)+sphere_y[i]*H0
z = np.zeros(np.shape(newtheta))
cr,clat,clon=ACD.cartesian_to_spherical(x,y,z)
circles=ax.plot(np.rad2deg(clon),cr,c='blue',linewidth=0.1)
这是我使用python/matplotlib进行的迂回尝试。一定有更好的方法来完成这件事。 对于椭球体(最好是python)有什么想法吗?在
目前没有回答
相关问题 更多 >
编程相关推荐