深度实际上是距离孔的距离,而不是垂直深度.方位角来自磁北. Dip基于0是水平的.我想从同一点绘制两条线(0,0很好)并根据这种信息看看它们是如何不同的.
我没有使用Matplotlib的经验,但我对Python感到满意,并希望了解这个绘图工具.我找到了this page并且它有助于理解框架,但我仍然无法弄清楚如何使用3d向量绘制线条.有人可以给我一些关于如何做到这一点或在哪里找到我需要的指示的指示?谢谢
解决方法 将坐标转换为笛卡尔坐标并使用matplotlib绘制的脚本,其中包含以下注释:import numpy as npimport matplotlib.pyplot as plt# import for 3d plotfrom mpl_toolkits.mplot3d import Axes3D# initializing 3d plotfig = plt.figure()ax = fig.add_subplot(111,projection = '3d')# several data points r = np.array([0,14,64,114])# get lengths of the separate segments r[1:] = r[1:] - r[:-1]phi = np.array([255.6,255.6,261.7,267.4])theta = np.array([-79.5,-79.5,-79.4,-78.8])# convert to radiansphi = phi * 2 * np.pi / 360.# in spherical coordinates theta is measured from Zenith down; you are measuring it from horizontal plane up theta = (90. - theta) * 2 * np.pi / 360.# get x,y,z from kNown formulaex = r*np.cos(phi)*np.sin(theta)y = r*np.sin(phi)*np.sin(theta)z = r*np.cos(theta)# np.cumsum is employed to gradually sum resultant vectors ax.plot(np.cumsum(x),np.cumsum(y),np.cumsum(z))总结
以上是内存溢出为你收集整理的python – 将3d钻孔轨迹转换为笛卡尔坐标并使用matplotlib绘制它全部内容,希望文章能够帮你解决python – 将3d钻孔轨迹转换为笛卡尔坐标并使用matplotlib绘制它所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)