How to make vtkCamera to follow along a path? Similar to what we have in paraview.

I have a requirement where I need to create my camera along a path. I have seen similar feature in paraview. How can I implement similar feature.


There might be something in VTK especially for it that I’m just not aware of but there’s tons of ways to do it.

A good start would be to code up a vtk timer event and slowly move it in there. ie: Just modifying the camera position and focal point forward along a straight path. Then call render on the window again.

Then you could start defining curved paths with splines. Or line mesh paths with slerps on the camera.

1 Like

FYI It’s probably useful to become familiar with the vtkQuaternionInterpolator class (and related).

1 Like

Thanks Guys, I got it working. I used vtkCameraInterpolator class.