## Lorenz Attractor

Option Explicit 'Script written by <karthik.dondeti> 'Script copyrighted by <yet.another.script> 'Script version Monday, February 02, 2009 12:24:27 AM 'Reference : http://en.wikipedia.org/wiki/Lorenz_attractor Call Main() Dim a,b,c a=10 : b=28 : c=8/3 Sub Main() Dim mpoints:mpoints = 10000 Dim arrPt(10000) Dim x,y,z x=1 : y=1 : z=1 Dim dt:dt=0.01 Dim i:i=0 'ReDim arrPt(50000) Do While (i<mpoints+1) arrPt(i)= array(x,y,z) x=x+dt*dx(x,y,z) y=y+dt*dy(x,y,z) z=z+dt*dz(x,y,z) i=i+1 Loop Call rhino.addcurve (arrPt) End Sub Function dx(x,y,z) dx=a*(y-x) End Function Function dy(x,y,z) dy=-(x*z) + (b*x)-y End Function Function dz(x,y,z) dz= x*y-(c)*z End Function

Advertisements

how do you use that script in vb.net. I can’t seem to make it work, could you tell me how to get the script to function in gh

nay said this on September 3, 2009 at 02:39

Apologies for the late reply. I was busy making the transition from one place to another. Haven’t coded this on gh yet. Will try and send it across soon.

Karthik Dondeti said this on September 13, 2009 at 07:28