书本做灯笼的步骤,3d打印笔制作灯笼
另一方面,要安装所需的库,首先要在pip install wxgl安装完成后加载wxgl库
#!/usr/bin/env python #-- coding : GB 2312-- importnumpyasnpfrompilimportimportwxgl.wxplotasplt 2,加载图像im=NP/usr --coding : GB 2312-- importnumpyasnpfrompilimportimportwxgl.wxplotaspltim=NP.arrr or 255 rows,cols,deep=im.shaper 2 * NP.pi * rows/cols theta=NP.linspace (0,2 * NP.pi,cols ) x=r h,rows(xs=NP.tile ) x,(rows,1 ) endpoint=false(x=r*NP.cos ) theta ) y=r*NP.sin ) theta ) x [ 2:3 ]=x [ 133603:3 ] x [ 133:33366 axis=1) PLT.mesh ) xs,ys,zs,iii method='T ',mode强冥王星',alpha=0.8 ) PLT.sphere ((0,0,h*0.4 ),' #