Professional Documents
Culture Documents
Introduction
RepresentingCurves
Anumberofsmalllinesegmentsjoined
Interpolation
Parametricequations
Typesofcurvewestudy
NaturalCubicSplinesandBezierCurves
Derivation
Implementation
Artists representation
Clay / wood models
Digitizing
Surface modeling (body in white)
Scaling and smoothening
Tool and die Manufacturing
Curve representation
Problem: How to represent a curve easily
and efficiently
Brute force and ignorance approaches:
storing a curve as many small straight line
segments
doesnt work well when scaled
inconvenient to have to specify so many points
need lots of points to make the curve look smooth
Solution - Interpolation
Define a small number of
points
Use a technique called
interpolation to invent the
extra points for us.
Join the points with a series of
(short) straight lines
Requirements
Local control
A solution
Use SEVERAL polynomials
Complete curve consists of several pieces
All pieces are of low order
Third order is the most common
x1,y1
(13,8)
(7.5,4)
P0
x0 ,y0
(2,3)
dx
dy
Walk from P0 to P1 at a
constant speed.
Start from P0 at t=0
Arrive at P1 at t=1
dx = x1 - x0
dy = y1 - y0
Where are you at a general
time t?
Equation(s) of a straight
line as a function of an x(t) = x0 + t.dx
arbitrary parameter t.
y(t) = y0 + t.dy
n-dimensional
Splines
Define the knots
(x0,y0) - (x3,y3)
spline
knots
Splines - History
Draftsman use ducks and
strips of wood (splines) to
draw curves
And pass through the control
points
A Duck (weight)
V0
V5
V1
Interpolation
V3
V4
V2
Approximation
V4
V3
V0
V6
V1
V2
V5
Hermite Spline
Say the user provides x0 , x1 , x0 , x1
A cubic spline has degree 3, and is of the form:
x at 3 bt 2 ct d
For some constants a, b, c and d derived from the control
points, but how?
We have constraints:
Hermite Spline
A Hermite spline is a curve for which the user provides:
The endpoints of the curve
The parametric derivatives of the curve at the endpoints
The parametric derivatives are dx/dt, dy/dt, dz/dt
That is enough to define a cubic Hermite spline, more
derivatives are required for higher order curves
Hermite Spline
Solving for the unknowns gives:
a 2 x1 2 x0 x1 x0
b 3x1 3x0 x1 2 x0
c x0
d x0
Rearranging gives:
x x1 ( 2t 3 3t 2 )
x0 ( 2t 3 3t 2 1)
x1 (t 3 t 2 )
x0 (t 3 2t 2 t )
or
x x1
x0
x1
2 3 0
2 3 0
x0
1 1 0
1 2 1
0 t 3
1 t 2
0 t
0 1
Basis Functions
A point on a Hermite curve is obtained by
multiplying each control point by some function
and summing
The functions are called basis functions
1.2
0.8
0.6
0.4
0.2
-0.2
-0.4
x1
x0
x'1
x'0
Bezier Curves
Analternativetosplines
M.BezierwasaFrenchmathematicianwhoworked
fortheRenaultmotorcarcompany.
He invented his curves to allow his firms
computerstodescribetheshapeofcarbodies.
Bezier Approximation
How to provide R1 and R4 ?
R1
P2
P3
R4
P4
P4
P1
P1
Bezier curves
Typically, cubic polynomials
Similar to Hermite interpolation
Special way of specifying end tangents
Requires special set of coefficients
Bezier curves
Control polygon: control points connected to each
other
n!
i
n i
Bin (t )
.t .(1 t )
i!(n i )!
x(t ) xi .Bin (t )
i 0
n
y (t ) yi .Bin (t )
i 0
P1
P3
Disadvantages
The degree of the Bezier curve depends on the
number of control points.
The Bezier curve lacks local control. Changing
the position of one control point affects the entire
curve.
Bezier Surface
S u , v B (u ) B (v ) Pij
i 0 j 0
n
i
m
j
B-splines
Simple B - spline, n 1 points, degree d :
n
p(t ) N i ,d (t )p i , 0 t n d 1, with
i 0
N i ,d (t ) defined recursively :
N i ,0 (t ) 1
if i d t i d 1
0 otherwise
N i ,d (t )
(t i d ) N i ,d 1 (t )
d
(i 1 t ) N i 1,d 1 (t )
d
32
End Of Curves