Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to make an animation?

  1. Apr 17, 2008 #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?
  2. jcsd
  3. Apr 17, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
  4. Apr 19, 2008 #3
    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).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook