17X_RobotSteps

 

robotsteps

 

 

 

 

 

 

 

 

 

 

 

Option Explicit
‘Script written by <insert name>
‘Script copyrighted by <insert company name>
‘Script version 16 listopada 2008 16:02:02

Call Main()
Sub Main()
 Dim y,x
 Dim A, o
 Dim pi: pi=rhino.PI
 Dim aPtsR(50),aPtsL(50)

 
 o=1
 
 For x=0 To 50
 
  A= RN(1,10)
  
  y=A*sin(o*x*(pi/2))
  
  If y>0.1 Then
  
   aPtsR(x)= rhino.addpoint(array(x,y,0))
   rhino.objectlayer aPtsR(x), “Rfoot”
   aPtsR(x)=rhino.PointCoordinates(rhino.addpoint(array(x,y,0)))
  End If
  If y<-0.1 Then

   aPtsL(x)= rhino.addpoint(array(x,y,0))
   rhino.objectlayer aPtsL(x), “Lfoot”
   aPtsL(x)=rhino.PointCoordinates(rhino.addpoint(array(x,y,0)))
  End If
 
 Next 

 ‘rhino.AddPolyline aPtsR
 ‘rhino.AddPolyline aPtsL
End Sub
Function RN(nMin, nMax)
 Randomize
 RN = (nMax – nMin) * Rnd + nMin
End Function

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s