Anda di halaman 1dari 20

Department of Applied Mathematics and Computational Sciences University of Cantabria UC-CAGD Group

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

COMPUTER-AIDED GEOMETRIC DESIGN AND COMPUTER GRAPHICS:

BEZIER CURVES AND SURFACES


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

Bzier curves
BEZIER CURVES

Let P={P0,P1,...,Pn} be a set of points P i IR d, d=2,3.


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

The Bzier curve associated with the set P is defined by: n n Pi Bi (t) i=0
n where B i (t) represent the Bernstein polynomials, which are given by: n n B i (t) = (1 t) ni ti i i = 0, . . . , n

Bzier curve with n=5

(six control or Bzier points)

n being the polynomial degree.

Bernstein polynomials Bi4(t)

Bzier curves
Control polygon
6 4

Control points
6 4

-2 1 2 3 4 5 6 7

-2 1 2 3 4 5 6 7

Bzier curve

7 control points

n=6
n

-2 1 2 3 4 5 6 7

PiB in(t)
i=0

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

Bernstein polynomials
Given by:
n Bi (t)

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

Properties: Extreme values:

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 Simmetry: Bin(t) = Bn-in(1-t) Bin(1)= Bin(0)=0
n i=0 n Bi (t)=1

Normalizing property:

Maxima: Bin(t) attains exactly one maximum on the interval [0,1], at t=i /n.

Properties of the Bzier curves


6
6 4

4
2

2
0

-2 1 2 3 4 5 6 7

-2 1 2 3 4 5 6 7

Control polygon

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.
(4,4) (2,4) (2,2)

Control point traslation.


(2,4)

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.
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.

Intersections Curve: 0 Polygon: 2 Curve: 1 Curve: 2 Polygon: 2 Polygon: 2

For a three-dimensional Bzier curve, replaces the words straight line with the word plane.

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 .
Left-hand side: 4 control points
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

t=0.4
Subdivided curve: 7 control points
4

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 P + (1- 1 ) P Qi = i-1 i n+1 n+1


Original cubic curve: 4 control points
4 4

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


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
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias
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 3 4 5 6 3 4 5 6 4 3.5 3 2.5 2 1.5 1 0.5 2 3 4 5 6 3 4 5 6 4 3.5 3 2.5 2 1.5 1 0.5 2 3 4 5 6 4 3.5 3 2.5 2 1.5 1 0.5 2 3 4 5 6 4 3.5 3 2.5 2 1.5 1 0.5 2 3 4 5 6 4 3.5 3 2.5 2 1.5 1 0.5 2 3 4 5 6 4 3.5 3 2.5 2 1.5 1 0.5 2 3 4 5 6

Rational Bzier curves


There are a number of important curves and surfaces which cannot be represented faithfully using polynomials, namely, circles, ellipses, hyperbolas, cylinders, cones, etc. All the conics can be well represented using rational functions, which are the ratio of two polynomials.
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias

Rational Bzier curve

R(t) =

i=0 n

Pi wi Bin (t) wi Bin(t)

wi

weights

i=0

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

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


Changing the weights:
4

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

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

1 1
2 3 4 5 6

1 1
2 3 4 5 6

0.3

0.1

1 1
2 3 4 5 6

1 1
2 3 4 5 6

Rational Bzier curves


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

1 1 1 1 1 1

Moving a control point: a nonrational Bzier curve with a change in one control point. 1 1 1 1 Original curve Final curve 4 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 w1 =2

hyperbola

w1 =1 w1 = 1
3

parabola elipse

Rational Bzier curves


Example: the circle
1.75 1.5 1.25 1

1/2 (1, 3)

1 (3/2, 3/2)
2001 Andrs Iglesias. See: http://personales.unican.es/iglesias
0.5

(1/2, 3/2)
0.75 0.5 0.25

(0,0) 1

(1,0)

1.5

(2,0) 1

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)
The Bzier surface associated with the set P is defined by:
m n n Pij Bim (u)Bj (v) i=0 j=0

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

z 1 2 3 3 2 1

S(u, v) =

m n where B i (u and Bj (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

Bzier surfaces
n m

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

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

S(u0 , v) =
j=0

n bj Bj (v)

S(u, v0 ) =
i=0

m ci Bi (u)

with control points:

bj =
i=0

Pij Bim(u0)
Z

ci =
j=0

n Pij Bj (v0)

Isoparametric lines u=u0

DOMAIN

3D space

Y S(u,v)

Isoparametric lines v=v0

Bzier surfaces
m n

From the equation: S(u, v) =


i=0 j=0

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

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):
0 0.25 0.5

0.8 0.6 0.4 0.2

B22(u)

0.75 1

0.2

0.4

0.6

0.8

B22(u)
B13(v)

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

0.8 0.6 0.4 0.2

0.4

0.3

B1
0.25 0

3(v)
0.5

0 1 0.75

0.2

0.1

0.2

0.4

0.6

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


If we introduce weights wij to a nonrational Bzier surface, we obtain a rational Bzier surface:
m n n P ij wij Bim(u)Bj (v) n wij Bim(u)Bj (v)
0 20 1.5 1 0.5 0 1 2

wij = 1
3 4 3

S(u, v) =

i=0 j=0 m n

i=0 j=0

Example:
0.5 0

20 1.5 1 1 2

20 1.5 1 1 2

3 4
0

0.5

0.2

3 4 3

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

0.4 1 1
0 1

7 1 1
0

1 0.4 1 1 4 1

1 7 1 1 0.2 1

Anda mungkin juga menyukai