I want to use VTK in c++ and plot a molecule in 3D. I have a vector representing the positions of atom and another vector representing size of each atom. How I can do this? Do I need to make a new sphere_source for each atom.
vector< vector <double> > Positions;
vector< double > Sizes;
Take a look at vtkGlyph3D, and this example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/Glyph3D
However, you will need separate sphere source for each atom SIZE, all atoms having same size can use the same sphere source…