I've read many articles that describe how to convert cardinal or canonical splines into cubic bezier curves, such as this one.
Is there a way to do the reverse, i.e. convert a set of cubic bezier curves into a cardinal spline? We know, for example, that the endpoints of each curve are on the spline.
What I'm looking for is a way to roundtrip through the two representations with minimal loss of information. Also ideally the solution should be stable, so that going from cubic bezier => cardinal spline => cubic bezier => cardinal spline should result in the same (or nearly same) curves after the second operation.