Showing a moving point in a scene

2 posts / 0 new
Last post
Anonymous
Showing a moving point in a scene
Hi, I wonder whether it is possible to plot the (time-variable) position of a point (test particle) in a Vapor scene, e.g. by a sphere or some other geometrical shape. This object is moving though the scene with a different location for every timestep. So far I've only come up with the idea to add a 3D array with all values to zero and only the one with the particle set to one. However, then it does not move smoothly though the scene (jumps between neighbouring cells) and it's also not very efficient. Any ideas how this could be mimicked? Best regards, Volker
clyne

Hi Volker,

 

VAPOR can import 3D scene files in a variety of formats. Documentation on how to do this is available from:

 

https://www.vapor.ucar.edu/docs/vapor-how-guide/model-tab-3d-geometry-di...

 

Additionally, below I've included a snippet of previous email on how to display particle positions that vary over time. The python conversion script mentioned is http://vis.ucar.edu/~clyne/forVolker . Let me know if you have any trouble.

 

cheers - jc

 



I've attached a python script that reads a series of ascii files containing particle position information. Each ascii file should contain a separate time step of line-separated X,Y,Z position coordinates. E.g.

x0 y0 z0
x1 y1 z1
....
xn yn zn

The invocation of the converter looks like:

    converter.py stride scale file.vms plyfile p0 p1 p2 ...

where 'stride' specifies which particle positions to include (stride should be '1' for every particle, 2 for every other, etc.);
'scale' is a scaling factor that controls the size of the particle glyph.  I would try 0.01 for starters.
'file.vms' is the name of the output .vms file. It can be anything you want as long as the extension ends in .vms
'plybase' is the base name for the output scene files that will be generated. There will be one generated per time step
and the p's are the paths to the input ascii files.

Once you've converted your particle data you can load it into vaporgui by using the "Model" tab. Just specify the name of the .vms file and enable the Model tab.

Note, even if you do not display the gridded data you will still need to load the gridded data data set to set up the scene.

Let me know if you have any questions.

cheers - jc