Filter to automatically transform / rotate dataset around arbitrary axis and point

Dear all,

I have the following situation:

  • I am running simulations of a propeller with an arbitrary rotation center and axis,
  • I can read the current simulation time as field data from my vtk dataset,
  • with given rotation rate and time I can calculate the rotation angle.

Based on the given data I would like to automatically rotate my dataset back to the initial propeller position to emulate a body fixed point of view. This allows me to position my camera once at interesting locations on the propeller blade and inspect them over the entire simulation without adjusting the camera.

Is there a way to achieve this in ParaView, e.g. with a programmable filter?

My ParaView information:

  • Version: 5.10.1

Here is example data: (2.4 MB)

And here is a programmable annotation to show the current angle, rotation and time

import vtk

Index = 0
Data = inputs[0].GetFieldData().GetArray(Index);
Name = inputs[0].GetFieldData().GetArrayName(Index)

RotationRate = 1.745
Period = 1.0 / RotationRate

Time = Data[0]
Rotations = Time / Period
Angle = Rotations * 360.0

Message = "\n".join([
    f"Time: {Time:.5f}",
    f"Angle: {Angle:.5f}",
    f"Rotations: {Rotations:.5f}"

TableOutput = self.GetTableOutput()
Array = vtk.vtkStringArray()

Transform filter should do the trick.

Alternatively you can have have camera motion to have the camera rotate with the propeller.

The Animation View can be used to either rotate the camera or to modify the Transform filter parameters to update each time step.