Choosing the Optimal Number of B-spline Control Points (Part 1: Methodology and Approximation of Curves)