Example 8.  Let use Mathematica's Bézier curve fit procedure.
The following example is found in the  "Help"  menu under  Add-ons;  Standard Packages;  NumericalMath;  SplineFit.  
Find the "spline fit" through  (0,0), (1,2), (-1,3), (0,1), (3,0).  

Solution 8.

This command loads the package.  

[Graphics:../Images/BezierCurveMod_gr_282.gif]

This generates a cubic spline from pts.  

[Graphics:../Images/BezierCurveMod_gr_283.gif]

[Graphics:../Images/BezierCurveMod_gr_284.gif]

Note.  Four splines are required, so the parameterization is chosen to be the interval [0,4].

Here is a graph of the curve.

[Graphics:../Images/BezierCurveMod_gr_285.gif]

[Graphics:../Images/BezierCurveMod_gr_286.gif]

 

 

 

Here is the internal form of the cubic spline function generated from pts.  

[Graphics:../Images/BezierCurveMod_gr_287.gif]
SplineFunction[Cubic, {0., 4.}, {{0, 0}, {1, 2}, {-1, 3}, {0, 1}, {3, 0}},
{{{0, 111/56, 0, -55/56}, {0, 57/28, 0, -1/28}}, {{1, -27/28, -165/56, 107/56},
   {2, 27/14, -3/28, -23/28}}, {{-1, -9/8, 39/14, -37/56}, {3, -3/4, -18/7, 37/28}},
  {{0, 69/28, 45/56, -15/56}, {1, -27/14, 39/28, -13/28}}}]

 

 

Observe, that Mathematica returns a list of four vectors, each of which contains two four element list, just right number of coefficients for forming eight cubic equations.

[Graphics:../Images/BezierCurveMod_gr_288.gif]
[Graphics:../Images/BezierCurveMod_gr_289.gif]

By luck, they are in "standard form" and we can use the coefficient vectors;  change some commas to  +  signs;  fill in the powers of  t  necessary to form the cubics.

[Graphics:../Images/BezierCurveMod_gr_290.gif]
[Graphics:../Images/BezierCurveMod_gr_291.gif] [Graphics:../Images/BezierCurveMod_gr_292.gif]

[Graphics:../Images/BezierCurveMod_gr_293.gif]

 

Are the two constructions the same ?

[Graphics:../Images/BezierCurveMod_gr_294.gif]

[Graphics:../Images/BezierCurveMod_gr_295.gif]

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2003