Home » Source Code » Polygon generation » Ansys-ConcreteBone2d_Polygon.txt

Ansys-ConcreteBone2d_Polygon.txt ( File view )

  • By lp1284298 2013-11-24
  • View(s):70
  • Download(s):2
  • Point(s): 1
			!定义骨料半径范围
rmin=1
rmax=2
!定义该组骨料个数
num=100
!定义两点间最大角度和最小角度
da_max=90
da_min=10



cum=0
*do,i,1,100000000
    *if,cum,eq,num,then
        *exit
    *endif
    x=rand(xmin,xmax)
    y=rand(ymin,ymax)
    r=rand(rmin,rmax)
    *if,x-1.05*r,gt,xmin,and,x+1.05*r,lt,xmax,then
        *if,y-1.05*r,gt,ymin,and,y+1.05*r,lt,ymax,then
            *if,cum,eq,0,and,index,eq,0,then
                cum=cum+1
                cir(cum,1)=x
                cir(cum,2)=y
                cir(cum,3)=r
            *else
                sum=0
                *do,j,1,cum+index
                    dist=sqrt((cir(j,1)-x)**2+(cir(j,2)-y)**2)
                    *if,dist,lt,1.05*(cir(j,3)+r),then
                        *exit
        
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
Ansys-ConcreteBone2d_Polygon.txt1.15 kB23-06-10|23:03
creat0.00 B30%|23-06-10
lspost.cfile401.00 B19-11-13|10:36
lspost.msg0.00 B19-11-13|10:36
parameters.txt165.00 B23-06-10|22:48
ansys0.00 B19-11-13|10:36
ConcreteBone2d_Polygon.m1.98 kB06-07-10|22:55
matlab0.00 B14-11-13|08:38
任意多边形0.00 B14-11-13|08:38
...
Sponsored links

Ansys-ConcreteBone2d_Polygon.txt (2.91 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D