Random Numbers Methods - Adobe AFTER EFFECTS 7.0 Manual

Table of Contents

Advertisement

ADOBE AFTER EFFECTS 7.0
574
User Guide
Returns the distance between two points. The point2 parameter is optional. For example,
is
lengt h(p oi nt1, p oint2)
the same as
.
lengt h(sub(p oint1, p oint2))
Return type: Array [3].
lookAt(fromPoint, atPoint)
Argument type: fromPoint and atPoint are Arrays [3].
The argument fromPoint is the location in world space of the layer you want to orient. The argument atPoint is the
point in world space you want to point the layer at. The return value can be used as an expression for the Orientation
property, making the layer's z-axis point at atPoint. This method is especially useful for cameras and lights. If you use
this on a camera, turn off auto-orientation. Example:
lo okAt(p osit ion, t hisC omp.layer(1).p osit ion)

Random Numbers methods

Return type: none.
seedRandom(seed, timeless=false)
Argument type: seed is a Number, timeless is a Boolean.
Takes the existing seed and increments it by a random value that depends on the layer's index (number), stream
(property), and time. If timeless is true, the seed does not depend on time.
Return type: Number.
random()
Returns a random number between 0 and 1.
Return type: Number or Array.
random(maxValOrArray)
Argument type: maxValOrArray is a Number or Array.
If maxValOrArray is a Number, this method returns a number between 0 and maxValOrArray. If maxValOrArray is
an Array, this method returns an Array with the same dimension as maxValOrArray, with each component ranging
between 0 and the corresponding component of maxValOrArray.
Return type: Number or Array.
random(minValOrArray, maxValOrArray)
Argument type: minValOrArray and maxValOrArray are Numbers or Arrays.
If minValOrArray and maxValOrArray are Numbers, this method returns a number between minValOrArray and
maxValOrArray. If the arguments are Arrays, this method returns an Array with the same dimension as the
argument with the greater dimension, with each component between the corresponding components of
minValOrArray and maxValOrArray. For example, the expression
returns an Array
random([100, 200], [300, 400])
whose first value is between 100 and 300 and whose second value is between 200 and 400. If the dimensions of the
two input Arrays don't match, higher-dimension values of the the shorter Array are filled out with zeros.
Return type: Number.
gaussRandom()
Returns a random number. The results have a Gaussian (bell-shaped) distribution. Approximately 90% of the results
are between 0 and 1, and the remaining 10% are outside this range.
Return type: Number or Array.
gaussRandom(maxValOrArray)
Argument type: maxValOrArray is a Number or Array.
When maxValOrArray is a Number, this method returns a random number. Approximately 90% of the results are in
the 0 to maxValOrArray range, and the remaining 10% are outside of this range. When maxValOrArray is an Array,
this method returns an Array of random values, with the same dimension as maxValOrArray. Ninety percent of the
values range between 0 and the value in maxValOrArray, and the remaining 10% are outside of this range. The results
have a Gaussian (bell-shaped) distribution.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents