Professional Documents
Culture Documents
Introduction
• Representing Curves
– A number of small line-segments joined
• Interpolation
• Parametric equations
• Bezier Curves
“Computers can’t draw curves.”
x0 ,y0
dx dx = x1 - x0
(2,3)
dy = y1 - y0
Where are you at a general
time t?
Equation(s) of a straight
line as a function of an x(t) = x0 + t.dx
arbitrary parameter t.
y(t) = y0 + t.dy
Why use parametric equations?
• One, two, three or n-dimensional
representation is possible
• Can handle “infinite slope” of tangents
• Can represent multi-valued functions
Bezier Curves
• An alternative to splines
R1 R4
P4 P4
P1 P1
Instead of providing R1 and R4 , provide two additional control points ! ! !
P2 and P3
Approxi mation
Bezier curves
• Typically, cubic polynomials
• Similar to Hermite interpolation
– Special way of specifying end tangents
• Requires special set of coefficients
• Need four points
– Two at the ends of a segment
– Two control tangent vectors
Bezier curves
• Control polygon: control points connected to each
other
1 t
P3
P0 P0
1 t
(1 t ) P0 tP1 1 t
t (1 t ) 2 P0 2(1 t )tP1 (1 t ) 3 P0
1 t
P1 1 t t 2P2 3(1 t ) 2 tP1
t
(1 t ) P1 tP2 t 3(1 t )t 2 P2
1 t
t (1 t ) 2 P1 2(1 t )tP2 t 3P3
P2 1 t t t 2 P3
(1 t ) P2 tP3
t
P3
Now,
1 3 3 1 P0
3 6 3 0 P1
3
3 i
Q (t ) t 3 t 2 t 1
i
i 0
t (1 t ) 3 i
1
3 3 0 0 P2
1 0 0 0 P3
What does it mean ?
T M b Gb
1 (1 t ) 3
Q (t ) (1 t ) P0 3t (1-t ) P1 3t (1-t ) P2 t P3
3 2 2 3 t3
3t (1-t ) 2
3
3 i
t (1 t ) 3i Pi , 0 t 1
i 0 i 3t 2 (1-t )
0 1
Bezier Polynomial Function
n! n i
Bin (t ) .t .(1 t )
i
i!(n i )!
Parametric equations for x(t),y(t)
n
x(t ) xi .Bin (t )
i 0
n
y (t ) yi .Bin (t )
i 0
Some Bezier Curves
Properties of a Bézier Curve
Cubic Curve
2. The curve passes though the first and the last control point
C(u) passes through P0 and Pn.
3. Bézier curves are tangent to their first and
last edges of control polyline.
2 7 4
6 5
1 3
3 8
2 0
5 8
9 6
0 4 10
1 7
4. The Bézier curve lies completely in the convex hull of the given control points.
Note that not all control points are on the boundary of the convex hull. For example, control points 3, 4, 5, 6,
8 and 9 are in the interior. The curve, except for the first two endpoints, lies completely in the convex hull.
5. Moving control points:
5. Moving control points:
6. 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 Bk,n(u).
n
C(u ) p k Bk ,n (u ), 0 u 1
k 0
7. Multiple control points at a single coordinate position gives more weight to that
position.
8. Closed Bézier curves are generated by specifying the first and the last control
points at the same position.
4
5 3
2 0
8
6
1 7
Note:
Note: Bézier curves are polynomials which cannot represent circles
and ellipses.
9. If an affine transformation is applied to a Bézier curve, the result can be
constructed from the affine images of its control points.
Disadvantages