Read more about this in my blog post here. I built this on Ubuntu 16.04, you will need to have openGL to compile this.
For using this type make
and then ./tool
in the terminal. This version only produces the results in a viewing window, if you want to save the images to a file, uncomment the line number 223, which is using screenshot_ppm
to save the images. Be careful then to also define what the files should be called and where they should be saved.
The following is an example of rendered output, check the link above to see the animation in action.