071023_MBearak_Generated Environment

meshingenvironment.jpg

Option Explicit
‘Script written by mark bearak
‘Script copyrighted by dtls.architecture
‘Script version Monday, October 22, 2007 3:16:51 PM

Call Main()
Sub Main()
Dim h, i
Dim dblRadius, intFreq, dblConv, strPt, arrPts(), arrSrf()
Dim dblCntX, dblCntY, dblCntZ
dblConv = 0.0174532925
For h = 0 To 20
If h <11 Then
intFreq = h*10
dblRadius = 40 + h*2
Else
intFreq = 200 – (h*10)
dblRadius = 40 + (40 – h*2)
End If
ReDim Preserve arrSrf(h)
For i = 0 To 36
DblCntX = 0
DblCntY = 0
DblCntZ = h*10

ReDim Preserve arrPts(i)
strPt = Rhino.AddPoint (array(cos(i*10*dblConv)*dblRadius*((sin(i*intFreq*dblConv)+1)/3+.333)+DblCntX, sin(i*10*dblConv)*dblRadius*((sin(i*intFreq*dblConv)+1)/3+.333)+DblCntY, 0+DblCntZ))
arrPts(i) = Rhino.PointCoordinates (strPt)
Call Rhino.DeleteObject (strPt)
Next
arrSrf(h) = Rhino.AddInterpCurve (arrPts)
Next
‘Call Rhino.AddLoftSrf (arrSrf)
‘Call Rhino.DeleteObjects (arrSrf)
End Sub

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