7 Splines

 

This chapter covers

  • Making interpolating functions from points and from differential and integral conditions
  • Understanding and composing Bézier splines
  • Understanding and composing NURBS

In mathematics, a spline is a compound function, often continuous and smooth, made out of other simpler functions. You can stick two parabolas together and make yourself a quadratic polynomial spline. It’s as simple as that (figure 7.1).

Figure 7.1 For x < 0, y = - 0.2x2 + 2; for x 0, y = 0.3x2 + 2. This is already a spline function.
07-01

In the real world, you can see splines everywhere—not only in graphic design tools, virtual reality, computer games, geoinformation systems, and other software, but, interestingly, in almost every physical piece ever produced. Because before the software was even invented, engineers used metal splines to make smooth lines on technical drawings. Almost every human-made smooth surface you see around you first appeared as a spline.

What we call a Bézier curve is a mathematical model of a metal spline. But splines are much more than that. NURBS is an acronym that stands for “nonuniform rational basis spline,” and this kind of spline generalizes Bézier curves, giving us many more options to control the properties and shape of the modeled curve.

7.1 Going beyond the interpolation

7.1.1 Making polynomial graphs with tangent constraints

7.1.2 Practical example: Approximating the sine function for a space simulator game

7.1.3 Unexpected fact: Explicit polynomial modeling generalizes power series

7.1.4 Section 7.1 summary

7.2 Understanding polynomial splines and Bézier curves

7.2.1 Explicit polynomial parametric curves

7.2.2 Practical example: Crafting a spline for points that aren’t there yet

7.2.3 Bézier curves

7.2.4 Section 7.2 summary

7.3 Understanding NURBS

7.3.1 BS stands for “basis spline”