Interface ZLerp

public interface ZLerp

ZLerp is an interface for specifying how to interpolate a double over an interval.

Ben Bederson
See Also:

Method Summary
 double lerpTime(double t)
          This method specifies how to interpolate a double over the interval [0, 1].

Method Detail


public double lerpTime(double t)
This method specifies how to interpolate a double over the interval [0, 1]. Traditionally, a lerp (linear interpolation) smoothly varies a variable from one point to another over time. The standard lerp function follows as t varies from 0 to 1. However, for animation, it is often desired to have animation functions that have various properties instead of a pure smooth movement. For instance, a standard alternative is Slow-In-Slow-Out (SISO) where the animation starts slowly, picks up speed in the middle, and slows down at the end. This can be implemented by modifying the standard lerp so that t is replaced with a function that replaces t with a SISO version of t. siso(t) might return sub-linear values for small t, super-linear values for middle t, and sub-linear values again for large t.

This function is meant to define a function that modifies t in a way suitable for use by a lerp function.

See Also:
ZTransformGroup.animate(edu.umd.cs.jazz.ZTransformable, java.awt.geom.AffineTransform, int, edu.umd.cs.jazz.ZDrawingSurface)

Copyright � 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.