Not to take away all of the credit, but this is very heavily based on a research paper, as pointed out elsewhere in the comments:
http://news.ycombinator.com/item?id=1215894
(2 of the 4 authors are at Adobe Research, while the others are at Princeton Univ.)