This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

SplineFit

As of Version 7.0, some of the functionality of the Splines Package is now built into the Mathematica kernel.

generates a SplineFunction object of the specified type from the points .
  • A SplineFunction object is a function that parametrizes a curve specified by the points , such that an argument of 0 corresponds to , 1 corresponds to , etc.
  • A cubic spline is made of piecewise third-order polynomials, with continuity, and interpolates each of the points it is created from. The second derivative of the spline at the endpoints is set to 0.
  • A Bézier spline interpolates only the endpoints. The other points control the spline, forming a convex hull. Given n points, a spline of degree is created.
  • A composite Bézier spline is made up of a series of third-order Bézier curves with continuity. It alternates interpolating points and control points.
  • In a composite Bézier spline generated from an even number of points the last two points are reversed so that the final point is interpolated and the next to last is a control point for the final segment; if the spline is generated from an odd number of points, then the final vertex is doubled.
  • The points are not restricted to two dimensions.
returns a SplineFunction of the appropriate type:
Fit three types of splines to a random set of five points:
Plot the resulting splines:
works in arbitrary dimensions:
Needs["Splines`"]
returns a SplineFunction of the appropriate type:
In[2]:=
Click for copyable input
Out[2]=
Fit three types of splines to a random set of five points:
In[3]:=
Click for copyable input
Out[3]=
Plot the resulting splines:
In[4]:=
Click for copyable input
Out[4]=
works in arbitrary dimensions:
In[5]:=
Click for copyable input
Out[5]=