17
5 6 7 8 9 10 11 12 26 27 28 29 30 31 32

Cubic B-Spline Curvesjfratup.weebly.com/uploads/1/1/5/5/11551779/13_other_splines.pdf · •A special case of cardinal spline, which is a special case of cubic Hermite spline. •Cubic

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

5

6

7

8

9

10

11

12

26 27 28 29 30 31 32

Vector Graphics

Other Spline Curves

Math 174: Numerical Analysis I

By Jomar F. Rabajante

SPLINES

Have a nice geometric property: changing one of the points only changes one portion of the curve (a “local” effect). Unlike in non-splines, changing one point has a “global” effect on the entire curve.

B-SPLINE CURVE

• “basis” spline functions, generalization of Bezier curves

• A fundamental theorem states that every spline function of a given degree, smoothness, and domain partition, can be uniquely represented as a linear combination of B-splines of that same degree and smoothness, and over that same partition.

• Given control points in a partition:

Bezier Curve

p0

p1

p2

p3

You can add more points to generate the other curves.

Bézier to B-splines

1st set of Bezier control points

2nd set of Bezier control points

Uniform Cubic B-Spline Curve

• The (uniform) cubic B-Spline for the interval (p1,p2) is

Basis, does not change as we move from one set of points to the next

Uniform Cubic B-Spline Curve

• Rewriting:

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7

Cubic B-Spline

• If we will have cubic B-splines pieced together they will satisfy the conditions (continuity and derivative continuity) of a cubic spline.

• B-spline is contained within the convex hull of the given points.

CATMULL-ROM SPLINES

• A special case of cardinal spline, which is a special case of cubic Hermite spline.

• Cubic Hermite spline (also called cspline), named in honor of Charles Hermite, is a third-degree spline with each polynomial of the spline in Hermite form.

Four Hermite Basis Functions

• The curve is named after Edwin Catmull and Raphael (Raphie) Rom.

• In computer graphics, Catmull–Rom splines are frequently used to get smooth interpolated motion between key frames.

CATMULL-ROM SPLINES

• Cubic splines are guaranteed to produce a unique path between two points.

• The interpolated curve then consists of piecewise cubic Hermite splines, and is globally continuously differentiable but up to C1 only.

• The subinterval (xk,xk + 1) is normalized to [0,1] by t = (x − xk) / (xk + 1 − xk).

CATMULL-ROM SPLINES

• Given yk–1, yk, yk+1 and yk+2, trace a graph from (xk,yk) to (xk+1,yk+1).

• Note that this approximation is only valid for 0<t<1.

CATMULL-ROM SPLINES

)t)yy3y3y(

t)yy4y5y2(

t)yy(y2(5.0)t(P

32k1kk1k

22k1kk1k

1k1kkk

0

1

2

3

4

5

6

7

8

9

0 1 2 3 4 5 6 7