Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

BezierCurve vs. BezierFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106756] BezierCurve vs. BezierFunction
  • From: Gianluca Gorni <gianluca.gorni at dimi.uniud.it>
  • Date: Fri, 22 Jan 2010 05:42:21 -0500 (EST)

I am a total beginner with splines. Playing around BSplines and Bezier curves,
I noticed that while BSplineCurve and BSplineFunction seemed
to agree in all the examples I tried, there are differences between the
output of BezierCurve and BezierFunction. For example, the next two
graphs are different:

pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {5, 2}, {6, -1}, {7, 3}};
Graphics[{BezierCurve[pts]}, Axes -> True]
f = BezierFunction[pts];
ParametricPlot[f[t], {t, 0, 1}]

Does anybody know of some option settings that make BezierFunction give the
same curve as BezierCurve?

Moreover, it is nice that BSplineBasis can be expanded out with PiecewiseExpand.
But then, why don't BezierFunction and BSplineFunction expand out with either
PiecewiseExpand or FunctionExpand?

pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {4, -2}, {5, 1}};
f = BezierFunction[pts];
PiecewiseExpand[f[t]]
FunctionExpand[f[t]]

Best regards,
Gianluca Gorni



  • Prev by Date: Re: How To invert ColorFunction
  • Next by Date: Re: How To invert ColorFunction
  • Previous by thread: Financial Planning Notebook
  • Next by thread: Re: Replace list element based on a condition how to