Changing particle color if certain condition is reached
In order to introduce you a little bit my problem, I am working with a molecular dynamics simulation. To visualize the system with Paraview, I read the position and velocity of each particle from a .vtk file like was made in http://diffusionht.blogspot.com/2012...aview-vtk.html. And in order to color the particles I use the sphere glyph filter and I use the "Color by" option following a physical criterion (i.e temperature).
Now my question is: How can I change the color of the particle who reachs certain condition (i.e if x-position is less than certain value, or if force on particle exceed some value)?. I you consider necessary any extra detail or information I could provide you. Some suggestion or idea? Thanks in advance |
Works but not in a optimal way
The only viable option to me was add an additional scalar field with 0/1 values for each point, and color following this scalar. The caveat is that I need to modify my .vtk first before perform the visualization
|
Quick answer: ParaView has a filter named "Programmable Filter", which requires ParaView to be built with Python integration. This would enable you to create a field on-the-fly. Examples: http://www.paraview.org/Wiki/Python_Programmable_Filter
|
All times are GMT -4. The time now is 15:28. |