Construction of Bézier Curves 贝塞尔曲线的构造
Given n+1 points P
0
, P
1
, P
2
, ... and P
n
in space, the control points, the Bézier curve defined by
these control points is
给定空间中的
n +1
个点
P
0
, P
1
, P
2
, ...
和
P
n
,控制点,由这些控制点定义的贝塞尔曲线为
where the coefficients are defined as follows:
其中系数定义如下:
Therefore, the point that corresponds to u on the Bézier curve is the "weighted" average of all
control points, where the weights are the coefficients B
n,i
(u). The line
segments P
0
P
1
, P
1
P
2
, ..., P
n-1
P
n
, called legs, joining in this order form a control polyline. Many
authors prefer to call this control polyline as control polygon. Functions B
n,i
(u), 0 <= i <= n, are
referred to as the Bézier basis functions or Bernstein polynomials.
因此,贝塞尔曲线上对应于
u
的点是所有控制点的“加权”平均值,其中权重是系数
B
n,i
(u)
。
线段
P
0
P
1
, P
1
P
2
, ..., P
n-1
P
n
,称为腿,按此顺序连接形成控制折线。许多作者更喜欢将此控制折
线称为控制多边形。函数
B
n,i
(u), 0 <= i <= n
被称为贝塞尔基函数或伯恩斯坦多项式。
Note that the domain of u is [0,1]. As a result, all basis functions are non-negative. In the above,
since u and i can both be zero and so do 1 - u and n - i, we adopt the convention that 0
0
is 1. The
following shows a Bézier curve defined by 11 control points, where the blue dot is a point on the
curve that corresponds to u=0.4. As you can see in the figure, the curve more or less follows the
polyline.
请注意,
u
的域是
[0,1]
。因此,所有基函数都是非负的。在上面,由于
u
和
i
都可以为零,
1 - u
和
n - i
也可以,因此我们采用
0
0
为
1
的约定。下图显示了由
11
个控制点定义的贝塞
尔曲线,其中蓝点为曲线上对应于
u =0.4
的点。如图所示,曲线或多或少遵循折线。
The following properties of a Bézier curve are important:
贝塞尔曲线的以下属性很重要:
1. The degree of a Bézier curve defined by n+1 control points is n:
由
n +1
个控制点定义的贝塞尔曲线的阶数为
n
:
In each basis function, the exponent of u is i + (n - i) = n. Therefore, the degree of the curve is
n.
在每个基函数中,
u
的指数为
i + ( n - i ) = n
。因此,曲线的次数为
n
。
2. C(u) passes through P
0
and P
n
:
C( u )
经过
P 0
和
P n
:
This is shown in the above figure. The curve passes though the first and the last control point.