Grasshopper

algorithmic modeling for Rhino

i tried to use VB script, but code seems wrong.

who can help me?

code//

Sub RunScript(ByVal n As Integer,ByRef D As Object, ByRef A As Object, ByRef B As Object, ByRef C As Object)

Dim r_list As New List (Of point3d)
Dim p_list As New List (Of point3d)
Dim q_list As New List (Of point3d)

For i As int32=1 To n

Dim r As New point3d (cos(i) * i, sin(i) * i, i / 1000)
Dim p As New point3d (cos(i + 0.5) * i, sin(i + 0.5) * i, i + 1 / 1000)
Dim q As New point3d (cos(i) * (i + 1), sin(i) * (i + 1), i / 1000 + (i + 4))

r_list.add(r)
p_list.add(p)
q_list.add(q)

Next
A = r_list
B = p_list
C = q_list

Views: 406

Attachments:

Replies to This Discussion

你需要像这样在三角函数前面加上math

太感謝你了

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service