Saturday, March 23, 2013

Web based pet-project

I've been working on this for quite some time, it's been a pet project of mine since I finished my last web-based school project.  My goal is to turn it into a fully fledged school/homework help forum, but for now it's an online calculator and graphing app with a toy BBCode editor.  I have some screenshots, but no running server to actually let anyone play with it.
These few are from the original incarnation:

The original incarnation also had the parse tree image included for debug purposes. It is in the following image:
That image uses the leaflet.js library for rendering of the graph, this works much smoother than anything I could have rolled on my own.  There is a current problem with the zooming with leaflet, I need to work out a good way to map the tile coordinates in x y and zoom that it generates to the 2D plane. It may require either editing the javascript to change the projection it uses or my image servlets to change how they process the tile coordinates, either way the math it what's stumbling me.

On a different note, the BBCode translation works fairly well, though needs a tweak on how it treats whitespace. the following two images show the test that I have working, it auto-updates when the text area is chaned.

The last three (other than the img tag) are the main reasons I have rolled my own, they use the parser to generate MathML, and evaluate expressions.  The parser I used was written in Java, using a library from the book Building Parsers With Java by Steve Metsker.  I worked off the books Arithmetic Parser chapter and classes, and edited it heavily to change it from directly calculating values, to generating a re-usable parse tree, added the ability to store and use variable names, recognize graphs and recognize mathematical functions such as sine, cosine, tangent, logarithms, etc.

I have some of the forum related code in place, it's a matter of generating test data (forums, threads, users), and getting the code to access and display it all, so far it only displays one or two of the approximately 8-10 different things. 

No comments:

Post a Comment