[vtkusers] Query on animating particles

Viksit Gaur vik.list.vtk at gmail.com
Wed May 17 23:48:10 EDT 2006


Hi all,

I was just animating a bunch of particles which I've rendered on the 
screen. I've got coordinates for each time step stored in a file, with 
each frame having 3D coords for 256 particles. The next 256 lines in the 
file would thus have the coords for the next frame, and so on.

I got this reference: 
http://public.kitware.com/pipermail/vtkusers/2005-February/078288.html

I was using a loop like the one below :

	c=0
         while c<5000:
                 for j in range(c,c+256):
                         points.InsertPoint(j, arr[j][0], arr[j][1], 
arr[j][2])
                         scalars.SetTuple1(j, 0.06)
                         c = c + 256
                 points.Modified()
                 renWin.Render()
                 iren.SetRenderWindow(renWin)
                 iren.Initialize()
                 iren.Start()

But I end up getting 2 windows instead of one, and of course, no 
animation. I was wondering if anyone has inputs on what the best method 
to do this would be.

Cheers,
Viksit


-- 
Viksit Gaur
Social Robotics Lab, Dept of Computer Science
Yale University
http://gundam.cs.yale.edu
http://viksit.com



More information about the vtkusers mailing list