1cs426-winter-2008 Notes Assignment 0 is due today MATLAB tutorial tomorrow 5-7 if you’re interested (see web-page for link)
2cs426-winter-2008 Refinability Cubic Hermite splines have an additional important feature: you can easily refine them You can add a new knot and control point in between existing ones without changing the curve Just use the value and derivative from the original spline Other splines (including Catmull-Rom) don’t necessarily have this property
3cs426-winter-2008 Catmull-Rom Boundaries Recall: Catmull-Rom is a cubic Hermite with an automatic choice for slopes based on control points Need to use slightly different formulas for the boundaries For example, 2nd order accurate finite difference at the start of the interval: Symmetric formula for end of interval Which simplifies for equal spaced knots:
4cs426-winter-2008 Catmull-Rom Basis Catmull-Rom also implies a set of basis functions… Can you work out the basis function for equally spaced knots?
5cs426-winter-2008 B-Splines We’ll drop the interpolating condition, and instead design a basis that is C 2 smooth So control points say how much of each basis function to use, not exactly where the curve goes This time a basis function overlaps more than one interval Want to be able to interpolate constants We won’t cover full derivation
6cs426-winter-2008 B-Spline Basis Define recursively: each order is a linear blend of previous order Note: this construction allows nonuniform knots, unlike assignment 0 version, but the 0 and 2 order splines are shifted…
7cs426-winter-2008 Looking at B-splines B i,3 (t) peaks at (or near) knot t i, but is nonzero on the interval [t i-2, t i+2 ] Always ≥ 0, Always < 1, Basis functions add up to 1 everywhere Any point on the spline curve is a weighted average of nearby control points
8cs426-winter-2008 Control Local control: adjusting a control point only changes curve locally Far enough away, curve is exactly the same Global control: adjusting one control point changes entire curve Not as desirable - working on one part of the curve can perturb the parts you already worked out to perfection But, for decent splines, effect is small--- decays quickly away from adjustment
9cs426-winter-2008 Controlling Cubics All three of the cubic splines we saw have local control But if we enforce C 2 smoothness and make it interpolating, we end up with global control Have to solve a big linear system to determine cubic coefficients…
10cs426-winter-2008 Summary Cubic Hermite Spline: the standard tool for animation. C 1, interpolating, local control. Smoothness easy to break if needed: flexible! Catmull-Rom: a good default choice for the slopes, based on finite difference formulas Cubic B-Spline: C 2, approximating, local control. Not so useful for animating in time, very useful for defining geometry