############################## ### DM2_w24 hu_03_setUp ### ### _diag / 2024 10 17 ### ############################## import rhinoscriptsyntax as rs import random, time, sys ### sys.path.append("P:/WWW\kleeblaettchen04") ### add path where "DM_lib.py" can be found !!! import DM_lib as dm ### reload(dm) ############################## rs.EnableRedraw(0) dm.eA() #dm.setUp_hu_03 if 0: allCoords = dm.setUp_hu_03(12) #print allCoords[0] rs.AddPoints(allCoords[0]) coordsCir = allCoords[0] cen = dm.pntCentroid(coordsCir) #Mittelpunkt rs.AddCurve([cen, coordsCir [0]]) rs.AddCurve(allCoords[1],1) dm.textDots(coordsCir) #TextDots dm.textDots(allCoords[1]) # Kreis -- Vektore vec = [1,0,0] rs.AddPoint(vec) anz = 1000 rad = 10.0 center = [random.randint(0,10),0,0] deltaAngle = 360/32 for i in range(anz): angX = deltaAngle*i vecX = rs.VectorRotate(vec, angX, [random.uniform(-20,20),random.uniform(-20,20),random.uniform(-20,20)])#vector, angle_degrees, axis vecX = rs.VectorScale(vecX, random.uniform(5,rad)) vecX = rs.VectorAdd(vecX, center) rs.AddPoint(vecX)