Bezier Curves and Surfaces

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 10

Bezier Curves and Surfaces

Sunirmal Khatua
Department of Computer Science & Engineering
University of Calcutta
Hermite Spline Curve

p1 Pn-1
p0 Pk+1
pk pn

2 3 0 1 t3
2 3 0 0
t2
p (t ) pk pk 1 pk pk 1 x x
1 2 1 0 t

1 1 0 0 1

p (t ) pk (2t 3 3t 2 1) pk 1 (2t 3 3t 2 ) pk (t 3 2t 2 t ) pk 1 (t 3 t 2 )

A point on a Hermite curve is obtained by multiplying each


control point by some function and summing them together.
These functions are called blending functions.
Natural Cubic Spline
s p q
p1 Pn-1
p0 r Pk+1
pk pn

There are (n+1) control points


We need to draw n piecewise curves which requires to determine 4n variables
p (t ) at 3 bt 2 ct d
For each (n-1) intermediate point pk we have
r(1) = pk
p(0) = pk
r(1) = p(0)
r(1) = p(0)
Also
s(0) = p0 and s(0) = 0
q(1) = pn and q(1) = 0
Thus Natural Cubic Spline supports C2 continuity
Bezier Approximate Spline Curve

n
p(t ) pk .BEZ k , n (t )
k 0

BEZ k ,n (t ) n Ck .t k .(1 t ) n k Bernstein Polynomial

p(t ) p0 (1 t ) 3 p1 3t (1 t ) 2 p2 3t 2 (1 t ) p3t 3
1 3 3 1 t 3
3 6 3
0 t 2
p0 p1 p2 p3 x x
3 3 0 0 t

1 0 0 0 1
Bezier Curve Rendering :
The de Casteljau Algorithm

p1 (1-t)
t
p2
(1-t) B A = p0.(1-t) + p1.t
D
A t B = p1.(1-t) + p2.t
p(t) C = p2.(1-t) + p3.t
t E
C (1-t) D = p0.(1-t)2 + p1.2t(1-t) + p2.t2
E = p1.(1-t)2 + p2.2t(1-t) + p3.t2
p0 p3

p (t ) p0 (1 t ) 3 p1 3t (1 t ) 2 p2 3t 2 (1 t ) p3t 3
Bezier Curve Rendering :
Sub-division Method
M12
P1 P2
M012 M0123
M123

M01
M23

P0
P3
Bezier Curve Rendering :
Sub-division Method
P1 P2

P0
P3
Properties of Bezier Curve

Endpoint Interpolation:
The curve passes through (interpolates) some
(or all) of the control points.

Affine Invariance:
Instead of transforming potentially many
individual points on the curve, the control
points are transformed. This is similar to the
property that affine transformations preserve
straight lines.
Properties of Bezier Curve

Convex Hull Property:


The curve never wanders outside the convex
hull. This hull is defined as the set of all
convex combinations of control points.

Linear Precision Property:

Variation Diminishing Property:


Curves does not oscillate more than its
control polygon. In 2D, no straight line can
intersect the curve more times than it
intersects the control polygon.
Bezier Surfaces
Curves generalise to Surfaces:
A surface is a function of two variables p (u , v ) with (n+1).(m+1)
control points Pi , j i 0,..., n; j 0,..., n
A Bzier surface is defined as
n m
p (u , v) Pi , j BEZ i ,n (u ) BEZ j ,m (v)
i 0 j 0

You might also like