import rhinoscriptsyntax as rs import random rs.EnableRedraw( 0 ) alleObjekte = rs.AllObjects() rs.DeleteObjects(alleObjekte) #print alleObjekte #print range(10) #int_liste = range(100) coords = [] print coords for i in range(401): #print i x=random.uniform(0, 10) y=random.uniform(0, 10) z=random.uniform(0, 10) x += -5 y += -5 cor = [x,y,z] #rs.AddPoint(cor) #rs.ZoomExtents() coords.append(cor) #print"i=",i, coords rs.AddPoints(coords) rs.AddCurve(coords, 1 ) xRange = random.randint(5,30) yRange = random.randint(5,10) zRange = random.randint(1,10) 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) random.shuffle( newCoords, ) #rs.AddCurve( newCoords, 2 ) newPoints = rs.AddPoints( newCoords ) #dint (0.255) for pnt in newPoints : colo = [random.randint(0,255), random.randint(0,250), random.randint(0,250) ] rs.ObjectColor( pnt, colo ) rs.ZoomExtents() for i in range (20): p0= random.choice( newCoords ) p1= random.choice( newCoords ) p2= random.choice( newCoords ) rs.AddCurve ( [ p0,p1, p2, p0 ] ) rs.ZoomExtents() rand = random.uniform(0, 10) print rand