Hi there,
BezierCurve by default represents a cubic Bezier curve. How would I make it third or maybe even forth order in Mathematica?
Thank you for your help.
Hi there,
BezierCurve by default represents a cubic Bezier curve. How would I make it third or maybe even forth order in Mathematica?
Thank you for your help.
Look at the documentation page BezierCurve and click on Details and Options and read that carefully.
So this does the job?:
Graphics[{BezierCurve[points], SplineDegree → 6, Red, Point[points]},Axes → True]
Because, I would expect for my curve to change (with comparisson with cubic) at least so much that I could notice that with my eyes, and it does not. (It is my first time using higher degree Bezier curves.)
Compare this
points = {{0, -0.5472612856615164`}, {1, -2.5034530266845003`}, {2, -1.8872659003939827`},
{3, -1.1793732412661466`}, {4, -3.068235490752336`}, {5, 3.4990177037576604`},
{6, -1.7312121463142187`}, {7, -1.6648538152327106`}, {8, -2.373301294370746`},
{9, 3.900761915519949`}, {10, -2.134289137239122`}};
Graphics[{BezierCurve[points, SplineDegree -> 6], Red, Point[points]}, Axes -> True]
with this
Graphics[{BezierCurve[points], SplineDegree -> 6, Red, Point[points]}, Axes -> True]
with this
Graphics[{BezierCurve[points], Red, Point[points]}, Axes -> True]
Those points were nothing special, I just made them up with RandomReal[{-4,4}], but included them here so that we would have a very concrete specific example to look at.
From that it appears thatif Graphics is given the SplineDegree option it silently ignores it, while if BezierCurve is given that option it does result in a different curve.
Does this solve your problem?
It sure does! That is exactly the change I was looking for.
Thank you, Bill!