[vtkusers] How to animate and move a 3D glyph along a 3D spline path

Elvis Dowson elvis.dowson at mac.com
Sat Oct 11 16:01:50 EDT 2008


Hi,
         A possible solution is to specify a set of points and use a  
cardinal spline to generate a spline path. I can then use the set of  
points that correspond to the spline path, as input to an actor, and  
translate the actor along the spline path.

I just need some help here on how to generate a timer tick using Tcl,  
to increment the next position to translate the actor to.

vtkActor sphere
   sphere SetMapper sphereMapper

   # TODO: Translate the sphere to the next position along the spline  
path
   for {set i 0} {$i < $numberOfOutputPoints} {incr i 1} {
     eval sphere SetPosition [points GetPoint i]
   }

How can I achieve this using Tcl? I don't know how to install a timer  
event, so that it is automatically registered and asynchronously feeds  
input to the for loop, while still allowing me to interact with the  
window. For example, the actor should be translated every 500ms, and  
the window should still be responsive to render window interactor  
commands to zoom, pan, rotate, etc.

Best regards,

Elvis Dowson

On Oct 10, 2008, at 1:44 PM, Elvis Dowson wrote:

> Hi,
>         Is it possible to animate and move a 3D glyph along a 3D  
> spline path? Are there any VTK classes that support key framing or  
> animation?
>
> Best regards,
>
> Elvis Dowson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081012/14453447/attachment.htm>


More information about the vtkusers mailing list