Keywords

2.1 Introduction

An introduction to B-splines, tensor product (TP) B-splines and the univariate minimal support B-spline basis (UMB) is provided in Sect. 2.2. LR B-splines are a generalization of local refinement of curves represented in UMB to the multivariate case, see Sect. 2.3 for details on refinement of B-spline curves. An overview of B-spline based methods for local refinement is addressed in Sect. 2.4, with LR B-splines described in more details in Sect. 2.5. To give a first motivation for the approach of LR B-splines, we will now illustrate the LR B-spline representation for the bivariate case, and introduce the notation used for describing LR B-splines.

We start from the traditional representation of a CAD-type TP B-spline surface.

$$\begin{aligned} F(u,v)= \sum _{i=0}^{N_1-1} \sum _{j=0}^{N_2-1} c_{i,j} B_{i,p_1}(u) B_{j,p_2}(v),\quad (u,v) \in [u_{p_1},u_{N_1}]\times [v_{p_2}, v_{N_2}]. \end{aligned}$$

Here \(c_{i,j} \in R^d\), \(i=0,\ldots ,N_1-1\), \(j=0,\ldots ,N_2-1\) are the surface coefficients and d is the dimension of the geometry space. Note that for parametric curves and surfaces, when the geometry space has dimension larger than 1 (\(d>1\)), i.e., when we have a parametric curve or surface, the coefficients are frequently denoted control points. In this chapter we will use coefficients except for cases where the use of control points is necessary to ensure clarity. We also have two UMBs, one in each parameter direction: \(B_{i,p_1}(u), i=0,\ldots ,N_1\) is an UMB defined over the knot vector \(\{u_0,\ldots ,u_{N_1+d_1} \}\), and \(B_{j,p_2}(v), j=0,\ldots ,N_2\) is an UMB defined over the knot vector \(\{v_0,\ldots ,v_{N_2+d_2} \}\). Note that the TP B-splines \(B_{i,j,p_1,p_2}(u,v)=B_{i,p_1}(u) B_{j,p_2}(v)\) are implicitly defined in the equation above. Making the TP B-splines explicit, the equation above can be reformulated to

$$\begin{aligned} F(u,v)= \sum _{i=0}^{N_1-1} \sum _{j=0}^{N_2-1} c_{i,j} B_{i,j,p_1,p_2}(u,v), \quad (u,v) \in [u_{p_1},u_{N_1}]\times [v_{p_2}, v_{N_2}]. \end{aligned}$$

In the equation above, the grid structure of coefficients and TP B-splines is still present. To prepare for LR B-splines we have to reformulate the above to a collection of TP B-splines with corresponding coefficients. Now define

$$\begin{aligned} \mathcal {B}_0=\{B \mid B=B_{i,j,p_1,p_2}(u,v), i=0,\ldots ,N_1-1, j=0,\ldots ,N_2-1 \}. \end{aligned}$$

This allows us to express F(uv) as

$$\begin{aligned} F(u,v)=\sum _{B \in \mathcal {B}_0} c_B s_B B(u,v). \end{aligned}$$

The scaling factors \(s_B\) are introduced to allow scaling of refined B-splines to provide a scaled partition of unity of a collection of LR B-splines. For a TB-surface all \(s_B \equiv 1\). Note that we index the coefficients \(c_B\) and the scaling factors \(s_B\) by the TP B-spline B that it corresponds to.

2.2 B-Splines and Tensor Product B-Splines

Given a non-decreasing sequence \(\textbf{u}=(u_0,u_1,\ldots ,u_{p+1})\) we define a B-spline \(B[\textbf{u}]:{\mathbb {R}} \rightarrow {\mathbb {R}}\) of degree \(p\ge 0\) recursively as follows [Sch81]

$$\begin{aligned} B[\textbf{u}](u):=\frac{u-u_0}{u_{p}-u_0} B[u_0,\ldots ,u_{p}](u)+ \frac{u_{p+1}-u}{u_{p+1}-u_1}B[u_1,\ldots ,u_{p+1}](u), \end{aligned}$$
(2.1)

starting with

$$\begin{aligned} B[u_i,u_{i+1}](u):={\left\{ \begin{array}{ll} 1;&{}\text{ if }\,\,u_i\le u < u_{i+1};\\ 0;&{}\text{ otherwise },\end{array}\right. } \quad i=0,\ldots ,p. \end{aligned}$$

We define \(B[\textbf{u}]\equiv 0\) if \(u_{p+1}=u_0\) and terms with zero denominator are defined to be zero.

A univariate spline space can be defined by a polynomial degree p and a knot vector \(\textbf{u}= \{u_0, u_2, \ldots , u_{N+p} \}\), where the knots satisfy: \(u_{i+1} \ge u_{i}\), \(i=0,\ldots ,N+p-1\), and \(u_{i+p+1} > u_{i}\), \(i=0,\ldots ,N-1\), i.e, a knot value can be repeated \(p+1\) times. The number of times a knot value is repeated is called the multiplicity m of the knot value. The continuity of the spline function across a knot value of multiplicity m is \(C^{p-m}\).

A basis for the univariate spline space above can be defined in many ways. The approach most often used is the univariate minimal support B-spline basis. In this, the B-splines are defined by selecting \(p+2\) consecutive knots from \(\textbf{u}\), starting from the first knot. So \(B_{i,p}(u):= B[u_i,\ldots ,u_{i+p+1}](u)\) is defined by the knots \(u_i,\ldots ,u_{i+p+1}\), \(i=0,\ldots ,N-1\). The minimal support B-spline basis has useful properties that ensure numeric stability such as local support, non-negativity and partition of unity (the basis functions sum up to one in all parameter values in the interval \([u_p,u_{N}]\)).

Given two non-decreasing knot sequences \(\textbf{u}= \{u_0, u_1, \ldots , u_{N_1+p_1} \}\) and \(\textbf{v}= \{v_0, v_1, \ldots , v_{N_2+p_2} \}\) where \(p_1\ge 0\) and \(p_2\ge 0\). We define a bivariate TP B-spline \(B_{i,j,p_1,p_2}: {\mathbb {R}^2} \rightarrow {\mathbb {R}}\) from the two univariate B-splines \(B_{i,p_1}(u)\) and \(B_{j,p_2}(v)\) by

$$\begin{aligned} B_{i,j,p_1,p_2}(u,v):=B_{i,p_1}(u) B_{j,p_2}(v). \end{aligned}$$

The support of B is given by the Cartesian product

$$\begin{aligned} \textit{supp}(B_{i,j,p_1,p_2}):=[u_i,u_{i+p_1+1}] \times [v_j,v_{j+p_2+1}]. \end{aligned}$$

A bivariate TP spline space is made by the tensor product of two univariate spline spaces. Assuming that both univariate spline spaces have a minimal support B-spline basis, the minimal support basis for the TP B-spline space is constructed by making all tensor product combinations of the B-splines of the two bases. The minimal support basis for this spline space contains the TP B-splines \(B_{i,j,p_1,p_2}(u,v)\), \(i=0,\ldots ,N_1-1\), \(j=0,\ldots ,N_2-1\). As in the univariate case, the basis has useful properties such as non-negativity and partition of unity.

2.3 Refinement of B-Spline Curves

Spline curves are frequently represented using a univariate minimal support B-spline basis.

$$\begin{aligned} f(u) = \sum _{i=0}^{N-1} c_i B_{i,p}(u), u \in [u_{p},u_{N}]. \end{aligned}$$
(2.2)

Here \(c_i \in R^d\), \(i=0,\ldots ,N-1\) are the curve coefficients and d is the dimension of the geometry space. The curve lies in the convex hull of its coefficients.

Fig. 2.1
figure 1

Knot insertion into a quadratic B-spline curve. a Initial curve with basis functions, b curve and basis functions after knot insertion, c curve and basis functions after re-positioning of one coefficient

A B-spline curve can be locally refined. Figure 2.1a shows a quadratic curve with knot vector \({\{0,0,0,1,2,3,3,3\}}\). The curve coefficients and the control polygon corresponding to the curve are included in Fig. 2.1, and the associated B-splines are shown below. In Fig. 2.1b, a new knot with value 2 is added, thus increasing the knot multiplicity in an already existing knot. The curve is not altered, but the control polygon is enhanced with a new coefficient. The coefficient is marked with a circle in Fig. 2.1b. The double knot at 2 allows creating a curve with \(C^0\) continuity. When moving the coefficient marked with a square, we obtain a sharp corner as in Fig. 2.1c. Note that only the last part of the curve is modified.

2.4 B-Spline Based Locally Refined Surface Methods

As described in Sect.  2.3, adding an extra local degree of freedom to a univariate B-spline basis just adds a knot, and an additional coefficient. However, adding an extra degree of freedom in one of the univariate minimal support B-spline basis of a TP B-spline represented surface adds an extra row or column of coefficients in the coefficient grid, with a resulting large increase in the bulk of the surface representation. Consequently, for application areas where it is desirable to add extra degrees of freedom/representation power locally just where needed, TP B-spline representations are not a good solution.

In some applications such as Isogeometric Analysis (IgA) [Hug05], and the representation of terrain and seabed, the lack of local refinement is a severe restriction. A TP B-spline surface covers a rectangular domain and the need for approximation power will not in the general case be uniformly distributed throughout the domain. In IgA the traditional shape functions local to each element in Finite Element Analysis are replaced by B-splines that cross element boundaries and connect elements with higher order continuity.

There are three main B-spline based approaches for extending spline surfaces to support local refinement [Dok19].

  • Hierarchical B-splines (HB) [For88, Kra98] and Truncated Hierarchical B-splines (THB) [Gia12, Spl17] are based on a dyadic sequence of grids determined by scaled lattices. On each level of the dyadic grids a spline space spanned by uniform TP B-splines is defined. The refinement is performed one level at the time. For HB, TP B-splines on the coarser level are removed and B-splines at the finer level added in such a way that linear independence is guaranteed. The sequence of spline spaces for HB will be nested. To ensure partition of unity of the basis THB were introduced that truncate the TP B-splines of the hierarchical basis by TP B-splines from the finer levels.

  • T-splines [Sed03, Sed04] denote a class of locally refined splines, most often presented using bidegree (3, 3). In T-spline terminology control points are used rather than coefficients. Thus we stick to this terminology when addressing T-splines. The starting point for T-spline refinement is a TP B-spline surface with control points and meshlines (initial T-mesh) with assigned knot values. For bidegree (3, 3) T-splines, the knot vectors of the TP B-spline corresponding to a control point are determined by moving in the T-mesh outwards from the control point in all four axis parallel parameter directions and picking in each direction knot values from the two first T-mesh lines and/or control points intersected. The mid knot value in each knot vector is copied from the start control point. The refinement is performed by successively adding new control points in-between two adjacent control points in the T-mesh. A new control point inherits one parameter value from the T-mesh line. The other parameter is chosen so that the sequence of control point parameter values have a monotone evolution along the T-mesh line. Control points on adjacent parallel T-mesh lines that have one shared parameter value are connected with a new T-mesh line. The general formulation of T-splines does not guarantee a sequence of nested spline spaces. However, T-spline subtypes such as semi-standard T-splines and Analysis Suitable T-splines do so by imposing restrictions on how to refine, see Scott et al. [Sco11].

  • Locally Refined (LR) B-splines [Dok13, Joh13] the refinement approach of this book, starts (as T-splines, HB and THB) from a TP B-spline surface. The refinement is performed successively by inserting axis parallel meshlines in the mesh of knotlines (from here on denoted the mesh). Each meshline inserted has to split the support of at at least one TP B-spline. The constant knot value of a meshline inserted is used for performing univariate knot insertion. The refinement is performed in the parameter direction orthogonal to the meshline in all TP B-splines that have a support split by the meshline. This approach ensures that the spline spaces produced are nested and that the polynomial space is spanned over all polynomial elements. In Sect. 2.5, we provide further details on additional refinements triggered and how the resulting TP B-splines can be scaled to achieve partition of unity.

Note that a main distinction between T-spline algorithms on the one side, and LR B-spline, HB and THB algorithms on the other side is that T-spline algorithms work in the mesh of control points and find the collection of B-splines traversing the mesh of control points, while LR B-spline, HB and THB algorithms directly refine the spline space and thus automatically ensure nested spline spaces.

2.5 LR B-Spline Refinement Method

The process of Locally Refined B-splines is described in detail in [Dok13]. Please consult the paper for formal proofs. Below a summary of the most important steps is presented.

The refinement always starts from a TP B-spline space \(\mathcal {B}_0\). The refinement proceeds with a sequence of meshline insertions producing a series of collections of TP B-splines \(\mathcal {B}_0, \mathcal {B}_1, \ldots , \mathcal {B}_k, \mathcal {B}_{k+1}\) spanning nested spline spaces each providing a refined surface

$$\begin{aligned} F(u,v)=\sum _{B \in \mathcal {B}_i} c_B s_B B(u,v), \quad i=0,1,\ldots ,k,k+1. \end{aligned}$$
(2.3)

Above we end with \(k+1\), as we will now detail how to create \(\mathcal {B}_{k+1}\) from \(\mathcal {B}_k\).

Note that we require that all TP B-splines in these collections have minimal support. By this we mean that all meshlines that cross the support of a TP B-spline also have to be a line in the mesh representing the knots of the TP B-splines counting multiplicity. We denote these meshlines knotlines of the TP B-spline. Thus, to ensure that all TP B-splines have this property, the process of going from \(\mathcal {B}_k\) to \(\mathcal {B}_{k+1}\) frequently includes a number of intermediate steps and a corresponding sequence of intermediate LR B-spline collections.

Assume that Eq. 2.3 represents F(uv) using the collection \(\mathcal {B}_{k}\) and we now want to represent F(uv) using a refined collection of minimal support TP B-splines \(\mathcal {B}_{k+1}\). The refinement process goes as follows:

  • As long as there is a \(B\in \mathcal {B}_k\) that does not have minimal support on the refined mesh we proceed as follows. Let \(\gamma \) be a meshline that splits the support of B. This means that either \(\gamma \) is not a knotline of B, or \(\gamma \) is a knotline of B but has higher multiplicity than the knotline of B. Decompose B into its univariate component B-splines \(B(u,v)=B(u)B(v)\). We now have two cases:

    • If \(\gamma \) is parallel to second parameter direction then it has a constant parameter value a in the first parameter direction. We insert a in the univariate B-spline B(u) using Eq. 2.5 below and express B(u) as \(B(u)=\alpha _1 B_1(u)+\alpha _2 B_2(u)\). Then we make two new TP B-splines \(B_1(u,v)= B_1(u)B(v)\) and \(B_2(u,v)= B_2(u)B(v)\).

    • If \(\gamma \) is parallel to first parameter direction then it has a constant parameter value a in the second parameter direction. We insert a in the univariate B-spline B(v) using Eq. 2.5 below and express B(v) as \(B(v)=\alpha _1 B_1(v)+\alpha _2 B_2(v)\). Then we make the two new TP B-splines \(B_1(u,v)= B(u)B_1(v)\) and \(B_2(u,v)= B(u)B_2(v)\).

B can be decomposed as follows, \(B(u,v) = \alpha _1 B_1(u,v) + \alpha _2 B_2(u,v)\). We can now express F(uv) by replacing B(uv) with the two new TP B-splines. \(F(u,v)=F(u,v) - c_B s_B B(u,v) + c_B s_B(\alpha _1 B_1(u,v) + \alpha _2 B_2(u,v))\). We update \(\mathcal {B}_{k}\) by removing B and adding the TP B-splines \(B_1(u,v)\) and \(B_2(u,v)\). In addition we have to create/update both coefficients and scaling factors belonging to these two TP B-splines. We must have in mind that \(B_1(u,v)\) and \(B_2(u,v)\) often will be duplicates of B-splines already in \(\mathcal {B}_{j}\). Now let \(B_r, r=1,2\)

  • In the case \(B_r\) has no duplicate set \(s_{B_r}=s_B \alpha _r\) and \(c_{B_r}=c_{B}\).

  • In the case \(B_r\) has a duplicate \(B_d\) set \(s_{B_r} = s_{B_d}+s_B \alpha _r\) and \(c_{B_r}=(s_{B_d} c_{B_d}+s_B \alpha _r c_{B})/ ({s_{B_r}})\), and remove the duplicate.

Note that \(s_{B}\), \(\alpha _r\) and \(s_{B_d}\) are all positive numbers, thus \(s_{B_r}\) will be positive.

When all \(B\in \mathcal {B}_{k}\) have minimal support, we set \(\mathcal {B}_{k+1}=\mathcal {B}_{k}\).

To simplify notation as in Chap. 3, we now define the scaled TP B-splines \(N_{B}(u,v)=s_B B(u,v)\) to provide a basis that is partition of unity for the spline space spanned by \(\mathcal {B}_j\). If \(F(x,y)\equiv 1\) then all coefficients of the TP B-spline surface we start from, are 1. In this case the coefficients \(c_{B_r}\) calculated above all remain 1, duplicates or not. Consequently,

$$\begin{aligned} \sum _{B \in \mathcal {B}_k} N_B(u,v) =\sum _{B \in \mathcal {B}_k} s_B B(u,v) =\sum _{B \in \mathcal {B}_0} B(u,v) =1. \end{aligned}$$
(2.4)

The process of inserting a knot \(a \in (u_0,u_{p+1})\) into the local knot vector \([{\textbf{u}}]=\{u_0,\ldots ,u_{p+1}\}\) belonging to a univariate B-spline \(B[{\textbf{u}}]\), of degree p was first described by Boehm [Boe80]. We organize the resulting sequence of knots as a non-decreasing knot sequence \(\{\hat{u}_0,\ldots ,\hat{u}_{p+2}\}\). From this we make two new B-splines \(B_1[{\textbf{u}}_1]\) and \(B_2 [{\textbf{u}}_2] \) with corresponding knot vectors \([{\textbf{u}}_1]=\{\hat{u}_0,\ldots ,\hat{u}_{p+1}\}\) and \([{\textbf{u}}_2]=\{\hat{u}_1,\ldots ,\hat{u}_{p+2}\}\). Then

$$\begin{aligned} B[{\textbf{u}}]=\alpha _1 B_1[{\textbf{u}}_1] +\alpha _2 B_2[{\textbf{u}}_2], \end{aligned}$$
(2.5)

where

$$\begin{aligned} \begin{aligned} \alpha _1&:={\left\{ \begin{array}{ll} \frac{a-u_{0}}{u_{p}-u_{0}},&{} u_{0}<a<u_{p},\\ 1,&{}u_{p}\le a<u_{p+1}, \end{array}\right. }\\ \alpha _2&:={\left\{ \begin{array}{ll} 1,&{}u_{0}<a\le u_{1},\\ \frac{u_{p+1}-a}{u_{p+1}-u_{1}},&{} u_{1}<a<u_{p+1}. \end{array}\right. } \end{aligned} \end{aligned}$$
(2.6)
Fig. 2.2
figure 2

Parameter domain of an LR B-spline surface with indication on B-spline support. The mesh is shown as black lines. The support of two overlapping B-splines are shown in red and in blue

The incremental refinement by knot insertion used by LR B-splines ensures that the spline spaces generated are nested. Figure 2.2 shows a parameter domain and the segmentation into boxes corresponding to a biquadratic LR B-spline surface. In addition the support of two TP B-splines is shown. We see that a meshline stops inside the blue TP B-spline support. This meshline is excluded from the local knot vectors defining the TP B-spline covering this support.

Linear independence of the resulting collection \(\mathcal {B}_{k+1}\) of LR B-splines is not guaranteed, but occurrences are rare for the constructions used in this book. The approximation procedure outlined in Chap. 3 does not depend on linear independence. LR B-spline linear dependency configurations can, however, be resolved, if needed by an application, by insertion of extra meshlines. Linear dependence of LR B-splines is addressed in detail in [Pat20].