0
|
5736 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# How to make a Bezier curve of higher order?

Posted 10 years ago
 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.
4 Replies
Sort By:
Posted 10 years ago
 It sure does! That is exactly the change I was looking for.Thank you, Bill!
Posted 10 years ago
 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?
Posted 10 years ago
 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.)
Posted 10 years ago
 Look at the documentation page BezierCurve and click on Details and Options and read that carefully.