I have been looking at the examples in the documentation but I am unsure about this. What I want is to write a file containing points (X, Y, Z) and some scalar data associated to it. This is perfectly doable in a vtu or vtp file for a single dataset.
However my question is: is it possible to write various timesteps in the same .vt[u|p] file and have ParaView animate it? The point cloud XYZ values will change from one timestep to the next (the number of points can also change!). Data is not massive so ascii format is preferred.
For the purposes of the answer we could use this file (just add a second timestep where all points have moved 0.5 for example):
I guess that if the number of points varies too, it would be advisable to add the TimeStep field at the Piece level and add a Piece for each timestep? I forgot to say that (edited the OP now to reflect that).
Looking at the code, I don’t believe that it is possible to have a varying number of points, but you can try it.
Keep in mind that you can write a separate XML file for each timestep. That does support having a different number of points and cells at each time point. With this approach, to add a time value to a each XML file, add a field data array as follows:
Yes, I know that I can write a separate file for each timestep, but I was trying to avoid that as constantly opening and closing files is slow (as far as I know) and in my personal opinion, less tidy.
Thank you in any case, I will try to get this to work. Meanwhile I will keep visualizing with OSG, although I want to move to PV as soon as possible.