function_plotter.lua

NAME
SYNOPSIS
DESCRIPTION

NAME

function_plotter.lua − function plotter for Lua-AKFAvatar

SYNOPSIS

function_plotter.lua [function]

DESCRIPTION

Function plotter for Lua-AKFAvatar. You can enter a function for the variable x, which will then be plotted. For example, enter something like this: "(x/5)^3"

You can use the following operators:

+

plus (addition)

-

minus (substraction)

*

multiply (multiplication)

/

divide (division)

^

exponentation (for example use "x^3" for x³)

%

modulo (the rest of a division)

For fractions you can use either a point or a comma as decimal mark. So "0.5" or "0,5" is the same. You cannot use a thousands separator. The number π can be written as "pi".

You can use the following functions:

sqrt(x)

square root (√x)

exp(x)

e^x

log(x)

natural logarithm

log10(x)

base-10 logarithm

deg(x)

convert to degree (x in radians)

rad(x)

covert to radians (x in degree)

sin(x)

sine (x in radians)

sinh(x)

hyperbolic sine (x in radians)

asin(x)

arc sine (x in radians)

cos(x)

cosine (x in radians)

cosh(x)

hyperbolic cosine (x in radians)

acos(x)

arc cosine (x in radians)

tan(x)

tangent (x in radians)

tanh(x)

hyperbolic tangent (x in radians)

atan(x)

arc tangent (x in radians)

ATTENTION: The argument for these functions must always be put in parentheses!

If you often need special functions or constant, it’s easy to add them to the script.