User Guide

333
ADOBE AFTER EFFECTS 5.0
User Guide
Array [2 or 3] to_comp(point, t = time) {point is an array [2 or 3], and t is a number}
Transforms a point from layer space to comp space. For example,
“to_comp(anchor_point)”.
Array [2 or 3] from_comp (point, t=time) {point is an array [2 or 3], and t is a number}
Transforms a point from comp space to layer space. The resulting point in a 3D layer may
have a nonzero value even though it is in layer space. For example (2D layer),
“from_comp(this_comp.layer(2).position)”.
Array [2 or 3] to_world(point, t=time) {point is an array [2 or 3], and t is a number} Trans-
forms a point from layer space to view-independent world space. For example,
“to_world(effect("Bulge").param("Bulge Center")”.
Array [2 or 3] from_world(point, t=time) {point is an array [2 or 3], and t is a number}
Transforms a point from world space to layer space. For example,
“from_world(this_comp.layer(2).position)”.
Array [2 or 3] to_comp_vec(point, t=time) {point is an array[2 or 3], and t is a number}
Transforms a vector from layer space to comp space. For example, “to_comp_vec([1, 0])”.
Array [2 or 3] from_comp_vec(point, t=time) {point is an array[2 or 3], and t is a number}
Transforms a vector from comp space to layer space. For example (2D layer),
dir=sub(position, this_comp.layer(2).position); from_comp_vec(dir)”.
Array [2 or 3] to_world_vec(point, t=time) {point is an array[2 or 3], and t is a number}
Transforms a vector from layer space to world space. For example, “p1 = effect("Eye Bulge
1").param("Bulge Center"); p2 = effect("Eye Bulge 2").param("Bulge Center");
to_world(sub(p1, p2))”.
Array [2 or 3] from_world_vec(point, t=time) {point is an array [2 or 3], and t is a
number} Transforms a vector from world space to layer space. For example,
“from_world(this_comp.layer(2).position)”.
Array [2] from_comp_to_surface(point, t=time) {point is an array [2 or 3], and t is a
number} Use with 3D layers only. Projects a point located in comp space to a point on the
surface of the layer (zero z-value) at the location where it appears when viewed from the
active camera. This is useful for setting effect control points.
UG.book Page 333 Wednesday, February 21, 2001 12:05 PM