Internal Variables

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


in addition to these there are several constants

Constants

Constant Value
PI 3.1415926535897932384626433832795028841971
E 2.7182818284590452353602874713526624977572
PHI 1.6180339887498948482045868343656381177203

expressions are pretty bland without operators and ProXimus features just about every binary operator and function you could want.

here is a list of all binary operators, binary operators work on two variables one on either side of them.
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


Here is an extensive list of available built in functions all functions accept one or more parameters passed within parentheses (i.e. function(parameter) )

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

layers can not be named the same as any built in variable or constant, in addition layers may not contain any numbers.
ProXimus places no restrictions on the output image, it can have any width or height, and colors are handled internally as double precision floating point complex number pairs. ProXimus handles all math as complex, though usually it can avoid the more expensive math if it isn't needed.

for more detailed explanations on syntax read the language reference



back to the ProxDox home