Option Explicit 'Script written by 'Script copyrighted by 'Script version Monday, February 02, 2009 8:11:02 PM Call Main() Sub Main() Call Rhino.EnableRedraw(False) Call monkey(2,2,2,50,50) Call Rhino.EnableRedraw(True) End Sub Function monkey(a, b, c, countU,countV) monkey = Null Dim i, j, q, r, u,v, x, y, z, arrOutput ReDim arrOutput(countU), arrStorage(countV) r=0 For i = -1+1/countU To 1 Step 2/countU q=0 For j = -1+1/countV To 1 Step 2/countV u = i v = j x = a*u y = b*v z = c*(u^3-3*u*(v^2)) arrStorage(q) = array(x,y,z) Call Rhino.addpoint(arrStorage(q)) q=q+1 Next arrOutput(r) = arrStorage r=r+1 Next monkey = arrOutput End Function