Spline functions, convex curves and mechanical quadrature