import stadium import matplotlib.pyplot as mpl from mpl_toolkits.mplot3d import Axes3D import numpy as np import data import mymath import densities fig = mpl.figure() ax = Axes3D(fig) ax.axis('equal') s1 = stadium.stadium('thickradius',1.0,0.5) print s1.thick print s1.radius s2 = stadium.stadium('thickradius',0.5,0.2) print s2.thick print s2.radius height = 5 #s1.plot(ax,'r') #s2.plot(ax,'g') pos = np.array([0,0,0]) direct = np.array([0,0,0]) theta = pos S0 = stadium.stadiumsolid(densities.Ds[0],pos,direct,'r',s1,s2,height) S0.draw(ax)
import matplotlib.pyplot as mpl from pylab import * import numpy as np import stadium s1 = stadium.stadium(10.0,4.0) print s1.t print s1.r s2 = stadium.stadium(8.0,3.5) theta = [np.linspace(0.0,np.pi/2.0,5)] x = s1.t + s1.r * np.cos(theta); y = s1.r * np.sin(theta); xrev = x[:, ::-1] yrev = y[:, ::-1] X = np.concatenate( (x, -xrev, -x, xrev) ) Y = np.concatenate( (y, yrev, -y, -yrev) ) c = 'g' # fill(X,Y,c,edgecolor='g', alpha = 0.5) #fill(x,y,'b') # show() s1.plot()
#for url_number in promo_list: #for ループ内でカード毎にアクセス url = "https://www.pokemon-card.com/card-search/details.php/card/" + str( url_number) + "/regu/XY" get_url_info = requests.get(url) bs4obj = BeautifulSoup(get_url_info.text, 'lxml') if bs4obj.select('.RightBox .mt20')[0].get_text() != '': #ポケモン、グッズ、ポケモンのどうぐ、サポート、スタジアム、基本エネルギー、特殊エネルギーで処理ファイル分け if bs4obj.select('.RightBox .mt20')[0].get_text() == 'グッズ': goods.goods(bs4obj) elif bs4obj.select('.RightBox .mt20')[0].get_text() == 'ポケモンのどうぐ': goods.goods(bs4obj) elif bs4obj.select('.RightBox .mt20')[0].get_text() == 'サポート': suport.suport(bs4obj) elif bs4obj.select('.RightBox .mt20')[0].get_text() == 'スタジアム': stadium.stadium(bs4obj) elif bs4obj.select('.RightBox .mt20')[0].get_text() == '基本エネルギー': energy.energy(bs4obj) elif bs4obj.select('.RightBox .mt20')[0].get_text() == '特殊エネルギー': energy.energy(bs4obj) #なぞの化石がページバグでトレーナーになっているため例外として処理 elif bs4obj.select('.RightBox .mt20')[0].get_text() == 'トレーナー': goods.goods(bs4obj) #ポケモンだけこの要素がポケモン名になっているためelseで処理 else: pokemon.pokemon(bs4obj) print(url_number) print(pack) print('/')