You can move the initial point.
Credits to JSXgraph.
Enjoy!
Use the example to learn how to write a function. To use trigonometric, logarithmic or exponential function use:
Math.abs(x) // the absolute value of x Math.acos(x) // arc cosine of x Math.asin(x) // arc sine of x Math.atan(x) // arc tangent of x Math.cos(x) // cosine of x Math.exp(x) // exponential of x (ex) Math.log(x) // log of x base e Math.pow(a,b) // a to the power b Math.sin(x) // sine of x Math.sqrt(x) // square root of x Math.tan(x) // tangent of x Math.E // the constant e Math.PI // the constant πNote that trigonometric functions assume that the argument is in radians, not degrees!