s***@gmail.com
2013-06-20 06:57:05 UTC
thus cubic. Furthermore, a cubic Bezier can inflect three times: once
internally and again at each endpoint; so you need three possible roots
to any inflection polynomial, further evidence of it being cubic.
Dear sir, in relation to this old post of yours:internally and again at each endpoint; so you need three possible roots
to any inflection polynomial, further evidence of it being cubic.
It is my understanding that a cubic bezier can only inflect twice, by reasoning as follows (adapted from: http://www.caffeineowl.com/graphics/2d/vectorial/cubic-inflexion.html)
A cubic bezier curve P with control points P1, C1, C2, P2 is computed as:
P = P1 + 3 * t * ( C1 - P1 ) + 3 * t^2 * ( C2 - 2 * C1 + P1 ) + t^3 * ( P2 - 3 * C2 + 3 * C1 - P1 )
Taking A = C1 - P1, B = C2 - 2 * C1 + P1 and C = ( P2 - 3 * C2 + 3 * C1 - P1 ), we have:
P = P1 + 3 * t * A + 3 * t^2 * B + t^3 * C
Differentiating successively w.r.t. t, we have:
Veloc = 3 * ( A + 2 * t * B + t^2 * C )
Accel = 6 * ( B + t * C )
The determinant of the 2x2 matrix [ Veloc Accel ] is :
18 * ( (Bx*Cy - By*Cx) * t^2 + (Ax*Cy - Ay*Cx) * t + (Ax*By - Ay*Bx) )
Equating it with zero, we have a quadratic equation of the form: qA * t**2 + qB * t + qC = 0
Since this is only a quadratic equation, at the most it can have only two roots i.e. two values of t for which the velocity and acceleration vectors are parallel and hence an inflection occurs.
Can you please give an example of a cubic bezier which can inflect thrice?