Project Name: MakeHuman
Product Home Page: http://www.makehuman.org/
Code Home Page: https://bitbucket.org/MakeHuman/makehuman/
Authors: Marc Flerackers
Copyright(c): MakeHuman Team 2001-2015
Licensing: AGPL3 (http://www.makehuman.org/doc/node/the_makehuman_application.html)
This file is part of MakeHuman (www.makehuman.org).
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Coding Standards: See http://www.makehuman.org/node/165
This module contains functions and classes to animate a wide range of objects and attributes.
To know more about the interpolation methods used, see the following references:
CameraAction action class. Animates all camera attributes.
Path action class. Moves an object along a path
Rotate action class. Rotates an object from a start orientation to an end orientation.
Scale action class. Scales an object from a start scale to an end scale.
A timeline combines several animation3d.Action objects to an animation.
Updates the scene. Without this acton and animation is not visible.
Animates the given actions by creating a animation3d.Timeline, adding an animation3d.UpdateAction and calling start.
When you have more than 2 points two interpolate (for example following a path), this is a better choice than a linear interpolator.
Cubic b-spline interpolator. v0 and v3 are begin and end point respectively, v1 and v2 are control points.
\frac{1}{6} \begin{bmatrix} -1 & 3 & -3 & 1 \\ 3 & -6 & 3 & 0 \\ -3 & 0 & 3 & 0 \\ 1 & 4 & 1 & 0 \end{bmatrix}
Cubic Bezier interpolator. v0 and v3 are begin and end point respectively, v1 and v2 are control points.
\begin{bmatrix} -1 & 3 & -3 & 1 \\ 3 & -6 & 3 & 0 \\ -3 & 3 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix}
Cubic Catmull Rom interpolator. v0 and v3 are begin and end point respectively, v1 and v2 are control points.
\frac{1}{2} \begin{bmatrix} -1 & 3 & -3 & 1 \\ 2 & -5 & 4 & -1 \\ -1 & 0 & 1 & 0 \\ 1 & 2 & 0 & 0 \end{bmatrix}
Cubic hermite interpolator. v0 and v3 are begin and end point respectively, v1 and v2 are control points.
\frac{1}{6} \begin{bmatrix} 2 & 1 & -2 & 1 \\ -3 & -2 & 3 & -1 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \end{bmatrix}
Cubic interpolator. Gives better continuity along the spline than the cosine interpolator, however needs 4 points to interpolate.
Hermite interpolator. Allows better control of the bends in the spline by providing two parameters to adjust them:
Using 0 bias gives a cardinal spline with just tension, using both 0 tension and 0 bias gives a Catmul-Rom spline.
Kochanek-Bartels interpolator. Allows even better control of the bends in the spline by providing three parameters to adjust them:
Using 0 continuity gives a hermite spline.
Interpolates a whole vector at once.
Good interpolator when you have two values to interpolate between, but doesn’t give fluid animation when more points are involved since it follows straight lines between the points.