import rhinoscriptsyntax as rs

import random, time, sys  
sys.path.append("P:/")    

#rs.ClearCommandHistory()
alleObjekte = rs.AllObjects()
rs.DeleteObjects(alleObjekte)
print alleObjekte
#print range(10)
#Koordinate 0 bis 9
#int_liste = range(10)
#
#for i in int_liste:
#        print i
#        

#leer Liste
coords = []
print coords
for i in range(1000):
#    print i
    x=random.uniform(0, 10)
    y=random.uniform(0, 10)
    z=random.uniform(0, 10)
    x = x-5
    y = y-5
    cor = [x,y,z]
#    rs.AddPoint(cor)
#    rs.ZoomExtents()
    coords.append(cor)
    print "i=",i,coords
rs.AddPoints(coords)
#rs.AddCurve(newCoords,1)
#print coords

rand = random.uniform(0, 10)
print rand

xRange = random.randint(10,20)
yRange = random.randint(10,20)
zRange = random.randint(10,20)

newCoords = []
for x in range(xRange):
     if x > xRange * 0.5:
        x += 17
        for y in range(yRange):
                for z in range(zRange):
                            cor = [x,y,z]
                            newCoords.append(cor)
rs.AddPoints(newCoords)
#shuffle#
random.shuffle(newCoords)
newPoints = rs.AddPoints(newCoords)

rs.AddCurve(coords, 1)
rs.ZoomExtents()
rand = random.uniform(0, 10)
print rand

colo = [random.randint(0,255), random.randint(0,255), random.randint(0,255)]
rs.ObjectColor(pnt,colo)

P1 = newCoords[random.randint(0, len(newCoords))]
rs.AddPoints(coords)
rs.AddCurve(coords, 3)

for i in range(20):
    P0 = random.choice(newCoords)
    P1 = random.choice(newCoords)
    P2 = random.choice(newCoords)
    rs.AddCurve([P0, P1, P2, P0])