feb 18 shenting wang


def addCircles(x,y, distance):
    center = x,y,0
    rad = distance/5
    rs.AddCircle(center, rad)       
def cubestacking():
    attractor = rs.GetPoint()
    print attractor
    xlist = range(30)
    ylist = range(30)
    for x in xlist:
        for y in ylist:
            pt1 = attractor
            pt2 = x,y,0
            distance = rs.Distance(pt1, pt2)
            #make a cylinder
            base = x,y,0
            height = distance/20
            rad = distance/5
            id = rs.AddCylinder(base, height, rad, True)

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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