找回密码
 注册
Simdroid-非首页
查看: 306|回复: 4

[命令/FISH] 手册中的一个地下水位的例子,大家帮忙解释一下。

[复制链接]
发表于 2008-4-1 12:28:12 | 显示全部楼层 |阅读模式 来自 四川成都
这是定义地下水位的程序,看不太懂,哪位能解释一下:
1.table1后面的一系列数据表示啥意思?
2. 能否用汉语说一下生成水面的过程?
def parm
        nptab1=7
        nprof=10
end
parm
table 1 12 0 18.25 12.5 25 17 35 21 50 24 75 25 150 25
def aux1
        loop n(1,nptab1)
                rr=xtable(1,n)
                zz=ytable(1,n)
                loop k(1,nprof)
                        case_of k
                                alfa=0.5*(pi+.1)*float(k-2)/float(nprof-2)
                                xtable(n+10,k)=rr*cos(alfa)
                                ytable(n+10,k)=rr*sin(alfa)
                        case 1
                                xtable(n+10,k)=rr
                                ytable(n+10,k)=-40.0
                        case 2
                                xtable(n+10,k)=rr
                                ytable(n+10,k)=0.0
                        end_case
                end_loop
        end_loop
end
aux1
def aux2
command
        set grav 0 0 -10
        water dens 1000
end_command
loop n(1,nptab1-1)
        loop k (1,nprof-1)
                xx1=xtable(n+10,k)
                yy1=ytable(n+10,k)
                zz1=ytable(1,n)
                xx2=xtable(n+10,k+1)
                yy2=ytable(n+10,k+1)
                zz2=zz1
                xx3=xtable(n+11,k+1)
                yy3=ytable(n+11,k+1)
                zz3=ytable(1,n+1)
                xx4=xtable(n+11,k)
                yy4=ytable(n+11,k)
                zz4=zz3
                command
                        WATER TABLE face xx1,yy1,zz1 xx2,yy2,zz2 xx3,yy3,zz3
                        WATER TABLE face xx1,yy1,zz1 xx3,yy3,zz3 xx4,yy4,zz4
                end_command
        end_loop
end_loop
end
aux2
ret
发表于 2008-9-29 00:18:25 | 显示全部楼层 来自 重庆南岸区
Simdroid开发平台
第一个问题:
    代表坐标,一个x坐标一个y坐标。一次循环,共7个点。
回复 不支持

使用道具 举报

发表于 2010-4-25 16:26:03 | 显示全部楼层 来自 清华大学
高手解释一下吧
回复 不支持

使用道具 举报

发表于 2010-4-25 16:34:54 | 显示全部楼层 来自 广东江门
期待高手解决中
回复 不支持

使用道具 举报

发表于 2012-7-27 11:38:17 | 显示全部楼层 来自 青海
不错啊。。借鉴一下拉
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-9-24 18:27 , Processed in 0.031466 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表