|
Variable
|
Range
|
Description
|
|
x
|
0(left) to 1(right)
|
the x Cartesian coordinate of the pixel
|
|
y
|
0(top) to 1(bottom)
|
the y Cartesian coordinate of the pixel
|
|
X
|
-1(left) to 1(right)
|
the x Cartesian coordinate of the pixel with 0 in the center of the layer
|
|
Y
|
-1(top) to 1(bottom)
|
the y Cartesian coordinate of the pixel with 0 in the center of the layer
|
|
r
|
0(center of the layer) to 1 (edge of the layer)
|
polar radius centered in the middle of the layer. Note: the range actually goes to sqrt(2) in the corners of the layer
|
|
ang
|
-pi(pointing left) rotating counter clockwise to pi(also pointing left)
|
polar angle, most situations with the angle it's most useful to measure in radians
|
|
Operator
|
Description
|
|
+
|
Add the first operand to the second
|
|
-
|
Subtract the second operand from the first
|
|
*
|
multiply the two operands together
|
|
/
|
divide the first operand by the second
|
|
^
|
raise the first operand to the second operand's power
|
|
%
|
first operand modulus second operand
|
|
<
|
if the first operand is less than the second it returns 1.0, otherwise it returns 0.0
|
|
>
|
if the first operand is greater than the second it returns 1.0, otherwise it returns 0.0
|
|
=
|
if the first operand is equal to the second it returns 1.0, otherwise it returns 0.0
|
|
#
|
the first-operand'th root of the second operand (2#16==4)
|
|
~
|
log of the second operand using the first operand as base
|
|
Function
|
Description
|
|
log
|
log base 10
|
|
ln
|
natural log
|
|
sqrt
|
square root
|
|
deg
|
radian to degree
|
|
rad
|
degree to radian
|
|
!
|
factorial, it works a bit oddly !(var) rather than var! as you would expect
|
|
abs
|
absolute value
|
|
ipart
|
returns only the whole number (floor function)
|
|
fpart
|
strips off whole numbers, leaving only the less than 1 part
|
|
sign
|
returns -1 for numbers less than 0 and 1 for number more than 0
|
|
not
|
returns 0 if you pass it 1, zero under all other cases
|
|
clamp
|
returns 1 if passed over 1, 0 if under 0, otherwise returns what it was passed
|
|
sin
|
sine
|
|
cos
|
cosine
|
|
tan
|
tangent
|
|
arcsin
|
inverse of sin
|
|
arccos
|
inverse of cosine
|
|
arctan
|
inverse of tangent
|
|
hypsin
|
hyperbolic sine
|
|
hypcos
|
hyperbolic cosine
|
|
hyptan
|
hyperbolic tangent
|
|
noise
|
5 variable dynamic noise function, generates tileing 2d noise for a given resolution. parameters are seed x resolution, y resolution, x position, y position
|