Prev | Next


IceMan Reference Guide


Math

Most of these functions correspond to the C math library equivalents, and are called on a per-pixel basis. Given the limited precision of Fractional and FixedPoint types, some operations must be used with care. (Values are automatically clamped to the legal range).

Abs()
Absolute value.
Add(b)
b: second operand (IceImage)

Add two images.

AddWrap(b)
b: second operand (IceImage)

Add two images, but wrap the result so that it falls in the range 0-1. Something like a floating point modulo operation.

ACos()
Inverse cosine.
ASin()
Inverse sine.
ATan()
Inverse tangent.
ATan2(x)
x: Base (IceImage)

Inverse tangent operation. The image being operated upon is the perpendicular, or y.

Ceil()
Round up to nearest integer.
Cos()
Cosine.
Cosh()
Hyperbolic cosine.
Divide(b)
b: Denominator (IceImage)

Divide one image by another: the image being operated upon is the numerator.

Exp()
Inverse natural logarithm.
Floor()
Round down to nearest integer.
Hypot(b)
b: Second side of the "triangle" (IceImage)

Compute the hypotenuse of a triangle: the image being operated upon is the first operand.

Ln()
Natural logarithm.
Max(b)
b: Second operand (IceImage)

Result is the maximum of the two inputs.

Min(b)
b: Second operand (IceImage)

Result is the minimum of the two inputs.

Multiply(b)
b: Multiplicand (IceImage)

Multiply two images. The multiplier is the image being operated upon.

MultiplyAccumulate(b, c)
b: Scale (IceImage)
c: Offset (IceImage)

Mutiply image a by b and add c.   

MultiplyComplement(b)
b: Second operand.

Implements a * (1 − b). a  is the image being operated upon.

Round()
Round to nearest integer.
Sign()
Signum function. Return value is 1 for positive values, and −1 for negative ones. (Note: Should probably be called Sgn(), to conform to common mathematics convention).
Sine()
Sine function.
Sinh()
Hyperbolic sine.
SmoothStep(min, max)
min: Lower threshold (IceImage)
max: Upper threshold (IceImage)

Return 0 if less than the lower threshold, 1 if greater than the upper threshold, and smoothly varying in between. (A cubic is used, with c1 continuity at both ends).

Sqrt()
Square root.
Subtract(b)
b: Subtrahend (IceImage)

Subtract two images.  The minuend is the image being operated upon.

Tan()
Tangent function.
Tanh()
Hyperbolic tangent.

 


Prev | Next


 

 

Pixar Animation Studios
Copyright© Pixar. All rights reserved.
Pixar® and RenderMan® are registered trademarks of Pixar.
All other trademarks are the properties of their respective holders.