import rhinoscriptsyntax as rs import random alleObjekte = rs.AllObjects() rs.DeleteObjects (alleObjekte) #deleting all existing objects int_liste = range (100) xRange=random.randint(25,50) yRange=random.randint(25,50) zRange=random.randint(25,50) #generating random intigers for x,y,z gap=random.randint(5,20) cords = [] for x in range (xRange): if x > xRange*0.5: x += gap #creating a gap of a random width for y in range (yRange): if y > yRange*0.5: y += gap for z in range (zRange): if z > zRange*0.5: z += gap cor = [x,y,z] cords.append(cor) #transforming x,y,z itno a collection of triplets rs.AddPoints(cords) #adding triplets as points in space for i in range(500): P0 = random.choice(cords) P1 = random.choice(cords) P2 = random.choice(cords) #setting random triplets of points rs.AddCurve([P0, P1, P2], 2) #using those triplets to create a curve newPoints = rs.AddPoints(cords) for pnt in newPoints: colo = [random.randint(0,255), random.randint(0,255),30] #setting random 2 values (R and G) and a set B value rs.ObjectColor(pnt, colo) #using those values to asign a colour rs.ZoomExtents()