NURBS学习第一天

来源:互联网 发布:好莱坞黑帮电影知乎 编辑:程序博客网 时间:2024/06/01 10:49

曲线和表面的基础


隐式形式和参数形式(page1~5)

优缺点对比.


The power basis and Bezier forms are mathematically equivalent.
However, the Bezier method is superior to the power basis form for geometric modeling.


Power basis curve (page6)

C(u)=(x(u),y(u),z(u))=i=0naiui0u1


Bezier Curves(page9)

C(u)=i=0nBi,n(u)Pi0u1

Bi,n(u)=n!i!(ni)!ui(1u)ni

Bezier curves are invariant under the usual transformations such as rotations, translations, and scalings;that is, one applies the transformation to the curve by applying it to the control polygon Pi.
Bezier的算法算法实现(page20)

Bernstein(i,n,u,B){ /* Compute the value of a Bernstein polynomial.*//* Input: i,n,u *//* Output: B */for (j=O; j<=n; j++) /* compute the columns */temp[j] = 0.0;/* of Table 1.1 */temp[n-i] = 1.0;/* in a temporary array */u1 = 1.0-u;for (k=1; k<=n; k++)for (j=n; j>=k; j--)temp[j] = u1*temp[j] + u*temp[j-1];B = temp[n];}