import rhinoscriptsyntax as rs import random as ran allobjs = rs.AllObjects() rs.DeleteObjects(allobjs) #saamenstiel curve = rs.AddLine((0,0,0),(7,0,0)) # pappus new_list=[] for i in range(50): angx = ran.randint(0,360) angz = ran.randint(-160,-20) first = rs.AddLine((7,0,0),(7,0,-1)) rs.RotateObject(first,(7,0,0), angz,(0,1,0), copy=False) rs.RotateObject(first,(7,0,0), angx,(7,0,-1),copy=False) new_list.append(first) #join all saamen elements new_list.append(curve) #saamenstiel & pappus & saame rotate center_point = (0,0,0) rotation_angle = 360 num1=20 num2=6 for i in range(num1): for j in range(num2): curve2=rs.RotateObjects(new_list, center_point, -90/num2*j , axis=(0,5,0), copy=True) rs.RotateObjects(curve2, center_point, 360/num1*i, axis=(0,0,1), copy=False) for i in range(num1): for j in range(num2): curve2=rs.RotateObjects(new_list, center_point, 90/num2*j , axis=(0,1,0), copy=True) rs.RotateObjects(curve2, center_point, 360/num1*i, axis=(0,0,1), copy=False) #kugel rs.EnableRedraw(False) radius1 = 0.5 center = rs.AddPoint(0,0,0) rs.AddSphere(center, radius1) #blumenstiel rs.EnableRedraw(False) radius1 = 0.3 center = rs.AddPoint(0,0,0) curve1 = rs.AddCircle(center, radius1) path = rs.AddLine([0,0,0], [0,0,-50]) rs.ExtrudeCurve(curve1, path)