2009

Expression Controller Techniques
This topic summarizes some useful expression techniques. The following topics
review trigonometric functions and vector arithmetic. If youre familiar with
these subjects you can skip the review topics. Use these expressions when you
have applied an Expression controller using the Assign Controller rollout in
the Motion panel.
Commonly Used Expressions
This topic lists some expressions that you might find useful in situations when
you animate.
Circular Path
[ Radius * cos(360*Time),
Radius * sin(360*Time), 0 ]
where Time is one of the predefined time variables such as NT or S.
If you make the two Radius values unequal, you get an elliptical path.
If you specify a nonzero Z component, the path is no longer planar.
Following Another Object
[X, Y, Z] + Position
where Position is the Position controller of the second object.
The vector [X, Y, Z] can be an offset from the second object. (If its [0,0,0], the
two objects occupy the same position.) It can also be a vector expression that
specifies some movement in itself.
Keeping an Object Between Two Objects
(Position1 + Position2) / 2
where Position1 and Position2 are the Position controllers of two objects.
The divisor 2 constrains the object to be halfway between the two other objects.
Other values constrain the object to other locations.
Bouncing Between Other Objects
(1+sin(360*Time))/2 * (Pos1-Pos2) + Pos2
Expression Controller | 3161