(n)certainties – Die Angewandte – Fall 2008

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 Comment

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must be logged in to post a comment.