This is the formula of a cubic bézier curve we are aiming to proof:
Linear interpolation (lerp) is defined as a linear parametrization of the line between two points.
Therefore, it can be described by two points
De Casteljau's algorithm provides an elegant approach for constructing bezier curves. It does it recursively, as follows:
For every
- First, start with
$n$ points$P_0, P_1, ..., P_{n-1}$ - Lerp between each line segment
$\overline{P_0P_1}, \overline{P_1P_2}, ..., \overline{P_{n-2}P_{n-1}}$ using parameter$t$ . - Go to step 1 with
$n-1$ new points
The recursion ends when there is exactly one point left —
Using De Casteljau's algorithm, we can deduce the formula of a cubic bezier curve. We start with four points
Iteration #1
Iteration #2
Iteration #3
Thus, we arrive at the Bernstein polynomial form of a cubic bezier curve:
We aim to proof that in order for two cubic bézier curves
The formula we derived for a cubic bézier curve is:
Now, instead of grouping the terms based on points, we can expand it,
and write it as a polynomial of
Then, take the derivative with respect to
Let’s label the points of the first bézier curve
We can plug in the formula for the velocity vector and evaluate them at t=1 and t=0 respectively.
Then, collect like terms on either side
Finally, simplify
We have derived a necessary and sufficient condition for two cubic bézier curves to be