This is a demonstration of a very interesting SVG library that allows not only to create but also animate the images.
http://snapsvg.io/docs/#Paper.toString