Our goal is to write programs which can produce video animations when compiled and executed. By following the steps below we can animate all classical systems, as long as we know the equation of motion.
We will need to write down the position at each instance of time in separate data files and then plot them on graphs and number them sequentially. These will be our frames for the animation. It is impractical to generate all these graphs manually, so we will need to automate the process and put it inside a loop. For combining these images and producing a video, Ubuntu users can conveniently use the command line program ‘ffmpeg’ (or ‘avconv’).
For writing into data files and plotting, I will write two modules which can be used (with necessary modifications) in all programs.