Integration of Functions on Curves and Surfaces