Using Help | Contents | Index Back - Adobe AFTER EFFECTS 5.5 Help Manual

Table of Contents

Advertisement

Adobe After Effects Help
Using Help
|
Contents
Array mul(v1, amount) {v1 is an array, amount is a number} Multiplies every element of
the vector by the amount.
Array div(v1, amount) {v1 is an array, amount is a number} Divides every element of the
vector by the amount.
Number length(v) {v is an array} Returns the length of vector v.
Number length(p1, p2) {p1 and p2 are arrays} Returns the distance between two points. P2
is optional. For example, "length(p1, p2)" is the same as "length(sub(p1, p2))" .
Array normalize(v) {v is an array} Normalizes the vector so that its length is 1.0. This is a
short way of writing "div(v, length(v))" .
Array [2 or 3] cross(v1, v2) {v1 and v2 are arrays [2 or 3]} Returns a vector cross-product.
Refer to a math reference guide or JavaScript guide for more information.
Number dot(v1, v2) {v1 and v2 are arrays} Returns a dot product, which is the result of
multiplying the two vectors together componentwise.
Array [3] look_at(from_pt, at_pt) {from_pt and at_pt are arrays [3]} From_pt is the location
in world space of the layer you want to orient. At_pt 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 at_pt. It is especially useful for cameras and
lights. For example, "look_at(position, this_comp.layer(1).position)" . If you use this on a
camera, turn off auto-orientation.
Random number methods
Number random() The resulting value is a random number between 0 and 1.
Number random(max) {max is a number} The resulting value is a number between 0 and
max, and is the same dimension as max.
Number random(min, max) {min and max are numbers} The resulting value is a number
between min and max.
Array random(max_arr) {max_arr is an array} The resulting value is an array with the same
dimension as max_arr, with each component ranging between 0 and max_arr.
Array random(min_arr, max_arr) {min_arr and max_arr are arrays} The resulting value is
an array with the same dimension as min_arr and max_arr, with each component ranging
between min_arr and max_arr. For example, the expression "random([100, 200], [300,
400])" returns an array whose first value is between 100 and 300, and whose second value
is between 200 and 400. If the two input dimensions don't match, the shorter one is filled
out with zeros.
Number gauss_random() The resulting value is a random number between 0 and 1. The
results have a bell-shaped distribution. About 90% of the results are between 0 and 1, and
the remaining 10% are beyond the edges.
Number gauss_random(max) {max is a number} The resulting value is a random number
between 0 and max. The results have a bell-shaped distribution. About 90% of the results
are in the 0 to max range, and the remaining 10% are beyond the edges.
Number gauss_random(min, max) {min and max are numbers} The resulting value is a
random number between min and max. The results have a bell-shaped distribution. About
90% of the results are in the min to max range, and the remaining 10% are beyond the
edges.
Using Help
|
Contents
|
Index
|
Index
Creating Expressions
Back
256
Back
256

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents