#WS24 DM2 HUE2 Philipp Filipovic #Import Rhino Befehle import rhinoscriptsyntax as rs import random as rd alleObjekte = rs.AllObjects() rs.DeleteObjects( alleObjekte ) #Nur Punkte statt Bildschirm Laden (geht schneller) rs.EnableRedraw(0) coords = [] anzahl = 25 xVal = 2 yVal = 4 zVal = 6 for i in range (anzahl): for j in range (anzahl): for k in range (anzahl): x = i*xVal + rd.uniform(2, xVal) if x > anzahl*0.5: x+= 20 y = j*xVal + rd.uniform(2, yVal) z = k*xVal + rd.uniform(2, zVal) if z > anzahl*0.8: z+= 20 cor = [x, y, z] coords.append ( cor ) points = rs.AddPoints (coords) #Gruene Farbe rechts rs.ObjectColor(points, [50,250,0]) #Random Farbe links for point in points [0:3750]: color = [rd.randint(0,255), rd.randint(0,255), rd.randint(0,255)] rs.ObjectColor(point,color)