Personal Projects and Mucking Around

© Luke Wallin 2005-2017

Online Graph Plotter

As of 6th May 2008 I have released the source code of the plotter, and welcome anyone who wants to to make use of it. It requires PHP 5 and the GD images library.

Currently there is no documentation other than the comments amongst the source (however, these are enough to have reminded me what was going on after several months of having not looked at the project).

example of graph

Syntax

multiplication= *
division= /
Natural logs= ln(x)
Logs base 10= log(x)
Logs base z= log(x,z)
Powers= ^ eg x^2
Trig= cos(), sin(), tan()
Inverse trig= arccos(), arcsin(), arctan()
Hyperbolic trig= cosh(), sinh(), tanh()

All angles are in radians; e and pi can be used as 'e' and 'pi'.

Line Types

Enter a line by selecting the 'New' menu and the type of line, or using the keyboard shortcut (the underlined letter in the menu).

Functions

Will plot y=f(x), with f(x) given in terms of x only.

Parametrics

Will plot a line y=f(q1), x=f(q2), with both functions given in terms of q.

Gradients

Will plot the gradient function of the given function of x, in effect plotting dy/dx.

Polar Equations

Using the polar co-ordinate system, this can plot a graph of theta=f(r), or r=f(theta), using q for theta. Where r is the distance from the pole (origin), and theta is the angle anti-clockwise from the positive x axis.

More Info

The GUI is written javascript, and the plotter in PHP using the GD images library to create a PNG image.

One of the reasons for writing this plotter was so I didn't have to buy a graphics calculator for my Maths A-Level. I added features more or less as I learnt about them, although I think I'll give intrinsic co-ordinates a miss.

The original version was very like the new simple graph suite, and as I slowly added more and more features it morphed into the old graph suite. Since this had become quite a mess, both to use and the script, I started afresh with the new graph suite. Since I had a better idea of what I wanted to aim for, and what a plotter could do, I was able to create a much neater, easier to use (I hope) suite right from the start.