Grasshopper

algorithmic modeling for Rhino

Hi all,

I was trying to generate 3d points in Python component and having problem with outputs

since i m new to python i am having problem understanding where i m going wrong. 
3d%20points.gh

Views: 1673

Replies to This Discussion

the problem is that you're trying to pass ( a ) which you've difined as a list in line 5: a = [] as an integer in line 7: x = random.uniform(0,a) solution .. change the list name in line 5

import rhinoscriptsyntax as rs

import random as rnd

myList = []

for i in range(0,q):

    x = random.uniform(0,a)

    y = random.uniform(0,b)

    z = random.uniform(0,c)

    p = rs.AddPoint(x,y,z)

    myList.append(p)

THank u, i got it .. 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service