- http://terrytao.wordpress.com/2009/10/29/displaying-mathematics-on-the-web/
- http://terrytao.wordpress.com/2009/11/04/displaying-maths-online-ii/
- strings or graphics from the kernel (as small blips in building the UI)
- Java applet for Graphics3D
- Flash applet for Manipulate
MathFlow is an input mechanism to essentially decrease the learning curve to input mathematical notation into the web. It is a Java applet that seems to work on all major OSes given that the moon is in correct orientation and system Java has not crucially changed. Icedtea6 Java plugin on Ubuntu worked too. MathFlow is proprietary software, this was an evaluation license. To be able to test it on a private server so that clients other than localhost can see it, was possible by recompiling the jar with a custom evaluation license. I could not find any open source alternatives, and this software seems capable of doing the job right now. Ideally, modern-day alternative could be written in JavaScript.. maybe compatible with MathJax..
The output formula is in MathML, and it can be captured to webMathematica input, in JavaScript, using for example the MooTools toolkit to do an XHR and update the page:var mml = document.SampleSimpleEditorApplet.getMathML(); params = 'fun='+URLescape(mml); var req = new Request.HTML({ method: 'post', url: '_action.jsp?'+params, encoding: 'iso8859-15', onRequest: function() {}, update: $('div.output'), onComplete: function(response) {} }).send();This would send the contents of the editor applet to _action.jsp in request parameter fun, and the XHR would update the page. This _action.jsp in webMathematica could..
<%@ page contentType="text/xml"%> <%@ taglib uri="http://www.wolfram.com/msp" prefix="msp" %> <msp:evaluate> MSPFormat[ MSPToExpression[$$fun], TraditionalForm ] </msp:evaluate>.. generate an image of the formula in traditional mathematical notation. Notice the $$fun variable, which is parsed by the webMathematica backend. In case where the formula has variables, it is possible to parse it in the "delayed" form:
SetDelayed[ f[x_], Evaluate[ MSPToExpression[ $$fun, MathMLForm ] ] ];Or plot it, notice the use of MSPBlock ..
MSPBlock[ {$fun}, MSPShow[ Plot[ $fun, {x, -2*Pi, 2*Pi}, ImageSize->{600,500} ]]]
So you can build all sorts of elaborate user interfaces on top of these building blocks. This is just an example of plotting the user input formula. He shouldn't need to learn LaTeX or any other new notation to input the mathematics into the computer.
The mathematica magician can work with the Wolfram Workbench to write Mathematica code, and still work in a familiar notebook environment.
The web developer has a similar view to produce the 3D applet, where the MSPLive3D module creates the HTML code for the Java applet.Needs["Talo3D`"]; ... MSPLive3D[ Graphics3D[ { RGBColor[0, 0, 1], Thickness[0.005], Map[Line, house] }, Boxed -> False ] ]
This is LiveGraphics3D generated by webMathematica3 on Safari. The house is rotatible. =) The original .nb was cc'd to me by Jyrki Kajala a few years ago. Quite recently he taught me about Mathematica packages, and .m files, and how the notebook can load the package. The package can now be subjected to functional testing and also included to webMathematica JSP. The tools have a certain good feel of dynamicity. Some issues, here and there, but it would be very interesting to build various use scenarios ..
No comments:
Post a Comment