Bernstein Polynomials of degree n:
Bin(u)=inui(1u)nifor i{0,1,,n} B^{n}_{i}(u) = \lgroup^{n}_{i}\rgroup u^{i}(1-u)^{n-i} \hspace{1cm} for \ i \in \{0,1,\dots,n\}

Properties of Bernstein Polynomials
  1. They are linearly independent.
    Let i=0nbiui(1u)ni=0\sum^{n}_{i=0} b_{i} u^{i}(1-u)^{n-i} = 0, then

i=0nbiui(1u)ni(1u)n=i=0nbiui(1u)i=i=0nbi(u1u)i=0 \begin{aligned} \sum^{n}_{i=0} b_{i} u^{i}\frac{(1-u)^{n-i}}{(1-u)^{n}} = \sum^{n}_{i=0} b_{i} u^{i} (1-u)^{-i} = \sum^{n}_{i=0} b_{i} (\frac{u}{1-u})^{i} = 0 \end{aligned}

Since u(0,1)u \in (0,1), (u1u)i(\frac{u}{1-u})^{i} are always greater than zero. i=0nbiui(1u)ni\sum^{n}_{i=0} b_{i} u^{i}(1-u)^{n-i} equals zero, only when all bib_{i} equal zero, which means that i=0nbiui(1u)ni=0\sum^{n}_{i=0} b_{i} u^{i}(1-u)^{n-i} = 0 iif all bib_{i} equal zero. Thus, ui(1u)niu^{i}(1-u)^{n-i} are linearly independent, and Bin(u)B_{i}^{n}(u) are also linearly independent.

  1. They are symmetric.
    Bin(u)=Bnin(1u) B_{i}^{n}(u) = B_{n-i}^{n}(1-u)

  2. They have roots at 00 and 11 only.
    Bin(0)=Bnin(1)={1for i=0,0for i>0. B_{i}^{n}(0) = B_{n-i}^{n}(1) = \begin{cases} 1 \hspace{1cm} for \ i = 0, \\ 0 \hspace{1cm} for \ i > 0. \end{cases}

  3. They form a partition of unity.
    i=0nBin(u)=1for all uR.i=0nBin(u)=(u+(1u))n=1n=1 \begin{aligned} \sum_{i=0}^{n}B_{i}^{n}(u) = 1 \hspace{1cm} for \ all \ u \in R. \\ \sum_{i=0}^{n}B_{i}^{n}(u) = (u+(1-u))^{n} = 1^n = 1 \end{aligned}

  4. They are positive in (0,1)(0,1).
    Bin(u)>0for u(0,1) B_{i}^{n}(u) > 0 \hspace{1cm} for \ u \in (0,1)

  5. They satisfy the recursion formula.
    Bin+1(u)=uBi1n(u)+(1u)Bin(u)in+1ui(1u)n+1i=ui1nui1(1u)n+1i+(1u)inui(1u)ni(n+1)!i!(n+1i)!ui(1u)n+1i=i1nui(1u)n+1i+inui(1u)ni+1=[n!(i1)!(ni+1)!+n!i!(ni)!]ui(1u)ni+1=[in!(i)!(ni+1)!+n!(ni+1)i!(ni+1)!]ui(1u)ni+1 \begin{aligned} B_{i}^{n+1}(u) & = uB_{i-1}^{n}(u) + (1-u)B_{i}^{n}(u) \\ \lgroup_{i}^{n+1} \rgroup u^{i}(1-u)^{n+1-i} & = u \lgroup_{i-1}^{n} \rgroup u^{i-1}(1-u)^{n+1-i} + (1-u) \lgroup_{i}^{n} \rgroup u^{i}(1-u)^{n-i} \\ \frac{(n+1)!}{i!(n+1-i)!}u^{i}(1-u)^{n+1-i} & = \lgroup_{i-1}^{n} \rgroup u^{i}(1-u)^{n+1-i} + \lgroup_{i}^{n} \rgroup u^{i}(1-u)^{n-i+1} \\ & = [\frac{n!}{(i-1)!(n-i+1)!} + \frac{n!}{i!(n-i)!}] u^{i}(1-u)^{n-i+1} \\ & = [\frac{i \cdot n!}{(i)!(n-i+1)!} + \frac{n! \cdot (n-i+1)}{i!(n-i+1)!}] u^{i}(1-u)^{n-i+1} \end{aligned}

Bezier Representation

b(u)=i=0nciBin(u) b(u) = \sum_{i=0}^{n} c_{i}B_{i}^{n}(u)

任何次数小于等于nn的曲线b(u)b(u)都可以通过对Bin(u)B_{i}^{n}(u)的线性组合来表示。其中,Bin(u)B_{i}^{n}(u) form a basis for all polynomials of degree n\le n.

u=a(1t)+btfor ab u = a(1-t) + bt \hspace{1cm} for \ a \ne b

Bezier Curve

b(u)=i=0nbiBin(t) b(u) = \sum_{i=0}^{n} b_{i}B_{i}^{n}(t)
如果bib_{i}是一个向量,且i=0nBin(t)=1\sum_{i=0}^{n}B_{i}^{n}(t) = 1,那么b(u)b(u)相当于是向量bib_{i}的一个线性组合,在由bib_{i}组成的凸面体里。(Affine Combination: In mathematics, a linear combination of vectors x1,,xnx_{1},\dots,x_{n},
i=1naixi=a1x1++anxn \sum_{i=1}^{n} a_{i}x_{i} = a_{1}x_{1} + \dots + a_{n}x_{n}
is called an affine combination of x1,,xnx_{1},\dots,x_{n} when the sum of the coefficients is 1, that is, i=1nai=1\sum_{i=1}^{n}a_{i} = 1.

Affine Map: In geometry, affine map is a function between affine spaces which preserve points, straight lines and planes. Also, sets of parallel lines remain parallel after an affine transformation. An affine transformation does not necessarily preserve angles between lines or distance between points, though it does preserve ratios of distances between points lying on a straight line.

Examples of affine map includes translation, scaling, homothety, similarity transformation, reflection, rotation, shear mapping, and compositions of them in any cobination and sequence.
f:xyxMx+b f:x \rightarrow y \hspace{1cm} x \rightarrow Mx+b

The De Casteljau’s algorithm

A curve: b(u)=i=0nbi0Bin(t)b(u) = \sum_{i=0}^{n} b_{i}^{0}B_{i}^{n}(t), with u=a(1t)+btu = a(1-t) + bt.

Bezier Curve

b(u)=i=0nbi0Bin(t)=i=0n1bi1Bin1(t)==i=00bi0Bi0(t)=b0n b(u) = \sum_{i=0}^{n}b_{i}^{0}B_{i}^{n}(t) = \sum_{i=0}^{n-1}b_{i}^{1}B_{i}^{n-1}(t) = \dots = \sum_{i=0}^{0}b_{i}^{0}B_{i}^{0}(t) = b_{0}^{n}

Derivatives

Derivatives of Bernstein Polynomials
ddtBin(t)=ddtinti(1t)ni=ddtn!i!(ni)!ti(1t)ni=n!i!(ni)![iti1(1t)niti(1t)ni1(ni)]=n!i!(ni)!iti1(1t)nin!i!(ni)!ti(1t)ni1(ni)=n(n1)!(i1)!(ni)!ti1(1t)nin(n1)!i!(ni1)!ti(1t)ni1=ni1n1ti1(1t)ninin1ti(1t)ni1=n[Bi1n1(t)+Bin1(t)] \begin{aligned} \frac{d}{dt}B_{i}^{n}(t) &= \frac{d}{dt} \lgroup_{i}^{n} \rgroup t^{i}(1-t)^{n-i} \\ &= \frac{d}{dt} \frac{n!}{i!(n-i)!}t^{i}(1-t)^{n-i} \\ &= \frac{n!}{i!(n-i)!}[i \cdot t^{i-1}(1-t)^{n-i} - t^{i}(1-t)^{n-i-1} \cdot (n-i)] \\ &= \frac{n!}{i!(n-i)!} i \cdot t^{i-1}(1-t)^{n-i} - \frac{n!}{i!(n-i)!} t^{i}(1-t)^{n-i-1} \cdot (n-i) \\ &= \frac{n(n-1)!}{(i-1)!(n-i)!} t^{i-1}(1-t)^{n-i} - \frac{n(n-1)!}{i!(n-i-1)!} t^{i}(1-t)^{n-i-1} \\ &= n\lgroup_{i-1}^{n-1} \rgroup t^{i-1}(1-t)^{n-i} - n \lgroup_{i}^{n-1} \rgroup t^{i}(1-t)^{n-i-1} \\ &= n [B_{i-1}^{n-1}(t) + B_{i}^{n-1}(t)] \end{aligned}

Define B1n1=0, Bnn1=0B_{-1}^{n-1} = 0, \ B_{n}^{n-1} = 0.

Derivatives of the curve b(u)b(u) with Bezier Representation
ddui=0nbiBin(t)=i=0nbiddtBin(t)dtdu=i=0nbin[Bi1n1(t)Bin1(t)]1ba=nbai=0nbi[Bi1n1(t)Bin1(t)]=nba[b0B1n1(t)b0B0n1(t)+b1B0n1(t)b1B1n1(t)++bn1Bn2n1(t)bn1Bn1n1(t)+bnBn1n1(t)bnBnn1(t)]=nbai=0n1(bi+1bi)Bin1(t)=nbai=0n1biBin1(t) \begin{aligned} \frac{d}{du} \sum_{i=0}^{n}b_{i}B_{i}^{n}(t) &= \sum_{i=0}^{n}b_{i} \frac{d}{dt} B_{i}^{n}(t) \frac{dt}{du} \\ &= \sum_{i=0}^{n}b_{i} \cdot n[B_{i-1}^{n-1}(t) - B_{i}^{n-1}(t)] \frac{1}{b-a} \\ &= \frac{n}{b-a} \sum_{i=0}^{n}b_{i} [B_{i-1}^{n-1}(t) - B_{i}^{n-1}(t)] \\ &= \frac{n}{b-a} [b_{0}B_{-1}^{n-1}(t) - b_{0}B_{0}^{n-1}(t) + b_{1}B_{0}^{n-1}(t) - b_{1}B_{1}^{n-1}(t) + \dots + b_{n-1}B_{n-2}^{n-1}(t) - b_{n-1}B_{n-1}^{n-1}(t) + b_{n}B_{n-1}^{n-1}(t) - b_{n}B_{n}^{n-1}(t)] \\ &= \frac{n}{b-a} \sum_{i=0}^{n-1}(b_{i+1}-b{i})B_{i}^{n-1}(t) \\ &= \frac{n}{b-a} \sum_{i=0}^{n-1}\triangle{b_{i}} B_{i}^{n-1}(t) \end{aligned}

The tangents of b(u)b(u) at t=0t=0 and t=1t=1 are spaned by b0b_{0},b0b_{0} and bn1b_{n-1},bnb_{n}.

Bezier Curve

紫色的线条验证了Bernstein Polynomials的partition of unity: i=0nBin(u)=1\sum_{i=0}^{n}B_{i}^{n}(u) = 1.

t=0t = 0时,只有B0n=1B_{0}^{n} = 1,其余Bin(t)=0,i0B_{i}^{n}(t) = 0, i \ne 0。故只有b1b_{1}b0b_{0}影响b(u)b(u)t=0t = 0时的切线(参考上图蓝色线条)。

t=1t = 1时,只有Bnn=1B_{n}^{n} = 1,其余Bin(t)=0,inB_{i}^{n}(t) = 0, i \ne n。故只有bn1b_{n-1}bnb_{n}影响b(u)b(u)t=1t = 1时的切线(参考上图红色线条)。

相关文章: