Option Explicit

Call Network()

Call Circles()

Sub Network()

‘list variables

Dim arrStrAttractors : arrStrAttractors = Rhino.GetObjects (“select attractors”,1)

ReDim arrAttractors(UBound(arrStrAttractors ))

For Each strAttractor In arrStrAttractors

arrAttractors(k) = Rhino.pointcoordinates (strAttractor)

k=k+1

Next

‘set initial values

stLocation = Rhino.GetPoint (“Select your start points”)

For i = 2 To ‘# of generations

For l=0 To UBound(startpoints)

For Each arrAttractor In arrAttractors

testDistance = Rhino.Distance (startpoint, arrAttractor)

If testDistance < dblDistance Then

dblDistance = testDistance

buildpoint = startpoint

‘if distance is 0 go to next closest

End If

Next

‘construct New lines And points based On build point

buildpoint1 = Rhino.Polar (buildpoint, 45, crvL)

curve = Rhino.AddLine (buildpoint, buildpoint2)

buildpoint3 = rhino.CurveEndPoint (str2Crv)

‘add the new endpoint to attractor list

‘and add the new point to build point array

Next

‘pipe all

End Sub

Sub Circles()

‘select all points

‘find density of points

‘for i = 0 to Ubound # of points

‘add circle with a radius based on density

‘next

‘for i = 0 to ubound # of cirles

‘trim and fillet all circles

‘next

‘join all lines

End Sub