3
$\begingroup$

I would like to ask about uniform (periodic) cubic B-splines (approximation, no interpolation).

$$B=1/6\begin{bmatrix}-1&3&-3&1\\3&-6&3&0\\-3&0&3&0\\1&4&1&0\end{bmatrix}$$

$B$ is the matrix of coefficients that allows calculating a single curve segment with the formula:

$$ Q_i(u)=[u^3 u^2 u^1 1]B \begin{bmatrix}P_{i-3}\\P_{i-2}\\P_{i-1}\\P_{i}\end{bmatrix} $$

When $i=3$ I calculate the first segment of the curve. My question is when $i=4$ and I want to calculate the second segment of the curve I must change the $4$ control points but does $B$ change or not?

$\endgroup$
2
$\begingroup$

No, the $B$ matrix (basis coefficient matrix) does not change from one segment to the next. It is a property of the type of spline you're using, in this case cubic B-splines. If you used Bézier splines or Hermite splines instead, you'd have a different $B$ matrix.

| improve this answer | |
$\endgroup$
2
$\begingroup$

No, $B$ is constant for given type of cubic spline, e.g. B-spline, Bezier, Hermite or Catmull-Rom cubic splines have different $B$ matrix. To make B-spline continuous, you need to copy 3 control points from the previous spline segment $a$ to the control points of spline segment $b$ and add a new point as the last control point of $b$ such that:

$Pb_{i-3}=Pa_{i-2}$, $Pb_{i-2}=Pa_{i-1}$, $Pb_{i-1}=Pa_i$ and $Pb_i$=new control point.

| improve this answer | |
$\endgroup$
0
$\begingroup$

If you use the same $\mathbf{B}$ matrix on each segment, then you are constructing a so-called "uniform" b-spline. This means that the parameter increment over each segment is a constant (typically $=1$). Uniform b-splines often have undesirable shapes if the control points are unevenly distributed. But, if the distances between control points don't vary too wildly, then you can use uniform b-splines and get some nice computational simplifications.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.