The shape of the Rational Basis Functions and the Basis Functions for generating NURBS

82 Views Asked by At

Here is the definition of the basis functions:

\begin{align} N_{i,0}(u) = & \begin{cases} 1 & \text{se } u_i \leq u < u_{i+1} \\ 0 & \text{caso contrário} \end{cases}\label{eq:b-spline-inicial}\\ %\notag\\ N_{i,k}(u) = & \, \frac{u - u_i}{u_{i+k} - u_i}N_{i,k-1}(u) + \frac{u_{i + k + 1} - u}{u_{i + k + 1} - u_{i + 1}}N_{i+1, k-1}(u) \label{eq:b-spline-recursiva} \end{align}

wich generates the following Basis functions of degree $2$ for the Knot Vector $U = \{0, 1, 2, 3, 4, 5, 6, 7 \}$:

Polinomial basis functions

And here is the definition of the rational basis functions:

$$ R_{i,k}(u) = \frac{N_{i,k}(u)w_i}{\sum\limits_{j=0}^n N_{j,k}(u)w_j} $$

wich generates the following Rational Basis functions of degree $2$ for the same Knot Vector $U = \{0, 1, 2, 3, 4, 5, 6, 7 \}$ and weigth vector $W = \{1, 1, 1, 1, 1\}$:

enter image description here

Now my question:

The "NURBS Book" and "An introduction to NURBS" say that NURBS curves (rational) are a generalization of the B-Spline curves (polynomial)... but for periodic knot vectors the basis functions aren't the same... they are the same only for open knot vectors. My question is: have I implemented something wrong?

1

There are 1 best solutions below

0
On

Yes, you have implemented something wrong.

Since your weights are all equal to $1$, the rational basis functions will be the same as the polynomial ones (just set all $w_i=1$ in your second formula).