Maths

This section describes operators belonging to the Maths

This page discusses:

Abs

Returns the absolute value of a real number.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result —

Acos

Returns the arccosine of a value, the reverse function of cosine.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Acosh

Returns the hyperbolic arccosine of a value, the reverse function of hyperbolic cosine.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

All True

Checks that all items are True. Extension of 'And' with a list.

Inputs

Name Type Description
List Boolean List of boolean items to check.

Outputs

Name Type Description
Result Boolean True if all items are True. False otherwise.

And

Performs a boolean conjunction operation on 2 boolean values.

Inputs

Name Type Description
A Boolean First boolean operand.
B Boolean Second boolean operand.

Outputs

Name Type Description
Result Boolean Resulting boolean of the operation.

Any True

Checks that at least one item is True. Extension of 'Or' with a list.

Inputs

Name Type Description
List Boolean List of boolean items to check.

Outputs

Name Type Description
Result Boolean True if at least one item is True. False otherwise.

Asin

Returns the arcsine of a value, the reverse function of sine.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Asinh

Returns the hyperbolic arcsin of a value, the reverse function of hyperbolic sine.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Atan

Returns the arctangent of a value, the reverse function of tangent.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Atanh

Returns the hyperbolic arctangent of a value, the reverse function of hyperbolic tangent.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Ceil

Returns the smallest integer value that is greater than or equal to the value specified in the input. If the input value is a dimension (with unit), a conversion to Real is done using mks unit.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Integer —

Cos

Returns the cosine of an angle.

Inputs

Name Type Description
Angle Real —

Outputs

Name Type Description
Result Real —

Cosh

Returns the hyperbolic cosine of an angle.

Inputs

Name Type Description
Angle Real —

Outputs

Name Type Description
Result Real —

Create Function

Creates a function of one variable x from its expression given in input.

Inputs

Name Type Description
Expression String Expression that defines the function. For example: 3*cos(x)+2.

Outputs

Name Type Description
Function MathFunctionX Represents the defined function. You might want to evaluate it afterwards using the 'Eval' node for example.

Cross Product

Returns the Cross Product from 2 Vectors.

Inputs

Name Type Description
Vector 1 Vector —
Vector 2 Vector —

Outputs

Name Type Description
Vector Vector —

Cube

Returns the cube of a real number.

Inputs

Name Type Description
X Real Number to cube.

Outputs

Name Type Description
Result —

Cube Root

Returns the cube root of a real number.

Inputs

Name Type Description
X Real Real number to root.

Outputs

Name Type Description
Result Cube root.

Curve Evaluator

Creates a curve and evaluates it. Input 'x' should be a real between 0 and 1. Output will be y.

Inputs

Name Type Description
X Real Represents an abscissa. It should be a real between 0 and 1.
Minimum Real Represents the minimum value when scaling output.
Maximum Real Represents the maximum value when scaling output.

Outputs

Name Type Description
Y Represents (max-min) * f(x) + min.

Determinant

Computes matrix determinant.

Inputs

Name Type Description
Matrix Matrix Input matrix.

Outputs

Name Type Description
Determinant Real Matrix determinant.

Direction

Creates the direction defined by two points.

Inputs

Name Type Description
Point 1 —
Point 2 —

Outputs

Name Type Description
Direction Vector Created vector.

Display Vector

Displays a vector with an arrow and an optionnal text at a given position.

Inputs

Name Type Description
Position Vector Position of the vector origin.
Direction Vector The direction vector to display.
Length Length Length of the arrow.
Text String Associated text.
Color Color Color of the arrow and the text.
Height Length Height of the arrow symbol.
Thickness Integer Thickness of the line and arrow.
Fixed Boolean Tells if arrow size is fixed or depends on the viewpoint.

Outputs

Name Type Description
DisplayVector —

Distribution

Returns a number of random draws following a discreet probability law. The result of each draw is an integer between 1 and Nb indicating which item of the distribution list has been drawn.

Inputs

Name Type Description
Distribution List List of reals for the discreet probability law. Each real should be comprised between 0 and 1. The sum of all the items of the list should be equal to 1.
Number Integer Number of wanted draws.

Outputs

Name Type Description
Result List List containing the result of each draw.

Divide

Returns the division between two real numbers.

Inputs

Name Type Description
A First number.
B Second number.

Outputs

Name Type Description
Result —

E

Returns the value of Euler constant.

Outputs

Name Type Description
E Real —

Eval

Evaluates a function of variable x and returns y.

Inputs

Name Type Description
Function X Function Function of one variable x to be evaluated.
X Value Real Variable x value.

Outputs

Name Type Description
Y Value Real Result of evaluation of the function.

Exp

Returns the exponential of a real number.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Factorial

Returns the factorial of an integer.

Inputs

Name Type Description
Number Integer —

Outputs

Name Type Description
Result Integer Factorial of n.

Find Range Bounds

Finds in a list of ranges for a given value: which range(s) contains it, distance(s) and ratio(s) to the bounds. Each range is defined by the pair of values constituting its bounds.

Inputs

Name Type Description
Value Real Value to be ranged within intervals.
Mode Integer All : returns all the ranges containing the value Largest : returns the largest range containing the value Smallest : returns the smallest range containing the First : returns the first rang containing the value.
Range Bounds 1 Real List of the first bounds of each range. The size of this list should be the same as Range Bounds 2.
Range Bounds 2 Real List of the second bounds of each range. The size of this list should be the same as Range Bounds 1.

Outputs

Name Type Description
Index Integer Bounds range index(es), depending on the input mode, All: multiple result list for all ranges containing the value Largest/Smallest/First: single result item, results (bounds, dist. , ratio) concerns range type selected in mode.
Bounds 1 Real First bounds of ranges (list of same size of index).
Bounds 2 Real Second bounds of ranges (list of same size of index ).
Distance Real Distance of the value to the closest bounds in ranges (list of same size of index).
Ratio Real Ratio value inside the ranges, starting from the first bounds (list of same size of index).

Floor

Returns the largest integer value that is less than or equal to the value specified in the input. If the input value is a dimension (with unit), a conversion to Real is done using mks unit.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Integer —

Function Editor

Creates a curve and a Bezier function. Input 'x' should be a real between 0 and 1. Output is a Bezier function which is equivalent to the drawn shape.

Inputs

Name Type Description
Minimum Real Represents the minimum value when scaling output.
Maximum Real Represents the maximum value when scaling output.

Outputs

Name Type Description
Function MathFunctionX Represents the defined Bezier function. You might want to evaluate it afterwards using the 'Eval' node for example.

Identity Matrix

Creates an identity matrix.

Inputs

Name Type Description
Dimension Integer Wanted matrix dimension.

Outputs

Name Type Description
Matrix Matrix Identity matrix.

Integer Divide

Returns the integer division of a by b.

Inputs

Name Type Description
A Real —
B Real —

Outputs

Name Type Description
Result Integer Integer division result.

Invert Vector

Returns the same input vector but in the opposite direction.

Inputs

Name Type Description
Vector Vector —

Outputs

Name Type Description
Inverted Vector Vector —

Is Between

Tests whether a value is within a range defined by two other values.

Inputs

Name Type Description
Value Real Value to be ranged within an interval.
Bound 1 Real First bound of range.
Bound 2 Real Second bound of range.
With bound 1 Boolean Check with (TRUE) or without (FALSE) bound 1.
With bound 2 Boolean Check with (TRUE) or without (FALSE) bound 2.

Outputs

Name Type Description
Result Boolean 'True' if the value is is within the provided range defined, 'False' otherwise.
Distance Distance to closest bound. If the value is not between the two bounds, returns a negative distance.
Ratio Real Ratio value inside the range (starting from the first bound). If the value is not between the bounds, the ratio is negative.

Ln

Returns the logarithm of a real number.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Log

Returns the base 10 logratithm of a real number.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Result Real —

Matrix

Creates a Matrix object from a List of List of values.

Inputs

Name Type Description
Table Real List of list of values to set the Matrix.
Orientation Boolean Orientation of the Matrix.

Outputs

Name Type Description
Matrix Matrix —

Matrix Column

Extracts a column vector of a given matrix.

Inputs

Name Type Description
Matrix Matrix Input matrix.
Column Index Integer Index of the column vector to extract.

Outputs

Name Type Description
Vector Vector Extracted column vector.

Matrix Get

Returns the value of the specified matrix coefficient.

Inputs

Name Type Description
Matrix Matrix —
X Integer —
Y Integer —

Outputs

Name Type Description
Value Real —

Matrix Init

Creates a matrix and initializes it with a given value.

Inputs

Name Type Description
Rows Integer Number of rows.
Columns Integer Number of columns.
Value Real Initialization value.

Outputs

Name Type Description
Matrix Matrix Created matrix.

Matrix Row

Extracts a row of a matrix.

Inputs

Name Type Description
Matrix Matrix Matrix to extract a row from.
Row Integer Index of the row to extract.

Outputs

Name Type Description
Vector Vector Extracted row vector.

Matrix Set

Sets the value of the specified matrix coefficient in the input matrix.

Inputs

Name Type Description
Matrix Matrix —
X Integer —
Y Integer —
Value Real —

Outputs

Name Type Description
Matrix Matrix Updated matrix.

Matrix Set Column

Replaces the values of a given matrix column.

Inputs

Name Type Description
Matrix Matrix Matrix to modify.
Column Index Integer Index of the column to set.
Vector Vector Column vector to set.

Outputs

Name Type Description
Modified Matrix Matrix —

Matrix Set Row

Sets a matrix row values using a vector.

Inputs

Name Type Description
Matrix Matrix Input matrix.
Row Integer Index of the row to set.
Vector Vector Vector to set.

Outputs

Name Type Description
Output Matrix Matrix Matrix with the replaced row.

Matrix To List

Converts a Matrix object to a list of list containing the Matrix values.

Inputs

Name Type Description
Matrix Matrix Matrix to convert.
Orientation Boolean Orientation of the resulting structure.

Outputs

Name Type Description
List List —

Matrix Transpose

Transposes a matrix.

Inputs

Name Type Description
Matrix Matrix Matrix to transpose.

Outputs

Name Type Description
Transposed Matrix Matrix —

Max

Returns the largest value among a list of values.

Inputs

Name Type Description
List Real List of values.

Outputs

Name Type Description
Maximum Largest value.
Index Integer First index in the list matching with the maximum.

Min

Returns the smallest value among a list of values.

Inputs

Name Type Description
List Real List of values.

Outputs

Name Type Description
Minimum Smallest value.
Index Integer First index in the list matching with the minimum.

Minus

Returns the substraction between two real numbers.

Inputs

Name Type Description
A First number.
B Second number.

Outputs

Name Type Description
Result —

Minus X

Returns the negative value of a real number.

Inputs

Name Type Description
X Real Number to negate.

Outputs

Name Type Description
Result Negative value.

Mod

Returns the modulo, ie the remainder of a division operation between two real numbers.

Inputs

Name Type Description
A Real First operand.
B Real Second operand.

Outputs

Name Type Description
Result —

Multiply

Returns the multiplication of two real numbers.

Inputs

Name Type Description
A First number.
B Second number.

Outputs

Name Type Description
Result —

Nand

Performs a negative boolean conjunction operation on 2 boolean values.

Inputs

Name Type Description
A Boolean First boolean operand.
B Boolean Second boolean operand.

Outputs

Name Type Description
Result Boolean Resulting boolean of the operation.

Noise

Computes a noise for a list of coordinates (1d, 2d or 3d depending of y and z value). It uses Perlin Noise algorithm. You can control the frequency in different direction and set the number of octaves: octaves are ways to cumulate noise at different scales.

Inputs

Name Type Description
X Real List of x coordinates.
Y Real List of y coordinates.
Z Real List of z coordinates.
Octaves Integer Number of noises computed and cumulated for a given coordinate at different scale. Each noise scale is two times smaller that then previous one.
Frequency in x Real Number of oscillations of noise for the coordinates set in x direction.
Frequency in y Real Number of oscillations of noise for the coordinates set in y direction.
Frequency in z Real Number of oscillations of noise for the coordinates set in z direction.
Minimum Noise Real Minimum noise value.
Maximum Noise Real Maximum noise value.
Seed Integer —
Use Seed Boolean —

Outputs

Name Type Description
List List List of noise values for the provided set of coordinates.

Nor

Performs a negative boolean disjunction operation on 2 boolean values.

Inputs

Name Type Description
A Boolean First boolean operand.
B Boolean Second boolean operand.

Outputs

Name Type Description
Result Boolean Resulting boolean of the operation.

Norm Vector

Returns the norm of a vector.

Inputs

Name Type Description
Vector Vector —

Outputs

Name Type Description
Norm Real —

Normal Random

Generates random numbers following a normal distribution. The result can be stable using the seed.

Inputs

Name Type Description
Number Integer Number of values to generate.
Mean Real Mean of the distribution. Which coincides with the location of its peak. This can be any type of number (Integer, Real, Length, Angle) and influences the type of result.
Standard Deviation Real The square root of variance, representing the dispersion of values from the distribution mean.
Seed Integer A seeding value to control the random generation.
Use Seed Boolean Use the seed number for random generation. This enables a stable sequences of results.

Outputs

Name Type Description
Numbers List List of generated numbers.

Normalize Vector

Creates a unit vector with the same direction as a given vector.

Inputs

Name Type Description
Vector Vector Vector to normalize.

Outputs

Name Type Description
Normalized Vector Vector Corresponding unit vector.

Not

Returns the logical inverse of a boolean value.

Inputs

Name Type Description
B Boolean —

Outputs

Name Type Description
Result Boolean —

One Minus X

Returns One minus the specified value. Useful for complentary ratio.

Inputs

Name Type Description
X Real Real value to substract from 1.

Outputs

Name Type Description
Result —

One Over X

Returns the inverse of the specified value.

Inputs

Name Type Description
X Real Real value to inverse.

Outputs

Name Type Description
Result —

Or

Performs a boolean disjunction operation on 2 boolean values.

Inputs

Name Type Description
A Boolean First boolean operand.
B Boolean Second boolean operand.

Outputs

Name Type Description
Result Boolean Resulting boolean of the operation.

Phi

Returns the value of the golden number Phi.

Outputs

Name Type Description
PHI Real —

Pi

Returns the value of PI.

Outputs

Name Type Description
PI Real —

Plus

Returns the addition of two numbers, or vectors, or matrices. Returns the concatenation of two strings.

Inputs

Name Type Description
A First operand.
B Second operand.

Outputs

Name Type Description
Result —

Power

Returns the power of a real number by another one.

Inputs

Name Type Description
Real —
Real —

Outputs

Name Type Description
—

Power of 10

Returns the power of 10 with the specified number as exponent.

Inputs

Name Type Description
X Real —

Outputs

Name Type Description
Result Real Power of 10.

Power of 2

Returns the power of 2 with the specified number as exponent.

Inputs

Name Type Description
X Real —

Outputs

Name Type Description
Result Real Power of 2.

Product

Returns the product of the list of input real numbers.

Inputs

Name Type Description
List of Values Real List of real numbers to multiply.

Outputs

Name Type Description
Product Real Result of the multiplication.

Random

Generates a list of random numbers.

Inputs

Name Type Description
Number Integer Size of the list the user wants to create.
Minimum Real —
Maximum Real —
Seed Integer —
Use Seed Boolean If set to False, seed is ignored and each update reload the random numbers.

Outputs

Name Type Description
Values Real Created list.

Round

Returns the approximation of a number with a fixed specified number of decimals. In the case of dimensions (length, angles, areas...) the unit input enable to choose the unit to consider for rounding. If no unit is provided the mks unit is considered (meters, radians, sqared-meters...).

Inputs

Name Type Description
Value Real Number or dimension to round.
Unit String For dimension numbers, it is advised to provide the unit to consider for rounding. Otherwise the mks unit is used.
Decimals Nb Integer —

Outputs

Name Type Description
Value —

Sampling

Generates a 2d or 3d sampling of the space. This sampling is random but ensures that all created points are at a distance greater than a provided radius. One can define a box where the sample has to be located in (the box is used if length, width and height are different to zero). In that case, when the algorithm doesn't succeed in creating new samples because of radius distance constraint, it stops.

Inputs

Name Type Description
Number Integer Maximum number of points to create.
Radius Length Minimum distance between two points in the sampling.
Support Matrix Reference object that defines the final positioning.
Length Length Length of the limit box.
Width Length Width of the limit box.
Height Length Height of the limit box.
Seed Integer —
Mode Integer —

Outputs

Name Type Description
X List —
Y List —
Z List —

Scalar Product

Returns the scalar product of two vectors.

Inputs

Name Type Description
Vector 1 Vector —
Vector 2 Vector —

Outputs

Name Type Description
Scalar Product Real —

Scale Numbers

Changes the range of a list of numbers (between reference minimum and maximum) to a given range (target minimum and maximum). The output values will take the dimensions (type and unit) of the given targets. For example it is possible to change the range of a list of number between 0 and 1 to a range between 15mm and 20mm. If the minimum and maximum of the reference range are left to 0, the operator uses the minimum and maximum of the input list of numbers as the reference range.

Inputs

Name Type Description
List Real List of numbers to scale to a new range.
Target Min Real Minimum of the target number range.
Target Max Real Maximum of the target number range.
Ref Min Real Minimum of the reference number range. If minimum and maximum reference are 0, the operator uses the minimum and maximum of the input list of numbers.
Ref Max Real Maximum of the reference number range. If minimum and maximum reference are 0, the operator uses the minimum and maximum of the input list of numbers.
Mode Integer Treatment for values outside of the reference range.

Outputs

Name Type Description
Result Real List of numbers scaled to the given range.

Sin

Returns the sine of an angle.

Inputs

Name Type Description
Angle Real —

Outputs

Name Type Description
Result Real —

Sinh

Returns the hyperbolic sine of an angle.

Inputs

Name Type Description
Angle Real —

Outputs

Name Type Description
Result Real —

Sqrt

Returns the square root of a real number.

Inputs

Name Type Description
Value Real —

Outputs

Name Type Description
Square Root —

Square

Returns the square of a real number.

Inputs

Name Type Description
X Real Number to square.

Outputs

Name Type Description
Result —

Stats

Returns some characteristics of a list of values : min, max, index, mean, norm, norm minus one.

Inputs

Name Type Description
List Real —

Outputs

Name Type Description
Min —
Min Index Integer —
Max —
Max Index Integer —
Mean —
Norm Real —
One Minus Norm Real —

Sum

Returns the sum of the list of input real numbers.

Inputs

Name Type Description
List of Values Real —

Outputs

Name Type Description
Sum —

SumVectors

Returns the sum of input vector list.

Inputs

Name Type Description
Vectors Vector —

Outputs

Name Type Description
Sum Vector —

Tan

Returns the tangent of an angle.

Inputs

Name Type Description
Angle Real —

Outputs

Name Type Description
Result Real —

Tanh

Returns the hyperbolic tangent of an angle.

Inputs

Name Type Description
Angle Real —

Outputs

Name Type Description
Result Real —

Threshold

Applies thresholds on a list of value.

Inputs

Name Type Description
List Real —
Min Threshold Real —
Max Threshold Real —

Outputs

Name Type Description
List —

Transformation Matrix

Creates a matrix based on a point a three vectors.

Inputs

Name Type Description
Origin Point —
I Vector —
J Vector —
K Vector —

Outputs

Name Type Description
Matrix Matrix Created matrix.

Truncate

Returns the integer part of a number by removing the decimals.

Inputs

Name Type Description
A Real —

Outputs

Name Type Description
Res Integer —

Vector

Creates a one dimension array.

Inputs

Name Type Description
Values Real —
Boolean —

Outputs

Name Type Description
Vector Vector Created vector.

Vector 3

Creates a vector with three reals with an option to create a vector with one row three columns or the opposite.

Inputs

Name Type Description
X Real —
Y Real —
Z Real —
Orientation Boolean Change this value if you want to change the orientation of the vector (vertical or horizontal).

Outputs

Name Type Description
Vector Vector —

Vector To List

Converts a vector to a list.

Inputs

Name Type Description
Vector Vector —

Outputs

Name Type Description
List List —

Xnor

Performs boolean biconditional operation on 2 boolean values.

Inputs

Name Type Description
A Boolean First boolean operand.
B Boolean Second boolean operand.

Outputs

Name Type Description
Result Boolean Resulting boolean of the operation.

Xor

Performs boolean exclusive disjunction operation on 2 boolean values.

Inputs

Name Type Description
A Boolean First boolean operand.
B Boolean Second boolean operand.

Outputs

Name Type Description
Result Boolean Resulting boolean of the operation.