91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類(lèi)型: .py
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-08
  • 語(yǔ)言: Python
  • 標(biāo)簽: DLA??cluster??

資源簡(jiǎn)介

can draw the model of the DLA cluster

資源截圖

代碼片段和文件信息

#?-*-?coding:?utf-8?-*-
import?numpy?as?np
from?pylab?import?*
import?random?as?ra
import?matplotlib.pyplot?as?plt
from?random?import?choice
fig?=?plt.figure()
ax=fig.add_subplot(111)

x=np.zeros((8080))
x[40][40]=1
ax.plot(4040‘b.‘)
for?n?in?range?(010):
????X=[]
????Y=[]
????d=0
????for?i?in?range?(179):
????????for?j?in?range?(179):
????????????if?x[ij]==0?and?(x[i+1j]==1?or?x[i-1j]==1?or?x[ij+1]==1?or?x[ij-1]==1):
????????????????d=d+1
????????????????X.append(i)
????????????????Y.append(j)
????a=ra.randint(0d-1)
????b=X[a]
????c=Y[a]
????x[b][c]=1
for?n1?in?range?(010):
????X1=[]
????Y1=[]
????d1=0
????m=0
????for?i1?in?range?(179):
????????for?j1?in?range?(179):
????????????if?x[i1j1]==0?and?(x[i1+1j1]==1?or?x[i1-1j1]==1?or?x[i1j1+1]==1?or?x[i1j1-1]==1):
???????

評(píng)論

共有 條評(píng)論