First draft

Actually it's more of a first draft of a first draft. I'll keep updating the pull request until there's a proper first draft. The beginning, in particular, is quite choppy and decrepit. The middle isn't that great either. But the end is pretty good... right up until you fall off the page. 
Javascript has a basic object system. I might discuss (somewhere) why we don't use that to model edges and vertices, and instead use primitives directly.