Sei sulla pagina 1di 20

Department of Applied Mathematics

and Computational Sciences


University of Cantabria
UC-CAGD Group

BEZIER CURVES AND SURFACES


Andrs Iglesias
e-mail: iglesias@unican.es
Web pages: http://personales.unican.es/iglesias
http://etsiso2.macc.unican.es/~cagd

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

COMPUTER-AIDED GEOMETRIC DESIGN


AND COMPUTER GRAPHICS:

Bzier curves
BEZIER CURVES

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Let P={P0,P1,...,Pn} be a set of


points P i IR d, d=2,3.

The Bzier curve associated with the


set P is defined by:
n
X
n
Pi Bi (t)
i=0

Bzier curve with n=5

(six control or Bzier points)

where B in (t) represent the Bernstein


polynomials, which are given by:
!
n
n
B i (t) =
(1 t) ni ti
i
i = 0, . . . , n
n being the polynomial degree.

Bernstein polynomials Bi4(t)

Bzier curves
Control polygon

Control points

-2

-2
1

Bzier
curve

7 control points

n=6

-2
1

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

n
X
i=0

PiB in(t)

Bernstein polynomials
Given by:
n
Bi (t)

Properties:
Extreme
values:

2001 Andrs Iglesias. See:


http://personales.unican.es/iglesias

n the degree
n
ni i
(1 t) t
i the index
i
i = 0, . . . , n t the variable

Bin(0)= Bin(1)=0 i=1,...,n-1 Positivity: Bin(t) 0 in [0,1]


B0n(0)= Bnn(1)=1
n(t) = B n(1-t)
Simmetry:
B
i
n-i
Bin(1)= Bin(0)=0

Normalizing
property:

n
X
i=0

Bin (t)=1

Maxima: Bin(t) attains exactly one maximum


on the interval [0,1], at t=i /n.

Properties of the Bzier curves


6

4
2

2
0

-2
1

Control polygon

-2
1

The Bzier curve generally follows the shape


of the control polygon, which consists of the
segments joining the control points.

3D curve

2D curve

Bzier scheme is
useful for design.
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Properties of the Bzier curves


LOCAL vs. GLOBAL CONTROL
Bzier curves exhibit global
B-splines allow local control: only
control: moving a control point
a part of the curve is modified
alters the shape of the whole curve. when changing a control point.
Control point traslation.

Control point traslation.


(4,4)

(2,4)

(2,4)
(2,2)

The curve changes here


2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

The curve does


not change here

Properties of the Bzier curves


Interpolation. A Bzier curve always interpolates the end control points.
Tangency. The endpoint tangent vectors are parallel to P1- P0 and Pn- Pn-1
Convex hull property. The curve is contained in the convex hull of its
defining control points.

Intersections
Curve: 0 Polygon: 2
Curve: 1

Polygon: 2

Curve: 2

Polygon: 2

For a three-dimensional Bzier curve, replaces the words straight line


with the word plane.

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Variation disminishing property. No straight line intersects a Bzier


curve more times than it intersects its control polygon.

Properties of the Bzier curves


A given Bzier curve can be subdivided at a point t=t0 into two Bzier segments
which join together at the point corresponding to the parameter value t=t0 .

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Left-hand side:
4 control points

t=0.4
Subdivided curve: 7 control points
Right-hand side:
4 control points

Original curve:
4 control points

t=0.4

t=0.4

Properties of the Bzier curves


Degree raising: any Bzier curve of degree n (with control points Pi)
can be expressed in terms of a new basis of degree n+1. The new
control points Qi are given by:

i=0,...,n+1
P-1= Pn+1=0

1
i
Qi =
Pi-1 + (1)
Pi
n+1
n+1
Original cubic curve:
4 control points

Final quartic curve:


5 control points

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Bzier curves
Degree raising of the Bzier curve of degree n=3 to degree n=11
4
3.5
3
2.5
2
1.5
1
0.5
2

4
3.5
3
2.5
2
1.5
1
0.5

4
3.5
3
2.5
2
1.5
1
0.5
2

4
3.5
3
2.5
2
1.5
1
0.5
2

4
3.5
3
2.5
2
1.5
1
0.5
3

4
3.5
3
2.5
2
1.5
1
0.5
2

4
3.5
3
2.5
2
1.5
1
0.5
2

4
3.5
3
2.5
2
1.5
1
0.5
2

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

4
3.5
3
2.5
2
1.5
1
0.5

Rational Bzier curves

All the conics can be well represented using rational functions, which
are the ratio of two polynomials.

Rational
Bzier curve

R(t) =

n
P

Pi wi Bin (t)

i=0
n
P

i=0

wi Bin(t)

wi

weights

If all wi = 1, we
recover the Bzier
curve.

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

There are a number of important curves and surfaces which cannot be


represented faithfully using polynomials, namely, circles, ellipses,
hyperbolas, cylinders, cones, etc.

Farin, G.: Curves and Surfaces for CAGD, Academic Press, 3rd. Edition, 1993 (Chapters 14
and 15).
Hoschek, J. and Lasser, D.: Fundamentals of CAGD, A.K. Peters, 1993 (Chapter 4).
Anand, V.: Computer Graphics and Geometric Modeling for Engineers, John Wiley & Sons,
1993 (Chapter 10).

Rational Bzier curves


wi > 1 -> the curve approximates to Pi
wi < 1 -> the curve moves away from Pi
4
1
3

Changing the weights:

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

1
2

1
2

1
1

1
2

0.1

0.3

Rational Bzier curves


Influence of the weights:
The effect of changing a weight is different from that of moving a control point.

1
1

Moving a control point: a nonrational


Bzier curve with a change in one
control point.

Original curve
Final curve

1
1

1
1

Changing a weight: a rational


Bzier curve with one weight 1
changed.

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Rational Bzier curves


Rational Bzier curves are useful to represent conics, which become an
important tool in the aircraft industry.

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Let c(t) be a point on a conic. Then, there exist numbers w0, w1 and w2
and two-dimensional points P0, P1 and P2 such that:

w0 P0 B02(t) +w1 P1 B12(t) +w2 P2 B22(t)


c(t) =
w0 B02(t) +w1 B12(t) +w2 B22(t)
If we take w0 = w2 =1 and we define s =
s = 1 gives a parabolic arc
2
s < 1 gives an elliptic arc
2
s > 1 gives a hyperbolic arc
2

w1 :
1+ w1

hyperbola

w1 =1

parabola

w1 = 1
3

elipse

w1 =2

Rational Bzier curves


Example: the circle

1/2
(1, 3)

1.75
1.5
1.25

(1/2, 3/2)

(3/2, 3/2)

0.75
0.5

2001 Andrs Iglesias. See:


http://personales.unican.es/iglesias

0.25

(0,0)

0.5

(1,0)

1.5

(2,0)

1/2

w0=1
w1= 1/2
w2 = 1

1/2

Bzier surfaces
BEZIER SURFACES

Let P={{P00,P01,...,P0n},
{P10,P11,...,P1n},
........................,
{Pm0,Pm1,...,Pmn}}
be a set of points Pij IR
(i=0,1,...,m ; j=0,1,...n)

x
0
1
2
3
4
5

y
0
0
0
0
0
0

z
1
2
3
3
2
1

x
0
1
2
3
4
5

y
1
1
1
1
1
1

z
2
3
4
4
3
2

x
0
1
2
3
4
5

y
2
2
2
2
2
2

z
3
4
5
5
4
3

x
0
1
2
3
4
5

y
3
3
3
3
3
3

z
3
4
5
5
4
3

x
0
1
2
3
4
5

y
4
4
4
4
4
4

z
2
3
4
4
3
2

x
0
1
2
3
4
5

y
5
5
5
5
5
5

The Bzier surface associated with


the set P is defined by:

S(u, v) =

m X
n
X

Pij Bim (u)Bjn (v)

i=0 j=0

where B im(u) and Bjn (v) represent


the Bernstein polynomials of degrees
m and n and in the variables u and v,
respectively.

2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

z
1
2
3
3
2
1

2001 Andrs Iglesias. See:


http://personales.unican.es/iglesias

Bzier surfaces

Note that along the isoparametric lines u=u0 and v=v0, the surface
reduces to Bzier curves:
m
n
X
X
m
n

S(u0 , v) =

bj Bj (v)

S(u, v0 ) =

i=0

j=0

with control
points:

bj =

m
X

Pij Bim(u0)

ci =

i=0

Isoparametric
lines u=u0

DOMAIN

n
X

Pij Bjn(v0)

j=0

3D space

ci Bi (u)

Y
S(u,v)

Isoparametric
lines v=v0

Bzier surfaces
From the equation: S(u, v) =

m X
n
X

Pij Bim (u)Bjn (v) it is clear that each term

i=0 j=0

is obtained from a control point and the product of two univariate Bernstein
polynomials. Each product makes up a basis function of the surface. For instance:
1

Function B2

2(u).

B1

3(v):

B22(u)

0.8
0.6
0.4

0
0.25

0.2

0.5
0.75

0.2

0.4

0.6

0.8

B22(u)

0.6
0.4
0.2

B13(v)

0.4

B1

0.3

0.2

3(v)
0.5

0.25

0.1

0
0.2

0.4

0.6

0.8

0
1
0.75

2001 Andrs Iglesias. See:


http://personales.unican.es/iglesias

0.8

Bzier surfaces
BLENDING SURFACES
If a single surface does not approximate
enough a given set of points, we may
use several patches joined together.

Two Bzier patches F0 and F2 are


connected with C1-continuity by using
a Bzier F1 patch.

F0

F1

F2

BLENDING
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Rational Bzier surfaces


20

If we introduce weights wij to a nonrational Bzier


surface, we obtain a rational Bzier surface:

S(u, v) =

m P
n
P

i=0 j=0
m P
n
P

Example:

0.5

wij = 1
3

4
3

wij Bim(u)Bjn (v)

20

1.5

P ij wij Bim(u)Bjn(v)

i=0 j=0
1

0.5

20
1.5

0.5

2001 Andrs Iglesias. See:


http://personales.unican.es/iglesias

1.5

0.4

0.2

1 0.4 1
1 4 1

1 7 1
1 0.2 1

Potrebbero piacerti anche