Just to make sure that I understood you correctly:
you want to have a function f(xl,yl) -> (x,y)
I would guess that this is not unambiguously feasible unless you specify at least the x values for which you want the y. This is because multiple sets of (x,y) can lead to the same spline function. Using only the values of the spline function at different points xl does not make it any easier.

I assumed that given a set of discrete xy points and their corresponding spline (the result from, say, Spline1D(x, y)), I could get a unique control polygon. Ultimately Iâ€™d like to get a measure of how much the spline needed to â€śturnâ€ť to fit said points. I had hoped to get such a measure from the angles between the straight lines composing the polygonâ€¦

I think the (x,y) coordinates are the knots of the spline, which is different from the control points. I suspect that the control points are a artificial construct, and that these help visualize how the spline is generated, but do not have anything to do with the splineâ€™s propertiesâ€¦

I am not sure what you are looking for here. B-splines are defined by a set of knots, are evaluated at some values x, and fit using a linear solution or least squares, to values or various derivatives. The x may or may not coincide with the knots â€” they donâ€™t even have the same length, depending on how you set up the problem and the order of the splines

spline knots: xy coordinates the fitted spline passes through

spline degree: the degree of the function describing the spline

control points/polygon: a bunch of straight lines that have some relation to the resulting spline.

Iâ€™m wondering if there is any way I can get the control points/polygon.
I just found this blog: https://opensourc.es/blog/bezier-curve about these control points. In any case, there is a nice illustration of these there, here it is:

I think you are confusing B-splines with Bezier curves, they are different things.

Also, generally for B-splines, no â€śpolygonâ€ť drawn, say, tangentially at various points would determine the spline except for some very special cases.

You may find reading an intro text about B-splines helpful.

I still need to read that book you mentioned, but check this continuation post @Wikunia wrote: https://opensourc.es/blog/b-spline
It would be good to hear what Olle has to say too.

Thanks for reaching out. I think you have a misunderstanding of knots here as it really is just a list of number and not of coordinates.
As mentioned I think the control polygon is not well defined. I normally construct it the other way around. Itâ€™s interesting though. Maybe one can dive deeper into the Julia package to find it out.
I think Iâ€™m not quite sure what youâ€™re interested in exactly. Maybe just curvature? Or what do you mean by â€śturnâ€ť?

My understanding of that blog post is that it describes how to approximate a polygon with B-splines. Reconstruction of such a polygon is an interesting problem, but I am not sure it has a unique solution.

What Iâ€™m truly after is some reliable measure of how curvy a section of a trajectory is.

I have a trajectory, a set of xy coordinates + time. These are noisy and not entirely reliable. I want to smooth the trajectory using splines. These trajectories are easily divided into two parts:

a more or less straight part where there are hardly any turns larger than 45 degrees.

a more curvy part where there is a mix of turns, some of which are 189 degrees.

I naively thought that it would be useful to describe the curviness of the trajectory as a function of the angle between each subsequent segments of the control polygon. This is why Iâ€™ve been asking about these control points/polygonâ€¦

At the end of the day Iâ€™m trying to do three things in one shot: smooth the data, allow for interpolation, detect where the straight part ends and the curvy part begins.

You could calculate the second derivative of the spline approximation at various points in that section. It is easy with B-splines (but make sure you use at least cubic).