How can I create an animation from data in DevC++?

  • Context: C/C++ 
  • Thread starter Thread starter Lojzek
  • Start date Start date
  • Tags Tags
    Animation
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
Lojzek
Messages
246
Reaction score
1
I finished a program in DevC++ that calculates the movement of inelastic string in the field of gravity: it calculates coordinates of n points on the string at m diferent times.

I would like to use this data to make an animation, that would be independent of any program (so that I could sent it by e-mail). What is the easiest way to do this?
 
Physics news on Phys.org
Plot in gnuplot or something similar and save the plot to a file [e.g. png file].
Alternatively, write a short program in VPython and do a screencapture [with PIL?] to a file (or use a tool like SnagIt).
Use some tool (ImageMagick?) to string together the files together into an animation.
 
Thanks for the answer. I usually display results in Mathematica, so I have exported animation form there. The command which creates .gif animation file is

Export["name.gif",data,ConversionOptions -> {"Loop" -> True}]

, where data is a list of graphic objects. I also tried with .png but it only works for a single object (pictures), not for lists (animations).