920 likes | 935 Views
Learn how to smoothly interpolate parameter values for in-between frames using various methods like Bezier curves and B-splines. Understand how to achieve continuity and local control in complex curve designs. Explore C0 to C2 continuity and join Bezier curves for seamless animations.
E N D
CSCE 441: Keyframe Animation/Smooth Curves (Cont.) Jinxiang Chai
Key-frame Interpolation • Given parameter values at key frames, how to interpolate parameter values for inbetween frames. θ t
Key-frame Interpolation • Given parameter values at key frames, how to interpolate parameter values for inbetween frames. θ t
Key-frame Interpolation • Given parameter values at key frames, how to interpolate parameter values for inbetween frames. θ t Nonlinear interpolation
R1 P4 R4 P1 Review: Hermite Curves P1: start position P4: end position R1: start derivative R4: end derivative
R1 P4 R4 P1 Review: Hermite Curves
R1 P4 R4 P1 Review: Hermite Curves Herminte basis matrix
R1 P4 R4 P1 Review: Hermite Curves Herminte basis matrix
R1 P4 R4 P1 Review: Hermite Curves
R1 P4 R4 P1 Review: Hermite Curves
R1 P4 R4 P1 Review: Hermite Curves
R1 P4 R4 P1 Review: Hermite Curves
R1 P4 R4 P1 Review: Hermite Curves Hermite basis functions
R1 P4 R4 P1 Review: Hermite Curves basis function 1 basis function 1 basis function 1 basis function 1
R1 P4 R4 P1 Review: Hermite Curves *R1 *R4 *P1 + *P4 + + =
Review: Bezier Curves *v2 *v3 *v1 *v0 + + + =
Review: Different basis functions • Cubic curves: • Hermite curves: • Bezier curves:
Complex curves Suppose we want to draw or interpolate a more complex curve
Complex curves • Suppose we want to draw or interpolate a more complex curve How can we represent this curve?
Complex curves • Suppose we want to draw a more complex curve • Idea: we’ll splice together a curve from individual segments that are cubic Béziers
Complex curves • Suppose we want to draw or interpolate a more complex curve • Idea: we’ll splice together a curve from individual segments that are cubic Béziers
Splines • A piecewise polynomial that has a locally very simple form, yet be globally flexible and smooth
Splines • There are three nice properties of splines we’d like to have - Continuity - Local control - Interpolation
Continuity • C0: points coincide, velocities don’t • C1: points and velocities coincide • What’s C2? - points, velocities and accelerations coincide
Continuity • Cubic curves are continuous and differentiable • We only need to worry about the derivatives at the endpoints when two curves meet
Local control • We’d like our spline to have local control - that is, have each control point affect some well-defined neighborhood around that point
Local control • We’d like our spline to have local control - that is, have each control point affect some well-defined neighborhood around that point
Local control • We’d like our spline to have local control - that is, have each control point affect some well-defined neighborhood around that point
Interpolation • Bézier curves are approximating - The curve does not (necessarily) pass through all the control points - Each point pulls the curve toward it, but other points are pulling as well • Instead, we may prefer a spline that is interpolating - That is, that always passes through every control point
B-splines • We can join multiple Bezier curves to create B-splines • Ensure C2 continuity when two curves meet
Continuity in B splines • Suppose we want to join two Bezier curves (V0, V1, V2,V3) and (W0, W1, W2, W3) so that C2 continuity is met at the joint
Continuity in B splines • Suppose we want to join two Bezier curves (V0, V1, V2,V3) and (W0, W1, W2, W3) so that C2 continuity is met at the joint
Continuity in B splines • Suppose we want to join two Bezier curves (V0, V1, V2,V3) and (W0, W1, W2, W3) so that C2 continuity is met at the joint
Continuity in B splines • Suppose we want to join two Bezier curves (V0, V1, V2,V3) and (W0, W1, W2, W3) so that C2 continuity is met at the joint
Continuity in B splines • Suppose we want to join two Bezier curves (V0, V1, V2,V3) and (W0, W1, W2, W3) so that C2 continuity is met at the joint
Continuity in B splines • Suppose we want to join two Bezier curves (V0, V1, V2,V3) and (W0, W1, W2, W3) so that C2 continuity is met at the joint