22
S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 1 ME3040/ME5090: Mathematical Elements for Geometrical Modelling B-Spline Curves

B-Spline Curves

Embed Size (px)

DESCRIPTION

Spline curves

Citation preview

Page 1: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 1/22

S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 1

ME3040/ME5090: Mathematical Elements for Geometrical Modelling

B-Spline Curves

Page 2: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 2/22

S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 2

• Because B-spline can offer something more than HCC

and Bezier curve.

• Bezier and Hermite splines have global control only.

 – Moving one control point affects the entire curve

• B-spline consists of a basis that allows an extra

degree of freedom which is the degree of the curve.

Degree of the curve can be independent of thenumber of control points.

• Hence Local control is available

Why more spline types?

Page 3: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 3/22

S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 3

B-Spline vs. Bezier Curve

Bezier B-Spline

BasicB-spline is a powerful generalization of Bezier

curve

Approximating curve Both interpolating and approximating possible

Curve is defined by n+1 control points Curve is defined by n+1 control points

Order of the curve is n Order of the curve is k-1

Global propagation Local propagation

0<u<1 0<u<(n-k+2)

Berstein Polynomials B-Spline basis functions

Page 4: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 4/22

S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 4

• Bezier Curve:

• B-Spline Curve:

B-Spline vs. Bezier Curve

=

= (1)−    0 ≤ ≤ 1

=

=

,()   0 ≤ ≤ + 2

Page 5: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 5/22

S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 5

• Non-uniform B-Spline Curve (n=6, k=3)

Non-uniform B-Spline Curve

Page 6: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 6/22

S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 6

• Bezier Curve (n=5):

• B-Spline Curve (n=5, k=3):

Definition

(1 ) + 5(1 ) + 10(1 )3+10(1)33 + 5(1 ) +

0 ≤ ≤ 1

,3   + ,3   + ,3   + 3,3  3 + ,3  + ,3()0 ≤ ≤ 4

Page 7: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 7/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 7  

• The curve is C(k-2) continuous

• The curve is made up of (n-k+2) segments

• Only k control points affect any segment of the curve

• A given control point affects 1 or 2 or … k curvesegments

Properties

Page 8: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 8/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 8

B-Spline Basis Function

, 1 1, 1,

1 1

( ) ( ) ( ) ( )( )) )

i i k i k i k  

i k 

i k i i k i

u t N u t u N u N ut t t t  

1

,

(0 ) are called knot values0 if

i-k+1 if

2 if

1 if( )

0

i

i

i i

i k 

t i n k  

i k 

t k i n

n k i n

t u t  N u

otherwise

 

Page 9: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 9/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 9  

• Consider a cubic B-Spline for five control points.

• P(u)=P0N0,4(u)+P1N1,4(u)+P2N2,4(u)+P3N3,4(u)+P4N4,4(u)

• Optical illusion notwithstanding, this picture shows that one additional basis function

needs to be evaluated at each lower level using the recursive relation except the last

level Ni,1 which is evaluated using the unit step function part of basis function

equations.

Recursive & Non-Recursive parts of Basis Function

N0,4(u) N1,4(u) N2,4(u) N3,4(u) N4,4(u)

N0,3(u) N1,3(u) N2,3(u) N3,3(u) N4,3(u) N5,3(u)

N0,2(u) N1,2(u) N2,2(u) N3,2(u) N4,2(u) N5,2(u) N6,2(u)

N0,1(u) N1,1(u) N2,1(u) N3,1(u) N4,1(u) N5,1(u) N6,1(u) N7,1(u)

Page 10: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 10/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 10  

n=5 k=3

Page 11: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 11/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 11

• n=5 and k=3

B-Spline Basis Function

(0 8) are called knot values

0,0,0,1,2,3,4,4,4

i

i

t i

Page 12: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 12/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 12

Effect of Degree: k = 2

Page 13: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 13/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 13

Effect of Degree: k = 3

Page 14: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 14/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 14

Effect of Degree: k = 4

Page 15: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 15/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 15

Effect of Degree: k = 5

Page 16: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 16/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 16

Effect of Degree: k = 7

Page 17: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 17/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 17  

Effect of Degree: k = 11

Page 18: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 18/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 18

Effect of Degree: k = 13

Page 19: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 19/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 19  

• Non-Uniform B-Spline Curve

• Non-Uniform Rational B-Spline Curve

NURBS

=

=

ℎ,()   =

=

ℎ,()

=

=,()   0 ≤ ≤ + 2

Page 20: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 20/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 20  

Page 21: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 21/22S. Suryakumar, ME, IITH ME3040/ME5090: Mathematical Elements for Geometrical Modelling 21

• Plot the b-spine curve with n=7 (8points) and k=3

• In Matlab/C++

• The 8 points are given by the user or embedded into

the code – does not matter

Assignment -3

Page 22: B-Spline Curves

7/17/2019 B-Spline Curves

http://slidepdf.com/reader/full/b-spline-curves 22/22

 Have a nice day!