左边一棵是递归树,右边一棵是迭代树
程序关键部分:
For i=0 To 9
For j=0 To 9
endpt(i,j)=rhino.CurveEndPoint(Branch(i,j))
startpt(i,j)=rhino.curvestartpoint(branch(i,j))
vet(i,j)=rhino.VectorCreate(endpt(i,j), startpt(i,j))
branch(i,j+1)=rhino.AddLine(endpt(i,j),rhino.VectorAdd(endpt(i,j), rhino.vectorscale(rhino.VectorRotate(vet(i,j), -branchang, array(0,0,1)), eachlength)))
branch(i+1,j)=rhino.AddLine(endpt(i,j),rhino.VectorAdd(endpt(i,j), rhino.vectorscale(rhino.VectorRotate(vet(i,j), branchang, array(0,0,1)), eachlength)))
Next
Next