Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.
With a cubic Bezier curve , in order for you to be able to represent , you need to have it so that for all . I don't specify a domain on here but regardless of the domain we can just assume that in order to do so, we need for the coefficients of to match those of . We have to solve for four unknowns here, which are the coordinates of and , since and .
If you expand into a third-order polynomial, you can notice that is a ninth-order polynomial, while is third-order. The coefficient of the ninth-order term is just that of the third-order term of cubed, which means that said third-order term must be in order to match coefficients. In other words, is at most quadratic. When this is the case, is still sixth-order, with the sixth-order term being the second-order term of cubed. Again, to match coefficients, this means that the second order term is also , and is at most linear. This time, coefficient matching works, and you can get that and . In other words, the control points would be equidistantly spaced along the x-axis, which isn't particularly surprising. is naturally equal to .
The next part is finding values of and . I don't know of any tricks here, I just found the values of and manually. After expanding and , through direct comparison I found the values
Graphs showing the relationship between the roots, and turning, stationary and inflection points of a cubic polynomial, and its first and second derivatives Done
Here's a somewhat different take on the problem giving an equivalent result: Write
Then:
Evaluate at t=0 to get
You can easily solve for A, B, C, D in terms of F and its derivatives at 0:
Note that the last expression is the third order Maclaurin approximation for F(1), and this is exact since F is a cubic polynomial. If
is any cubic parametric curve then these formulas generate the endpoints and control points from t=0 to t=1. In particular, if the curve is y=f(x) from x=P to x=Q, where f is a cubic polynomial, take
Then:
This gives the endpoints and control points as:
The expression for the y-coordinate at Q is the Taylor series approximation of f(Q), and it's exact since f is a cubic polynomial. I don't think it would be hard to generalize these formulas to nth order Bezier curves, and you might say that the expressions for the y coordinates are actually generalizations of Taylor appromations since the last one is, in fact, the actual Taylor approximation. Since the formulas use derivatives instead of coefficients, you can use them to generate accurate Bezier approximations for any parametric curve of sufficient smoothness. --RDBury (talk) 11:08, 4 February 2024 (UTC)[reply]