ArticlePDF Available

Extending B‐spline by piecewise polynomial

Authors:

Abstract

Curve extension is a useful tool in the computer‐aided design (CAD) community. A given B‐spline curve usually needs to be extended by another curve to reach one or more target points. In this work, we aim to enlarge the representation domain of the extending part to achieve the optimal extending result in the global solution space. Inspired by this, we have made three contributions. First, we use piecewise polynomial, that is, a nonuniform B‐spline, instead of one polynomial segment to extend the original curve. Compared to one polynomial segment, curves consisting of piecewise polynomial have stronger modeling ability and therefore expand the solution space of the problem. For extension to multiple target points, we are the first to directly give extension results based on all target points rather than extending to every target step by step. Third, we exploit the matrix representation of B‐splines to obtain an explicit solution for this extension problem. The detailed formula derivations and experimental results are provided to show the validity and effectiveness of our method.
Received: 3 July 2020 Accepted: 15 July 2020
DOI: 10.1002/cav.1942
SPECIAL ISSUE PAPER
Extending B-spline by piecewise polynomial
Xinyue Liu Xingce Wang Zhongke Wu
Beijing Normal University, Beijing, China
Correspondence
Xingce Wang, Beijing Normal University,
Beijing, China.
Email: wangxingce@bnu.edu.cn
Funding information
National Key Cooperation from the BRICS
Program of China, Grant/Award Number:
No. 2017YFE0100500; National Key R&D
Program of China, Grant/Award
Numbers: No. 2017YFB1002604, No.
2017YFB1402105; National Nature
Science Foundation of China,
Grant/Award Number: No.61972041
Abstract
Curve extension is a useful tool in the computer-aided design (CAD) commu-
nity. A given B-spline curve usually needs to be extended by another curve to
reach one or more target points. In this work, we aim to enlarge the repre-
sentation domain of the extending part to achieve the optimal extending result
in the global solution space. Inspired by this, we have made three contribu-
tions. First, we use piecewise polynomial, that is, a nonuniform B-spline, instead
of one polynomial segment to extend the original curve. Compared to one
polynomial segment, curves consisting of piecewise polynomial have stronger
modeling ability and therefore expand the solution space of the problem. For
extension to multiple target points, we are the first to directly give extension
results based on all target points rather than extending to every target step by
step. Third, we exploit the matrix representation of B-splines to obtain an explicit
solution for this extension problem. The detailed formula derivations and
experimental results are provided to show the validity and effectiveness of our
method.
KEYWORDS
G2continuity, B-spline, curve extension, matrix representation of B-spline, minimal strain energy
1INTRODUCTION
B-spline curve extension is a fundamental operation to solve many computer-aided design (CAD) problems.1,2 Agiven
B-spline curve c(t) usually needs to be smoothly extended to a target point Ror a group of target points {Ri}whilealso
maintaining its shape invariance. In general, the ideas for implementing B-spline curve extension can be classified into
two types: curve unclamping3,4 and minimal strain energy.5,6 The curve unclamping method directly constructs a resulting
curve that contains all the curve points of c(t) and passes through every target point. Unfortunately, the resulting curve
generated by this method cannot be adjusted manually and is often inadequate with respect to the fairness demand. The
minimal strain energy method that constructs a resulting curve just between the endpoint of the given curve and the
target point overcomes the drawbacks to some extent. In this method, the extending part is represented as a Bézier curve
based on G2continuity7at the joint point, which provides two degrees of freedom. The parameters are then determinedby
minimizing a strain energy function to achieve the fairest extending curve. However, the resulting curve by this method
often fails to be the globally optimal solution because the solution space of one polynomial segment is incomplete. In this
paper, we use piecewise polynomial, that is, a nonuniform B-spline, to represent the extending part. We then solve the
parametric expression of the optimal extending curve, which is a functional optimization problem. The contributions of
our work are summarized as follows:
Comp Anim Virtual Worlds. 2020;31:e1942. wileyonlinelibrary.com/journal/cav © 2020 John Wiley & Sons, Ltd. 1of14
https://doi.org/10.1002/cav.1942
2of14 LIU  .
We use a nonuniform B-spline instead of a Bézier to extend a given B-spline curve. The extending part with only one
segment is often inadequate due to the incompleteness of its solution space. We enlarge the representation domain of
the extending part by representing it as piecewise polynomial.
For extending to multiple target points, we are the first to give extension results based on the distribution of all target
points. The existing methods3-6 extend to every target step by step. In each step of the extension to the intermediate
target points, they ignore the distribution of the next target point. Compared to these methods, our algorithm yields
the optimal extending result from the whole directly.
We introduce the matrix representation of cubic B-splines in the B-spline extension problem, which transforms the
functional optimization problem into a parameter-solving problem and makes it possible to obtain an explicit solution
to the problem. Therefore, our method is more effective and efficient.
2RELATED WORK
In this section, we first review the previous B-spline extension algorithms. Later, we introduce the matrix formula of
B-splines, which is the mathematical tool we use to solve this extension problem.
2.1 Extension for B-splines
Shetty and White8were the first to propose a practical method for extending B-spline curves without modifying the
shape and parameterization of the original curves. With their method, the knot vector of the extending curve will have
as many repeating knots as the curve order, which is not favored in CAD applications. There are then two types of
ideas for solving the extension problem: curve unclamping and minimal strain energy. Hu3first proposed the exten-
sion algorithm based on curve unclamping. The resulting curve by their method can achieve C2continuity at the joint
point but cannot be adjusted manually. In addition, the method usually fails to meet the fairness demand in some
large torsion cases. Lu4improved Hu’s method in terms of time complexity by converting the original clamped B-spline
into a uniform B-spline curve. The problems of exclusivity and fairness of the resulting curve remain unresolved. Mo5
and Zhou6have transformed the extension problem into optimization problems with the extending part determined
by minimizing energy functions. In their methods, they construct the extending curve as the B
ezier form based on G2
continuity7at the joint point, which provides two degrees of freedom. They then solve the parameters by minimizing
the strain energy of the extending curve to ensure its fairness. Alternatively, the shape of the extending curve can be
manually adjusted by changing the parameters of the G2continuity conditions. However, as a result of the limited solu-
tion space of one polynomial segment, representing the extending curve as B
ezier form often fails to yield the globally
optimal solution. In addition, when extending to multiple target points, a new B
ezier curve is added between every
two adjacent target points step by step. Then knot-removal algorithm9is used to combine these extending curves into
one. This action yields the optimal result just between two adjacent target points, but not the optimal result from the
whole. In this work, we use piecewise polynomial to overcome the limited solution space caused by using one polyno-
mial segment. Moreover, we directly give final extension results based on all target points when extending to multiple
targets.
2.2 Matrix formula of B-splines
In CAD, it is both convenient and practical to use matrix notation in representing parametric curves and surfaces. The
matrix representation for B-spline curves is very useful with respect to various issues such as efficient evaluation of
B-spline function and its derivatives. Many studies have investigated the matrix form spline curves.10-13 Reference 14 pre-
sented explicit rather than recursive matrix representation formulations for arbitrary degree NURBS curves and surfaces.
For the B-spline extension problem, solving the fairest extending curve is a nonlinear functional optimization problem. We
introduce matrix representation of B-splines to transform the functional optimization problem into a parameter-solving
problem, and we finally obtain the explicit solution of the problem.
LIU  . 3of14
3PRELIMINARIES
Before we start to explain our algorithm, we briefly introduce some fundamentals with respect to solving the B-spline
extension problem, including the definition of B-spline, G2continuity between curves, and matrix representation of
B-splines.
3.1 B-spline curves
A B-spline curve of order kwith control points Qi(i=0,1, ,m) can be defined as
c(t)=
m
i=0
Ni,k(t)Qi,tk1ttm+1,(1)
where Ni,k(t) is the B-spline basis function of order kdefined over the knot vector T={t0,,tm+k}. This can be defined
by the de Boor-Cox formula.15
3.2 G2 continuity
Parametric spline curves are often constructed so that the first nparametric derivatives agree where the curve segments
abut. Such Cncontinuity disallows many parameterizations that generate geometrically smooth curves.7To allow more
flexible extension curves, we consider geometric continuity, a relaxed form of mathematical continuity in our method.
For two cubic B-spline curves c(t)=m
i=0Ni,k(t)Qi,t∈[0,1)and c(t)=n
i=0Ni,k(t)Pi,t∈[0,1)with a joint point c(1) or
c(0)in between, the G2continuity condition at their junction is
c(0)=c(1)
c(0)=c(1)
c′′(0)=2c′′ (1)+c(1),
(2)
where the degree of freedom is a positive real number and is an arbitrary real number. By substituting derivatives of
c(t)into (2), we further understand that the first three control points of c(t)need to meet the following conditions
P0=c(1)
P1=(tkt1)
3c(1)+c(1)
P2=2(tkt2)(tk+1t2)
6c′′(1)+tk+1+tkt2t1
3c(1)+(tkt2)(tk+1t2)
6c(1)+c(1).(3)
3.3 Matrix representation of B-splines
The polynomial space spanned by the B-spline basis can be converted into the piecewise polynomial representation
spanned by the power basis so that the matrix representation for NURBS curves is always possible. For a B-spline curve
c(t) defined on the knot vector T={ti}, its segment over the interval [tr,tr+1) has the following matrix form after the
parameter normalization, i.e.,u=(ttr)/(tr+1tr):
c(u)=
r
i=rk+1
Ni,k(t)Pi=UMk(r)P,(4)
4of14 LIU  .
where U=(1,u,,uk1) is the power basis, P=(Prk+1,Prk+2,,Pr)Tis the vector of control points, and Mk(r)isa
k×kmatrix:
Mk(r)=
a0,rk+1a0,rk+2a0,r
a1,rk+1a1,rk+2a1,r
⋮⋮
ak1,ik+1ak1,rk+2ak1,r
.(5)
Mk(r) is called the coefficient matrix of the B-spline curve c(t) in the nonempty interval [tr,tr+1). In particular, the
coefficient matrix M4(r) of cubic B-splines can be represented as
(tr+1tr)2
(tr+1tr1)(tr+1tr2)1m00 m02
(trtr1)2
(tr+2tr1)(tr+1tr1)0
3m00 3m00 m12
3(tr+1tr)(trtr1)
(tr+2tr1)(tr+1tr1)0
3m00 3m00 m22
3(tr+1tr)2
(tr+2tr1)(tr+1tr1)0
m00 m00 m32 m33 m32
(tr+1tr)2
(tr+3tr)(tr+2tr)
(6)
where mij denotes the element in row i+1andcolumnj+1, and m32 =−
1
3m22 m33 (tr+1tr)2
(tr+2tr)(tr+2tr1). The derivation of
the coefficient matrix is provided in Reference 14.
4PROBLEM FORMULATION
Denote the given B-spline curve by c(t), t[0,1), and the target point by R. Our goal is to find a curve c(t),t∈[0,1),that
can extend c(t)toRsmoothly and fairly. Here, G2continuity required at the joint point between c(t)andc(t)represents
smoothness. The strain energy describes the fairness of c(t). Generally, the less strain energy a curve has, the fairer and
more natural it will look.16,17 We would like to find an extending curve c(t)that has the minimal strain energy meanwhile
subject to G2continuity conditions. Therefore, the problem of B-spline extension is described as a constrained functional
optimization problem. Its detailed formulation is as follows
min
c(t)
EG(c(t))
s.t.c(0)=c(1)
c(0)=c(1)
c′′(0)=2c′′ (1)+c(1)
c(1)=R.(7)
In previous studies, c(t)was represented as a Bézier curve of one polynomial segment. The studies then tried to find the
optimal c(t)with the minimal strain energy within the solution space of Bézier form. However, the resulting curve with
one polynomial segment may not be the globally optimal curve due to its limited solution space. We consider construct-
ing c(t)as piecewise polynomial, that is, B-spline, to expand the solution space of the extension problem. As shown in
Figure 1, curves with piecewise polynomial form can model more diverse shapes than those with one polynomial segment.
Therefore, representing the extending part as piecewise polynomial enlarge its representation domain. The extending
curve we ultimately obtain can be closer to the optimization goal.
LIU  . 5of14
FIGURE 1 Functional spaces
of the extending curves. The orange
curves are the input c(t), and the
black dot is target R. All of the red
curves in (a) and (b) are optional as
the extending results c(t).(a) One
polynomial segment as extending
curve, (b) Piecewise polynomial as
extending curve
(a) One pol
y
nomial se
g
ment as extendin
g
curve (b) Piecewise polynomial as extending curve
5EXTENSION OF B-SPLINE CURVES
In this section, we first derive the strain energy formula of B-spline. We then give the formula derivation process of
extending a given curve to one target point and multiple target points.
5.1 Explicit strain energy formula of B-splines
The strain energy function17 of a parametric curve c(t),t∈[0,1)is expressed as
EG(c(t)) = 1
0c′′(t)2dt,(8)
where is the Euclidean norm. When c(t)is expressed as a B-spline, that is c(t)=n
i=0Ni,k(t)Pi,t∈[tk1,tn+1),wecan
further derive its strain energy function according to the additivity of integration on intervals
EG(c(t)) =
n
i=k1ti+1
tic′′
ik+1(t)2dt.(9)
Deriving the strain energy of c(t)directly from the de Boor-Cox recursive algorithm is extremely tedious; here, we adopt
its matrix representation. For segment cik+1(t), its matrix representation is as follows
cik+1(t)=1tti
ti+1ti
(tti)2
(ti+1ti)2
(tti)3
(ti+1ti)3
M4(i)Pi3Pi2Pi1PiT(10)
M4(i)istheith basis matrix of cubic B-spline basis functions and can be obtained by Equation (6). Now, the square of the
second derivative norm of cik+1(t)can be easily derived in the matrix representation
c′′
ik+1(t)2=00 2
(ti+1ti)2
6(tti)
(ti+1ti)3
N4(i)00 2
(ti+1ti)2
6(tti)
(ti+1ti)3T
,(11)
where, N4(i)=M4(i)
Pi3Pi3Pi3Pi2Pi3Pi1Pi3Pi
Pi2Pi3Pi2Pi2Pi2Pi1Pi2Pi
Pi1Pi3Pi1Pi2Pi1Pi1Pi1Pi
PiPi3PiPi2PiPi1PiPi
M4(i)T
6of14 LIU  .
The polynomial expression of c′′
ik+1(t)2is
c′′
ik+1(t)2=4ni
22
(ti+1ti)4+12(tti)(ni
23 +ni
32)
(ti+1ti)5+36(tti)2ni
33
(ti+1ti)6,
where ni
22,ni
23,ni
32,ni
33 are elements of matrix N4(i). The strain energy function of c(t)can be obtained by integrating the
above formula
EG(c(t)) =
n
i=k1
4ni
22 +6(ni
23 +ni
32)+12ni
33
(ti+1ti)3
=
n
i=k1
k1
a=0
a
b=0
ci
a,bPiaPib,(12)
where ci
a,brepresents the coefficient of PiaPib. They are determined by knots of c(t).
5.2 Extension with one target point
We express the original B-spline curve as c(t)=m
i=0Ni,k(t)Qiand the extending curve also as a cubic B-spline form
c(t)=n
i=0Ni,k(t)Pi. To obtain c(t)is actually to determine its knot vector and its control points. For knot vector, it is
constructed as
{1,,1

k
,tk,,tn,u,,u

k
}.(13)
We calculate uaccording to the chord length estimation; that is, u is determined by
u=1+QnR
mk+1
r=0c(tk+r)−c(tk+r1).(14)
Here the knots from tk1to tn+1is set as uniformly distributed from 1 to u.
For control points of c(t), the first three are determined by degrees of freedom and in G2continuity conditions,
refer to Equation (3). The last control point Pnis fixed as the target point. Therefore, we need to determine , and the
other control points P3,,Pn1. These variables can be solved by minimizing Equation (12). Initially, we set n=3since
a cubic B-spline requires at least four control points. We then iteratively increase the number of control points to ensure
that c(t)has minimal strain energy in global solution space. According to the variation principle, minimizing EG(c(t))
can be converted into following differential equations
EG(c(t)
 =0
EG(c(t))
 =0
EG(c(t))
Pj
=0
,(15)
where {Pj}(j=3, ,n1) are control points to be determined. 0is a zero vector with the same dimensions as the control
points. We first solve equations EG(c(t))∕Pj=0, which are equations with parameters and . Then the equations
are substituted into the other two equations EG(c(t))∕ =0andEG(c(t))∕ =0, which are solvable bivariate cubic
equations of and (see Appendix). The complete process is shown in Algorithm 1. In most cases, after three to four
optimization iterations, that is, the extension curve having three to four polynomial segments, the curve energy tends to
be stable.
LIU  . 7of14
Algorithm 1. Extension with one target
Require: a cubic B-spline curve c(t)and a target R;
Ensure: a resulting B-spline curve c(t);
1: initialization: n=3,EGmin =∞;
2: determine the expressions of P0,P1,P2about and according to Equation (3), Pnis R;
3: loop
4: determine the knot vector of c(t)according to Equation (13);
5: minimize Equation (15) for , , and expressions of P3,,Pn1;
6: substitute ,  into the expressions of P0,,Pn;
7: calculate energy EG of c(t)according to Equation (12);
8: if EGmin<EG then
9: construct c(
t)according to the obtained knot vector and control points;
10: EGmin =EG,n=n+1;
11: else
12: c(
t)is the resulting B-spline curve calculated in the last iteration;
13: break loop;
14: end if
15: end loop
5.3 Extension with multiple target points
Extending c(t)toagroupoftargetpoints{Ri}(i=1, ,s), c(t)needs to interpolate s+1 points, where the first one is the
endpoint of c(t); that is, R0=c(1). First, we calculate accumulated distance for every target point as follow
d0=0
di=di1+RiRi1,i=1,2,,s.(16)
Knot vector of c(t)is
{t0,,t0

k
,t1,,ts1,ts,,ts

k
},(17)
where
ti=1+di
mk+1
r=0c(tk+r)−c(tk+r1).(18)
From the knot vector, we need at least s+3 control points to construct c(t)as a cubic B-spline curve. These control points
are subject to the following conditions
c(t0)=c(1)
c(t0)=c(1)
c′′(t0)=2c′′ (1)+c′′(1)
c(ti)=Ri,i=1,2,,s.
We expand the left side of these equations into a linear combination of control points {Pi} and rearrange these equations
into the matrix form AX =b,whereX=P0P1……Pn1PnT,b=R0c(1)2c′′ (1)+c(1)
R1RsT. According to the local support property of B-spline basis functions, we can obtain the coefficient
matrix A.
8of14 LIU  .
A=
N0,k(t0)N1,k(t0)N2,k(t0)00000
a0b000 0000
a1b1c100000
0N1,k(t1)N2,k(t1)N3,k(t1)0000
⋮⋮⋮⋮ ⋮ ⋮
00000Nn2,k(ts)Nn1,k(ts)Nn,k(ts)
Here a0,b0can be obtained by solving a0P0+b0P1=c(t0).a1,b1,c1can be obtained by solving a1P0+b1P1+c1P2=
c′′(t0). For a clamped B-spline, N0,k(t0)=Nn,k(ts)=1andN1,k(t0)=N2,k(t0)=Nn2,k(ts)=Nn1,k(ts)=0. We can then
deduce rank(A)=rank(A,b)=s+3; that is, the solutions of the control points {Pi} exist and the expressions of {Pi}are
based on parameters and .Inthiscase,wesetn=s+3 initially. Then, iteratively increase the number of control points
as extending to one target. We separately discuss the situation when the number of control points of c(t)is equal to s+3
and greater than s+3. The complete process is shown in Algorithm 2.
Algorithm 2. Extension with multiple targets
Require: a cubic B-spline curve c(t)and a group of target points {Ri}(i=1,,s);
Ensure: a resulting B-spline curve c(t);
1: initialization: n=s+2,EGmin =∞;
2: loop
3: if n=s+2then
4: determine the knot vector of c(t)according to Equation (17);
5: solve expressions of P0,,Pnabout ,  according to Equation (19);
6: minimize Equation (15) for , ;
7: else
8: insert a knot into the knot vector of c(t);
9: solve expressions of P0,,Ps+2about ,  according to Equation (19);
10: minimize Equation (15) for , , and expressions of Ps+3,,Pn;
11: end if
12: substitute ,  into the expressions of P0,,Pn;
13: calculate energy EG of c(t)according to Equation (12);
14: if EGmin<EG then
15: construct c(
t)according to the obtained knot vector and control points;
16: EGmin =EG,n=n+1;
17: else
18: c(
t)is the resulting B-spline curve calculated in the last iteration;
19: break loop;
20: end if
21: end loop
5.3.1 n+1=s+3.
The nonhomogeneous linear equations have a unique solution; that is, P0,,Pnare uniquely expressed by and .We
solve and by minimizing EG(c(t)). The control points of c(t)then can be obtained.
5.3.2 n+1>s+3.
The nonhomogeneous linear equations have infinite solutions and Ps+3,,Pnare free variables. P0,,Ps+2are
uniquely expressed by and . Therefore, we solve , , Ps+3,,Pnby minimizing EG(c(t)). The number of knots is
increased by inserting a knot at the maximum interval in the knot vector, such as {t0,,tm,tm+tm+1
2,tm+1,,ts}.
LIU  . 9of14
6EXPERIMENTS AND ANALYSIS
This section presents experimental results. First, we compare the fairness of the extending curves that obtained by our
method and other methods.3,5 We then show some examples that apply our extension algorithm in sketching animation.
All experiments are performed on a personal computer with an Intel Core i7-4790 CPU @ 3.60GHz and 8 GB memory.
The extension results can be obtained at real-time speeds.
6.1 Extension results comparison
The strain energy and the winding number of the extending part are used as metrics to evaluate extending results. The
strain energy of the extending curve is the optimization object in our method, and we aim to obtain the resulting curve
having minimal strain energy. The winding number describes the angle change of the curve tangent vector when it moves
along the direction of the curve. If the curve is closed, the angle change of the tangent is an integer multiple of 2.
6.1.1 Comparing with minimal strain energy method
We compare our extension results with minimal strain energy method5in Figures 2 and 3. For extending to one target
point, this method uses a B
ezier curve as extending part and only provides one degree of freedom (Figure 2b). We
introduce more degrees of freedom to the extending curve by representing it as piecewise polynomials (Figure 2c,d). With
the increase of the degrees of freedom, the solution space of the problem is expanded, and the resulting curves we get
have better fairness from Table 1. For extending to multiple target points,5uses a locally optimal polynomial segment to
extend the given curve to every target point step by step (Figure 3b). In contrast, the resulting curves by our method are
globally optimal piecewise polynomials that based on the distribution of all target points(Figure 3c,d). Curve fairness has
improved significantly from Table 2.
(a) (b) (c) (d)
FIGURE 2 Results comparison with minimal strain energy method. (a) an input curve and a target point. (b) result by Reference
5(optimized ); (c) our result (optimized , ); (d) our result (optimized , , P3)
(a) (b) (c) (d)
FIGURE 3 Results comparison with minimal strain energy method. (a) an input curve and three target points; (b) result by Reference
5 (optimized ); (c) our result (optimized , ); (d) our result (optimized , , P5)
TABLE 1 Numerical comparison of Figure 2 Strain energy Winding number
Figure 2b 72.643 0.298
Figure 2c 48.732 0.254
Figure 2d 43.874 0.242
10 of 14 LIU  .
Strain energy Winding number
Figure 3b 4,408,820 0.664
Figure 3c 395,370 0.578
Figure 3d 395,182 0.576
TABLE 2 Numerical comparison of Figure 3
(a) input curves and tar
g
ets (b) results b
y
[3] (c) our results
FIGURE 4 Results comparison with unclamping method. (a) input curves and targets; (b) results by Reference 3; (c) our results
6.1.2 Comparing with unclamping method
We also compare our results with the unclamping method3for extension with multiple target points in Figure 4. This
method unclamps the given curve first. Then for every target point except the last one, they consider it as the last point
of an unclamped B-spline and use inverse de Boor recurrence to compute the last control point of the B-spline. In each
intermediate extension step, the method does not consider the distribution of the next target point. In some large torsion
cases of extending to multiple target points, the method yields the resulting curves having large bending amplitude. Our
method obtains the resulting curves based on the overall distribution of the target points, which avoids the problem to a
certain extent.
6.2 Application of extension in sketching
6.2.1 Extension in 2D sketching animation
During the process of 2D animation production, most work is spent on two tedious tasks: drawing and coloring of each
frame. To reduce the workload of animators and production costs, almost all existing computer-assisted systems for cel
animation production have in-between and auto-coloring functions. However, these functions often generate results that
the animators do not expect. One of the reasons is that these intermediate frames include some unexpected gaps, which
often appear in dense curves, intersections, and some sharp corners. We use our extension algorithm on these incomplete
drawings. Figure 5a includes four gaps and Figure 5b includes three gaps. Our algorithm has achieved acceptable results
on both parts with large curvatures(the ear of the man) and flat(the collar of the man and the belly of the dragon).
LIU  . 11 of 14
(a) gaps and extension results in the man drawing (b) gaps and extension results in the dragon drawing
FIGURE 5 Two-dimensional hand-drawn characters and their extension results. (a) Gaps and extension results in the man drawing;
(b) Gaps and extension results in the dragon drawing
FIGURE 6 A three-dimensional sketching toyhorse and its extension results from different perspectives
6.2.2 Extension in 3D sketching model
Recently, virtual reality systems support real-time capture and visualization of human 3D gestures enabling artists to
draw curves directly in 3D space. The artworks generated by this method also have flaws, such as the related curves
are not connected or the curves are incomplete in 3D space. We use our extension algorithm to fix these flaws of a 3D
toyhorse model.18 In the toyhorse model, there are six curves need to extended to their corresponding target points. One
is at the toyhorse’s tail, four are at the transition between the toyhorse’s neck and body, and the last one is at the tire. All
of the curves that need to be extended are represented in color and the target points as black dots. Golden curves are the
extension results as shown in Figure 6. The extension results show our algorithm is also applicable in 3D space.
12 of 14 LIU  .
7CONCLUSION
This paper presents a novel algorithm for extending B-spline curves. We expand the solution space of the extension
problem by representing the extending part as piecewise polynomial, i.e., a non-uniform B-spline. Compared to one poly-
nomial segment such as Bézier curves, piecewise polynomials introduce more degrees of freedom to the extending curve.
Besides, when extending to multiple target points, we use piecewise polynomial to directly give an extension result based
on all target points instead of extending the curve step by step. Determining the parametric expression of the resulting
curve is a functional optimization problem. We obtain an explicit solution of the problem by using the matrix repre-
sentation of B-splines. Detailed formula derivations are provided to show how we transform the function optimization
problem into a parameter-solving problem. Finally, from the experimental results, our method improves the fairness of
the resulting curve.
REFERENCES
1. Liu YJ, Qiu RQ. NURBS curve blending using extension. Zhejiang Univ Sci. 2009;10(4):570–576.
2. Chen XD, Ma WY. Geometric point interpolation method in r3 space with tangent directional constraint. CAD. 2012;44(12):1217–
1228.
3. Hu SM, Tai CL. An extension algorithm for B-splines by curve unclamping. CAD. 2002;34(5):415–419.
4. Lu Y, Shi KL. A B-spline curve extension algorithm. Sci Chin Inf Sci. 2016;59(3):032103–032112.
5. Mo GL, Zhao YN. A new extension algorithm for cubic B-splines based on minimal strain energy. Zhejiang Univ Sci. 2006;7(12):2043–
2049.
6. Zhou YF, Zhang CM. Extension of b-spline curves with g2 continuity. Proceedings of the International Symposium on Visual Computing.
New York, NY: Springer; 2008. p. 1096–1105.
7. Barsky BA, DeRose TD. Geometric continuity of parametric curves: constructions of geometrically continuous splines. CGA. 1990;10(1):
60–68.
8. Shetty S, White PR. Curvature-continuous extensions for rational b-spline curves and surfaces. CAD. 1991;23(7):484–491.
9. Tiller W. Knot-removal algorithms for NURBS curves and surfaces. CAD. 1992;24(8):445–453.
10. Chang GZ. Matrix formulations of bézier technique. CAD. 1982;14(6):345–350.
11. Cohen E, Riesenfeld RF. General matrix representations for bezier and b-spline curves. Comput Ind. 1982;3(1):9–15.
12. Grabowski H, Li X. Coefficient formula and matrix of nonuniform b-spline functions. CAD. 1992;24(12):637–642.
13. Qin KH. General matrix representations for b-splines. Vis Comput. 2000;16(3-4):177–186.
14. Liu LG, Wang GJ. Explicit matrix representation for NURBS curves and surfaces. CAGD. 2002;19(6):409–419.
15. L. Piegl and W. Tiller. The NURBS book. Berlin: Springer-Verlag; 1995.
16. Farin G. Fairing cubic b-spline curves. CAGD. 1987;4(1-2):91–103.
17. Wang XF, Cheng FH. Energy and B-spline interproximation. CAD. 1997;29(7):485–496.
18. Rosales E, Rodriguez J. Surfacebrush: From virtual reality drawings to manifold surfaces. TOG. 2019;38(4).96–111.
AUTHOR BIOGRAPHIES
Xinyue Liu She is currently pursuing the master’s degree with the Institute of Virtual Reality
and Visualization Technology, Beijing Normal University. His research interests include com-
puter graphics.
Xingce Wang Dr. Xing-ce Wang is a full professor in School of Artificial Intelligence, Beijing
Normal University, P. R. China. She is major in the 3D modeling and 3D visualization. Her current
research interests include computer graphic, medical imaging, artificial intelligence and Machine
learning.
LIU  . 13 of 14
Zhongke Wu Dr. Zhong-ke Wu is a Full Professor in School of Artificial Intelligence, Beijing
Normal University, P. R. China. Prior to joining in Beijing Normal University (BNU), he worked
in Nanyang Technological University (NTU), Singapore, Institute National de Recherche en
Informatique et en Automatique (INRIA) in France, Institute of High Performance Computing
(IHPC) and Institute of Software, Chinese Academy of Sciences in China from 1995 to 2006. Prof.
WU’s current research interests include computer graphics, animation virtual reality, geometric
modeling, volume graphics and medical imaging.
How to cite this article: Liu X, Wang X, Wu Z. Extending B-spline by piecewise polynomial. Comput Anim
Virtual Worlds. 2020;31:e1942. https://doi.org/10.1002/cav.1942
APPENDIX
We give an example to show how to solve Equation (15). In this example, the cubic B-spline c(t)has five control points,
and the formula of its strain energy is
EG(c(t)) =
4
i=3
3
a=0
a
b=0
ci
a,bPiaPib.
We minimize EG(c(t)) to solve ,  and P3. First, solving equation EG(c(t))∕P3=0,weget
c3
3,0P0+(c3
2,0+c4
3,1)P1+(c3
1,0+c4
2,1)P2
+2(c3
0,0+c4
1,1)P3+c4
1,0P4=0.
Therefore, P3can be represented by P0,P1,P2,P4. Remember that P0,P1,P2are determined by , according to
Equation (3), and the last control point P4is fixed as the target. That is, any control point Piof c(t)can be expressed as
Pi=2Ai+Bi+Ci+Di.(A1)
Now, we express Pias AiBiCiDi. For any two control points Piand Pj, their dot product for partial
derivative is
PiPj
 =4AiAj3+3(AiBj+AjBi)2
+2(AiDj+AjDi+BiBj)
+2(AiCj+AjCi)
+(BiCj+BjCi)+(BiDj+BjDi).
Therefore, EG(c(t))∕ =0isequivalentto
13+22+3+4 +5+6=0.(A2)
1,,
6can be determined, for example
1=
4
i=3
3
a=0
a
b=0
4ci
a,b(AiaAib).
14 of 14 LIU  .
Similarly, the form of EG(c(t))∕ =0 can be deduced
72+8+9+10 =0.(A3)
We obtain and by solving Equations (A2) and (A3). We then get all the control points according to Equation (A1).
ResearchGate has not been able to resolve any citations for this publication.
Preprint
Full-text available
Popular Virtual Reality (VR) tools allow users to draw varying-width, ribbon-like 3D brush strokes by moving a hand-held controller in 3D space. Artists frequently use dense collections of such strokes to draw virtual 3D shapes. We propose SurfaceBrush, a surfacing method that converts such VR drawings into user-intended manifold free-form 3D surfaces, providing a novel approach for modeling 3D shapes. The inputs to our method consist of dense collections of artist-drawn stroke ribbons described by the positions and normals of their central polylines, and ribbon widths. These inputs are highly distinct from those handled by existing surfacing frameworks and exhibit different sparsity and error patterns, necessitating a novel surfacing approach. We surface the input stroke drawings by identifying and leveraging local coherence between nearby artist strokes. In particular, we observe that strokes intended to be adjacent on the artist imagined surface often have similar tangent directions along their respective polylines. We leverage this local stroke direction consistency by casting the computation of the user-intended manifold surface as a constrained matching problem on stroke polyline vertices and edges. We first detect and smoothly connect adjacent similarly-directed sequences of stroke edges producing one or more manifold partial surfaces. We then complete the surfacing process by identifying and connecting adjacent similarly directed edges along the borders of these partial surfaces. We confirm the usability of the SurfaceBrush interface and the validity of our drawing analysis via an observational study. We validate our stroke surfacing algorithm by demonstrating an array of manifold surfaces computed by our framework starting from a range of inputs of varying complexity, and by comparing our outputs to reconstructions computed using alternative means.
Article
Until recently B-spline curves and surfaces (NURBS) were principally of interest to the computer aided design community, where they have become the standard for curve and surface description. Today we are seeing expanded use of NURBS in modeling objects for the visual arts, including the film and entertainment industries, art, and sculpture. NURBS are now also being used for modeling scenes for virtual reality applications. These applications are expected to increase. Consequently, it is quite appropriate for The.N'U'R-BS Book to be part of the Monographs in Visual Communication Series. B-spline curves and surfaces have been an enduring element throughout my pro­ fessional life. The first edition of Mathematical Elements for Computer Graphics, published in 1972, was the first computer aided design/interactive computer graph­ ics textbook to contain material on B-splines. That material was obtained through the good graces of Bill Gordon and Louie Knapp while they were at Syracuse University. A paper of mine, presented during the Summer of 1977 at a Society of Naval Architects and Marine Engineers meeting on computer aided ship surface design, was arguably the first to examine the use of B-spline curves for ship design. For many, B-splines, rational B-splines, and NURBS have been a bit mysterious.
Article
B-spline curve extension is an important operation in computer aided design systems. In this paper, we present a new extension algorithm for B-spline curves. The algorithm uses curve unclamping to generate a uniform B-spline curve segment from the original curve and gradually extends the segment to pass through every target point. Algorithms of uniform B-spline curves are used such that our algorithm has a low time cost and can easily handle arbitrary-order derivative constraints at the target points. Generalization for non-uniform rational B-spline curve extension is also discussed, and examples show the efficiency of our method. © 2015 Science China Press and Springer-Verlag Berlin Heidelberg
Article
The matrix representation for a Bezier curve or arbitrary degree is given as well as the analogous representation for the uniform B-spline of arbitrary degree. Special matrices for calculating the uniform open B-spline curve are derived. This form is convenient to implement in hardware or software, particularly if a matrix facility is present.
Article
At the start of this paper, a recurrence formula for calculating the Bézier functions of any order is proved. Based on this formula, the Bézier functions are written in matrix form which enables us to develop the Bézier technique in a concise way. There are some new identities of the Bézier functions which are potentially useful in CAGD. Surprisingly a matrix involving the Bézier functions has been shown to be a doubly-stochastic matrix and the convergence behaviour of its powers is determined. Based upon these facts, the Kelisky — Rivlin theorem for the Bernstein polynomials has been extended to the Bézier curves.
Article
In this paper, the concept of basis matrix of B-splines is presented. A general matrix representation, which results in an explicitly recursive matrix formula, for nonuniform B-spline curves of an arbitrary degree is also presented by means of Toeplitz matrix. New recursive matrix representations for uniform B-spline curves and Bezier ones of an arbitrary degree are obtained as special cases of that for nonuniform B-spline curves. The recursive formula for basis matrix can be substituted for de Boor-Cox's one for B-splines, and it has better time complexity than de Boor-Cox's formula when used for conversion and computation of B-spline curves and surfaces between different CAD systems. Finally, some applications of the matrix representations are given in the paper.
Article
In this paper, we study B-spline curve interproximation with different energy forms and parametrization techniques, and present an interproximation scheme for B-spline surfaces. It shows that the energy form has a much bigger impact on the generated curve than the parametrization technique. With the same energy form, different parametrization techniques generate relatively small difference on the corresponding curves. With the same parametrization technique, however, different energy forms make significant difference on the shape and smoothness of the resulting curves. Furthermore, interproximating B-spline curves generated by minimizing approximated energy forms are far from being good approximations to the optimal curves. They tend to generate flatter regions and sharper turns than curves generated by minimizing the exact energy form. The interproximation scheme for surfaces is aimed at generating a smooth surface to interpolate a grid of data which could either be a point or a region. This is achieved by minimizing a strain energy based on squared principal curvatures for bicubic B-spline surfaces. The surface interproximation process is also studied with different energy forms and parametrization techniques. The test results of the surface interproximation process also show the same conclusion as the curve interproximation process.
Article
Curve and surface blending is an important operation in CAD systems, in which a non-uniform rational B-spline (NURBS) has been used as the de facto standard. In local corner blending, two curves intersecting at that corner are first made disjoint, and then the third blending curve is added-in to smoothly join the two curves with G 1 -or G 2 -continuity. In this paper we present a study to solve the joint problem based on curve extension. The following nice properties of this extension algorithm are exploited in depth: (1) The parameterization of the original shapes does not change; (2) No additional fragments are created. Various examples are presented to demonstrate that our solution is simple and efficient.
Article
Extension of a B-spline curve or surface is a useful function in a CAD system. This paper presents an algorithm for extending cubic B-spline curves or surfaces to one or more target points. To keep the extension curve segment GC 2-continuous with the original one, a family of cubic polynomial interpolation curves can be constructed. One curve is chosen as the solution from a sub-class of such a family by setting one GC 2 parameter to be zero and determining the second GC 2 parameter by minimizing the strain energy. To simplify the final curve representation, the extension segment is reparameterized to achieve C 2-continuity with the given B-spline curve, and then knot removal from the curve is done. As a result, a sub-optimized solution subject to the given constraints and criteria is obtained. Additionally, new control points of the extension B-spline segment can be determined by solving lower triangular linear equations. Some computing examples for comparing our method and other methods are given.