gillcup.easing

[XXX]

Adapded partially from Robert Penner’s Easing Equations, as they appear in the Qt library. The original license follows:

TERMS OF USE - EASING EQUATIONS

Open source under the BSD License.

Copyright © 2001 Robert Penner

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

gillcup.easing.bounce(amplitude)[source]

Bounce easing

gillcup.easing.circ(t)[source]

Circular easing

gillcup.easing.cubic(t)[source]

Cubic easing

t → t**3

gillcup.easing.elastic(period, amplitude=1)[source]

Elastic easing

gillcup.easing.exp(t)[source]

Exponential easing

gillcup.easing.linear(t)[source]

Linear interpolation

t → t

gillcup.easing.normalized(func)[source]

Decorator to normalize another easing function

Normalizing is done so that f(0) == 0 and f(1) == 1.

gillcup.easing.overshoot(amount)[source]

Overshoot easing

gillcup.easing.quad(t)[source]

Quadratic easing

t → t**2

gillcup.easing.quart(t)[source]

Quartic easing

t → t**4

gillcup.easing.quint(t)[source]

Quintic easing

t → t**5

gillcup.easing.showcase(items=['(poly)', 'sin', 'exp', 'circ', 'elastic_example', 'overshoot_example', 'bounce_example'])[source]

Show graphs of the easing functions in this module

gillcup.easing.sin(t)[source]

Sinusoidal easing

Quarter of a cosine wave

Project Versions

Previous topic

gillcup.animatedobject

Next topic

gillcup.graphics

This Page