--------------------------------------------------------------
Option Explicit
'Script written by smg_michele
'Script version lunedì 2 febbraio 2009 14.34.15
--------------------------------------------------------------
Call Main()
Sub Main()
Dim intNpoints
Dim arrPt, i
intNpoints = Rhino.GetInteger ("N. of points")
ReDim arrPt (intNpoints-1)
'generating the set of point
For i = 0 To intNpoints-1
arrPt(i)= (array (i*cos(i),i*sin(i),cos(i)*100))
Next
'interpolation curve
Call Rhino.AddInterpCurve(arrPt)
End Sub
With a second test I tried to combine two sets of points and link with lines the pairs belonging to two different curves. As well the first time, the result it’s not so exciting but shows a complexity ‘in nuce’. So why don’t try out it?
--------------------------------------------------------------
Option Explicit
'Script written by smg_michele
'Script version lunedì 2 febbraio 2009 14.34.15
--------------------------------------------------------------
Call Main()
Sub Main()
Dim intNpoints
Dim arrPt1,arrPt2,arrPoints, i
intNpoints = Rhino.GetInteger ("N. of points")
ReDim arrPt1 (intNpoints-1)
ReDim arrPt2 (intNpoints-1)
ReDim arrPoints (intNpoints-1)
For i = 0 To intNpoints-1
arrPt1(i)= (array (-i*cos(i),-i*sin(i),cos(i)*100))
arrPt2(i)= (array (i*cos(i),i*sin(i),cos(i)*100))
'draw i-line from Pt1 to Pt2
Call Rhino.AddLine(arrPt1(i),arrPt2(i))
Next
'two curves
Call Rhino.AddInterpCurve(arrPt1)
Call Rhino.AddInterpCurve(arrPt2)
End Sub
Have a nice Script!
No comments:
Post a Comment