### DM2 ### hu_02 ### von Aleksandar Dudurovic/kairos28 ### 12231403 ### Gruppe Gruber 03 import rhinoscriptsyntax as rs import random allRhinos = rs.AllObjects() rs.DeleteObjects( allRhinos ) rs.EnableRedraw(0) # Objekt1 coords = [] print coords for i in range(10000): x=random.uniform(50, 10) y=random.uniform(50, 10) z=random.uniform(50, -10) x = x - 10 y = y - 10 z = z - 10 cor = [x,y,z] rs.ZoomExtents() coords.append(cor) # Objekt1 Punkte ersteobjekt_points = rs.AddPoints(coords) # Objekt1 Farbe for pnt in ersteobjekt_points: rs.ObjectColor(pnt, [102,255,255]) # Objekt2 zweite_coords = [] print zweite_coords for i in range(10000): x=random.uniform(50, 10) y=random.uniform(50, 10) z=random.uniform(100, 70) x = x - 10 y = y - 10 z = z - 10 cor = [x,y,z] rs.ZoomExtents() zweite_coords.append(cor) # Objekt2 Punkte zweiteobjekt_points = rs.AddPoints(zweite_coords) # Objekt2 Farbe for pnt in zweiteobjekt_points: rs.ObjectColor(pnt, [102,255,255]) # Objekt3 dritte_coords = [] print dritte_coords for i in range(10000): x=random.uniform(50, 10) y=random.uniform(50, 100) z=random.uniform(150, -10) x = x - 10 y = y - 10 z = z - 10 cor = [x,y,z] rs.ZoomExtents() dritte_coords.append(cor) # Objekt3 Punkte dritte_points = rs.AddPoints(dritte_coords) # Objekt3 Farbe for pnt in dritte_points: rs.ObjectColor(pnt, [0,200,0]) #for pnt in points [0:2000]: # rs.ObjectColor( pnt, [0,200,0]) # if random.uniform(0,1) < 0.1: # rs.Redraw() #random.shuffle( coords ) #rs.AddCurve( coords, 3 )