You are on page 1of 22

GOVT. ENGG.

COLLEGE,
BHUJ
BRANCH :- MECH (6th Sem)
DIV :- A
SUBJECT :- Computer Aided
Design
TOPIC :- Beizer Curves & Splines
PREPARED BY :- SAGAR
GOSWAMI

Introduction
In Engineering, one often wants a smooth
curve through a set of known points.
In Physics, a smooth curve is required to
represent the shape of a deflected beam.
Computer Aided Design and
Manufacturing programs like lines and
circular arcs.
Lots of things cannot be conveniently
described by lines and circular arcs.

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

Quadratic Bzier Curves


Given three points P0, P1, and P2, a quadratic
Bzier curve is the path traced by the parabolic
function:

x(t ) P0 (1 t ) 2 P1t (1 t ) P2t


2

where 0 t 1

Quadratic Bzier Curve


Given points
P0, P1, P2.

Quadratic Bzier Curve


Given points
P0, P1, P2.
Construct a
line from
(1-t)P0 + tP1 to
(1-t)P1 + tP2

Quadratic Bzier Curve


Given points
P0, P1, P2.
Construct a
line from
(1-t)P0 + tP1 to
(1-t)P1 + tP2

The point, x,
is on the
curve.

Quadratic Bzier Curve


Given points
P0, P1, P2.
Construct a
line from
(1-t)P0 + tP1 to
(1-t)P1 + tP2

The point, x,
is on the
curve.

Bzier Curve Advantages


3 points uniquely determine a parabola.
Its easy to calculate points.
The numerical algorithm is stable. (i.e.
given reasonable input, the algorithm
wont blow up.)

Cubic Bzier Curve


Extending this method to use four points, we can
construct a cubic curve.

(1-t)3P0 + 3t(1-t)2P1 + 3t2(1-t)P2 + t3P3

In General
To construct an nth degree Bezier curve, you
need n+1 control points.
The formula for a point on the curve is:

n
i n i
x(t ) (1 t ) t Pi
i 0 i
n

Recursion
Pseudo code for recursive technique:
makeBezier(Control Points)
If points are collinear enough
Output last point

Else
Subdivide points
makeBezier(Left Control Points)
makeBezier(Right Control Points)

End If

Bezier Splines
We typically want a smooth curve that
passes though a set of points.
Problem: The first and last control points
are the only ones guaranteed to be on a
Bezier Curve.
A Solution: Use Bezier Splines, which are
composite (i.e. piecewise) Bezier Curves.
But then we need to compute control points.

Cubic Bezier Splines


We could make splines from Bezier curves
of any degree.
We choose cubic (degree = 3) curves for
the following reasons:
In modeling the bending of beams because of the "bending
moment" (which is related to equilibrium) is proportional to the
second derivative (i.e. C2) of the displacement function and to
be physically valid there must be bending moment continuity
from one element to the next.
Cubic polynomials allow for inflection points.
The computations arent horrible.

P1
P3

P4

P2
P0

b0,2

P1=b0,3=b1,0
P3

P4

b0,1
P2
P0=b0,0

Computing Control Points


Condition: C0 continuity
Each curve has to start where the previous one ends.

In general,

Pi ,3 Pi 1, 0
Or

xi (1) xi 1 (0)

0 i n 1

Computing Control Points


Condition: C1 continuity
The slopes have to match at the common endpoints.
So set first derivatives equal.

xi (t ) Pi (1 t )3 3bi ,1t (1 t ) 2 3bi , 2t 2 (1 t ) Pi 1t 3


2

xi (t ) 3Pi (1 t ) ...

xi(1) xi1 (0) bi , 2 bi 1,1 2 Pi

Computing Control Points


Condition: C2 continuity
Provides better smoothing.
Gives us a unique solution.

xi(1) xi1 (0) bi ,1 2bi , 2 2bi 1,1 bi 1, 2 0


Arbitrarily let

x0(0) xn1 (1) 0


2bi ,1 bi , 2 0 and bn 1,1 2bn 1, 2 0

Computing Control Points


2
0

1 0
1 1

1 2

0 0
0 0

0 0
0 0

0 0

0
0

2 1
0 1
1 2
0 0
0 0
0 0

0
0

0
0

0
0

0
0

b0,1
b
0, 2
b1,1

b1,1

0
2P
1

0
0 0
0 0

1 0
0 0
2 P2

2 1 0 0 b2,1 0

0 1
1 0 b2,1 2 P3
1 2 2 1 b3,1 0

0 0 1 2 b3,1 0

Further Direction(s)
B-splines provide local control over the
spline, we think.

Thank You
For watching our presentation

You might also like