4 bazier curves

27
G43 – Geometric Modeling Mathematical modeling of Curves Bezier curves 1 Dr.C. Paramasivam E-mail: [email protected] Curves Bezier curves

Upload: vickyvenkataraman

Post on 31-Jan-2016

223 views

Category:

Documents


0 download

DESCRIPTION

an introduction to geometric modelling

TRANSCRIPT

Page 1: 4 Bazier Curves

G43 – Geometric Modeling

Mathematical modeling of

Curves – Bezier curves

1

Dr.C. ParamasivamE-mail: [email protected]

Curves – Bezier curves

Page 2: 4 Bazier Curves

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

Course Objectives

By the end of the course, student will be able to:

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.

Page 3: 4 Bazier 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

Bezier Curves

engineer Pierre Bezier, who used them to

design automobile bodies.

Page 4: 4 Bazier Curves
Page 5: 4 Bazier Curves

Approximation approaches to the representation of

curves provide a smooth shape that approximates

the original points, without exactly passing through

all of them.

Page 6: 4 Bazier Curves

Given n+1 control points, P0, P1, P2, ….., Pn, the Bezier

curve is defined by the following polynomial of

degree n:

Conditions required:

Set of (n+1) control points.

degree n:

10)()(0

, ≤≤=∑=

uuBPuP

n

i

nii

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)

Page 7: 4 Bazier Curves

)!(!

!),(

)1(),()(,

ini

ninC

uuinCuBini

ni

=

−=−

where,

C(n, i) – Polynomial coefficientC(n, i) – Polynomial coefficient

The general equation can be expanded to give as:

n

n

n

n

nnn

uPuunnCP

uunCPuunCPuPuP

+−−+

+−+−+−=

−−

)1()1,(

..........)1()2,()1()1,()1()(

1

1

22

2

1

10

0 ≤ u ≤ 1

Page 8: 4 Bazier Curves
Page 9: 4 Bazier Curves

Quadratic Bezier curve

generation (DOC = 2)

Page 10: 4 Bazier Curves

Cubic Bezier curve generation (DOC = 3)

Page 11: 4 Bazier Curves

Some form of Bezier curves

Page 12: 4 Bazier Curves

Bezier curve with DOC 6

Page 13: 4 Bazier Curves

De Casteljau’s Algorithm

• Specify cubic curve with four control points

• Finding a point on a Bezier Curve.

Linear:

Pt = (1-t)P0 + tP1

Page 14: 4 Bazier Curves

De Casteljau Algorithm

3P

1P2

P

t

t−1

t−1 t−1

t−1t−1

t

tt

t

0P0P

t−10P

1P

2P

3P

t−1

t

t−1

t

t−1

t

10)1( tPPt +−

21)1( tPPt +−

32)1( tPPt +−

t−1

t

t−1

t

2

2

10

2)1(2)1(

Pt

tPtPt

+

−+−

3

2

21

2)1(2)1(

Pt

tPtPt

+

−+−

t−1

t

3

3

2

2

1

2

0

3

)1(3

)1(3

)1(

Pt

Ptt

tPt

Pt

+

−+

−+

ii

i

tti

=

∑ 3

3

0

)1(3

Page 15: 4 Bazier Curves

De Casteljau’s 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

Page 16: 4 Bazier Curves

De Casteljau’s 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

Page 17: 4 Bazier Curves

De Casteljau’s Algorithm

Page 18: 4 Bazier Curves

1. The first and last control points are interpolated.

2. The curve is tangent to the first and last segments ,of thecharacteristic polygon.

3. The reversing the direction of parameterization does notchange the curve shape.

4. The each control point is most influential on the curve

Characteristics of Bezier Curve

4. The each control point is most influential on the curveshape 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 polygonfixed and specifying multiple coincident points at a vertex.

6. A closed Bezier curve can simply be generated by closingits characteristic polygon or choosing Po and Pn to becoincident.

Page 19: 4 Bazier Curves

Closed Bezier curve

Page 20: 4 Bazier Curves

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.

Page 21: 4 Bazier Curves

0.6

0.8

1

1.2

P1

P3

Cubic Bezier Curve

0

0.2

0.4

0.6

0 0.5 1 1.5 2 2.5 3 3.5

P0

P2

Page 22: 4 Bazier Curves

0.8

1

1.2

B0

Shape of Bernstein function

0

0.2

0.4

0.6B1

B2

B3

Page 23: 4 Bazier Curves

Limitations

1. Lack of local control.

2. Not possible to add any control points

without modifying the degree of curves.

Page 24: 4 Bazier 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.

Page 25: 4 Bazier Curves

(a)

)0(G continuity order th

0)0(C

Order of continuity

(b)

(c)

)1(G

)2(G

continuity order st1

continuity order nd2

)1(C

)2(C

Page 26: 4 Bazier Curves

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

Page 27: 4 Bazier Curves

Additional Problems

1. Find the points on a Bezier curve which hasstarting and ending points P0(2,3) and P3(4,-3)respectively, and is controlled by P1(6,6) andP2(8,1), for u=0.2 and 0.9.

2. A cubic Bezier curve segment is described bycontrol points P (1,2), P (2,7), P (10,9) andcontrol points P0(1,2), P1(2,7), P2(10,9) andP3(9,b). Another curve segment is described byQ0(a,6), Q1(8,c), Q2(13,2) and Q3(15,2).Determine the values of a, b and c, so that thetwo curve segments join smoothly.

3. Show that the Bezier curve always touches thestarting point (for u=0) and ending point (foru=1).