rvb Basic Animation

rvb animation snippet example

This script shows how to move objects with Rhinoscript.

Option Explicit

'Script written by Adolfo Nadal

'Script by archiologics · www.archiologics.com

Call Main()

Sub Main()

Dim strSphere : strSphere = Rhino.GetObject("Select Sphere", 8+16,vbTrue)

Dim strPath : strPath = Rhino.GetObject("Select Motion Path",4,vbTrue)

Dim nrFrames : nrFrames = Rhino.GetInteger("Nr of frames",20,10,200)

Dim countFrame : countFrame = 0

Dim arrPts : arrPts = Rhino.DivideCurve(strPath,nrFrames)

For countFrame = 0 To nrFrames

Rhino.MoveObject strSphere,Rhino.SurfaceVolumeCentroid(strSphere)(0),arrPts(countFrame)

Rhino.ScaleObject strSphere,Rhino.SurfaceVolumeCentroid(strSphere)(0),array(0.95,0.95,0.95)

countFrame = countFrame + 1

Next

End Sub

Search Site




archi·o·logics survey

I am interested in: