Call Rossler() 
Sub Rossler() 
            
Dim x, y, z 
            
Dim maxpoints 
            
maxpoints = 8000 
            
Dim h 
            
h = 0.025 
            
Dim p(2) 
            
Dim ptnew() 
            
Dim i 
            
Do While (i<maxpoints) 
                        
p(0) = p(0) + h* dx(p(0), p(1), p(2)) 
                        
p(1) = p(1) + h* dy(p(0), p(1), p(2)) 
                        
p(2) = p(2) + h* dz(p(0), p(1), p(2)) 
 
                        
Rhino.AddPoint(p) 
                        
ReDim Preserve ptnew(i) 
                        
ptnew(i) = p 
                        
i=i+1 
 
            
Loop 
 
 
            
Call Rhino.AddCurve(ptnew, 3) 
End Sub 
 
 
Function dx(ByVal x, ByVal y, ByVal z) 
            
dx = -y-z 
End Function 
Function dy(ByVal x, ByVal y, ByVal z) 
            
dy = x + 0.4*y 
End Function 
Function dz(ByVal x, ByVal y, ByVal z) 
            
dz = 0.31 + z*(x-5.3) 
End Function 
 
[size=0.9em]Posted: 
April 16th, 2009 under 
Parametric Design. 
Comments: 
none 
 
 
 
.RVB CURLICUE FRACTALI’ve recently started using Rhino Scripting as a design tool in my research. I will be documenting here my learning process through the .rvb scripts. 
This study shows the Curlicue Fractal, which generates quite intricate patterns. (http://mathworld.wolfram.com/CurlicueFractal.html) 
 
 
 |