Functions

Xfrog software offers many parameters that can make use of equations or functions. Even if you are not really a fan of math, you should keep the use of functions in your mind, because they can be real time savers.
Below you will find a list with descriptions and examples of the different functions. Especially functions like rnd (random), i (iteration), t and f (time and frame) are extremly helpful.
The horizontal axis always shows the input values, that you specify with sliders. The vertical axis shows the result.
An example: please take a look at the sin function. If you enter a value of zero, the result is zero. If you enter a value of pi/2 (1.57), then the output will be 1. If you use -pi as start value (first slider) and pi as end value, then the result will be a wavelike curve.
Please also have a look at these workshops:
Xfrog 5 for Maya: Abstract animation Workshop
Xfrog 5 for C4D: Waves, Iteration and more Workshop
Xfrog 3.5: Function Workshop

id

id leaves the input values untouched, values of sliders are directly used.

top


Function Sine

sine

The sine function is a trigonometric function, the results are limited between -1 and 1.
With start value -pi (-3.142) and end value pi (3.142) you produce one cycle of a wave.
If you double the input range (from -6.284 to 6.284), then you will get two waves.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5: Example one | Example two

top


Cosine Function

cos

Similar to the Sine function, only the phase is different.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Tangent Function

tan

Tangent belongs (like cos and sin) to the trigonometric functions. Depending on the input range, you will get repeated jumps. The closer the input approaches, the higher the output will be. Actually, you would get a infinite high number exactly at pi/2 !. If you then move a little bit on, the output drops to a very small value and starts growing again.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5: Example one | Example two

top


Arc Sine Function

asin

Arc sine is the inverse function of sine.
Input values range from -1 to 1
Output from -pi/2 to pi/2.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Arc Cosine Function

acos

Arc cosine is the inverse function of cosine.
Input values range from -1 to 1
Output from 0 to pi.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Arc Tangent Function

atan

Arc tangent is the inverse function of tangent.
Input values range from -infinite to infinite
Output from -pi/2 to pi/2.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Sine Hyperbolic Function

sinh

This function is called Sine hyperbolic.
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Cosine Hyperbolic Function

cosh

This function is called Cosine hyperbolic, it is capable of describing the path of a rope hanging between two points
Input values range from -infinite to infinite
Output from 1 to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Tangent Hyperbolic Function

tanh

This function is called Tangent hyperbolic.
Input values range from -infinite to infinite
Output from -1 to 1.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Exponential Function

exp

A function based on Eulers number, often used to describe growth processes.
Input values range from -infinite to infinite
Output from 0 to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


exp2

A function based on Eulers number.In this case its exp multiplied by itself.

Download examples:
Xfrog 3.5

top


Logarithm Function

log

Logarithm is the inverse function of exponantial.
Input values range from 0 to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Square Function

sqr

Square of a number. A number multiplied with itself (x*x).

Input values range from -infinite to infinite
Output from 0 to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Square Root Function

sqrt

Square root is (simplified!) the inverse function of square.
Input values range from 0 to infinite
Output from 0 to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Ceiling Function

ceil

Ceiling, returns the smallest integer greater or equal than x.
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Floor Function

floor

Floor works similar to ceiling, it just returns the greates integer smaller or equal than x.
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


rndabs function

rndabs

x is multiplied with a random value between 0 and 1: (x*abs(rnd(1)))
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Random Function

rnd

Produces a random value.
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Absolute Value Function

abs

Returns the absolut value of x (always positive).
Input values range from -infinite to infinite
Output from 0 to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


phi function

phi

x is multiplied with the value of golden section: x*1.618034.
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


clamp

This function can be used to clamp values.
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


Smooth Function

smooth

The input value is smootly clamped between 0 and 1.
Input values range from -infinite to infinite
Output from 0 to 1.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


pi

x is multiplied with the value of pi: x*3.1415.
Input values range from -infinite to infinite
Output from -infinite to infinite.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


iter

This function is independent from slider inputs. Instead it returns the so called iteration number.
Example: a horn component with iter function in rotation settings, parent is a tree component. The horn is multiplied by the tree. The first horn get´s iteration number zero, the second horn gets iteration number one, the third horn get´s iteration number two and so on. If the tree produces 20 child objects, then the last horn will get iteration number 19.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


ftime

This function is time dependent. It returns values between zero (start of animation) and one (end of animation).
Press play when testing example file.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


frame

This function is time dependent. The value returned by frame is equivalent to the actual frame.
Press play when testing example file.

Download examples:
Xfrog 5 for Maya
Xfrog 5 for C4D
Xfrog 3.5

top


rad

This function can be used to convert from degrees to radians angles. Example: If you enter 180, you will get 3.1415 as result .

top