Vase roots

added compression circles

Some vases: added compression circles

Initial idea... still to work

Initial idea... still to work

Option Explicit

Call Main()
Sub Main()
Dim i, j, k, n, v
Dim dblConv, arrPts(), arrPtsb(), circle, arrcircles(), strCrv
dblConv = 0.0174532925
Dim intLoop : intLoop = 10
ReDim dblRadius(intLoop)
Dim iterations : iterations = Rhino.GetInteger(“nr of iterations”,5)
If isNull (iterations) Then Exit Sub
Dim arrPlane

Rhino.EnableRedraw False

For v = 0 To iterations-1
For k = 0 To intLoop
dblRadius(k) = Rnd*10
If dblRadius(k) < 2 Then
dblRadius(k) = 2
End If
Next
For i = 0 To 36 Step 12
n=0
For j = 0 To intLoop
ReDim Preserve arrPts(j)
ReDim Preserve arrPtsb(j)
ReDim Preserve arrcircles(j)
arrPts(j) = (array(cos((i-n)*10*dblConv)*dblRadius(j)+50*v, (sin((i-n)*10*dblConv)*dblRadius(j))*-1, (j^1.2)*4))
arrPtsb(j) = (array(cos((i+n)*10*dblConv)*dblRadius(j)+50*v, (sin((i+n)*10*dblConv)*dblRadius(j))*-1, (j^1.2)*4))
arrPlane = PlaneFromPoints (array(50*v,0,(j^1.2)*4),array(1,0,(j^1.2)*4),array(0,1,(j^1.2)*4))
If j Mod 2 = 0 Then
arrcircles(j) = Rhino.AddCircle (arrPlane,dblRadius(j)+0.5)
Else
arrcircles(j) = Rhino.AddCircle (arrPlane,dblRadius(j)-0.5)
End If
n=n+1
Next

strCrv = Rhino.AddInterpCurve (arrPts)
Call Rhino.SelectObject (strCrv)
Call Rhino.Command (“pipe d 1 .25 enter enter”)
Call Rhino.unselectallobjects
Call Rhino.Deleteobject(strcrv)

For Each circle In arrcircles
Call Rhino.SelectObject (circle)
Call Rhino.Command (“pipe d .25 .25 enter enter”)
Call Rhino.unselectallobjects
Next

strCrv = Rhino.AddInterpCurve (arrPtsb)
Call Rhino.SelectObject (strCrv)
Call Rhino.Command (“pipe d 1 .25 enter enter”)
Call Rhino.unselectallobjects
Call Rhino.Deleteobject(strcrv)
Next
Next
Rhino.EnableRedraw True
End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s