Module

for

The Bézier Curve

   

Background.

 

    The Bézier Curve is the original computer generated "French Curve" and it's discovery is attributed to the French engineer, Pierre Bézier.  Let us first review ideas concerning the cubic polynomial of degree 3 passes through the 4  points [Graphics:Images/BezierCurveMod_gr_1.gif] for  [Graphics:Images/BezierCurveMod_gr_2.gif]  and is shown in Figure 1.  

[Graphics:Images/BezierCurveMod_gr_3.gif]

             Figure 1.

 

Example 1.  Find the cubic polynomial or that passes through the four points
[Graphics:Images/BezierCurveMod_gr_4.gif]  and satisfies
        [Graphics:Images/BezierCurveMod_gr_5.gif]  
Solution 1.

 

Background for Hermite Interpolating Polynomial.

    The cubic Hermite polynomial  p(x)  has the interpolative properties  [Graphics:Images/BezierCurveMod_gr_29.gif]   [Graphics:Images/BezierCurveMod_gr_30.gif]   [Graphics:Images/BezierCurveMod_gr_31.gif]  and  [Graphics:Images/BezierCurveMod_gr_32.gif]  both the function values and their derivatives are known at the endpoints of the interval  [Graphics:Images/BezierCurveMod_gr_33.gif].  The Hermite polynomial is referred to as a "clamped cubic," where "clamped" refers to the slope at the endpoints being fixed.  This situation is illustrated in Figure 2.  
    

[Graphics:Images/BezierCurveMod_gr_34.gif]

             Figure 2.

 

Example 2.  Find the cubic Hermite polynomial or "clamped cubic" that satisfies  
        [Graphics:Images/BezierCurveMod_gr_35.gif]  
Solution 2.

 

The Bézier Curve

    The Bézier curve was originally used by  Pierre Bézier  for CAD/CAM operations at Renault motor car company.  Bézier curves are the basis of the entire Adobe PostScript drawing model which is used in the software products: Adobe Illustrator, Macromedia Freehand and Fontographer.  

 

Construction of the Bézier Curve

    A cubic Bézier curve is defined by four points. Two of the points are endpoints to the curve, [Graphics:Images/BezierCurveMod_gr_70.gif] is the starting point and  [Graphics:Images/BezierCurveMod_gr_71.gif]is the destination point. The points [Graphics:Images/BezierCurveMod_gr_72.gif] are control points or "handles."  A parametric formula for the curve is  
    
    [Graphics:Images/BezierCurveMod_gr_73.gif] where [Graphics:Images/BezierCurveMod_gr_74.gif] are cubic equations defined in the interval [Graphics:Images/BezierCurveMod_gr_75.gif]  as shown in Figure 3.

 

[Graphics:Images/BezierCurveMod_gr_76.gif]

             Figure 3.

 

Theorem (Bézier Curve).  The parametric equations for  [Graphics:Images/BezierCurveMod_gr_77.gif] for the Bézier curve  [Graphics:Images/BezierCurveMod_gr_78.gif] are given by   

    [Graphics:Images/BezierCurveMod_gr_79.gif],  
and
    [Graphics:Images/BezierCurveMod_gr_80.gif]    for  [Graphics:Images/BezierCurveMod_gr_81.gif].  

 

Proof  The Bézier Curve  The Bézier Curve  

 

Example 3.  Find the Bézier curve which has the starting at the point [Graphics:Images/BezierCurveMod_gr_82.gif] and destination point [Graphics:Images/BezierCurveMod_gr_83.gif] which has the control points [Graphics:Images/BezierCurveMod_gr_84.gif] and [Graphics:Images/BezierCurveMod_gr_85.gif], respectively.  Use the parametric equations to form the  Bézier curve.
Solution 3.

 

 

More background

    If a control point is chosen farther away from a endpoint, (but in the same direction), then the Bézier curve will more closely approximate the tangent line near that endpoint.  

 

Example 4.  Find the Bézier curve which starts at [Graphics:Images/BezierCurveMod_gr_97.gif] and ends at [Graphics:Images/BezierCurveMod_gr_98.gif] which has the control points [Graphics:Images/BezierCurveMod_gr_99.gif] and [Graphics:Images/BezierCurveMod_gr_100.gif], respectively.  
Solution 4.

 

Example 5.  Compare the Bézier curve which starts at [Graphics:Images/BezierCurveMod_gr_110.gif] and ends at [Graphics:Images/BezierCurveMod_gr_111.gif] given in examples 3 and 4.  
Solution 5.

 

 

Bernstein polynomials.

Definition (Bernstein Polynomials).  The Bernstein polynomials of degree [Graphics:Images/BezierCurveMod_gr_116.gif] are  
    
    [Graphics:Images/BezierCurveMod_gr_117.gif], for [Graphics:Images/BezierCurveMod_gr_118.gif],  where [Graphics:Images/BezierCurveMod_gr_119.gif].  
Exploration.

 

Construction of the Bézier Curve using Bernstein polynomials.

    The coordinate functions  [Graphics:Images/BezierCurveMod_gr_164.gif] and  [Graphics:Images/BezierCurveMod_gr_165.gif] for the  Bézier curve we are using can written as a linear combinations of the Bernstein polynomials
[Graphics:Images/BezierCurveMod_gr_166.gif]:     

        [Graphics:Images/BezierCurveMod_gr_167.gif],  
    and
        [Graphics:Images/BezierCurveMod_gr_168.gif].  

Verify that the two functions  [Graphics:Images/BezierCurveMod_gr_169.gif]  and [Graphics:Images/BezierCurveMod_gr_170.gif] are the same.  

[Graphics:Images/BezierCurveMod_gr_171.gif]

[Graphics:Images/BezierCurveMod_gr_172.gif]
[Graphics:Images/BezierCurveMod_gr_173.gif]

[Graphics:Images/BezierCurveMod_gr_174.gif]

[Graphics:Images/BezierCurveMod_gr_175.gif]
[Graphics:Images/BezierCurveMod_gr_176.gif]
[Graphics:Images/BezierCurveMod_gr_177.gif]

Similarly, the two functions  [Graphics:Images/BezierCurveMod_gr_178.gif]  and  [Graphics:Images/BezierCurveMod_gr_179.gif] are the same.  
To verify we have the correct end conditions, we can evaluate  [Graphics:Images/BezierCurveMod_gr_180.gif]  and its derivative at [Graphics:Images/BezierCurveMod_gr_181.gif] and [Graphics:Images/BezierCurveMod_gr_182.gif],  and see if it has the required properties.  

[Graphics:Images/BezierCurveMod_gr_183.gif]

[Graphics:Images/BezierCurveMod_gr_184.gif]
[Graphics:Images/BezierCurveMod_gr_185.gif]
[Graphics:Images/BezierCurveMod_gr_186.gif]
[Graphics:Images/BezierCurveMod_gr_187.gif]
[Graphics:Images/BezierCurveMod_gr_188.gif]
[Graphics:Images/BezierCurveMod_gr_189.gif]
[Graphics:Images/BezierCurveMod_gr_190.gif]

Recall that this is what we wanted in the first construction.  

    [Graphics:Images/BezierCurveMod_gr_191.gif]   
    [Graphics:Images/BezierCurveMod_gr_192.gif]   

 

 

Justification for the factor 3.

    Since we want the two constructions of the Bézier curve to be the same, it is common practice to use the term [Graphics:Images/BezierCurveMod_gr_193.gif] in the development of the parametric equations.  Similarly the term  [Graphics:Images/BezierCurveMod_gr_194.gif] is justified.  

    The construction of a Bézier curve using Bernstein polynomials is more appealing mathematically because the coefficients in the linear combination are just the coordinates of the given four points.  

 

Example 6.  Find the Bézier curve which starts at [Graphics:Images/BezierCurveMod_gr_195.gif] and ends at [Graphics:Images/BezierCurveMod_gr_196.gif] which has the control points [Graphics:Images/BezierCurveMod_gr_197.gif] and [Graphics:Images/BezierCurveMod_gr_198.gif], respectively.
Use Bernstein polynomials.  
Solution 6.

 

Computer Programs  The Bézier Curve  The Bézier Curve  

 

Mathematica Subroutine (Bézier Curve).  Construct the Bézier given endpoints [Graphics:Images/BezierCurveMod_gr_211.gif] and  [Graphics:Images/BezierCurveMod_gr_212.gif]and control points [Graphics:Images/BezierCurveMod_gr_213.gif].  
For illustration purposes the variables pts, ctr and lin are used to help form dots and control lines for the graph we will draw.    
This is for pedagogical purposes, and usually they would not be necessary.  

[Graphics:Images/BezierCurveMod_gr_214.gif]

Example 7.  Find composite Bézier curve for the data given below.

[Graphics:Images/BezierCurveMod_gr_215.gif]

Solution 7.

 

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.

 

Example 9.  What is the nature of the  "spline fit"  constructed by Mathematica ?

Solution 9.

 

Research Experience for Undergraduates

The Bézier Curve  The Bézier Curve  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook The Bézier Curve

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004