Update: Phun (click!) might be a better software doing the same things. I've tested it, it's cool.
This impressive show was created with the help of Working Model 2D or maybe a related program described by Zephir (!) in the fast comments. It can figure out what you are drawing, idealize it, and simulate what will happen in the real world of classical mechanics with it.