Latest news
JSLab Plot Tool
6. November 2008As part of a larger animation framework I have created a plotting tool for visualizing functions. It is made entirely in JavaScript, uses no graphics and the generated source code is W3C compliant.
The first beta is ready for public viewing (and hopefully feedback) and currently supports
- Real valued functions of one variable y = f(x)
- Parameter functions for plane curves (x,y) = f(t)
- Customizable plots like curve resolution and axis positioning.
- Simple zoom functionality (not for plane curves)
Right now only one function can be plotted at a time but I hope to add support for multiple plots later on as well as some numerical methods for line intersection and maybe integrals and differentiation. (any math geeks out there are welcome to join the project)
The program uses an absolute positioned div for the graph canvas area. Each point on the curve is internally calculated and stored as the real function values. When the point is plotted it is converted to a div and positioned relative to the canvas taken axis scaling into account.
This creates a lot of divs but IE, Firefox, Opera and Safari seems to cope fine when the number is no greater than 1500 points.
All the positioning which is done unfortunately throws of IE6 and I haven't tested in IE8 (as it is still beta) but otherwise it seems to be pretty stable.
You can find it at http://www.jslab.dk/tools.plot.php
