You are on page 1of 33

Mathematical

Representation of
Curves
Oneil Josephs
Lecturer
School of Engineering
Curve Classification
 Analytical Curves
 Defined by an algebraic equation and its
coefficients.

 Free-form Curves
 No algebraic equation – A curve is drawn to fit the
shape of interest.
Forms of Analytical Equations
 Parametric Equation

x  R cos  , y  R sin  , z  0 (0    2 )

 Implicit polynomial form


x2  y 2  R2  0, z0

 Explicit polynomial form

y R x , z0
2 2
Conic Sections
 The curves, or portion of the curves, obtained
by cutting a cone with a plane are referred to
as conic sections.

 Based on the location and orientation of the


cutting plane with respect to the cone.
The Circle

x  R cos   X c
y  R sin   Yc
The Ellipse
x  a cos  x2 y 2
y  b sin  2
 2 1  0
a b
z0
The Parabola

y  4ax  0
2
The Hyperbola
2 2
x y
2
 2 1  0
a b
The Hyperbola
Normal and Tangent Lines
Worked Example 1
Worked Example 2
Free Form Curves
 Always represented by parametric polynomial
equations.

x  f t  , y  g t  , z  h t  .

 All three functions are polynomials of the


same degree.
Free Form Curves Contd.
 To design a free-form curve, it is necessary to find
the coefficients of the general polynomial equations.

 In engineering design, a third-degree polynomial will


satisfy most of the applications.

 A third-degree polynomial curve is also called a


cubic curve.
Free Form Curves Contd.
 A general cubic parametric curve has the
following form:

x  axt  bxt  cxt  d x


3 2

y  a y t  by t  c y t  d y
3 2

z  az t  bz t  cz t  d z
3 2
Free Form Curves Contd.
 Vector form
 x
r   y 
 z 
t 3  t 3 
 ax bx cx dx   2   2
r   a y d y     a b c d     AT
t t
by cy
t  t 
 az bz cz d z     
1 1
 T is called the power basis vector and A is the
coefficient matrix.
Free Form Curves Contd.
 Tangent Property
 Import in designing the curve.
 Derived by taking the first derivative of the polynomial
equation

dr  t 
r t    3at  2bt  c
2

dt
 Vector Form 3t 2 
 
dr dT  2t 
r A A
dt dt 1
 
0
Free Form Curves Contd.
 Curve Design
 To design a curve is to determine its
coefficients.

 Curve Design methods


 Ferguson’s Curve
 Bezier’s Curve
 B-Spline Curve
 NURBS
Free Form Curves Contd.
 Ferguson’s Curve

 Controls the starting point, the endpoints, and the


tangents at those two points.

 A curve connected in this manner has first-degree


continuity.

 When a curve is first-degree, continuous it is


connected. There is no guarantee, however, that the
curve is smooth.
Two Curves – Connected but
not Smooth
A Ferguson Curve Segment
 A Ferguson (Hermite) curve is constructed by
defining:
 Two endpoints: P0, P1
 End tangent vectors: t0, t1

P0  r  0  ; P1  r 1
t 0  r  0  ; t1  r 1
A Ferguson Curve Segment
 Coordinates of the Points
 2 3 0 1  t 3 
 2 3  
0 0  t 2 
r  t   AT   P0 P1 t 0 t1   , 0  t 1
 1 2 1 0  t 
  
 1 1 0 0  1 
 Tangents
 2 3 0 1  3t 2 
 2 3  
dT 0 0   2t 
r t   A   P0 P1 t 0 t1  
dt  1 2 1 0  1 
  
 1 1 0 0  0 
Worked Example
 2 3 0 1  t 3 
   
0  t 2 
0 4 1 1
   2 3 0
r  t   0 0 4 4 
 1 2 1 0  t 
0 0 0 0    
 1 1 0 0  1 
t 3 
 6 9 1 0   2 
  0 4 4 0   
t
t 
 0 0 0 0   
1
 6t 3  9t 2  t 
 
  4t 2  4t 
 0 
 
Worked Example
 2 3 0 1  3t 2 
0 4 1 1    
  2 3 0 0   2t 
r  t   0 0 4 4  
 1 2 1 0  1 
0 0 0 0    
 1 1 0 0  0 
3  0.12 
 6 9 1 0   
2  0.1 
  0 4 4 0  
 1 
 0 0 0 0   
 0 
 2.62 
  3.2 
 0 
Free Form Curves Contd.
 Bezier’s Curve

 One shortcoming of a Ferguson curve is that it is


difficult to determine the tangents that will yield a
desired shape.

 The most popular curve design method used in


graphics packages and CAD systems.

 Defined by the vertices of polygon that enclose the


resulting curve.
Bezier Curves of Different
Degrees
A Bezier Curve Segment
 The cubic Bezier
curve is a cubic
curve defined by
four control points
A Bezier Curve Segment
 Coordinates of the Points
 1 3 3 1  t 3 
 3 6 3  
0  t 2 
r  t    P0 P1 P2 P3   , 0  t 1
 3 3 0 0 t  
  
1 0 0 0  1 
 Tangents

 1 3 3 1  3t 2 
 3 6 3  
0   2t 
r  t    P0 P1 P2 P3  
 3 3 0 0  1 
  
1 0 0 0  0 
Worked Example
 1 3 3 1  t 3 
 3 4 8 10    
   3 6 3 0  t 2 
r  t   0 0 0 0 
 3 3 0 0  t 
1 4 4 1    
1 0 0 0  1 
t 3 
 5 9 3 3   2 
  0 0 0 0   
t
t 
 0 9 9 1   
1
 5t 3  9t 2  3t  3
 
 0 
 9t 2  9t  1 
 
Free Form Curves Contd.
 B-Spline Curve
 Very popular because they offer more flexibility than
Bezier curves.

 The Bezier curve properties have two drawbacks.

 First, when a curve of a complicated shape is represented,


inevitably many control points are used

 Second, modifying the shape of a curve locally is difficult.


Free Form Curves Contd.
 B-Spline Curve
 Cox and de Boor suggested the blending functions Ni, k(u)
defined by the recursive formulas

 u  ti  Ni ,k  u   ti k  u  Ni 1,k 1  u 
Ni ,k  u   
ti  k 1  ti ti  k 1  ti

1 t i  u  ti 1
Ni ,1  u   
0 otherwise
Free Form Curves Contd.
 B-Spline Curve
 The curve based on these blending functions is called the
B-Spline curve and is expressed as:

n
P  u    Pi N i ,k  u   tk 1  u  tn1 
i 0
Free Form Curves Contd.
 NURBS
 A nonuniform rational B-spline curve

 Similar to a nonuniform B-spline curve in that it uses


the same blending functions derived from the
nonuniform knots as those of nonuniform B-spline
curves.

 A NURBS curve is defined by its control points, knot


spacing, and weights.

 NURB is flexible and complex to use. However, it can


best fit a complex shape.