午夜剧场伦理_日本一道高清_国产又黄又硬_91黄色网战_女同久久另类69精品国产_妹妹的朋友在线

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

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

瀏覽:100日期: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 編程
相關文章:
主站蜘蛛池模板: 纪美影视在线观看电视版使用方法 | 天堂资源中文在线 | 成人免费看片视频在线观看 | xxxx国产精品 | 永久免费网站视频在线观看 | 国产999精品久久久久久 | 国产成人精品免高潮在线观看 | 中文字幕不卡在线观看 | 在线男人天堂 | 国产视频手机在线 | 中文字幕日本 | 国产精品s色 | 日韩精品视 | 欧美高清精品 | 成人欧美在线观看 | 婷婷丁香社区 | 91青青草视频 | 天天干视频在线 | 成人在线免费观看视频 | 国产日韩精品一区 | 毛片视频网站 | 成年人免费看毛片 | 欧美日韩高清在线观看 | 日韩一区二区在线观看视频 | 99久久视频 | 成人午夜毛片 | 日韩激情一区二区三区 | 视频福利在线 | 成人精品99| 国产三级中文字幕 | 亚洲国产系列 | 亚洲视频一区在线 | 亚洲视频在线一区 | 久久草精品| 亚洲精品日韩欧美 | 国产三级自拍 | 日韩精品欧美精品 | 国内精品视频在线播放 | 亚洲精品观看 | 成年人的黄色片 | 中国久久久久 |