Melodie Week 10 – 1


attractor square.PNG




import rhinoscriptsyntax as rs

class rectangularattractor():
def __init__(self):

def rectangles(self):
attractor = rs.GetPoint()
xlist = range(10)
ylist = range(10)
for x in xlist:
for y in ylist:
#calculate distance
pt1 = attractor
pt2 = x,y,0

distance = rs.Distance(pt1,pt2)

def rectangle (self,x,y,distance):
plane = rs.WorldXYPlane()
height = distance/100
width = distance/150

rs.AddRectangle(plane,height, width)
def main():


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s