- 积分
- 1
- 注册时间
- 2010-1-4
- 仿真币
-
- 最后登录
- 1970-1-1
|
昨晚看到bjtushigui的pfc2D打台球的帖子,感觉很好玩,就比这做了个3D的,照猫画虎,大家看看!轻拍!尺寸就按台球桌的实际尺寸
new
wall id=1 ks 1e7 kn 1e7 friction 0.1 face (0,0,0) (2.81,0,0) (2.81, 1.53,0) (0,1.53,0)
wall id=2 ks 1e7 kn 1e7 face (0.1,0,0) (0.1,0,0.05) (1.305,0,0.05) (1.305,0,0)
wall id=3 ks 1e7 kn 1e7 face (1.505,0,0) (1.505,0,0.05) (2.76,0,0.05) (2.71,0,0)
wall id=4 ks 1e7 kn 1e7 face (0.1,1.53,0) (1.305,1.53,0) (1.305,1.53,0.05) (0.1,1.53,0.05)
wall id=5 ks 1e7 kn 1e7 face (1.405,1.53,0) (2.71,1.53,0) (2.71,1.53,0.05) (1.405,1.53,0.05)
wall id=6 ks 1e7 kn 1e7 face (0,0.1,0) (0,1.43,0) (0,1.43,0.05) (0,0.1,0.05)
wall id=7 ks 1e7 kn 1e7 face (2.81,0.1,0) (2.81,0.1,0.05) (2.81,1.43,0.05) (2.81,1.43,0)
def goalball
idc=2
xc=0.875
yc=0.765
rc=0.057
loop col(1,5)
loop row (1,col)
command
ball id=idc x=xc y=yc z=0.057 rad=rc
end_command
idc=idc+1
if col#1
if row < col
yc=yc-0.114
endif
endif
end_loop
xc=xc-rc*sqrt(3)
yc=yc+rc*(2*col-1)
end_loop
end
goalball
ball id=123 rad 0.057 x 2.175 y 0.765 z 0.057
macro zero 'ini xvel 0 yvel 0 xd 0 yd 0'
plot create taiqiu
plot add ball id on red
plot add ball id off range id 123 white
plot add wall green
plo set rot 20 0 50
plo set mag 1.95
plot show
prop density 2000 kn 1e8 ks 1e8 fric 0.1
set gravity 0 0 -10
set dt dscale
zero
prop xvel -0.002 yvel -0.00002 range id=123
pause
cyc 50000
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
评分
-
1
查看全部评分
-
|