10176

# Knot Vector Generation for B-Spline Interpolation

This Demonstration is concerned with the problem of interpolating a given point set by a B-spline curve. We illustrate the influence of different choices for the curve's knot vector and parameter vector. The quality of the interpolation varies dramatically depending on these choices, and certain combinations lead to highly oscillating interpolants. A uniform knot vector combined with a chordal parameter vector often yields oscillations or erratic behavior (red curve). Combining a uniform knot vector with a centripetal parameter vector improves the result a bit (blue curve), but the best result is obtained for an average knot vector combined with a chordal (or centripetal) parameter vector (green curve).

### DETAILS

One of the basic tasks in reverse engineering is curve reconstruction from a set of measured points. A frequently used tool for this purpose is B-spline interpolation.
A degree B-spline curve defined by its control polygon reads
,
where , are the B-spline basis functions (see B-Spline). They depend on the knot vector
, where and .
Given a point set , , …, and an associated parameter vector , where , the interpolation problem thus consists of determining the control polygon as the solution of the following system of linear equations,
, for .
This polygon and thus the curve depend on the knot and parameter vectors. Well-known choices for the parameter vector are:
• the chordal distribution:
where .
• the centripetal distribution:
where and is often chosen equal to .
A common choice for the knot vector is obtained by uniformly spacing the internal knots, for example on the interval :
(The knot vector generated by the Mathematica option SplineKnotsAutomatic is uniformly spaced.)
But for numerical reasons, it is not recommended to combine a uniform knot vector with a chordal parameter vector because that could generate an unstable or singular system of linear equations (see "Knot Vector Generation" in [1]). To avoid this problem, it is better to adapt the knot vector to the parameter vector, for example by using the average method:
Reference
[1] C.-K. Shene, Introduction to Computing with Geometry Notes. (Aug 22, 2011) http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/notes.html.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.