Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Model Animation using VTK

I have a VTK data file for a 3D model and I am trying to show a transformation applied to it.

I have the point coordinates/polygon data for every state in the transformation (there should be about 10-30 states), i.e. I could write another VTK file for each step.

I am trying to create a nice animation where each state would be shown for say, 1 second and then switch to the next one, as fluently as possible.

What would be the best thing to do?

like image 225
Hugo Avatar asked Jul 02 '26 10:07

Hugo


1 Answers

There are a handful of ways to animate something in VTK, with examples on the VTK Wiki.

The easiest way is probably to subclass vtkCommand (DataAnimationSubclass), but the "VTK/right" way is with vtkAnimationScene (AnimationScene).

like image 152
David Doria Avatar answered Jul 05 '26 09:07

David Doria



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!