Animation using 3D graphics


I have some particles that I draw in 3D using GLViewer. Their movement have a time evolution. I would like to make an animation (or “movie”) of these moving 3D graphics objects (using GLViewer, but also EVE is an option).
Could you please give a simple example how to do that? I.e. how to refresh and save each “frame” or “snapshots” after redrawing? Or if more advanced animation features exist.

Thanks for any info,


Ok, I figured it out using TGLViewer::SavePicture and redrawing
the top geom for each timestep, saving the ogl output to animated gif
and converting it to avi with ffmpeg.

Also with TGLSAViewer one can change the camera view
so that is also an option.



There is a class that does simple animation (rotations + zooming in and out):
It can also do animated gifs or write to a set of png files.

A GUI for this is in the “Extras” tab of GL-viewer. This was added in early 2011, don’t know exactly what version of root.