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
Click For Summary
SUMMARY

The discussion focuses on creating animations from data generated in DevC++ that models the movement of an inelastic string under gravity. Users suggest utilizing gnuplot to plot the coordinates and save them as PNG files, or alternatively, employing VPython for animation and capturing the output using tools like PIL or SnagIt. For compiling the images into an animation, ImageMagick is recommended. Additionally, Mathematica's Export function is highlighted for creating GIF animations from graphic object lists.

PREREQUISITES
  • Familiarity with DevC++ for programming simulations
  • Understanding of gnuplot for data visualization
  • Knowledge of VPython for 3D animations
  • Experience with ImageMagick for image processing and animation creation
NEXT STEPS
  • Learn how to use gnuplot for plotting and exporting images
  • Explore VPython for creating interactive 3D animations
  • Investigate PIL for image manipulation and screen capturing
  • Study ImageMagick commands for combining images into animations
USEFUL FOR

Developers and researchers interested in visualizing simulation data, particularly those working with physics simulations in DevC++, as well as anyone looking to create animations from data outputs.

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?
 
Technology 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).
 

Similar threads

  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
Replies
4
Views
3K
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K