(Partial) rewrite of fig7 code
Merge pull request #3 from hadley/master

(Partial) rewrite of fig7 code