How to draw a spline curve?

127 Views Asked by At

Well, I know this definition of a spline curve :

$\forall t \in [0 ; 1], C(t) = \sum\limits_{i=1}^{k}F_i(t)P_i$

With :

  1. $t$ the abscissa of the spline curve's point we want to draw

  2. $C$ the function that sets the current spline curve's point's abscissa or ordinate

  3. $k$ the number of control points

  4. $F_i$ a transformation function

  5. $P_i$ the coordinate (abscissa or ordinate) of the current control point

However, I have questions about $t$ and $F_i$ :

  1. Can $t$ be in this range ? $[0 ; 500]$ if we want to draw a spline curve containing 500 points (one per abscissa)

  2. Are $F_i$ polynomials ?

1

There are 1 best solutions below

0
On BEST ANSWER

Can $t$ be in the range $[0,500]$.

Yes. You just do a change of variable, $t = u/500$. With this definition, $u \in [0,500]$ if and only if $t \in [0,1]$

Are $F_i$ polynomials ?

They can be. But if you have 500 points, you'd need a polynomial of degree 499, which is often not a good choice. Another possibility for the $F_i$ is to use spline functions (piecewise polynomials), like b-spline basis functions. That way, you can interpolate 500 points with a curve of low degree. Degree 3 is the most common choice.