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