# Number of control points in a U-Spline

How would one determine the number of control points for a U-spline? A Google search on B-splines gives the formula m=n+p+1, where m is the number of knots, n is the number of control points, and p is the polynomial degree of the spline. The knot vector concept is a bit fuzzy for me from when I last used it a couple of years ago, and also, U-splines don’t use knot vectors, so that may or may not be helpful. What intuition can I gain on this question?

I’m also interested in the extension of this from 1d to higher-dimensional U-splines.

In general, there isn’t a closed form expression for the number of U-spline basis functions like there is for B-splines. This is due to the fact that, as you said, U-splines do not have a knot vector. Rather, U-splines are constructed by first building a Bezier mesh and finding a basis that preserves certain continuity constraints between elements. For this general case, finding the number of basis functions equates to finding the dimension of the nullspace of the global continuity constraint matrix. This quickly becomes computationally infeasible as the mesh size gets large.

TLDR; In general, there isn’t a way to determine this for arbitrary dimension, but there may be a way in 1D. I’ll think on it and post an answer here if I find one.

In 1d the number of functions a U-spline basis has is given by the following expression:

\sum_{e\in\text{edges}}(p_e+1) - \sum_{v\in\text{vertices}}(k_v+1)

where k_v is the continuity at a vertex between edges and p_e is the polynomial degree of an edge. The first sum is over all the edges in the mesh and the second sum is over all the vertices.
This assumes that the continuity of any vertex is less than or equal to the polynomial degree of the adjacent edges. This extends to tensor-product constructions but like Luke said the generic unstructured case can only be determined by actually building the basis. It is possible to do this for meshes corresponding to analysis-suitable T-splines but we haven’t worked out all the details of the closed-form expression for the number of functions. There is another case for which we haven’t constructed closed-form expressions but which should also be relatively straightforward. We’re still working on an appropriate name for this space but I’ll try to remember to update this thread once we have the closed-form expressions.