Fingerprint ID: | 0x33445350 |
---|

New in version 0.5-rc2.

This fingerprint, from RC/Funge-98, implements operations on three-dimensional vectors and 4 by 4 matrices. It provides the following commands:

`A`:*a*^{v3}*b*^{v3}—*(a+b)*^{v3}- Adds two three-dimensional vectors.
`B`:*a*^{v3}*b*^{v3}—*(a-b)*^{v3}- Subtracts three-dimensional vector
*b*from*a*. `C`:*a*^{v3}*b*^{v3}—*(a×b)*^{v3}- Calculates cross product of two three-dimensional vectors.
*a*and*b*should be in the correct order, as cross product is not commutative. `D`:*a*^{v3}*b*^{v3}—*(a·b)*- Calculates dot product of two three-dimensional vectors.
`L`:*a*^{v3}—*sqrt(a·a)*- Calculates length of given three-dimensional vector, defined as a square root of dot product of
*a*and*a*. `M`:*a*^{v3}*b*^{v3}—*(ab)*^{v3}- Multiplies two three-dimensional vectors.
`N`:*a*^{v3}—*a÷sqrt(a·a)*^{v3}- Normalizes the given three-dimensional vector, so its length is 1. If
*a*is zero vector, pushes itself. `U`:*a*^{v3}—*a*^{v3}*a*^{v3}- Duplicates the given three-dimensional vector.
`V`:*a*^{v3}—*x**y*- Projects the given three-dimensional vector to 2D view. In the other words, a vector
*a***i**+*b***j**+*c***k**projects to (*a*÷*c*)**i**+(*b*÷*c*)**j**. If*c*is zero it is assumed to be 1. `Z`:*a*^{v3}*n*^{fp}—*(na)*^{v3}- Multiplies the given three-dimensional vector by scalar.

The following commands reflect in Unefunge mode.

`P`:*dest*^{v}*src*^{v}—- Copies the matrix starting at
*src*to*dest*, in the Funge space. `R`:*dest*^{v}*axis**angle*^{fp}—- Puts the transformation matrix rotating
*angle*degrees by*axis*to*dest*in the Funge space.*axis*is 1 for X axis, 2 for Y axis and 3 for Z axis. Reflects if*axis*is invalid. `S`:*dest*^{v}*scale*^{v3}—- Puts the transformation matrix scaling by factor of
*scale*for each axes. `T`:*dest*^{v}*offset*^{v3}—- Puts the transformation matrix translating by
*offset*for each axes. `X`:*a*^{v3}*source*^{v}—*(aM)*^{v3}- Multiplies the three-dimensional vector by the transformation matrix
*M*given by*source*. Actually it multiplies in the reverse order: the result should be*a**M*. `Y`:*target*^{v}*sourcea*^{v}*sourceb*^{v}—- Multiplies two matrices
*A*and*B*given by*sourcea*and*sourceb*, and puts it to*target*in the Funge space. Actually it multiplies in the reverse order: the result should be*B**A*.

Three-dimensional vector consists of three single precision floating point number, as used by *FPSP fingerprint*. 4 by 4 matrix in the Funge space occupies 4 by 4 cells, for example from (x,y,z) to (x+3,y+3,z) in Trefunge, and of course uses same floating point number.