Polygon

This isn't necessarily finished, but it is in a state where @IanHopkinson should be able to look at it. If you think it's okay to merge, then please do so. Similarly, feel free to continue working on the branch in my absence.