# BezierCurve is different from BezierFunction

Clash Royale CLAN TAG#URR8PPP

I am constructing Naca type profiles with Bezier curves.

controlPoints={{1, 0.}, {0.863924,0.00448168}, {0.78316,-0.019}, {0.444, -0.019},
{0.269064,-0.019}, {0,-0.014478}, {0, 0}, {0, 0.017794}, {0.236028, 0.041},
{0.442,0.041}, {0.616096,0.041}, {0.70006,0.0378152}, {1,0.}};

bezProfile = BezierFunction[controlPoints];

Show[Graphics[{Orange, BezierCurve[controlPoints], Red,
Point[controlPoints], Green, Line[controlPoints]},
Axes -> True], ParametricPlot[bezProfile[t], {t, 0, 1}]]


The BezierFunction gives a very different results over the BezierCurve which is wrong !!

Any explanation ??

• Please do not use the bugs tag when posting questions. See the tag description. If you do suspect a bug, always mention your Mathematica version.
– Szabolcs
Nov 29 at 8:40

• use BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)]?
– kglr
Nov 29 at 8:42

I am constructing Naca type profiles with Bezier curves.

controlPoints={{1, 0.}, {0.863924,0.00448168}, {0.78316,-0.019}, {0.444, -0.019},
{0.269064,-0.019}, {0,-0.014478}, {0, 0}, {0, 0.017794}, {0.236028, 0.041},
{0.442,0.041}, {0.616096,0.041}, {0.70006,0.0378152}, {1,0.}};

bezProfile = BezierFunction[controlPoints];

Show[Graphics[{Orange, BezierCurve[controlPoints], Red,
Point[controlPoints], Green, Line[controlPoints]},
Axes -> True], ParametricPlot[bezProfile[t], {t, 0, 1}]]


The BezierFunction gives a very different results over the BezierCurve which is wrong !!

Any explanation ??

• Please do not use the bugs tag when posting questions. See the tag description. If you do suspect a bug, always mention your Mathematica version.
– Szabolcs
Nov 29 at 8:40

• use BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)]?
– kglr
Nov 29 at 8:42

1

I am constructing Naca type profiles with Bezier curves.

controlPoints={{1, 0.}, {0.863924,0.00448168}, {0.78316,-0.019}, {0.444, -0.019},
{0.269064,-0.019}, {0,-0.014478}, {0, 0}, {0, 0.017794}, {0.236028, 0.041},
{0.442,0.041}, {0.616096,0.041}, {0.70006,0.0378152}, {1,0.}};

bezProfile = BezierFunction[controlPoints];

Show[Graphics[{Orange, BezierCurve[controlPoints], Red,
Point[controlPoints], Green, Line[controlPoints]},
Axes -> True], ParametricPlot[bezProfile[t], {t, 0, 1}]]


The BezierFunction gives a very different results over the BezierCurve which is wrong !!

Any explanation ??

I am constructing Naca type profiles with Bezier curves.

controlPoints={{1, 0.}, {0.863924,0.00448168}, {0.78316,-0.019}, {0.444, -0.019},
{0.269064,-0.019}, {0,-0.014478}, {0, 0}, {0, 0.017794}, {0.236028, 0.041},
{0.442,0.041}, {0.616096,0.041}, {0.70006,0.0378152}, {1,0.}};

bezProfile = BezierFunction[controlPoints];

Show[Graphics[{Orange, BezierCurve[controlPoints], Red,
Point[controlPoints], Green, Line[controlPoints]},
Axes -> True], ParametricPlot[bezProfile[t], {t, 0, 1}]]


The BezierFunction gives a very different results over the BezierCurve which is wrong !!

Any explanation ??

splines

edited Nov 29 at 8:55

kglr

175k9197402

175k9197402

Maarten Mostert

362

362

• Please do not use the bugs tag when posting questions. See the tag description. If you do suspect a bug, always mention your Mathematica version.
– Szabolcs
Nov 29 at 8:40

• use BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)]?
– kglr
Nov 29 at 8:42

• Please do not use the bugs tag when posting questions. See the tag description. If you do suspect a bug, always mention your Mathematica version.
– Szabolcs
Nov 29 at 8:40

• use BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)]?
– kglr
Nov 29 at 8:42

3

Please do not use the bugs tag when posting questions. See the tag description. If you do suspect a bug, always mention your Mathematica version.
– Szabolcs
Nov 29 at 8:40

Please do not use the bugs tag when posting questions. See the tag description. If you do suspect a bug, always mention your Mathematica version.
– Szabolcs
Nov 29 at 8:40

2

use BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)]?
– kglr
Nov 29 at 8:42

use BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)]?
– kglr
Nov 29 at 8:42

active

oldest

Use the option SplineDegree -> (Length@controlPoints - 1) with BezierCurve:

Show[Graphics[{Orange, Thick,
BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)],
Red, Point[controlPoints], Green, Line[controlPoints]}, Axes -> True],
ParametricPlot[bezProfile[t], {t, 0, 1},
PlotStyle -> Directive[Thickness[.01], Opacity[.5]]],
AspectRatio -> 1/GoldenRatio]


BezierCurve >> Details and Options:

BezierCurve by default represents a composite cubic Bézier curve.

Graphics[{Orange, Thick, BezierCurve[controlPoints],
Thickness[.01], Opacity[.3], Blue,
BezierCurve[controlPoints, SplineDegree -> 3]},
Axes -> True, AspectRatio -> 1/GoldenRatio]


• Thank you for swift reply. The BezierFunction does not have SplineDegree as an option only the BezierCurve has Why ? The correct curve is the last one you plotted with y=0 for x=0 and x=1. Should I split the curve in upper and lower one or are there other solutions.
– Maarten Mostert
Nov 29 at 10:51

• @MaartenMostert For composite bezier functions there is BSplineFunction
– Coolwater
Nov 29 at 11:02

• @MaartenMostert, can you use BSplineCurve and BSplineFunction instead of BezierCurve and BezierFunction?
– kglr
Nov 29 at 11:11

active

oldest

active

oldest

active

oldest

active

oldest

Use the option SplineDegree -> (Length@controlPoints - 1) with BezierCurve:

Show[Graphics[{Orange, Thick,
BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)],
Red, Point[controlPoints], Green, Line[controlPoints]}, Axes -> True],
ParametricPlot[bezProfile[t], {t, 0, 1},
PlotStyle -> Directive[Thickness[.01], Opacity[.5]]],
AspectRatio -> 1/GoldenRatio]


BezierCurve >> Details and Options:

BezierCurve by default represents a composite cubic Bézier curve.

Graphics[{Orange, Thick, BezierCurve[controlPoints],
Thickness[.01], Opacity[.3], Blue,
BezierCurve[controlPoints, SplineDegree -> 3]},
Axes -> True, AspectRatio -> 1/GoldenRatio]


• Thank you for swift reply. The BezierFunction does not have SplineDegree as an option only the BezierCurve has Why ? The correct curve is the last one you plotted with y=0 for x=0 and x=1. Should I split the curve in upper and lower one or are there other solutions.
– Maarten Mostert
Nov 29 at 10:51

• @MaartenMostert For composite bezier functions there is BSplineFunction
– Coolwater
Nov 29 at 11:02

• @MaartenMostert, can you use BSplineCurve and BSplineFunction instead of BezierCurve and BezierFunction?
– kglr
Nov 29 at 11:11

Use the option SplineDegree -> (Length@controlPoints - 1) with BezierCurve:

Show[Graphics[{Orange, Thick,
BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)],
Red, Point[controlPoints], Green, Line[controlPoints]}, Axes -> True],
ParametricPlot[bezProfile[t], {t, 0, 1},
PlotStyle -> Directive[Thickness[.01], Opacity[.5]]],
AspectRatio -> 1/GoldenRatio]


BezierCurve >> Details and Options:

BezierCurve by default represents a composite cubic Bézier curve.

Graphics[{Orange, Thick, BezierCurve[controlPoints],
Thickness[.01], Opacity[.3], Blue,
BezierCurve[controlPoints, SplineDegree -> 3]},
Axes -> True, AspectRatio -> 1/GoldenRatio]


• Thank you for swift reply. The BezierFunction does not have SplineDegree as an option only the BezierCurve has Why ? The correct curve is the last one you plotted with y=0 for x=0 and x=1. Should I split the curve in upper and lower one or are there other solutions.
– Maarten Mostert
Nov 29 at 10:51

• @MaartenMostert For composite bezier functions there is BSplineFunction
– Coolwater
Nov 29 at 11:02

• @MaartenMostert, can you use BSplineCurve and BSplineFunction instead of BezierCurve and BezierFunction?
– kglr
Nov 29 at 11:11

Use the option SplineDegree -> (Length@controlPoints - 1) with BezierCurve:

Show[Graphics[{Orange, Thick,
BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)],
Red, Point[controlPoints], Green, Line[controlPoints]}, Axes -> True],
ParametricPlot[bezProfile[t], {t, 0, 1},
PlotStyle -> Directive[Thickness[.01], Opacity[.5]]],
AspectRatio -> 1/GoldenRatio]


BezierCurve >> Details and Options:

BezierCurve by default represents a composite cubic Bézier curve.

Graphics[{Orange, Thick, BezierCurve[controlPoints],
Thickness[.01], Opacity[.3], Blue,
BezierCurve[controlPoints, SplineDegree -> 3]},
Axes -> True, AspectRatio -> 1/GoldenRatio]


Use the option SplineDegree -> (Length@controlPoints - 1) with BezierCurve:

Show[Graphics[{Orange, Thick,
BezierCurve[controlPoints, SplineDegree -> (Length@controlPoints - 1)],
Red, Point[controlPoints], Green, Line[controlPoints]}, Axes -> True],
ParametricPlot[bezProfile[t], {t, 0, 1},
PlotStyle -> Directive[Thickness[.01], Opacity[.5]]],
AspectRatio -> 1/GoldenRatio]


BezierCurve >> Details and Options:

BezierCurve by default represents a composite cubic Bézier curve.

Graphics[{Orange, Thick, BezierCurve[controlPoints],
Thickness[.01], Opacity[.3], Blue,
BezierCurve[controlPoints, SplineDegree -> 3]},
Axes -> True, AspectRatio -> 1/GoldenRatio]


edited Nov 29 at 8:56

kglr

175k9197402

175k9197402

• Thank you for swift reply. The BezierFunction does not have SplineDegree as an option only the BezierCurve has Why ? The correct curve is the last one you plotted with y=0 for x=0 and x=1. Should I split the curve in upper and lower one or are there other solutions.
– Maarten Mostert
Nov 29 at 10:51

• @MaartenMostert For composite bezier functions there is BSplineFunction
– Coolwater
Nov 29 at 11:02

• @MaartenMostert, can you use BSplineCurve and BSplineFunction instead of BezierCurve and BezierFunction?
– kglr
Nov 29 at 11:11

• Thank you for swift reply. The BezierFunction does not have SplineDegree as an option only the BezierCurve has Why ? The correct curve is the last one you plotted with y=0 for x=0 and x=1. Should I split the curve in upper and lower one or are there other solutions.
– Maarten Mostert
Nov 29 at 10:51

• @MaartenMostert For composite bezier functions there is BSplineFunction
– Coolwater
Nov 29 at 11:02

• @MaartenMostert, can you use BSplineCurve and BSplineFunction instead of BezierCurve and BezierFunction?
– kglr
Nov 29 at 11:11

Thank you for swift reply. The BezierFunction does not have SplineDegree as an option only the BezierCurve has Why ? The correct curve is the last one you plotted with y=0 for x=0 and x=1. Should I split the curve in upper and lower one or are there other solutions.
– Maarten Mostert
Nov 29 at 10:51

Thank you for swift reply. The BezierFunction does not have SplineDegree as an option only the BezierCurve has Why ? The correct curve is the last one you plotted with y=0 for x=0 and x=1. Should I split the curve in upper and lower one or are there other solutions.
– Maarten Mostert
Nov 29 at 10:51

@MaartenMostert For composite bezier functions there is BSplineFunction
– Coolwater
Nov 29 at 11:02

@MaartenMostert For composite bezier functions there is BSplineFunction
– Coolwater
Nov 29 at 11:02

@MaartenMostert, can you use BSplineCurve and BSplineFunction instead of BezierCurve and BezierFunction?
– kglr
Nov 29 at 11:11

@MaartenMostert, can you use BSplineCurve and BSplineFunction instead of BezierCurve and BezierFunction?
– kglr
Nov 29 at 11:11

Thanks for contributing an answer to Mathematica Stack Exchange!

But avoid

• Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

Please pay close attention to the following guidance:

But avoid

• Making statements based on opinion; back them up with references or personal experience.

draft saved

function () {
}
);

### Post as a guest

Required, but never shown

Required, but never shown

Required, but never shown

Required, but never shown

Required, but never shown

Required, but never shown

Required, but never shown

Required, but never shown

Required, but never shown