vb 分形树
代码说明:
Dim xs As Integer Dim ys As Integer Dim alph As Single Dim lng As Single Dim m As Integer Const PI As Single = 3.14159265 Private Function tree(x As Integer, y As Integer, angle As Single, length As Single, n As Integer) Dim x0 As Integer Dim y0 As Integer Dim alpha As Single Dim beita As Single Dim leng As Single BackColor = vbWhite If n > 0 Then x0 = x + Cos(angle) * length y0 = y - Sin(angle) * length picture1.Line (x, y)-(x0, y0), vbbrake alpha = angle - PI / 8 beita = angle + PI / 8 leng = 2 * length / 3 Call tree(x0, y0, alpha, leng, n - 1) &nbs
下载说明:请别用迅雷下载,失败请重下,重下不扣分!