Plotter in javascript. help & samples
What is it for ?
This plotter displays simultaneously 4 functions, and then allows the user to browse the chart.
Usage
Specify the functions you want to see in the 'y=' input fields. e.g.
if you type in 'x' the the identity function will be displayed.
the operators allowed are * + - / and % (for modulo), you may also use the ? : (conditional) operator.
Eventually modify the ranges if required, then click go. You can then browse the chart with the zoom and arrows.
examples
x>3.14?cos(x):-1 (explanation: when x is < 3.14 the value is cos(x) otherwise the value is -1)
sin(x)*3
1/x
sin(x)*cos(x*2)
List of functions
abs(a) : the absolute value of a
acos(a) : arc cosine of a
asin(a) : arc sine of a
atan(a) : arc tangent of a
atan2(a,b) : arc tangent of a/b
ceil(a) : integer closest to a and not less than a
cos(a) : cosine of a
exp(a) : exponent of a
floor(a) : integer closest to and not greater than a
log(a) : log of a base e
max(a,b) : the maximum of a and b
min(a,b) : the minimum of a and b
pow(a,b) : a to the power b
random() : pseudorandom number in the range 0 to 1
round(a) : integer closest to a
sin(a) : sine of a
sqrt(a) : square root of a
tan(a) : tangent of a
Bugs
the grid does not displays properly with big ranges.
minimum plot size is 2px in internet explorer.