Curves
8 Sept 2022
§ Motivation
Keyframe
Often in computer animation, an artist creates keyframes which is the state (position, rotation, scale, etc.) at a discrete time step.
Then, an algorithm takes these keyframes and interpolates between them to accomplish a (typically) smooth transition between the keyframes .
Almost anything can be keyframed.
Keyframing: Position and Orientation over Time
An artist may provide positions at timesteps and and we generate a curve between them to get the position at any time between and
Keyframing: Joint Angles
We can model an arm and its movement using joint angles and
Then, we can define to describe how the angles change with respect to time.
This then leaves us with the question of how we would interpolate between keyframes?
§ Representation of Curves
There are a few ways to express a curve:
Type | Form | Example for Circle |
---|---|---|
Explicit | ||
Implicit | ||
Parametric |
§ Explicit
- Easy to Generate
- Only one value of for each
- Heavily dependent on choice of independent variable
§ Implicit
- is a measure of the distance of a point to curve (level-set information).
- Difficult to generate points on a curve
§ Parametric
- Easy to generate points on a curve
- Can have multiple for a given
§ Cubic Bézier Curve
Cubic Bézier Curve
Specify 4 "control" points, then the cubic Bézier can be given in parametric form by
Alternatively in vector notation:
And in matrix form:
- Why use 4 control points?
- The parametric equations have 8 unknowns; each point gives us 2 pieces of information.
§ Continuity in Concatenated Bézier Curves
There different classes of curve continuity
- , the curves are connected
- , tangents are the same
- , tagent directions are the same
They can be visualised with the following illustration
and are families of curves where the th derivative matches, but for animation or is good enough in most cases.
§ Cubic Catmull-Rom Spline
Catmull-Rom Spline
The Catmull-Rom spline is a curve, but it is not . Specifically, not at its control points
The basis for the Catmull-Rom spline can be given by
Connecting Sequence of Control Points
Connecting a sequence of 3D/2D points can be done using a Catmull-Rom spline.
- Every set of 4 control points define a segment of the curve
- "Concatenated" goes from where is the number of control points.
- To convert between concatenated to
Then, the curve can be computed using
where is the number of control points.