Bezier curve coefficients intuition

797 Views Asked by At

I understand that the coefficients for a Bezier curve falls easily from its recursive definition. However, looking at the polynomial unto itself, I'm struggling to understand why we need the additional weighting provided by the binomial coefficients.

As far as I'm aware, the main purpose of Bezier curves is application-based so that humans can intuitively manipulate curves. Why then, does the $i^\text{th}$ point of an $n$-degree Bezier curve need to be weighted with $n \choose i$ for the resulting curve to behave intuitively to the human manipulator?

3

There are 3 best solutions below

0
On

The ${n \choose i}$ in Bezier curve formula $C(t)=\sum_{i=0}^n{{n \choose i} (1-t)^{n-i}t^iP_i}$ comes from the binomial expansion of $((1-t) + t)^n$. This means the "weighting" for all control points will sum to 1.0, which will lead to nice property for Bezier curve, such as variation diminishing property.

0
On

There are many ways to define "blended" curves of the form $$ \mathbf{F}(t) = \sum_{i=0}^n \phi_i(t)\mathbf{P}_i $$ where $\mathbf{P}_0, \ldots,\mathbf{P}_n$ are control points that the user manipulates and $\phi_0, \ldots,\phi_n$ are blending functions. Bézier curves are the special case where $\phi_0, \ldots,\phi_n$ are Bernstein polynomials.

In general, adding points is not a valid operation. A linear combination of points like $\lambda_0\mathbf{P}_0 + \cdots + \lambda_n\mathbf{P}_n$ only makes sense if $\lambda_0 + \cdots + \lambda_n = 1$. Without this, the result is dependent on your choice of origin.

Suppose we take the curve $\mathbf{F}(t)$ defined above, and we translate all of its control points by some vector $\mathbf{V}$, and use these translated control points to define another curve $\mathbf{G}(t)$. It is natural to expect that $\mathbf{G}(t)$ will be just a translated copy of $\mathbf{F}(t)$, i.e. that $\mathbf{G}(t) = \mathbf{F}(t) + \mathbf{V}$ for all $t$. But, we have $$ \mathbf{G}(t) = \sum_{i=0}^n \phi_i(t)(\mathbf{P}_i + \mathbf{V}) = \sum_{i=0}^n \phi_i(t)\mathbf{P}_i + \mathbf{V}\sum_{i=0}^n \phi_i(t) = \mathbf{F}(t) + \mathbf{V}\sum_{i=0}^n \phi_i(t) $$ So we get $\mathbf{G}(t) = \mathbf{F}(t) + \mathbf{V}$ only if $\sum_{i=0}^n \phi_i(t) = 1$. So, when constructing a blended curve, you have to use blending functions that add up to 1 in order to get this translation-invariance property.

The Bernstein polynomials do have this sum-to-one property (and so do Lagrange polynomials). Bernstein polynomials have the additional nice property that they are non-negative, and this is what gives us the very useful convex hull property of Bézier curves.

So, the purpose of the $n \choose i$ factor is not just to make the the curve editing behave more intuitively. The bigger point is that curve definition wouldn't really make sense without these factors, because the blending functions wouldn't sum to 1, and the curve wouldn't be translation-invariant.

0
On

Contrary to your intuition, a "uniform" weighting of the points with the polynomials $t^i(1-t)^{n-i}$ is quite unbalanced.

These functions have a single maximum at $\frac in$, with the value

$$\left(\frac in\right)^i\left(\frac{n-i}n\right)^{n-i}=\frac{i^i(n-i)^{n-i}}{n^n}.$$

In particular, the maximum weight of the central control point is

$$\frac1{2^n}.$$

enter image description here

The Bernstein polynomials counteract that by means of the Binomial coefficients and give a much better balancing of the weights, with maxima

$$\binom ni\frac{i^i(n-i)^{n-i}}{n^n}$$ and

$$\frac{\binom n{n/2}}{2^n}\approx\sqrt{\frac{2}{\pi n}}.$$

enter image description here

As one can also check, the area under the Bernstein polynomials is constant.


The fact that all weights sum to one is an essential requirement for the coefficients, as it ensures translation invariance (the curve obtained from translated control points is the same as the curve built on the original control points, then translated.)

If you reweight the uniform weights by dividing by their sum to achieve that property, things are a little better.

enter image description here

For $t=\frac12$, all weights equal $\frac1n$ and the curve passes through the centroid of the control points, which is probably not what you want.