## ParaView Calculator

The calculator filter uses the VTK filter vtkArrayCalculator. The calculator filter can be used to create new data arrays by performing operations on current data arrays. The user interface for the Calculator filter is similar to that of a desktop calculator. After selecting an active data object, the user can specify a mathematical equation to be applied to the specified data arrays.

1. First the user selects the data they wish to operate on from the Selection Window. It will be highlighted when this occurs.
2. The user can then select Filter->Alphabetical->Calculator Attributes from the main menu or click on the button. This will open the Calculator interface.
3. Enter the mathematical equation into the calculator interface.
4. The Accept button must be pressed before the output will be generated.

A brief description of the functions and symbols understood by the Array Calculator:

Array Calculator Functions
Function Name Description
iHat I Unit Vector
jHat J Unit Vector
kHat K Unit Vector
abs Absolute Value of a Scalar
acos Arc Cosine
asin Arc Sine
atan Arc Tangent
ceil "Ceiling", round a floating-point number up to an integer
cos Cosine
cosh Hyperbolic Cosine
cross(x,y) Returns the Cross Product of the two vectors X & Y
exp(X) e^X Exponential
floor Round a floating-point number down to an integer
log Logarithm
mag Magnitude of a vector
min(x,y) Return the minimum of two scalars
max(x,y) Return the maximum of two scalars
norm Normalize a Vector, dividing it by the magnitude
sign Returns -1 if the scalar is negative, +1 if the scalar is positive, and 0 if the scalar is 0
sin Sin
sinh Hyperbolic Sin
sqrt Square Root
tan Tangent
tanh Hyperbolic Tangent
x.y Dot Product of x and y
x^y x raised to the y power
e^y e (2.71828183, Euler's Number) raised to the y power

Some typical formulae:

• Combining three scalars into a vector field: (iHat*Scalar1)+(jHat*Scalar2)+(kHat*Scalar3)
• Computing a vector magnitude: mag(Vector)

Back to ParaView