Exercise 5.5 Solutions

6.

Done in Class

7.

Done in Class

8.

(a)

pts = {1, 3, 3, -1, 2, 4, 3, 0}

pnts = Partition[pts, 2]

BezierCurve3[pts]

Expand[%]

gr2 = 
        ParametricPlot[ Evaluate[BezierCurve3[pts]], {t, 0, 1}, 
          PlotStyle -> Magenta, 
          DisplayFunction -> Identity];

dots  =  
        ListPlot[pnts, PlotStyle -> {Red, PointSize[0.02]}, 
          DisplayFunction -> Identity];

Show[dots, gr2, PlotRange -> All,  
        DisplayFunction -> $DisplayFunction];

(b)

pts = {-2, 3, -1, 3, 3, 5, 3, 4, 2, 3}

pnts = Partition[pts, 2]

BezierCurve4[pts]

Expand[%]

gr2 = 
        ParametricPlot[ Evaluate[BezierCurve4[pts]], {t, 0, 1}, 
          PlotStyle -> Magenta, 
          DisplayFunction -> Identity];

dots  =  
        ListPlot[pnts, PlotStyle -> {Red, PointSize[0.02]}, 
          DisplayFunction -> Identity];

Show[dots, gr2, PlotRange -> All,  
        DisplayFunction -> $DisplayFunction];

(c)

pts = {1, 1, 2, 2, 3, 4, 4, 4, 5, 2, 6, 1}

pnts = Partition[pts, 2]

BezierCurve5[pts]

Expand[%]

gr2 = 
        ParametricPlot[ Evaluate[BezierCurve5[pts]], {t, 0, 1}, 
          PlotStyle -> Magenta, 
          DisplayFunction -> Identity];

dots  =  
        ListPlot[pnts, PlotStyle -> {Red, PointSize[0.02]}, 
          DisplayFunction -> Identity];

Show[dots, gr2, PlotRange -> All,  
        DisplayFunction -> $DisplayFunction];

9.

pts = {1, 1, 2, 3, 3, 5, 4, 7}

pnts = Partition[pts, 2]

BezierCurve3[pts]

Expand[%]

gr2 = 
        ParametricPlot[ Evaluate[BezierCurve3[pts]], {t, 0, 1}, 
          PlotStyle -> Magenta, 
          DisplayFunction -> Identity];

dots  =  
        ListPlot[pnts, PlotStyle -> {Red, PointSize[0.02]}, 
          DisplayFunction -> Identity];

Show[dots, gr2, PlotRange -> All,  
        DisplayFunction -> $DisplayFunction];

Functions Used in this notebook