- 积分
- 0
- 注册时间
- 2013-4-17
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2014-12-28 08:40:25
|
显示全部楼层
来自 安徽合肥
视频文件7M,转成gif的33M了。更传不上去了,还是截图吧。呵呵
源代码如下:这是最初的版本,后面有过几次修改,不过这个基本上能反映这个问题啦。呵呵
new
set random
plot create tunnel
plot set back white
plot add wall black ball yellow
def initial_parameters
w_stiff=1e8
b_stiff=1e7
end
initial_parameters
wall id 10 type circle center 0 0 rad 4 kn=w_stiff ks=w_stiff
wall id 1 nodes (0,-2.5) (0,-4) kn=w_stiff ks=w_stiff
wall id 2 nodes (2.5,0) (4,0) kn=w_stiff ks=w_stiff
wall id 3 nodes (0,2.5) (0,4) kn=w_stiff ks=w_stiff
wall id 4 nodes (-2.5,0) (-4,0) kn=w_stiff ks=w_stiff
wall id 5 nodes (1,0) (-1,0) kn=w_stiff ks=w_stiff
wall id 6 nodes (0,-1) (0,1) kn=w_stiff ks=w_stiff
plot show
gen x 0 2 y -2.5 0 rad 0.06 0.1 id 1,50
prop density=2650 kn=b_stiff ks=b_stiff
set gravity 0 -9.81
cyc 20000
wall prop spin 1.1 x 0 y 0
set plot avi size 640 480
movie avi_open file tunnel_movie.avi
movie step 10000 1 file tunnel_movie.avi
set dt 1e-4
cyc 100000
movie avi_close file tunnel_movie.avi
|
|