全文预览

Python程序设计期末作业.doc

上传者:苏堤漫步 |  格式:doc  |  页数:6 |  大小:0KB

文档介绍
0,0,1),forward=(-8,-1,-2))B=[]#球数组foriinrange(N):B.append(sphere(pos=mySys.getBallPos(i),radius=R,material=materials.plastic))P=box(pos=mySys.getBoardPos(),length=28.5,height=28.5,width=1,material=materials.wood)#平板H=helix(pos=(0,0,-30),axis=(0,0,1),coils=10,radius=7.5,length=30,material=materials.chrome)#弹簧#生成三面壁和上壁WallL=box(pos=(0,-15,0),length=30,height=1,width=59,material=materials.rough)WallR=box(pos=(0,15,0),length=30,height=1,width=59,material=materials.rough)WallF=box(pos=(-15,0,0),length=1,height=30,width=59,material=materials.rough)WallU=box(pos=(0,0,30),length=31,height=31,width=1,material=materials.rough)whileTrue:foriinrange(100):mySys.go(4e-4)#迭代100次,每次0.4毫秒,则系统状态更新40毫秒#根据物理模型重新绘制物体foriinrange(N):B[i].pos=mySys.getBallPos(i)P.pos=mySys.getBoardPos()H.length=P.pos.z+30rate(50)

收藏

分享

举报
下载此文档