Docsity

B-Splines: Non-Uniform Curve Interpolation with Basis Functions and Subdivision, Study notes of Computer Graphics

Toggle sidebar
bg1
B-Splines
Like Catmull–Rom splines, start with sequence of points
Curves no longer interpolate control points
• points where segments actually meet are called knots
• for Hermite et al the knots were always control points
Lack of interpolation isn’t a big problem for interactive design
• but it’s hard to predict curve just based on points coordinates
p0, . . . , pn
−3
−2
2 3
−1
1 4 1 0
−3 0 3 0
1
= 1
3−6 3 0
6
−1 3 −3 1
( )
i
i
i
i
u u u u
p
p
pp
p
B-Spline Basis Functions
Non-negative functions
• implies convex hull property
( )b u
1
( )b u
4
( )b u
2
( )
( )
( )
( )
( )
( )
( )
b u u
b u u u
b u u u u
b u u
3
1
3 2
2
3 2
3
3
4
1
= 1−
6
1
= 3 −6 + 4
6
1
=−3 + 3 + 3 +1
6
1
=6
( ) ( ) ( ) ( )
i i i i
b u b u b u b u
1−3 2 −2 3 −1 4
+ + +p p p p
pf3
pf4
pf5

Partial preview of the text

Download B-Splines: Non-Uniform Curve Interpolation with Basis Functions and Subdivision and more Study notes Computer Graphics in PDF only on Docsity!

B-Splines

Like Catmull–Rom splines, start with sequence of points

Curves no longer interpolate control points

  • points where segments actually meet are called knots
  • for Hermite et al the knots were always control points

Lack of interpolation isn’t a big problem for interactive design

  • but it’s hard to predict curve just based on points coordinates

p

0

,... , p

n

− 3

2 3 − 2

− 1

i

i

i

i

u u u u

p

p

p

p

p

B-Spline Basis Functions

Non-negative functions

  • implies convex hull property

b ( u )

1

b ( u )

4

b ( u )

3

b ( u )

2

( )

( )

( )

b u u

b u u u

b u u u u

b u u

3

1

3 2

2

3 2

3

3

4

i i i i

b u b u b u b u

1 − 3 2 − 2 3 − 1 4

p + p + p + p

Converting Between Cubic Spline Types

We saw a specific example of Bézier–Hermite conversion

Suppose we want to convert between two arbitrary splines

Given geometry matrix G

find equivalent G

for other spline

0 0

3 1

0 2

3 3

p p

p p

r p

r p

1 1 2 2

T T

u M G u M G

− 1

2 2 1 1

G = M M G

Drawing Spline Curves

Method #1 — Direct evaluation

  • we have a function that generates points on the curve
  • vary parameter u between 0 and 1
  • substitute into formula and compute a position
  • connect consecutive points with line segments

Method #1a — Direct evaluation with forward differencing

  • instead of evaluating polynomials directly
  • incrementalize polynomial to cut down on multiplies

This approach has some problems

  • uniform parameter spacing is not uniform in space
  • length of segments will vary over line
  • control over length is important
    • too long makes jagged curves; too short is too slow to draw

Modeling By Subdivision

Recall that we can draw spline curves via subdivision

  • start with the control polyline
  • recursively subdivide until “smooth enough”
  • and draw the individual line segments

We can actually use this as a modeling primitive

  • define the curve as limit of infinite number of subdivision steps
  • throw out all our polynomials

Developing Subdivision Curves

Assume that we have some control polygon

  • a closed piecewise-linear curve in the plane

Need two fundamental operations:

  • Linear Subdivision — introduce new vertices
  • Linear Smoothing — modify positions of vertices

Linear Subdivision of Curves

Split each edge of the curve at its barycenter (midpoint)

  • thus doubling the number of vertices

v

i

v

i+ 1

(v

i

+ v

i+ 1

Linear Smoothing of Curves

Reposition each vertex at weighted combination of neighbors

Can also rewrite the above in a matrix form

i − 1

v

i

v

i + 1

v

i i i i

1 − 1 2 + 1

v = v + v + v

i

i

[ ]

i

i i

i

− 1

1 2 3

  • 1

v

v v

v

Subdivision as Linear Operator

Points after k steps are linear combinations of previous points

  • can therefore write subdivision step as a matrix operation

k k k

i i

k

i i

n n

n n

x y

x y

x y x y

x y

x y

x y

− 1 − 1

1 1

1 1

2 2 2 2

− 1

2 + 1 2 + 1

2 2

=

 

 

 

 

 

 

 

=

 

 

 

 

 

 

 

 

p S p

S

M M

M M

M M

Smoothing As Barycentric Averaging

**1. Compute barycenters of adjacent edges

  1. Compute barycenter of barycenters**

Same as weights [! " !] but works in higher dimensions too

i

′ v

i − 1

v

i

v

i + 1

v