10
$\begingroup$

This example:

pts = {{0, 0}, {1, 1}, {2, 0}, {3, 2}}; f = BezierFunction[pts] Show[Graphics[{Red, Point[pts], Green, Line[pts]}, Axes -> True], ParametricPlot[f[t], {t, 0, 1}],Graphics[{Blue, Dashed, BezierCurve[pts]}]] 

perfectly works producing

curves coincide

However with

pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {5, 2}, {6, -1}, {7, 3}}; 

it produces

curves do not coincide

Why do the curves not coincide and how to access BezierFunction for BezierCurve with npts>4?

$\endgroup$

1 Answer 1

11
$\begingroup$

BezierCurve normally gives a composition of local 4point-Bezierfunctions.

You get equal curves by setting SplineDegree->1+Length[pts]

 Show[Graphics[{Red, Point[pts], Green, Line[pts]}, Axes -> True], ParametricPlot[f[t], {t, 0, 1}], Graphics[{Blue, Dashed,BezierCurve[pts, SplineDegree -> 1 + Length[pts]]}]] 

enter image description here

$\endgroup$
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.