beautypg.com

Interpolation methods – Adobe After Effects CS3 User Manual

Page 570

background image

AFTER EFFECTS CS3

User Guide

565

If minValOrArray and maxValOrArray are Numbers, this method returns a random number. Approximately 90% of
the results are between minValOrArray and maxValOrArray, and the remaining 10% are outside of this range. If the
arguments are Arrays, this method returns an Array of random numbers with the same dimension as the argument
with the greater dimension. For each component, approximately 90% of the results are between the corresponding
components of minValOrArray and maxValOrArray, and the remaining 10% are outside of this range. The results
have a Gaussian (bell-shaped) distribution.

noise(valOrArray)

Return type: Number.

Argument type: valOrArray is a Number or an Array [2 or 3].

Returns a number between -1 and 1. The noise is not actually random; it is based on Perlin noise, which means that
the return values for two input values that are near one another will also tend to be near one another. This kind of
noise is useful when you want a sequence of seemingly random numbers that don’t vary wildly from one to the
other—as is usually the case when animating any sort of apparently random natural motion. Example:

rotation +

360*noise(time)

Interpolation methods

For all of the Interpolation methods, the argument

t

is often

time

or

value

, though it can have other values, instead.

If

t

is

time

, the interpolation between values happens over a duration. If

t

is

value

, then the expression maps one

range of values to a new range of values.

linear(t, tMin, tMax, value1, value2)

Return type: Number or Array.

Argument type: t, tMin, and tMax are Numbers, and value1 and value2 are Numbers or Arrays.

Returns value1 when t <= tMin. Returns value2 when t >= tMax. Returns a linear interpolation between value1 and
value2 when tMin < t < tMax.

For example this expression on the Opacity property causes Opacity values to ramp linearly from 20% to 80% over
the time from 0 to 6 seconds:

linear(time, 0, 6, 20, 80)

This method—like all of the Interpolation methods—can also be used to convert from one range of values to another.
For example this expression on the Opacity property converts the Opacity values from the range 0%-100% to the
range 20%-80%:

linear(value, 0, 100, 20, 80)

linear(t, value1, value2)

Return type: Number or Array.

Argument type: t is a Number, and value1 and value2 are Numbers or Arrays.

Returns a value that linearly interpolates from value1 to value2 as t ranges from 0 to 1. Returns value1 when t <= 0.
Returns value2 when t >= 1.

ease(t, value1, value2)

Return type: Number or Array.

Argument type: t is a Number, and value1 and value2 are Numbers or Arrays.

Similar to

linear

with the same arguments, except that the interpolation eases in and out so that the velocity is 0 at

the start and end points. This method results in a very smooth animation.

ease(t, tMin, tMax, value1, value2)

Return type: Number or Array.

Argument type: t, tMin, and tMax are Numbers, and value1 and value2 are Numbers or Arrays.