Calculates Contour Lines