loop exercise:根據迴圈做圖。
Option Explicit
'Script written by David Rutten
'Script copyrighted by Robert McNeel & Associates
'Script version 2008年10月19日 下午 09:42:22
Call DrawsSineWave()
Sub DrawsSineWave()
Dim x, y
Dim dblA, dblB, dblStep
dblA = -8.0
dblB = 8.0
dblStep = 0.01
For x = dblA To dblB Step dblStep
y = 2*sin(x)
Call Rhino.AddPoint(Array(x, y, 0))
Next
End Sub
沒有留言:
張貼留言