Calculation of Bezier curves

Modeling of curves
Needs a ways of representing curves:
 Reproducible - the representation should give
the same curve every time;
 Computationally Quick;
 Easy to manipulate, especially important for
design purposes;
 Flexible;
 Easy to combine with other segments of curve.
Bezier curve model
Bezier Curve
Bezier Curve from six points
Patching two Bezier Curves
Together
Calculation of Bezier curves

Lets Р0=[1,1] Р1=[2,3] Р2=[4,3]
P3=[3,1]
n
P (t )   Pi  I n ,i (t )
i 0
n i
 n i 
I n ,i t      t 1  t 
i 
n
n!
  
 i  i! n  i !
P t   P0 I 3,0  P1 I 3,1  P2 I 3, 2  P3 I 3,3
I 3,0 t   1  t  1  t   1  t 
3
I 3,1 t   3t  1  t 2 
I 3,2 t   3t 2  1  t 
I 3,3 t   t 3
3
The coefficients of Bezier curve
t
I 3,0
I 3,1
I 3,2
I 3,3
0
1
0
0
0
0.15
0.614
0.325
0.0574
0.0034
0.35
0.275
0.444
0.239
0.043
0.5
0.125
0.375
0.375
0.125
0.65
0.043
0.239
0.444
0.275
0.85
0.0034
0.0574
0.325
0.614
1
0
0
0
1
The values of the points on the
curve
P0  P0  1,1
P0.15  0.614  P0  0.325  P1  0.0574  P2  0.0034  P3  1.5,1.765
P0.35  0.275  P0  0.444  P1  0.239  P2  0.043  P3  2.248,2.367
P0.5  0.125  P0  0.375  P1  0.375  P2  0.125  P3  2.75,2.5
P0.65  0.043  P0  0.239  P1  0.444  P2  0.275  P3  3.122,2.36
P0.85  0.0034  P0  0.514  P1  0.325  P2  0.614  P3  3.248,1.75
P1  P3  3,1
Points of polygon and calculated
Bezier curve
The properties of Bezier curves:




The curve passes through the start and finish points of the control
polygon defining the curve.
The tangent to the curve at t = 0 lies in the direction of the line
joining the first point to the second point. Also the tangent to the
curve at t=1 is in the direction of the line joining the penultimate
point to the last point.
Any point on the curve lies inside the convex hull of the control
polygon. Also moving any control point will drag the curve towards
that control point.
It can also be proved that any line/plane intersects the curve no
more times than it intersects the open polygon formed by the control
points. This means that no line can intersect the curve more than
twice if the four control points form an open polygon as shown. Thus
there can be no loops in the curve and it must be smooth. This is
called the Variation Diminishing Property.
Disadvantages of Bezier curves


Their non-localness. Thus while a
particular control point mainly influences
the shape of the curve close to it, it also
affects the entire curve to some extent.
The fact that the degree of the curve is
related to the number of control points.
Thus either high order polynomials have to
be evaluated or multiple low-degree curve
segments have to be used.
B-spline basis functions
Iterations scheme for cubic (k =
4) basis functions
Knot vectors
Knot vectors are generally: uniform, open uniform
and non-uniform.

Uniform knot vectors are the vectors for which ti+1 ti = const, e.g. [0,1,2,3,4,5].

Open Uniform knot vectors are uniform knot vectors
which have k-equal knot values at each end:
ti = t0 , i < k
ti+1 - ti = const , k-1 <= i < n+1
ti = tk+n , i >= n+1
e.g. [0,0,0,1,2,3,4,4,4] (k=3, n=5).
Non-uniform knot vectors. This is the general case,
the only constraint is the standard ti <= ti+1

B-spline curve
B-spline curve
B-spline through 4 control points,
with degree t = 2, 3, and 4. t = 2 is
just linear interpolation, as the
degree increases the smoother the
curve becomes
Effect of the degree of B-spline
curve on its shape
Multiple control points induce
regions of high curvature of a Bspline curve
Advantages of B-splines





Changes to a control point only affects the curve in that
locality
Any number of points can be added without increasing
the degree of the polynomial.
As with Bezier curves adding multiple points at or near a
single position draws the curve towards that position.
Closed curves can be created by making the first and last
points the same, although continuity will not be
maintained automatically.
B-Splines lie in the convex hull of the control points