#Morena Kocijan 2HUE DM2 #Idee eines Wuerfels, der mehrmals geteilt wurde import rhinoscriptsyntax as rs import random alleObjekte = rs.AllObjects() #print alleObjekte rs.DeleteObjects( alleObjekte ) #Wuerfel aus Punkten zaubern rs.EnableRedraw(0) coords = [] anzahl = 30 xVal = 2.2 yVal = 6.6 zVal = 7 for i in range (anzahl): print i for j in range (anzahl): for k in range (anzahl): x = i*xVal + random.uniform(4, xVal) if x > anzahl*0.6: x+= 15 y = j*xVal + random.uniform(4, yVal) if y > anzahl*1.1: y+= 30 z = k*xVal + random.uniform(4, zVal) if z > anzahl*0.5: z+= 25 cor = [x, y, z] coords.append (cor) points = rs.AddPoints (coords) #Farbe damit es schoener ist #Pink weil es meine Lieblingsfarbe ist <3 rs.ObjectColor(points, [255,192,203])