色综合图-色综合图片-色综合图片二区150p-色综合图区-玖玖国产精品视频-玖玖香蕉视频

您的位置:首頁技術文章
文章詳情頁

python實現經緯度采樣的示例代碼

瀏覽:41日期:2022-07-02 15:57:16
原理

經度 phi,緯度 theta 處的坐標為:x =R* cos(phi) * cos(theta)y = Rsin(phi) * cos(theta)z = Rsin(theta)

問題

經緯度采樣的采樣點是相同經緯度間隔的交點。但是采樣1000個點,如何劃分多少條經線,多少條緯線相交,才能使1000個采樣點最均勻的分布在球面上(雖然經緯度采樣本來就不均勻,但對于不同的采樣點個數應該有一種相對最均勻的經緯線劃分)?求大佬指教!我目前是將緯度每10度進行劃分。

Code

import randomfrom mpl_toolkits import mplot3dimport numpy as npimport mathimport matplotlib.pyplot as plt%matplotlib inlineax=plt.axes(projection='3d')N=1000x=[]y=[]z=[]r=1#經度def longitude(lng): phi=(180+lng)*(math.pi/180) return phi#緯度def latitude(lat): theta=lat*(math.pi/180) return thetafor i in range(-80,90,10): for j in np.arange(-180,180,360/((N-2)/17)): #x.append(-r*math.sin(latitude(i))*math.cos(longitude(j))) #y.append(r*math.cos(latitude(i))) #z.append(r*math.sin(latitude(i))*math.sin(longitude(j)))x.append(r*math.cos(latitude(i))*math.cos(longitude(j))) z.append(r*math.sin(latitude(i))) y.append(r*math.cos(latitude(i))*math.sin(longitude(j)))x.append(r*math.cos(latitude(-90))*math.cos(longitude(0)))z.append(r*math.sin(latitude(-90)))y.append(r*math.cos(latitude(-90))*math.sin(longitude(0)))x.append(r*math.cos(latitude(90))*math.cos(longitude(0)))z.append(r*math.sin(latitude(90)))y.append(r*math.cos(latitude(90))*math.sin(longitude(0)))xline=np.array(x)yline=np.array(y)zline=np.array(z)print(xline.shape)ax.scatter3D(xline,yline,zline,s=2)plt.savefig('D:samples經緯度采樣.png')

效果

python實現經緯度采樣的示例代碼

到此這篇關于python實現經緯度采樣的示例代碼的文章就介紹到這了,更多相關python 經緯度采樣內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!

標簽: Python 編程
相關文章:
主站蜘蛛池模板: 欧美成人吃奶高清视频 | 黑人边吃奶边扎下面激情视频 | 91成人小视频| 免费看欧美一级特黄a毛片 免费看片aⅴ免费大片 | 成年人在线观看视频免费 | 精品一区二区视频 | 成人在线免费观看网站 | 久久精品二区 | 99视频网| 免费一级毛片私人影院a行 免费一级毛片无毒不卡 | 国产成在线观看免费视频成本人 | 久久熟 | 精品高清国产a毛片 | 一级特黄aa大片欧美 | 国产精品尹人在线观看免费 | 美国黑人特大一级毛片 | 性色xxx | 欧美日韩国产一区三区 | 国产一线视频在线观看高清 | 欧美国产精品亚洲精品第一区 | 亚洲欧美一区二区久久 | 在线成人 | 国产精品1区 | 国产成人丝袜网站在线看 | 久久精品2020 | 久久在线播放 | 亚洲狠狠ady亚洲精品大秀 | 欧美曰批人成在线观看 | 91丨九色丨首页在线观看 | 国内外成人免费在线视频 | 日韩在线视频免费不卡一区 | 亚洲欧美视频一区 | 99精品视频免费在线观看 | 99精品免费在线 | 亚洲第一网站 | 亚洲天堂视频在线免费观看 | 日本在线观看不卡免费视频 | 精品视频在线观看一区二区三区 | 国产女乱淫真高清免费视频 | 欧美性猛交xxxxx按摩国内 | 美女一级毛片免费看看 |