Find contours for a function f using the marching squares algorithm. A contour is found when f(x) crosses zero.