import rhinoscriptsyntax as rs import random rs.EnableRedraw( 0 ) #print rs.AllObjects() rs.DeleteObjects( rs.AllObjects() ) #print range(10, 20) for eintrag in range(10): pass #print eintrag coords = [] colors = [] rangeX = random.randint(4, 10) rangeY = random.randint(4, 10) rangeZ = random.randint(4, 10) for x in range(rangeX): for y in range(rangeY): for z in range(rangeZ): xPlus = 2*(z>2) yPlus = 1*(z>60) cor = [x+xPlus, y+yPlus ,z] coords.append( cor ) colors.append( [ x*20, y*10, z*10] ) points = rs.AddPoints( coords ) for i in range(len(points)): rs.ObjectColor( points[i], colors[i]) random.shuffle( coords ) coords = coords[0:111] rs.ObjectColor( rs.AddCurve( coords, 2 ), [100,50,220]) rs.ObjectPrintWidth( rs.AllObjects()[0], 1) #rs.AddCurve( coords, 1 ) #rs.AddCurve( coords, 8 ) #rs.AddCurve( coords, 50 ) rs.ZoomExtents()