Skip to content

[WIP] Introducing a new animated Stream Lines representation

This MR introduces a new plugin (for OpenGL2 backend only) that provides a new representation called "Stream Lines" for any kind of data set in ParaView. The representation displays an animated view of streamlines in a vector field of the dataset. Seeds are initialized randomly in the bounds of the domain and created each time one particle dies (time to live - ie, max number of iterations - is reached, out-of-domain or zero velocity). The UI panel allows to specify:

  • Vectors: the vector field (mandatory).
  • Alpha: the rate of blending (depends on MaxTimeToLive, 0: no trace, 1: trace will fade as long as TimeToLive).
  • Step Length: Normalized integration step - allow to adjust particle speed.
  • Number Of Particles: Number of simulated particles in the flow.
  • Max Time To Live: Maximum number of iteration a particle is followed before it dies. The solid color and line width can be changed using default ParaView UI widgets.

Note that pqStreamLinesAnimationManager class observes all pqRenderView. When a rendering on such a view is finished, it checks all existing representations and search for an enabled StreamLines one. If found, a new still render pass is requested. This mechanism allow to refresh the view and animate the particles over and over.

How to test

  1. Load the plugin "StreamLinesRepresentation".
  2. Create a "Wavelet" source. Apply a "Gradient" filter on it.
  3. Switch representation from "Outline" to "StreamLines".
  4. Play with the StreamLines options in the Representation panel.
  5. Change the Coloring array

Another cool demo is to load the disk_out_ref.ex2 dataset with the V vector point data array.

Screenshot_20170102_170853 Screenshot_20170103_101737

anim

See the video on YouTube: [Click for Video](http://www.youtube.com/watch?v=w6ElNFp3cSU"Small Demo of Stream Lines representation plugin for ParaView")

Merge request reports