Vous êtes sur la page 1sur 26

Mathematical Representation of

Curves Curves
ME C382: COMPUTER AIDED DESIGN
1
Disadvantages of Non-parametric Representations
Explicit non-parametric representation can not be used for
closed curves (like circles) and multi-valued curves (like
parabolas). Because it is a one-to-one relationship.
The above problem is overcome by implicit representation but
the latter is laborious.
Implicit representation requires that two surface equations be
solved for y and z for a given value of x
Infinite slope situations can not be dealt with in computer Infinite slope situations can not be dealt with in computer
program
Shapes of most objects are coordinate system independent.
2
Parametric Representation: Advantages
It overcomes all difficulties of the non-
parametric representations
It allows multi-valued and closed functions to
be easily defined
It replaces the use of slopes with that of It replaces the use of slopes with that of
tangent vectors
The equations are polynomials and thus
computationally more suitable than equations
involving roots
3
PARAMETRIC CURVES
PARAMETRIC CUBIC CURVE
HERMITE CURVE
4
PARAMETRIC CURVES
Classification
Plane Curves & Space Curves
Eg Circle v/s Helix
Curves of Known Form & Free Form Curve Curves of Known Form & Free Form Curve
Circle v/s Bezier Curve
Interpolation curve v/s Approximation curves
Hermite Curves v/s Bezier curve
5
Parametric Form of a Curve
In parametric form, each point on a curve is
expressed as a function of a parameter u.
The parameter acts as a local coordinate for
points on the curve
The parametric equation for a 3-D curve in space
is is
P(u) = [ x y z]
T
= [ x(u) y(u) z(u)]
T
,
u
min
u u
max
Coordinates of a point on the curve are the
components of its position vector.
6
PARAMETRIC REPRESENTATION OF LINES
1 2 1
1 2 1
1 2 1
1 0
) (
) (
) (
to equivalent is This
1 0 ) P P ( P P
: 1

+ =
+ =
+ =
+ =
u
z z u z z
y y u y y
x x u x x
u u
Method
1
1
1 2 1
P P
by given is and parameter the like act will itself
n

P P
: 2
) (
=
+ =

)
+ =
L
L
L L
Method
z z u z z
7
Circle
The parametric equation of a circle (in the x-y plane)
is
x = x
c
+ R cos(u)
y = y
c
+ R sin(u) 0 u 2
z = z z = z
c
Thus, determination of the radius (R) and center of the
circle (x
c
, y
c
) is necessary (and is sufficient) for
parametric representation of a circle.
8
u=0
u=2
P
c
=(x
c
, y
c
, z
c
)
P=(x, y, z)
P
n
=(x
n
, y
n
, z
n
)
P
n+1
=(x
n+1
, y
n+1
, z
n+1
)
u=
u
9
P
c
=(x
c
, y
c
, z
c
)
P
c
u=3/2
Computation Of Parametric Circle For Computer Display
x = x
c
+ R cos(u)
y = y
c
+ R sin(u) 0 u 2
z = z
c
x
n+1
= x
c
+ R cos(u+u)
y
n+1
= y
c
+ R cos(u+u)
z
n+1
= z
n
Expanding the trigonometric terms and simplifying Expanding the trigonometric terms and simplifying
x
n+1
= x
c
+ (x
n
x
c
) cos(u) - (y
n
y
c
) sin(u)
y
n+1
= y
c
+ (y
n
y
c
) cos(u) + (x
n
x
c
) sin(u)
z
n+1
= z
n
Trigonometric terms have to be calculated only once for
a given u.
10
Ellipse
Two cases of ellipses
we will consider:
Basic Ellipse, = 0
General Ellipse, 0

General Ellipse, 0
11
Basic Ellipse
P
x = x
c
+ A cos(u)
y = y
c
+ B sin(u) 0 u 2
z = z
c
12
u
P
Ellipse
x = x
c
+ A cos(u)
y = y
c
+ B sin(u) 0 u 2
z = z
c
P=(x, y, z)
P
n
=(x
n
, y
n
, z
n
)
u
P
n+1
=(x
n+1
, y
n+1
, z
n+1
)
13
u=0
u=2
P
c
=(x
c
, y
c
, z
c
)
P
c
u=3/2
u=
Computation Of Parametric Basic Ellipse For Computer Display
x
n+1
= x
c
+ (x
n
x
c
) cos(u) (A/B)(y
n
y
c
) sin(u)
y
n+1
= y
c
+ (y
n
y
c
) cos(u) + (A/B)(x
n
x
c
) sin(u)
z
n+1
= z
n
14
PARAMETRIC REPRESENTATION OF SYNTHETIC
CURVES
15
What are synthetic curves?
Synthetic curves represent a curve fitting problem to
construct a smooth curve that passes through given data
points. Polynomials are the typical forms.
Synthetic curves take up where the analytic curves leave
the latter are not that efficient at geometric design of
mechanical parts
Some examples of complex geometric design are:
Car bodies
Ship hulls Ship hulls
Airplane fuselage and wings
Propeller blades
Shoe insoles
Aesthetically designed bottles
16
They are to be made by free-form curves and surfaces.
Need for synthetic curves?
Need for synethetic curves arises in
two occassions:
When a curve is represented by a
collection of measured data points, and
When an existing curve must change to
meet new design requirements the meet new design requirements the
designer needs a curve representation
that is directly related to the data
points and is flexible enough to bend,
twist or change the shape by changing
one or more data points.
17
Most commonly used Synthetic Curves
Hermite Cubic Spline
Each curve segment is defined for only 2 control points; It passes
through the control points and therefore it is an interpolant
It has only upto C
1
continuity
Bezier Curve
It does not pass through the control points but only approximates It does not pass through the control points but only approximates
the trend
It also has only upto C
1
continuity
B-Spline Curve
It is also most generally an approximator; an interpolating B-Spline
is also sometimes possible
It has upto C
2
continuity
18
Hermite Cubic Spline Curve Segment
They are used to interpolate the given data but
not to design free-form curves.
(Cubic) Splines derive their name from French
curves or splines
Hermite cubic spline is one type of general
parametric cubic spline with degree equal to 3
and being determined by two data points and
tangent vectors at the data points. tangent vectors at the data points.
Hermite Cubic Spline can be a 3-D planar curve or
3-D twisted curve.
Algebaric Form
Geometric Form
Four Point Form
19
Parametric Equation of Hermite Cubic Spline Segment
parameter
1 0 , ) (
3
0
=
=

= i
i
i
u
u u C u P
ts coefficein algebraic) (or Polynomial
parameter
=
=
i
C
u
20
form matrix In
) (
form vector expanded In
) (
) (
) (
as written is equation this form scalar In
0 1
2
2
3
3
0 1
2
2
3
3
0 1
2
2
3
3
0 1
2
2
3
3
+ + + =
+ + + =
+ + + =
+ + + =
C u C u C u C u P
C u C u C u C u z
C u C u C u C u y
C u C u C u C u x
z z z z
y y y y
x x x x
[ ] [ ]
vector ts Coefficien ] [
] [ and 1 ] [
where
] [ ] [ ) (
form matrix In
0 1 2 3
2 3
=
= =
=
C
C C C C C u u u U
C U u P
T T
T
21
2 3
: giving , 1 at , and 0 at , , conditions boundary the Applying
. and endpoints two th the segment wi curve spline cubic he Consider t
1 0 , ) (
is point any at curve the ector to tangent v The
1 2 3 1
1
1 1
1
3
0
1
C C C P
C C C C P
C P
C P
u P P u P P
P P
u iu C u P
o
o
o o
o o
o
i
i
i
+ + =

+ + + =
=

=
=

( ) ( )
( )
( ) ( ) ( ) ( )
ts. coefficien geometric as called are and , ,
u - u u 2u - u 3u 2u - 1 3u - 2u ) (
g rearrangin and equation parametric in the ng Substituti
2
2 3
ts coefficien for the usly simultaneo equations four the Solving
2 3
1 1
1
2 3 2 3
1
2 3 2 3
1 1 3
1 0 1 2
1
1 2 3 1
P P P P
P P P P u P
P P P P C
P P P P C
P C
P C
C C C P
o o
o o
o o
o
o
o o

+ + + + + =

+ =

=
=
+ + =

22
( ) ( ) ( ) ( )
[ ]
functions. blending called are These
u - u (u) F
u 2u - u (u) F
3u -2u (u) F
1 3u - 2u (u) F
vector condition boundary or t vector coefficien geometric ] [
u - u u 2u - u 3u 2u - 1 3u - 2u ) (
2 3
4
2 3
3
2 3
2
2 3
1
1 1
1
2 3 2 3
1
2 3 2 3

=
+ =
+ =
+ =
=

=

+ + + + + =
P P P P V
P P P P u P
o o
o o
matrix Hermite ] [M
1 0 ][V], [M [U] (u)
P (u) F P (u) F P (u) F P (u) F (u) P
H
H
T
1 4 0 3 1 2 0 1
=
=

+ + =
)
u P
23
0 0 0 1
0 1 0 0
1 2 3 3
1 1 2 2
] [ matrix Hermite M
H
(
(
(
(

= =
24
] ][ [ C obtain we
], ][ [ ] [ ) ( and ] [ ] [ ) ( Comparing
V M
V M U u P C U u P
H
H
T T
=
= =

[ ]
[ ]
( ) ( ) ( ) ( )

+

+ + + + =

(
(
(
(

=
=

2 3 1 4 3 6 6 6 6 ) (
as written is ector tangent v the Similarly
0 1 2 3
0 1 0 0
1 1 1 1
1 0 0 0
] [ ] [
1
2 2
1
2 2
1
1
o o
H
H
P u u P u u P u u P u u u P
M
C M V
25
( ) ( ) ( ) ( )
(
(
(
(

=
=

+ + + + =

0 1 0 0
2 4 6 6
3 3 6 6
0 0 0 0
] [
where
] [ ] [ ] [
2 3 1 4 3 6 6 6 6 ) (
1 1
u
H
u
H
T
o o
M
V M U
P u u P u u P u u P u u u P
Example 1
Find the equation of a Hermite Cubic Spline
that passes through the points (1,2) and (3,4)
and whose tangent vectors are two lines
connecting these two points with point (2,7). connecting these two points with point (2,7).
26