import rhinoscriptsyntax as rs import random, time, sys ### sys.path.append("P:/") ### add path where "DM_lib.py" can be found !!! import DM_lib as dm ### reload(dm) allCoords = dm.setUp_hu_03(25) #print allCoords[0] rs.AddPoints( allCoords[0] ) coordsCir = allCoords[0] cen = dm.pntCentroid(coordsCir) rs.AddCurve( [ cen, coordsCir[0] ] ) dm.textDots( coordsCir ) dm.eA() #dm.setUp_hu_03( if 0: 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 = 10000 rad = 5.0 center = [random.randint(26,26),26,26] deltaAngle = 360/anz vec = [1, 0, 0] 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 ) anz = 10000 rad = 1.0 center = [random.randint(-1,-1),-1,-1] deltaAngle = 360/anz vec = [1, 0, 0] for i in range(anz): angX = deltaAngle*i #print angX vecX = rs.VectorRotate( vec, angX , [random.uniform(-15,15),random.uniform(-15,15),random.uniform(-15,15)] ) #vector, angle_degrees, axis) vecX = rs.VectorScale( vecX, random.uniform( 5,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) coords=[] print coords for i in range(3500): #print i x=random.uniform(0,17) y=random.uniform(0,17) z=random.uniform(0,17) x+= +11 y+= +8 z+= +8 cor = [x,y,z] rs.AddPoint(cor) #rs.ZoomExtents() coords. append (cor) #print "i=",i, coords rs.AddPoints(coords) coords=[] print coords for i in range(3500): #print i x=random.uniform(15,25) y=random.uniform(15,25) z=random.uniform(15,25) x+= +13 y+= +10 z+= +10 cor = [x,y,z] rs.AddPoint(cor) #rs.ZoomExtents() coords. append (cor) #print "i=",i, coords rs.AddPoints(coords) anz = 10000 rad = 5.0 center = [random.randint(9,9),9,9] deltaAngle = 360/anz vec = [1, 0, 0] 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 ) coords=[] print coords for i in range(3500): #print i x=random.uniform(0,10) y=random.uniform(0,10) z=random.uniform(0,10) x+= +0 y+= +0 z+= +0 cor = [x,y,z] rs.AddPoint(cor) #rs.ZoomExtents() coords. append (cor) #print "i=",i, coords rs.AddPoints(coords) anz = 10000 rad = 5.0 center = [random.randint(40,40),35,35] deltaAngle = 360/anz vec = [1, 0, 0] 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( 7,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) coords=[] print coords for i in range(5500): #print i x=random.uniform(30,50) y=random.uniform(30,50) z=random.uniform(30,50) x+= +7 y+= +6 z+= +6 cor = [x,y,z] rs.AddPoint(cor) #rs.ZoomExtents() coords. append (cor) #print "i=",i, coords anz = 10000 rad = 5.0 center = [random.randint(57,57),57,57] deltaAngle = 360/anz vec = [1, 0, 0] 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( 10,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) coords=[] anz = 10000 rad = 5.0 center = [random.randint(40,40),57,57] deltaAngle = 360/anz vec = [1, 0, 0] 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 ) coords=[] anz = 10000 rad = 5.0 center = [random.randint(57,57),40,57] deltaAngle = 360/anz vec = [1, 0, 0] 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 ) coords=[] anz = 10000 rad = 5.0 center = [random.randint(40,40),40,57] deltaAngle = 360/anz vec = [1, 0, 0] 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 ) coords=[] anz = 10000 rad = 5.0 center = [random.randint(12,12),26,26] deltaAngle = 360/anz vec = [1, 0, 0] 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( 2,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) anz = 10000 rad = 5.0 center = [random.randint(26,26),12,26] deltaAngle = 360/anz vec = [1, 0, 0] 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( 2,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) anz = 10000 rad = 5.0 center = [random.randint(12,12),26,12] deltaAngle = 360/anz vec = [1, 0, 0] 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( 2,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX ) anz = 10000 rad = 5.0 center = [random.randint(26,26),11,11] deltaAngle = 360/anz vec = [1, 0, 0] 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( 2,rad) ) vecX = rs.VectorAdd( vecX, center) rs.AddPoint( vecX )