###hue_02 ###katharina lamprecht ############################## import rhinoscriptsyntax as rs import random ############################## allRhinos = rs.AllObjects() rs.EnableRedraw(0) rs.DeleteObjects( allRhinos ) ############################## #Wuerfel wuerfel_coords = [] for i in range(200): x = random.uniform(10, 20) y = random.uniform(10, 20) z = random.uniform(10, 20) cor = [x,y,z] wuerfel_coords.append(cor) wuerfel_points = rs.AddPoints(wuerfel_coords) # Wuerfel blau for pnt in wuerfel_points: colo = [15, 115, 215] rs.ObjectColor(pnt, colo) #Rechteck rechteck_coords = [] for i in range(500): x = random.uniform(40, 20) y = random.uniform(20, 40) z = random.uniform(60, 20) x = x + 8 y = y + 8 z = z + 8 cor = [x,y,z] rechteck_coords.append(cor) rechteck_points = rs.AddPoints(rechteck_coords) # Rechteck gruen for pnt in rechteck_points: colo = [0, 175, 50] rs.ObjectColor(pnt, colo) rs.AddCurve(wuerfel_points, 2) rs.AddCurve(rechteck_points, 2) ###LINIEN for i in range(min(len(wuerfel_coords), len(rechteck_coords))): start_point = rechteck_coords[i] end_point = wuerfel_coords[i] rs.AddLine(start_point, end_point)