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

  • Thread starter Thread starter Lojzek
  • Start date Start date
  • Tags Tags
    Animation
AI Thread Summary
A program developed in DevC++ calculates the coordinates of points on an inelastic string under gravity at various times. The user seeks to create an independent animation from this data, suitable for email sharing. Suggested methods include using gnuplot to plot the data and save it as a PNG file, or writing a short program in VPython for visualization and capturing the output with tools like PIL or SnagIt. Additionally, ImageMagick can be utilized to compile the images into an animation. The user has experience with Mathematica for displaying results and notes that exporting animations as GIF files is straightforward, but exporting multiple images as a GIF requires specific commands to handle lists of graphic objects.
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).
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top