Curves and Splines
Sampling Theory
- An animation can be viewed as a function over time
- How to represent compactly and completely?
- Sample values and reconstruct underlying function
- Not an exact science
Making Smooth Curves
- Cubic polynomials offer variety and flexibility
- Invariant under Affine transformations
- Goals when defining and editing, i.e., small changes to input cause small
changes in output
- local control of shape
- stability
- smoothness and continuity when combining
- ease of rendering
- Degrees of smoothness, i.e., continuity
- parametric: smoothness of movement along curve (C0, C1, C2: differentiability)
- geometric: smoothness of displayed curve (G0=C0, G1=tangent-cont., G2=curvature-cont.)
- parametric continuity is more expensive to arrange (uses up more degrees of freedom), but is mathematically simpler
Control Points
- Provide degrees of freedom, DOF, in specifying curve
- Levels of flexibility
- must be points on curve
- start and end of curve plus tangents at start and end
- no points on curve, instead curve is interpolated through points using blending functions
- Provide convex hull, want the curve to stay within the shape defined by the control points
Splines
- Originally used in ship building to bend wood into hull shape, with strips would be held in place at key points (using lead weights called "ducks")
- Also used in model railroads
- Standard for modeling curved surfaces: defined piecewise by low-order polynomial functions
- Modeled in OpenGL using evaluators to generate vertices from array of control points
- Modeled in GLU using NURBS object
Spline Types and Animation
Different spline types will have different tradeoffs and capabilities:
- Hermite splines: Require tangent vectors at each keyframe.
- Bézier splines: Require additional information for each segment and do not automatically maintain continuity.
- Catmull-Rom splines: Provide only first derivative continuity.
- B-splines: Give automatic continuity control, but only approximate their control points.
- Non-uniform Rational B-splines (NURBS): Provide additional local control over the shape of a curve.
- Non-uniform B-splines: Are needed to break continuity.
Examples
References
- Notes on Splines by Steve Marchner
- Notes on Splines from CMU
- Notes on Splines from UVA
- Continuity Aspects of Spline Curves by J. Comba
- Notes on NURBs in OpenGL by C. Ramakrishnan