[Math] Understanding cubic bezier curve

bezier-curveparametric

I do not have experience of Mathematics past a-level, so please excuse the incorrect terminology.

I am trying to better understand the fundamentals of how a cubic bezier curve works. I am going by this (parametric?) formula… (I formatted, and labelled to make my point clear)

t = time along path
r = 1-t
a = start co-ordinate
b = first handle
c = second handle
d = end co-ordinate

a * r * r * r +
b * r * r * t * 3 +
c * r * t * t * 3 +
d * t * t * t = value of x or y

As far as I understand it, the tension passes from t, to r as time passes, so that early points/handles become less influential over time, and late ones increase.

I understand that – but what I don't understand is why the value 3 is used. As far as I can see, it would work equally well with any other arbitrary value.

I expect that using another value would break the method of calculating points by tracing lines between the points at set intervals, like at t = 0.25 for example, being able to make a line between ab and bc intersecting at their respective 25% marks, and finding the point at t = 0.25 of the new line.

So, what I want to understand, is the relationship between the number 3, and the ability to calculate the points along the path in said manner.

Best Answer

The value 3 is a consequence of a different method to draw the curve, namely not by converting it to parameter form but rather by recursively refining it. That is, staring from four points $A,B,C,D$ you take successive mid points $E=\frac{A+B}2$, $F=\frac{B+C}2$, $G=\frac{C+D}2$, then midpoints of the midpoints $H=\frac{E+F}2$, $I=\frac{F+G}2$, finally $J=\frac{H+I}2$. Note that taking mid pints is a very simple operation with respect to the coordinates and may require much less precision than drawing the parametric curve.

Now the crucial point is the following: The curve determined by the four points $A,B,C,D$ is replaced by two smaller pieces of curve, the first determined by $A,E,H,J$, the other by $J,I,G,D$. Several nice properties are obeyed by this replacement so that the rough shape of the curve can be "predicted": The curve passes through end points ($A$ and $D$ of the original curve, additionally $H$ for the refined curves), the tangents there point towards $B$ resp. $C$.

Also, if the quadrangle $ABCD$ is convex, then the curve is contained inside it. Note that the refinement steps will sooner or later produce convex quadrangles and each refinement step from then on will give better and better containment estimates for the curve.

Ultimately, it is possible to calculate what the curve described by the above procedure sould look like in parametric form and it turns out that the factor 3 you observed comes into play. In effect, this is the same $3$ as in the binomial formula $(a+b)^3=a^3+3a^2b+3ab^2+b^3$. (Which means that for quadratic Bezier curves you will find a factor of $2$ and for Bezier curves of degree $4$, the numbers $4$ and $6$ will occur etc.