What you can type
- Operators:
+ - * / ^and brackets.2xand3sin(x)work without the*. - Functions:
sin cos tan asin acos atan sinh cosh tanh sqrt abs exp ln log floor ceil round sign. - Constants:
piande.
Drawing shapes that are not functions
A circle or an ellipse has two y values for each x, so draw it as two halves. For the ellipse x²/25 + y²/9 = 1 enter 3sqrt(1-x^2/25) and -3sqrt(1-x^2/25). The same trick draws a parabola that opens sideways: sqrt(4x) and -sqrt(4x).
Drawing graphs in code
To draw these curves onto an image in PHP with the GD library, see the related tutorials below. They use the same idea as this tool: step through x, work out y, and turn each pair into a pixel.