KevinMehall »

Announcing EquationExplorer

Screenshot

My latest project is now available online: EquationExplorer.

There was a notable lack of tools (especially free ones) capable of graphing implicit functions. So, I decided to build my own. Being a web page and not requiring an install greatly increases its utility. Hopefully it can be a useful resource for teachers, students, or anyone interested in visualizing algebraic equations.

Graphing explicit functions is easy; just scan across the X axis, plotting points. But an algorithm to graph implicit equations is not as obvious or simple. EquationExplorer does it by scanning through each pixel twice, going both left to right and top to bottom. The equation is rewritten as a subtraction (i.e. x^2 + 2 = x becomes x^2 + 2 - x). At each pixel scanned, the value of that expression is evaluated, and compared to the value at the previous pixel. If they differ in sign, it means the expression crossed 0 somewhere in between, and therefore the equation was true somewhere within that pixel. It then does some work to find the the point more precisely (for antialiasing), and plots the pixels.

Amazingly, that is fast enough, even in Javascript, to render in near-real-time as the user is typing. In the most recent releases of the TraceMonkey, V8, and JavascriptKit engines especially so, but it works just fine in SpiderMonkey in Firefox 3.0. You'll need a fairly recent browser, in any case, because it depends on the new HTML5 features like Canvas. Internet Explorer is not supported. (Which was nice, because I had an excuse not to have to work around all the IE bugs that every web developer has come to despise.)

Click here to try EquationExplorer

Like this post? Share/Save/Bookmark or Subscribe
blog comments powered by Disqus