Professional Documents
Culture Documents
Curves: Foundation of Free-Form Surfaces
Curves: Foundation of Free-Form Surfaces
Curves: Foundation of Free-Form Surfaces
T T
P (u) = [ x(u), y(u), z(u)] P ( u , v ) =
x ( u , v ) , y ( u , v ) , z ( u , v )
u=const
Umax
--
p(x,y,z) n v=const
Umin --
p(u) y
We can represent any functions of curve (curved surface) using parametric equation.
Parametric Representation of Lines
How is a line equation converted by the CAD/
CAM software into the line database?
How are the mathematical equation correlated
to user commands to generate a line?
y P = P1 + u( P2 - P1 ), 0 u 1
x
Lines
z P2-P1 P2, u=1
P
P1,
u=0
P P2
P1
y
P = P1 + u( P2 - P1 ), 0 u 1
x
x = x1 + u ( x2 x1 )
y = y1 + u ( y2 y1 ) 0 u 1
z = z + u ( z z )
1 2 1
Circle
Representation 1 (Non-parametric)
x2 + y2 = 1
(a) x=u
y= 1! u2
(b) x = cos u /8
y = sin u
u
better definition than (a)
but still slow 0
Pn+1
Circle
Pn
Representation 3 (parametric)
x = xo + A cos
y = yo + B sin 0 2
z = z
o
2
explicit x = cy
x = xo + Au 2
parametric
y = yo + 2 Au 0u
z = z
o
Hyperbola
2 2
x y
implicit
2
2 =1
a b
x = a cosh u
parametric y = b sinh u 0u
z = z
o
Parametric Representation of
Synthetic Curves
Analytic curves are usually not sufficient to meet geometric
design requirements of mechanical parts.
Many products need free-form, or synthetic curved
surfaces.
Examples: car bodies, ship hulls, airplane fuselage and
wings, propeller blades, shoe insoles, and bottles
The need for synthetic curves in design arises on
occasions:
when a curve is represented by a collection of measured
data points and (generation)
when a curve must change to meet new design
requirements. (modification)
The Order of Continuity
The order of continuity is a term usually used to measure
the degree of continuous derivatives (C0 , C1 , C2).
y y
i=2 i=2
i=1 i=1 i=3
i=3
x x
Simplest Case Linear Segment High order polynomial may lead to ripples
(2) (3)
(1) (4)
y
x
'' M (x ) ai x + bi
y (x ) = R (x ) = =
EI EI
1 ai 3 bi 2
y (x ) = x + x + ci x + d i Cubic Spline
EI 6 2
Drafting Spline
Hermite Cubic Splines
T
P(u ) = [x(u ), y (u ), z (u )]
Cubic Spline
x(u ) = c3 xu 3 + c2 xu 2 + c1xu + c0 x x
3 2
34 = 12
y (u ) = c3y u + c2y u + c1 y u + c0 y y coefficients to
z (u ) = c u 3 + c u 2 + c u + c z be determined
3z 2z 1z 0z
!" T ! i
3
p u = !" x u y u
() () () () #
z u $ = % Ci u (0 & u & 1)
i=0
! C! #
' !3 (
' C ( !
! 3 2 #
= "u u u 1$ ' !2 T
( = [U ][C]
' C1 (
' ! (
'" C0 ($
Hermite Cubic Splines
i 3 2 1
3
P = Ci u = C3u + C2u + C1u + C0
i =0 !" , ! 2 ! !
P = 3C3u + 2C2u + C1
P0 = C0
u=0 '
Two P0 = C1 43 equations
End ! ! ! ! ! ! from two
Points # P1 = C3 + C2 + C1 + C0
u =1 " !' ! ! ! control points
#$ P1 = 3C3 + 2p0
C2 + C1
r
--
Boundary Conditions:
P0 '
Location of the two
u=1
end points and their u=0 r
p1
slopes r P
--1
r
P0
p0 P1 '
p1
-- --
Hermite Cubic Splines
! !
C0 = P0
! !'
C1 = P0 12 unknowns
! ! ! !' !' and
C2 = 3( P1 ! P0 ) ! 2 P0 ! P1 12 equations
! ! ! !' !'
C3 = 2( P0 ! P1 ) + P0 + P1
!" 3 # # 3 # 2 # 1 # All
P = ! Ci u = C3u + C2 u + C1u + C0
i parameters
can be
i=0 determined
3 2
3 2
P(u ) = (2u 3u + 1) P0 + (2u + 3u ) P1 Hermite
3 2
' 3 2
' Cubic curve
in vector
+ (u 2u + u ) P0 + (u u ) P1 form
Hermite Cubic Splines Equation:
! 3 2
! 3 2
!
P(u ) = (2u ! 3u + 1) P0 + (!2u + 3u ) P1 Hermite Cubic curve in
3 2
"' 3 2
!' vector form
+ (u ! 2u + u) P0 + (u ! u ) P1
! ! #
In matrix form: ! P0 Based on:
2 %2 1 1 # & ! '
& ' & P1 ' Location of
!u3 %3 3 %2 %1 '
" u2 u 1#$& & !' ' the two end
& 0 0 1 0 ' & P0 ' points and
&
" 1 0 0 0 '$ & !' ' their slopes
&" P1 '$
T
!
=U [M H ] V 0 ! u !1
' 2
2
2
'
P (u ) = (6u 6u ) P0 + (6u + 6u ) P1 + (3u 4u + 1) P0
2
'
+ (3u 2u ) P1 0 u 1
Limitations with Hermite Curves
n segment(each polygon)
n+1 vertices (each polygon) and number of control points
u [0, 1]
Bezier Curve
P. Bezier of the French automobile company of
Renault first introduced the Bezier curve.
A system for designing sculptured surfaces of
automobile bodies (based on the Bezier curve)
n! i n i
Bi ,n (u ) = u (1 u )
i!(n i ) !
n=2
i 0 1 2
n! 2! 2! 2!
=1 =2 =1
i! (n i )! 0! 2! 1! 1! 2! 0!
Bernstein Polynomial
i 0 1 2
n! 2! 2! 2!
=1 =2 =1
i! (n i )! 0! 2! 1! 1! 2! 0!
n
n! i n i
p(u ) = pi Bi ,n (u ) ( )
Bi ,n u = (
u 1 u )
i =0 i!(n i ) !
! 2 ! ! 2!
p(u) = 1! (1" u) p0 + 2 ! u(1! u) p1 +1! u p2
! ! ! !
p '(u) = !2(1! u) p0 + 2(1! 2u) p1 + 2up2
! ! r r r
p(0) = p0 p '(0) = 2( p1 p0 )
! ! r r r
p(1) = p2 p '(1) = 2( p2 p1 )
The order of Bezier curve is a function of the number of control points. Four
control points (n=3) always produce a cubic Bezier curve.
p1 p0 p3
p2
p2
p2 p3 p1 p1
p0
p0 p3
p3 p0
p1 p3 p2 p1
p2
p0
p1 p0 p3
p1 p2 p2
p1 p2
p1 p2 p1
pn,p3 pn,p3
Convex Hull Property
An Example
The coordinates of four control points relative to a current WCS are given by
T T T T
P0 = !" 2 2 0 #$ , P1 = !" 2 3 0 #$ , P2 = !" 3 3 0 #$ , P3 = !" 3 2 0 #$
Find the equation of the resulting Bezier curve. Also find points on curve for
u = 0, 1 , 1 , 3 ,1
4 2 4 P1 P2
P0 P3
Solution
P (u ) = P0 B0,3 + P1 B1,3 + P2 B2,3 + P3 B2,3 0 u 1
n! n i
Bi ,n (u ) = u i (1 u )
i!(n i ) !
2
P (u ) = P0 (1 u) + 3P1u (1 u ) + 3P2u 2 (1 u ) + Pu
3
3
3
0 u 1
Substituting the u values into his equation gives
T
P (0) = P0 = [2 2 0]
u = 0, , , , 1
1 27 27 9 1 T
P = P0 + P1 + P2 + P3 = [2.156 2.563 0]
4 64 64 64 64
1 1 3 3 1 T
P = P0 + P1 + P2 + P3 = [2.5 2.75 0]
2 8 8 8 8
3 1 9 27 27 T
P = P0 + P1 + P2 + P3 = [2.844 2.563 0]
4 64 64 64 64
T
P (1) = P3 = [3 2 0] P1(2,3) P2(3,3)
u=1/2
P3(3,2)
P0(2,2)
form)
Ni ,k 1 (u ) Ni +1,k 1 (u)
Ni ,k (u) = (u ui ) + (ui + k u)
ui + k 1 ui ui + k ui +1
Parametric Knots
Ni ,k 1 (u ) Ni +1,k 1 (u)
Ni ,k (u) = (u ui ) + (ui + k u)
ui + k 1 ui ui + k ui +1
0 j<k
u j = j k + 1 k jn
n k + 2 j>n
where, 0 j n+k, thus if a curve with (k-1) degree and
(n+1) control points is to be developed, (n+k+1) knots
then are required with 0 u umax = n k +2
k-1
Knot Value Calculation
Ni ,k 1 (u ) Ni +1,k 1 (u)
Ni ,k (u) = (u ui ) + (ui + k u)
ui + k 1 ui ui + k ui +1
vertex
2
3
5
7
5
4
6
1
5
Properties of B-Spline
Repeated values of a control point can pull a B-spline
curve forward to vertex. ( Interactive curve control )
Add more
Same order repeated
polynomial control points
to pull the
curve
An Example
n = 3; 4 control points
n increases wider base
k = 4; 4-1=3 cubic polynomial
k increases wider & taller
uj: 0 j n+k= 7
Calculating the Knots, uj
1 ui u < ui +1
N i ,1 = 1 u = umax and u ui +1 and u ui = 1
Calculating Ni,1 0 otherwise
0
=0
0
Calculating Ni,k
Calculating Ni,k
Result
hi N i ,k (u )
Ri ,k = n
(hi " scalar )
!h N i i ,k
(u )
i =0
then
Development of NURBS