+ All Categories
Home > Documents > Principles of Computer-Aided Design and Manufacturing Second Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 ISBN 0-13-064631-8

Date post: 03-Jan-2016
Category:
Upload: kenyon-craft
View: 36 times
Download: 2 times
Share this document with a friend
Description:
University of Illinois-Chicago. Chapter 4 Description of Curves and Surfaces. Principles of Computer-Aided Design and Manufacturing Second Edition 2004 ISBN 0-13-064631-8 Author: Prof. Farid. Amirouche University of Illinois-Chicago. - PowerPoint PPT Presentation
Popular Tags:
84
Principles of Computer-Aided Design and Manufacturing Second Edition 2004 ISBN 0-13-064631-8 Author: Prof. Farid. Amirouche University of Illinois- University of Illinois- Chicago Chapter 4 Description of Curves and Surfaces
Transcript
Page 1: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing

Second Edition 2004

ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche

University of Illinois-Chicago

University of Illinois-Chicago

Chapter 4

Description of Curves and Surfaces

Page 2: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.1 Line Fitting

4.1 LINE FITTING • Suppose we desire to fit a linear function to

the data set, as illustrated in Table 4.1.

i x y

1 xi yi

2 xi+1 yi+1

3 xi+2 yi+2

Table 4.1

Page 3: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.1 Line Fitting

21 cxcg(x)

1,2....Li,cxcyxgyr 2i1iiii

22i1i

L

1i

2i

L

1icxcyrR

0cxcyx2c

R2i1ii

L

1i1

0cxcy2c

R2i1i

L

1n2

2

1

2

1

2,22,1

1,21,1

z

z

c

c

aa

aa

We have two equations and two unknowns and the coefficient are given by :

(4.1)

(4.2)

(4.3)

(4.4)

(4.5)

(4.6)

points. data ofnumber total theis L where

Page 4: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

2i

L

1i1,1 xa

i

L

1i2,11,2 xaa

LaL

1i2,2

0ix

ii

L

1i1 yxz

L

1ii2 yz

2,11,22,21,121,212,21 aaaa/zazac

2,11,22,21,112,221,12 aaaa/zazac

(4.7)

(4.8)

(4.9)

(4.10)

(4.11)

(4.12)

(4.13)

The solution to equation (4.6) is found by Cramer’s rule

CHAPTER 4 4.1 Line Fitting

Page 5: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Example 4.1

Determine the regression line for the data in Table 4.2 by solving Equation (4.6). After the regression line is obtained, examine the deviation error of the line from the data. Table 4.2

i xi yi x2i xiyi

1 0.1 0.22 0.01 0.022

2 0.2 0.39 0.04 0.078

3 0.3 0.57 0.09 0.171

4 0.4 0.81 0.16 0.324

5 0.5 1.02 0.25 0.51

6 0.6 1.18 .36 0.708

Total 2.1 4.19 0.91 1.813

a21 z2 a11 z1

CHAPTER 4 4.1 Line Fitting

Page 6: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Solution:

19.4,6,1.2

813.1,1.2,91.0

22,21,2

12,11,1

zaa

zaa

19.4

813.1

61.2

1.291.0

2

1

c

c

0053.,98.1 21 cc

0.00531.98xxg

i xi yi g=c1x+c2 Deviation (error)

1 0.1 0.22 0.2033 0.0167

2 0.2 0.39 0.4013 -0.0113

3 0.3 0.57 0.5993 -0.0293

4 0.4 0.81 0.7973 0.0127

5 0.5 1.02 0.9953 0.0247

6 0.6 1.18 1.1933 -0.0753

TABLE 4.3

CHAPTER 4 4.1 Line Fitting

Page 7: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

x

0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

1.2

x

y

y=1.98x+.0053

Figure 4.1 The line fitted to the data

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.1 Line Fitting

Page 8: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.2 Nonlinear Curve Fitting

4.2 NONLINEAR CURVE FITTING WITH A POWER

FUNCTION αβxxg βlogxαlogglog

xlogX

log(βoc

αc

log(g)G

2

1

21 cXcG where

(4.14)

(4.15)

(4.16)

(4.17)

Page 9: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Example 4.2

A following data set is used to demonstrate how curve fitting of a power function can be carried out making use of the regression line technique. Consider Table 4.4, when x, y represent experimental data between force (lbs) and displacement (mm). We need to find a mathematical function to describe the data and it is perceived that a power function is most suitable.

i 1 2 3 4 5 6 7 8 9 10 11 12 Total

x 0.1 0.25 0.39 0.60 1.03 1.32 1.78 2.13 2.45 3.07 3.98 4.64

y 3.21 3.81 4.09 5.21 7.97 8.32 8.88 9.27 9.97 10.8 11.34 13.08

X=log(x) -1 -.602 -.408 -.22 .0128 .1205 0.25 0.328 .389 0.487 .60 0.666 .6233

Y=log(y) 0.506 .580 0.611 0.716 0.9014 0.920 0.948 .967 .998 1.033 1.054 1.116 10.35

X2 1 .3624 .1664 .0484 0.0001 0.014 .0625 .1075 0.151 .2371 .36 .443 2.9524

XY -.506 -.349 -.249 -.1575 .0115 .1108 .237 .3171 .388 .5030 0.6324 .7432 1.6815

Table 4.4

CHAPTER 4 4.2 Nonlinear Curve Fitting

Page 10: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

x x x

2 4 6 8 10 12 14 0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

x

g(x)

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

35.10,12,6233.0

6815.1,6233.0,9524.2

22,21,2

12,11,1

zaa

zaa

9405.1)log(,3917.0 21 cc

0.3197α 6.9622xβxxg

Figure 4.2 The curve fitted to the data

C2 = 0.8422

β =2.3215

CHAPTER 4 4.2 Nonlinear Curve Fitting

Page 11: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

4.3 CURVE FITTING WITH A HIGHER-ORDER

POLYNOMIAL

11

21 ... n

nn cxcxcxg

CHAPTER 4 4.3 Higher order Curve Fitting

Considering a set of data (xi, yi).

Let us try to interpolate the data with a polynomial of order n :

xi yi

x1 y1

x2 y2

…. …..

xL yL

Page 12: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.3 Higher order Curve Fitting

LnnL

n

nn

y

y

y

y

c

c

c

c

x

x

xx

A.

,.

,

1..

....

1..

1.

2

1

1

2

1

2

111

** ycAoryAAcA tt ** 1

yAc

yAyandAAA tt **

11

21

11

32313

11

22212

11

12111

...

...........................................

...

...

...

nn

Ln

LL

nnn

nnn

nnn

cxcxcy

cxcxcy

cxcxcy

cxcxcyThe system can be written :

In a matrix form :

Page 13: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

In order to find the best fit, the error needs to be minimized :

11

21 ... n

nn cxcxcxg

Lixgyr iii ,...2,1,

L

iirR

1

21,...,2,1,0

njc

R

j

1,...2,1,1

11

1 1

22

nkyxcxL

ii

knij

n

j

L

i

kjni

L

ii

L

ii

ni

L

ii

ni

nL

ii

L

i

ni

L

i

ni

L

i

ni

L

i

ni

L

i

ni

L

i

ni

y

yx

yx

c

c

c

xx

xx

xxx

1

1

1

1

1

2

1

1

0

1

1

1

1

12

11

12

1

2

..

..

....

..

.

yAc

(4.18)

(4.19)

(4.21)(4.20)

(4.22)

(4.23)(4.24)

CHAPTER 4 4.3 Higher order Curve Fitting

Page 14: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Example 4.3

A data set of a biomechanical experiment is provided in Table 4.5. Find a polynomial of order 12 that best fits the data.

CHAPTER 4 4.3 Higher order Curve Fitting

Page 15: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Solution:

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2

4

6

8

10

12

14

X

Y

Figure 4.3 Plot of the quadratic polynomial fitted

CHAPTER 4 4.3 Higher order Curve Fitting

Page 16: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.4 Chebyshev Polynomial Fit

4.4 CHEBYSHEV POLYNOMIAL FIT

1. A Chebyshev polynomial is defined over the interval [-1,1].

2. The range of the independent variable must then be

3. The zeroth-order Chebyshev polynomial is

4. The first-order Chebyshev polynomial is

5. The second-order Chebyshev polynomial is

The definition of a Chebyshev polynomial is contained in the following rules:

.1...1 10 nxxx

.1)(0 xT

.)(1 xxT

.12)( 22 xxT

Page 17: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

)()(2)( 21 xTxxTxT kkk

n

kkk xTaxf

0

).()(

Example 4.4

Figure 4.4 Free Body Analysis of a Vehicle on a Road

(4.29)

(4.30)

CHAPTER 4 4.4 Chebyshev Polynomial Fit

Page 18: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

56.0448.0336.0224.0112.00]56.0,0[],[ ba

.12

ab

axI

,112

02

xx

I

,16.02.02.06.01 xI

xTaxTaxTaxTaxTaxTaxf o 55443322110 )()()()(

,1)( xTo

,)(1 xxT

,12 22 xxT

,342 3123 xxxTxTxxT

,188)( 244 xxxT

.52016)( 355 xxxxT

where

(4.31)

(4.32)

(4.33)

CHAPTER 4 4.4 Chebyshev Polynomial Fit

Page 19: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

The approximating function becomes

1883412 244

33

2210 xxaxxaxaxaaxf

xxxa 52016 355

0

176.1

902.1

902.1

176.1

0

111111

0788.0

845.0

843.0

693.0

936.0

568.0

28.0

92.0

6.0

2.0

1

1

84512.06928.0568.092.02.01

07584.08432.0936.028.06.01

111111

5

4

3

2

1

0

a

a

a

a

a

a

533.203490.001844.20 a

543210 533.20023.03490.00004.01844.20019.0)( TTTTTTxf

(4.34)

(4.35)

(4.36)

CHAPTER 4 4.4 Chebyshev Polynomial Fit

Page 20: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

VALUE OF X IN THE FUNCTION Y=2*SIN X

RESULTS FROM APPROXIMAT

ION

DESIRED RESULTS

0.1 1.6071 0.1997

0.6 4.1959 1.1293

1.1 2.0987 1.7824

1.6 -0.6599 1.9991

2.1 -2.0871 1.7264

2.6 -1.7240 1.0310

3.1 -0.1475 0.0832

3.6 1.5274 -0.8850

4.1 2.1458 -1.6366

4.6 1.0104 -1.9874

5.1 -1.6205 -1.8516

5.6 -4.0349 -1.2625

6.1 -2.5692 -0.3643

TABLE 4.6

CHAPTER 4 4.4 Chebyshev Polynomial Fit

Page 21: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.5 Fourier Series

4.5 FOURIER SERIES OF DISCRETE SYSTEMS

• By performing a variable transformation, we can transform the physical interval by using a new independent variable that has the range from some given interval . We, then subdivide this interval into 2N equally spaced parts by using . The function is then known at the points . There are 2N known values of the function through which the series will be fitted. Then we have

Page 22: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

),0(0 fy ),(1 fy

].)1(2[12 Nfy N

.

.

.

m

jjj jbja

af

1

0 sincos2

)cos...2coscos(2 21

0 maaaa

f m )sin...2sinsin( 21 mbbb m

0

cos.2

djfa j .,....,2,1,0 mj

0

sin.2

djfb j .,....,2,1,0 mj

where is the Time Period.

j

(4.38)

(4.39)

(4.41)

(4.42)

CHAPTER 4 4.5 Fourier Series

Page 23: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

12

0

2])([N

kkyfE

kkj jfN

a cos1 ,,.....,2,1,0 mj

kkj jfN

b sin)(1

,,.....,2,1,0 mj

where

)./( Nkkk

Figure 4.5 Mass M with Support Motion

(4.43)

(4.44)

(4.45)

3

23

4 2

f 3 3 0

0

0

CHAPTER 4 4.5 Fourier Series

Page 24: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

)2sinsin()2coscos(2 2121

0 bbaaa

f

2sinsin 21 bbf

kkfN

b sin1

1

2sin*0

3

4sin*3

3

2sin*30sin*0

2

1

5.1

kkfN

b 2sin1

2

4sin*0

3

8sin*3

3

4sin*30sin*0

2

1

5.1 2sin5.1sin5.1 f

(4.46)

(4.47)

(4.48)

(4.49)

(4.50)

We apply Fourier series method to the data and use two-term Fourier series.

Because the function is odd all a’s are zeros.

CHAPTER 4 4.5 Fourier Series

Page 25: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

0 1 2 3 4 5 6 7-3

-2

-1

0

1

2

3

X

Y

Figure 4.6 Graph for 2sin5.1sin5.1 f

f(y=2sin

CHAPTER 4 4.5 Fourier Series

Page 26: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

2sinsin 21 bbf

kkfN

b sin1

1

29.154sin*8676.086.102sin*95.143.51sin*56.10sin*0(4

1

)360sin*058.308sin*56.115.257sin*95.172.205sin*868.0

75.1 kkf

Nb 2sin

12

58.308sin*8676.072.205sin*95.186.102sin*56.10sin*0(4

1

)720sin*016.617sin*56.13.514sin*95.144.411sin*868.0

sin75.1f

0

(4.52)

(4.53)(4.54)

2N=8

CHAPTER 4 4.5 Fourier Series

Page 27: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

0 1 2 3 4 5 6 7-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

X

Y

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Figure 4.7 Graph for sin75.1f

732.1176.1416.0416.0176.1732.1989.1902.1486.1813.00

240216192168144120967248240

f 0813.0486.1902.1989.1

360336312288264

y=2sin

f(

CHAPTER 4 4.5 Fourier Series

Page 28: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

kkfN

b sin1

1

2sinsin 21 bbf

120sin*732.196sin*989.172sin*902.148sin*486.124sin*813.00sin*0(8

1

240sin*732.1216sin*176.1192sin*416.0168sin*416.0144sin*176.1

)360sin*0336sin*813.0312sin*486.1288sin*902.1264sin*989.1

876.1

kkfN

b 2sin1

2

240sin*732.1192sin*989.1144sin*902.196sin*486.148sin*813.00sin*0(8

1

480sin*732.1432sin*176.1384sin*416.0336sin*416.0288sin*176.1 )720sin*0672sin*813.0624sin*486.1576sin*902.1528sin*989.1

0

,sin876.1 f

CHAPTER 4 4.5 Fourier Series

Page 29: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

0 1 2 3 4 5 6 7-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

X

Y

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Figure 4.8 Graph for sin876.1f

f(

y=2sin

CHAPTER 4 4.5 Fourier Series

Page 30: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

2sinsin 21 bbf

CHAPTER 4 4.5 Fourier Series

Page 31: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

      

kkfN

b sin1

1

CHAPTER 4 4.5 Fourier Series

Page 32: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

b2

CHAPTER 4 4.5 Fourier Series

Page 33: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

0 1 2 3 4 5 6 7-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

X

Y

sin96.1fFigure 4.9 Graph for

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

f(

y=2sin

CHAPTER 4 4.5 Fourier Series

Page 34: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

The benefits of using cubic splines are as follows:11. They reduce computational requirements and numerical instabilities that arise from higher-order curves.

2. They have the lowest degree space curve that allows inflection points.33. They have the ability to twist in space.

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.6 Cubic Splines

4.6 CUBIC SPLINES

4

1

1)(i

iixaxy (1<i<4)

A spline is a smooth curve that can be generated by computer to go through a set of data points. The mathematical spline derives from its physical counterpart - the thin elastic beam. Because the beam is supported at specified points (we call them knots), it can be shown that its deflection (assumed small) is characterized by a polynomial of order three, hence a cubic spline. It is not a mere coincidence that the principle of explaining the deflection of beams under different loads results into a function of a third order.

(4.55)

Page 35: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

4.7 PARAMETRIC CUBIC SPLINES

33,

22,1,,)( tatataatS iiioii

niforYXPSa iiiii .,.,.1),(0,

iii yxa 0,

niforYYXXt iiiii .,..,2121

211

.1,..,.10

,,,,,)(

1

33,3,

22,2,1,1,0,0,

niandttwhere

taataataaaatStStS

i

yixiyixiyixiyixiyixii

Consider a set of data points described in the x-y plane by (xi yi) with i=1,

…,n. Our objective is to pass a parametric cubic spline between all these points. A parametric cubic spline is a curve that is represented as a function of one or more parameters.

(4.56)

(4.57)

(4.58)

(4.59)

CHAPTER 4 4.7 Parametric Cubic Splines

Page 36: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

UnknownsnaS

PtsControlnKnownsYXPaSTherefore

atataatd

tSdtSS

atatataatSS

i

iiiii

itiii

t

iii

itiiiiii

1,1

0,

1,0

23,2,1,

0

0,0

33,

22,1,0,

'

:),(

32)(

)0(''

)0(

3,3

3'"

3,2,2

2

23,2,1,

'

6)(

)(

62)(

)("

32)(

)(

ii

i

iii

i

iiii

i

atd

tSdtS

taatd

tSdtS

tataatd

tSdtS

33,

22,11 ')( tatatSStS iii

111

1111

')0(')('

)0()(

iiii

iiiii

StSttS

PStSttS

(4.60)

(4.61)

(4.62)

(4.63)

(4.64)

(4.65)

(4.66)

(4.67)

CHAPTER 4 4.7 Parametric Cubic Splines

Page 37: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

12

13,12,

13

13,2

12,1

''

'

iiiiii

iiiiiiii

StataS

StatatSS

)''(1

)(2

)2(13

121

131

3,

''1

112

12,

iii

iii

i

iii

iii

i

SSt

SSt

a

SSt

SSt

a

322

'2

22

'1

32

)212

2

'2

2

'1

22

12'11

(22)(3)( t

t

S

t

S

t

SSt

t

S

t

S

t

SSSStSi

Therefore, the spline function between P1 & P2 could simply be expressed as

(4.68)

(4.69)

(4.70)

(4.71)

CHAPTER 4 4.7 Parametric Cubic Splines

Page 38: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

IIn the context of computer graphics and general-purpose algorithm development, we need to ask the following questions: 11. How can we generate a solution for and for all cubic functions S i(t), Si+1(t), .

. . Sn(t)? 

22. How do we select t, t1, and t2 for a given set of data points? 

3. How do we assure continuity between the splines at knots P1, P2,. . . ,

Pn?

32

1

'1

21

'1

31

12

1

'1

1

'

21

1' )(22)(3)( t

t

S

t

S

t

SSt

t

S

t

S

t

SStSStS

i

i

ii

ii

i

i

i

i

i

iiiii

taatS iii 3,2," 62

2," 20 ii aS

23,2,2" 62 taatS iii

0)( "12

" ii StS

(4.72)

(4.73)

(4.74)

(4.75)

(4.76)

CHAPTER 4 4.7 Parametric Cubic Splines

Page 39: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

)21()()/3(

)(2

12

2122

121

'21

'112

'2

niSStSSttt

StSttSt

iiiiiiii

iiiiiii

)()(3

)(33

3

(200

0)(200

0020

0002

212

12

11

23244

23

43

122323

22

32

'

'3

'2

'1

)1

4545

3434

2323

nnnnnnnn

nnnnn

SStSSttt

SStSSttt

SStSSttt

S

S

S

S

tttt

tttt

tttt

tttt

ti+2S’i

CHAPTER 4 4.7 Parametric Cubic Splines

i

Page 40: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Boundary Conditions

a) Natural Spline:

00"11" tSS

0)("" 1 nnn ttSS

212'2

'1 /)(5.15.0 tSSSS

)(/642 1''

1 nnnnn SStSS

b) Clamped Spline:

The boundary conditions for this spline are such that the first derivatives (slope) at t=0 and t=tn are specified.

(4.79)

(4.80)

(4.81)

(4.82)

CHAPTER 4 4.7 Parametric Cubic Splines

Adding Equations (4.81) and (4.82) to the n-2 equations given by Equation (4.78) we can solve for all the S’.

Page 41: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

TThe parametric cubic spline between any two points is constructed as follows: 11. Find the maximum cord length and determine t1, t2, . . . ,tn. 22. Use Equation (4.78) together with the corresponding boundary conditions to solve for the , , . . .. , . 33. Solve for the coefficients that make up the parametric cubic splines using equations (4.62), (4.69) and (4.70).

Summary

CHAPTER 4 4.7 Parametric Cubic Splines

Page 42: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Example 4.4 For following data set (1,1), (1.5,2), (2.5,1.75) & (3.0,3.25). Find the parametric cubic spline assuming a relaxed condition at both ends of the data.

Solution:

21

211 iiiii YYXXt

CHAPTER 4 4.7 Parametric Cubic Splines

We first compute the cord length

Page 43: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

3222313

122

21

''2')1

)(3

''2)0

StSttSti

SSt

SSi

122323

22

32

3SStSSt

tt

4333424 ''2')2 StSttSti 232434

23

43

3SStSSt

tt

)(3

'2')3 344

43 SSt

SSi

t32

t42

The above equations are found using boundary conditions given by equations(4.81), (4.82) and (4.77).

Equation (4.78) in notational form is siT CSC '

CHAPTER 4 4.7 Parametric Cubic Splines

Page 44: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

2100

031.1476.3707.00

0118.1298.4031.1

0012

TCwhere

4

34

232434

23

43

4

34

232434

23

43

122323

22

3212

2323

22

32

2

12

2

12

3

3

3

3

33

33

t

SS

SStSSttt

t

SS

SStSSttt

SStSSttt

SStSSttt

t

SS

t

SS

C

YY

yyyy

XX

xxxx

YYYYXXXX

YYXX

s

121.2121.2

672.1245.4

952.1637.4

683.2342.1

(4.86)

(4.85)

Last Eqn

t2t3

t42

t42

CHAPTER 4 4.7 Parametric Cubic Splines

Page 45: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

sTi CCS 1'

1,4

1,3

1,2

1,1

9745.06217.0

1720.08776.0

0996.07836.0

2917.12792.0

a

aa

a

= (4.87)

Since we have three splines we need to compute three coefficientsof ai,2 and ai,3.

To solve for Si’ we multiply equation (4.84) by [CT]-1

to get the ai,1 constants .

CHAPTER 4 4.7 Parametric Cubic Splines

Page 46: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

3,2,1'2'1

)(

31

12

1

12,

iforSStt

SSa ii

ii

iii

135.1361.0

067.1452.0

00

2,3

2,2

2,1

a

a

a

ii

i

ii

i

i SSt

SSt

a ''12

121

131

3,

536.0171.0

713.0263.0

317.0135.0

3,3

3,2

3,1

a

a

a

(4.88)

(4.90)

(4.89)

(4.91)

Si+1

Using equation (4.69) to find ai,2

Using equation (4.70) to find ai,3

(ti+1)3

CHAPTER 4 4.7 Parametric Cubic Splines

Page 47: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

32

3

322

321

536.0171.0135.1361.0172.0878.075.15.2

713.0263.0067.1452.01.0784.025.1

317.0135.000292.1279.011

tttS

tttS

tttS

1 1.5 2 2.5 3 3.5 1

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

2.8

X

Y

Figure 4.10 Parametric cubic curve

(4.92)

S1

S2

S3

CHAPTER 4 4.7 Parametric Cubic Splines

Page 48: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.8 Nonparametric Cubic Spline

4.8 NONPARAMETRIC CUBIC SPLINE

32 dxcxbxaS(x)

y)(xS ii

1i1i1i1i y)(xSxS

A nonparametric cubic spline is defined as a curve having a function of only one parameter. Non-parametric cubic splines allow a direct variable relationship between the parameter value x and the value of the cubic spline function to be determined.

(4.93)

(4.94)

(4.95)

Cubic spline S(x) is composed of (n-1) cubic segment splines.

Each point has an x and y value.

For the interval [xi,xi+1] we can write

Page 49: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

3ii

2iiiiii xxd)x(xc)x(xba(x)S

2iiiii

'i )x(x3d)x(x2cbS

)x(x6d2cS iii"i

(4.98)

(4.99)

(4.100)

The non-parametric cubic spline can be expressed as:

Its first and second derivatives are

)(xS)(xS 1i'

1i1i'i

)(xS)(xS 1i"

1i1i"i

(4.96)

(4.97)

By considering the smoothness and continuity of the cubic splines the following conditions are derived:

CHAPTER 4 4.8 Nonparametric Cubic Spline

Page 50: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

iiii ya)(xS

3ii

2iiiii1i1ii hdhchbaa)(xS

ii'i b)(xS

2iiiii1i1i

'1i1i

'i h3dh2cbb)(xS)(xS

iii1i1i"

1i1i"i h6d2c2c)(xS)(xS

(4.101)

(4.102)

(4.103)

(4.104)

(4.105)

CHAPTER 4 4.8 Nonparametric Cubic Spline

Page 51: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

i1ii xxh

where

3

)c(2ch

h

aab 1iii

i

i1ii

3

)c(2ch

h

aab

as expressed be alsocan b

i1i1i

1i

1iii

i

1i

1ii

i

i1i1iiii1i1i1i h

aa

h

aa3chchh2ch

(4.106)

(4.107)

(4.108)

CHAPTER 4 4.8 Nonparametric Cubic Spline

Page 52: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

2n

2n1n

1n

1nn

0

01

1

12

n

2

1

0

1n1n2n2n

322

2211

1100

h

aa

h

aa

h

aa

h

aa

3

c

c

c

c

hhh2h000

0hh2h00

0hhh2h0

00hhh2h

1.n1,...,iforAcH hi

3

)c(2ch

h

aab i1i1i

1i

1iii

1.n0,...,ifor3h

ccd

i

i1ii

(4.109)

(4.110)

(4.111)

(4.112)

CHAPTER 4 4.8 Nonparametric Cubic Spline

Page 53: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

4.9 BOUNDARY CONDITIONS

4.9.1 Natural Splines

0)(xS")(xS" n0

0cc n0

4.9.2 Clamped Splines

)(xf')(xS' 00

)(xf')(xS' nn

S”(x0)

(4.113)

(4.114)

(4.115)

(4.116)

When substituted into equation (4.105) yields

CHAPTER 4 4.9 Boundary Conditions

Page 54: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Example 4.6Find the nonparametric cubic spline (natural spline) for the points shown in the Table below.

Solution: Step 1: Control points. Intervals, and ai

Step 2: Solve for c1: Natural Spline (c0=c2=0) using equation ( 4.109 )

25.2

225.03 3

5.0

12

1

275.1301 15.0205.0

3 2

1

1

1

0

01

1

122111000

c

c

c

h

aa

h

aachchhch

i xi yi hi

0 1 1 0.5

1 1.5 2 1

n=2 2.5 1.75 -

CHAPTER 4 4.9 Boundary Conditions

Page 55: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Step 3: Solve for bi and di from equation 4.106)

1.n0,...,iforh3

ccd

1.n0,...,ifor3

)c(2ch

h

aab

i

i1ii

1iii

i

i1ii

1.5h3

ccd

2.3753

)c(2ch

h

aab

0i

0

010

100

0

010

0.75h3

ccd

1.253

)c(2ch

h

aab

1i

1

121

211

1

121

CHAPTER 4 4.9 Boundary Conditions

Page 56: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

The results are compiled in the following table:

2.5x1.5 )x-0.75(x )x-2.25(x-)x-1.25(x2(x)S

1.5x1.0 )x-1.5(x-)x-2.375(x1(x)S

:bygiven are (4.98)equation from calculated splines theHence

3i

2ii2

3ii1

i xi hi yi=ai bi ci di

0 1 0.5 1 2.375 0 -1.5

1 1.5 1.0 2 1.25 -2.25 0.75

n=2 2.5 - 1.75 - 0 -

CHAPTER 4 4.9 Boundary Conditions

Page 57: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Figure 4.11: Nonparametric cubic spline function

s1s2

CHAPTER 4 4.9 Boundary Conditions

Page 58: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.10 Bezier Curves

4.10 BEZIER CURVES

iniin, t1t

i

n(t)J

The shapes of Bezier curves are defined by the position of the points, and the curves may not intersect all the given points except for the endpoints.

i)!(ni!

n!

i

n

where

*2)(n*1)(n*nn!

1)t(0(t)JStS in,i

n

1i

The curve points are defined by

where i=1 to n, and the Si contain the vector components of the various

points.

(4.117)

(4.118)

(4.119)

Page 59: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

n

i

in, n

ini)(ni

i

n

n

iJ

The following example illustrates the Bezier curve method of curve fitting.

Example 4.7Define the Bezier Curve that passes through the following points:

5210 10 PP

1654 32 PP

Find the Bezier curve space that passes through these points.

Solution

33,3

23,2

23,1

3303,0

t(t)J

t)(13t(t)J

t)3(1(t)J

t)(1t)(1(1)t(t)J

3,323,223,113,00 JPJPJPJPS(t)

(4.120)

(4.121)

(4.122)

CHAPTER 4 4.10 Bezier Curves

Page 60: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

100 S

529.29.015.0 S

The resulting S (t) function is then found as

733.3102.2)35.0( S

43)5.0( S

733.3904.365.0 S

529.2099.5)85.0( S

16)1( S

TABLE 4.8 Evaluation of the Bezier function J3,1(I=0,1,2,3) in

terms of the parameter t.

t J3,0 J3,1 J3,2 J3,3

0 1 0 0 0

0.15 0.614 0.325 0.0574 0.0034

0.35 0.275 0.444 0.239 0.043

0.5 0.125 0.375 0.375 0.125

0.65 0.043 0.239 0.444 0.275

0.85 0.0034 0.0574 0.325 0.614

1 0 0 0 1

CHAPTER 4 4.10 Bezier Curves

Page 61: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

X

3.5 4 4.5 5 5.5 6 0

2

4

6

8

10

12

14

16

x

y

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Figure 4.12 Bezier curve

CHAPTER 4 4.10 Bezier Curves

Page 62: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

4.11 DIFFERENTIATION OF BEZIER CURVE

EQUATION )10()(,

1

ttJStS ini

n

i

dt

tJStJStdS ini

n

iini

n

i)()( ,

1,

1

ini

in tti

n

dt

dtJ )1()(,

11 )1()1()1(

iniini tt

i

nntt

i

ni

)100.4()1()1()1()( 11

iini

iini Stt

i

nnStt

i

ni

dt

tdS

(4.123)

(4.124)

(4.125)

(4.126)

CHAPTER 4 4.11 Bezier Curves

Page 63: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

j

nn

j

nj

1

1)1(

i

nn

i

nin

1)(

iijni

n

i

SStti

nn

dt

tdS

1

11

0

)1(1)(

iini

n

ij

jnjn

j

Stti

ninStt

j

nj

dt

tdS 11

01

11

0

)1()()1(1

)1()(

(4.128)

CHAPTER 4 4.11 Bezier Curves

Page 64: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.12 B-Spline Curve

4.12 B-SPLINE CURVE B-Splines were introduced to overcome some weaknesses in the Bezier curve. It seems that the number of control points affect the degree of the curve. Furthermore the properties of the blending functions used in the Bezier curve do not allow for an easier way to modify the shape of the curve locally.

)()( 11,0

nkkii

n

ittttNStS

1

1,1

1

1,,

)()()()()(

iki

kiki

iki

kiiki tt

tNtt

tt

tNtttN

where

0

1)(1, tN i rest theall

1 ii ttt

(4.129)

(4.130)

(4.131)

Page 65: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

knin 2

(4.133) n ik 1

ki0 0

t

:knots periodicNon b)

(4.132) )k ni(0 k -i T

:knots Periodic a)

:knots of types twoare There

i

i

kn

ki

CHAPTER 4 4.12 B-Spline Curve

Page 66: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Example 4.8 Define the B-spline curve of order 3 for non-periodic uniform knots. The control points for the curve are given by P0, P1 and P2

Solution:

We obtain the (n+k+1) knot values as follows:

 t0 = 0, t1 = 0, t2 = 0, t3 = 1, t4 = 1 and t5 = 1

 (Note that n = 2 and k = 3)

Order 1. Let us compute all possible functions.

CHAPTER 4 4.12 B-Spline Curve

Page 67: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

0

1)(

0

1)(

0

1)(

0

1)(

0

1)(

1,4

1,3

1,2

1,1

1,0

tN

tN

tN

tN

tN

else

else

else

else

else

ttt

ttt

ttt

ttt

ttt

5

4

3

2

1

4

3

2

1

0

(4.134)

CHAPTER 4 4.12 B-Spline Curve

Page 68: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

(4.138) Stt)S2t(1St)(1S(t)

t(t)N

(4.137) t)2t(1(t)N

t)(1(t)N

(4.136) t

t)(t

tt

)Nt(t(t)N

and

t)(1

(4.135) N t)(1

tt

t)N(t

tt

)Nt(t(t)N

22

102

32,3

1,3

20,3

4

23

2,122,2

2,1

23

2,13

12

1,111,2

We obtain order 2 Ni,2 function as follows:

In a similar fashion, we obtain the Ni,3(t) functions for order 3.

Where S0, S1 and S2 correspond to control points P0,P1 and P2, respectively.

CHAPTER 4 4.12 B-Spline Curve

Page 69: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.13 Non-Uniform B-Spline Curve

4.13 NON-UNIFORM RATIONAL B-SPLINE CURVE (NURBS)

n

0iki,ii (t))N.x(hx.h

n

0iki,ii (t))N.y(hy.h

n

0iki,ii (t))N.z(hz.h

n

0iki,i (t)Nhh

n

0iki,i

n

0iki,ii

(t)Nh

(t)NShS(t)The equation for NURBS curve S(t) is given by:

(4.139)

(4.140)

Page 70: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Example 4.9Derive a NURBS representation of a quarter circle of radius 1. Let the arc be

defined in the (x, y) plane. Determine the corresponding coordinates of the control points, and the knot values.

Solution:

CHAPTER 4 4.13 Non-Uniform B-Spline Curve

Page 71: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

t0 = 0, t1 = 0, t2 = 0, t3 = 1, t4 = 1 and t5 = 1 h0 = 1,

2

2

2

11 h 12 h

t)2t(1(t)N

t)(1(t)N

t(t)N

t(t)N

t1(t)N

0

1(t)N

where

(t)Nh(t)Nh(t)Nh

(t)NSh(t)NSh(t)NShS(t)

1,3

20,3

22,3

2,2

1,2

2,1

2,321,310,30

2,3221,3110,300

(4.141)

(4.142)

(4.143)

CHAPTER 4 4.13 Non-Uniform B-Spline Curve

Page 72: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

with S0 = P0, S1 = P1 and S2 = P2 ; after substitution the NURBS equation is then found to be :

22

22

1tt)2t(12

2t)1.(1

t

0

1

0

1t)2t(1

0

1

1

2

2t)(1

0

0

1

1.

S(t)

(4.144)

CHAPTER 4 4.13 Non-Uniform B-Spline Curve

Page 73: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.15 Plane Surface

4.15 PLANE SURFACE

Figure 4.14 Plane surface formed by intersecting lines

Page 74: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

Figure 4.15 Plane surface formed by intersecting curves

CHAPTER 4 4.15 Plane Surface

Page 75: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.16 Ruled Surface

4.16 RULED SURFACE

Figure 4.16 Ruled surface formed by 2 Curves

Page 76: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.17 Rectangular Surface

4.17 RECTANGULAR SURFACE

Figure 4.17 Rectangular surface formed by 4 curves

Page 77: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.18 Surface of Revolution

4.18 SURFACE OF REVOLUTION

Figure 4.18 Revolved Surface

Page 78: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

CHAPTER 4 4.19 Application Software

4.19 APPLICATION SOFTWARE

Different Ways to Create a Surface

• Extrude-Create

Figure 4.19 Plane surface

Page 79: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

•Revolve-Create

Figure 4.20 Revolved surface

CHAPTER 4 4.19 Application Software

Page 80: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

•Sweep-Create

Figure 4.21 Sweep surface

CHAPTER 4 4.19 Application Software

Page 81: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

•Blend-Create

Figure 4.22 Blend surface

CHAPTER 4 4.19 Application Software

Page 82: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

•Flat-Create

Figure 4.23 Flat surface

CHAPTER 4 4.19 Application Software

Page 83: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

•Offset-Create

Figure 4.24 Offsetting of a surface

CHAPTER 4 4.19 Application Software

Page 84: Principles of  Computer-Aided  Design and  Manufacturing Second  Edition 2004 ISBN 0-13-064631-8

Principles of Computer-Aided Design and Manufacturing Second Edition 2004 – ISBN 0-13-064631-8

Author: Prof. Farid. Amirouche, University of Illinois-Chicago

•Copy-Create

Figure 4.25 Copying of a surface by selection method

CHAPTER 4 4.19 Application Software


Recommended