Fitting a curve with Path2D
Given N ordered sample points on a curve, I want to generate a Path2D (or PathIterator) with as few segments as possible that "fits" my curve. The Path2D curve does not need pass through all the sample points, but the max distance, or alternatively the sum of the squares of the distances, between the sample points and the Path2D curve must be less than a given threshold.
From the little search I have done so far, it seems to me that finding a best fitting spline curve (B-spline) is a classical problem in computer graphics, but B-splines are not quite the same thing as a concatenation of 1, 2, or 3-degree Bezier curves (which makes up a Path2D).
Can anyone point me to some publicly available implementation, or provide some reference to literature than explains the algorithms?

