Anda di halaman 1dari 27

G43 Geometric Modeling

Mathematical modeling of
Curves Bezier curves
Dr.C. Paramasivam
E-mail: cpmech@tce.edu
1

Course Objectives
By the end of the course, student will be able to:
1. Define the coordinate system for the development
of models based on input and geometry.
2. Develop and manipulate the curves and surfaces
using parametric equations.
3. Develop and manipulate the solid models using
modeling techniques.
4. Implement the transformation and projection over
the geometric models.
5. Implement the neutral file formats over 2D
wireframe models.

Bezier Curves
Bezier Curves were first developed in 1959 by
Paul de Casteljau.
They were popularized in 1962 by French
engineer Pierre Bezier, who used them to
design automobile bodies.

Approximation approaches to the representation of


curves provide a smooth shape that approximates
the original points, without exactly passing through
all of them.

Conditions required:
Set of (n+1) control points.
Given n+1 control points, P0, P1, P2, .., Pn, the Bezier
curve is defined by the following polynomial of
degree n:
n

P(u ) = Pi Bi ,n (u )

0 u 1

i =0
where
P(u) is any point on the curve
Pi is a control point, Pi = [xi yi zi]T
Bi,n are polynomials (serves as basis function for the Bezier Curve)

Bi ,n (u ) = C (n, i )u (1 u )

n i

n!
C ( n, i ) =
i!(n i )!
where,
C(n, i) Polynomial coefficient
The general equation can be expanded to give as:

P(u) = P 0 (1 u) n + P1C (n,1)u(1 u) n1 + P 2 C (n,2)u 2 (1 u) n2 + ..........


+ P n1C (n, n 1)u n1 (1 u ) + Pnu n
0u1

Quadratic Bezier curve


generation (DOC = 2)

Cubic Bezier curve generation (DOC = 3)

Some form of Bezier curves

Bezier curve with DOC 6

De Casteljaus Algorithm
Specify cubic curve with four control points
Finding a point on a Bezier Curve.
Linear:
Pt = (1-t)P0 + tP1

De Casteljau Algorithm
P1

1 t

t 1 t

1 t

t
P2
1 t
t
t

1 t

P3
P0

1 t
t

P1

1 t
t

( 1 t ) P1 + tP 2

( 1 t ) 2 P 0 + 2 ( 1 t ) tP 1
+ t2P

1 t

1 t
t

( 1 t ) P 2 + tP 3

+ t2P

(1 t ) 3 P 0
+ 3 ( 1 t ) 2 tP 1
+ 3 (1 t ) t 2 P 2
+ t3P

( 1 t ) 2 P1 + 2 ( 1 t ) tP 2

1 t

P3

( 1 t ) P 0 + tP 1

1 t
t

P2

P0

i= 0

3
( 1 t ) i t 3 i
i

De Casteljaus Algorithm (cont)


Specify cubic curve with four control points
Finding a point on a Bezier Curve.
Quadratic:
Pt = (1-t)[(1-t)P0 + tP1] +
t[(1-t)P1 + tP2]
= (1-t)2P0 +2t(1-t)P1 + t2P2

De Casteljaus Algorithm (cont)


Specify cubic curve with four control points
Finding a point on a Bezier Curve.
Cubic:
Pt = (1-t)((1-t)2P0 + 2t(1-t)P1 + t2P2)+
t((1-t)2P1 + 2t(1-t)P2 + t2P3)
= (1-t)3P0 + 3t(1-t)2P1 +
3t2(1-t)P2 +t3P3

De Casteljaus Algorithm

Characteristics of Bezier Curve


1. The first and last control points are interpolated.
2. The curve is tangent to the first and last segments ,of the
characteristic polygon.
3. The reversing the direction of parameterization does not
change the curve shape.
4. The each control point is most influential on the curve
shape at u = i/n.
5. The curve shape can be modified by either changing one
or more vertices of its polygon or by keeping the polygon
fixed and specifying multiple coincident points at a vertex.
6. A closed Bezier curve can simply be generated by closing
its characteristic polygon or choosing Po and Pn to be
coincident.

Closed Bezier curve

7. For any valid value of u, the sum of the Bi,n functions


associated with the control points is always equal to unity for
any degree of Bezier curve.
8. The curve lies entirely within the convex hull of its control
points.

Cubic Bezier Curve


1.2

P1

P3

0.8

0.6

0.4

0.2

P2
P0

0
0

0.5

1.5

2.5

3.5

Shape of Bernstein function


1.2
1
0.8
0.6
0.4
0.2
0

B0
B1
B2
B3

Limitations
1. Lack of local control.
2. Not possible to add any control points
without modifying the degree of curves.

Continuity
Parametric continuity (CX)
1. Zero order continuity
Positional continuity

2. First order continuity


Tangential continuity

3. Second order continuity


Curvature continuity

Geometric continuity (Gx)


Only directions of the curve segments have to match.

Order of continuity
G ( 0)

C (0)

0 th order continuity

(a)

G (1)

C (1)

1st order continuity

( 2)

2nd order continuity

(b)

(2)

C
(c)

Find the equation of the Bezier curve which passes through (0,0) and
(-4,2) and controlled through (14,10) and (4,0).

Required Equation

Additional Problems
1. Find the points on a Bezier curve which has
starting and ending points P0(2,3) and P3(4,-3)
respectively, and is controlled by P1(6,6) and
P2(8,1), for u=0.2 and 0.9.
2. A cubic Bezier curve segment is described by
control points P0(1,2), P1(2,7), P2(10,9) and
P3(9,b). Another curve segment is described by
Q0(a,6),
Q1(8,c),
Q2(13,2)
and
Q3(15,2).
Determine the values of a, b and c, so that the
two curve segments join smoothly.
3. Show that the Bezier curve always touches the
starting point (for u=0) and ending point (for
u=1).

Anda mungkin juga menyukai