[vtkusers] should I use vtkPolyData or something else?

Lorenzo Bernardi lorenzo.bernardi at lpn.cnrs.fr
Sat Jul 25 15:02:19 EDT 2009

Dear All,

   first of all I'd like to apology because I'm sure my questions have 
probably  already been asked but I'm struggling with vtk for two weeks 
and I think my problems comes more from using the correct vocabulary to 
find my anwer and so any pointer is welcome.

    my problem is that I have a set of atomic coordinates and there are 
two values for each coordinates one is the type of atoms and the other 
the value of the wavefunction (a scalar). The data file is in hdf5 and 
is homemade.

Question 1: vtkPolyData or not?
    I'm using vtkPolyData with these atomic coordinates. There are not 
completely regular since atoms may slightly change position. I know the 
nearest neighbour of each atoms so maybe I should use something else 
like vtkStructuredGrid but my atoms are given at random from the file. 
Since I like to interpolate the wave function between coordinates maybe 
I have to use something else than vtkPolyData. Can you tell me what 
would be the best dataset for that? In fact it looks like what I need is 
the vtkPLOT3DReader but I don't want to write my data in a PLOT3D file. 
Unless it is the simplest solution.

If vtkPolyData is not the correct way to deal with the problem then 
probably the rest is not really relevant except that I'd like to toggle 
the different dataset that is suppress the atoms
of one type or the other.

Question 2: One or more Polydata?
  I was trying to have several values for the atomic coordinates, the 
type and the wavefunction but I didn't succeed in using the 
wavefunction. But this might be related to the fact that I would like to 
interpolate between the value of the wavefunction and maybe vtkPolyData 
is not the one for that.
  For the atoms I can plot the atoms using glyphs and I would be 
interested in knowing how can I toggle on and off one type of atoms.  
That is if I press on the key "a" the first type of atom is not shown an 
if I press "a" once more it reappears. I will probably only have up to 
five atoms type and for now three would be enough. Is it posible?



More information about the vtkusers mailing list