The Wikipedia article on
Marching Squares has a really
great diagram!
When you're generating individual segments, it's useful to keep the points in a consistent
winding order, so when you stick them together you know which side is the inside and which
is the outside.
You can get away with a fairly coarse resoution if you apply smoothing
Generating fills (isobands) will require some extra logic to connect the ends of shapes
that go outside the bounds of the canvas