I can generate the same Bézier Curve using my own code as the curve generated by Mathematica's function BezierCurve
, but when I increased the order of the curve, it seems the graph I generated seems different from the one Mathematica generated.
I did it according to the definition of the Bézier curve, I do not know why. Can somebody explain it to me?
pointsGeneration[k_] := RandomReal[10, {k, 2}];
parametricterms[n_, x_,l_List]:=(Binomial[n-1,Prepend[Range[n-1],0]] Table[x^i (1-x)^(n-1-i),{i,0,n-1}]).l;
a = pointsGeneration[5];
cc = parametricterms[5, x, a];
ParametricPlot[{cc[[1]], cc[[2]]}, {x, 0, 1}, AxesOrigin -> {0, 0}];
Graphics[BezierCurve[a], Axes -> True, AxesOrigin -> {0, 0}]