The following chapter contains Expressions functions.
The Expressions Conditional functions return values based on explicit conditions.
Function | Description |
---|---|
If(expr1, expr2, expr3) | Returns the value of the second or third expression, depending on the evaluation of the first one: if expr1 evaluates to true, returns to expr2; returns expr3 otherwise. Expr1 is a boolean expression. Expr2 and expr3 can be two values, two vectors, or two boolean expressions. This enables users to piece together snippets along the time domain. |
Expressions Math Functions let you express advanced math functions.
Function | Description |
---|---|
Abs (number) | Returns the absolute value of a given number. |
Sign (number) | Returns the sign of the given number. |
Pow (number, power) | Returns a number to the power of an exponent. |
Sqrt (number) | Returns the square root of a given number. |
Mod (number, divisor) | Returns the remainder from dividing one number by another. |
Average (number1, number2) | Returns the average of the given values. |
Log (number) | Returns the logarithm to base 10 of the given value (for base -2 log, use Ln). |
Ln (number) | Returns the natural logarithm of the given value. |
Exp (number) | Returns the exponential of the given value. |
Min (number1,number2) | Returns the smaller of the given numbers. |
Max (number1, number2) | Returns the larger of the given numbers. |
The Expressions Profile functions return values based on curve profiles.
Function | Description |
---|---|
Bell (center, height, width) | Returns the Gaussian (normal distribution) function, also known as a bell-shaped or bell curve, based on the center time, height and half-height-width of the curve. |
EaseIn (start time, end time) | Returns an increasing Hermite-like transition S-curve between two given times. |
EaseOut (start time, end time) | Returns a decreasing Hermite-like transition S-curve between two given times. |
Sinus (period, amplitude,offset) | Returns a sinus profile curve based on the given period, amplitude and offset values. |
Square (period, amplitude,offset) | Returns a square profile curve based on the given period, amplitude and offset values. |
Expressions Random Number functions are operators that return random values based on given vectors and seed values.
Function | Description |
---|---|
Rand (seed) | Returns a random value between 0.0 and 1.0, based on the given seed. |
TrueRand (low, high) | Returns a truly random value between two given numbers. The sequence of returned values constantly changes, never producing past results. |
Noise (seed) | Returns a random value between -1 and 1, based on a given seed. |
Turbulence (seed, level) | Returns a random value between -1 and 1, based on a given vector and with the ability to control the level of smoothness of the resulting curve. |
Noise3 (seed) | Returns a random vector for all elements in a vector between -1 and 1. |
Turbulence3 (3d_seed,level) | Returns a random vector with all the elements in the vector between -1 and 1, with the ability to control the level of smoothness of the resulting curve. |
The Expressions Rounding Functions return rounded values.
Function | Description |
---|---|
Round (number) | Returns a number rounded to the nearest integer. |
Ceil (number) | Rounds a number up to the next integer value regardless of its value. |
Floor (number) | Rounds a number down to the next integer value regardless of its value. |
Trunc (number) | Returns the integer value of a number by truncating its fractional part. |
The Expressions Time functions return values based on time.
Function | Description |
---|---|
t | Returns the current time in seconds. |
Eval | Returns the value of a given expression at another point in time. |
The Expressions Trigonometric functions return or convert values using trigonometric functions.
Function | Description |
---|---|
Degrees (angle) | Converts angle units from radians into degrees. |
Radians (angle) | Converts angle units from degrees into radians. |
Cos (angle) | Returns the cosine of a given angle in degrees. |
Sin (angle) | Returns the sine of a given angle in degrees. |
Tan (angle) | Returns the tangent of a given angle in degrees. |
Acos (number) | Returns the arc-cosine (in degrees, from 0 to 180) of a given number. |
Asin (number) | Returns the arcsine (in degrees, from -90 to 90) of a given number. |
Atan (number) | Returns the arctangent (in degrees, from -90 to 90) of a given number. |
Atan2 (X, Y) | Returns the arctangent of y/x, using the signs of both arguments to determine the quadrant of the return value. The returned angle is given in degrees within the range 180 to -180. |
Expressions Vector functions are used to express vector behavior.
Function | Description |
---|---|
(expr1, expr2, expr3) | Returns a vector composed of the evaluation of the individual component expression. |
Dot (vector1, vector2) | Returns the dot product of two vectors. |
Cross (vector1, vector2) | Returns a vector, the cross product of two vectors. |
Length (vector) | Returns the length of a given vector. |
LookAt (targetPos,ObserverPos, AlignVector) | Returns a rotation vector based on a target position, an observer position and an align direction vector. |
Align (targetPos, alignVector, bankingAngle) | Returns a rotation vector such that a designated axis of an object is aligned with the direction of the object's movement. The banking angle controls the rotation around the axis, in radians. |
Distance (pos1, pos2) | Returns the distance between the two points represented by the vectors pos1 and pos2. |
relangle | relangle (point1, point2, delta1, delta2): returns the angle between two vectors (point1,point2) and (point1+delta1,point2+delta2). All parameters are 2D vectors.This is used for implementing rotation tracking. |
relscale | relscale (point1, point2, delta1, delta2): returns the ratio between the length of vector (point1+delta, point2+delta2) and (point1, point2).All parameters are 2D vectors.This is used for implementing scale tracking. |
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License