Script
Mathmematical formulas and functions list of operation vsl object
var R3MPOPER_ADD = 0;
add - addition of two channels
var R3MPOPER_CROSS = 1;
cross product - computes cross product of inputs, the result is perpendicular to both
var R3MPOPER_DIV = 2;
divide - p1/p2
var R3MPOPER_PMUL = 3;
dot product - (x1, y1, z1) dot product (x2, y2, z2) = (x1*x2, y1*y2, z1*z2)
var R3MPOPER_MAX = 4;
max - maximum(p1, p2)
var R3MPOPER_MIN = 5;
min - output = minimum(p1, p2)
var R3MPOPER_MUL = 6;
multiply - p1*p2
var R3MPOPER_POW = 7;
power - p1 to the power of p2
var R3MPOPER_SIN = 8;
sin
var R3MPOPER_SQRT = 9;
sqrt - square root
var R3MPOPER_SUB = 10;
subtract - p1-p2
var R3MPOPER_TAN = 11;
tangent
var R3MPOPER_INVCOMB = 12;
1-(1-p1)(1-p2) - some useful formulas
var R3MPOPER_MOD = 13;
modulo - p1%p2 (floating point modulo)
var R3MPOPER_NEGATE = 14;
negate - -p1
var R3MPOPER_FABS = 15;
abs. value - absolute value, inverts sign of negative values
var R3MPOPER_LENGTH = 16;
length - the length of the input vector = square_root(x*x + y*y + z*z)
var R3MPOPER_LOG = 17;
logarithm - natural logarithm
var R3MPOPER_COS = 18;
cos
var R3MPOPER_COT = 19;
cotangent
var R3MPOPER_ARCSIN = 20;
arc sin
var R3MPOPER_ARCCOS = 21;
arc cos - usual trigonometric inverse functions
var R3MPOPER_ARCTAN = 22;
arc tan
var R3MPOPER_EXP = 23;
exponent - exp(p1)
var R3MPOPER_NORM = 24;
normalize - (x, y, z) - (x, y, z)/squareroot(x*x + y*y + z+z)
var R3MPOPER_ARCCOT = 25;
arc cot
var R3MPOPER_FLOOR = 26;
floor - rounding down to integer value
var R3MPOPER_CEILING = 27;
ceiling - rounding up to integer value
var R3MPOPER_ROUND = 28;
round - rounding to the nearest integer
var R3MPOPER_COMMUL = 29;
(x,y,z)-xyz
var R3MPOPER_ONESUB = 30;
1-p1
var R3MPOPER_LININTERP = 31;
(1-p1)*p2+p1*p3 - linear interpolation
var R3MPOPER_AVERAGE = 32;
(p1+p2)/2 - average of input channels
var R3MPOPER_POLAR = 33;
polar - transforms cartesian coordinates to polar coordinates (heading, pitch, distance)
var R3MPOPER_ONEMODULO = 34;
modulo by 1 - p1%1, the decimal part of p1
var R3MPOPER_COMAVERAGE = 35;
(x,y,z)-(x+y+z)/3 - sub channel average. Can be used in color to gray scale conversion, etc
var R3MPOPER_INVERT = 36;
invert - 1/p1
var R3MPOPER_REFRACT = 37;
refract - computes light refraction refracted ray=refract(exterior thickness, interior thickness, incoming ray, surface normal)
var R3MPOPER_REFLECT = 38;
reflect - reflects a ray p1 with respect to a unit normal vector p2.
var R3MPOPER_SIGN = 39;
sign - -1 if parameter is negative, 0 if zero, +1 if positive.
var R3MPOPER_LASTOPER = 40;
nul


<Top> <Script> <Next>