
I just started work on a competition due in a few months, and these are the results of some studies and exercises I’m doing to flesh out some early ideas as well as stretch my computational muscles. I spent some time working on coding attractors, and exploring varying organizations capable of being produced. The code follows, and more studies and updates will be posted.
Rossler Attractor

‘Script written by <Michael Caton>
‘Script copyrighted by <insertDRG>
‘Script version Wednesday, July 08, 2009 4:45:55 PM
Call Main()
Sub Main()
Dim TotalPts,arrPoint,Xpt,Ypt,Zpt,x,y,z,a,b,c,i
TotalPts = Rhino.GetInteger(“Enter Total Pt Population”, 100,50,300)
a = randBtw(0.75,0.1)
b = randBtw(0.75,0.1)
c = randBtw(0.75,0.1)
‘base x,y,z values
x=0
y=0
z=0
ReDim arrPts(TotalPts)
Call Rhino.EnableRedraw(False)
For i=0 To UBound(arrPts)
Xpt = -(y+z)
Ypt = x + (a *y)
Zpt = b + x*z – c*z
arrPts(i) = array(Xpt,Ypt,Zpt)
x = Xpt
y = Ypt
z = Zpt
Call Rhino.AddSphere(arrPts(i),0.01)
Next
Call Rhino.AddPointCloud(arrPts)
Call Rhino.EnableRedraw(True)
End Sub
Function randBtw(upperVal,lowerVal)
randBtw = ((upperVal-lowerVal) *Rnd + lowerVal)

Option Explicit
‘Script written by <Michael Caton>
‘Script copyrighted by <insertDRG>
‘Script version Wednesday, July 08, 2009 4:45:55 PM
Call Main()
Sub Main()
Dim TotalPts,arrPoint,Xpt,Ypt,Zpt,x,y,z,a,b,c,i
TotalPts = Rhino.GetInteger(“Enter Total Pt Population”, 100,50,300)
a = randBtw(0.75,0.1)
b = randBtw(0.75,0.1)
c = randBtw(0.75,0.1)
‘base x,y,z values
x=0
y=0
z=0
ReDim arrPts(TotalPts)
Call Rhino.EnableRedraw(False)
For i=0 To UBound(arrPts)
Xpt = -(y+z)
Ypt = x + (a *y)
Zpt = b + x*z – c*z
arrPts(i) = array(Xpt,Ypt,Zpt)
x = Xpt
y = Ypt
z = Zpt
Call Rhino.AddSphere(arrPts(i),0.01)
Next
Call Rhino.AddPointCloud(arrPts)
Call Rhino.EnableRedraw(True)
End Sub
Function randBtw(upperVal,lowerVal)
randBtw = ((upperVal-lowerVal) *Rnd + lowerVal)
End Function
Fish Curve(Gone Wrong…But Good)


Option Explicit
‘Script written by <Michael Caton>
‘Script copyrighted by <insertDRG>
‘Script version Wednesday, July 08, 2009 3:08:42 PM
Call Main()
Sub Main()
Dim dblA,dblRes,x,y,z,i
dblA = Rhino.GetReal(“Enter amplitude 1″,5)
dblRes = Rhino.GetReal(“Enter Resolution Value”,100)
ReDim arrPts(dblRes)
Call Rhino.EnableRedraw(False)
For i=0 To dblRes
x = (dblA*(cos(i))) – ((dblA*(sin(i)^2)*i) / sqr(2))
y = (dblA *(cos(i)))*(sin(i))
z = cos(x)’(dblA*(cos(i))) – ((dblA*(sin(i)^2)*i) / sqr(2))
arrPts(i) = array(x,y,z)
Call Rhino.AddSphere(array(x,y,z),0.2)
Next
Call Rhino.AddPointCloud(arrPts)
Call Rhino.EnableRedraw(True)
End Sub